|
|
!(function(){var Dl=Math.pow;var gc=(En,Yt,se)=>new Promise((fe,We)=>{var Be=Te=>{try{ve(se.next(Te))}catch(_e){We(_e)}},Je=Te=>{try{ve(se.throw(Te))}catch(_e){We(_e)}},ve=Te=>Te.done?fe(Te.value):Promise.resolve(Te.value).then(Be,Je);ve((se=se.apply(En,Yt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[86820],{18299:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},84249:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},42922:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},90674:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},25877:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},63237:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},99569:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},22751:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},38308:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},17663:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},91034:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},72395:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},53978:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return _e}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(me,De){return We.createElement(ve.Z,(0,fe.Z)({},me,{ref:De,icon:Je}))},_e=We.forwardRef(Te)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(En,Yt){"use strict";Yt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var En={},Yt="5.0",se={},fe=null,We=!1,Be=!1,Je=null,ve=!1,Te=null,_e=null,we=0;we<arguments.length;we++){var me=arguments[we];if(me!==null)switch(typeof me){case"number":Yt=me.toFixed(1);break;case"string":me.match(new RegExp("^[0-9]\\.[0-9]+$"))?Yt=me:Je=me;break;case"object":typeof me.is3D!="undefined"?fe=me:se=me;break;case"boolean":We=me,Be=!0;break}}fe===null&&(fe={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},se.material_id!==void 0&&!Be&&(We=!0)),Je!==null&&se.id===void 0&&(se.id=Je);var De="",at="",Oe=!1,Mt=null,ht=null,lt=null,et=!1,Ee=null,yt=null,Vt=null,qe=null,ut=null;se.height!==void 0&&(se.height=Math.round(se.height)),se.width!==void 0&&(se.width=Math.round(se.width));var Ce=function(nt){return parseFloat(nt)>4?parseFloat(nt):5};En.setHTML5Codebase=function(nt,ft){_e=nt,Bt(nt,ft)},En.setJavaCodebase=En.setJavaCodebaseVersion=En.isCompiledInstalled=En.setPreCompiledScriptPath=En.setPreCompiledResourcePath=function(){},En.setHTML5CodebaseVersion=function(nt,ft){var Xt=parseFloat(nt);if(Xt!==NaN&&Xt<5){console.log("The GeoGebra HTML5 codebase version "+Xt+" is deprecated. Using version latest instead.");return}Te=nt,Le(nt,ft)},En.getHTML5CodebaseVersion=function(){return ht},En.getParameters=function(){return se},En.setFontsCSSURL=function(nt){qe=nt},En.setGiacJSURL=function(nt){},En.setJNLPFile=function(nt){De=nt},En.setJNLPBaseDir=function(nt){},En.inject=function(){function nt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ft="auto",Xt=se.id,Rn,wn=!1,Zt=0;Zt<arguments.length;Zt++){var Ht=arguments[Zt];typeof Ht=="string"?(Ht=Ht.toLowerCase(),Ht.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ft=Ht:Xt=arguments[Zt]):typeof Ht=="boolean"?wn=Ht:Ht instanceof HTMLElement&&(Rn=Ht)}Tn();function Tn(){if(!ve){setTimeout(Tn,200);return}ft=yn(ft);var xn=Rn||document.getElementById(Xt);if(!xn){console.log("possibly bug on ajax loading? ");return}if(En.removeExistingApplet(xn,!1),se.width===void 0&&xn.clientWidth&&(se.width=xn.clientWidth),se.height===void 0&&xn.clientHeight&&(se.height=xn.clientHeight),!(se.width&&se.height)&&ft==="html5"&&(delete se.width,delete se.height),Mt=ft,ft==="screenshot")Dt(xn,se);else{var ke=!1;se.hasOwnProperty("playButton")&&se.playButton||se.hasOwnProperty("clickToLoad")&&se.clickToLoad?ke=!0:se.hasOwnProperty("playButtonAutoDecide")&&se.playButtonAutoDecide&&(ke=(!xe()||nt())&&Ue()),ke?(Mt="screenshot",it(xn,se,wn,ft)):Ft(xn,se,wn)}}};function xe(){try{return window.self!==window.top}catch(nt){return!0}}function Ue(){return se.hasOwnProperty("screenshotGenerator")&&se.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}En.getViews=function(){return fe},En.isJavaInstalled=function(){return!1};var Ze=function(nt){var ft=function(Zt){var Ht=JSON.parse(Zt),Tn=function(ue){return ue.type=="G"||ue.type=="E"},xn=Ht.elements?Ht.elements.filter(Tn)[0]:Ht;if(!xn||!xn.url){Xt();return}se.fileName=xn.url,St(xn.settings||{}),fe.is3D=!0;var ke="https://www.geogebra.org/images/";En.setPreviewImage(Ee||xn.previewUrl,ke+"GeoGebra_loading.png",ke+"applet_play.png"),nt()},Xt=function(){se.onError&&se.onError(),Dn("Error: Fetching material (id "+se.material_id+") failed.",se)},Rn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",wn="/materials/"+se.material_id+"?scope=basic";mt("https://"+Rn+"/api/proxy.php?path="+encodeURIComponent(wn),ft,Xt)};function St(nt){var ft=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Xt){nt[Xt]=!!nt[Xt]}),ft.forEach(function(Xt){se[Xt]===void 0&&nt[Xt]!==void 0&&(se[Xt]=nt[Xt])}),se.showToolBarHelp===void 0&&(se.showToolBarHelp=se.showToolBar)}function mt(nt,ft,Xt){var Rn=new XMLHttpRequest;Rn.open("GET",nt),Rn.onload=function(){ft(Rn.responseText)},Rn.onerror=Xt,Rn.send()}En.isHTML5Installed=function(){return!0},En.getLoadedAppletType=function(){return Mt},En.setPreviewImage=function(nt,ft,Xt){Ee=nt,yt=ft,Vt=Xt},En.removeExistingApplet=function(nt,ft){var Xt;typeof nt=="string"&&(nt=document.getElementById(nt)),Mt=null;var Rn=null;for(Xt=0;Xt<nt.childNodes.length;Xt++){var wn=nt.childNodes[Xt],Zt=wn.className;Zt==="applet_screenshot"?ft?(wn.style.display="block",Mt="screenshot"):wn.style.display="none":Zt!=="applet_scaler prerender"&&(nt.removeChild(wn),Rn=Zt&&Zt.indexOf("appletParameters")!=-1?wn.id:null,Xt--)}var Ht=se.id!==void 0?se.id:Rn,Tn=window[Ht];Tn&&typeof Tn.getBase64=="function"&&(Tn.remove(),window[Ht]=null)},En.refreshHitPoints=function(){if(Ce(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var nt=En.getAppletObject();return nt&&typeof nt.recalculateEnvironments=="function"?(nt.recalculateEnvironments(),!0):!1},En.startAnimation=function(){var nt=En.getAppletObject();return nt&&typeof nt.startAnimation=="function"?(nt.startAnimation(),!0):!1},En.stopAnimation=function(){var nt=En.getAppletObject();return nt&&typeof nt.stopAnimation=="function"?(nt.stopAnimation(),!0):!1},En.getAppletObject=function(){var nt=se.id!==void 0?se.id:"ggbApplet";return window[nt]},En.resize=function(){};var Pt=function(nt,ft,Xt){var Rn=document.createElement("param");Rn.setAttribute("name",ft),Rn.setAttribute("value",Xt),nt.appendChild(Rn)},Qe=function(nt){return nt&&nt!=="false"},Ft=function(nt,ft,Xt){Ce(ht)<=4.2&&(Xt=!0);var Rn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ht||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Rn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var wn=document.createElement("div");wn.classList.add("appletParameters","notranslate");var Zt=ft.width,Ht=ft.height;if(ft.disableAutoScale=ft.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ft.disableAutoScale,ft.width!==void 0)if(Ce(ht)<=4.4)Qe(ft.showToolBar)&&(ft.height-=7),Qe(ft.showAlgebraInput)&&(ft.height-=37),ft.width<605&&Qe(ft.showToolBar)&&(ft.width=605,Zt=605);else{var Tn=100;(Qe(ft.showToolBar)||Qe(ft.showMenuBar))&&(ft.hasOwnProperty("customToolBar")&&(ft.customToolbar=ft.customToolBar),Tn=Qe(ft.showMenuBar)?245:155),Zt<Tn&&(ft.width=Tn,Zt=Tn)}wn.style.border="none",wn.style.display="inline-block";for(var xn in ft)ft.hasOwnProperty(xn)&&xn!=="appletOnLoad"&&wn.setAttribute("data-param-"+xn,ft[xn]);qe&&wn.setAttribute("data-param-fontscssurl",qe),En.resize=function(){GGBAppletUtils.responsiveResize(nt,ft)},window.addEventListener("resize",function(jt){En.resize()});var ke=typeof ft.appletOnLoad=="function"?ft.appletOnLoad:function(){};if(!Xt&&ft.width!==void 0){ft.hasOwnProperty("showSplash")||wn.setAttribute("data-param-showSplash","false");var ue=nt.querySelector(".applet_scaler.prerender"),le=ue!==null;if(le)var pe=ue.querySelector(".ggb_preview");else{var pe=_n(Zt,Ht,ft.borderColor,!1);ue=document.createElement("div"),ue.className="applet_scaler",ue.style.position="relative",ue.style.display="block",ue.style.width=Zt+"px",ue.style.height=Ht+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ue,"66%"),Ce(ht)>=5?(ft.appletOnLoad=function(jt){var ar=nt.querySelector(".ggb_preview");ar&&ar.parentNode.removeChild(ar),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ue),window.GGBT_wsf_view&&$(window).trigger("resize"),ke(jt)},le||ue.appendChild(pe)):wn.appendChild(pe),ue.appendChild(wn),le||nt.appendChild(ue),setTimeout(function(){En.resize()},1)}else{var he=document.createElement("div");he.className="applet_scaler",he.style.position="relative",he.style.display="block",he.appendChild(wn),nt.appendChild(he),ft.appletOnLoad=function(jt){En.resize(),ke(jt)}}function oe(jt,ar){ar&&typeof ar.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(jt,ar.appletOnLoad):renderGGBElement(jt),Dn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ar)}function Ae(jt,ar){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:jt,params:ar}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(xr){oe(xr.article,xr.params)}),html5AppletsToProcess=null)},Ce(ht)<5&&(jt.className+=" geogebraweb")):oe(jt,ar)}if(Rn){scriptLoadStarted=!0;for(var Ge=0;Ge<wn.childNodes.length;Ge++){var _t=wn.childNodes[Ge].tagName;_t==="TABLE"&&(wn.removeChild(wn.childNodes[Ge]),Ge--)}if(ggbHTML5LoadedScript!==null){var Rt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Rt!=null&&Rt.parentNode.removeChild(Rt)}var zt=document.createElement("script"),qt=function(){Ae(wn,ft)};zt.src=at+lt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=ht,ggbHTML5LoadedScript=zt.src,Dn("GeoGebra HTML5 codebase loaded: '"+at+"'.",ft),!_e&&(!Te||Te=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),qt()):at.requirejs?__webpack_require__.e(12).then(function(){var jt=[__webpack_require__(12)];qt.apply(null,jt)}.bind(this)).catch(__webpack_require__.oe):(zt.onload=qt,nt.appendChild(zt))}else Ae(wn,ft);ft.height=Ht,ft.width=Zt},Dt=function(nt,ft,Xt){var Rn=_n(ft.width,ft.height,ft.borderColor,Xt),wn=document.createElement("div");wn.style.position="relative",wn.style.display="block",wn.style.width=ft.width+"px",wn.style.height=ft.height+"px",wn.className="applet_screenshot applet_scaler"+(Xt?" applet_screenshot_play":""),wn.appendChild(Rn);var Zt=GGBAppletUtils.getScale(ft,nt,Xt);Xt?(nt.appendChild(en()),window.GGBT_wsf_view||(nt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(wn,"66%"),nt.appendChild(wn),Zt!==1&&!isNaN(Zt)&&(GGBAppletUtils.scaleElement(wn,Zt),wn.style.width=ft.width+"px",wn.style.height=ft.height+"px",wn.parentNode.style.width=ft.width*Zt+"px",wn.parentNode.style.height=ft.height*Zt+"px"),En.resize=function(){an(nt,Rn,wn,Xt)},window.addEventListener("resize",function(Ht){En.resize()}),En.resize()};function an(nt,ft,Xt,Rn){if(nt.contains(ft)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(nt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(nt)}var wn=GGBAppletUtils.getScale(se,nt,Rn);Xt.parentNode!==null&&(!isNaN(wn)&&wn!==1?(GGBAppletUtils.scaleElement(Xt,wn),Xt.parentNode.style.width=se.width*wn+"px",Xt.parentNode.style.height=se.height*wn+"px"):(GGBAppletUtils.scaleElement(Xt,1),Xt.parentNode.style.width=se.width+"px",Xt.parentNode.style.height=se.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(nt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}En.onExitFullscreen=function(nt,ft){ft.appendChild(nt)};var it=function(nt,ft,Xt,Rn){Dt(nt,ft,!0);for(var wn=function(){var Tn=[];for(Ht=0;Ht<nt.childNodes.length;Ht++)Tn.push(nt.childNodes[Ht]);if(window.GGBT_wsf_view){var xn=window.GGBT_wsf_view.renderFullScreen(nt,ft.id),ke=document.getElementById("fullscreencontainer"),ue=jQuery(nt).find(".fullscreencontent");ue.length>0?(xn.remove(),ue.attr("id","fullscreencontent").show(),jQuery(ke).append(ue),window.dispatchEvent(new Event("resize"))):Ft(xn,ft,!1),window.GGBT_wsf_view.launchFullScreen(ke)}else Mt=Rn,Ft(nt,ft,!1);if(!window.GGBT_wsf_view)for(Ht=0;Ht<Tn.length;Ht++)nt.removeChild(Tn[Ht])},Zt=nt.getElementsByClassName("ggb_preview_play"),Ht=0;Ht<Zt.length;Ht++)Zt[Ht].addEventListener("click",wn,!1),Zt[Ht].addEventListener("ontouchstart",wn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(nt),Ue()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},en=function(){var nt=document.createElement("div");if(nt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ft='.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");}',Xt=document.createElement("style");Xt.styleSheet?Xt.styleSheet.cssText=ft:Xt.appendChild(document.createTextNode(ft)),document.getElementsByTagName("head")[0].appendChild(Xt)}return nt},_n=function(nt,ft,Xt,Rn){var wn=document.createElement("div");wn.className="ggb_preview",wn.style.position="absolute",wn.style.zIndex="90",wn.style.width=nt-2+"px",wn.style.height=ft-2+"px",wn.style.top="0px",wn.style.left="0px",wn.style.overflow="hidden",wn.style.backgroundColor="white";var Zt="lightgrey";Xt!==void 0&&(Xt==="none"?Zt="transparent":Zt=Xt),wn.style.border="1px solid "+Zt;var Ht=document.createElement("img");if(Ht.style.position="relative",Ht.style.zIndex="1000",Ht.style.top="-1px",Ht.style.left="-1px",Ee!==null&&Ht.setAttribute("src",Ee),Ht.style.opacity=.7,yt!==null){var Tn,xn,ke;if(!Rn){Tn=document.createElement("img"),Tn.style.position="absolute",Tn.style.zIndex="1001",Tn.style.opacity=1,Ht.style.opacity=.3,xn=360,xn>nt/4*3&&(xn=nt/4*3),ke=xn/5.8,Tn.setAttribute("src",yt),Tn.setAttribute("width",xn),Tn.setAttribute("height",ke);var ue=(nt-xn)/2,le=(ft-ke)/2;Tn.style.left=ue+"px",Tn.style.top=le+"px",wn.appendChild(Tn)}}return wn.appendChild(Ht),wn},yn=function(nt){return nt=nt.toLowerCase(),nt==="html5"||nt==="screenshot"?nt:"html5"},Ve=["web","webSimple","web3d","tablet","tablet3d","phone"],Le=function(nt,ft){if(ht=nt,ft){Bt(ht,!0);return}var Xt=!We;if(Xt){var Rn=Ce(ht);!isNaN(Rn)&&Rn<4.4&&(Xt=!1)}var wn,Zt;window.location.protocol.substr(0,4)==="http"?wn=window.location.protocol:wn="http:";var Ht=ht.indexOf("//");Ht>0?Zt=ht:Ht===0?Zt=wn+ht:Zt="https://www.geogebra.org/apps/5.2.814.0/";for(var Tn in Ve)if(ht.slice(Ve[Tn].length*-1)===Ve[Tn]||ht.slice((Ve[Tn].length+1)*-1)===Ve[Tn]+"/"){Bt(Zt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Xt&&!fe.is3D&&!fe.AV&&!fe.SV&&!fe.CV&&!fe.EV2&&!fe.CP&&!fe.PC&&!fe.DA&&!fe.FI&&!fe.PV&&!Qe(se.showToolBar)&&!Qe(se.showMenuBar)&&!Qe(se.showAlgebraInput)&&!Qe(se.enableRightClick)&&(!se.appName||se.appName=="classic")?Zt+="webSimple/":Zt+="web3d/",Bt(Zt,!1)},Bt=function(nt,ft){if(nt.requirejs){at=nt;return}nt.slice(-1)!=="/"&&(nt+="/"),at=nt,ft===null&&(ft=nt.indexOf("http")===-1),Oe=ft,lt="web.nocache.js",et=!1;var Xt=at.split("/");Xt.length>1&&(!ft&&Xt[Xt.length-2]==="webSimple"?(lt="webSimple.nocache.js",et=!0):Ve.indexOf(Xt[Xt.length-2])>=0&&(lt=Xt[Xt.length-2]+".nocache.js")),Xt=nt.split("/"),ht=Xt[Xt.length-3],ht.substr(0,4)==="test"?ht=ht.substr(4,1)+"."+ht.substr(5,1):(ht.substr(0,3)==="war"||ht.substr(0,4)==="beta")&&(ht="5.0");var Rn=parseFloat(ht);Rn!==NaN&&Rn<5&&nt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Rn+" is deprecated. Using version latest instead."),Le("5.0",ft))},Dn=function(nt,ft){window.console&&window.console.log&&(!ft||typeof ft.showLogging=="undefined"||ft.showLogging&&ft.showLogging!=="false")&&console.log(nt)};se.material_id!==void 0?Ze(dn):dn();function dn(){var nt=Yt;Te!==null?nt=Te:parseFloat(nt)<5&&(nt="5.0"),Le(nt,!1),_e!==null&&Bt(_e,Oe),ve=!0}return En},GGBAppletUtils=function(){"use strict";function En(){return window.GGBT_wsf_edit!==void 0}function Yt(ve,Te){Te!=1?(ve.style.transformOrigin="0% 0% 0px",ve.style.webkitTransformOrigin="0% 0% 0px",ve.style.transform="scale("+Te+","+Te+")",ve.style.webkitTransform="scale("+Te+","+Te+")",ve.style.maxWidth="initial",ve.querySelector(".ggb_preview")!==null&&(ve.querySelector(".ggb_preview").style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ve.style.transform="none",ve.style.webkitTransform="none")}function se(ve,Te,_e,we,me,De){var at=null;if(De!=null&&De!="")for(var Oe=ve.parentNode;Oe!=null;)if((" "+Oe.className+" ").indexOf(" "+De+" ")>-1){at=Oe;break}else Oe=Oe.parentNode;var Mt=0,ht=0,lt=0,et=0,Ee=0,yt=0,Vt=0;if(at)Mt=at.offsetWidth,ht=Math.max(we?at.offsetWidth:0,at.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Mt=Math.min(window.innerWidth,document.documentElement.clientWidth),ht=Math.min(window.innerHeight,document.documentElement.clientHeight),lt=Mt):(Mt=window.innerWidth,ht=window.innerHeight,lt=window.innerWidth),ve){var qe=ve.getBoundingClientRect();qe.left>0&&qe.left<=Mt&&(me===void 0||!me)&&(document.dir==="rtl"?(Ee=Mt-qe.width-qe.left,yt=lt<=480?10:30):(yt=qe.left,Ee=lt<=480?10:30),et=yt+Ee)}if(ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ut=ve.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,Vt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,Vt=40)}}return ve&&((_e===void 0||!_e)&&Te>0&&Te+et<Mt?Mt=Te:Mt-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(_e===void 0||!_e)&&(ht-=Vt)),{width:Mt,height:ht}}function fe(ve,Te,_e,we,me){if(ve.isScreenshoGenerator)return 1;var De=we!==void 0&&we,at=ve.noScaleMargin!=null&&ve.noScaleMargin,Oe=function(ut){return ut&&ut!=="false"},Mt=Oe(ve.autoHeight),ht=se(Te,ve.width,_e,Mt,De&&window.GGBT_wsf_view||at,me),lt=parseInt(ht.width),et=ve.width,Ee=ve.height;if(et===void 0){var yt=Te.querySelector(".appletParameters");yt&&(et=yt.offsetWidth,Ee=yt.offsetHeight)}var Vt=lt/et,qe=De?1:ht.height/Ee;return _e!==void 0&&!_e&&(Vt=Math.min(1,Vt),qe=Math.min(1,qe)),Math.min(Vt,qe)}function We(ve,Te,_e){var we=1,me,De=!1;if(ve.hasOwnProperty("allowUpscale")&&(De=ve.allowUpscale),ve.hasOwnProperty("scale")&&(we=parseFloat(ve.scale),(isNaN(we)||we===null||we===0)&&(we=1),we>1&&(De=!0)),Te&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(De=!0),!(ve.hasOwnProperty("disableAutoScale")&&ve.disableAutoScale))me=fe(ve,Te,De,_e,ve.scaleContainerClass);else return we;return De&&(!ve.hasOwnProperty("scale")||we===1)?me:Math.min(we,me)}function Be(ve){var Te=Math.min(window.innerWidth,document.documentElement.clientWidth),_e=Math.min(window.innerHeight,document.documentElement.clientHeight),we=ve.getBoundingClientRect(),me=(Te-we.width)/2,De=(_e-we.height)/2;De<0&&(De=0),ve.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(me<40?ve.style.left="40px":ve.style.left=me+"px",ve.style.top=De+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(De<40?ve.style.top="40px":ve.style.top=De+"px",ve.style.left=me+"px")}function Je(ve,Te){var _e=ve.querySelector(".appletParameters");if(_e){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Te.id!==_e.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ve)}if(_e.parentElement&&/fullscreen/.test(_e.parentElement.className))return;var we=We(Te,ve);En()&&_e.setAttribute("data-param-scale",we);for(var me=null,De=0;De<ve.childNodes.length;De++)if(ve.childNodes[De].className!==void 0&&ve.childNodes[De].className.match(/^applet_scaler/)){me=ve.childNodes[De];break}if(me!==null&&me.querySelector(".noscale")!==null)return;var at=Te.id!==void 0?Te.id:"ggbApplet",Oe=window[at];(Oe==null||!Oe.recalculateEnvironments)&&me!==null&&!me.className.match(/fullscreen/)&&(me.parentNode.style.transform="",!isNaN(we)&&we!==1?(me.parentNode.style.width=Te.width*we+"px",me.parentNode.style.height=Te.height*we+"px",Yt(me,we)):(Yt(me,1),me.parentNode.style.width=Te.width+"px",me.parentNode.style.height=Te.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Be(ve),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(_e).parents(".content-added-content"))}}return{responsiveResize:Je,isFlexibleWorksheetEditor:En,positionCenter:Be,getScale:We,scaleElement:Yt}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var En=n.location.search;return En.indexOf(J)!=-1||En.indexOf(K)!=-1}function q(En,Yt){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(En){var Yt=s[L].bindings;s[L].bindings=function(){for(var se=Yt?Yt():{},fe=En[webModule.__softPermutationId],We=O;We<fe.length;We++){var Be=fe[We];se[Be[O]]=Be[P]}return se}};var t;function u(){return v(),t}function v(){if(!t){var En=o.createElement(Q);if(En.id=L,En.style.cssText=R+S,En.tabIndex=-1,o.body.appendChild(En),t=En.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Yt=document.compatMode==U?V:W;t.write(Yt+X),t.close()}}}function w(En){function Yt(fe){function We(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Be=We();if(Be){fe();return}function Je(){if(!Be){if(!We())return;Be=!0,fe(),o.removeEventListener&&o.removeEventListener(Z,Je,!1),ve&&clearInterval(ve)}}o.addEventListener&&o.addEventListener(Z,Je,!1);var ve=setInterval(function(){Je()},$)}function se(fe){var We=u(),Be=We.body,Je=We.createElement(_);Je.language=ab,Je.crossOrigin=W,Je.src=fe,webModule.__errFn&&(Je.onerror=function(){webModule.__errFn(L,new Error(bb+fe))}),Be.appendChild(Je)}Yt(function(){se(En)})}webModule.__startLoadingFragment=function(En){return C(En)},webModule.__installRunAsyncCode=function(En){var Yt=u(),se=Yt.body,fe=Yt.createElement(_);fe.language=ab,fe.text=En,se.appendChild(fe),se.removeChild(fe)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(En){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(En){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(En){var Yt=c[En];return Yt==null?null:Yt},r=d,webModule.__errFn=e}function B(){function En(ve){var Te=ve.lastIndexOf(rb);Te==-1&&(Te=ve.length);var _e=ve.indexOf(sb);_e==-1&&(_e=ve.length);var we=ve.lastIndexOf(tb,Math.min(_e,Te));return we>=O?ve.substring(O,we+P):W}function Yt(ve){if(!ve.match(/^\w+:\/\//)){var Te=o.createElement(ub);Te.src=ve+vb,ve=En(Te.src)}return ve}function se(){var ve=__gwt_getMetaProperty(wb);return ve!=null?ve:W}function fe(){for(var ve=o.getElementsByTagName(_),Te=O;Te<ve.length;++Te)if(ve[Te].src.indexOf(xb)!=-1)return En(ve[Te].src);return W}function We(){var ve=o.getElementsByTagName(yb);return ve.length>O?ve[ve.length-P].href:W}function Be(){var ve=o.location;return ve.href==ve.protocol+zb+ve.host+ve.pathname+ve.search+ve.hash}var Je=se();return Je==W&&(Je=fe()),Je==W&&(Je=We()),Je==W&&Be()&&(Je=En(o.location.href)),Je=Yt(Je),Je}function C(En){return En.match(/^\//)||En.match(/^[a-zA-Z]+:\/\//)?En:webModule.__moduleBase+En}function D(){var En=[],Yt=O,se=[],fe=[];function We(ve){var Te=fe[ve](),_e=se[ve];if(Te in _e)return Te;var we=[];for(var me in _e)we[_e[me]]=me;throw r&&r(ve,we,Te),null}if(__gwt_isKnownPropertyValue=function(ve,Te){return Te in se[ve]},webModule.__getPropMap=function(){var ve={};for(var Te in se)se.hasOwnProperty(Te)&&(ve[Te]=We(Te));return ve},webModule.__computePropValue=We,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Be;try{Be=Cb;var Je=Be.indexOf(Db);Je!=-1&&(Yt=parseInt(Be.substring(Je+P),$),Be=Be.substring(O,Je))}catch(ve){}return webModule.__softPermutationId=Yt,C(Be+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})()},15476:function(En,Yt,se){"use strict";se.d(Yt,{Ax:function(){return Je},Ds:function(){return ve},KI:function(){return _e},SI:function(){return Be},f1:function(){return We}});var fe=se(11320);function We(we){let me=!0;if(we.length>0){for(let De=0;De<we.length;De++)if(we[De].compile_success==0||!we[De].compile_success){me=!1;break}}else me=!1;return me}function Be(we,me=""){let De=[];for(let at=0;at<we.length;at++){let Oe=we[at],Mt=me?`${me}/${Oe.name}`:`${Oe.name}`;De.push({title:Oe.name,type:Oe.type,isLeaf:Oe.type!=="tree",key:Mt})}return De}function Je(we,me,De){for(let at=0;at<we.length;at++){let Oe=we[at];if(Oe.key===me){Oe.children=De;break}Oe.children&&Je(Oe.children,me,De)}return we}function ve(we,me,De){let at;return function(){let Oe=this,Mt=arguments,ht=function(){at=null,De||we.apply(Oe,Mt)},lt=De&&!at;clearTimeout(at),at=setTimeout(ht,me),lt&&we.apply(Oe,Mt)}}const Te=!0,_e=fe.Z.API_SERVER},63205:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return at}});var fe=se(67294),We={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Be=se(94184),Je=se.n(Be),ve=se(57953),Te=se(15979),_e=se(33170),we=se(28706),me=(Oe,Mt,ht)=>new Promise((lt,et)=>{var Ee=qe=>{try{Vt(ht.next(qe))}catch(ut){et(ut)}},yt=qe=>{try{Vt(ht.throw(qe))}catch(ut){et(ut)}},Vt=qe=>qe.done?lt(qe.value):Promise.resolve(qe.value).then(Ee,yt);Vt((ht=ht.apply(Oe,Mt)).next())}),at=({data:Oe,className:Mt,fullWidth:ht,style:lt={},onClose:et,onOk:Ee,showFullTools:yt,noAssociationId:Vt})=>{const qe=(0,fe.useRef)(null),ut=(0,fe.useRef)(null),Ce=(0,fe.useRef)(null),xe=(0,fe.useRef)(null),[Ue,Ze]=(0,fe.useState)(!1),[St,mt]=(0,fe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,fe.useEffect)(()=>{Ce.current||(Ce.current=document.createElement("style"),document.head.appendChild(Ce.current)),Oe!=null&&Oe.visible?(document.body.setAttribute("data-custom","y-hidden"),Ce.current.innerHTML=" html { overflow-y: hidden; }",Oe!=null&&Oe.src&&Pt()):(document.body.removeAttribute("data-custom"),Ce.current&&(document.head.removeChild(Ce.current),Ce.current=null))},[Oe==null?void 0:Oe.visible]);const Pt=()=>me(void 0,null,function*(){Ze(!0),mt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const it=yield(0,we.ZJ)(Oe==null?void 0:Oe.src);qe.current.src="",qe.current.src=it,qe.current.onload=function(){an()},Ze(!1),mt("")}),Qe=()=>{document.body.removeAttribute("data-custom"),Ce.current.innerHTML=" ",et()},Ft=it=>me(void 0,null,function*(){Ze(!0),mt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const en=yield(0,_e.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Oe.title,file:it.dataUrl}});en!=null&&en.id&&!Vt?(yield(0,_e.ZP)(`/api/attachments/${Oe.id}/add_subitem.json`,{method:"post",body:{subitem_id:en==null?void 0:en.id,settings:JSON.stringify(it.state)}})).status===0&&Ee():en!=null&&en.id&&Ee(en),document.body.removeAttribute("data-custom"),Ce.current.innerHTML=" ",Ze(!1),mt("")}),Dt=()=>{const it=document.querySelector('a[href="https://markerjs.com/"]');it&&it.parentNode&&(it.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(_n=>{const yn=document.querySelector(_n.name);yn&&yn.setAttribute("title",_n.title)})},an=()=>{ut.current=new Te.hP(qe.current),ut.current.targetRoot=xe.current,ut.current.addEventListener("render",Ft),ut.current.addEventListener("beforeclose",Qe),yt&&(ut.current.availableMarkerTypes=ut.current.ALL_MARKER_TYPES,ut.current.uiStyleSettings.redoButtonVisible=!0,ut.current.uiStyleSettings.notesButtonVisible=!0,ut.current.uiStyleSettings.zoomButtonVisible=!0,ut.current.uiStyleSettings.zoomOutButtonVisible=!0,ut.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ut.current.uiStyleSettings,ut.current.show(),Oe!=null&&Oe.snapshotData&&ut.current.restoreState(Oe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Dt()},300)};return fe.createElement(fe.Fragment,null,(Oe==null?void 0:Oe.visible)&&fe.createElement(ve.Z,{spinning:Ue,tip:St,style:{position:"absolute"}},fe.createElement("div",{ref:xe,className:Je()(We.imageDimensions,Mt,ht?We.fullWidth:""),style:lt},fe.createElement("img",{className:We.img,ref:qe}))))}},36527:function(En,Yt,se){"use strict";var fe=se(67294),We=se(71230),Be=se(15746),Je=se(66368),ve=se(71577),Te=se(35598),_e=se(71736),we=se(84279),me=se(67294);const De=(0,fe.forwardRef)(({callback:at,showSaveButton:Oe,value:Mt=""},ht)=>{const lt=(0,fe.useRef)(),et=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Ee=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],yt=ut=>{lt.current.setValue(lt.current.getValue()+" "+ut.value+" ")},Vt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:me.createElement(We.Z,{className:_e.Z.lists,gutter:[10,10]},et.map((ut,Ce)=>me.createElement(Be.Z,{flex:"110px",className:_e.Z.item},me.createElement("div",null,me.createElement(Te.Z,{value:`$$${ut.value}$$`}),ut.name),me.createElement("div",{className:_e.Z.children},ut.children.map((xe,Ue)=>me.createElement("div",{key:Ue},me.createElement("h1",null,xe.name),me.createElement(We.Z,{gutter:[10,10]},xe.data.map((Ze,St)=>me.createElement(Be.Z,{key:St,onClick:()=>yt(Ze),className:_e.Z.diamond},me.createElement(Te.Z,{value:"`$$"+Ze.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:me.createElement(We.Z,{className:_e.Z.lists,gutter:[10,10]},Ee.map((ut,Ce)=>me.createElement(Be.Z,{flex:"110px",className:_e.Z.item},me.createElement("div",null,me.createElement(Te.Z,{value:"`$$"+ut.value+"$$`"}),ut.name),me.createElement("div",{className:_e.Z.children},ut.children.map((xe,Ue)=>me.createElement("div",{key:Ue},xe.name&&me.createElement("h1",null,xe.name),me.createElement(We.Z,{gutter:[10,10]},xe.data.map((Ze,St)=>me.createElement(Be.Z,{key:St,onClick:()=>yt(Ze),className:_e.Z.diamond},me.createElement(Te.Z,{value:"`$$"+Ze.value+"$$`"}))))))))))}],qe=()=>{var ut=document.createElement("div");ut.innerHTML=lt.current.getValue();var Ce=ut.innerText;return at&&at(Ce),Ce};return(0,fe.useImperativeHandle)(ht,()=>({getData:qe})),me.createElement("div",{className:_e.Z.mathWrap},me.createElement(Je.default,{defaultActiveKey:"1",items:Vt}),me.createElement("math-field",{locale:"zh_cn",className:_e.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:lt,style:{width:800,marginTop:30,fontSize:18}},Mt||""),Oe&&me.createElement("div",{className:_e.Z.button},me.createElement(ve.ZP,{size:"large",onClick:qe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Yt.Z=De},57444:function(En,Yt,se){"use strict";se.d(Yt,{h:function(){return ut}});var fe=se(67294),We=se(11713),Be=se(22150),Je=se(71577),ve=se(4631),Te=se.n(ve),_e=se(71749),we=se(30483),me=Object.defineProperty,De=Object.defineProperties,at=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,lt=(Ce,xe,Ue)=>xe in Ce?me(Ce,xe,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Ce[xe]=Ue,et=(Ce,xe)=>{for(var Ue in xe||(xe={}))Mt.call(xe,Ue)&<(Ce,Ue,xe[Ue]);if(Oe)for(var Ue of Oe(xe))ht.call(xe,Ue)&<(Ce,Ue,xe[Ue]);return Ce},Ee=(Ce,xe)=>De(Ce,at(xe));const yt=We.default.Option,Vt={labelCol:{span:4},wrapperCol:{span:20}},qe={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"]};Yt.Z=({callback:Ce,onCancel:xe})=>{const[Ue,Ze]=(0,fe.useState)("python");function St(Pt){Ze(qe[Pt][1])}function mt(Pt){Ce(Pt)}return fe.createElement(Be.default,Ee(et({},Vt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:mt,style:{width:500}}),fe.createElement(Be.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},fe.createElement(We.default,{getPopupContainer:Pt=>Pt.parentNode,onChange:St},Object.keys(qe).map(Pt=>fe.createElement(yt,{key:Pt,value:Pt},qe[Pt][0])))),fe.createElement(Be.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},fe.createElement(ut,{mode:Ue})),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(Je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Je.ZP,{type:"ghost",onClick:xe},"\u53D6\u6D88")))};function ut({value:Ce,onChange:xe,mode:Ue,options:Ze={}}){const St=(0,fe.useRef)(),[mt,Pt]=(0,fe.useState)();return(0,fe.useEffect)(()=>{if(mt){let Qe=function(Ft){const Dt=Ft.getValue();xe&&xe(Dt)};return mt.on("change",Qe),()=>{mt.off("change",Qe)}}},[mt,xe]),(0,fe.useEffect)(()=>{mt&&mt.setOption("mode",Ue)},[mt,Ue]),(0,fe.useEffect)(()=>{mt&&(Ce!==mt.getValue()||Ce==="")&&setTimeout(()=>{mt.setValue(Ce||"")},300)},[mt,Ce]),(0,fe.useEffect)(()=>{if(St.current&&!mt){const Qe=Te().fromTextArea(St.current,et({mode:Ue,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ze));Pt(Qe)}},[St.current,mt]),fe.createElement("div",{className:"my-codemirror-container"},fe.createElement("textarea",{ref:St}))}},91304:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return hr}});var fe=se(67294),We=se(4631),Be=se.n(We),Je=se(91033),ve=se(71749),Te=se(57341),_e=se(82801),we=se(88386),me=se(49047),De=se(80785),at=se(35598),Oe=({value:$n="",className:Xe,showTextOnly:ct,showLines:Tt,style:Wt={}})=>{const He=(0,fe.useMemo)(()=>"",[$n]);return fe.createElement(fe.Fragment,null,fe.createElement("div",{dangerouslySetInnerHTML:{__html:He}}))},Mt=se(67294),ht=Object.defineProperty,lt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,qe=($n,Xe,ct)=>Xe in $n?ht($n,Xe,{enumerable:!0,configurable:!0,writable:!0,value:ct}):$n[Xe]=ct,ut=($n,Xe)=>{for(var ct in Xe||(Xe={}))yt.call(Xe,ct)&&qe($n,ct,Xe[ct]);if(Ee)for(var ct of Ee(Xe))Vt.call(Xe,ct)&&qe($n,ct,Xe[ct]);return $n},Ce=($n,Xe)=>lt($n,et(Xe));let xe=[{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 Ue({onActionCallback:$n,title:Xe,icon:ct,actionName:Tt,className:Wt="",children:He}){function pt(){$n(Tt)}return Mt.createElement("a",{title:Xe,className:Wt,onClick:pt},Mt.createElement("i",{className:`${ct}`}),He)}var Ze=({watch:$n,showNullButton:Xe,showNullProgramButton:ct,onActionCallback:Tt,fullScreen:Wt,insertTemp:He,hidetoolBar:pt,extraUse:$t})=>{const Ot=[...xe,{title:`${$n?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${$n?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Mt.createElement("ul",{className:"markdown-toolbar-container"},!pt&&Ot.map((Jt,tn)=>Mt.createElement("li",{key:tn},Jt.actionName?Mt.createElement(Ue,Ce(ut({},Jt),{onActionCallback:Tt})):Mt.createElement("span",{className:"v-line"}))),Xe?Mt.createElement("li",null,Mt.createElement(Ue,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Tt},Mt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,ct?Mt.createElement(Mt.Fragment,null,Mt.createElement("li",null,Mt.createElement(Ue,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Tt},Mt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Mt.createElement("li",null,Mt.createElement(Ue,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Tt},Mt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,He&&Mt.createElement("li",null,Mt.createElement(Ue,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${He}`,onActionCallback:Tt},Mt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),$t&&Mt.createElement("li",null,$t),Mt.createElement("li",{className:"btn-full-screen"},Mt.createElement(Ue,{icon:`${Wt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Wt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Tt})))},St=se(76621),mt=se(22150),Pt=se(69677),Qe=se(71577),Ft=Object.defineProperty,Dt=Object.defineProperties,an=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,yn=($n,Xe,ct)=>Xe in $n?Ft($n,Xe,{enumerable:!0,configurable:!0,writable:!0,value:ct}):$n[Xe]=ct,Ve=($n,Xe)=>{for(var ct in Xe||(Xe={}))en.call(Xe,ct)&&yn($n,ct,Xe[ct]);if(it)for(var ct of it(Xe))_n.call(Xe,ct)&&yn($n,ct,Xe[ct]);return $n},Le=($n,Xe)=>Dt($n,an(Xe));const Bt={labelCol:{span:4},wrapperCol:{span:20}};var Dn=({callback:$n,onCancel:Xe})=>{function ct(Tt){$n(Tt)}return fe.createElement(mt.default,Le(Ve({},Bt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ct,style:{width:500}}),fe.createElement(mt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},fe.createElement(Pt.default,null)),fe.createElement(mt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},fe.createElement(Pt.default,null)),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(Qe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Qe.ZP,{type:"ghost",onClick:Xe},"\u53D6\u6D88")))},dn=se(57444),nt=se(70859),ft=se(14446),Xt=se(71230),Rn=se(63205),wn=se(67294),Zt=({callback:$n,onCancel:Xe})=>{const ct=document.createElement("canvas"),Tt=ct.getContext("2d");ct.width=1e3,ct.height=800,Tt.fillStyle="#ffffff",Tt.fillRect(0,0,ct.width,ct.height);const Wt=ct.toDataURL("image/png");return wn.createElement(ft.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},wn.createElement(Xt.Z,{style:{height:"100vh"}},wn.createElement(Rn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Wt,visible:!0,title:String(Date.now())},onOk:He=>{$n({src:He.url})},onClose:Xe})))},Ht=se(72565),Tn=se(15746),xn=se(2453),ke={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ue=se(67294),pe=(0,fe.forwardRef)(({onCancel:$n,editImgId:Xe,callback:ct},Tt)=>{let Wt=(0,fe.useRef)(),He=(0,fe.useRef)(),pt=(0,fe.useRef)(),$t=(0,fe.useRef)(!1);const Ot=(0,fe.useRef)(!1);console.log("ref:",Tt);const[Jt,tn]=(0,fe.useState)(0),[Un,_r]=(0,fe.useState)("100vh");return(0,fe.useEffect)(()=>{tn(1);try{indexedDB.databases().then(nr=>{nr.forEach(er=>indexedDB.deleteDatabase(er.name))})}catch(nr){}},[]),(0,fe.useImperativeHandle)(Tt,()=>({setHeight:_r})),ue.createElement("div",{ref:Ot,className:"body-overflow-initial"},ue.createElement(Ht.Z,{width:"100vw",height:Un,footer:null,closable:!0,placement:"bottom",open:!!Jt,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ke.drawerWrap}`,onClose:()=>{window.saveDrawData(nr=>{ct({src:`/api/attachments/${nr}`,id:nr})})},title:ue.createElement(Xt.Z,{align:"middle"},ue.createElement(Tn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ue.createElement(Tn.Z,{onClick:()=>{_r(Un==="60px"?"100vh":"60px")}},ue.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ue.createElement(Tn.Z,{onClick:()=>{window.saveDrawData(nr=>{if(nr===null){xn.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}xn.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),ct({src:`/api/attachments/${nr}`,id:nr,disabledClose:!0})})}},ue.createElement(Qe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ue.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${Xe||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:He})))}),he=se(11320),oe=se(78045),Ae=se(31795);const Ge=oe.ZP.Group,_t={margin:"0 8px"};var Rt=({callback:$n,onCancel:Xe})=>{function ct(Tt){$n(Tt)}return fe.createElement(mt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ct},fe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},fe.createElement("span",{style:_t},"\u5355\u5143\u683C\u6570\uFF1A"),fe.createElement("span",{style:_t},"\u884C\u6570"),fe.createElement(mt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},fe.createElement(Ae.Z,null)),fe.createElement("span",{style:_t},"\u5217\u6570"),fe.createElement(mt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},fe.createElement(Ae.Z,null))),fe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},fe.createElement("span",{style:_t},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),fe.createElement(mt.default.Item,{name:"align"},fe.createElement(Ge,null,fe.createElement(oe.ZP,{value:"default"},fe.createElement("i",{className:"fa fa-align-justify"})),fe.createElement(oe.ZP,{value:"left"},fe.createElement("i",{className:"fa fa-align-left"})),fe.createElement(oe.ZP,{value:"center"},fe.createElement("i",{className:"fa fa-align-center"})),fe.createElement(oe.ZP,{value:"right"},fe.createElement("i",{className:"fa fa-align-right"}))))),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(Qe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Qe.ZP,{type:"ghost",onClick:Xe},"\u53D6\u6D88")))},zt=se(47897),qt=se(61016),jt=se.n(qt),xr=(0,fe.forwardRef)(({use3d:$n,width:Xe,height:ct,callback:Tt,showSaveButton:Wt},He)=>{const pt=(0,fe.useRef)(),$t=(0,fe.useRef)(),[Ot,Jt]=(0,fe.useState)(!1),tn=(0,fe.useRef)({id:pt,appName:"graphing",width:Xe||1e3,height:ct||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,fe.useEffect)(()=>{$t.current=new(jt())(tn.current,!0),window.onload=function(){$t.current.inject("applet_container")}},[]);const Un=()=>{var _r=window.ggbApplet.getPNGBase64(1,!0,72);return Tt&&Tt(_r),_r};return(0,fe.useEffect)(()=>{tn.current.appName=Ot?"3D":"graphing",$t.current.inject("applet_container")},[Ot]),(0,fe.useEffect)(()=>{Jt($n)},[$n]),(0,fe.useImperativeHandle)(He,()=>({getImgData:Un})),fe.createElement(fe.Fragment,null,fe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:pt}),fe.createElement(Xt.Z,{align:"middle"},fe.createElement(Tn.Z,{flex:1},fe.createElement(zt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ot,onChange:_r=>Jt(_r)})),fe.createElement(Tn.Z,null,fe.createElement(Qe.ZP,{size:"large",onClick:Un,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Nt=se(36527),pn=se(25934);const cr="link",Rr="upload-image",rt="add-flowchart",Kt="draw-image",Bn="add-flowchart",Gn="code-block",tr="add-table",Sr="------------",Ar={default:Sr,left:`:${Sr}`,center:`:${Sr}:`,right:`${Sr}:`};var Mr=se(99914),Pr=($n,Xe,ct)=>new Promise((Tt,Wt)=>{var He=Ot=>{try{$t(ct.next(Ot))}catch(Jt){Wt(Jt)}},pt=Ot=>{try{$t(ct.throw(Ot))}catch(Jt){Wt(Jt)}},$t=Ot=>Ot.done?Tt(Ot.value):Promise.resolve(Ot.value).then(He,pt);$t((ct=ct.apply($n,Xe)).next())});function Vr(){}let lr=0;const si=1e4,Li="\u2581",Ni="@\u2581\u2581@",Hi="@\u2581@",ri=`
|
|
|
**\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`,vt=["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 Sn($n){return/^\d+$/.test($n)?`${$n}px`:$n}const In=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",sr={[In+"-B"]:"bold",[In+"-I"]:"italic"},qn={[cr]:"\u6DFB\u52A0\u94FE\u63A5",[Gn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Rr]:"\u6DFB\u52A0\u56FE\u7247",[Kt]:"\u6DFB\u52A0\u753B\u56FE",[rt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[tr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var hr=({defaultValue:$n="",onChange:Xe,width:ct="100%",height:Tt=400,miniToolbar:Wt=!1,isFocus:He=!1,watch:pt,insertTemp:$t,mode:Ot="markdown",id:Jt="markdown-editor-id",showResizeBar:tn=!1,noStorage:Un=!1,showNullButton:_r=!1,showNullProgramButton:nr=!1,hidetoolBar:er=!1,fullScreen:ur=!1,onBlur:dr,onCMBeforeChange:gt,onFullScreen:ot,className:Ct="",disablePaste:ln=!1,disabled:Nn=!1,disabledFill:cn=!1,placeholder:mn="",values:gn="",extraUse:Fn,onAddBlank:fr})=>{const[Qt,Qr]=(0,fe.useState)(null),[Ur,Bi]=(0,fe.useState)($n),[Ai,gi]=(0,fe.useState)(pt),[qi,xi]=(0,fe.useState)(ur),[li,$i]=(0,fe.useState)(""),[Gi,qr]=(0,fe.useState)(0),[vi,Zi]=(0,fe.useState)(Tt),[la,ta]=(0,fe.useState)(!1),ii=(0,fe.useRef)((0,pn.Z)()),Et=(0,fe.useRef)(!1),wt=(0,fe.useRef)(),[Gt,fn]=(0,fe.useState)(0),[On,gr]=(0,fe.useState)(0),Tr=(0,fe.useRef)(),Wr=(0,fe.useRef)(),Gr=(0,fe.useRef)(),Hr=(0,fe.useRef)(),ni=(0,fe.useRef)(),yi=(0,fe.useRef)(),Lr=()=>Pr(void 0,null,function*(){var Cn;const vn=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ii.current}});(Cn=vn==null?void 0:vn.attachments)!=null&&Cn.length&&(console.log("cm:",Qt,Tr),vn.attachments.map(Pn=>{Pn.content_type.indexOf("image")>-1?Qt.replaceSelection(``):Pn.content_type.indexOf("video")>-1?Qt.replaceSelection(`<video width="100%" controls src="${he.Z.API_SERVER}/api/attachments/${data.id}"></video>`):Pn.content_type.indexOf("pdf")>-1?Qt.replaceSelection(`<a href="${he.Z.API_SERVER}/api/attachments/${Pn.id}?type=${Pn.content_type}&disposition=inline" target="_blank">${Pn.name}</a>`):Qt.replaceSelection(`[${Pn.name}](${he.Z.API_SERVER}/api/attachments/${Pn.id}?type=${Pn.content_type})`)}))});(0,fe.useEffect)(()=>{const Cn=window.scrollY||window.pageYOffset;Bi(gn),Qt==null||Qt.setValue(gn),window.scrollTo(0,Cn)},[gn]),(0,fe.useEffect)(()=>{ot==null||ot(qi)},[qi]),(0,fe.useEffect)(()=>{if(Tr.current){let Cn=function(Pn,zn){var mr;if(ln){zn.preventDefault();return}const Yn=zn.clipboardData;if(Yn){const Xn=Yn.types.toString(),rr=Yn.items;if(Xn==="Files"||Yn.types.indexOf("Files")>-1){if(zn.preventDefault(),Ot=="stex")return;try{let ir=rr[1];((mr=rr[0])==null?void 0:mr.kind)==="file"&&(ir=rr[0]);const br=ir.getAsFile(),Re=br.name.split(".").pop();(0,nt.I)(br,Ke=>{var Lt,dt,Ut;Ke.id?((Lt=br==null?void 0:br.type)==null?void 0:Lt.indexOf("image"))>-1?vn.replaceSelection(`<img width="100%" src="/api/attachments/${Ke.id}?type=${Ke.content_type})" alt="" />`):((dt=br==null?void 0:br.type)==null?void 0:dt.indexOf("video"))>-1?vn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ke.id}"></video>`):((Ut=br==null?void 0:br.type)==null?void 0:Ut.indexOf("pdf"))>-1?vn.replaceSelection(`<a href="/api/attachments/${Ke.id}?type=${br.type}&disposition=inline" target="_blank">${br.name}</a>`):vt.includes(Re)?vn.replaceSelection(`<a href="/api/attachments/${Ke.id}?type=office&disposition=inline" target="_blank">${br.name}</a>`):vn.replaceSelection(`[${br.name}](/api/attachments/${Ke.id}?type=${Ke.content_type})`):(Ke==null?void 0:Ke.status)===401&&(xn.ZP.warning((Ke==null?void 0:Ke.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(ir){xn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const vn=Be().fromTextArea(Tr.current,{mode:Ot,lineNumbers:!Wt,lineWrapping:!0,value:$n,autoCloseTags:!nr,autoCloseBrackets:!0});return vn.on("keyup",function(Pn,zn){zn.keyCode===8&&(Pn.getValue()==""?vn.setOption("placeholder",mn):vn.setOption("placeholder",null))}),vn.on("keydown",function(Pn,zn){if(zn.keyCode===8){var mr=Ti(Pn);mr&&zn.preventDefault()}}),He&&vn.focus(),vn.on("paste",Cn),vn.on("dragleave",function(Pn,zn){Wr.current.classList.remove("mouse-hover-md")}),Nn&&vn.on("beforeChange",function(Pn,zn){(zn.origin==="paste"||zn.origin==="+input")&&zn.cancel()}),Qr(vn),()=>{vn.off("paste",Cn)}}},[]);const pi=(0,fe.useCallback)(()=>{if(Wr.current)try{}catch(Cn){console.log(Cn,"---- to set md editor body height")}},[vi,Wr,qi]);(0,fe.useEffect)(()=>{function Cn(){let vn=new Je.Z(Pn=>{for(let zn of Pn)(zn.target.offsetHeight>0||zn.target.offsetWidth>0)&&(pi(),Qt.setSize("100%","100%"),Qt.refresh())});return vn.observe(Tr.current.parentElement),vn}if(Qt){const vn=Cn();return()=>{var Pn,zn;(Pn=Tr.current)!=null&&Pn.parentElement&&vn.unobserve((zn=Tr.current)==null?void 0:zn.parentElement)}}},[Qt,pi]),(0,fe.useEffect)(()=>{if(Qt){let Cn=[];for(const[vn,Pn]of Object.entries(sr)){let zn={[vn]:()=>{Mi(Pn)}};Cn.push(zn),Qt.addKeyMap(zn)}return wt.current=setInterval(()=>{Et.current&&Lr()},4e3),()=>{clearInterval(wt.current);for(let vn of Cn)Qt.removeKeyMap(vn)}}},[Qt]),(0,fe.useEffect)(()=>{ur!==qi&&xi(ur)},[ur]),(0,Mr.Z)(()=>{if(!Un&&Gi>0){let Cn=new Date().getTime(),vn=window.sessionStorage.getItem(Jt);Cn>=Gi+si&&(!vn||vn!==Ur)&&(window.sessionStorage.setItem(Jt,Ur),ta(!0))}},si),(0,fe.useEffect)(()=>{gi(pt)},[Qt,pt]),(0,fe.useEffect)(()=>{Qt&&He&&Qt.focus()},[Qt,He]),(0,fe.useEffect)(()=>{if(Ai&&Qt){let Cn=function(Pn){let zn=Pn.target;if(Hr.current){let mr=zn.scrollTop/zn.scrollHeight;Hr.current.scrollTop=Hr.current.scrollHeight*mr}};const vn=Qt.getScrollerElement();return vn.addEventListener("scroll",Cn),()=>{vn.removeEventListener("scroll",Cn)}}},[Qt,Ai]),(0,fe.useEffect)(()=>{if(Qt&>){let Cn=function(vn,Pn){gt(vn,Pn)};return Qt.on("beforeChange",Cn),()=>{Qt.off("beforeChange",Cn)}}},[Qt,gt]),(0,fe.useEffect)(()=>{if(Qt&&dr){let Cn=function(){dr(Qt.getValue())};return Qt.on("blur",Cn),()=>{Qt.off("blur",Cn)}}},[Qt,dr]);function Ti(Cn,vn){var Pn=Cn.getDoc(),zn=Pn.getCursor(),mr=Pn.getLine(zn.line),Yn=mr.charAt(zn.ch-1),Xn=mr.lastIndexOf("@\u2581@",zn.ch),rr=mr.lastIndexOf("@\u2581\u2581@",zn.ch),ir=Xn>rr?Xn:rr,br=Xn>rr?3:4;if(Ni.indexOf(Yn)===-1)return null;if(console.log("change1:",vn,Cn,mr,zn,ir,Xn,rr,Yn),ir>=0&&zn.ch-ir<5){var Re=ir+br;return Pn.replaceRange("",{line:zn.line,ch:ir},{line:zn.line,ch:Re}),{line:zn.line,ch:Re}}return null}(0,fe.useEffect)(()=>{if(Qt){let Cn=function(vn,Pn){const zn=vn.getValue();Bi(zn),qr(new Date().getTime()),vn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Xe&&(nr?Xe(zn,nn(zn)):Xe(zn))};return Qt.on("change",Cn),()=>{Qt.off("change",Cn)}}},[Qt,Xe]),(0,fe.useEffect)(()=>{if(Qt)if($n==null)Qt.setValue(""),Bi("");else{const Cn=window.scrollY||window.pageYOffset;$n!==Qt.getValue()&&(Qt.setValue($n),Bi($n),Qt.setCursor(Nn?1:Qt.lineCount(),0),window.scrollTo(0,Cn))}},[Qt,$n]);const Mi=(0,fe.useCallback)(Cn=>{const vn=Qt.getCursor(),Pn=Qt.getSelection();let zn=Pn.split(`
|
|
|
`);switch(Cn){case"bold":return Qt.replaceSelection("**"+Pn+"**"),Pn===""&&Qt.setCursor(vn.line,vn.ch+2),Qt.focus();case"italic":return Qt.replaceSelection("*"+Pn+"*"),Pn===""&&Qt.setCursor(vn.line,vn.ch+1),Qt.focus();case"code":return Qt.replaceSelection("`"+Pn+"`"),Pn===""&&Qt.setCursor(vn.line,vn.ch+1),Qt.focus();case"inline-latex":return $i("inline-latex"),Qt.focus();case"latex":return Qt.replaceSelection("```latex\n"+Pn+"\n```"),Qt.setCursor(vn.line+1,Pn.length+1),Qt.focus();case"line-break":return Qt.replaceSelection(`<br/>
|
|
|
`),Qt.focus();case"list-ul":return Pn===""?Qt.replaceSelection("- "+Pn):Qt.replaceSelection(zn.map(mr=>mr===""?"":`- ${mr}`).join(`
|
|
|
`)),Qt.focus();case"list-ol":return Pn===""?Qt.replaceSelection("1. "+Pn):Qt.replaceSelection(zn.map((mr,Yn)=>mr===""?"":`${Yn+1}. ${mr}`).join(`
|
|
|
`)),Qt.focus();case"add-null-ch":fr==null||fr();return;case"add-signal":return Pn===""&&Qt.setCursor(vn.line,vn.ch),Qt.replaceSelection(Hi),Qt.focus();case"add-multiple":return Pn===""&&Qt.setCursor(vn.line,vn.ch),Qt.replaceSelection(Ni),Qt.focus();case"inster-template-1":return Pn===""&&Qt.setCursor(vn.line,vn.ch),Qt.replaceSelection(ri),Qt.focus();case"eraser":return Qt.setValue(""),Qt.focus();case"trigger-watch":return gi(!Ai),Qt.focus();case"trigger-full-screen":return xi(!qi),Qt.focus();case cr:$i(cr);return;case Gn:$i(Gn);return;case Rr:$i(Rr);return;case Kt:$i(Kt);return;case"maths-latex":$i("maths-latex");return;case rt:ni.current="",sessionStorage.removeItem("file_id"),$i(rt);return;case tr:$i(tr);return;default:throw new Error}},[Qt,Ai,qi]),Ie=(0,fe.useCallback)((Cn,vn)=>{var Pn,zn,mr,Yn,Xn,rr;$i("");const{src:ir,alt:br,id:Re}=Cn||{};switch(li){case cr:const{title:un,link:bn}=Cn;return Qt.replaceSelection(`[${un}](${bn})`),Qt.focus();case Gn:const{language:Kn,content:Ln}=Cn;return Qt.replaceSelection(["```"+Kn,Ln,"```"].join(`
|
|
|
`)),Qt.focus();case"maths-latex":for(var Ke=atob(Cn),Lt=new Uint8Array(Ke.length),dt=0;dt<Ke.length;dt++)Lt[dt]=Ke.charCodeAt(dt);var Ut=new Blob([Lt],{type:"image/png"});(0,nt.I)(Ut,Yr=>{Yr.id?Qt.replaceSelection(``):(Yr==null?void 0:Yr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Qt.replaceSelection("`$$"+Cn+"$$`");break;case Bn:if(!Re)return;Qt.focus(),Qt.getValue().indexOf(ir)===-1?Qt.replaceSelection(`<center><img id="${Re}" width="80%" src="${ir}" class="draw-flowchart" alt="${br||""}" /></center>`):document.getElementById(Re).src=he.Z.API_SERVER+ir+"?t="+Date.now();try{setTimeout(()=>{dr(Qt.getValue())},100)}catch(Yr){}break;case Rr:case Kt:const on=vn,Hn=(mr=(zn=(Pn=on==null?void 0:on.name)==null?void 0:Pn.split("."))==null?void 0:zn.pop)==null?void 0:mr.call(zn);return((Yn=on==null?void 0:on.type)==null?void 0:Yn.indexOf("image"))>-1||!(on!=null&&on.type)?on!=null&&on.align||on!=null&&on.width?Qt.replaceSelection(`<p style="text-align:${on.align||"initial"}"><img width="${on.width?on.width+"%":"initial"}" src="${ir}" alt="${br||""}" /></p>`):Qt.replaceSelection(`<img width="100%" src="${ir}" alt="${br||""}" />`):((Xn=on==null?void 0:on.type)==null?void 0:Xn.indexOf("video"))>-1?Qt.replaceSelection(`<video width="100%" controls src="${ir}"></video>`):((rr=on==null?void 0:on.type)==null?void 0:rr.indexOf("pdf"))>-1?Qt.replaceSelection(`<a href="${ir}?type=${on.type}&disposition=inline" target="_blank">${on.name}</a>`):vt.includes(Hn)?Qt.replaceSelection(`<a href="${ir}?type=office&disposition=inline" target="_blank">${on.name}</a>`):Qt.replaceSelection(`[${on.name}](${ir})`),Qt.focus();case tr:const{row:jn,col:wr,align:Wn}=Cn;let Or=`
|
|
|
`;for(let Yr=0;Yr<jn;Yr++){let $r=[],jr=[];for(let Er=0;Er<wr;Er++)Yr===1&&jr.push(Ar[Wn]),$r.push(" ");Yr===1&&(Or+=`| ${jr.join(" | ")} |
|
|
|
`),Or+=`| ${$r.join(wr===1?"":" | ")} |
|
|
|
`}return Qt.replaceSelection(Or+`
|
|
|
`),Qt.focus();default:throw new Error}},[Qt,li]),Fe=(0,fe.useMemo)(()=>{switch(li){case cr:return fe.createElement(Dn,{callback:Ie,onCancel:ze});case Gn:return fe.createElement(dn.Z,{callback:Ie,onCancel:ze});case Rr:return fe.createElement(nt.Z,{callback:Ie,onCancel:ze});case rt:return fe.createElement(pe,{editImgId:ni.current,callback:Ie,onCancel:ze});case tr:return fe.createElement(Rt,{callback:Ie,onCancel:ze});case"maths-latex":return fe.createElement(xr,{showSaveButton:!0,callback:Ie});case"inline-latex":return fe.createElement(Nt.Z,{showSaveButton:!0,callback:Ie});default:return null}},[li]);function ze(){$i("")}(0,fe.useEffect)(()=>{if(Gr.current){let Cn=function(Xn){mr=!0,Yn=Xn.pageY},vn=function(){mr=!1},Pn=function(Xn){if(mr){let rr=Xn.pageY-Yn;rr<0&&(rr=0),rr>300&&(rr=300);let ir=Tt+rr+"px";Zi(ir)}},zn=Gr.current,mr=!1,Yn=0;return zn.addEventListener("mousedown",Cn),document.addEventListener("mousemove",Pn),document.addEventListener("mouseup",vn),()=>{zn.removeEventListener("mousedown",Cn),document.removeEventListener("mousemove",Pn),document.removeEventListener("mouseup",vn)}}},[Qt,Gr]),(0,fe.useEffect)(()=>{Zi(Tt)},[Tt]);const je=Sn(ct),tt=Sn(vi),st={width:je,height:tt},kt=(0,fe.useMemo)(()=>{if(Gi){let Cn=new Date(Gi),vn=Cn.getHours(),Pn=Cn.getMinutes(),zn=Cn.getSeconds();return vn=vn<10?"0"+vn:vn,Pn=Pn<10?"0"+Pn:Pn,zn=zn<10?"0"+zn:zn,`${vn}:${Pn}:${zn}`}return 0},[Gi]),nn=Cn=>{const vn=[];if(nr){let Pn=-1;Cn=Cn.replace(/(@▁▁@|@▁@)/g,function(zn,mr,Yn){vn.push({multiLine:zn!==Hi})})}return vn};function sn(){window.sessionStorage.removeItem(Jt),ta(!1),qr(0)}function Jn(){ta(!1),qr(0),Qt.setValue(window.sessionStorage.getItem(Jt))}(0,fe.useEffect)(()=>{qn[li]&&li!==Kt&&li!==rt&&setTimeout(()=>{const Cn=document.getElementsByClassName("markdown-popup-form")[0],vn=window.innerWidth/2-Cn.offsetWidth/2,Pn=window.innerHeight/2-Cn.offsetHeight/2;fn(vn),gr(Pn)},0)},[li]);const yr=Cn=>{Cn.preventDefault();const vn=Cn.clientX-Gt,Pn=Cn.clientY-On;document.body.onmousemove=zn=>{let mr=zn.clientX-vn,Yn=zn.clientY-Pn;const Xn=document.getElementsByClassName("markdown-popup-form")[0],rr=window.innerWidth-Xn.offsetWidth,ir=window.innerHeight-Xn.offsetHeight;mr=Math.max(0,Math.min(mr,rr)),Yn=Math.max(0,Math.min(Yn,ir)),Zn(zn.clientX,zn.clientY,vn,Pn)&&(fn(mr),gr(Yn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Zn=(Cn,vn,Pn,zn)=>{const mr=document.body.clientHeight,Yn=document.body.clientWidth;return Cn<20&&Pn>Cn||Cn>Yn-20&&Pn<Cn||vn<20&&zn>vn||vn>mr-20&&zn<vn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:"markdown-editor-wrapper",ref:Wr},fe.createElement("div",{className:`markdown-editor-container ${Ct} ${Ai?"on-preview":""} ${Wt?"mini":""} ${qi?"full-screen":""}`,style:st},fe.createElement(Ze,{insertTemp:$t,watch:Ai,fullScreen:qi,showNullButton:_r,showNullProgramButton:nr,onActionCallback:Mi,hidetoolBar:er,extraUse:Fn}),fe.createElement("div",{className:"markdown-editor-body"},fe.createElement("div",{className:"codemirror-container"},fe.createElement("textarea",{ref:Tr,placeholder:mn})),Ai?fe.createElement("div",{ref:Hr,className:"preview-container"},Ot==="stex"&&fe.createElement(Oe,{value:Ur}),Ot!=="stex"&&fe.createElement(at.Z,{edit:!0,disabledFill:cn,showProgramFill:nr,value:Ur,openEditor:Cn=>{var vn;ni.current=Cn,(vn=yi.current)==null||vn.setHeight("100vh"),setTimeout(()=>{$i("add-flowchart")},150)}})):null))),tn?fe.createElement("a",{ref:Gr,className:"editor-resize"}):null,li===Kt&&fe.createElement(Zt,{callback:Ie,onCancel:ze}),li===rt&&fe.createElement(pe,{ref:yi,editImgId:ni.current,callback:Ie,onCancel:ze}),fe.createElement(St.Z,null,qn[li]&&li!==Kt&&li!==rt?fe.createElement(ft.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Gt,top:On},title:fe.createElement("div",{style:{cursor:"move"},onMouseDown:yr},qn[li]),open:!0,onCancel:ze,footer:null,destroyOnClose:!0,width:li===rt?"1200px":null,height:li===rt?"80vh":null,className:"markdown-popup-form"},Fe):null))}},70859:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return Ue},I:function(){return St}});var fe=se(22150),We=se(2453),Be=se(69677),Je=se(93421),ve=se(31795),Te=se(78045),_e=se(71577),we=se(15476),me=se(67294),De=se(52262),at=se(67294),Oe=Object.defineProperty,Mt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,yt=(mt,Pt,Qe)=>Pt in mt?Oe(mt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):mt[Pt]=Qe,Vt=(mt,Pt)=>{for(var Qe in Pt||(Pt={}))et.call(Pt,Qe)&&yt(mt,Qe,Pt[Qe]);if(lt)for(var Qe of lt(Pt))Ee.call(Pt,Qe)&&yt(mt,Qe,Pt[Qe]);return mt},qe=(mt,Pt)=>Mt(mt,ht(Pt));const{useForm:ut}=fe.default,Ce={width:280,marginRight:10},xe={labelCol:{span:5},wrapperCol:{span:19}};var Ue=({callback:mt,onCancel:Pt})=>{const[Qe]=ut();let Ft=(0,me.useRef)();function Dt(en){Ft.current.width=Qe.getFieldValue("width"),Ft.current.align=Qe.getFieldValue("align"),mt(en,Ft.current)}function an(en,_n){if(en.status===-1){We.ZP.error(en.message);return}Qe.setFieldsValue({src:`/api/attachments/${en.id}`,type:_n.type})}function it(en){let _n=en.target.files[0];Ft.current=_n,St(_n,an)}return at.createElement(fe.default,qe(Vt({form:Qe},xe),{className:"upload-image-panel",onFinish:Dt,style:{width:470,overflow:"hidden"}}),at.createElement(fe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},at.createElement("div",{className:"flex-container"},at.createElement(fe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},at.createElement(Be.default,{style:Ce})),at.createElement(Ze,{onFileChange:it}))),at.createElement(fe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},at.createElement(Be.default,{style:{width:264}})),at.createElement(fe.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},at.createElement(Je.Z,null,at.createElement(fe.default.Item,{name:"width",style:{margin:0}},at.createElement(ve.Z,{style:{width:264}})),at.createElement("span",{className:"ml8"},"%"))),at.createElement(fe.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},at.createElement(Te.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"}]})),at.createElement("aside",null,at.createElement(fe.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},at.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(_e.ZP,{type:"default",onClick:Pt},"\u53D6\u6D88"))))};function Ze({onFileChange:mt}){return at.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",at.createElement("input",{type:"file",onChange:mt}))}function St(mt,Pt){if(!mt)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,De.bg)())throw We.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let Qe=new FormData;Qe.append("editormd-image-file",mt),Qe.append("file_param_name","editormd-image-file"),Qe.append("byxhr","true");var Ft=new window.XMLHttpRequest;Ft.withCredentials=!0,Ft.addEventListener("load",function(Dt){Pt(JSON.parse(Dt.target.responseText),mt)},!1),Ft.addEventListener("error",function(Dt){console.error(Dt)},!1),Ft.open("POST",`${we.KI}/api/attachments.json`),Ft.send(Qe)}},76621:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return Be}});var fe=se(67294),We=se(73935);class Be extends fe.Component{constructor(ve){super(ve);const Te=window.document;this.node=Te.createElement("div"),Te.body.appendChild(this.node)}render(){const{children:ve}=this.props;return(0,We.createPortal)(ve,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},99914:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return We}});var fe=se(67294);function We(Be,Je){const ve=(0,fe.useRef)();(0,fe.useEffect)(()=>{ve.current=Be}),(0,fe.useEffect)(()=>{function Te(){ve.current()}if(Je!==null){let _e=setInterval(Te,Je);return()=>clearInterval(_e)}},[Je])}},27946:function(En,Yt,se){"use strict";se.r(Yt),se.d(Yt,{default:function(){return Ue}});var fe=se(67294),We=se(35973),Be=se(22150),Je=se(2453),ve=se(85673),Te=se(69677),_e=se(59810),we=se(71577),me=se(91304),De=se(86763),at=se(11320),Oe={bg:"bg___VqFqM",flexRow:"flexRow___BMnDG",flexJustifyCenter:"flexJustifyCenter___oeWhy",flexAlignEnd:"flexAlignEnd___AM_yy",flexAlignCenter:"flexAlignCenter___oCn1N",flexColumn:"flexColumn___PQMFg",formWrap:"formWrap___iwUem",titleWrap:"titleWrap___SA96h",fieldWrap:"fieldWrap___tSPUZ",mdWrap:"mdWrap___C7Agk",backgroundFa:"backgroundFa___FaNz_",button:"button___fqiOn"},Mt=Object.defineProperty,ht=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,Vt=(Ze,St,mt)=>St in Ze?Mt(Ze,St,{enumerable:!0,configurable:!0,writable:!0,value:mt}):Ze[St]=mt,qe=(Ze,St)=>{for(var mt in St||(St={}))Ee.call(St,mt)&&Vt(Ze,mt,St[mt]);if(et)for(var mt of et(St))yt.call(St,mt)&&Vt(Ze,mt,St[mt]);return Ze},ut=(Ze,St)=>ht(Ze,lt(St)),Ce=(Ze,St,mt)=>new Promise((Pt,Qe)=>{var Ft=it=>{try{an(mt.next(it))}catch(en){Qe(en)}},Dt=it=>{try{an(mt.throw(it))}catch(en){Qe(en)}},an=it=>it.done?Pt(it.value):Promise.resolve(it.value).then(Ft,Dt);an((mt=mt.apply(Ze,St)).next())});const xe=({shixunHomeworks:Ze,newCourse:St,globalSetting:mt,loading:Pt,dispatch:Qe,match:Ft})=>{var Dt;const an=(0,We.useParams)(),[it]=Be.default.useForm(),[en,_n]=(0,fe.useState)({}),[yn,Ve]=(0,fe.useState)(!1),[Le,Bt]=(0,fe.useState)([]),[Dn,dn]=(0,fe.useState)([]),{commonHomeWorkEditDefaultData:nt}=Ze,ft={name:"file",multiple:!0,action:at.Z.API_SERVER+"/api/attachments.json",defaultFileList:Le,onChange(Zt){const{status:Ht}=Zt.file;Ht==="done"?Je.ZP.success(`${Zt.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`):Ht==="error"&&Je.ZP.error(`${Zt.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)}};(0,fe.useEffect)(()=>{Rn()},[an.topicId]);const Xt=Zt=>Zt==null?void 0:Zt.map(Ht=>({uid:Ht.id,response:{id:Ht.id},name:Ht.title,status:"done",url:Ht.url})),Rn=()=>Ce(void 0,null,function*(){const Zt=yield Qe({type:"shixunHomeworks/editCommonHomeWorkDefaultBankData",payload:{id:an.topicId}});Zt&&(it.setFieldsValue({name:Zt.name}),it.setFieldsValue({description:Zt.description}),it.setFieldsValue({reference_answer:Zt.reference_answer}),Bt([...Xt(Zt.attachments)]),dn([...Xt(Zt.reference_attachments)]),Ve(!0))}),wn=Zt=>Ce(void 0,null,function*(){var Ht,Tn;const xn=qe({},en);xn.attachment_ids&&(xn.attachment_ids=(Ht=xn==null?void 0:xn.attachment_ids.fileList)==null?void 0:Ht.map(ue=>{var le;return(le=ue.response)==null?void 0:le.id})),xn.reference_attachment_ids&&(xn.reference_attachment_ids=(Tn=xn==null?void 0:xn.reference_attachment_ids.fileList)==null?void 0:Tn.map(ue=>{var le;return(le=ue.response)==null?void 0:le.id})),(yield(0,De.yT)(ut(qe({id:an.topicId},xn),{base_on_project:null,type:1})))&&We.history.push(`/users/${an.username}/topics/${an.topicId}/${an.topictype}/normal/detail`)});return fe.createElement("section",{className:Oe.bg},fe.createElement("section",{className:"animated fadeIn"},fe.createElement("aside",{className:"mt10"},fe.createElement(ve.Z,{separator:">"},fe.createElement(ve.Z.Item,null,fe.createElement(We.Link,{to:`/users/${an.username}/${an.topictype==="personal"?"topics":"topicbank"}/${an.topictype}`},an.topictype==="personal"?"\u6211\u7684\u8BFE\u5802\u8D44\u6E90":"\u516C\u5171\u9898\u5E93")),fe.createElement(ve.Z.Item,null,fe.createElement(We.Link,{to:`/users/${an.username}/topics/${an.topicId}/${an.topictype}/normal/detail`},"\u8BE6\u60C5")),fe.createElement(ve.Z.Item,null,"\u7F16\u8F91")))),fe.createElement("aside",{className:"font24 bold mt20 mb20"},"\u7F16\u8F91"),fe.createElement(Be.default,{form:it,className:Oe.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:()=>{_n(qe({},it.getFieldsValue()))},onFinish:wn},fe.createElement("div",{className:Oe.fieldWrap},fe.createElement(Be.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},fe.createElement(Te.default,{maxLength:60,suffix:`${((Dt=en.name)==null?void 0:Dt.length)||0}/60`,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),fe.createElement("div",{className:Oe.mdWrap},fe.createElement(Be.default.Item,{name:"description",label:"\u7B80\u4ECB:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:5e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},fe.createElement(me.Z,{id:"topic-normal-description",watch:!0,defaultValue:nt.description})),fe.createElement("div",null,fe.createElement(Be.default.Item,{name:"attachment_ids"},yn&&fe.createElement(_e.default,qe({defaultFileList:Le},ft),fe.createElement("span",{className:"c-blue"},"\u4E0A\u4F20\u9644\u4EF6")," \uFF08\u5355\u4E2A\u6587\u4EF6150MB\u4EE5\u5185\uFF09")))),fe.createElement("div",{className:Oe.mdWrap},fe.createElement(Be.default.Item,{name:"reference_answer",label:"\u53C2\u8003\u7B54\u6848:"},fe.createElement(me.Z,{id:"topic-normal-reference_answer",defaultValue:nt.reference_answer,watch:!0})),fe.createElement("div",null,fe.createElement(Be.default.Item,{name:"reference_attachment_ids"},yn&&fe.createElement(_e.default,ut(qe({},ft),{defaultFileList:Dn}),fe.createElement("span",{className:"c-blue"},"\u4E0A\u4F20\u9644\u4EF6")," \uFF08\u5355\u4E2A\u6587\u4EF6150MB\u4EE5\u5185\uFF09")))),fe.createElement("div",{className:Oe.backgroundFa},fe.createElement("div",{className:"pt40 mb30"},fe.createElement(Be.default.Item,null,fe.createElement(we.ZP,{size:"middle",type:"primary",className:`${Oe.button} mr20`,htmlType:"submit"},"\u63D0\u4EA4"),fe.createElement(we.ZP,{size:"middle",type:"primary",ghost:!0,className:Oe.button,onClick:()=>We.history.push(`/users/${an.username}/topics/${an.topicId}/${an.topictype}/normal/detail`)},"\u53D6\u6D88"))))))};var Ue=(0,We.connect)(({shixunHomeworks:Ze,newCourse:St,loading:mt,globalSetting:Pt})=>({shixunHomeworks:Ze,newCourse:St,globalSetting:Pt,loading:mt.effects}))(xe)},57838:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return We}});var fe=se(67294);function We(){const[,Be]=fe.useReducer(Je=>Je+1,0);return Be}},9708:function(En,Yt,se){"use strict";se.d(Yt,{F:function(){return ve},Z:function(){return Je}});var fe=se(94184),We=se.n(fe);const Be=null;function Je(Te,_e,we){return We()({[`${Te}-status-success`]:_e==="success",[`${Te}-status-warning`]:_e==="warning",[`${Te}-status-error`]:_e==="error",[`${Te}-status-validating`]:_e==="validating",[`${Te}-has-feedback`]:we})}const ve=(Te,_e)=>_e||Te},85673:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return an}});var fe=se(94184),We=se.n(fe),Be=se(37419),Je=se(1337),ve=se(67294),Te=se(96159),_e=se(53124),we=se(42922),me=se(35874);const De=it=>{let{children:en}=it;const{getPrefixCls:_n}=ve.useContext(_e.E_),yn=_n("breadcrumb");return ve.createElement("li",{className:`${yn}-separator`,"aria-hidden":"true"},en===""?en:en||"/")};De.__ANT_BREADCRUMB_SEPARATOR=!0;var at=De,Oe=function(it,en){var _n={};for(var yn in it)Object.prototype.hasOwnProperty.call(it,yn)&&en.indexOf(yn)<0&&(_n[yn]=it[yn]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,yn=Object.getOwnPropertySymbols(it);Ve<yn.length;Ve++)en.indexOf(yn[Ve])<0&&Object.prototype.propertyIsEnumerable.call(it,yn[Ve])&&(_n[yn[Ve]]=it[yn[Ve]]);return _n};function Mt(it,en){if(it.title===void 0||it.title===null)return null;const _n=Object.keys(en).join("|");return typeof it.title=="object"?it.title:String(it.title).replace(new RegExp(`:(${_n})`,"g"),(yn,Ve)=>en[Ve]||yn)}function ht(it,en,_n,yn){if(_n==null)return null;const{className:Ve,onClick:Le}=en,Bt=Oe(en,["className","onClick"]),Dn=Object.assign(Object.assign({},(0,Je.Z)(Bt,{data:!0,aria:!0})),{onClick:Le});return yn!==void 0?ve.createElement("a",Object.assign({},Dn,{className:We()(`${it}-link`,Ve),href:yn}),_n):ve.createElement("span",Object.assign({},Dn,{className:We()(`${it}-link`,Ve)}),_n)}function lt(it,en){return(yn,Ve,Le,Bt,Dn)=>{if(en)return en(yn,Ve,Le,Bt);const dn=Mt(yn,Ve);return ht(it,yn,dn,Dn)}}var et=function(it,en){var _n={};for(var yn in it)Object.prototype.hasOwnProperty.call(it,yn)&&en.indexOf(yn)<0&&(_n[yn]=it[yn]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,yn=Object.getOwnPropertySymbols(it);Ve<yn.length;Ve++)en.indexOf(yn[Ve])<0&&Object.prototype.propertyIsEnumerable.call(it,yn[Ve])&&(_n[yn[Ve]]=it[yn[Ve]]);return _n};const Ee=it=>{const{prefixCls:en,separator:_n="/",children:yn,menu:Ve,overlay:Le,dropdownProps:Bt,href:Dn}=it,nt=(ft=>{if(Ve||Le){const Xt=Object.assign({},Bt);if(Ve){const Rn=Ve||{},{items:wn}=Rn,Zt=et(Rn,["items"]);Xt.menu=Object.assign(Object.assign({},Zt),{items:wn==null?void 0:wn.map((Ht,Tn)=>{var{key:xn,title:ke,label:ue,path:le}=Ht,pe=et(Ht,["key","title","label","path"]);let he=ue!=null?ue:ke;return le&&(he=ve.createElement("a",{href:`${Dn}${le}`},he)),Object.assign(Object.assign({},pe),{key:xn!=null?xn:Tn,label:he})})})}else Le&&(Xt.overlay=Le);return ve.createElement(me.Z,Object.assign({placement:"bottom"},Xt),ve.createElement("span",{className:`${en}-overlay-link`},ft,ve.createElement(we.Z,null)))}return ft})(yn);return nt!=null?ve.createElement(ve.Fragment,null,ve.createElement("li",null,nt),_n&&ve.createElement(at,null,_n)):null},yt=it=>{const{prefixCls:en,children:_n,href:yn}=it,Ve=et(it,["prefixCls","children","href"]),{getPrefixCls:Le}=ve.useContext(_e.E_),Bt=Le("breadcrumb",en);return ve.createElement(Ee,Object.assign({},Ve,{prefixCls:Bt}),ht(Bt,Ve,_n,yn))};yt.__ANT_BREADCRUMB_ITEM=!0;var Vt=yt,qe=se(14747),ut=se(67968),Ce=se(45503);const xe=it=>{const{componentCls:en,iconCls:_n}=it;return{[en]:Object.assign(Object.assign({},(0,qe.Wf)(it)),{color:it.itemColor,fontSize:it.fontSize,[_n]:{fontSize:it.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:it.linkColor,transition:`color ${it.motionDurationMid}`,padding:`0 ${it.paddingXXS}px`,borderRadius:it.borderRadiusSM,height:it.lineHeight*it.fontSize,display:"inline-block",marginInline:-it.marginXXS,"&:hover":{color:it.linkHoverColor,backgroundColor:it.colorBgTextHover}},(0,qe.Qy)(it)),"li:last-child":{color:it.lastItemColor},[`${en}-separator`]:{marginInline:it.separatorMargin,color:it.separatorColor},[`${en}-link`]:{[`
|
|
|
> ${_n} + span,
|
|
|
> ${_n} + a
|
|
|
`]:{marginInlineStart:it.marginXXS}},[`${en}-overlay-link`]:{borderRadius:it.borderRadiusSM,height:it.lineHeight*it.fontSize,display:"inline-block",padding:`0 ${it.paddingXXS}px`,marginInline:-it.marginXXS,[`> ${_n}`]:{marginInlineStart:it.marginXXS,fontSize:it.fontSizeIcon},"&:hover":{color:it.linkHoverColor,backgroundColor:it.colorBgTextHover,a:{color:it.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${it.componentCls}-rtl`]:{direction:"rtl"}})}};var Ue=(0,ut.Z)("Breadcrumb",it=>{const en=(0,Ce.TS)(it,{});return[xe(en)]},it=>({itemColor:it.colorTextDescription,lastItemColor:it.colorText,iconFontSize:it.fontSize,linkColor:it.colorTextDescription,linkHoverColor:it.colorText,separatorColor:it.colorTextDescription,separatorMargin:it.marginXS})),Ze=function(it,en){var _n={};for(var yn in it)Object.prototype.hasOwnProperty.call(it,yn)&&en.indexOf(yn)<0&&(_n[yn]=it[yn]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,yn=Object.getOwnPropertySymbols(it);Ve<yn.length;Ve++)en.indexOf(yn[Ve])<0&&Object.prototype.propertyIsEnumerable.call(it,yn[Ve])&&(_n[yn[Ve]]=it[yn[Ve]]);return _n};function St(it){const{breadcrumbName:en,children:_n}=it,yn=Ze(it,["breadcrumbName","children"]),Ve=Object.assign({title:en},yn);return _n&&(Ve.menu={items:_n.map(Le=>{var{breadcrumbName:Bt}=Le,Dn=Ze(Le,["breadcrumbName"]);return Object.assign(Object.assign({},Dn),{title:Bt})})}),Ve}function mt(it,en){return(0,ve.useMemo)(()=>it||(en?en.map(St):null),[it,en])}var Pt=function(it,en){var _n={};for(var yn in it)Object.prototype.hasOwnProperty.call(it,yn)&&en.indexOf(yn)<0&&(_n[yn]=it[yn]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,yn=Object.getOwnPropertySymbols(it);Ve<yn.length;Ve++)en.indexOf(yn[Ve])<0&&Object.prototype.propertyIsEnumerable.call(it,yn[Ve])&&(_n[yn[Ve]]=it[yn[Ve]]);return _n};const Qe=(it,en)=>{if(en===void 0)return en;let _n=(en||"").replace(/^\//,"");return Object.keys(it).forEach(yn=>{_n=_n.replace(`:${yn}`,it[yn])}),_n},Ft=it=>{const{prefixCls:en,separator:_n="/",style:yn,className:Ve,rootClassName:Le,routes:Bt,items:Dn,children:dn,itemRender:nt,params:ft={}}=it,Xt=Pt(it,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Rn,direction:wn,breadcrumb:Zt}=ve.useContext(_e.E_);let Ht;const Tn=Rn("breadcrumb",en),[xn,ke]=Ue(Tn),ue=mt(Dn,Bt),le=lt(Tn,nt);if(ue&&ue.length>0){const oe=[],Ae=Dn||Bt;Ht=ue.map((Ge,_t)=>{const{path:Rt,key:zt,type:qt,menu:jt,overlay:ar,onClick:xr,className:Nt,separator:pn,dropdownProps:cr}=Ge,Rr=Qe(ft,Rt);Rr!==void 0&&oe.push(Rr);const rt=zt!=null?zt:_t;if(qt==="separator")return ve.createElement(at,{key:rt},pn);const Kt={},Bn=_t===ue.length-1;jt?Kt.menu=jt:ar&&(Kt.overlay=ar);let{href:Gn}=Ge;return oe.length&&Rr!==void 0&&(Gn=`#/${oe.join("/")}`),ve.createElement(Ee,Object.assign({key:rt},Kt,(0,Je.Z)(Ge,{data:!0,aria:!0}),{className:Nt,dropdownProps:cr,href:Gn,separator:Bn?"":_n,onClick:xr,prefixCls:Tn}),le(Ge,ft,Ae,oe,Gn))})}else if(dn){const oe=(0,Be.Z)(dn).length;Ht=(0,Be.Z)(dn).map((Ae,Ge)=>{if(!Ae)return Ae;const _t=Ge===oe-1;return(0,Te.Tm)(Ae,{separator:_t?"":_n,key:Ge})})}const pe=We()(Tn,Zt==null?void 0:Zt.className,{[`${Tn}-rtl`]:wn==="rtl"},Ve,Le,ke),he=Object.assign(Object.assign({},Zt==null?void 0:Zt.style),yn);return xn(ve.createElement("nav",Object.assign({className:pe,style:he},Xt),ve.createElement("ol",null,Ht)))};Ft.Item=Vt,Ft.Separator=at;var Dt=Ft,an=Dt},88258:function(En,Yt,se){"use strict";var fe=se(67294),We=se(53124),Be=se(32983);const Je=ve=>{const{componentName:Te}=ve,{getPrefixCls:_e}=(0,fe.useContext)(We.E_),we=_e("empty");switch(Te){case"Table":case"List":return fe.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return fe.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE,className:`${we}-small`});default:return fe.createElement(Be.Z,null)}};Yt.Z=Je},72565:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return ii}});var fe=se(94184),We=se.n(fe),Be=se(1413),Je=se(97685),ve=se(67294),Te=se(73935);function _e(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var we={};function me(Et,wt){}function De(Et,wt){}function at(){we={}}function Oe(Et,wt,Gt){!wt&&!we[Gt]&&(Et(!1,Gt),we[Gt]=!0)}function Mt(Et,wt){Oe(me,Et,wt)}function ht(Et,wt){Oe(De,Et,wt)}var lt=null,et=se(71002),Ee=se(18459);function yt(Et,wt,Gt){var fn=ve.useRef({});return(!("value"in fn.current)||Gt(fn.current.condition,wt))&&(fn.current.value=Et(),fn.current.condition=wt),fn.current.value}function Vt(Et,wt){typeof Et=="function"?Et(wt):(0,et.Z)(Et)==="object"&&Et&&"current"in Et&&(Et.current=wt)}function qe(){for(var Et=arguments.length,wt=new Array(Et),Gt=0;Gt<Et;Gt++)wt[Gt]=arguments[Gt];var fn=wt.filter(function(On){return On});return fn.length<=1?fn[0]:function(On){wt.forEach(function(gr){Vt(gr,On)})}}function ut(){for(var Et=arguments.length,wt=new Array(Et),Gt=0;Gt<Et;Gt++)wt[Gt]=arguments[Gt];return yt(function(){return qe.apply(void 0,wt)},wt,function(fn,On){return fn.length===On.length&&fn.every(function(gr,Tr){return gr===On[Tr]})})}function Ce(Et){var wt,Gt,fn=(0,Ee.isMemo)(Et)?Et.type.type:Et.type;return!(typeof fn=="function"&&!((wt=fn.prototype)!==null&&wt!==void 0&&wt.render)||typeof Et=="function"&&!((Gt=Et.prototype)!==null&&Gt!==void 0&&Gt.render))}var xe=ve.createContext(null),Ue=xe,Ze=se(74902),St=_e()?ve.useLayoutEffect:ve.useEffect,mt=St,Pt=function(wt,Gt){var fn=React.useRef(!0);St(function(){if(!fn.current)return wt()},Gt),St(function(){return fn.current=!1,function(){fn.current=!0}},[])},Qe=[];function Ft(Et,wt){var Gt=ve.useState(function(){if(!_e())return null;var Ti=document.createElement("div");return Ti}),fn=(0,Je.Z)(Gt,1),On=fn[0],gr=ve.useRef(!1),Tr=ve.useContext(Ue),Wr=ve.useState(Qe),Gr=(0,Je.Z)(Wr,2),Hr=Gr[0],ni=Gr[1],yi=Tr||(gr.current?void 0:function(Ti){ni(function(Mi){var Ie=[Ti].concat((0,Ze.Z)(Mi));return Ie})});function Lr(){On.parentElement||document.body.appendChild(On),gr.current=!0}function pi(){var Ti;(Ti=On.parentElement)===null||Ti===void 0||Ti.removeChild(On),gr.current=!1}return mt(function(){return Et?Tr?Tr(Lr):Lr():pi(),pi},[Et]),mt(function(){Hr.length&&(Hr.forEach(function(Ti){return Ti()}),ni(Qe))},[Hr]),[On,yi]}function Dt(Et,wt){if(!Et)return!1;if(Et.contains)return Et.contains(wt);for(var Gt=wt;Gt;){if(Gt===Et)return!0;Gt=Gt.parentNode}return!1}var an="data-rc-order",it="rc-util-key",en=new Map;function _n(){var Et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},wt=Et.mark;return wt?wt.startsWith("data-")?wt:"data-".concat(wt):it}function yn(Et){if(Et.attachTo)return Et.attachTo;var wt=document.querySelector("head");return wt||document.body}function Ve(Et){return Et==="queue"?"prependQueue":Et?"prepend":"append"}function Le(Et){return Array.from((en.get(Et)||Et).children).filter(function(wt){return wt.tagName==="STYLE"})}function Bt(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!_e())return null;var Gt=wt.csp,fn=wt.prepend,On=document.createElement("style");On.setAttribute(an,Ve(fn)),Gt!=null&&Gt.nonce&&(On.nonce=Gt==null?void 0:Gt.nonce),On.innerHTML=Et;var gr=yn(wt),Tr=gr.firstChild;if(fn){if(fn==="queue"){var Wr=Le(gr).filter(function(Gr){return["prepend","prependQueue"].includes(Gr.getAttribute(an))});if(Wr.length)return gr.insertBefore(On,Wr[Wr.length-1].nextSibling),On}gr.insertBefore(On,Tr)}else gr.appendChild(On);return On}function Dn(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Gt=yn(wt);return Le(Gt).find(function(fn){return fn.getAttribute(_n(wt))===Et})}function dn(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Gt=Dn(Et,wt);if(Gt){var fn=yn(wt);fn.removeChild(Gt)}}function nt(Et,wt){var Gt=en.get(Et);if(!Gt||!Dt(document,Gt)){var fn=Bt("",wt),On=fn.parentNode;en.set(Et,On),Et.removeChild(fn)}}function ft(){en.clear()}function Xt(Et,wt){var Gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},fn=yn(Gt);nt(fn,Gt);var On=Dn(wt,Gt);if(On){var gr,Tr;if((gr=Gt.csp)!==null&&gr!==void 0&&gr.nonce&&On.nonce!==((Tr=Gt.csp)===null||Tr===void 0?void 0:Tr.nonce)){var Wr;On.nonce=(Wr=Gt.csp)===null||Wr===void 0?void 0:Wr.nonce}return On.innerHTML!==Et&&(On.innerHTML=Et),On}var Gr=Bt(Et,Gt);return Gr.setAttribute(_n(Gt),wt),Gr}var Rn;function wn(Et){if(typeof document=="undefined")return 0;if(Et||Rn===void 0){var wt=document.createElement("div");wt.style.width="100%",wt.style.height="200px";var Gt=document.createElement("div"),fn=Gt.style;fn.position="absolute",fn.top="0",fn.left="0",fn.pointerEvents="none",fn.visibility="hidden",fn.width="200px",fn.height="150px",fn.overflow="hidden",Gt.appendChild(wt),document.body.appendChild(Gt);var On=wt.offsetWidth;Gt.style.overflow="scroll";var gr=wt.offsetWidth;On===gr&&(gr=Gt.clientWidth),document.body.removeChild(Gt),Rn=On-gr}return Rn}function Zt(Et){var wt=Et.match(/^(.*)px$/),Gt=Number(wt==null?void 0:wt[1]);return Number.isNaN(Gt)?wn():Gt}function Ht(Et){if(typeof document=="undefined"||!Et||!(Et instanceof Element))return{width:0,height:0};var wt=getComputedStyle(Et,"::-webkit-scrollbar"),Gt=wt.width,fn=wt.height;return{width:Zt(Gt),height:Zt(fn)}}function Tn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var xn="rc-util-locker-".concat(Date.now()),ke=0;function ue(Et){var wt=!!Et,Gt=ve.useState(function(){return ke+=1,"".concat(xn,"_").concat(ke)}),fn=(0,Je.Z)(Gt,1),On=fn[0];mt(function(){if(wt){var gr=Ht(document.body).width,Tr=Tn();Xt(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(Tr?"width: calc(100% - ".concat(gr,"px);"):"",`
|
|
|
}`),On)}else dn(On);return function(){dn(On)}},[wt,On])}var le=!1;function pe(Et){return typeof Et=="boolean"&&(le=Et),le}var he=function(wt){return wt===!1?!1:!_e()||!wt?null:typeof wt=="string"?document.querySelector(wt):typeof wt=="function"?wt():wt},oe=ve.forwardRef(function(Et,wt){var Gt=Et.open,fn=Et.autoLock,On=Et.getContainer,gr=Et.debug,Tr=Et.autoDestroy,Wr=Tr===void 0?!0:Tr,Gr=Et.children,Hr=ve.useState(Gt),ni=(0,Je.Z)(Hr,2),yi=ni[0],Lr=ni[1],pi=yi||Gt;ve.useEffect(function(){(Wr||Gt)&&Lr(Gt)},[Gt,Wr]);var Ti=ve.useState(function(){return he(On)}),Mi=(0,Je.Z)(Ti,2),Ie=Mi[0],Fe=Mi[1];ve.useEffect(function(){var Cn=he(On);Fe(Cn!=null?Cn:null)});var ze=Ft(pi&&!Ie,gr),je=(0,Je.Z)(ze,2),tt=je[0],st=je[1],kt=Ie!=null?Ie:tt;ue(fn&&Gt&&_e()&&(kt===tt||kt===document.body));var nn=null;if(Gr&&Ce(Gr)&&wt){var sn=Gr;nn=sn.ref}var Jn=ut(nn,wt);if(!pi||!_e()||Ie===void 0)return null;var yr=kt===!1||pe(),Zn=Gr;return wt&&(Zn=ve.cloneElement(Gr,{ref:Jn})),ve.createElement(Ue.Provider,{value:st},yr?Zn:(0,Te.createPortal)(Zn,kt))}),Ae=oe,Ge=Ae;function _t(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Rt=_t()?ve.useLayoutEffect:ve.useEffect,zt=function(wt,Gt){var fn=ve.useRef(!0);Rt(function(){return wt(fn.current)},Gt),Rt(function(){return fn.current=!1,function(){fn.current=!0}},[])},qt=function(wt,Gt){zt(function(fn){if(!fn)return wt()},Gt)},jt=zt,ar=ve.createContext(null),xr=ve.createContext({}),Nt=ar,pn=se(4942),cr=se(87462),Rr=se(62874),rt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(wt){var Gt=wt.keyCode;if(wt.altKey&&!wt.ctrlKey||wt.metaKey||Gt>=rt.F1&&Gt<=rt.F12)return!1;switch(Gt){case rt.ALT:case rt.CAPS_LOCK:case rt.CONTEXT_MENU:case rt.CTRL:case rt.DOWN:case rt.END:case rt.ESC:case rt.HOME:case rt.INSERT:case rt.LEFT:case rt.MAC_FF_META:case rt.META:case rt.NUMLOCK:case rt.NUM_CENTER:case rt.PAGE_DOWN:case rt.PAGE_UP:case rt.PAUSE:case rt.PRINT_SCREEN:case rt.RIGHT:case rt.SHIFT:case rt.UP:case rt.WIN_KEY:case rt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(wt){if(wt>=rt.ZERO&&wt<=rt.NINE||wt>=rt.NUM_ZERO&&wt<=rt.NUM_MULTIPLY||wt>=rt.A&&wt<=rt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&wt===0)return!0;switch(wt){case rt.SPACE:case rt.QUESTION_MARK:case rt.NUM_PLUS:case rt.NUM_MINUS:case rt.NUM_PERIOD:case rt.NUM_DIVISION:case rt.SEMICOLON:case rt.DASH:case rt.EQUALS:case rt.COMMA:case rt.PERIOD:case rt.SLASH:case rt.APOSTROPHE:case rt.SINGLE_QUOTE:case rt.OPEN_SQUARE_BRACKET:case rt.BACKSLASH:case rt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Kt=rt,Bn=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,Gn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,tr="".concat(Bn," ").concat(Gn).split(/[\s\n]+/),Sr="aria-",Ar="data-";function Mr(Et,wt){return Et.indexOf(wt)===0}function Pr(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Gt;wt===!1?Gt={aria:!0,data:!0,attr:!0}:wt===!0?Gt={aria:!0}:Gt=(0,Be.Z)({},wt);var fn={};return Object.keys(Et).forEach(function(On){(Gt.aria&&(On==="role"||Mr(On,Sr))||Gt.data&&Mr(On,Ar)||Gt.attr&&tr.includes(On))&&(fn[On]=Et[On])}),fn}function Vr(Et){var wt=React.useRef();wt.current=Et;var Gt=React.useCallback(function(){for(var fn,On=arguments.length,gr=new Array(On),Tr=0;Tr<On;Tr++)gr[Tr]=arguments[Tr];return(fn=wt.current)===null||fn===void 0?void 0:fn.call.apply(fn,[wt].concat(gr))},[]);return Gt}function lr(Et){var wt=React.useRef(!1),Gt=React.useState(Et),fn=_slicedToArray(Gt,2),On=fn[0],gr=fn[1];React.useEffect(function(){return wt.current=!1,function(){wt.current=!0}},[]);function Tr(Wr,Gr){Gr&&wt.current||gr(Wr)}return[On,Tr]}function si(Et){return Et!==void 0}function Li(Et,wt){var Gt=wt||{},fn=Gt.defaultValue,On=Gt.value,gr=Gt.onChange,Tr=Gt.postState,Wr=useState(function(){return si(On)?On:si(fn)?typeof fn=="function"?fn():fn:typeof Et=="function"?Et():Et}),Gr=_slicedToArray(Wr,2),Hr=Gr[0],ni=Gr[1],yi=On!==void 0?On:Hr,Lr=Tr?Tr(yi):yi,pi=useEvent(gr),Ti=useState([yi]),Mi=_slicedToArray(Ti,2),Ie=Mi[0],Fe=Mi[1];useLayoutUpdateEffect(function(){var je=Ie[0];Hr!==je&&pi(Hr,je)},[Ie]),useLayoutUpdateEffect(function(){si(On)||ni(On)},[On]);var ze=useEvent(function(je,tt){ni(je,tt),Fe([yi],tt)});return[Lr,ze]}var Ni=se(33993);function Hi(Et,wt,Gt){var fn=ve.useRef({});return(!("value"in fn.current)||Gt(fn.current.condition,wt))&&(fn.current.value=Et(),fn.current.condition=wt),fn.current.value}function ri(Et,wt){typeof Et=="function"?Et(wt):(0,et.Z)(Et)==="object"&&Et&&"current"in Et&&(Et.current=wt)}function vt(){for(var Et=arguments.length,wt=new Array(Et),Gt=0;Gt<Et;Gt++)wt[Gt]=arguments[Gt];var fn=wt.filter(function(On){return On});return fn.length<=1?fn[0]:function(On){wt.forEach(function(gr){ri(gr,On)})}}function Sn(){for(var Et=arguments.length,wt=new Array(Et),Gt=0;Gt<Et;Gt++)wt[Gt]=arguments[Gt];return Hi(function(){return vt.apply(void 0,wt)},wt,function(fn,On){return fn.length!==On.length||fn.every(function(gr,Tr){return gr!==On[Tr]})})}function kn(Et){var wt,Gt,fn=isMemo(Et)?Et.type.type:Et.type;return!(typeof fn=="function"&&!((wt=fn.prototype)!==null&&wt!==void 0&&wt.render)||typeof Et=="function"&&!((Gt=Et.prototype)!==null&&Gt!==void 0&&Gt.render))}function In(Et){return!isValidElement(Et)||isFragment(Et)?!1:kn(Et)}function sr(Et,wt,Gt,fn){if(!wt.length)return Gt;var On=_toArray(wt),gr=On[0],Tr=On.slice(1),Wr;return!Et&&typeof gr=="number"?Wr=[]:Array.isArray(Et)?Wr=_toConsumableArray(Et):Wr=_objectSpread({},Et),fn&&Gt===void 0&&Tr.length===1?delete Wr[gr][Tr[0]]:Wr[gr]=sr(Wr[gr],Tr,Gt,fn),Wr}function qn(Et,wt,Gt){var fn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return wt.length&&fn&&Gt===void 0&&!get(Et,wt.slice(0,-1))?Et:sr(Et,wt,Gt,fn)}function hr(Et){return _typeof(Et)==="object"&&Et!==null&&Object.getPrototypeOf(Et)===Object.prototype}function $n(Et){return Array.isArray(Et)?[]:{}}var Xe=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function ct(){for(var Et=arguments.length,wt=new Array(Et),Gt=0;Gt<Et;Gt++)wt[Gt]=arguments[Gt];var fn=$n(wt[0]);return wt.forEach(function(On){function gr(Tr,Wr){var Gr=new Set(Wr),Hr=get(On,Tr),ni=Array.isArray(Hr);if(ni||hr(Hr)){if(!Gr.has(Hr)){Gr.add(Hr);var yi=get(fn,Tr);ni?fn=qn(fn,Tr,[]):(!yi||_typeof(yi)!=="object")&&(fn=qn(fn,Tr,$n(Hr))),Xe(Hr).forEach(function(Lr){gr([].concat(_toConsumableArray(Tr),[Lr]),Gr)})}}else fn=qn(fn,Tr,Hr)}gr([])}),fn}var Tt={},Wt=[],He=function(wt){Wt.push(wt)};function pt(Et,wt){if(0)var Gt}function $t(Et,wt){if(0)var Gt}function Ot(){Tt={}}function Jt(Et,wt,Gt){!wt&&!Tt[Gt]&&(Et(!1,Gt),Tt[Gt]=!0)}function tn(Et,wt){Jt(pt,Et,wt)}function Un(Et,wt){Jt($t,Et,wt)}tn.preMessage=He,tn.resetWarned=Ot,tn.noteOnce=Un;var _r=tn,nr=function(wt){var Gt=wt.prefixCls,fn=wt.className,On=wt.style,gr=wt.children,Tr=wt.containerRef,Wr=wt.id,Gr=wt.onMouseEnter,Hr=wt.onMouseOver,ni=wt.onMouseLeave,yi=wt.onClick,Lr=wt.onKeyDown,pi=wt.onKeyUp,Ti={onMouseEnter:Gr,onMouseOver:Hr,onMouseLeave:ni,onClick:yi,onKeyDown:Lr,onKeyUp:pi},Mi=ve.useContext(xr),Ie=Mi.panel,Fe=Sn(Ie,Tr);return ve.createElement(ve.Fragment,null,ve.createElement("div",(0,cr.Z)({id:Wr,className:We()("".concat(Gt,"-content"),fn),style:(0,Be.Z)({},On),"aria-modal":"true",role:"dialog",ref:Fe},Ti),gr))},er=nr;function ur(Et){return typeof Et=="string"&&String(Number(Et))===Et?(_r(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Et)):Et}function dr(Et){warning(!("wrapperClassName"in Et),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Et.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var gt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function ot(Et,wt){var Gt,fn,On,gr,Tr=Et.prefixCls,Wr=Et.open,Gr=Et.placement,Hr=Et.inline,ni=Et.push,yi=Et.forceRender,Lr=Et.autoFocus,pi=Et.keyboard,Ti=Et.rootClassName,Mi=Et.rootStyle,Ie=Et.zIndex,Fe=Et.className,ze=Et.id,je=Et.style,tt=Et.motion,st=Et.width,kt=Et.height,nn=Et.children,sn=Et.contentWrapperStyle,Jn=Et.mask,yr=Et.maskClosable,Zn=Et.maskMotion,Cn=Et.maskClassName,vn=Et.maskStyle,Pn=Et.afterOpenChange,zn=Et.onClose,mr=Et.onMouseEnter,Yn=Et.onMouseOver,Xn=Et.onMouseLeave,rr=Et.onClick,ir=Et.onKeyDown,br=Et.onKeyUp,Re=ve.useRef(),Ke=ve.useRef(),Lt=ve.useRef();ve.useImperativeHandle(wt,function(){return Re.current});var dt=function(zr){var ei=zr.keyCode,ci=zr.shiftKey;switch(ei){case Kt.TAB:{if(ei===Kt.TAB){if(!ci&&document.activeElement===Lt.current){var Fr;(Fr=Ke.current)===null||Fr===void 0||Fr.focus({preventScroll:!0})}else if(ci&&document.activeElement===Ke.current){var fi;(fi=Lt.current)===null||fi===void 0||fi.focus({preventScroll:!0})}}break}case Kt.ESC:{zn&&pi&&(zr.stopPropagation(),zn(zr));break}}};ve.useEffect(function(){if(Wr&&Lr){var Er;(Er=Re.current)===null||Er===void 0||Er.focus({preventScroll:!0})}},[Wr]);var Ut=ve.useState(!1),un=(0,Je.Z)(Ut,2),bn=un[0],Kn=un[1],Ln=ve.useContext(Nt),on;ni===!1?on={distance:0}:ni===!0?on={}:on=ni||{};var Hn=(Gt=(fn=(On=on)===null||On===void 0?void 0:On.distance)!==null&&fn!==void 0?fn:Ln==null?void 0:Ln.pushDistance)!==null&&Gt!==void 0?Gt:180,jn=ve.useMemo(function(){return{pushDistance:Hn,push:function(){Kn(!0)},pull:function(){Kn(!1)}}},[Hn]);ve.useEffect(function(){if(Wr){var Er;Ln==null||(Er=Ln.push)===null||Er===void 0||Er.call(Ln)}else{var zr;Ln==null||(zr=Ln.pull)===null||zr===void 0||zr.call(Ln)}},[Wr]),ve.useEffect(function(){return function(){var Er;Ln==null||(Er=Ln.pull)===null||Er===void 0||Er.call(Ln)}},[]);var wr=Jn&&ve.createElement(Rr.Z,(0,cr.Z)({key:"mask"},Zn,{visible:Wr}),function(Er,zr){var ei=Er.className,ci=Er.style;return ve.createElement("div",{className:We()("".concat(Tr,"-mask"),ei,Cn),style:(0,Be.Z)((0,Be.Z)({},ci),vn),onClick:yr&&Wr?zn:void 0,ref:zr})}),Wn=typeof tt=="function"?tt(Gr):tt,Or={};if(bn&&Hn)switch(Gr){case"top":Or.transform="translateY(".concat(Hn,"px)");break;case"bottom":Or.transform="translateY(".concat(-Hn,"px)");break;case"left":Or.transform="translateX(".concat(Hn,"px)");break;default:Or.transform="translateX(".concat(-Hn,"px)");break}Gr==="left"||Gr==="right"?Or.width=ur(st):Or.height=ur(kt);var Yr={onMouseEnter:mr,onMouseOver:Yn,onMouseLeave:Xn,onClick:rr,onKeyDown:ir,onKeyUp:br},$r=ve.createElement(Rr.Z,(0,cr.Z)({key:"panel"},Wn,{visible:Wr,forceRender:yi,onVisibleChanged:function(zr){Pn==null||Pn(zr)},removeOnLeave:!1,leavedClassName:"".concat(Tr,"-content-wrapper-hidden")}),function(Er,zr){var ei=Er.className,ci=Er.style;return ve.createElement("div",(0,cr.Z)({className:We()("".concat(Tr,"-content-wrapper"),ei),style:(0,Be.Z)((0,Be.Z)((0,Be.Z)({},Or),ci),sn)},Pr(Et,{data:!0})),ve.createElement(er,(0,cr.Z)({id:ze,containerRef:zr,prefixCls:Tr,className:Fe,style:je},Yr),nn))}),jr=(0,Be.Z)({},Mi);return Ie&&(jr.zIndex=Ie),ve.createElement(Nt.Provider,{value:jn},ve.createElement("div",{className:We()(Tr,"".concat(Tr,"-").concat(Gr),Ti,(gr={},(0,pn.Z)(gr,"".concat(Tr,"-open"),Wr),(0,pn.Z)(gr,"".concat(Tr,"-inline"),Hr),gr)),style:jr,tabIndex:-1,ref:Re,onKeyDown:dt},wr,ve.createElement("div",{tabIndex:0,ref:Ke,style:gt,"aria-hidden":"true","data-sentinel":"start"}),$r,ve.createElement("div",{tabIndex:0,ref:Lt,style:gt,"aria-hidden":"true","data-sentinel":"end"})))}var Ct=ve.forwardRef(ot),ln=Ct,Nn=function(wt){var Gt=wt.open,fn=Gt===void 0?!1:Gt,On=wt.prefixCls,gr=On===void 0?"rc-drawer":On,Tr=wt.placement,Wr=Tr===void 0?"right":Tr,Gr=wt.autoFocus,Hr=Gr===void 0?!0:Gr,ni=wt.keyboard,yi=ni===void 0?!0:ni,Lr=wt.width,pi=Lr===void 0?378:Lr,Ti=wt.mask,Mi=Ti===void 0?!0:Ti,Ie=wt.maskClosable,Fe=Ie===void 0?!0:Ie,ze=wt.getContainer,je=wt.forceRender,tt=wt.afterOpenChange,st=wt.destroyOnClose,kt=wt.onMouseEnter,nn=wt.onMouseOver,sn=wt.onMouseLeave,Jn=wt.onClick,yr=wt.onKeyDown,Zn=wt.onKeyUp,Cn=wt.panelRef,vn=ve.useState(!1),Pn=(0,Je.Z)(vn,2),zn=Pn[0],mr=Pn[1],Yn=ve.useState(!1),Xn=(0,Je.Z)(Yn,2),rr=Xn[0],ir=Xn[1];jt(function(){ir(!0)},[]);var br=rr?fn:!1,Re=ve.useRef(),Ke=ve.useRef();jt(function(){br&&(Ke.current=document.activeElement)},[br]);var Lt=function(Kn){var Ln;if(mr(Kn),tt==null||tt(Kn),!Kn&&Ke.current&&!((Ln=Re.current)!==null&&Ln!==void 0&&Ln.contains(Ke.current))){var on;(on=Ke.current)===null||on===void 0||on.focus({preventScroll:!0})}},dt=ve.useMemo(function(){return{panel:Cn}},[Cn]);if(!je&&!zn&&!br&&st)return null;var Ut={onMouseEnter:kt,onMouseOver:nn,onMouseLeave:sn,onClick:Jn,onKeyDown:yr,onKeyUp:Zn},un=(0,Be.Z)((0,Be.Z)({},wt),{},{open:br,prefixCls:gr,placement:Wr,autoFocus:Hr,keyboard:yi,width:pi,mask:Mi,maskClosable:Fe,inline:ze===!1,afterOpenChange:Lt,ref:Re},Ut);return ve.createElement(xr.Provider,{value:dt},ve.createElement(Ge,{open:br||je||zn,autoDestroy:!1,getContainer:ze,autoLock:Mi&&(br||zn)},ve.createElement(ln,un)))},cn=Nn,mn=cn,gn=se(33603),Fn=se(53124),fr=se(65223),Qt=se(69760),Ur=Et=>{const{prefixCls:wt,title:Gt,footer:fn,extra:On,closeIcon:gr,closable:Tr,onClose:Wr,headerStyle:Gr,drawerStyle:Hr,bodyStyle:ni,footerStyle:yi,children:Lr}=Et,pi=ve.useCallback(ze=>ve.createElement("button",{type:"button",onClick:Wr,"aria-label":"Close",className:`${wt}-close`},ze),[Wr]),[Ti,Mi]=(0,Qt.Z)(Tr,gr,pi,void 0,!0),Ie=ve.useMemo(()=>!Gt&&!Ti?null:ve.createElement("div",{style:Gr,className:We()(`${wt}-header`,{[`${wt}-header-close-only`]:Ti&&!Gt&&!On})},ve.createElement("div",{className:`${wt}-header-title`},Mi,Gt&&ve.createElement("div",{className:`${wt}-title`},Gt)),On&&ve.createElement("div",{className:`${wt}-extra`},On)),[Ti,Mi,On,Gr,wt,Gt]),Fe=ve.useMemo(()=>{if(!fn)return null;const ze=`${wt}-footer`;return ve.createElement("div",{className:ze,style:yi},fn)},[fn,yi,wt]);return ve.createElement("div",{className:`${wt}-wrapper-body`,style:Hr},Ie,ve.createElement("div",{className:`${wt}-body`,style:ni},Lr),Fe)},Bi=se(4173),Ai=se(67968),gi=se(45503),xi=Et=>{const{componentCls:wt,motionDurationSlow:Gt}=Et,fn={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${Gt}`}}};return{[wt]:{[`${wt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${Gt}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${wt}-panel-motion`]:{"&-left":[fn,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[fn,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[fn,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[fn,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const li=Et=>{const{componentCls:wt,zIndexPopup:Gt,colorBgMask:fn,colorBgElevated:On,motionDurationSlow:gr,motionDurationMid:Tr,padding:Wr,paddingLG:Gr,fontSizeLG:Hr,lineHeightLG:ni,lineWidth:yi,lineType:Lr,colorSplit:pi,marginSM:Ti,colorIcon:Mi,colorIconHover:Ie,colorText:Fe,fontWeightStrong:ze,footerPaddingBlock:je,footerPaddingInline:tt}=Et,st=`${wt}-content-wrapper`;return{[wt]:{position:"fixed",inset:0,zIndex:Gt,pointerEvents:"none","&-pure":{position:"relative",background:On,[`&${wt}-left`]:{boxShadow:Et.boxShadowDrawerLeft},[`&${wt}-right`]:{boxShadow:Et.boxShadowDrawerRight},[`&${wt}-top`]:{boxShadow:Et.boxShadowDrawerUp},[`&${wt}-bottom`]:{boxShadow:Et.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${wt}-mask`]:{position:"absolute",inset:0,zIndex:Gt,background:fn,pointerEvents:"auto"},[st]:{position:"absolute",zIndex:Gt,maxWidth:"100vw",transition:`all ${gr}`,"&-hidden":{display:"none"}},[`&-left > ${st}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Et.boxShadowDrawerLeft},[`&-right > ${st}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Et.boxShadowDrawerRight},[`&-top > ${st}`]:{top:0,insetInline:0,boxShadow:Et.boxShadowDrawerUp},[`&-bottom > ${st}`]:{bottom:0,insetInline:0,boxShadow:Et.boxShadowDrawerDown},[`${wt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:On,pointerEvents:"auto"},[`${wt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${wt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Wr}px ${Gr}px`,fontSize:Hr,lineHeight:ni,borderBottom:`${yi}px ${Lr} ${pi}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${wt}-extra`]:{flex:"none"},[`${wt}-close`]:{display:"inline-block",marginInlineEnd:Ti,color:Mi,fontWeight:ze,fontSize:Hr,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${Tr}`,textRendering:"auto","&:focus, &:hover":{color:Ie,textDecoration:"none"}},[`${wt}-title`]:{flex:1,margin:0,color:Fe,fontWeight:Et.fontWeightStrong,fontSize:Hr,lineHeight:ni},[`${wt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Gr,overflow:"auto"},[`${wt}-footer`]:{flexShrink:0,padding:`${je}px ${tt}px`,borderTop:`${yi}px ${Lr} ${pi}`},"&-rtl":{direction:"rtl"}}}};var $i=(0,Ai.Z)("Drawer",Et=>{const wt=(0,gi.TS)(Et,{});return[li(wt),xi(wt)]},Et=>({zIndexPopup:Et.zIndexPopupBase,footerPaddingBlock:Et.paddingXS,footerPaddingInline:Et.padding})),Gi=se(16569),qr=function(Et,wt){var Gt={};for(var fn in Et)Object.prototype.hasOwnProperty.call(Et,fn)&&wt.indexOf(fn)<0&&(Gt[fn]=Et[fn]);if(Et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var On=0,fn=Object.getOwnPropertySymbols(Et);On<fn.length;On++)wt.indexOf(fn[On])<0&&Object.prototype.propertyIsEnumerable.call(Et,fn[On])&&(Gt[fn[On]]=Et[fn[On]]);return Gt};const vi=null,Zi={distance:180},la=Et=>{var wt;const{rootClassName:Gt,width:fn,height:On,size:gr="default",mask:Tr=!0,push:Wr=Zi,open:Gr,afterOpenChange:Hr,onClose:ni,prefixCls:yi,getContainer:Lr,style:pi,className:Ti,visible:Mi,afterVisibleChange:Ie}=Et,Fe=qr(Et,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:ze,getPrefixCls:je,direction:tt,drawer:st}=ve.useContext(Fn.E_),kt=je("drawer",yi),[nn,sn]=$i(kt),Jn=Lr===void 0&&ze?()=>ze(document.body):Lr,yr=We()({"no-mask":!Tr,[`${kt}-rtl`]:tt==="rtl"},Gt,sn),Zn=ve.useMemo(()=>fn!=null?fn:gr==="large"?736:378,[fn,gr]),Cn=ve.useMemo(()=>On!=null?On:gr==="large"?736:378,[On,gr]),vn={motionName:(0,gn.m)(kt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Pn=mr=>({motionName:(0,gn.m)(kt,`panel-motion-${mr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),zn=(0,Gi.H)();return nn(ve.createElement(Bi.BR,null,ve.createElement(fr.Ux,{status:!0,override:!0},ve.createElement(mn,Object.assign({prefixCls:kt,onClose:ni,maskMotion:vn,motion:Pn},Fe,{open:Gr!=null?Gr:Mi,mask:Tr,push:Wr,width:Zn,height:Cn,style:Object.assign(Object.assign({},st==null?void 0:st.style),pi),className:We()(st==null?void 0:st.className,Ti),rootClassName:yr,getContainer:Jn,afterOpenChange:Hr!=null?Hr:Ie,panelRef:zn}),ve.createElement(Ur,Object.assign({prefixCls:kt},Fe,{onClose:ni}))))))},ta=Et=>{const{prefixCls:wt,style:Gt,className:fn,placement:On="right"}=Et,gr=qr(Et,["prefixCls","style","className","placement"]),{getPrefixCls:Tr}=ve.useContext(Fn.E_),Wr=Tr("drawer",wt),[Gr,Hr]=$i(Wr),ni=We()(Wr,`${Wr}-pure`,`${Wr}-${On}`,Hr,fn);return Gr(ve.createElement("div",{className:ni,style:Gt},ve.createElement(Ur,Object.assign({prefixCls:Wr},gr))))};la._InternalPanelDoNotUseOrYouWillBeFired=ta;var ii=la},35874:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return he}});var fe=se(67294),We=se(91034),Be=se(94184),Je=se.n(Be),ve=se(87462),Te=se(4942),_e=se(97685),we=se(45987),me=se(62709),De=se(71002),at=se(12060);function Oe(oe,Ae,Ge){var _t=React.useRef({});return(!("value"in _t.current)||Ge(_t.current.condition,Ae))&&(_t.current.value=oe(),_t.current.condition=Ae),_t.current.value}function Mt(oe,Ae){typeof oe=="function"?oe(Ae):(0,De.Z)(oe)==="object"&&oe&&"current"in oe&&(oe.current=Ae)}function ht(){for(var oe=arguments.length,Ae=new Array(oe),Ge=0;Ge<oe;Ge++)Ae[Ge]=arguments[Ge];var _t=Ae.filter(function(Rt){return Rt});return _t.length<=1?_t[0]:function(Rt){Ae.forEach(function(zt){Mt(zt,Rt)})}}function lt(){for(var oe=arguments.length,Ae=new Array(oe),Ge=0;Ge<oe;Ge++)Ae[Ge]=arguments[Ge];return useMemo(function(){return ht.apply(void 0,Ae)},Ae,function(_t,Rt){return _t.length===Rt.length&&_t.every(function(zt,qt){return zt===Rt[qt]})})}function et(oe){var Ae,Ge,_t=(0,at.isMemo)(oe)?oe.type.type:oe.type;return!(typeof _t=="function"&&!((Ae=_t.prototype)!==null&&Ae!==void 0&&Ae.render)||typeof oe=="function"&&!((Ge=oe.prototype)!==null&&Ge!==void 0&&Ge.render))}var Ee={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Ae){var Ge=Ae.keyCode;if(Ae.altKey&&!Ae.ctrlKey||Ae.metaKey||Ge>=Ee.F1&&Ge<=Ee.F12)return!1;switch(Ge){case Ee.ALT:case Ee.CAPS_LOCK:case Ee.CONTEXT_MENU:case Ee.CTRL:case Ee.DOWN:case Ee.END:case Ee.ESC:case Ee.HOME:case Ee.INSERT:case Ee.LEFT:case Ee.MAC_FF_META:case Ee.META:case Ee.NUMLOCK:case Ee.NUM_CENTER:case Ee.PAGE_DOWN:case Ee.PAGE_UP:case Ee.PAUSE:case Ee.PRINT_SCREEN:case Ee.RIGHT:case Ee.SHIFT:case Ee.UP:case Ee.WIN_KEY:case Ee.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ae){if(Ae>=Ee.ZERO&&Ae<=Ee.NINE||Ae>=Ee.NUM_ZERO&&Ae<=Ee.NUM_MULTIPLY||Ae>=Ee.A&&Ae<=Ee.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ae===0)return!0;switch(Ae){case Ee.SPACE:case Ee.QUESTION_MARK:case Ee.NUM_PLUS:case Ee.NUM_MINUS:case Ee.NUM_PERIOD:case Ee.NUM_DIVISION:case Ee.SEMICOLON:case Ee.DASH:case Ee.EQUALS:case Ee.COMMA:case Ee.PERIOD:case Ee.SLASH:case Ee.APOSTROPHE:case Ee.SINGLE_QUOTE:case Ee.OPEN_SQUARE_BRACKET:case Ee.BACKSLASH:case Ee.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},yt=Ee,Vt=function(Ae){return+setTimeout(Ae,16)},qe=function(Ae){return clearTimeout(Ae)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Vt=function(Ae){return window.requestAnimationFrame(Ae)},qe=function(Ae){return window.cancelAnimationFrame(Ae)});var ut=0,Ce=new Map;function xe(oe){Ce.delete(oe)}var Ue=function(Ae){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ut+=1;var _t=ut;function Rt(zt){if(zt===0)xe(_t),Ae();else{var qt=Vt(function(){Rt(zt-1)});Ce.set(_t,qt)}}return Rt(Ge),_t};Ue.cancel=function(oe){var Ae=Ce.get(oe);return xe(Ae),qe(Ae)};var Ze=Ue,St=yt.ESC,mt=yt.TAB;function Pt(oe){var Ae=oe.visible,Ge=oe.triggerRef,_t=oe.onVisibleChange,Rt=oe.autoFocus,zt=oe.overlayRef,qt=fe.useRef(!1),jt=function(){if(Ae){var pn,cr;(pn=Ge.current)===null||pn===void 0||(cr=pn.focus)===null||cr===void 0||cr.call(pn),_t==null||_t(!1)}},ar=function(){var pn;return(pn=zt.current)!==null&&pn!==void 0&&pn.focus?(zt.current.focus(),qt.current=!0,!0):!1},xr=function(pn){switch(pn.keyCode){case St:jt();break;case mt:{var cr=!1;qt.current||(cr=ar()),cr?pn.preventDefault():jt();break}}};fe.useEffect(function(){return Ae?(window.addEventListener("keydown",xr),Rt&&Ze(ar,3),function(){window.removeEventListener("keydown",xr),qt.current=!1}):function(){qt.current=!1}},[Ae])}var Qe=(0,fe.forwardRef)(function(oe,Ae){var Ge=oe.overlay,_t=oe.arrow,Rt=oe.prefixCls,zt=(0,fe.useMemo)(function(){var jt;return typeof Ge=="function"?jt=Ge():jt=Ge,jt},[Ge]),qt=ht(Ae,zt==null?void 0:zt.ref);return fe.createElement(fe.Fragment,null,_t&&fe.createElement("div",{className:"".concat(Rt,"-arrow")}),fe.cloneElement(zt,{ref:et(zt)?qt:void 0}))}),Ft=Qe,Dt={adjustX:1,adjustY:1},an=[0,0],it={topLeft:{points:["bl","tl"],overflow:Dt,offset:[0,-4],targetOffset:an},top:{points:["bc","tc"],overflow:Dt,offset:[0,-4],targetOffset:an},topRight:{points:["br","tr"],overflow:Dt,offset:[0,-4],targetOffset:an},bottomLeft:{points:["tl","bl"],overflow:Dt,offset:[0,4],targetOffset:an},bottom:{points:["tc","bc"],overflow:Dt,offset:[0,4],targetOffset:an},bottomRight:{points:["tr","br"],overflow:Dt,offset:[0,4],targetOffset:an}},en=it,_n=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function yn(oe,Ae){var Ge,_t=oe.arrow,Rt=_t===void 0?!1:_t,zt=oe.prefixCls,qt=zt===void 0?"rc-dropdown":zt,jt=oe.transitionName,ar=oe.animation,xr=oe.align,Nt=oe.placement,pn=Nt===void 0?"bottomLeft":Nt,cr=oe.placements,Rr=cr===void 0?en:cr,rt=oe.getPopupContainer,Kt=oe.showAction,Bn=oe.hideAction,Gn=oe.overlayClassName,tr=oe.overlayStyle,Sr=oe.visible,Ar=oe.trigger,Mr=Ar===void 0?["hover"]:Ar,Pr=oe.autoFocus,Vr=oe.overlay,lr=oe.children,si=oe.onVisibleChange,Li=(0,we.Z)(oe,_n),Ni=fe.useState(),Hi=(0,_e.Z)(Ni,2),ri=Hi[0],vt=Hi[1],Sn="visible"in oe?Sr:ri,kn=fe.useRef(null),In=fe.useRef(null),sr=fe.useRef(null);fe.useImperativeHandle(Ae,function(){return kn.current});var qn=function($t){vt($t),si==null||si($t)};Pt({visible:Sn,triggerRef:sr,onVisibleChange:qn,autoFocus:Pr,overlayRef:In});var hr=function($t){var Ot=oe.onOverlayClick;vt(!1),Ot&&Ot($t)},$n=function(){return fe.createElement(Ft,{ref:In,overlay:Vr,prefixCls:qt,arrow:Rt})},Xe=function(){return typeof Vr=="function"?$n:$n()},ct=function(){var $t=oe.minOverlayWidthMatchTrigger,Ot=oe.alignPoint;return"minOverlayWidthMatchTrigger"in oe?$t:!Ot},Tt=function(){var $t=oe.openClassName;return $t!==void 0?$t:"".concat(qt,"-open")},Wt=fe.cloneElement(lr,{className:Je()((Ge=lr.props)===null||Ge===void 0?void 0:Ge.className,Sn&&Tt()),ref:et(lr)?ht(sr,lr.ref):void 0}),He=Bn;return!He&&Mr.indexOf("contextMenu")!==-1&&(He=["click"]),fe.createElement(me.Z,(0,ve.Z)({builtinPlacements:Rr},Li,{prefixCls:qt,ref:kn,popupClassName:Je()(Gn,(0,Te.Z)({},"".concat(qt,"-show-arrow"),Rt)),popupStyle:tr,action:Mr,showAction:Kt,hideAction:He,popupPlacement:pn,popupAlign:xr,popupTransitionName:jt,popupAnimation:ar,popupVisible:Sn,stretch:ct()?"minWidth":"",popup:Xe(),onPopupVisibleChange:qn,onPopupClick:hr,getPopupContainer:rt}),Wt)}var Ve=fe.forwardRef(yn),Le=Ve,Bt=se(60276),Dn=se(5663),dn=se(10366),nt=se(80636),ft=se(8745),Xt=se(96159),Rn=se(53124),wn=se(68508),Zt=se(76529),Ht=se(29691),Tn=se(66748);const xn=null,ke=oe=>{const{menu:Ae,arrow:Ge,prefixCls:_t,children:Rt,trigger:zt,disabled:qt,dropdownRender:jt,getPopupContainer:ar,overlayClassName:xr,rootClassName:Nt,open:pn,onOpenChange:cr,visible:Rr,onVisibleChange:rt,mouseEnterDelay:Kt=.15,mouseLeaveDelay:Bn=.1,autoAdjustOverflow:Gn=!0,placement:tr="",overlay:Sr,transitionName:Ar}=oe,{getPopupContainer:Mr,getPrefixCls:Pr,direction:Vr}=fe.useContext(Rn.E_),lr=fe.useMemo(()=>{const Wt=Pr();return Ar!==void 0?Ar:tr.includes("top")?`${Wt}-slide-down`:`${Wt}-slide-up`},[Pr,tr,Ar]),si=fe.useMemo(()=>tr?tr.includes("Center")?tr.slice(0,tr.indexOf("Center")):tr:Vr==="rtl"?"bottomRight":"bottomLeft",[tr,Vr]),Li=Pr("dropdown",_t),[Ni,Hi]=(0,Tn.Z)(Li),[,ri]=(0,Ht.Z)(),vt=fe.Children.only(Rt),Sn=(0,Xt.Tm)(vt,{className:Je()(`${Li}-trigger`,{[`${Li}-rtl`]:Vr==="rtl"},vt.props.className),disabled:qt}),kn=qt?[]:zt;let In;kn&&kn.includes("contextMenu")&&(In=!0);const[sr,qn]=(0,Dn.Z)(!1,{value:pn!=null?pn:Rr}),hr=(0,Bt.useEvent)(Wt=>{cr==null||cr(Wt),rt==null||rt(Wt),qn(Wt)}),$n=Je()(xr,Nt,Hi,{[`${Li}-rtl`]:Vr==="rtl"}),Xe=(0,nt.Z)({arrowPointAtCenter:typeof Ge=="object"&&Ge.pointAtCenter,autoAdjustOverflow:Gn,offset:ri.marginXXS,arrowWidth:Ge?ri.sizePopupArrow:0,borderRadius:ri.borderRadius}),ct=fe.useCallback(()=>{qn(!1)},[]),Tt=()=>{let Wt;return Ae!=null&&Ae.items?Wt=fe.createElement(wn.default,Object.assign({},Ae)):typeof Sr=="function"?Wt=Sr():Wt=Sr,jt&&(Wt=jt(Wt)),Wt=fe.Children.only(typeof Wt=="string"?fe.createElement("span",null,Wt):Wt),fe.createElement(Zt.J,{prefixCls:`${Li}-menu`,expandIcon:fe.createElement("span",{className:`${Li}-menu-submenu-arrow`},fe.createElement(We.Z,{className:`${Li}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ct,validator:He=>{let{mode:pt}=He}},Wt)};return Ni(fe.createElement(Le,Object.assign({alignPoint:In},(0,dn.Z)(oe,["rootClassName"]),{mouseEnterDelay:Kt,mouseLeaveDelay:Bn,visible:sr,builtinPlacements:Xe,arrow:!!Ge,overlayClassName:$n,prefixCls:Li,getPopupContainer:ar||Mr,transitionName:lr,trigger:kn,overlay:Tt,placement:si,onVisibleChange:hr}),Sn))};function ue(oe){return Object.assign(Object.assign({},oe),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const le=(0,ft.Z)(ke,"dropdown",oe=>oe,ue),pe=oe=>fe.createElement(le,Object.assign({},oe),fe.createElement("span",null));ke._InternalPanelDoNotUseOrYouWillBeFired=pe;var he=ke},66748:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return at}});var fe=se(14747),We=se(67771),Be=se(33297),Je=se(50438),ve=se(97414),Te=se(67968),_e=se(45503),me=Oe=>{const{componentCls:Mt,menuCls:ht,colorError:lt,colorTextLightSolid:et}=Oe,Ee=`${ht}-item`;return{[`${Mt}, ${Mt}-menu-submenu`]:{[`${ht} ${Ee}`]:{[`&${Ee}-danger:not(${Ee}-disabled)`]:{color:lt,"&:hover":{color:et,backgroundColor:lt}}}}}};const De=Oe=>{const{componentCls:Mt,menuCls:ht,zIndexPopup:lt,dropdownArrowDistance:et,sizePopupArrow:Ee,antCls:yt,iconCls:Vt,motionDurationMid:qe,dropdownPaddingVertical:ut,fontSize:Ce,dropdownEdgeChildPadding:xe,colorTextDisabled:Ue,fontSizeIcon:Ze,controlPaddingHorizontal:St,colorBgElevated:mt}=Oe;return[{[Mt]:Object.assign(Object.assign({},(0,fe.Wf)(Oe)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:lt,display:"block","&::before":{position:"absolute",insetBlock:-et+Ee/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${yt}-btn`]:{[`& > ${Vt}-down, & > ${yt}-btn-icon > ${Vt}-down`]:{fontSize:Ze}},[`${Mt}-wrap`]:{position:"relative",[`${yt}-btn > ${Vt}-down`]:{fontSize:Ze},[`${Vt}-down::before`]:{transition:`transform ${qe}`}},[`${Mt}-wrap-open`]:{[`${Vt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${yt}-slide-down-enter${yt}-slide-down-enter-active${Mt}-placement-bottomLeft,
|
|
|
&${yt}-slide-down-appear${yt}-slide-down-appear-active${Mt}-placement-bottomLeft,
|
|
|
&${yt}-slide-down-enter${yt}-slide-down-enter-active${Mt}-placement-bottom,
|
|
|
&${yt}-slide-down-appear${yt}-slide-down-appear-active${Mt}-placement-bottom,
|
|
|
&${yt}-slide-down-enter${yt}-slide-down-enter-active${Mt}-placement-bottomRight,
|
|
|
&${yt}-slide-down-appear${yt}-slide-down-appear-active${Mt}-placement-bottomRight`]:{animationName:We.fJ},[`&${yt}-slide-up-enter${yt}-slide-up-enter-active${Mt}-placement-topLeft,
|
|
|
&${yt}-slide-up-appear${yt}-slide-up-appear-active${Mt}-placement-topLeft,
|
|
|
&${yt}-slide-up-enter${yt}-slide-up-enter-active${Mt}-placement-top,
|
|
|
&${yt}-slide-up-appear${yt}-slide-up-appear-active${Mt}-placement-top,
|
|
|
&${yt}-slide-up-enter${yt}-slide-up-enter-active${Mt}-placement-topRight,
|
|
|
&${yt}-slide-up-appear${yt}-slide-up-appear-active${Mt}-placement-topRight`]:{animationName:We.Qt},[`&${yt}-slide-down-leave${yt}-slide-down-leave-active${Mt}-placement-bottomLeft,
|
|
|
&${yt}-slide-down-leave${yt}-slide-down-leave-active${Mt}-placement-bottom,
|
|
|
&${yt}-slide-down-leave${yt}-slide-down-leave-active${Mt}-placement-bottomRight`]:{animationName:We.Uw},[`&${yt}-slide-up-leave${yt}-slide-up-leave-active${Mt}-placement-topLeft,
|
|
|
&${yt}-slide-up-leave${yt}-slide-up-leave-active${Mt}-placement-top,
|
|
|
&${yt}-slide-up-leave${yt}-slide-up-leave-active${Mt}-placement-topRight`]:{animationName:We.ly}})},(0,ve.ZP)(Oe,{colorBg:mt,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${Mt} ${ht}`]:{position:"relative",margin:0},[`${ht}-submenu-popup`]:{position:"absolute",zIndex:lt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${Mt}, ${Mt}-menu-submenu`]:{[ht]:Object.assign(Object.assign({padding:xe,listStyleType:"none",backgroundColor:mt,backgroundClip:"padding-box",borderRadius:Oe.borderRadiusLG,outline:"none",boxShadow:Oe.boxShadowSecondary},(0,fe.Qy)(Oe)),{[`${ht}-item-group-title`]:{padding:`${ut}px ${St}px`,color:Oe.colorTextDescription,transition:`all ${qe}`},[`${ht}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ht}-item-icon`]:{minWidth:Ce,marginInlineEnd:Oe.marginXS,fontSize:Oe.fontSizeSM},[`${ht}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${qe}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ht}-item, ${ht}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ut}px ${St}px`,color:Oe.colorText,fontWeight:"normal",fontSize:Ce,lineHeight:Oe.lineHeight,cursor:"pointer",transition:`all ${qe}`,borderRadius:Oe.borderRadiusSM,"&:hover, &-active":{backgroundColor:Oe.controlItemBgHover}},(0,fe.Qy)(Oe)),{"&-selected":{color:Oe.colorPrimary,backgroundColor:Oe.controlItemBgActive,"&:hover, &-active":{backgroundColor:Oe.controlItemBgActiveHover}},"&-disabled":{color:Ue,cursor:"not-allowed","&:hover":{color:Ue,backgroundColor:mt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Oe.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:Oe.colorSplit},[`${Mt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Oe.paddingXS,[`${Mt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Oe.colorTextDescription,fontSize:Ze,fontStyle:"normal"}}}),[`${ht}-item-group-list`]:{margin:`0 ${Oe.marginXS}px`,padding:0,listStyle:"none"},[`${ht}-submenu-title`]:{paddingInlineEnd:St+Oe.fontSizeSM},[`${ht}-submenu-vertical`]:{position:"relative"},[`${ht}-submenu${ht}-submenu-disabled ${Mt}-menu-submenu-title`]:{[`&, ${Mt}-menu-submenu-arrow-icon`]:{color:Ue,backgroundColor:mt,cursor:"not-allowed"}},[`${ht}-submenu-selected ${Mt}-menu-submenu-title`]:{color:Oe.colorPrimary}})}},[(0,We.oN)(Oe,"slide-up"),(0,We.oN)(Oe,"slide-down"),(0,Be.Fm)(Oe,"move-up"),(0,Be.Fm)(Oe,"move-down"),(0,Je._y)(Oe,"zoom-big")]]};var at=(0,Te.Z)("Dropdown",(Oe,Mt)=>{let{rootPrefixCls:ht}=Mt;const{marginXXS:lt,sizePopupArrow:et,controlHeight:Ee,fontSize:yt,lineHeight:Vt,paddingXXS:qe,componentCls:ut,borderRadiusLG:Ce}=Oe,xe=(Ee-yt*Vt)/2,{dropdownArrowOffset:Ue}=(0,ve.fS)({contentRadius:Ce}),Ze=(0,_e.TS)(Oe,{menuCls:`${ut}-menu`,rootPrefixCls:ht,dropdownArrowDistance:et/2+lt,dropdownArrowOffset:Ue,dropdownPaddingVertical:xe,dropdownEdgeChildPadding:qe});return[De(Ze),me(Ze)]},Oe=>({zIndexPopup:Oe.zIndexPopupBase+50}))},32983:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return qe}});var fe=se(94184),We=se.n(fe),Be=se(67294),Je=se(53124),ve=se(10110),Te=se(84780),_e=se(29691),me=()=>{const[,ut]=(0,_e.Z)(),xe=new Te.C(ut.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Be.createElement("svg",{style:xe,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{fill:"none",fillRule:"evenodd"},Be.createElement("g",{transform:"translate(24 31.67)"},Be.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Be.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"}),Be.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)"}),Be.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"}),Be.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"})),Be.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"}),Be.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Be.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Be.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},at=()=>{const[,ut]=(0,_e.Z)(),{colorFill:Ce,colorFillTertiary:xe,colorFillQuaternary:Ue,colorBgContainer:Ze}=ut,{borderColor:St,shadowColor:mt,contentColor:Pt}=(0,Be.useMemo)(()=>({borderColor:new Te.C(Ce).onBackground(Ze).toHexShortString(),shadowColor:new Te.C(xe).onBackground(Ze).toHexShortString(),contentColor:new Te.C(Ue).onBackground(Ze).toHexShortString()}),[Ce,xe,Ue,Ze]);return Be.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Be.createElement("ellipse",{fill:mt,cx:"32",cy:"33",rx:"32",ry:"7"}),Be.createElement("g",{fillRule:"nonzero",stroke:St},Be.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"}),Be.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:Pt}))))},Oe=se(67968),Mt=se(45503);const ht=ut=>{const{componentCls:Ce,margin:xe,marginXS:Ue,marginXL:Ze,fontSize:St,lineHeight:mt}=ut;return{[Ce]:{marginInline:Ue,fontSize:St,lineHeight:mt,textAlign:"center",[`${Ce}-image`]:{height:ut.emptyImgHeight,marginBottom:Ue,opacity:ut.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ce}-description`]:{color:ut.colorText},[`${Ce}-footer`]:{marginTop:xe},"&-normal":{marginBlock:Ze,color:ut.colorTextDisabled,[`${Ce}-description`]:{color:ut.colorTextDisabled},[`${Ce}-image`]:{height:ut.emptyImgHeightMD}},"&-small":{marginBlock:Ue,color:ut.colorTextDisabled,[`${Ce}-image`]:{height:ut.emptyImgHeightSM}}}}};var lt=(0,Oe.Z)("Empty",ut=>{const{componentCls:Ce,controlHeightLG:xe}=ut,Ue=(0,Mt.TS)(ut,{emptyImgCls:`${Ce}-img`,emptyImgHeight:xe*2.5,emptyImgHeightMD:xe,emptyImgHeightSM:xe*.875});return[ht(Ue)]}),et=function(ut,Ce){var xe={};for(var Ue in ut)Object.prototype.hasOwnProperty.call(ut,Ue)&&Ce.indexOf(Ue)<0&&(xe[Ue]=ut[Ue]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,Ue=Object.getOwnPropertySymbols(ut);Ze<Ue.length;Ze++)Ce.indexOf(Ue[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ut,Ue[Ze])&&(xe[Ue[Ze]]=ut[Ue[Ze]]);return xe};const Ee=Be.createElement(me,null),yt=Be.createElement(at,null),Vt=ut=>{var{className:Ce,rootClassName:xe,prefixCls:Ue,image:Ze=Ee,description:St,children:mt,imageStyle:Pt,style:Qe}=ut,Ft=et(ut,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Dt,direction:an,empty:it}=Be.useContext(Je.E_),en=Dt("empty",Ue),[_n,yn]=lt(en),[Ve]=(0,ve.Z)("Empty"),Le=typeof St!="undefined"?St:Ve==null?void 0:Ve.description,Bt=typeof Le=="string"?Le:"empty";let Dn=null;return typeof Ze=="string"?Dn=Be.createElement("img",{alt:Bt,src:Ze}):Dn=Ze,_n(Be.createElement("div",Object.assign({className:We()(yn,en,it==null?void 0:it.className,{[`${en}-normal`]:Ze===yt,[`${en}-rtl`]:an==="rtl"},Ce,xe),style:Object.assign(Object.assign({},it==null?void 0:it.style),Qe)},Ft),Be.createElement("div",{className:`${en}-image`,style:Pt},Dn),Le&&Be.createElement("div",{className:`${en}-description`},Le),mt&&Be.createElement("div",{className:`${en}-footer`},mt)))};Vt.PRESENTED_IMAGE_DEFAULT=Ee,Vt.PRESENTED_IMAGE_SIMPLE=yt;var qe=Vt},22150:function(En,Yt,se){"use strict";se.d(Yt,{default:function(){return Wt}});var fe=se(74902),We=se(94184),Be=se.n(We),Je=se(38379),ve=se(67294),Te=se(33603),_e=se(65223);function we(He){const[pt,$t]=ve.useState(He);return ve.useEffect(()=>{const Ot=setTimeout(()=>{$t(He)},He.length?0:10);return()=>{clearTimeout(Ot)}},[He]),pt}var me=se(14747),De=se(50438),at=se(33507),Oe=se(45503),Mt=se(67968),lt=He=>{const{componentCls:pt}=He,$t=`${pt}-show-help`,Ot=`${pt}-show-help-item`;return{[$t]:{transition:`opacity ${He.motionDurationSlow} ${He.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Ot]:{overflow:"hidden",transition:`height ${He.motionDurationSlow} ${He.motionEaseInOut},
|
|
|
opacity ${He.motionDurationSlow} ${He.motionEaseInOut},
|
|
|
transform ${He.motionDurationSlow} ${He.motionEaseInOut} !important`,[`&${Ot}-appear, &${Ot}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Ot}-leave-active`]:{transform:"translateY(-5px)"}}}}};const et=He=>({legend:{display:"block",width:"100%",marginBottom:He.marginLG,padding:0,color:He.colorTextDescription,fontSize:He.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${He.lineWidth}px ${He.lineType} ${He.colorBorder}`},label:{fontSize:He.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 ${He.controlOutlineWidth}px ${He.controlOutline}`},output:{display:"block",paddingTop:15,color:He.colorText,fontSize:He.fontSize,lineHeight:He.lineHeight}}),Ee=(He,pt)=>{const{formItemCls:$t}=He;return{[$t]:{[`${$t}-label > label`]:{height:pt},[`${$t}-control-input`]:{minHeight:pt}}}},yt=He=>{const{componentCls:pt}=He;return{[He.componentCls]:Object.assign(Object.assign(Object.assign({},(0,me.Wf)(He)),et(He)),{[`${pt}-text`]:{display:"inline-block",paddingInlineEnd:He.paddingSM},"&-small":Object.assign({},Ee(He,He.controlHeightSM)),"&-large":Object.assign({},Ee(He,He.controlHeightLG))})}},Vt=He=>{const{formItemCls:pt,iconCls:$t,componentCls:Ot,rootPrefixCls:Jt,labelRequiredMarkColor:tn,labelColor:Un,labelFontSize:_r,labelHeight:nr,labelColonMarginInlineStart:er,labelColonMarginInlineEnd:ur,itemMarginBottom:dr}=He;return{[pt]:Object.assign(Object.assign({},(0,me.Wf)(He)),{marginBottom:dr,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${Jt}-row`]:{display:"none"},"&-has-warning":{[`${pt}-split`]:{color:He.colorError}},"&-has-error":{[`${pt}-split`]:{color:He.colorWarning}},[`${pt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${He.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:nr,color:Un,fontSize:_r,[`> ${$t}`]:{fontSize:He.fontSize,verticalAlign:"top"},[`&${pt}-required:not(${pt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:He.marginXXS,color:tn,fontSize:He.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Ot}-hide-required-mark &`]:{display:"none"}},[`${pt}-optional`]:{display:"inline-block",marginInlineStart:He.marginXXS,color:He.colorTextDescription,[`${Ot}-hide-required-mark &`]:{display:"none"}},[`${pt}-tooltip`]:{color:He.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:He.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:er,marginInlineEnd:ur},[`&${pt}-no-colon::after`]:{content:'"\\a0"'}}},[`${pt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Jt}-col-'"]):not([class*="' ${Jt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:He.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[pt]:{"&-explain, &-extra":{clear:"both",color:He.colorTextDescription,fontSize:He.fontSize,lineHeight:He.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:He.controlHeightSM,transition:`color ${He.motionDurationMid} ${He.motionEaseOut}`},"&-explain":{"&-error":{color:He.colorError},"&-warning":{color:He.colorWarning}}},[`&-with-help ${pt}-explain`]:{height:"auto",opacity:1},[`${pt}-feedback-icon`]:{fontSize:He.fontSize,textAlign:"center",visibility:"visible",animationName:De.kr,animationDuration:He.motionDurationMid,animationTimingFunction:He.motionEaseOutBack,pointerEvents:"none","&-success":{color:He.colorSuccess},"&-error":{color:He.colorError},"&-warning":{color:He.colorWarning},"&-validating":{color:He.colorPrimary}}})}},qe=He=>{const{componentCls:pt,formItemCls:$t}=He;return{[`${pt}-horizontal`]:{[`${$t}-label`]:{flexGrow:0},[`${$t}-control`]:{flex:"1 1 0",minWidth:0},[`${$t}-label[class$='-24'], ${$t}-label[class*='-24 ']`]:{[`& + ${$t}-control`]:{minWidth:"unset"}}}}},ut=He=>{const{componentCls:pt,formItemCls:$t}=He;return{[`${pt}-inline`]:{display:"flex",flexWrap:"wrap",[$t]:{flex:"none",marginInlineEnd:He.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${$t}-label,
|
|
|
> ${$t}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${$t}-label`]:{flex:"none"},[`${pt}-text`]:{display:"inline-block"},[`${$t}-has-feedback`]:{display:"inline-block"}}}}},Ce=He=>({padding:He.verticalLabelPadding,margin:He.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),xe=He=>{const{componentCls:pt,formItemCls:$t,rootPrefixCls:Ot}=He;return{[`${$t} ${$t}-label`]:Ce(He),[pt]:{[$t]:{flexWrap:"wrap",[`${$t}-label, ${$t}-control`]:{[`&:not([class*=" ${Ot}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ue=He=>{const{componentCls:pt,formItemCls:$t,rootPrefixCls:Ot}=He;return{[`${pt}-vertical`]:{[$t]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${pt}-item-control`]:{width:"100%"}}},[`${pt}-vertical ${$t}-label,
|
|
|
.${Ot}-col-24${$t}-label,
|
|
|
.${Ot}-col-xl-24${$t}-label`]:Ce(He),[`@media (max-width: ${He.screenXSMax}px)`]:[xe(He),{[pt]:{[`.${Ot}-col-xs-24${$t}-label`]:Ce(He)}}],[`@media (max-width: ${He.screenSMMax}px)`]:{[pt]:{[`.${Ot}-col-sm-24${$t}-label`]:Ce(He)}},[`@media (max-width: ${He.screenMDMax}px)`]:{[pt]:{[`.${Ot}-col-md-24${$t}-label`]:Ce(He)}},[`@media (max-width: ${He.screenLGMax}px)`]:{[pt]:{[`.${Ot}-col-lg-24${$t}-label`]:Ce(He)}}}},Ze=(He,pt)=>(0,Oe.TS)(He,{formItemCls:`${He.componentCls}-item`,rootPrefixCls:pt});var St=(0,Mt.Z)("Form",(He,pt)=>{let{rootPrefixCls:$t}=pt;const Ot=Ze(He,$t);return[yt(Ot),Vt(Ot),lt(Ot),qe(Ot),ut(Ot),Ue(Ot),(0,at.Z)(Ot),De.kr]},He=>({labelRequiredMarkColor:He.colorError,labelColor:He.colorTextHeading,labelFontSize:He.fontSize,labelHeight:He.controlHeight,labelColonMarginInlineStart:He.marginXXS/2,labelColonMarginInlineEnd:He.marginXS,itemMarginBottom:He.marginLG,verticalLabelPadding:`0 0 ${He.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const mt=[];function Pt(He,pt,$t){let Ot=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof He=="string"?He:`${pt}-${Ot}`,error:He,errorStatus:$t}}var Ft=He=>{let{help:pt,helpStatus:$t,errors:Ot=mt,warnings:Jt=mt,className:tn,fieldId:Un,onVisibleChanged:_r}=He;const{prefixCls:nr}=ve.useContext(_e.Rk),er=`${nr}-item-explain`,[,ur]=St(nr),dr=(0,ve.useMemo)(()=>(0,Te.Z)(nr),[nr]),gt=we(Ot),ot=we(Jt),Ct=ve.useMemo(()=>pt!=null?[Pt(pt,"help",$t)]:[].concat((0,fe.Z)(gt.map((Nn,cn)=>Pt(Nn,"error","error",cn))),(0,fe.Z)(ot.map((Nn,cn)=>Pt(Nn,"warning","warning",cn)))),[pt,$t,gt,ot]),ln={};return Un&&(ln.id=`${Un}_help`),ve.createElement(Je.default,{motionDeadline:dr.motionDeadline,motionName:`${nr}-show-help`,visible:!!Ct.length,onVisibleChanged:_r},Nn=>{const{className:cn,style:mn}=Nn;return ve.createElement("div",Object.assign({},ln,{className:Be()(er,cn,tn,ur),style:mn,role:"alert"}),ve.createElement(Je.CSSMotionList,Object.assign({keys:Ct},(0,Te.Z)(nr),{motionName:`${nr}-show-help-item`,component:!1}),gn=>{const{key:Fn,error:fr,errorStatus:Qt,className:Qr,style:Ur}=gn;return ve.createElement("div",{key:Fn,className:Be()(Qr,{[`${er}-${Qt}`]:Qt}),style:Ur},fr)}))})},Dt=se(46660),an=se(53124),it=se(98866),en=se(97647),_n=se(98675),yn=se(17423);const Ve=["parentNode"],Le="form_item";function Bt(He){return He===void 0||He===!1?[]:Array.isArray(He)?He:[He]}function Dn(He,pt){if(!He.length)return;const $t=He.join("_");return pt?`${pt}_${$t}`:Ve.includes($t)?`${Le}_${$t}`:$t}function dn(He,pt,$t,Ot,Jt,tn){let Un=Ot;return tn!==void 0?Un=tn:$t.validating?Un="validating":He.length?Un="error":pt.length?Un="warning":($t.touched||Jt&&$t.validated)&&(Un="success"),Un}function nt(He){return Bt(He).join("_")}function ft(He){const[pt]=(0,Dt.useForm)(),$t=ve.useRef({}),Ot=ve.useMemo(()=>He!=null?He:Object.assign(Object.assign({},pt),{__INTERNAL__:{itemRef:Jt=>tn=>{const Un=nt(Jt);tn?$t.current[Un]=tn:delete $t.current[Un]}},scrollToField:function(Jt){let tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Un=Bt(Jt),_r=Dn(Un,Ot.__INTERNAL__.name),nr=_r?document.getElementById(_r):null;nr&&(0,yn.Z)(nr,Object.assign({scrollMode:"if-needed",block:"nearest"},tn))},getFieldInstance:Jt=>{const tn=nt(Jt);return $t.current[tn]}}),[He,pt]);return[Ot]}var Xt=se(37920),Rn=function(He,pt){var $t={};for(var Ot in He)Object.prototype.hasOwnProperty.call(He,Ot)&&pt.indexOf(Ot)<0&&($t[Ot]=He[Ot]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,Ot=Object.getOwnPropertySymbols(He);Jt<Ot.length;Jt++)pt.indexOf(Ot[Jt])<0&&Object.prototype.propertyIsEnumerable.call(He,Ot[Jt])&&($t[Ot[Jt]]=He[Ot[Jt]]);return $t};const wn=(He,pt)=>{const $t=ve.useContext(it.Z),{getPrefixCls:Ot,direction:Jt,form:tn}=ve.useContext(an.E_),{prefixCls:Un,className:_r,rootClassName:nr,size:er,disabled:ur=$t,form:dr,colon:gt,labelAlign:ot,labelWrap:Ct,labelCol:ln,wrapperCol:Nn,hideRequiredMark:cn,layout:mn="horizontal",scrollToFirstError:gn,requiredMark:Fn,onFinishFailed:fr,name:Qt,style:Qr,feedbackIcons:Ur}=He,Bi=Rn(He,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ai=(0,_n.Z)(er),gi=ve.useContext(Xt.Z),qi=(0,ve.useMemo)(()=>Fn!==void 0?Fn:tn&&tn.requiredMark!==void 0?tn.requiredMark:!cn,[cn,Fn,tn]),xi=gt!=null?gt:tn==null?void 0:tn.colon,li=Ot("form",Un),[$i,Gi]=St(li),qr=Be()(li,`${li}-${mn}`,{[`${li}-hide-required-mark`]:qi===!1,[`${li}-rtl`]:Jt==="rtl",[`${li}-${Ai}`]:Ai},Gi,tn==null?void 0:tn.className,_r,nr),[vi]=ft(dr),{__INTERNAL__:Zi}=vi;Zi.name=Qt;const la=(0,ve.useMemo)(()=>({name:Qt,labelAlign:ot,labelCol:ln,labelWrap:Ct,wrapperCol:Nn,vertical:mn==="vertical",colon:xi,requiredMark:qi,itemRef:Zi.itemRef,form:vi,feedbackIcons:Ur}),[Qt,ot,ln,Nn,mn,xi,qi,vi,Ur]);ve.useImperativeHandle(pt,()=>vi);const ta=(Et,wt)=>{if(Et){let Gt={block:"nearest"};typeof Et=="object"&&(Gt=Et),vi.scrollToField(wt,Gt)}},ii=Et=>{if(fr==null||fr(Et),Et.errorFields.length){const wt=Et.errorFields[0].name;if(gn!==void 0){ta(gn,wt);return}tn&&tn.scrollToFirstError!==void 0&&ta(tn.scrollToFirstError,wt)}};return $i(ve.createElement(it.n,{disabled:ur},ve.createElement(en.q,{size:Ai},ve.createElement(_e.RV,Object.assign({},{validateMessages:gi}),ve.createElement(_e.q3.Provider,{value:la},ve.createElement(Dt.default,Object.assign({id:Qt},Bi,{name:Qt,onFinishFailed:ii,form:vi,style:Object.assign(Object.assign({},tn==null?void 0:tn.style),Qr),className:qr})))))))};var Ht=ve.forwardRef(wn),Tn=se(9475),xn=se(17799),ke=se(96159),ue=se(37419);function le(He){if(typeof He=="function")return He;const pt=(0,ue.Z)(He);return pt.length<=1?pt[0]:pt}const pe=()=>{const{status:He,errors:pt=[],warnings:$t=[]}=(0,ve.useContext)(_e.aM);return{status:He,errors:pt,warnings:$t}};pe.Context=_e.aM;var he=pe,oe=se(96523);function Ae(He){const[pt,$t]=ve.useState(He),Ot=(0,ve.useRef)(null),Jt=(0,ve.useRef)([]),tn=(0,ve.useRef)(!1);ve.useEffect(()=>(tn.current=!1,()=>{tn.current=!0,oe.Z.cancel(Ot.current),Ot.current=null}),[]);function Un(_r){tn.current||(Ot.current===null&&(Jt.current=[],Ot.current=(0,oe.Z)(()=>{Ot.current=null,$t(nr=>{let er=nr;return Jt.current.forEach(ur=>{er=ur(er)}),er})})),Jt.current.push(_r))}return[pt,Un]}function Ge(){const{itemRef:He}=ve.useContext(_e.q3),pt=ve.useRef({});function $t(Ot,Jt){const tn=Jt&&typeof Jt=="object"&&Jt.ref,Un=Ot.join("_");return(pt.current.name!==Un||pt.current.originRef!==tn)&&(pt.current.name=Un,pt.current.originRef=tn,pt.current.ref=(0,xn.sQ)(He(Ot),tn)),pt.current.ref}return $t}var _t=se(48130),Rt=se(14075),zt=se(10366),qt=se(92820),jt=se(21584);const ar=He=>{const{formItemCls:pt}=He;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${pt}-control`]:{display:"flex"}}}};var xr=(0,Mt.b)(["Form","item-item"],(He,pt)=>{let{rootPrefixCls:$t}=pt;const Ot=Ze(He,$t);return[ar(Ot)]}),pn=He=>{const{prefixCls:pt,status:$t,wrapperCol:Ot,children:Jt,errors:tn,warnings:Un,_internalItemRender:_r,extra:nr,help:er,fieldId:ur,marginBottom:dr,onErrorVisibleChanged:gt}=He,ot=`${pt}-item`,Ct=ve.useContext(_e.q3),ln=Ot||Ct.wrapperCol||{},Nn=Be()(`${ot}-control`,ln.className),cn=ve.useMemo(()=>Object.assign({},Ct),[Ct]);delete cn.labelCol,delete cn.wrapperCol;const mn=ve.createElement("div",{className:`${ot}-control-input`},ve.createElement("div",{className:`${ot}-control-input-content`},Jt)),gn=ve.useMemo(()=>({prefixCls:pt,status:$t}),[pt,$t]),Fn=dr!==null||tn.length||Un.length?ve.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ve.createElement(_e.Rk.Provider,{value:gn},ve.createElement(Ft,{fieldId:ur,errors:tn,warnings:Un,help:er,helpStatus:$t,className:`${ot}-explain-connected`,onVisibleChanged:gt})),!!dr&&ve.createElement("div",{style:{width:0,height:dr}})):null,fr={};ur&&(fr.id=`${ur}_extra`);const Qt=nr?ve.createElement("div",Object.assign({},fr,{className:`${ot}-extra`}),nr):null,Qr=_r&&_r.mark==="pro_table_render"&&_r.render?_r.render(He,{input:mn,errorList:Fn,extra:Qt}):ve.createElement(ve.Fragment,null,mn,Fn,Qt);return ve.createElement(_e.q3.Provider,{value:cn},ve.createElement(jt.Z,Object.assign({},ln,{className:Nn}),Qr),ve.createElement(xr,{prefixCls:pt}))},cr=se(17663),Rr=se(24457),rt=se(10110),Kt=se(83062),Bn=function(He,pt){var $t={};for(var Ot in He)Object.prototype.hasOwnProperty.call(He,Ot)&&pt.indexOf(Ot)<0&&($t[Ot]=He[Ot]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,Ot=Object.getOwnPropertySymbols(He);Jt<Ot.length;Jt++)pt.indexOf(Ot[Jt])<0&&Object.prototype.propertyIsEnumerable.call(He,Ot[Jt])&&($t[Ot[Jt]]=He[Ot[Jt]]);return $t};function Gn(He){return He?typeof He=="object"&&!ve.isValidElement(He)?He:{title:He}:null}var Sr=He=>{let{prefixCls:pt,label:$t,htmlFor:Ot,labelCol:Jt,labelAlign:tn,colon:Un,required:_r,requiredMark:nr,tooltip:er}=He;var ur;const[dr]=(0,rt.Z)("Form"),{vertical:gt,labelAlign:ot,labelCol:Ct,labelWrap:ln,colon:Nn}=ve.useContext(_e.q3);if(!$t)return null;const cn=Jt||Ct||{},mn=tn||ot,gn=`${pt}-item-label`,Fn=Be()(gn,mn==="left"&&`${gn}-left`,cn.className,{[`${gn}-wrap`]:!!ln});let fr=$t;const Qt=Un===!0||Nn!==!1&&Un!==!1;Qt&&!gt&&typeof $t=="string"&&$t.trim()!==""&&(fr=$t.replace(/[:|:]\s*$/,""));const Ur=Gn(er);if(Ur){const{icon:qi=ve.createElement(cr.Z,null)}=Ur,xi=Bn(Ur,["icon"]),li=ve.createElement(Kt.Z,Object.assign({},xi),ve.cloneElement(qi,{className:`${pt}-item-tooltip`,title:""}));fr=ve.createElement(ve.Fragment,null,fr,li)}const Bi=nr==="optional",Ai=typeof nr=="function";Ai?fr=nr(fr,{required:!!_r}):Bi&&!_r&&(fr=ve.createElement(ve.Fragment,null,fr,ve.createElement("span",{className:`${pt}-item-optional`,title:""},(dr==null?void 0:dr.optional)||((ur=Rr.Z.Form)===null||ur===void 0?void 0:ur.optional))));const gi=Be()({[`${pt}-item-required`]:_r,[`${pt}-item-required-mark-optional`]:Bi||Ai,[`${pt}-item-no-colon`]:!Qt});return ve.createElement(jt.Z,Object.assign({},cn,{className:Fn}),ve.createElement("label",{htmlFor:Ot,className:gi,title:typeof $t=="string"?$t:""},fr))},Ar=se(87725),Mr=se(16646),Pr=se(87995),Vr=se(3407);const lr={success:Ar.Z,warning:Pr.Z,error:Mr.Z,validating:Vr.Z};function si(He){let{children:pt,errors:$t,warnings:Ot,hasFeedback:Jt,validateStatus:tn,prefixCls:Un,meta:_r,noStyle:nr}=He;const er=`${Un}-item`,{feedbackIcons:ur}=ve.useContext(_e.q3),dr=dn($t,Ot,_r,null,!!Jt,tn),{isFormItemInput:gt,status:ot}=ve.useContext(_e.aM),Ct=ve.useMemo(()=>{var ln;let Nn;if(Jt){const gn=Jt!==!0&&Jt.icons||ur,Fn=dr&&((ln=gn==null?void 0:gn({status:dr,errors:$t,warnings:Ot}))===null||ln===void 0?void 0:ln[dr]),fr=dr&&lr[dr];Nn=Fn!==!1&&fr?ve.createElement("span",{className:Be()(`${er}-feedback-icon`,`${er}-feedback-icon-${dr}`)},Fn||ve.createElement(fr,null)):null}let cn=!0,mn=dr||"";return nr&&(cn=gt,mn=(dr!=null?dr:ot)||""),{status:mn,errors:$t,warnings:Ot,hasFeedback:!!Jt,feedbackIcon:Nn,isFormItemInput:cn}},[dr,Jt,nr,gt,ot]);return ve.createElement(_e.aM.Provider,{value:Ct},pt)}var Li=function(He,pt){var $t={};for(var Ot in He)Object.prototype.hasOwnProperty.call(He,Ot)&&pt.indexOf(Ot)<0&&($t[Ot]=He[Ot]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,Ot=Object.getOwnPropertySymbols(He);Jt<Ot.length;Jt++)pt.indexOf(Ot[Jt])<0&&Object.prototype.propertyIsEnumerable.call(He,Ot[Jt])&&($t[Ot[Jt]]=He[Ot[Jt]]);return $t};function Ni(He){const{prefixCls:pt,className:$t,rootClassName:Ot,style:Jt,help:tn,errors:Un,warnings:_r,validateStatus:nr,meta:er,hasFeedback:ur,hidden:dr,children:gt,fieldId:ot,required:Ct,isRequired:ln,onSubItemMetaChange:Nn}=He,cn=Li(He,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),mn=`${pt}-item`,{requiredMark:gn}=ve.useContext(_e.q3),Fn=ve.useRef(null),fr=we(Un),Qt=we(_r),Qr=tn!=null,Ur=!!(Qr||Un.length||_r.length),Bi=!!Fn.current&&(0,_t.Z)(Fn.current),[Ai,gi]=ve.useState(null);(0,Rt.Z)(()=>{if(Ur&&Fn.current){const Gi=getComputedStyle(Fn.current);gi(parseInt(Gi.marginBottom,10))}},[Ur,Bi]);const qi=Gi=>{Gi||gi(null)},li=function(){let Gi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const qr=Gi?fr:er.errors,vi=Gi?Qt:er.warnings;return dn(qr,vi,er,"",!!ur,nr)}(),$i=Be()(mn,$t,Ot,{[`${mn}-with-help`]:Qr||fr.length||Qt.length,[`${mn}-has-feedback`]:li&&ur,[`${mn}-has-success`]:li==="success",[`${mn}-has-warning`]:li==="warning",[`${mn}-has-error`]:li==="error",[`${mn}-is-validating`]:li==="validating",[`${mn}-hidden`]:dr});return ve.createElement("div",{className:$i,style:Jt,ref:Fn},ve.createElement(qt.Z,Object.assign({className:`${mn}-row`},(0,zt.Z)(cn,["_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"])),ve.createElement(Sr,Object.assign({htmlFor:ot},He,{requiredMark:gn,required:Ct!=null?Ct:ln,prefixCls:pt})),ve.createElement(pn,Object.assign({},He,er,{errors:fr,warnings:Qt,prefixCls:pt,status:li,help:tn,marginBottom:Ai,onErrorVisibleChanged:qi}),ve.createElement(_e.qI.Provider,{value:Nn},ve.createElement(si,{prefixCls:pt,meta:er,errors:er.errors,warnings:er.warnings,hasFeedback:ur,validateStatus:li},gt)))),!!Ai&&ve.createElement("div",{className:`${mn}-margin-offset`,style:{marginBottom:-Ai}}))}const Hi="__SPLIT__",ri=null,vt=ve.memo(He=>{let{children:pt}=He;return pt},(He,pt)=>He.value===pt.value&&He.update===pt.update&&He.childProps.length===pt.childProps.length&&He.childProps.every(($t,Ot)=>$t===pt.childProps[Ot]));function Sn(He){return He!=null}function kn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function In(He){const{name:pt,noStyle:$t,className:Ot,dependencies:Jt,prefixCls:tn,shouldUpdate:Un,rules:_r,children:nr,required:er,label:ur,messageVariables:dr,trigger:gt="onChange",validateTrigger:ot,hidden:Ct,help:ln}=He,{getPrefixCls:Nn}=ve.useContext(an.E_),{name:cn}=ve.useContext(_e.q3),mn=le(nr),gn=typeof mn=="function",Fn=ve.useContext(_e.qI),{validateTrigger:fr}=ve.useContext(Dt.FieldContext),Qt=ot!==void 0?ot:fr,Qr=Sn(pt),Ur=Nn("form",tn),[Bi,Ai]=St(Ur),gi=ve.useContext(Dt.ListContext),qi=ve.useRef(),[xi,li]=Ae({}),[$i,Gi]=(0,Tn.Z)(()=>kn()),qr=wt=>{const Gt=gi==null?void 0:gi.getKey(wt.name);if(Gi(wt.destroy?kn():wt,!0),$t&&ln!==!1&&Fn){let fn=wt.name;if(wt.destroy)fn=qi.current||fn;else if(Gt!==void 0){const[On,gr]=Gt;fn=[On].concat((0,fe.Z)(gr)),qi.current=fn}Fn(wt,fn)}},vi=(wt,Gt)=>{li(fn=>{const On=Object.assign({},fn),Tr=[].concat((0,fe.Z)(wt.name.slice(0,-1)),(0,fe.Z)(Gt)).join(Hi);return wt.destroy?delete On[Tr]:On[Tr]=wt,On})},[Zi,la]=ve.useMemo(()=>{const wt=(0,fe.Z)($i.errors),Gt=(0,fe.Z)($i.warnings);return Object.values(xi).forEach(fn=>{wt.push.apply(wt,(0,fe.Z)(fn.errors||[])),Gt.push.apply(Gt,(0,fe.Z)(fn.warnings||[]))}),[wt,Gt]},[xi,$i.errors,$i.warnings]),ta=Ge();function ii(wt,Gt,fn){return $t&&!Ct?ve.createElement(si,{prefixCls:Ur,hasFeedback:He.hasFeedback,validateStatus:He.validateStatus,meta:$i,errors:Zi,warnings:la,noStyle:!0},wt):ve.createElement(Ni,Object.assign({key:"row"},He,{className:Be()(Ot,Ai),prefixCls:Ur,fieldId:Gt,isRequired:fn,errors:Zi,warnings:la,meta:$i,onSubItemMetaChange:vi}),wt)}if(!Qr&&!gn&&!Jt)return Bi(ii(mn));let Et={};return typeof ur=="string"?Et.label=ur:pt&&(Et.label=String(pt)),dr&&(Et=Object.assign(Object.assign({},Et),dr)),Bi(ve.createElement(Dt.Field,Object.assign({},He,{messageVariables:Et,trigger:gt,validateTrigger:Qt,onMetaChange:qr}),(wt,Gt,fn)=>{const On=Bt(pt).length&&Gt?Gt.name:[],gr=Dn(On,cn),Tr=er!==void 0?er:!!(_r&&_r.some(Hr=>{if(Hr&&typeof Hr=="object"&&Hr.required&&!Hr.warningOnly)return!0;if(typeof Hr=="function"){const ni=Hr(fn);return ni&&ni.required&&!ni.warningOnly}return!1})),Wr=Object.assign({},wt);let Gr=null;if(Array.isArray(mn)&&Qr)Gr=mn;else if(!(gn&&(!(Un||Jt)||Qr))){if(!(Jt&&!gn&&!Qr))if((0,ke.l$)(mn)){const Hr=Object.assign(Object.assign({},mn.props),Wr);if(Hr.id||(Hr.id=gr),ln||Zi.length>0||la.length>0||He.extra){const Lr=[];(ln||Zi.length>0)&&Lr.push(`${gr}_help`),He.extra&&Lr.push(`${gr}_extra`),Hr["aria-describedby"]=Lr.join(" ")}Zi.length>0&&(Hr["aria-invalid"]="true"),Tr&&(Hr["aria-required"]="true"),(0,xn.Yr)(mn)&&(Hr.ref=ta(On,mn)),new Set([].concat((0,fe.Z)(Bt(gt)),(0,fe.Z)(Bt(Qt)))).forEach(Lr=>{Hr[Lr]=function(){for(var pi,Ti,Mi,Ie,Fe,ze=arguments.length,je=new Array(ze),tt=0;tt<ze;tt++)je[tt]=arguments[tt];(Mi=Wr[Lr])===null||Mi===void 0||(pi=Mi).call.apply(pi,[Wr].concat(je)),(Fe=(Ie=mn.props)[Lr])===null||Fe===void 0||(Ti=Fe).call.apply(Ti,[Ie].concat(je))}});const yi=[Hr["aria-required"],Hr["aria-invalid"],Hr["aria-describedby"]];Gr=ve.createElement(vt,{value:Wr[He.valuePropName||"value"],update:mn,childProps:yi},(0,ke.Tm)(mn,Hr))}else gn&&(Un||Jt)&&!Qr?Gr=mn(fn):Gr=mn}return ii(Gr,gr,Tr)}))}const sr=In;sr.useStatus=he;var qn=sr,hr=function(He,pt){var $t={};for(var Ot in He)Object.prototype.hasOwnProperty.call(He,Ot)&&pt.indexOf(Ot)<0&&($t[Ot]=He[Ot]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,Ot=Object.getOwnPropertySymbols(He);Jt<Ot.length;Jt++)pt.indexOf(Ot[Jt])<0&&Object.prototype.propertyIsEnumerable.call(He,Ot[Jt])&&($t[Ot[Jt]]=He[Ot[Jt]]);return $t},Xe=He=>{var{prefixCls:pt,children:$t}=He,Ot=hr(He,["prefixCls","children"]);const{getPrefixCls:Jt}=ve.useContext(an.E_),tn=Jt("form",pt),Un=ve.useMemo(()=>({prefixCls:tn,status:"error"}),[tn]);return ve.createElement(Dt.List,Object.assign({},Ot),(_r,nr,er)=>ve.createElement(_e.Rk.Provider,{value:Un},$t(_r.map(ur=>Object.assign(Object.assign({},ur),{fieldKey:ur.key})),nr,{errors:er.errors,warnings:er.warnings})))};function ct(){const{form:He}=(0,ve.useContext)(_e.q3);return He}const Tt=Ht;Tt.Item=qn,Tt.List=Xe,Tt.ErrorList=Ft,Tt.useForm=ft,Tt.useFormInstance=ct,Tt.useWatch=Dt.useWatch,Tt.Provider=_e.RV,Tt.create=()=>{};var Wt=Tt},31795:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return $n}});var fe=se(42922),We=se(53978),Be=se(94184),Je=se.n(Be),ve=se(87462),Te=se(4942),_e=se(71002),we=se(97685),me=se(45987),De=se(15671),at=se(43144);function Oe(){return typeof BigInt=="function"}function Mt(Xe){return!Xe&&Xe!==0&&!Number.isNaN(Xe)||!String(Xe).trim()}function ht(Xe){var ct=Xe.trim(),Tt=ct.startsWith("-");Tt&&(ct=ct.slice(1)),ct=ct.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ct.startsWith(".")&&(ct="0".concat(ct));var Wt=ct||"0",He=Wt.split("."),pt=He[0]||"0",$t=He[1]||"0";pt==="0"&&$t==="0"&&(Tt=!1);var Ot=Tt?"-":"";return{negative:Tt,negativeStr:Ot,trimStr:Wt,integerStr:pt,decimalStr:$t,fullStr:"".concat(Ot).concat(Wt)}}function lt(Xe){var ct=String(Xe);return!Number.isNaN(Number(ct))&&ct.includes("e")}function et(Xe){var ct=String(Xe);if(lt(Xe)){var Tt=Number(ct.slice(ct.indexOf("e-")+2)),Wt=ct.match(/\.(\d+)/);return Wt!=null&&Wt[1]&&(Tt+=Wt[1].length),Tt}return ct.includes(".")&&yt(ct)?ct.length-ct.indexOf(".")-1:0}function Ee(Xe){var ct=String(Xe);if(lt(Xe)){if(Xe>Number.MAX_SAFE_INTEGER)return String(Oe()?BigInt(Xe).toString():Number.MAX_SAFE_INTEGER);if(Xe<Number.MIN_SAFE_INTEGER)return String(Oe()?BigInt(Xe).toString():Number.MIN_SAFE_INTEGER);ct=Xe.toFixed(et(ct))}return ht(ct).fullStr}function yt(Xe){return typeof Xe=="number"?!Number.isNaN(Xe):Xe?/^\s*-?\d+(\.\d+)?\s*$/.test(Xe)||/^\s*-?\d+\.\s*$/.test(Xe)||/^\s*-?\.\d+\s*$/.test(Xe):!1}var Vt=function(){function Xe(ct){if((0,De.Z)(this,Xe),(0,Te.Z)(this,"origin",""),(0,Te.Z)(this,"negative",void 0),(0,Te.Z)(this,"integer",void 0),(0,Te.Z)(this,"decimal",void 0),(0,Te.Z)(this,"decimalLen",void 0),(0,Te.Z)(this,"empty",void 0),(0,Te.Z)(this,"nan",void 0),Mt(ct)){this.empty=!0;return}if(this.origin=String(ct),ct==="-"||Number.isNaN(ct)){this.nan=!0;return}var Tt=ct;if(lt(Tt)&&(Tt=Number(Tt)),Tt=typeof Tt=="string"?Tt:Ee(Tt),yt(Tt)){var Wt=ht(Tt);this.negative=Wt.negative;var He=Wt.trimStr.split(".");this.integer=BigInt(He[0]);var pt=He[1]||"0";this.decimal=BigInt(pt),this.decimalLen=pt.length}else this.nan=!0}return(0,at.Z)(Xe,[{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(Tt){var Wt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Tt,"0"));return BigInt(Wt)}},{key:"negate",value:function(){var Tt=new Xe(this.toString());return Tt.negative=!Tt.negative,Tt}},{key:"cal",value:function(Tt,Wt,He){var pt=Math.max(this.getDecimalStr().length,Tt.getDecimalStr().length),$t=this.alignDecimal(pt),Ot=Tt.alignDecimal(pt),Jt=Wt($t,Ot).toString(),tn=He(pt),Un=ht(Jt),_r=Un.negativeStr,nr=Un.trimStr,er="".concat(_r).concat(nr.padStart(tn+1,"0"));return new Xe("".concat(er.slice(0,-tn),".").concat(er.slice(-tn)))}},{key:"add",value:function(Tt){if(this.isInvalidate())return new Xe(Tt);var Wt=new Xe(Tt);return Wt.isInvalidate()?this:this.cal(Wt,function(He,pt){return He+pt},function(He){return He})}},{key:"multi",value:function(Tt){var Wt=new Xe(Tt);return this.isInvalidate()||Wt.isInvalidate()?new Xe(NaN):this.cal(Wt,function(He,pt){return He*pt},function(He){return He*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(Tt){return this.toString()===(Tt==null?void 0:Tt.toString())}},{key:"lessEquals",value:function(Tt){return this.add(Tt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Tt?this.isInvalidate()?"":ht("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Xe}(),qe=function(){function Xe(ct){if((0,De.Z)(this,Xe),(0,Te.Z)(this,"origin",""),(0,Te.Z)(this,"number",void 0),(0,Te.Z)(this,"empty",void 0),Mt(ct)){this.empty=!0;return}this.origin=String(ct),this.number=Number(ct)}return(0,at.Z)(Xe,[{key:"negate",value:function(){return new Xe(-this.toNumber())}},{key:"add",value:function(Tt){if(this.isInvalidate())return new Xe(Tt);var Wt=Number(Tt);if(Number.isNaN(Wt))return this;var He=this.number+Wt;if(He>Number.MAX_SAFE_INTEGER)return new Xe(Number.MAX_SAFE_INTEGER);if(He<Number.MIN_SAFE_INTEGER)return new Xe(Number.MIN_SAFE_INTEGER);var pt=Math.max(et(this.number),et(Wt));return new Xe(He.toFixed(pt))}},{key:"multi",value:function(Tt){var Wt=Number(Tt);if(this.isInvalidate()||Number.isNaN(Wt))return new Xe(NaN);var He=this.number*Wt;if(He>Number.MAX_SAFE_INTEGER)return new Xe(Number.MAX_SAFE_INTEGER);if(He<Number.MIN_SAFE_INTEGER)return new Xe(Number.MIN_SAFE_INTEGER);var pt=Math.max(et(this.number),et(Wt));return new Xe(He.toFixed(pt))}},{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(Tt){return this.toNumber()===(Tt==null?void 0:Tt.toNumber())}},{key:"lessEquals",value:function(Tt){return this.add(Tt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Tt?this.isInvalidate()?"":Ee(this.number):this.origin}}]),Xe}();function ut(Xe){return Oe()?new Vt(Xe):new qe(Xe)}function Ce(Xe,ct,Tt){var Wt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Xe==="")return"";var He=ht(Xe),pt=He.negativeStr,$t=He.integerStr,Ot=He.decimalStr,Jt="".concat(ct).concat(Ot),tn="".concat(pt).concat($t);if(Tt>=0){var Un=Number(Ot[Tt]);if(Un>=5&&!Wt){var _r=ut(Xe).add("".concat(pt,"0.").concat("0".repeat(Tt)).concat(10-Un));return Ce(_r.toString(),ct,Tt,Wt)}return Tt===0?tn:"".concat(tn).concat(ct).concat(Ot.padEnd(Tt,"0").slice(0,Tt))}return Jt===".0"?tn:"".concat(tn).concat(Jt)}var xe=ut,Ue=se(67656),Ze=se(67294);function St(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var mt=St()?Ze.useLayoutEffect:Ze.useEffect,Pt=function(ct,Tt){var Wt=Ze.useRef(!0);mt(function(){return ct(Wt.current)},Tt),mt(function(){return Wt.current=!1,function(){Wt.current=!0}},[])},Qe=function(ct,Tt){Pt(function(Wt){if(!Wt)return ct()},Tt)},Ft=Pt,Dt=se(27183);function an(Xe,ct,Tt){var Wt=React.useRef({});return(!("value"in Wt.current)||Tt(Wt.current.condition,ct))&&(Wt.current.value=Xe(),Wt.current.condition=ct),Wt.current.value}function it(Xe,ct){typeof Xe=="function"?Xe(ct):(0,_e.Z)(Xe)==="object"&&Xe&&"current"in Xe&&(Xe.current=ct)}function en(){for(var Xe=arguments.length,ct=new Array(Xe),Tt=0;Tt<Xe;Tt++)ct[Tt]=arguments[Tt];var Wt=ct.filter(function(He){return He});return Wt.length<=1?Wt[0]:function(He){ct.forEach(function(pt){it(pt,He)})}}function _n(){for(var Xe=arguments.length,ct=new Array(Xe),Tt=0;Tt<Xe;Tt++)ct[Tt]=arguments[Tt];return useMemo(function(){return en.apply(void 0,ct)},ct,function(Wt,He){return Wt.length!==He.length||Wt.every(function(pt,$t){return pt!==He[$t]})})}function yn(Xe){var ct,Tt,Wt=isMemo(Xe)?Xe.type.type:Xe.type;return!(typeof Wt=="function"&&!((ct=Wt.prototype)!==null&&ct!==void 0&&ct.render)||typeof Xe=="function"&&!((Tt=Xe.prototype)!==null&&Tt!==void 0&&Tt.render))}function Ve(Xe){return!isValidElement(Xe)||isFragment(Xe)?!1:yn(Xe)}var Le={},Bt=[],Dn=function(ct){Bt.push(ct)};function dn(Xe,ct){if(0)var Tt}function nt(Xe,ct){if(0)var Tt}function ft(){Le={}}function Xt(Xe,ct,Tt){!ct&&!Le[Tt]&&(Xe(!1,Tt),Le[Tt]=!0)}function Rn(Xe,ct){Xt(dn,Xe,ct)}function wn(Xe,ct){Xt(nt,Xe,ct)}Rn.preMessage=Dn,Rn.resetWarned=ft,Rn.noteOnce=wn;var Zt=Rn;function Ht(Xe,ct){var Tt=(0,Ze.useRef)(null);function Wt(){try{var pt=Xe.selectionStart,$t=Xe.selectionEnd,Ot=Xe.value,Jt=Ot.substring(0,pt),tn=Ot.substring($t);Tt.current={start:pt,end:$t,value:Ot,beforeTxt:Jt,afterTxt:tn}}catch(Un){}}function He(){if(Xe&&Tt.current&&ct)try{var pt=Xe.value,$t=Tt.current,Ot=$t.beforeTxt,Jt=$t.afterTxt,tn=$t.start,Un=pt.length;if(pt.endsWith(Jt))Un=pt.length-Tt.current.afterTxt.length;else if(pt.startsWith(Ot))Un=Ot.length;else{var _r=Ot[tn-1],nr=pt.indexOf(_r,tn-1);nr!==-1&&(Un=nr+1)}Xe.setSelectionRange(Un,Un)}catch(er){Zt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(er.message))}}return[Wt,He]}var Tn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Xe=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Xe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Xe==null?void 0:Xe.substr(0,4))},xn=function(){var ct=(0,Ze.useState)(!1),Tt=(0,we.Z)(ct,2),Wt=Tt[0],He=Tt[1];return Ft(function(){He(Tn())},[]),Wt},ke=xn,ue=function(ct){return+setTimeout(ct,16)},le=function(ct){return clearTimeout(ct)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ue=function(ct){return window.requestAnimationFrame(ct)},le=function(ct){return window.cancelAnimationFrame(ct)});var pe=0,he=new Map;function oe(Xe){he.delete(Xe)}var Ae=function(ct){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;pe+=1;var Wt=pe;function He(pt){if(pt===0)oe(Wt),ct();else{var $t=ue(function(){He(pt-1)});he.set(Wt,$t)}}return He(Tt),Wt};Ae.cancel=function(Xe){var ct=he.get(Xe);return oe(ct),le(ct)};var Ge=Ae,_t=200,Rt=600;function zt(Xe){var ct=Xe.prefixCls,Tt=Xe.upNode,Wt=Xe.downNode,He=Xe.upDisabled,pt=Xe.downDisabled,$t=Xe.onStep,Ot=Ze.useRef(),Jt=Ze.useRef([]),tn=Ze.useRef();tn.current=$t;var Un=function(){clearTimeout(Ot.current)},_r=function(ln,Nn){ln.preventDefault(),Un(),tn.current(Nn);function cn(){tn.current(Nn),Ot.current=setTimeout(cn,_t)}Ot.current=setTimeout(cn,Rt)};Ze.useEffect(function(){return function(){Un(),Jt.current.forEach(function(Ct){return Ge.cancel(Ct)})}},[]);var nr=ke();if(nr)return null;var er="".concat(ct,"-handler"),ur=Je()(er,"".concat(er,"-up"),(0,Te.Z)({},"".concat(er,"-up-disabled"),He)),dr=Je()(er,"".concat(er,"-down"),(0,Te.Z)({},"".concat(er,"-down-disabled"),pt)),gt=function(){return Jt.current.push(Ge(Un))},ot={unselectable:"on",role:"button",onMouseUp:gt,onMouseLeave:gt};return Ze.createElement("div",{className:"".concat(er,"-wrap")},Ze.createElement("span",(0,ve.Z)({},ot,{onMouseDown:function(ln){_r(ln,!0)},"aria-label":"Increase Value","aria-disabled":He,className:ur}),Tt||Ze.createElement("span",{unselectable:"on",className:"".concat(ct,"-handler-up-inner")})),Ze.createElement("span",(0,ve.Z)({},ot,{onMouseDown:function(ln){_r(ln,!1)},"aria-label":"Decrease Value","aria-disabled":pt,className:dr}),Wt||Ze.createElement("span",{unselectable:"on",className:"".concat(ct,"-handler-down-inner")})))}function qt(Xe){var ct=typeof Xe=="number"?Ee(Xe):ht(Xe).fullStr,Tt=ct.includes(".");return Tt?ht(ct.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Xe+"0"}var jt=se(87887),ar=function(){var Xe=(0,Ze.useRef)(0),ct=function(){Ge.cancel(Xe.current)};return(0,Ze.useEffect)(function(){return ct},[]),function(Tt){ct(),Xe.current=Ge(function(){Tt()})}},xr=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Nt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],pn=function(ct,Tt){return ct||Tt.isEmpty()?Tt.toString():Tt.toNumber()},cr=function(ct){var Tt=xe(ct);return Tt.isInvalidate()?null:Tt},Rr=Ze.forwardRef(function(Xe,ct){var Tt,Wt=Xe.prefixCls,He=Wt===void 0?"rc-input-number":Wt,pt=Xe.className,$t=Xe.style,Ot=Xe.min,Jt=Xe.max,tn=Xe.step,Un=tn===void 0?1:tn,_r=Xe.defaultValue,nr=Xe.value,er=Xe.disabled,ur=Xe.readOnly,dr=Xe.upHandler,gt=Xe.downHandler,ot=Xe.keyboard,Ct=Xe.controls,ln=Ct===void 0?!0:Ct,Nn=Xe.classNames,cn=Xe.stringMode,mn=Xe.parser,gn=Xe.formatter,Fn=Xe.precision,fr=Xe.decimalSeparator,Qt=Xe.onChange,Qr=Xe.onInput,Ur=Xe.onPressEnter,Bi=Xe.onStep,Ai=(0,me.Z)(Xe,xr),gi="".concat(He,"-input"),qi=Ze.useRef(null),xi=Ze.useState(!1),li=(0,we.Z)(xi,2),$i=li[0],Gi=li[1],qr=Ze.useRef(!1),vi=Ze.useRef(!1),Zi=Ze.useRef(!1),la=Ze.useState(function(){return xe(nr!=null?nr:_r)}),ta=(0,we.Z)(la,2),ii=ta[0],Et=ta[1];function wt(Yn){nr===void 0&&Et(Yn)}var Gt=Ze.useCallback(function(Yn,Xn){if(!Xn)return Fn>=0?Fn:Math.max(et(Yn),et(Un))},[Fn,Un]),fn=Ze.useCallback(function(Yn){var Xn=String(Yn);if(mn)return mn(Xn);var rr=Xn;return fr&&(rr=rr.replace(fr,".")),rr.replace(/[^\w.-]+/g,"")},[mn,fr]),On=Ze.useRef(""),gr=Ze.useCallback(function(Yn,Xn){if(gn)return gn(Yn,{userTyping:Xn,input:String(On.current)});var rr=typeof Yn=="number"?Ee(Yn):Yn;if(!Xn){var ir=Gt(rr,Xn);if(yt(rr)&&(fr||ir>=0)){var br=fr||".";rr=Ce(rr,br,ir)}}return rr},[gn,Gt,fr]),Tr=Ze.useState(function(){var Yn=_r!=null?_r:nr;return ii.isInvalidate()&&["string","number"].includes((0,_e.Z)(Yn))?Number.isNaN(Yn)?"":Yn:gr(ii.toString(),!1)}),Wr=(0,we.Z)(Tr,2),Gr=Wr[0],Hr=Wr[1];On.current=Gr;function ni(Yn,Xn){Hr(gr(Yn.isInvalidate()?Yn.toString(!1):Yn.toString(!Xn),Xn))}var yi=Ze.useMemo(function(){return cr(Jt)},[Jt,Fn]),Lr=Ze.useMemo(function(){return cr(Ot)},[Ot,Fn]),pi=Ze.useMemo(function(){return!yi||!ii||ii.isInvalidate()?!1:yi.lessEquals(ii)},[yi,ii]),Ti=Ze.useMemo(function(){return!Lr||!ii||ii.isInvalidate()?!1:ii.lessEquals(Lr)},[Lr,ii]),Mi=Ht(qi.current,$i),Ie=(0,we.Z)(Mi,2),Fe=Ie[0],ze=Ie[1],je=function(Xn){return yi&&!Xn.lessEquals(yi)?yi:Lr&&!Lr.lessEquals(Xn)?Lr:null},tt=function(Xn){return!je(Xn)},st=function(Xn,rr){var ir=Xn,br=tt(ir)||ir.isEmpty();if(!ir.isEmpty()&&!rr&&(ir=je(ir)||ir,br=!0),!ur&&!er&&br){var Re=ir.toString(),Ke=Gt(Re,rr);return Ke>=0&&(ir=xe(Ce(Re,".",Ke)),tt(ir)||(ir=xe(Ce(Re,".",Ke,!0)))),ir.equals(ii)||(wt(ir),Qt==null||Qt(ir.isEmpty()?null:pn(cn,ir)),nr===void 0&&ni(ir,rr)),ir}return ii},kt=ar(),nn=function Yn(Xn){if(Fe(),On.current=Xn,Hr(Xn),!vi.current){var rr=fn(Xn),ir=xe(rr);ir.isNaN()||st(ir,!0)}Qr==null||Qr(Xn),kt(function(){var br=Xn;mn||(br=Xn.replace(/。/g,".")),br!==Xn&&Yn(br)})},sn=function(){vi.current=!0},Jn=function(){vi.current=!1,nn(qi.current.value)},yr=function(Xn){nn(Xn.target.value)},Zn=function(Xn){var rr;if(!(Xn&&pi||!Xn&&Ti)){qr.current=!1;var ir=xe(Zi.current?qt(Un):Un);Xn||(ir=ir.negate());var br=(ii||xe(0)).add(ir.toString()),Re=st(br,!1);Bi==null||Bi(pn(cn,Re),{offset:Zi.current?qt(Un):Un,type:Xn?"up":"down"}),(rr=qi.current)===null||rr===void 0||rr.focus()}},Cn=function(Xn){var rr=xe(fn(Gr)),ir=rr;rr.isNaN()?ir=st(ii,Xn):ir=st(rr,Xn),nr!==void 0?ni(ii,!1):ir.isNaN()||ni(ir,!1)},vn=function(){qr.current=!0},Pn=function(Xn){var rr=Xn.key,ir=Xn.shiftKey;qr.current=!0,Zi.current=ir,rr==="Enter"&&(vi.current||(qr.current=!1),Cn(!1),Ur==null||Ur(Xn)),ot!==!1&&!vi.current&&["Up","ArrowUp","Down","ArrowDown"].includes(rr)&&(Zn(rr==="Up"||rr==="ArrowUp"),Xn.preventDefault())},zn=function(){qr.current=!1,Zi.current=!1},mr=function(){Cn(!1),Gi(!1),qr.current=!1};return Qe(function(){ii.isInvalidate()||ni(ii,!1)},[Fn]),Qe(function(){var Yn=xe(nr);Et(Yn);var Xn=xe(fn(Gr));(!Yn.equals(Xn)||!qr.current||gn)&&ni(Yn,qr.current)},[nr]),Qe(function(){gn&&ze()},[Gr]),Ze.createElement("div",{className:Je()(He,Nn==null?void 0:Nn.input,pt,(Tt={},(0,Te.Z)(Tt,"".concat(He,"-focused"),$i),(0,Te.Z)(Tt,"".concat(He,"-disabled"),er),(0,Te.Z)(Tt,"".concat(He,"-readonly"),ur),(0,Te.Z)(Tt,"".concat(He,"-not-a-number"),ii.isNaN()),(0,Te.Z)(Tt,"".concat(He,"-out-of-range"),!ii.isInvalidate()&&!tt(ii)),Tt)),style:$t,onFocus:function(){Gi(!0)},onBlur:mr,onKeyDown:Pn,onKeyUp:zn,onCompositionStart:sn,onCompositionEnd:Jn,onBeforeInput:vn},ln&&Ze.createElement(zt,{prefixCls:He,upNode:dr,downNode:gt,upDisabled:pi,downDisabled:Ti,onStep:Zn}),Ze.createElement("div",{className:"".concat(gi,"-wrap")},Ze.createElement("input",(0,ve.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ot,"aria-valuemax":Jt,"aria-valuenow":ii.isInvalidate()?null:ii.toString(),step:Un},Ai,{ref:en(qi,ct),className:gi,value:Gr,onChange:yr,disabled:er,readOnly:ur}))))}),rt=Ze.forwardRef(function(Xe,ct){var Tt=Xe.disabled,Wt=Xe.style,He=Xe.prefixCls,pt=Xe.value,$t=Xe.prefix,Ot=Xe.suffix,Jt=Xe.addonBefore,tn=Xe.addonAfter,Un=Xe.classes,_r=Xe.className,nr=Xe.classNames,er=(0,me.Z)(Xe,Nt),ur=Ze.useRef(null),dr=function(ot){ur.current&&(0,jt.nH)(ur.current,ot)};return Ze.createElement(Ue.BaseInput,{inputElement:Ze.createElement(Rr,(0,ve.Z)({prefixCls:He,disabled:Tt,classNames:nr,ref:en(ur,ct)},er)),className:_r,triggerFocus:dr,prefixCls:He,value:pt,disabled:Tt,style:Wt,prefix:$t,suffix:Ot,addonAfter:tn,addonBefore:Jt,classes:Un,classNames:nr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});rt.displayName="InputNumber";var Kt=rt,Bn=Kt,Gn=se(9708),tr=se(53124),Sr=se(46735),Ar=se(98866),Mr=se(98675),Pr=se(65223),Vr=se(4173),lr=se(47673),si=se(14747),Li=se(80110),Ni=se(67968),Hi=se(45503);const ri=(Xe,ct)=>{let{componentCls:Tt,borderRadiusSM:Wt,borderRadiusLG:He}=Xe;const pt=ct==="lg"?He:Wt;return{[`&-${ct}`]:{[`${Tt}-handler-wrap`]:{borderStartEndRadius:pt,borderEndEndRadius:pt},[`${Tt}-handler-up`]:{borderStartEndRadius:pt},[`${Tt}-handler-down`]:{borderEndEndRadius:pt}}}},vt=Xe=>{const{componentCls:ct,lineWidth:Tt,lineType:Wt,colorBorder:He,borderRadius:pt,fontSizeLG:$t,controlHeightLG:Ot,controlHeightSM:Jt,colorError:tn,paddingInlineSM:Un,colorTextDescription:_r,motionDurationMid:nr,handleHoverColor:er,paddingInline:ur,paddingBlock:dr,handleBg:gt,handleActiveBg:ot,colorTextDisabled:Ct,borderRadiusSM:ln,borderRadiusLG:Nn,controlWidth:cn,handleVisible:mn,handleBorderColor:gn}=Xe;return[{[ct]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,si.Wf)(Xe)),(0,lr.ik)(Xe)),(0,lr.bi)(Xe,ct)),{display:"inline-block",width:cn,margin:0,padding:0,border:`${Tt}px ${Wt} ${He}`,borderRadius:pt,"&-rtl":{direction:"rtl",[`${ct}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:$t,borderRadius:Nn,[`input${ct}-input`]:{height:Ot-2*Tt}},"&-sm":{padding:0,borderRadius:ln,[`input${ct}-input`]:{height:Jt-2*Tt,padding:`0 ${Un}px`}},"&:hover":Object.assign({},(0,lr.pU)(Xe)),"&-focused":Object.assign({},(0,lr.M1)(Xe)),"&-out-of-range":{[`${ct}-input-wrap`]:{input:{color:tn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,si.Wf)(Xe)),(0,lr.s7)(Xe)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${ct}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${ct}-group-addon`]:{borderRadius:Nn,fontSize:Xe.fontSizeLG}},"&-sm":{[`${ct}-group-addon`]:{borderRadius:ln}},[`${ct}-wrapper-disabled > ${ct}-group-addon`]:Object.assign({},(0,lr.Xy)(Xe))}}),[`&-disabled ${ct}-input`]:{cursor:"not-allowed"},[ct]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,si.Wf)(Xe)),{width:"100%",padding:`${dr}px ${ur}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:pt,outline:0,transition:`all ${nr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,lr.nz)(Xe.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[ct]:Object.assign(Object.assign(Object.assign({[`&:hover ${ct}-handler-wrap, &-focused ${ct}-handler-wrap`]:{opacity:1},[`${ct}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:Xe.handleWidth,height:"100%",background:gt,borderStartStartRadius:0,borderStartEndRadius:pt,borderEndEndRadius:pt,borderEndStartRadius:0,opacity:mn===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${nr} linear ${nr}`,[`${ct}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${ct}-handler-up-inner,
|
|
|
${ct}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:Xe.handleFontSize}}},[`${ct}-handler`]:{height:"50%",overflow:"hidden",color:_r,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${Tt}px ${Wt} ${gn}`,transition:`all ${nr} linear`,"&:active":{background:ot},"&:hover":{height:"60%",[`
|
|
|
${ct}-handler-up-inner,
|
|
|
${ct}-handler-down-inner
|
|
|
`]:{color:er}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,si.Ro)()),{color:_r,transition:`all ${nr} linear`,userSelect:"none"})},[`${ct}-handler-up`]:{borderStartEndRadius:pt},[`${ct}-handler-down`]:{borderBlockStart:`${Tt}px ${Wt} ${gn}`,borderEndEndRadius:pt}},ri(Xe,"lg")),ri(Xe,"sm")),{"&-disabled, &-readonly":{[`${ct}-handler-wrap`]:{display:"none"},[`${ct}-input`]:{color:"inherit"}},[`
|
|
|
${ct}-handler-up-disabled,
|
|
|
${ct}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${ct}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${ct}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:Ct}})},{[`${ct}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${ct}-handler-down`]:{borderBlockStartWidth:0}}}]},Sn=Xe=>{const{componentCls:ct,paddingBlock:Tt,paddingInline:Wt,inputAffixPadding:He,controlWidth:pt,borderRadiusLG:$t,borderRadiusSM:Ot}=Xe;return{[`${ct}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,lr.ik)(Xe)),(0,lr.bi)(Xe,`${ct}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:pt,padding:0,paddingInlineStart:Wt,"&-lg":{borderRadius:$t},"&-sm":{borderRadius:Ot},[`&:not(${ct}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,lr.pU)(Xe)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${ct}-disabled`]:{background:"transparent"},[`> div${ct}`]:{width:"100%",border:"none",outline:"none",[`&${ct}-focused`]:{boxShadow:"none !important"}},[`input${ct}-input`]:{padding:`${Tt}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${ct}-handler-wrap`]:{zIndex:2},[ct]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:He},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:Wt,marginInlineStart:He}}})}};var kn=(0,Ni.Z)("InputNumber",Xe=>{const ct=(0,Hi.TS)(Xe,(0,lr.e5)(Xe));return[vt(ct),Sn(ct),(0,Li.c)(ct)]},Xe=>Object.assign(Object.assign({},(0,lr.TM)(Xe)),{controlWidth:90,handleWidth:Xe.controlHeightSM-Xe.lineWidth*2,handleFontSize:Xe.fontSize/2,handleVisible:"auto",handleActiveBg:Xe.colorFillAlter,handleBg:Xe.colorBgContainer,handleHoverColor:Xe.colorPrimary,handleBorderColor:Xe.colorBorder})),In=function(Xe,ct){var Tt={};for(var Wt in Xe)Object.prototype.hasOwnProperty.call(Xe,Wt)&&ct.indexOf(Wt)<0&&(Tt[Wt]=Xe[Wt]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,Wt=Object.getOwnPropertySymbols(Xe);He<Wt.length;He++)ct.indexOf(Wt[He])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Wt[He])&&(Tt[Wt[He]]=Xe[Wt[He]]);return Tt};const sr=Ze.forwardRef((Xe,ct)=>{const{getPrefixCls:Tt,direction:Wt}=Ze.useContext(tr.E_),He=Ze.useRef(null);Ze.useImperativeHandle(ct,()=>He.current);const{className:pt,rootClassName:$t,size:Ot,disabled:Jt,prefixCls:tn,addonBefore:Un,addonAfter:_r,prefix:nr,bordered:er=!0,readOnly:ur,status:dr,controls:gt}=Xe,ot=In(Xe,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),Ct=Tt("input-number",tn),[ln,Nn]=kn(Ct),{compactSize:cn,compactItemClassnames:mn}=(0,Vr.ri)(Ct,Wt);let gn=Ze.createElement(We.Z,{className:`${Ct}-handler-up-inner`}),Fn=Ze.createElement(fe.Z,{className:`${Ct}-handler-down-inner`});const fr=typeof gt=="boolean"?gt:void 0;typeof gt=="object"&&(gn=typeof gt.upIcon=="undefined"?gn:Ze.createElement("span",{className:`${Ct}-handler-up-inner`},gt.upIcon),Fn=typeof gt.downIcon=="undefined"?Fn:Ze.createElement("span",{className:`${Ct}-handler-down-inner`},gt.downIcon));const{hasFeedback:Qt,status:Qr,isFormItemInput:Ur,feedbackIcon:Bi}=Ze.useContext(Pr.aM),Ai=(0,Gn.F)(Qr,dr),gi=(0,Mr.Z)(qr=>{var vi;return(vi=Ot!=null?Ot:cn)!==null&&vi!==void 0?vi:qr}),qi=Ze.useContext(Ar.Z),xi=Jt!=null?Jt:qi,li=Je()({[`${Ct}-lg`]:gi==="large",[`${Ct}-sm`]:gi==="small",[`${Ct}-rtl`]:Wt==="rtl",[`${Ct}-borderless`]:!er,[`${Ct}-in-form-item`]:Ur},(0,Gn.Z)(Ct,Ai),mn,Nn),$i=`${Ct}-group`,Gi=Ze.createElement(Bn,Object.assign({ref:He,disabled:xi,className:Je()(pt,$t),upHandler:gn,downHandler:Fn,prefixCls:Ct,readOnly:ur,controls:fr,prefix:nr,suffix:Qt&&Bi,addonAfter:_r&&Ze.createElement(Vr.BR,null,Ze.createElement(Pr.Ux,{override:!0,status:!0},_r)),addonBefore:Un&&Ze.createElement(Vr.BR,null,Ze.createElement(Pr.Ux,{override:!0,status:!0},Un)),classNames:{input:li},classes:{affixWrapper:Je()((0,Gn.Z)(`${Ct}-affix-wrapper`,Ai,Qt),{[`${Ct}-affix-wrapper-sm`]:gi==="small",[`${Ct}-affix-wrapper-lg`]:gi==="large",[`${Ct}-affix-wrapper-rtl`]:Wt==="rtl",[`${Ct}-affix-wrapper-borderless`]:!er},Nn),wrapper:Je()({[`${$i}-rtl`]:Wt==="rtl",[`${Ct}-wrapper-disabled`]:xi},Nn),group:Je()({[`${Ct}-group-wrapper-sm`]:gi==="small",[`${Ct}-group-wrapper-lg`]:gi==="large",[`${Ct}-group-wrapper-rtl`]:Wt==="rtl"},(0,Gn.Z)(`${Ct}-group-wrapper`,Ai,Qt),Nn)}},ot));return ln(Gi)}),qn=sr,hr=Xe=>Ze.createElement(Sr.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},Ze.createElement(sr,Object.assign({},Xe)));qn._InternalPanelDoNotUseOrYouWillBeFired=hr;var $n=qn},82586:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return Vt},n:function(){return Ee}});var fe=se(16646),We=se(94184),Be=se.n(We),Je=se(67656),ve=se(17799),Te=se(67294),_e=se(9708),we=se(53124),me=se(98866),De=se(98675),at=se(65223),Oe=se(4173),Mt=se(72922),ht=se(47673);function lt(qe){return!!(qe.prefix||qe.suffix||qe.allowClear)}var et=function(qe,ut){var Ce={};for(var xe in qe)Object.prototype.hasOwnProperty.call(qe,xe)&&ut.indexOf(xe)<0&&(Ce[xe]=qe[xe]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,xe=Object.getOwnPropertySymbols(qe);Ue<xe.length;Ue++)ut.indexOf(xe[Ue])<0&&Object.prototype.propertyIsEnumerable.call(qe,xe[Ue])&&(Ce[xe[Ue]]=qe[xe[Ue]]);return Ce};function Ee(qe,ut){if(!qe)return;qe.focus(ut);const{cursor:Ce}=ut||{};if(Ce){const xe=qe.value.length;switch(Ce){case"start":qe.setSelectionRange(0,0);break;case"end":qe.setSelectionRange(xe,xe);break;default:qe.setSelectionRange(0,xe);break}}}var Vt=(0,Te.forwardRef)((qe,ut)=>{var Ce;const{prefixCls:xe,bordered:Ue=!0,status:Ze,size:St,disabled:mt,onBlur:Pt,onFocus:Qe,suffix:Ft,allowClear:Dt,addonAfter:an,addonBefore:it,className:en,style:_n,styles:yn,rootClassName:Ve,onChange:Le,classNames:Bt}=qe,Dn=et(qe,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:dn,direction:nt,input:ft}=Te.useContext(we.E_),Xt=dn("input",xe),Rn=(0,Te.useRef)(null),[wn,Zt]=(0,ht.ZP)(Xt),{compactSize:Ht,compactItemClassnames:Tn}=(0,Oe.ri)(Xt,nt),xn=(0,De.Z)(xr=>{var Nt;return(Nt=St!=null?St:Ht)!==null&&Nt!==void 0?Nt:xr}),ke=Te.useContext(me.Z),ue=mt!=null?mt:ke,{status:le,hasFeedback:pe,feedbackIcon:he}=(0,Te.useContext)(at.aM),oe=(0,_e.F)(le,Ze),Ae=lt(qe)||!!pe,Ge=(0,Te.useRef)(Ae);(0,Te.useEffect)(()=>{var xr;Ae&&Ge.current,Ge.current=Ae},[Ae]);const _t=(0,Mt.Z)(Rn,!0),Rt=xr=>{_t(),Pt==null||Pt(xr)},zt=xr=>{_t(),Qe==null||Qe(xr)},qt=xr=>{_t(),Le==null||Le(xr)},jt=(pe||Ft)&&Te.createElement(Te.Fragment,null,Ft,pe&&he);let ar;return typeof Dt=="object"&&(Dt!=null&&Dt.clearIcon)?ar=Dt:Dt&&(ar={clearIcon:Te.createElement(fe.Z,null)}),wn(Te.createElement(Je.default,Object.assign({ref:(0,ve.sQ)(ut,Rn),prefixCls:Xt,autoComplete:ft==null?void 0:ft.autoComplete},Dn,{disabled:ue,onBlur:Rt,onFocus:zt,style:Object.assign(Object.assign({},ft==null?void 0:ft.style),_n),styles:Object.assign(Object.assign({},ft==null?void 0:ft.styles),yn),suffix:jt,allowClear:ar,className:Be()(en,Ve,Tn,ft==null?void 0:ft.className),onChange:qt,addonAfter:an&&Te.createElement(Oe.BR,null,Te.createElement(at.Ux,{override:!0,status:!0},an)),addonBefore:it&&Te.createElement(Oe.BR,null,Te.createElement(at.Ux,{override:!0,status:!0},it)),classNames:Object.assign(Object.assign(Object.assign({},Bt),ft==null?void 0:ft.classNames),{input:Be()({[`${Xt}-sm`]:xn==="small",[`${Xt}-lg`]:xn==="large",[`${Xt}-rtl`]:nt==="rtl",[`${Xt}-borderless`]:!Ue},!Ae&&(0,_e.Z)(Xt,oe),Bt==null?void 0:Bt.input,(Ce=ft==null?void 0:ft.classNames)===null||Ce===void 0?void 0:Ce.input,Zt)}),classes:{affixWrapper:Be()({[`${Xt}-affix-wrapper-sm`]:xn==="small",[`${Xt}-affix-wrapper-lg`]:xn==="large",[`${Xt}-affix-wrapper-rtl`]:nt==="rtl",[`${Xt}-affix-wrapper-borderless`]:!Ue},(0,_e.Z)(`${Xt}-affix-wrapper`,oe,pe),Zt),wrapper:Be()({[`${Xt}-group-rtl`]:nt==="rtl"},Zt),group:Be()({[`${Xt}-group-wrapper-sm`]:xn==="small",[`${Xt}-group-wrapper-lg`]:xn==="large",[`${Xt}-group-wrapper-rtl`]:nt==="rtl",[`${Xt}-group-wrapper-disabled`]:ue},(0,_e.Z)(`${Xt}-group-wrapper`,oe,pe),Zt)}})))})},96330:function(En,Yt,se){"use strict";var fe=se(16646),We=se(94184),Be=se.n(We),Je=se(64701),ve=se(67294),Te=se(9708),_e=se(53124),we=se(98866),me=se(98675),De=se(65223),at=se(82586),Oe=se(47673),Mt=function(lt,et){var Ee={};for(var yt in lt)Object.prototype.hasOwnProperty.call(lt,yt)&&et.indexOf(yt)<0&&(Ee[yt]=lt[yt]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,yt=Object.getOwnPropertySymbols(lt);Vt<yt.length;Vt++)et.indexOf(yt[Vt])<0&&Object.prototype.propertyIsEnumerable.call(lt,yt[Vt])&&(Ee[yt[Vt]]=lt[yt[Vt]]);return Ee};const ht=(0,ve.forwardRef)((lt,et)=>{const{prefixCls:Ee,bordered:yt=!0,size:Vt,disabled:qe,status:ut,allowClear:Ce,showCount:xe,classNames:Ue,rootClassName:Ze,className:St}=lt,mt=Mt(lt,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Pt,direction:Qe}=ve.useContext(_e.E_),Ft=(0,me.Z)(Vt),Dt=ve.useContext(we.Z),an=qe!=null?qe:Dt,{status:it,hasFeedback:en,feedbackIcon:_n}=ve.useContext(De.aM),yn=(0,Te.F)(it,ut),Ve=ve.useRef(null);ve.useImperativeHandle(et,()=>{var nt;return{resizableTextArea:(nt=Ve.current)===null||nt===void 0?void 0:nt.resizableTextArea,focus:ft=>{var Xt,Rn;(0,at.n)((Rn=(Xt=Ve.current)===null||Xt===void 0?void 0:Xt.resizableTextArea)===null||Rn===void 0?void 0:Rn.textArea,ft)},blur:()=>{var ft;return(ft=Ve.current)===null||ft===void 0?void 0:ft.blur()}}});const Le=Pt("input",Ee);let Bt;typeof Ce=="object"&&(Ce!=null&&Ce.clearIcon)?Bt=Ce:Ce&&(Bt={clearIcon:ve.createElement(fe.Z,null)});const[Dn,dn]=(0,Oe.ZP)(Le);return Dn(ve.createElement(Je.default,Object.assign({},mt,{disabled:an,allowClear:Bt,className:Be()(St,Ze),classes:{affixWrapper:Be()(`${Le}-textarea-affix-wrapper`,{[`${Le}-affix-wrapper-rtl`]:Qe==="rtl",[`${Le}-affix-wrapper-borderless`]:!yt,[`${Le}-affix-wrapper-sm`]:Ft==="small",[`${Le}-affix-wrapper-lg`]:Ft==="large",[`${Le}-textarea-show-count`]:xe},(0,Te.Z)(`${Le}-affix-wrapper`,yn),dn)},classNames:Object.assign(Object.assign({},Ue),{textarea:Be()({[`${Le}-borderless`]:!yt,[`${Le}-sm`]:Ft==="small",[`${Le}-lg`]:Ft==="large"},(0,Te.Z)(Le,yn),dn,Ue==null?void 0:Ue.textarea)}),prefixCls:Le,suffix:en&&ve.createElement("span",{className:`${Le}-textarea-suffix`},_n),showCount:xe,ref:Ve})))});Yt.Z=ht},72922:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return We}});var fe=se(67294);function We(Be,Je){const ve=(0,fe.useRef)([]),Te=()=>{ve.current.push(setTimeout(()=>{var _e,we,me,De;!((_e=Be.current)===null||_e===void 0)&&_e.input&&((we=Be.current)===null||we===void 0?void 0:we.input.getAttribute("type"))==="password"&&(!((me=Be.current)===null||me===void 0)&&me.input.hasAttribute("value"))&&((De=Be.current)===null||De===void 0||De.input.removeAttribute("value"))}))};return(0,fe.useEffect)(()=>(Je&&Te(),()=>ve.current.forEach(_e=>{_e&&clearTimeout(_e)})),[]),Te}},69677:function(En,Yt,se){"use strict";se.d(Yt,{default:function(){return Ft}});var fe=se(94184),We=se.n(fe),Be=se(67294),Je=se(53124),ve=se(65223),Te=se(47673),we=Dt=>{const{getPrefixCls:an,direction:it}=(0,Be.useContext)(Je.E_),{prefixCls:en,className:_n}=Dt,yn=an("input-group",en),Ve=an("input"),[Le,Bt]=(0,Te.ZP)(Ve),Dn=We()(yn,{[`${yn}-lg`]:Dt.size==="large",[`${yn}-sm`]:Dt.size==="small",[`${yn}-compact`]:Dt.compact,[`${yn}-rtl`]:it==="rtl"},Bt,_n),dn=(0,Be.useContext)(ve.aM),nt=(0,Be.useMemo)(()=>Object.assign(Object.assign({},dn),{isFormItemInput:!1}),[dn]);return Le(Be.createElement("span",{className:Dn,style:Dt.style,onMouseEnter:Dt.onMouseEnter,onMouseLeave:Dt.onMouseLeave,onFocus:Dt.onFocus,onBlur:Dt.onBlur},Be.createElement(ve.aM.Provider,{value:nt},Dt.children)))},me=se(82586),De=se(63237),at=se(99569),Oe=se(10366),Mt=se(17799),ht=se(72922),lt=function(Dt,an){var it={};for(var en in Dt)Object.prototype.hasOwnProperty.call(Dt,en)&&an.indexOf(en)<0&&(it[en]=Dt[en]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _n=0,en=Object.getOwnPropertySymbols(Dt);_n<en.length;_n++)an.indexOf(en[_n])<0&&Object.prototype.propertyIsEnumerable.call(Dt,en[_n])&&(it[en[_n]]=Dt[en[_n]]);return it};const et=Dt=>Dt?Be.createElement(at.Z,null):Be.createElement(De.Z,null),Ee={click:"onClick",hover:"onMouseOver"};var Vt=Be.forwardRef((Dt,an)=>{const{visibilityToggle:it=!0}=Dt,en=typeof it=="object"&&it.visible!==void 0,[_n,yn]=(0,Be.useState)(()=>en?it.visible:!1),Ve=(0,Be.useRef)(null);Be.useEffect(()=>{en&&yn(it.visible)},[en,it]);const Le=(0,ht.Z)(Ve),Bt=()=>{const{disabled:ue}=Dt;ue||(_n&&Le(),yn(le=>{var pe;const he=!le;return typeof it=="object"&&((pe=it.onVisibleChange)===null||pe===void 0||pe.call(it,he)),he}))},Dn=ue=>{const{action:le="click",iconRender:pe=et}=Dt,he=Ee[le]||"",oe=pe(_n),Ae={[he]:Bt,className:`${ue}-icon`,key:"passwordIcon",onMouseDown:Ge=>{Ge.preventDefault()},onMouseUp:Ge=>{Ge.preventDefault()}};return Be.cloneElement(Be.isValidElement(oe)?oe:Be.createElement("span",null,oe),Ae)},{className:dn,prefixCls:nt,inputPrefixCls:ft,size:Xt}=Dt,Rn=lt(Dt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:wn}=Be.useContext(Je.E_),Zt=wn("input",ft),Ht=wn("input-password",nt),Tn=it&&Dn(Ht),xn=We()(Ht,dn,{[`${Ht}-${Xt}`]:!!Xt}),ke=Object.assign(Object.assign({},(0,Oe.Z)(Rn,["suffix","iconRender","visibilityToggle"])),{type:_n?"text":"password",className:xn,prefixCls:Zt,suffix:Tn});return Xt&&(ke.size=Xt),Be.createElement(me.Z,Object.assign({ref:(0,Mt.sQ)(an,Ve)},ke))}),qe=se(72395),ut=se(96159),Ce=se(71577),xe=se(98675),Ue=se(4173),Ze=function(Dt,an){var it={};for(var en in Dt)Object.prototype.hasOwnProperty.call(Dt,en)&&an.indexOf(en)<0&&(it[en]=Dt[en]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _n=0,en=Object.getOwnPropertySymbols(Dt);_n<en.length;_n++)an.indexOf(en[_n])<0&&Object.prototype.propertyIsEnumerable.call(Dt,en[_n])&&(it[en[_n]]=Dt[en[_n]]);return it},mt=Be.forwardRef((Dt,an)=>{const{prefixCls:it,inputPrefixCls:en,className:_n,size:yn,suffix:Ve,enterButton:Le=!1,addonAfter:Bt,loading:Dn,disabled:dn,onSearch:nt,onChange:ft,onCompositionStart:Xt,onCompositionEnd:Rn}=Dt,wn=Ze(Dt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Zt,direction:Ht}=Be.useContext(Je.E_),Tn=Be.useRef(!1),xn=Zt("input-search",it),ke=Zt("input",en),{compactSize:ue}=(0,Ue.ri)(xn,Ht),le=(0,xe.Z)(pn=>{var cr;return(cr=yn!=null?yn:ue)!==null&&cr!==void 0?cr:pn}),pe=Be.useRef(null),he=pn=>{pn&&pn.target&&pn.type==="click"&&nt&&nt(pn.target.value,pn,{source:"clear"}),ft&&ft(pn)},oe=pn=>{var cr;document.activeElement===((cr=pe.current)===null||cr===void 0?void 0:cr.input)&&pn.preventDefault()},Ae=pn=>{var cr,Rr;nt&&nt((Rr=(cr=pe.current)===null||cr===void 0?void 0:cr.input)===null||Rr===void 0?void 0:Rr.value,pn,{source:"input"})},Ge=pn=>{Tn.current||Dn||Ae(pn)},_t=typeof Le=="boolean"?Be.createElement(qe.Z,null):null,Rt=`${xn}-button`;let zt;const qt=Le||{},jt=qt.type&&qt.type.__ANT_BUTTON===!0;jt||qt.type==="button"?zt=(0,ut.Tm)(qt,Object.assign({onMouseDown:oe,onClick:pn=>{var cr,Rr;(Rr=(cr=qt==null?void 0:qt.props)===null||cr===void 0?void 0:cr.onClick)===null||Rr===void 0||Rr.call(cr,pn),Ae(pn)},key:"enterButton"},jt?{className:Rt,size:le}:{})):zt=Be.createElement(Ce.ZP,{className:Rt,type:Le?"primary":void 0,size:le,disabled:dn,key:"enterButton",onMouseDown:oe,onClick:Ae,loading:Dn,icon:_t},Le),Bt&&(zt=[zt,(0,ut.Tm)(Bt,{key:"addonAfter"})]);const ar=We()(xn,{[`${xn}-rtl`]:Ht==="rtl",[`${xn}-${le}`]:!!le,[`${xn}-with-button`]:!!Le},_n),xr=pn=>{Tn.current=!0,Xt==null||Xt(pn)},Nt=pn=>{Tn.current=!1,Rn==null||Rn(pn)};return Be.createElement(me.Z,Object.assign({ref:(0,Mt.sQ)(pe,an),onPressEnter:Ge},wn,{size:le,onCompositionStart:xr,onCompositionEnd:Nt,prefixCls:ke,addonAfter:zt,suffix:Ve,onChange:he,className:ar,disabled:dn}))}),Pt=se(96330);const Qe=me.Z;Qe.Group=we,Qe.Search=mt,Qe.TextArea=Pt.Z,Qe.Password=Vt;var Ft=Qe},47673:function(En,Yt,se){"use strict";se.d(Yt,{M1:function(){return _e},TM:function(){return ut},Xy:function(){return we},bi:function(){return at},e5:function(){return qe},ik:function(){return Oe},nz:function(){return ve},pU:function(){return Te},s7:function(){return Mt},x0:function(){return De}});var fe=se(14747),We=se(80110),Be=se(45503),Je=se(67968);const ve=Ce=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:Ce,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Te=Ce=>({borderColor:Ce.hoverBorderColor}),_e=Ce=>({borderColor:Ce.activeBorderColor,boxShadow:Ce.activeShadow,outline:0}),we=Ce=>({color:Ce.colorTextDisabled,backgroundColor:Ce.colorBgContainerDisabled,borderColor:Ce.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},Te((0,Be.TS)(Ce,{hoverBorderColor:Ce.colorBorder})))}),me=Ce=>{const{paddingBlockLG:xe,fontSizeLG:Ue,lineHeightLG:Ze,borderRadiusLG:St,paddingInlineLG:mt}=Ce;return{padding:`${xe}px ${mt}px`,fontSize:Ue,lineHeight:Ze,borderRadius:St}},De=Ce=>({padding:`${Ce.paddingBlockSM}px ${Ce.paddingInlineSM}px`,borderRadius:Ce.borderRadiusSM}),at=(Ce,xe)=>{const{componentCls:Ue,colorError:Ze,colorWarning:St,errorActiveShadow:mt,warningActiveShadow:Pt,colorErrorBorderHover:Qe,colorWarningBorderHover:Ft}=Ce;return{[`&-status-error:not(${xe}-disabled):not(${xe}-borderless)${xe}`]:{borderColor:Ze,"&:hover":{borderColor:Qe},"&:focus, &-focused":Object.assign({},_e((0,Be.TS)(Ce,{activeBorderColor:Ze,activeShadow:mt}))),[`${Ue}-prefix, ${Ue}-suffix`]:{color:Ze}},[`&-status-warning:not(${xe}-disabled):not(${xe}-borderless)${xe}`]:{borderColor:St,"&:hover":{borderColor:Ft},"&:focus, &-focused":Object.assign({},_e((0,Be.TS)(Ce,{activeBorderColor:St,activeShadow:Pt}))),[`${Ue}-prefix, ${Ue}-suffix`]:{color:St}}}},Oe=Ce=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Ce.paddingBlock}px ${Ce.paddingInline}px`,color:Ce.colorText,fontSize:Ce.fontSize,lineHeight:Ce.lineHeight,backgroundColor:Ce.colorBgContainer,backgroundImage:"none",borderWidth:Ce.lineWidth,borderStyle:Ce.lineType,borderColor:Ce.colorBorder,borderRadius:Ce.borderRadius,transition:`all ${Ce.motionDurationMid}`},ve(Ce.colorTextPlaceholder)),{"&:hover":Object.assign({},Te(Ce)),"&:focus, &-focused":Object.assign({},_e(Ce)),"&-disabled, &[disabled]":Object.assign({},we(Ce)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:Ce.controlHeight,lineHeight:Ce.lineHeight,verticalAlign:"bottom",transition:`all ${Ce.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},me(Ce)),"&-sm":Object.assign({},De(Ce)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),Mt=Ce=>{const{componentCls:xe,antCls:Ue}=Ce;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:Ce.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${xe}, &-lg > ${xe}-group-addon`]:Object.assign({},me(Ce)),[`&-sm ${xe}, &-sm > ${xe}-group-addon`]:Object.assign({},De(Ce)),[`&-lg ${Ue}-select-single ${Ue}-select-selector`]:{height:Ce.controlHeightLG},[`&-sm ${Ue}-select-single ${Ue}-select-selector`]:{height:Ce.controlHeightSM},[`> ${xe}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${xe}-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 ${Ce.paddingInline}px`,color:Ce.colorText,fontWeight:"normal",fontSize:Ce.fontSize,textAlign:"center",backgroundColor:Ce.colorFillAlter,border:`${Ce.lineWidth}px ${Ce.lineType} ${Ce.colorBorder}`,borderRadius:Ce.borderRadius,transition:`all ${Ce.motionDurationSlow}`,lineHeight:1,[`${Ue}-select`]:{margin:`-${Ce.paddingBlock+1}px -${Ce.paddingInline}px`,[`&${Ue}-select-single:not(${Ue}-select-customize-input)`]:{[`${Ue}-select-selector`]:{backgroundColor:"inherit",border:`${Ce.lineWidth}px ${Ce.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Ue}-select-selector`]:{color:Ce.colorPrimary}}},[`${Ue}-cascader-picker`]:{margin:`-9px -${Ce.paddingInline}px`,backgroundColor:"transparent",[`${Ue}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${xe}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${xe}-search-with-button &`]:{zIndex:0}}},[`> ${xe}:first-child, ${xe}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Ue}-select ${Ue}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${xe}-affix-wrapper`]:{[`&:not(:first-child) ${xe}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${xe}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${xe}:last-child, ${xe}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Ue}-select ${Ue}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${xe}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${xe}-search &`]:{borderStartStartRadius:Ce.borderRadius,borderEndStartRadius:Ce.borderRadius}},[`&:not(:first-child), ${xe}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${xe}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,fe.dF)()),{[`${xe}-group-addon, ${xe}-group-wrap, > ${xe}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:Ce.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${xe}-affix-wrapper,
|
|
|
& > ${xe}-number-affix-wrapper,
|
|
|
& > ${Ue}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-Ce.lineWidth,borderInlineEndWidth:Ce.lineWidth},[`${xe}`]:{float:"none"},[`& > ${Ue}-select > ${Ue}-select-selector,
|
|
|
& > ${Ue}-select-auto-complete ${xe},
|
|
|
& > ${Ue}-cascader-picker ${xe},
|
|
|
& > ${xe}-group-wrapper ${xe}`]:{borderInlineEndWidth:Ce.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Ue}-select-focused`]:{zIndex:1},[`& > ${Ue}-select > ${Ue}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${Ue}-select:first-child > ${Ue}-select-selector,
|
|
|
& > ${Ue}-select-auto-complete:first-child ${xe},
|
|
|
& > ${Ue}-cascader-picker:first-child ${xe}`]:{borderStartStartRadius:Ce.borderRadius,borderEndStartRadius:Ce.borderRadius},[`& > *:last-child,
|
|
|
& > ${Ue}-select:last-child > ${Ue}-select-selector,
|
|
|
& > ${Ue}-cascader-picker:last-child ${xe},
|
|
|
& > ${Ue}-cascader-picker-focused:last-child ${xe}`]:{borderInlineEndWidth:Ce.lineWidth,borderStartEndRadius:Ce.borderRadius,borderEndEndRadius:Ce.borderRadius},[`& > ${Ue}-select-auto-complete ${xe}`]:{verticalAlign:"top"},[`${xe}-group-wrapper + ${xe}-group-wrapper`]:{marginInlineStart:-Ce.lineWidth,[`${xe}-affix-wrapper`]:{borderRadius:0}},[`${xe}-group-wrapper:not(:last-child)`]:{[`&${xe}-search > ${xe}-group`]:{[`& > ${xe}-group-addon > ${xe}-search-button`]:{borderRadius:0},[`& > ${xe}`]:{borderStartStartRadius:Ce.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Ce.borderRadius}}}})}},ht=Ce=>{const{componentCls:xe,controlHeightSM:Ue,lineWidth:Ze}=Ce,mt=(Ue-Ze*2-16)/2;return{[xe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(Ce)),Oe(Ce)),at(Ce,xe)),{'&[type="color"]':{height:Ce.controlHeight,[`&${xe}-lg`]:{height:Ce.controlHeightLG},[`&${xe}-sm`]:{height:Ue,paddingTop:mt,paddingBottom:mt}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},lt=Ce=>{const{componentCls:xe}=Ce;return{[`${xe}-clear-icon`]:{margin:0,color:Ce.colorTextQuaternary,fontSize:Ce.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${Ce.motionDurationSlow}`,"&:hover":{color:Ce.colorTextTertiary},"&:active":{color:Ce.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Ce.inputAffixPadding}px`}}}},et=Ce=>{const{componentCls:xe,inputAffixPadding:Ue,colorTextDescription:Ze,motionDurationSlow:St,colorIcon:mt,colorIconHover:Pt,iconCls:Qe}=Ce;return{[`${xe}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Oe(Ce)),{display:"inline-flex",[`&:not(${xe}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Te(Ce)),{zIndex:1,[`${xe}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${xe}[disabled]`]:{background:"transparent"}},[`> input${xe}`]:{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"'},[`${xe}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:Ce.paddingXS}},"&-show-count-suffix":{color:Ze},"&-show-count-has-suffix":{marginInlineEnd:Ce.paddingXXS},"&-prefix":{marginInlineEnd:Ue},"&-suffix":{marginInlineStart:Ue}}}),lt(Ce)),{[`${Qe}${xe}-password-icon`]:{color:mt,cursor:"pointer",transition:`all ${St}`,"&:hover":{color:Pt}}}),at(Ce,`${xe}-affix-wrapper`))}},Ee=Ce=>{const{componentCls:xe,colorError:Ue,colorWarning:Ze,borderRadiusLG:St,borderRadiusSM:mt}=Ce;return{[`${xe}-group`]:Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(Ce)),Mt(Ce)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${xe}-group-addon`]:{borderRadius:St,fontSize:Ce.fontSizeLG}},"&-sm":{[`${xe}-group-addon`]:{borderRadius:mt}},"&-status-error":{[`${xe}-group-addon`]:{color:Ue,borderColor:Ue}},"&-status-warning":{[`${xe}-group-addon`]:{color:Ze,borderColor:Ze}},"&-disabled":{[`${xe}-group-addon`]:Object.assign({},we(Ce))},[`&:not(${xe}-compact-first-item):not(${xe}-compact-last-item)${xe}-compact-item`]:{[`${xe}, ${xe}-group-addon`]:{borderRadius:0}},[`&:not(${xe}-compact-last-item)${xe}-compact-first-item`]:{[`${xe}, ${xe}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${xe}-compact-first-item)${xe}-compact-last-item`]:{[`${xe}, ${xe}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},yt=Ce=>{const{componentCls:xe,antCls:Ue}=Ce,Ze=`${xe}-search`;return{[Ze]:{[`${xe}`]:{"&:hover, &:focus":{borderColor:Ce.colorPrimaryHover,[`+ ${xe}-group-addon ${Ze}-button:not(${Ue}-btn-primary)`]:{borderInlineStartColor:Ce.colorPrimaryHover}}},[`${xe}-affix-wrapper`]:{borderRadius:0},[`${xe}-lg`]:{lineHeight:Ce.lineHeightLG-2e-4},[`> ${xe}-group`]:{[`> ${xe}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Ze}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:Ce.borderRadius,borderEndEndRadius:Ce.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Ze}-button:not(${Ue}-btn-primary)`]:{color:Ce.colorTextDescription,"&:hover":{color:Ce.colorPrimaryHover},"&:active":{color:Ce.colorPrimaryActive},[`&${Ue}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Ze}-button`]:{height:Ce.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Ze}-button`]:{height:Ce.controlHeightLG},[`&-small ${Ze}-button`]:{height:Ce.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${xe}-compact-item`]:{[`&:not(${xe}-compact-last-item)`]:{[`${xe}-group-addon`]:{[`${xe}-search-button`]:{marginInlineEnd:-Ce.lineWidth,borderRadius:0}}},[`&:not(${xe}-compact-first-item)`]:{[`${xe},${xe}-affix-wrapper`]:{borderRadius:0}},[`> ${xe}-group-addon ${xe}-search-button,
|
|
|
> ${xe},
|
|
|
${xe}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${xe}-affix-wrapper-focused`]:{zIndex:2}}}}},Vt=Ce=>{const{componentCls:xe,paddingLG:Ue}=Ce,Ze=`${xe}-textarea`;return{[Ze]:{position:"relative","&-show-count":{[`> ${xe}`]:{height:"100%"},[`${xe}-data-count`]:{position:"absolute",bottom:-Ce.fontSize*Ce.lineHeight,insetInlineEnd:0,color:Ce.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${xe}`]:{paddingInlineEnd:Ue}},[`&-affix-wrapper${Ze}-has-feedback`]:{[`${xe}`]:{paddingInlineEnd:Ue}},[`&-affix-wrapper${xe}-affix-wrapper`]:{padding:0,[`> textarea${xe}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${xe}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${xe}-clear-icon`]:{position:"absolute",insetInlineEnd:Ce.paddingXS,insetBlockStart:Ce.paddingXS},[`${Ze}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Ce.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function qe(Ce){return(0,Be.TS)(Ce,{inputAffixPadding:Ce.paddingXXS})}const ut=Ce=>{const{controlHeight:xe,fontSize:Ue,lineHeight:Ze,lineWidth:St,controlHeightSM:mt,controlHeightLG:Pt,fontSizeLG:Qe,lineHeightLG:Ft,paddingSM:Dt,controlPaddingHorizontalSM:an,controlPaddingHorizontal:it,colorFillAlter:en,colorPrimaryHover:_n,controlOutlineWidth:yn,controlOutline:Ve,colorErrorOutline:Le,colorWarningOutline:Bt}=Ce;return{paddingBlock:Math.max(Math.round((xe-Ue*Ze)/2*10)/10-St,3),paddingBlockSM:Math.max(Math.round((mt-Ue*Ze)/2*10)/10-St,0),paddingBlockLG:Math.ceil((Pt-Qe*Ft)/2*10)/10-St,paddingInline:Dt-St,paddingInlineSM:an-St,paddingInlineLG:it-St,addonBg:en,activeBorderColor:_n,hoverBorderColor:_n,activeShadow:`0 0 0 ${yn}px ${Ve}`,errorActiveShadow:`0 0 0 ${yn}px ${Le}`,warningActiveShadow:`0 0 0 ${yn}px ${Bt}`}};Yt.ZP=(0,Je.Z)("Input",Ce=>{const xe=(0,Be.TS)(Ce,qe(Ce));return[ht(xe),Vt(xe),et(xe),Ee(xe),yt(xe),(0,We.c)(xe)]},ut)},71322:function(En,Yt,se){"use strict";se.d(Yt,{D:function(){return Vt},Z:function(){return Ce}});var fe=se(87462),We=se(67294),Be={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"},Je=Be,ve=se(84089),Te=function(Ue,Ze){return We.createElement(ve.Z,(0,fe.Z)({},Ue,{ref:Ze,icon:Je}))},_e=We.forwardRef(Te),we=se(22751),me=se(91034),De=se(94184),at=se.n(De),Oe=se(10366),ht=xe=>!isNaN(parseFloat(xe))&&isFinite(xe),lt=se(53124),et=se(84321),Ee=function(xe,Ue){var Ze={};for(var St in xe)Object.prototype.hasOwnProperty.call(xe,St)&&Ue.indexOf(St)<0&&(Ze[St]=xe[St]);if(xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,St=Object.getOwnPropertySymbols(xe);mt<St.length;mt++)Ue.indexOf(St[mt])<0&&Object.prototype.propertyIsEnumerable.call(xe,St[mt])&&(Ze[St[mt]]=xe[St[mt]]);return Ze};const yt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Vt=We.createContext({}),qe=(()=>{let xe=0;return function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return xe+=1,`${Ue}${xe}`}})();var Ce=We.forwardRef((xe,Ue)=>{const{prefixCls:Ze,className:St,trigger:mt,children:Pt,defaultCollapsed:Qe=!1,theme:Ft="dark",style:Dt={},collapsible:an=!1,reverseArrow:it=!1,width:en=200,collapsedWidth:_n=80,zeroWidthTriggerStyle:yn,breakpoint:Ve,onCollapse:Le,onBreakpoint:Bt}=xe,Dn=Ee(xe,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:dn}=(0,We.useContext)(et.Gs),[nt,ft]=(0,We.useState)("collapsed"in xe?xe.collapsed:Qe),[Xt,Rn]=(0,We.useState)(!1);(0,We.useEffect)(()=>{"collapsed"in xe&&ft(xe.collapsed)},[xe.collapsed]);const wn=(ue,le)=>{"collapsed"in xe||ft(ue),Le==null||Le(ue,le)},Zt=(0,We.useRef)();Zt.current=ue=>{Rn(ue.matches),Bt==null||Bt(ue.matches),nt!==ue.matches&&wn(ue.matches,"responsive")},(0,We.useEffect)(()=>{function ue(pe){return Zt.current(pe)}let le;if(typeof window!="undefined"){const{matchMedia:pe}=window;if(pe&&Ve&&Ve in yt){le=pe(`(max-width: ${yt[Ve]})`);try{le.addEventListener("change",ue)}catch(he){le.addListener(ue)}ue(le)}}return()=>{try{le==null||le.removeEventListener("change",ue)}catch(pe){le==null||le.removeListener(ue)}}},[Ve]),(0,We.useEffect)(()=>{const ue=qe("ant-sider-");return dn.addSider(ue),()=>dn.removeSider(ue)},[]);const Ht=()=>{wn(!nt,"clickTrigger")},{getPrefixCls:Tn}=(0,We.useContext)(lt.E_),xn=()=>{const ue=Tn("layout-sider",Ze),le=(0,Oe.Z)(Dn,["collapsed"]),pe=nt?_n:en,he=ht(pe)?`${pe}px`:String(pe),oe=parseFloat(String(_n||0))===0?We.createElement("span",{onClick:Ht,className:at()(`${ue}-zero-width-trigger`,`${ue}-zero-width-trigger-${it?"right":"left"}`),style:yn},mt||We.createElement(_e,null)):null,_t={expanded:it?We.createElement(me.Z,null):We.createElement(we.Z,null),collapsed:it?We.createElement(we.Z,null):We.createElement(me.Z,null)}[nt?"collapsed":"expanded"],Rt=mt!==null?oe||We.createElement("div",{className:`${ue}-trigger`,onClick:Ht,style:{width:he}},mt||_t):null,zt=Object.assign(Object.assign({},Dt),{flex:`0 0 ${he}`,maxWidth:he,minWidth:he,width:he}),qt=at()(ue,`${ue}-${Ft}`,{[`${ue}-collapsed`]:!!nt,[`${ue}-has-trigger`]:an&&mt!==null&&!oe,[`${ue}-below`]:!!Xt,[`${ue}-zero-width`]:parseFloat(he)===0},St);return We.createElement("aside",Object.assign({className:qt},le,{style:zt,ref:Ue}),We.createElement("div",{className:`${ue}-children`},Pt),an||Xt&&oe?Rt:null)},ke=We.useMemo(()=>({siderCollapsed:nt}),[nt]);return We.createElement(Vt.Provider,{value:ke},xn())})},84321:function(En,Yt,se){"use strict";se.d(Yt,{VY:function(){return qe},$_:function(){return Vt},h4:function(){return yt},Gs:function(){return Mt},ZP:function(){return ut}});var fe=se(74902),We=se(94184),Be=se.n(We),Je=se(10366),ve=se(67294),Te=se(53124),_e=se(67968),me=Ce=>{const{componentCls:xe,bodyBg:Ue,lightSiderBg:Ze,lightTriggerBg:St,lightTriggerColor:mt}=Ce;return{[`${xe}-sider-light`]:{background:Ze,[`${xe}-sider-trigger`]:{color:mt,background:St},[`${xe}-sider-zero-width-trigger`]:{color:mt,background:St,border:`1px solid ${Ue}`,borderInlineStart:0}}}};const De=Ce=>{const{antCls:xe,componentCls:Ue,colorText:Ze,triggerColor:St,footerBg:mt,triggerBg:Pt,headerHeight:Qe,headerPadding:Ft,headerColor:Dt,footerPadding:an,triggerHeight:it,zeroTriggerHeight:en,zeroTriggerWidth:_n,motionDurationMid:yn,motionDurationSlow:Ve,fontSize:Le,borderRadius:Bt,bodyBg:Dn,headerBg:dn,siderBg:nt}=Ce;return{[Ue]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Dn,"&, *":{boxSizing:"border-box"},[`&${Ue}-has-sider`]:{flexDirection:"row",[`> ${Ue}, > ${Ue}-content`]:{width:0}},[`${Ue}-header, &${Ue}-footer`]:{flex:"0 0 auto"},[`${Ue}-sider`]:{position:"relative",minWidth:0,background:nt,transition:`all ${yn}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${xe}-menu${xe}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:it},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:it,color:St,lineHeight:`${it}px`,textAlign:"center",background:Pt,cursor:"pointer",transition:`all ${yn}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Qe,insetInlineEnd:-_n,zIndex:1,width:_n,height:en,color:St,fontSize:Ce.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:nt,borderStartStartRadius:0,borderStartEndRadius:Bt,borderEndEndRadius:Bt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Ve} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Ve}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-_n,borderStartStartRadius:Bt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Bt}}}}},me(Ce)),{"&-rtl":{direction:"rtl"}}),[`${Ue}-header`]:{height:Qe,padding:Ft,color:Dt,lineHeight:`${Qe}px`,background:dn,[`${xe}-menu`]:{lineHeight:"inherit"}},[`${Ue}-footer`]:{padding:an,color:Ze,fontSize:Le,background:mt},[`${Ue}-content`]:{flex:"auto",minHeight:0}}};var at=(0,_e.Z)("Layout",Ce=>[De(Ce)],Ce=>{const{colorBgLayout:xe,controlHeight:Ue,controlHeightLG:Ze,colorText:St,controlHeightSM:mt,marginXXS:Pt,colorTextLightSolid:Qe,colorBgContainer:Ft}=Ce,Dt=Ze*1.25;return{colorBgHeader:"#001529",colorBgBody:xe,colorBgTrigger:"#002140",bodyBg:xe,headerBg:"#001529",headerHeight:Ue*2,headerPadding:`0 ${Dt}px`,headerColor:St,footerPadding:`${mt}px ${Dt}px`,footerBg:xe,siderBg:"#001529",triggerHeight:Ze+Pt*2,triggerBg:"#002140",triggerColor:Qe,zeroTriggerWidth:Ze,zeroTriggerHeight:Ze,lightSiderBg:Ft,lightTriggerBg:Ft,lightTriggerColor:St}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),Oe=function(Ce,xe){var Ue={};for(var Ze in Ce)Object.prototype.hasOwnProperty.call(Ce,Ze)&&xe.indexOf(Ze)<0&&(Ue[Ze]=Ce[Ze]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var St=0,Ze=Object.getOwnPropertySymbols(Ce);St<Ze.length;St++)xe.indexOf(Ze[St])<0&&Object.prototype.propertyIsEnumerable.call(Ce,Ze[St])&&(Ue[Ze[St]]=Ce[Ze[St]]);return Ue};const Mt=ve.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ht(Ce){let{suffixCls:xe,tagName:Ue,displayName:Ze}=Ce;return St=>ve.forwardRef((Pt,Qe)=>ve.createElement(St,Object.assign({ref:Qe,suffixCls:xe,tagName:Ue},Pt)))}const lt=ve.forwardRef((Ce,xe)=>{const{prefixCls:Ue,suffixCls:Ze,className:St,tagName:mt}=Ce,Pt=Oe(Ce,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Qe}=ve.useContext(Te.E_),Ft=Qe("layout",Ue),[Dt,an]=at(Ft),it=Ze?`${Ft}-${Ze}`:Ft;return Dt(ve.createElement(mt,Object.assign({className:Be()(Ue||it,St,an),ref:xe},Pt)))}),et=ve.forwardRef((Ce,xe)=>{const{direction:Ue}=ve.useContext(Te.E_),[Ze,St]=ve.useState([]),{prefixCls:mt,className:Pt,rootClassName:Qe,children:Ft,hasSider:Dt,tagName:an,style:it}=Ce,en=Oe(Ce,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),_n=(0,Je.Z)(en,["suffixCls"]),{getPrefixCls:yn,layout:Ve}=ve.useContext(Te.E_),Le=yn("layout",mt),[Bt,Dn]=at(Le),dn=Be()(Le,{[`${Le}-has-sider`]:typeof Dt=="boolean"?Dt:Ze.length>0,[`${Le}-rtl`]:Ue==="rtl"},Ve==null?void 0:Ve.className,Pt,Qe,Dn),nt=ve.useMemo(()=>({siderHook:{addSider:ft=>{St(Xt=>[].concat((0,fe.Z)(Xt),[ft]))},removeSider:ft=>{St(Xt=>Xt.filter(Rn=>Rn!==ft))}}}),[]);return Bt(ve.createElement(Mt.Provider,{value:nt},ve.createElement(an,Object.assign({ref:xe,className:dn,style:Object.assign(Object.assign({},Ve==null?void 0:Ve.style),it)},_n),Ft)))}),Ee=ht({tagName:"div",displayName:"Layout"})(et),yt=ht({suffixCls:"header",tagName:"header",displayName:"Header"})(lt),Vt=ht({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(lt),qe=ht({suffixCls:"content",tagName:"main",displayName:"Content"})(lt);var ut=Ee},76529:function(En,Yt,se){"use strict";se.d(Yt,{J:function(){return Te}});var fe=se(67294),We=se(4173),Be=se(60276),Je=function(_e,we){var me={};for(var De in _e)Object.prototype.hasOwnProperty.call(_e,De)&&we.indexOf(De)<0&&(me[De]=_e[De]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,De=Object.getOwnPropertySymbols(_e);at<De.length;at++)we.indexOf(De[at])<0&&Object.prototype.propertyIsEnumerable.call(_e,De[at])&&(me[De[at]]=_e[De[at]]);return me};const ve=fe.createContext(null),Te=fe.forwardRef((_e,we)=>{const{children:me}=_e,De=Je(_e,["children"]),at=fe.useContext(ve),Oe=fe.useMemo(()=>Object.assign(Object.assign({},at),De),[at,De.prefixCls,De.mode,De.selectable]);return fe.createElement(ve.Provider,{value:Oe},fe.createElement(We.BR,null,(0,Be.supportNodeRef)(me)?fe.cloneElement(me,{ref:we}):me))});Yt.Z=ve},68508:function(En,Yt,se){"use strict";se.d(Yt,{default:function(){return ue}});var fe=se(78595),We=se(67294),Be=se(71322),Je=se(94184),ve=se.n(Je),Te=se(53124),_e=function(le,pe){var he={};for(var oe in le)Object.prototype.hasOwnProperty.call(le,oe)&&pe.indexOf(oe)<0&&(he[oe]=le[oe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,oe=Object.getOwnPropertySymbols(le);Ae<oe.length;Ae++)pe.indexOf(oe[Ae])<0&&Object.prototype.propertyIsEnumerable.call(le,oe[Ae])&&(he[oe[Ae]]=le[oe[Ae]]);return he},me=le=>{const{prefixCls:pe,className:he,dashed:oe}=le,Ae=_e(le,["prefixCls","className","dashed"]),{getPrefixCls:Ge}=We.useContext(Te.E_),_t=Ge("menu",pe),Rt=ve()({[`${_t}-item-divider-dashed`]:!!oe},he);return We.createElement(fe.iz,Object.assign({className:Rt},Ae))},De=se(37419),at=se(10366),Oe=se(83062),Mt=se(96159),lt=(0,We.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),Ee=le=>{var pe;const{className:he,children:oe,icon:Ae,title:Ge,danger:_t}=le,{prefixCls:Rt,firstLevel:zt,direction:qt,disableMenuItemTitleTooltip:jt,inlineCollapsed:ar}=We.useContext(lt),xr=Kt=>{const Bn=We.createElement("span",{className:`${Rt}-title-content`},oe);return(!Ae||(0,Mt.l$)(oe)&&oe.type==="span")&&oe&&Kt&&zt&&typeof oe=="string"?We.createElement("div",{className:`${Rt}-inline-collapsed-noicon`},oe.charAt(0)):Bn},{siderCollapsed:Nt}=We.useContext(Be.D);let pn=Ge;typeof Ge=="undefined"?pn=zt?oe:"":Ge===!1&&(pn="");const cr={title:pn};!Nt&&!ar&&(cr.title=null,cr.open=!1);const Rr=(0,De.Z)(oe).length;let rt=We.createElement(fe.ck,Object.assign({},(0,at.Z)(le,["title","icon","danger"]),{className:ve()({[`${Rt}-item-danger`]:_t,[`${Rt}-item-only-child`]:(Ae?Rr+1:Rr)===1},he),title:typeof Ge=="string"?Ge:void 0}),(0,Mt.Tm)(Ae,{className:ve()((0,Mt.l$)(Ae)?(pe=Ae.props)===null||pe===void 0?void 0:pe.className:"",`${Rt}-item-icon`)}),xr(ar));return jt||(rt=We.createElement(Oe.Z,Object.assign({},cr,{placement:qt==="rtl"?"left":"right",overlayClassName:`${Rt}-inline-collapsed-tooltip`}),rt)),rt},Vt=le=>{var pe;const{popupClassName:he,icon:oe,title:Ae,theme:Ge}=le,_t=We.useContext(lt),{prefixCls:Rt,inlineCollapsed:zt,theme:qt}=_t,jt=(0,fe.Xl)();let ar;if(!oe)ar=zt&&!jt.length&&Ae&&typeof Ae=="string"?We.createElement("div",{className:`${Rt}-inline-collapsed-noicon`},Ae.charAt(0)):We.createElement("span",{className:`${Rt}-title-content`},Ae);else{const Nt=(0,Mt.l$)(Ae)&&Ae.type==="span";ar=We.createElement(We.Fragment,null,(0,Mt.Tm)(oe,{className:ve()((0,Mt.l$)(oe)?(pe=oe.props)===null||pe===void 0?void 0:pe.className:"",`${Rt}-item-icon`)}),Nt?Ae:We.createElement("span",{className:`${Rt}-title-content`},Ae))}const xr=We.useMemo(()=>Object.assign(Object.assign({},_t),{firstLevel:!1}),[_t]);return We.createElement(lt.Provider,{value:xr},We.createElement(fe.Wd,Object.assign({},(0,at.Z)(le,["icon"]),{title:ar,popupClassName:ve()(Rt,he,`${Rt}-${Ge||qt}`)})))},qe=se(25877),ut=se(60276),Ce=se(33603),xe=se(76529),Ue=function(le,pe){var he={};for(var oe in le)Object.prototype.hasOwnProperty.call(le,oe)&&pe.indexOf(oe)<0&&(he[oe]=le[oe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,oe=Object.getOwnPropertySymbols(le);Ae<oe.length;Ae++)pe.indexOf(oe[Ae])<0&&Object.prototype.propertyIsEnumerable.call(le,oe[Ae])&&(he[oe[Ae]]=le[oe[Ae]]);return he};function Ze(le){return(le||[]).map((pe,he)=>{if(pe&&typeof pe=="object"){const oe=pe,{label:Ae,children:Ge,key:_t,type:Rt}=oe,zt=Ue(oe,["label","children","key","type"]),qt=_t!=null?_t:`tmp-${he}`;return Ge||Rt==="group"?Rt==="group"?We.createElement(fe.BW,Object.assign({key:qt},zt,{title:Ae}),Ze(Ge)):We.createElement(Vt,Object.assign({key:qt},zt,{title:Ae}),Ze(Ge)):Rt==="divider"?We.createElement(me,Object.assign({key:qt},zt)):We.createElement(Ee,Object.assign({key:qt},zt),Ae)}return null}).filter(pe=>pe)}function St(le){return We.useMemo(()=>le&&Ze(le),[le])}var mt=se(84780),Pt=se(14747),Qe=se(33507),Ft=se(67771),Dt=se(50438),an=se(67968),it=se(45503),_n=le=>{const{componentCls:pe,motionDurationSlow:he,horizontalLineHeight:oe,colorSplit:Ae,lineWidth:Ge,lineType:_t,itemPaddingInline:Rt}=le;return{[`${pe}-horizontal`]:{lineHeight:oe,border:0,borderBottom:`${Ge}px ${_t} ${Ae}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${pe}-item, ${pe}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Rt},[`> ${pe}-item:hover,
|
|
|
> ${pe}-item-active,
|
|
|
> ${pe}-submenu ${pe}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${pe}-item, ${pe}-submenu-title`]:{transition:[`border-color ${he}`,`background ${he}`].join(",")},[`${pe}-submenu-arrow`]:{display:"none"}}}},Ve=le=>{let{componentCls:pe,menuArrowOffset:he}=le;return{[`${pe}-rtl`]:{direction:"rtl"},[`${pe}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${pe}-rtl${pe}-vertical,
|
|
|
${pe}-submenu-rtl ${pe}-vertical`]:{[`${pe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${he})`},"&::after":{transform:`rotate(45deg) translateY(${he})`}}}}};const Le=le=>Object.assign({},(0,Pt.oN)(le));var Dn=(le,pe)=>{const{componentCls:he,itemColor:oe,itemSelectedColor:Ae,groupTitleColor:Ge,itemBg:_t,subMenuItemBg:Rt,itemSelectedBg:zt,activeBarHeight:qt,activeBarWidth:jt,activeBarBorderWidth:ar,motionDurationSlow:xr,motionEaseInOut:Nt,motionEaseOut:pn,itemPaddingInline:cr,motionDurationMid:Rr,itemHoverColor:rt,lineType:Kt,colorSplit:Bn,itemDisabledColor:Gn,dangerItemColor:tr,dangerItemHoverColor:Sr,dangerItemSelectedColor:Ar,dangerItemActiveBg:Mr,dangerItemSelectedBg:Pr,itemHoverBg:Vr,itemActiveBg:lr,menuSubMenuBg:si,horizontalItemSelectedColor:Li,horizontalItemSelectedBg:Ni,horizontalItemBorderRadius:Hi,horizontalItemHoverBg:ri,popupBg:vt}=le;return{[`${he}-${pe}, ${he}-${pe} > ${he}`]:{color:oe,background:_t,[`&${he}-root:focus-visible`]:Object.assign({},Le(le)),[`${he}-item-group-title`]:{color:Ge},[`${he}-submenu-selected`]:{[`> ${he}-submenu-title`]:{color:Ae}},[`${he}-item-disabled, ${he}-submenu-disabled`]:{color:`${Gn} !important`},[`${he}-item:not(${he}-item-selected):not(${he}-submenu-selected)`]:{[`&:hover, > ${he}-submenu-title:hover`]:{color:rt}},[`&:not(${he}-horizontal)`]:{[`${he}-item:not(${he}-item-selected)`]:{"&:hover":{backgroundColor:Vr},"&:active":{backgroundColor:lr}},[`${he}-submenu-title`]:{"&:hover":{backgroundColor:Vr},"&:active":{backgroundColor:lr}}},[`${he}-item-danger`]:{color:tr,[`&${he}-item:hover`]:{[`&:not(${he}-item-selected):not(${he}-submenu-selected)`]:{color:Sr}},[`&${he}-item:active`]:{background:Mr}},[`${he}-item a`]:{"&, &:hover":{color:"inherit"}},[`${he}-item-selected`]:{color:Ae,[`&${he}-item-danger`]:{color:Ar},"a, a:hover":{color:"inherit"}},[`& ${he}-item-selected`]:{backgroundColor:zt,[`&${he}-item-danger`]:{backgroundColor:Pr}},[`${he}-item, ${he}-submenu-title`]:{[`&:not(${he}-item-disabled):focus-visible`]:Object.assign({},Le(le))},[`&${he}-submenu > ${he}`]:{backgroundColor:si},[`&${he}-popup > ${he}`]:{backgroundColor:vt},[`&${he}-horizontal`]:Object.assign(Object.assign({},pe==="dark"?{borderBottom:0}:{}),{[`> ${he}-item, > ${he}-submenu`]:{top:ar,marginTop:-ar,marginBottom:0,borderRadius:Hi,"&::after":{position:"absolute",insetInline:cr,bottom:0,borderBottom:`${qt}px solid transparent`,transition:`border-color ${xr} ${Nt}`,content:'""'},"&:hover, &-active, &-open":{background:ri,"&::after":{borderBottomWidth:qt,borderBottomColor:Li}},"&-selected":{color:Li,backgroundColor:Ni,"&:hover":{backgroundColor:Ni},"&::after":{borderBottomWidth:qt,borderBottomColor:Li}}}}),[`&${he}-root`]:{[`&${he}-inline, &${he}-vertical`]:{borderInlineEnd:`${ar}px ${Kt} ${Bn}`}},[`&${he}-inline`]:{[`${he}-sub${he}-inline`]:{background:Rt},[`${he}-item, ${he}-submenu-title`]:ar&&jt?{width:`calc(100% + ${ar}px)`}:{},[`${he}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${jt}px solid ${Ae}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Rr} ${pn}`,`opacity ${Rr} ${pn}`].join(","),content:'""'},[`&${he}-item-danger`]:{"&::after":{borderInlineEndColor:Ar}}},[`${he}-selected, ${he}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Rr} ${Nt}`,`opacity ${Rr} ${Nt}`].join(",")}}}}}};const dn=le=>{const{componentCls:pe,itemHeight:he,itemMarginInline:oe,padding:Ae,menuArrowSize:Ge,marginXS:_t,itemMarginBlock:Rt}=le,zt=Ae+Ge+_t;return{[`${pe}-item`]:{position:"relative",overflow:"hidden"},[`${pe}-item, ${pe}-submenu-title`]:{height:he,lineHeight:`${he}px`,paddingInline:Ae,overflow:"hidden",textOverflow:"ellipsis",marginInline:oe,marginBlock:Rt,width:`calc(100% - ${oe*2}px)`},[`> ${pe}-item,
|
|
|
> ${pe}-submenu > ${pe}-submenu-title`]:{height:he,lineHeight:`${he}px`},[`${pe}-item-group-list ${pe}-submenu-title,
|
|
|
${pe}-submenu-title`]:{paddingInlineEnd:zt}}};var ft=le=>{const{componentCls:pe,iconCls:he,itemHeight:oe,colorTextLightSolid:Ae,dropdownWidth:Ge,controlHeightLG:_t,motionDurationMid:Rt,motionEaseOut:zt,paddingXL:qt,itemMarginInline:jt,fontSizeLG:ar,motionDurationSlow:xr,paddingXS:Nt,boxShadowSecondary:pn,collapsedWidth:cr,collapsedIconSize:Rr}=le,rt={height:oe,lineHeight:`${oe}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[pe]:{"&-inline, &-vertical":Object.assign({[`&${pe}-root`]:{boxShadow:"none"}},dn(le))},[`${pe}-submenu-popup`]:{[`${pe}-vertical`]:Object.assign(Object.assign({},dn(le)),{boxShadow:pn})}},{[`${pe}-submenu-popup ${pe}-vertical${pe}-sub`]:{minWidth:Ge,maxHeight:`calc(100vh - ${_t*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${pe}-inline`]:{width:"100%",[`&${pe}-root`]:{[`${pe}-item, ${pe}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${xr}`,`background ${xr}`,`padding ${Rt} ${zt}`].join(","),[`> ${pe}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${pe}-sub${pe}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${pe}-submenu > ${pe}-submenu-title`]:rt,[`& ${pe}-item-group-title`]:{paddingInlineStart:qt}},[`${pe}-item`]:rt}},{[`${pe}-inline-collapsed`]:{width:cr,[`&${pe}-root`]:{[`${pe}-item, ${pe}-submenu ${pe}-submenu-title`]:{[`> ${pe}-inline-collapsed-noicon`]:{fontSize:ar,textAlign:"center"}}},[`> ${pe}-item,
|
|
|
> ${pe}-item-group > ${pe}-item-group-list > ${pe}-item,
|
|
|
> ${pe}-item-group > ${pe}-item-group-list > ${pe}-submenu > ${pe}-submenu-title,
|
|
|
> ${pe}-submenu > ${pe}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${ar/2}px - ${jt}px)`,textOverflow:"clip",[`
|
|
|
${pe}-submenu-arrow,
|
|
|
${pe}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${pe}-item-icon, ${he}`]:{margin:0,fontSize:Rr,lineHeight:`${oe}px`,"+ span":{display:"inline-block",opacity:0}}},[`${pe}-item-icon, ${he}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${pe}-item-icon, ${he}`]:{display:"none"},"a, a:hover":{color:Ae}},[`${pe}-item-group-title`]:Object.assign(Object.assign({},Pt.vS),{paddingInline:Nt})}}]};const Xt=le=>{const{componentCls:pe,motionDurationSlow:he,motionDurationMid:oe,motionEaseInOut:Ae,motionEaseOut:Ge,iconCls:_t,iconSize:Rt,iconMarginInlineEnd:zt}=le;return{[`${pe}-item, ${pe}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${he}`,`background ${he}`,`padding ${he} ${Ae}`].join(","),[`${pe}-item-icon, ${_t}`]:{minWidth:Rt,fontSize:Rt,transition:[`font-size ${oe} ${Ge}`,`margin ${he} ${Ae}`,`color ${he}`].join(","),"+ span":{marginInlineStart:zt,opacity:1,transition:[`opacity ${he} ${Ae}`,`margin ${he}`,`color ${he}`].join(",")}},[`${pe}-item-icon`]:Object.assign({},(0,Pt.Ro)()),[`&${pe}-item-only-child`]:{[`> ${_t}, > ${pe}-item-icon`]:{marginInlineEnd:0}}},[`${pe}-item-disabled, ${pe}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${pe}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Rn=le=>{const{componentCls:pe,motionDurationSlow:he,motionEaseInOut:oe,borderRadius:Ae,menuArrowSize:Ge,menuArrowOffset:_t}=le;return{[`${pe}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:le.margin,width:Ge,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${he} ${oe}, opacity ${he}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ge*.6,height:Ge*.15,backgroundColor:"currentcolor",borderRadius:Ae,transition:[`background ${he} ${oe}`,`transform ${he} ${oe}`,`top ${he} ${oe}`,`color ${he} ${oe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${_t})`},"&::after":{transform:`rotate(-45deg) translateY(${_t})`}}}}},wn=le=>{const{antCls:pe,componentCls:he,fontSize:oe,motionDurationSlow:Ae,motionDurationMid:Ge,motionEaseInOut:_t,paddingXS:Rt,padding:zt,colorSplit:qt,lineWidth:jt,zIndexPopup:ar,borderRadiusLG:xr,subMenuItemBorderRadius:Nt,menuArrowSize:pn,menuArrowOffset:cr,lineType:Rr,menuPanelMaskInset:rt,groupTitleLineHeight:Kt,groupTitleFontSize:Bn}=le;return[{"":{[`${he}`]:Object.assign(Object.assign({},(0,Pt.dF)()),{"&-hidden":{display:"none"}})},[`${he}-submenu-hidden`]:{display:"none"}},{[he]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Pt.Wf)(le)),(0,Pt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:oe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Ae} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${he}-item`]:{flex:"none"}},[`${he}-item, ${he}-submenu, ${he}-submenu-title`]:{borderRadius:le.itemBorderRadius},[`${he}-item-group-title`]:{padding:`${Rt}px ${zt}px`,fontSize:Bn,lineHeight:Kt,transition:`all ${Ae}`},[`&-horizontal ${he}-submenu`]:{transition:[`border-color ${Ae} ${_t}`,`background ${Ae} ${_t}`].join(",")},[`${he}-submenu, ${he}-submenu-inline`]:{transition:[`border-color ${Ae} ${_t}`,`background ${Ae} ${_t}`,`padding ${Ge} ${_t}`].join(",")},[`${he}-submenu ${he}-sub`]:{cursor:"initial",transition:[`background ${Ae} ${_t}`,`padding ${Ae} ${_t}`].join(",")},[`${he}-title-content`]:{transition:`color ${Ae}`},[`${he}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${he}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:qt,borderStyle:Rr,borderWidth:0,borderTopWidth:jt,marginBlock:jt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Xt(le)),{[`${he}-item-group`]:{[`${he}-item-group-list`]:{margin:0,padding:0,[`${he}-item, ${he}-submenu-title`]:{paddingInline:`${oe*2}px ${zt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:ar,borderRadius:xr,boxShadow:"none",transformOrigin:"0 0",[`&${he}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${rt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:rt},"\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:le.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:le.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:le.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:le.paddingXS},[`> ${he}`]:Object.assign(Object.assign(Object.assign({borderRadius:xr},Xt(le)),Rn(le)),{[`${he}-item, ${he}-submenu > ${he}-submenu-title`]:{borderRadius:Nt},[`${he}-submenu-title::after`]:{transition:`transform ${Ae} ${_t}`}})}}),Rn(le)),{[`&-inline-collapsed ${he}-submenu-arrow,
|
|
|
&-inline ${he}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${cr})`},"&::after":{transform:`rotate(45deg) translateX(-${cr})`}},[`${he}-submenu-open${he}-submenu-inline > ${he}-submenu-title > ${he}-submenu-arrow`]:{transform:`translateY(-${pn*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${cr})`},"&::before":{transform:`rotate(45deg) translateX(${cr})`}}})},{[`${pe}-layout-header`]:{[he]:{lineHeight:"inherit"}}}]};var Zt=(le,pe)=>(0,an.Z)("Menu",oe=>{if(pe===!1)return[];const{colorBgElevated:Ae,colorPrimary:Ge,colorTextLightSolid:_t,controlHeightLG:Rt,fontSize:zt,darkItemColor:qt,darkDangerItemColor:jt,darkItemBg:ar,darkSubMenuItemBg:xr,darkItemSelectedColor:Nt,darkItemSelectedBg:pn,darkDangerItemSelectedBg:cr,darkItemHoverBg:Rr,darkGroupTitleColor:rt,darkItemHoverColor:Kt,darkItemDisabledColor:Bn,darkDangerItemHoverColor:Gn,darkDangerItemSelectedColor:tr,darkDangerItemActiveBg:Sr}=oe,Ar=zt/7*5,Mr=(0,it.TS)(oe,{menuArrowSize:Ar,menuHorizontalHeight:Rt*1.15,menuArrowOffset:`${Ar*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Ae}),Pr=(0,it.TS)(Mr,{itemColor:qt,itemHoverColor:Kt,groupTitleColor:rt,itemSelectedColor:Nt,itemBg:ar,popupBg:ar,subMenuItemBg:xr,itemActiveBg:"transparent",itemSelectedBg:pn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Rr,itemDisabledColor:Bn,dangerItemColor:jt,dangerItemHoverColor:Gn,dangerItemSelectedColor:tr,dangerItemActiveBg:Sr,dangerItemSelectedBg:cr,menuSubMenuBg:xr,horizontalItemSelectedColor:_t,horizontalItemSelectedBg:Ge});return[wn(Mr),_n(Mr),ft(Mr),Dn(Mr,"light"),Dn(Pr,"dark"),Ve(Mr),(0,Qe.Z)(Mr),(0,Ft.oN)(Mr,"slide-up"),(0,Ft.oN)(Mr,"slide-down"),(0,Dt._y)(Mr,"zoom-big")]},oe=>{const{colorPrimary:Ae,colorError:Ge,colorTextDisabled:_t,colorErrorBg:Rt,colorText:zt,colorTextDescription:qt,colorBgContainer:jt,colorFillAlter:ar,colorFillContent:xr,lineWidth:Nt,lineWidthBold:pn,controlItemBgActive:cr,colorBgTextHover:Rr,controlHeightLG:rt,lineHeight:Kt,colorBgElevated:Bn,marginXXS:Gn,padding:tr,fontSize:Sr,controlHeightSM:Ar,fontSizeLG:Mr,colorTextLightSolid:Pr,colorErrorHover:Vr}=oe,lr=new mt.C(Pr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:oe.zIndexPopupBase+50,radiusItem:oe.borderRadiusLG,itemBorderRadius:oe.borderRadiusLG,radiusSubMenuItem:oe.borderRadiusSM,subMenuItemBorderRadius:oe.borderRadiusSM,colorItemText:zt,itemColor:zt,colorItemTextHover:zt,itemHoverColor:zt,colorItemTextHoverHorizontal:Ae,horizontalItemHoverColor:Ae,colorGroupTitle:qt,groupTitleColor:qt,colorItemTextSelected:Ae,itemSelectedColor:Ae,colorItemTextSelectedHorizontal:Ae,horizontalItemSelectedColor:Ae,colorItemBg:jt,itemBg:jt,colorItemBgHover:Rr,itemHoverBg:Rr,colorItemBgActive:xr,itemActiveBg:cr,colorSubItemBg:ar,subMenuItemBg:ar,colorItemBgSelected:cr,itemSelectedBg:cr,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:pn,activeBarHeight:pn,colorActiveBarBorderSize:Nt,activeBarBorderWidth:Nt,colorItemTextDisabled:_t,itemDisabledColor:_t,colorDangerItemText:Ge,dangerItemColor:Ge,colorDangerItemTextHover:Ge,dangerItemHoverColor:Ge,colorDangerItemTextSelected:Ge,dangerItemSelectedColor:Ge,colorDangerItemBgActive:Rt,dangerItemActiveBg:Rt,colorDangerItemBgSelected:Rt,dangerItemSelectedBg:Rt,itemMarginInline:oe.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:rt,groupTitleLineHeight:Kt,collapsedWidth:rt*2,popupBg:Bn,itemMarginBlock:Gn,itemPaddingInline:tr,horizontalLineHeight:`${rt*1.15}px`,iconSize:Sr,iconMarginInlineEnd:Ar-Sr,collapsedIconSize:Mr,groupTitleFontSize:Sr,darkItemDisabledColor:new mt.C(Pr).setAlpha(.25).toRgbString(),darkItemColor:lr,darkDangerItemColor:Ge,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Pr,darkItemSelectedBg:Ae,darkDangerItemSelectedBg:Ge,darkItemHoverBg:"transparent",darkGroupTitleColor:lr,darkItemHoverColor:Pr,darkDangerItemHoverColor:Vr,darkDangerItemSelectedColor:Pr,darkDangerItemActiveBg:Ge}},{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"]]})(le),Ht=function(le,pe){var he={};for(var oe in le)Object.prototype.hasOwnProperty.call(le,oe)&&pe.indexOf(oe)<0&&(he[oe]=le[oe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,oe=Object.getOwnPropertySymbols(le);Ae<oe.length;Ae++)pe.indexOf(oe[Ae])<0&&Object.prototype.propertyIsEnumerable.call(le,oe[Ae])&&(he[oe[Ae]]=le[oe[Ae]]);return he},xn=(0,We.forwardRef)((le,pe)=>{var he,oe;const Ae=We.useContext(xe.Z),Ge=Ae||{},{getPrefixCls:_t,getPopupContainer:Rt,direction:zt,menu:qt}=We.useContext(Te.E_),jt=_t(),{prefixCls:ar,className:xr,style:Nt,theme:pn="light",expandIcon:cr,_internalDisableMenuItemTitleTooltip:Rr,inlineCollapsed:rt,siderCollapsed:Kt,items:Bn,children:Gn,rootClassName:tr,mode:Sr,selectable:Ar,onClick:Mr,overflowedIndicatorPopupClassName:Pr}=le,Vr=Ht(le,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),lr=(0,at.Z)(Vr,["collapsedWidth"]),si=St(Bn)||Gn;(he=Ge.validator)===null||he===void 0||he.call(Ge,{mode:Sr});const Li=(0,ut.useEvent)(function(){var $n;Mr==null||Mr.apply(void 0,arguments),($n=Ge.onClick)===null||$n===void 0||$n.call(Ge)}),Ni=Ge.mode||Sr,Hi=Ar!=null?Ar:Ge.selectable,ri=We.useMemo(()=>Kt!==void 0?Kt:rt,[rt,Kt]),vt={horizontal:{motionName:`${jt}-slide-up`},inline:(0,Ce.Z)(jt),other:{motionName:`${jt}-zoom-big`}},Sn=_t("menu",ar||Ge.prefixCls),[kn,In]=Zt(Sn,!Ae),sr=ve()(`${Sn}-${pn}`,qt==null?void 0:qt.className,xr);let qn;if(typeof cr=="function")qn=cr;else if(cr===null||cr===!1)qn=null;else if(Ge.expandIcon===null||Ge.expandIcon===!1)qn=null;else{const $n=cr!=null?cr:Ge.expandIcon;qn=(0,Mt.Tm)($n,{className:ve()(`${Sn}-submenu-expand-icon`,(0,Mt.l$)($n)?(oe=$n.props)===null||oe===void 0?void 0:oe.className:"")})}const hr=We.useMemo(()=>({prefixCls:Sn,inlineCollapsed:ri||!1,direction:zt,firstLevel:!0,theme:pn,mode:Ni,disableMenuItemTitleTooltip:Rr}),[Sn,ri,zt,Rr,pn]);return kn(We.createElement(xe.Z.Provider,{value:null},We.createElement(lt.Provider,{value:hr},We.createElement(fe.ZP,Object.assign({getPopupContainer:Rt,overflowedIndicator:We.createElement(qe.Z,null),overflowedIndicatorPopupClassName:ve()(Sn,`${Sn}-${pn}`,Pr),mode:Ni,selectable:Hi,onClick:Li},lr,{inlineCollapsed:ri,style:Object.assign(Object.assign({},qt==null?void 0:qt.style),Nt),className:sr,prefixCls:Sn,direction:zt,defaultMotions:vt,expandIcon:qn,ref:pe,rootClassName:ve()(tr,In)}),si))))});const ke=(0,We.forwardRef)((le,pe)=>{const he=(0,We.useRef)(null),oe=We.useContext(Be.D);return(0,We.useImperativeHandle)(pe,()=>({menu:he.current,focus:Ae=>{var Ge;(Ge=he.current)===null||Ge===void 0||Ge.focus(Ae)}})),We.createElement(xn,Object.assign({ref:he},le,oe))});ke.Item=Ee,ke.SubMenu=Vt,ke.Divider=me,ke.ItemGroup=fe.BW;var ue=ke},38703:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return Rr}});var fe=se(67294),We=se(87725),Be=se(18299),Je=se(16646),ve=se(73475),Te=se(94184),_e=se.n(Te),we=se(10366),me=se(53124),De=se(87462),at=se(1413),Oe=se(45987),Mt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ht=function(){var Kt=(0,fe.useRef)([]),Bn=(0,fe.useRef)(null);return(0,fe.useEffect)(function(){var Gn=Date.now(),tr=!1;Kt.current.forEach(function(Sr){if(Sr){tr=!0;var Ar=Sr.style;Ar.transitionDuration=".3s, .3s, .3s, .06s",Bn.current&&Gn-Bn.current<100&&(Ar.transitionDuration="0s, 0s")}}),tr&&(Bn.current=Date.now())}),Kt.current},lt=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],et=function(Kt){var Bn=(0,at.Z)((0,at.Z)({},Mt),Kt),Gn=Bn.className,tr=Bn.percent,Sr=Bn.prefixCls,Ar=Bn.strokeColor,Mr=Bn.strokeLinecap,Pr=Bn.strokeWidth,Vr=Bn.style,lr=Bn.trailColor,si=Bn.trailWidth,Li=Bn.transition,Ni=(0,Oe.Z)(Bn,lt);delete Ni.gapPosition;var Hi=Array.isArray(tr)?tr:[tr],ri=Array.isArray(Ar)?Ar:[Ar],vt=ht(),Sn=Pr/2,kn=100-Pr/2,In="M ".concat(Mr==="round"?Sn:0,",").concat(Sn,`
|
|
|
L `).concat(Mr==="round"?kn:100,",").concat(Sn),sr="0 0 100 ".concat(Pr),qn=0;return fe.createElement("svg",(0,De.Z)({className:_e()("".concat(Sr,"-line"),Gn),viewBox:sr,preserveAspectRatio:"none",style:Vr},Ni),fe.createElement("path",{className:"".concat(Sr,"-line-trail"),d:In,strokeLinecap:Mr,stroke:lr,strokeWidth:si||Pr,fillOpacity:"0"}),Hi.map(function(hr,$n){var Xe=1;switch(Mr){case"round":Xe=1-Pr/100;break;case"square":Xe=1-Pr/2/100;break;default:Xe=1;break}var ct={strokeDasharray:"".concat(hr*Xe,"px, 100px"),strokeDashoffset:"-".concat(qn,"px"),transition:Li||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Tt=ri[$n]||ri[ri.length-1];return qn+=hr,fe.createElement("path",{key:$n,className:"".concat(Sr,"-line-path"),d:In,strokeLinecap:Mr,stroke:Tt,strokeWidth:Pr,fillOpacity:"0",ref:function(He){vt[$n]=He},style:ct})}))},Ee=et,yt=se(71002),Vt=se(97685),qe=se(98924),ut=0,Ce=(0,qe.Z)();function xe(){var rt;return Ce?(rt=ut,ut+=1):rt="TEST_OR_SSR",rt}var Ue=function(rt){var Kt=fe.useState(),Bn=(0,Vt.Z)(Kt,2),Gn=Bn[0],tr=Bn[1];return fe.useEffect(function(){tr("rc_progress_".concat(xe()))},[]),rt||Gn},Ze=function(Kt){var Bn=Kt.bg,Gn=Kt.children;return fe.createElement("div",{style:{width:"100%",height:"100%",background:Bn}},Gn)};function St(rt,Kt){return Object.keys(rt).map(function(Bn){var Gn=parseFloat(Bn),tr="".concat(Math.floor(Gn*Kt),"%");return"".concat(rt[Bn]," ").concat(tr)})}var mt=fe.forwardRef(function(rt,Kt){var Bn=rt.prefixCls,Gn=rt.color,tr=rt.gradientId,Sr=rt.radius,Ar=rt.style,Mr=rt.ptg,Pr=rt.strokeLinecap,Vr=rt.strokeWidth,lr=rt.size,si=rt.gapDegree,Li=Gn&&(0,yt.Z)(Gn)==="object",Ni=Li?"#FFF":void 0,Hi=lr/2,ri=fe.createElement("circle",{className:"".concat(Bn,"-circle-path"),r:Sr,cx:Hi,cy:Hi,stroke:Ni,strokeLinecap:Pr,strokeWidth:Vr,opacity:Mr===0?0:1,style:Ar,ref:Kt});if(!Li)return ri;var vt="".concat(tr,"-conic"),Sn=si?"".concat(180+si/2,"deg"):"0deg",kn=St(Gn,(360-si)/360),In=St(Gn,1),sr="conic-gradient(from ".concat(Sn,", ").concat(kn.join(", "),")"),qn="linear-gradient(to ".concat(si?"bottom":"top",", ").concat(In.join(", "),")");return fe.createElement(fe.Fragment,null,fe.createElement("mask",{id:vt},ri),fe.createElement("foreignObject",{x:0,y:0,width:lr,height:lr,mask:"url(#".concat(vt,")")},fe.createElement(Ze,{bg:qn},fe.createElement(Ze,{bg:sr}))))}),Pt=mt,Qe=100,Ft=function(Kt,Bn,Gn,tr,Sr,Ar,Mr,Pr,Vr,lr){var si=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Li=Gn/100*360*((360-Ar)/360),Ni=Ar===0?0:{bottom:0,top:180,left:90,right:-90}[Mr],Hi=(100-tr)/100*Bn;Vr==="round"&&tr!==100&&(Hi+=lr/2,Hi>=Bn&&(Hi=Bn-.01));var ri=Qe/2;return{stroke:typeof Pr=="string"?Pr:void 0,strokeDasharray:"".concat(Bn,"px ").concat(Kt),strokeDashoffset:Hi+si,transform:"rotate(".concat(Sr+Li+Ni,"deg)"),transformOrigin:"".concat(ri,"px ").concat(ri,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Dt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function an(rt){var Kt=rt!=null?rt:[];return Array.isArray(Kt)?Kt:[Kt]}var it=function(Kt){var Bn=(0,at.Z)((0,at.Z)({},Mt),Kt),Gn=Bn.id,tr=Bn.prefixCls,Sr=Bn.steps,Ar=Bn.strokeWidth,Mr=Bn.trailWidth,Pr=Bn.gapDegree,Vr=Pr===void 0?0:Pr,lr=Bn.gapPosition,si=Bn.trailColor,Li=Bn.strokeLinecap,Ni=Bn.style,Hi=Bn.className,ri=Bn.strokeColor,vt=Bn.percent,Sn=(0,Oe.Z)(Bn,Dt),kn=Qe/2,In=Ue(Gn),sr="".concat(In,"-gradient"),qn=kn-Ar/2,hr=Math.PI*2*qn,$n=Vr>0?90+Vr/2:-90,Xe=hr*((360-Vr)/360),ct=(0,yt.Z)(Sr)==="object"?Sr:{count:Sr,space:2},Tt=ct.count,Wt=ct.space,He=an(vt),pt=an(ri),$t=pt.find(function(er){return er&&(0,yt.Z)(er)==="object"}),Ot=$t&&(0,yt.Z)($t)==="object",Jt=Ot?"butt":Li,tn=Ft(hr,Xe,0,100,$n,Vr,lr,si,Jt,Ar),Un=ht(),_r=function(){var ur=0;return He.map(function(dr,gt){var ot=pt[gt]||pt[pt.length-1],Ct=Ft(hr,Xe,ur,dr,$n,Vr,lr,ot,Jt,Ar);return ur+=dr,fe.createElement(Pt,{key:gt,color:ot,ptg:dr,radius:qn,prefixCls:tr,gradientId:sr,style:Ct,strokeLinecap:Jt,strokeWidth:Ar,gapDegree:Vr,ref:function(Nn){Un[gt]=Nn},size:Qe})}).reverse()},nr=function(){var ur=Math.round(Tt*(He[0]/100)),dr=100/Tt,gt=0;return new Array(Tt).fill(null).map(function(ot,Ct){var ln=Ct<=ur-1?pt[0]:si,Nn=ln&&(0,yt.Z)(ln)==="object"?"url(#".concat(sr,")"):void 0,cn=Ft(hr,Xe,gt,dr,$n,Vr,lr,ln,"butt",Ar,Wt);return gt+=(Xe-cn.strokeDashoffset+Wt)*100/Xe,fe.createElement("circle",{key:Ct,className:"".concat(tr,"-circle-path"),r:qn,cx:kn,cy:kn,stroke:Nn,strokeWidth:Ar,opacity:1,style:cn,ref:function(gn){Un[Ct]=gn}})})};return fe.createElement("svg",(0,De.Z)({className:_e()("".concat(tr,"-circle"),Hi),viewBox:"0 0 ".concat(Qe," ").concat(Qe),style:Ni,id:Gn,role:"presentation"},Sn),!Tt&&fe.createElement("circle",{className:"".concat(tr,"-circle-trail"),r:qn,cx:kn,cy:kn,stroke:si,strokeLinecap:Jt,strokeWidth:Mr||Ar,style:tn}),Tt?nr():_r())},en=it,_n={Line:Ee,Circle:en},yn=se(83062),Ve=se(16397);function Le(rt){return!rt||rt<0?0:rt>100?100:rt}function Bt(rt){let{success:Kt,successPercent:Bn}=rt,Gn=Bn;return Kt&&"progress"in Kt&&(Gn=Kt.progress),Kt&&"percent"in Kt&&(Gn=Kt.percent),Gn}const Dn=rt=>{let{percent:Kt,success:Bn,successPercent:Gn}=rt;const tr=Le(Bt({success:Bn,successPercent:Gn}));return[tr,Le(Le(Kt)-tr)]},dn=rt=>{let{success:Kt={},strokeColor:Bn}=rt;const{strokeColor:Gn}=Kt;return[Gn||Ve.presetPrimaryColors.green,Bn||null]},nt=(rt,Kt,Bn)=>{var Gn,tr,Sr,Ar;let Mr=-1,Pr=-1;if(Kt==="step"){const Vr=Bn.steps,lr=Bn.strokeWidth;typeof rt=="string"||typeof rt=="undefined"?(Mr=rt==="small"?2:14,Pr=lr!=null?lr:8):typeof rt=="number"?[Mr,Pr]=[rt,rt]:[Mr=14,Pr=8]=rt,Mr*=Vr}else if(Kt==="line"){const Vr=Bn==null?void 0:Bn.strokeWidth;typeof rt=="string"||typeof rt=="undefined"?Pr=Vr||(rt==="small"?6:8):typeof rt=="number"?[Mr,Pr]=[rt,rt]:[Mr=-1,Pr=8]=rt}else(Kt==="circle"||Kt==="dashboard")&&(typeof rt=="string"||typeof rt=="undefined"?[Mr,Pr]=rt==="small"?[60,60]:[120,120]:typeof rt=="number"?[Mr,Pr]=[rt,rt]:(Mr=(tr=(Gn=rt[0])!==null&&Gn!==void 0?Gn:rt[1])!==null&&tr!==void 0?tr:120,Pr=(Ar=(Sr=rt[0])!==null&&Sr!==void 0?Sr:rt[1])!==null&&Ar!==void 0?Ar:120));return[Mr,Pr]},ft=3,Xt=rt=>ft/rt*100;var wn=rt=>{const{prefixCls:Kt,trailColor:Bn=null,strokeLinecap:Gn="round",gapPosition:tr,gapDegree:Sr,width:Ar=120,type:Mr,children:Pr,success:Vr,size:lr=Ar}=rt,[si,Li]=nt(lr,"circle");let{strokeWidth:Ni}=rt;Ni===void 0&&(Ni=Math.max(Xt(si),6));const Hi={width:si,height:Li,fontSize:si*.15+6},ri=fe.useMemo(()=>{if(Sr||Sr===0)return Sr;if(Mr==="dashboard")return 75},[Sr,Mr]),vt=tr||Mr==="dashboard"&&"bottom"||void 0,Sn=Object.prototype.toString.call(rt.strokeColor)==="[object Object]",kn=dn({success:Vr,strokeColor:rt.strokeColor}),In=_e()(`${Kt}-inner`,{[`${Kt}-circle-gradient`]:Sn}),sr=fe.createElement(en,{percent:Dn(rt),strokeWidth:Ni,trailWidth:Ni,strokeColor:kn,strokeLinecap:Gn,trailColor:Bn,prefixCls:Kt,gapDegree:ri,gapPosition:vt});return fe.createElement("div",{className:In,style:Hi},si<=20?fe.createElement(yn.Z,{title:Pr},fe.createElement("span",null,sr)):fe.createElement(fe.Fragment,null,sr,Pr))},Zt=function(rt,Kt){var Bn={};for(var Gn in rt)Object.prototype.hasOwnProperty.call(rt,Gn)&&Kt.indexOf(Gn)<0&&(Bn[Gn]=rt[Gn]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tr=0,Gn=Object.getOwnPropertySymbols(rt);tr<Gn.length;tr++)Kt.indexOf(Gn[tr])<0&&Object.prototype.propertyIsEnumerable.call(rt,Gn[tr])&&(Bn[Gn[tr]]=rt[Gn[tr]]);return Bn};const Ht=rt=>{let Kt=[];return Object.keys(rt).forEach(Bn=>{const Gn=parseFloat(Bn.replace(/%/g,""));isNaN(Gn)||Kt.push({key:Gn,value:rt[Bn]})}),Kt=Kt.sort((Bn,Gn)=>Bn.key-Gn.key),Kt.map(Bn=>{let{key:Gn,value:tr}=Bn;return`${tr} ${Gn}%`}).join(", ")},Tn=(rt,Kt)=>{const{from:Bn=Ve.presetPrimaryColors.blue,to:Gn=Ve.presetPrimaryColors.blue,direction:tr=Kt==="rtl"?"to left":"to right"}=rt,Sr=Zt(rt,["from","to","direction"]);if(Object.keys(Sr).length!==0){const Ar=Ht(Sr);return{backgroundImage:`linear-gradient(${tr}, ${Ar})`}}return{backgroundImage:`linear-gradient(${tr}, ${Bn}, ${Gn})`}};var ke=rt=>{const{prefixCls:Kt,direction:Bn,percent:Gn,size:tr,strokeWidth:Sr,strokeColor:Ar,strokeLinecap:Mr="round",children:Pr,trailColor:Vr=null,success:lr}=rt,si=Ar&&typeof Ar!="string"?Tn(Ar,Bn):{backgroundColor:Ar},Li=Mr==="square"||Mr==="butt"?0:void 0,Ni={backgroundColor:Vr||void 0,borderRadius:Li},Hi=tr!=null?tr:[-1,Sr||(tr==="small"?6:8)],[ri,vt]=nt(Hi,"line",{strokeWidth:Sr}),Sn=Object.assign({width:`${Le(Gn)}%`,height:vt,borderRadius:Li},si),kn=Bt(rt),In={width:`${Le(kn)}%`,height:vt,borderRadius:Li,backgroundColor:lr==null?void 0:lr.strokeColor},sr={width:ri<0?"100%":ri,height:vt};return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:`${Kt}-outer`,style:sr},fe.createElement("div",{className:`${Kt}-inner`,style:Ni},fe.createElement("div",{className:`${Kt}-bg`,style:Sn}),kn!==void 0?fe.createElement("div",{className:`${Kt}-success-bg`,style:In}):null)),Pr)},le=rt=>{const{size:Kt,steps:Bn,percent:Gn=0,strokeWidth:tr=8,strokeColor:Sr,trailColor:Ar=null,prefixCls:Mr,children:Pr}=rt,Vr=Math.round(Bn*(Gn/100)),lr=Kt==="small"?2:14,si=Kt!=null?Kt:[lr,tr],[Li,Ni]=nt(si,"step",{steps:Bn,strokeWidth:tr}),Hi=Li/Bn,ri=new Array(Bn);for(let vt=0;vt<Bn;vt++){const Sn=Array.isArray(Sr)?Sr[vt]:Sr;ri[vt]=fe.createElement("div",{key:vt,className:_e()(`${Mr}-steps-item`,{[`${Mr}-steps-item-active`]:vt<=Vr-1}),style:{backgroundColor:vt<=Vr-1?Sn:Ar,width:Hi,height:Ni}})}return fe.createElement("div",{className:`${Mr}-steps-outer`},ri,Pr)},pe=se(34367),he=se(14747),oe=se(67968),Ae=se(45503);const Ge=rt=>{const Kt=rt?"100%":"-100%";return new pe.Keyframes(`antProgress${rt?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Kt}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Kt}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},_t=rt=>{const{componentCls:Kt,iconCls:Bn}=rt;return{[Kt]:Object.assign(Object.assign({},(0,he.Wf)(rt)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:rt.fontSize,marginInlineEnd:rt.marginXS,marginBottom:rt.marginXS},[`${Kt}-outer`]:{display:"inline-block",width:"100%"},[`&${Kt}-show-info`]:{[`${Kt}-outer`]:{marginInlineEnd:`calc(-2em - ${rt.marginXS}px)`,paddingInlineEnd:`calc(2em + ${rt.paddingXS}px)`}},[`${Kt}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:rt.remainingColor,borderRadius:rt.lineBorderRadius},[`${Kt}-inner:not(${Kt}-circle-gradient)`]:{[`${Kt}-circle-path`]:{stroke:rt.defaultColor}},[`${Kt}-success-bg, ${Kt}-bg`]:{position:"relative",backgroundColor:rt.defaultColor,borderRadius:rt.lineBorderRadius,transition:`all ${rt.motionDurationSlow} ${rt.motionEaseInOutCirc}`},[`${Kt}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:rt.colorSuccess},[`${Kt}-text`]:{display:"inline-block",width:"2em",marginInlineStart:rt.marginXS,color:rt.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Bn]:{fontSize:rt.fontSize}},[`&${Kt}-status-active`]:{[`${Kt}-bg::before`]:{position:"absolute",inset:0,backgroundColor:rt.colorBgContainer,borderRadius:rt.lineBorderRadius,opacity:0,animationName:Ge(),animationDuration:rt.progressActiveMotionDuration,animationTimingFunction:rt.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Kt}-rtl${Kt}-status-active`]:{[`${Kt}-bg::before`]:{animationName:Ge(!0)}},[`&${Kt}-status-exception`]:{[`${Kt}-bg`]:{backgroundColor:rt.colorError},[`${Kt}-text`]:{color:rt.colorError}},[`&${Kt}-status-exception ${Kt}-inner:not(${Kt}-circle-gradient)`]:{[`${Kt}-circle-path`]:{stroke:rt.colorError}},[`&${Kt}-status-success`]:{[`${Kt}-bg`]:{backgroundColor:rt.colorSuccess},[`${Kt}-text`]:{color:rt.colorSuccess}},[`&${Kt}-status-success ${Kt}-inner:not(${Kt}-circle-gradient)`]:{[`${Kt}-circle-path`]:{stroke:rt.colorSuccess}}})}},Rt=rt=>{const{componentCls:Kt,iconCls:Bn}=rt;return{[Kt]:{[`${Kt}-circle-trail`]:{stroke:rt.remainingColor},[`&${Kt}-circle ${Kt}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Kt}-circle ${Kt}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:rt.circleTextColor,fontSize:rt.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Bn]:{fontSize:`${rt.fontSize/rt.fontSizeSM}em`}},[`${Kt}-circle&-status-exception`]:{[`${Kt}-text`]:{color:rt.colorError}},[`${Kt}-circle&-status-success`]:{[`${Kt}-text`]:{color:rt.colorSuccess}}},[`${Kt}-inline-circle`]:{lineHeight:1,[`${Kt}-inner`]:{verticalAlign:"bottom"}}}},zt=rt=>{const{componentCls:Kt}=rt;return{[Kt]:{[`${Kt}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:rt.progressStepMinWidth,marginInlineEnd:rt.progressStepMarginInlineEnd,backgroundColor:rt.remainingColor,transition:`all ${rt.motionDurationSlow}`,"&-active":{backgroundColor:rt.defaultColor}}}}}},qt=rt=>{const{componentCls:Kt,iconCls:Bn}=rt;return{[Kt]:{[`${Kt}-small&-line, ${Kt}-small&-line ${Kt}-text ${Bn}`]:{fontSize:rt.fontSizeSM}}}};var jt=(0,oe.Z)("Progress",rt=>{const Kt=rt.marginXXS/2,Bn=(0,Ae.TS)(rt,{progressStepMarginInlineEnd:Kt,progressStepMinWidth:Kt,progressActiveMotionDuration:"2.4s"});return[_t(Bn),Rt(Bn),zt(Bn),qt(Bn)]},rt=>({circleTextColor:rt.colorText,defaultColor:rt.colorInfo,remainingColor:rt.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),ar=function(rt,Kt){var Bn={};for(var Gn in rt)Object.prototype.hasOwnProperty.call(rt,Gn)&&Kt.indexOf(Gn)<0&&(Bn[Gn]=rt[Gn]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tr=0,Gn=Object.getOwnPropertySymbols(rt);tr<Gn.length;tr++)Kt.indexOf(Gn[tr])<0&&Object.prototype.propertyIsEnumerable.call(rt,Gn[tr])&&(Bn[Gn[tr]]=rt[Gn[tr]]);return Bn};const xr=null,Nt=["normal","exception","active","success"];var cr=fe.forwardRef((rt,Kt)=>{const{prefixCls:Bn,className:Gn,rootClassName:tr,steps:Sr,strokeColor:Ar,percent:Mr=0,size:Pr="default",showInfo:Vr=!0,type:lr="line",status:si,format:Li,style:Ni}=rt,Hi=ar(rt,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),ri=fe.useMemo(()=>{var He,pt;const $t=Bt(rt);return parseInt($t!==void 0?(He=$t!=null?$t:0)===null||He===void 0?void 0:He.toString():(pt=Mr!=null?Mr:0)===null||pt===void 0?void 0:pt.toString(),10)},[Mr,rt.success,rt.successPercent]),vt=fe.useMemo(()=>!Nt.includes(si)&&ri>=100?"success":si||"normal",[si,ri]),{getPrefixCls:Sn,direction:kn,progress:In}=fe.useContext(me.E_),sr=Sn("progress",Bn),[qn,hr]=jt(sr),$n=fe.useMemo(()=>{if(!Vr)return null;const He=Bt(rt);let pt;const $t=Li||(Jt=>`${Jt}%`),Ot=lr==="line";return Li||vt!=="exception"&&vt!=="success"?pt=$t(Le(Mr),Le(He)):vt==="exception"?pt=Ot?fe.createElement(Je.Z,null):fe.createElement(ve.Z,null):vt==="success"&&(pt=Ot?fe.createElement(We.Z,null):fe.createElement(Be.Z,null)),fe.createElement("span",{className:`${sr}-text`,title:typeof pt=="string"?pt:void 0},pt)},[Vr,Mr,ri,vt,lr,sr,Li]),Xe=Array.isArray(Ar)?Ar[0]:Ar,ct=typeof Ar=="string"||Array.isArray(Ar)?Ar:void 0;let Tt;lr==="line"?Tt=Sr?fe.createElement(le,Object.assign({},rt,{strokeColor:ct,prefixCls:sr,steps:Sr}),$n):fe.createElement(ke,Object.assign({},rt,{strokeColor:Xe,prefixCls:sr,direction:kn}),$n):(lr==="circle"||lr==="dashboard")&&(Tt=fe.createElement(wn,Object.assign({},rt,{strokeColor:Xe,prefixCls:sr,progressStatus:vt}),$n));const Wt=_e()(sr,`${sr}-status-${vt}`,`${sr}-${lr==="dashboard"&&"circle"||Sr&&"steps"||lr}`,{[`${sr}-inline-circle`]:lr==="circle"&&nt(Pr,"circle")[0]<=20,[`${sr}-show-info`]:Vr,[`${sr}-${Pr}`]:typeof Pr=="string",[`${sr}-rtl`]:kn==="rtl"},In==null?void 0:In.className,Gn,tr,hr);return qn(fe.createElement("div",Object.assign({ref:Kt,style:Object.assign(Object.assign({},In==null?void 0:In.style),Ni),className:Wt,role:"progressbar","aria-valuenow":ri},(0,we.Z)(Hi,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Tt))}),Rr=cr},78045:function(En,Yt,se){"use strict";se.d(Yt,{ZP:function(){return Ve}});var fe=se(94184),We=se.n(fe),Be=se(5663),Je=se(1337),ve=se(67294),Te=se(53124),_e=se(98675);const we=ve.createContext(null),me=we.Provider;var De=we;const at=ve.createContext(null),Oe=at.Provider;var Mt=se(95860),ht=se(17799),lt=se(98866),et=se(65223),Ee=se(14747),yt=se(67968),Vt=se(45503);const qe=Le=>{const{componentCls:Bt,antCls:Dn}=Le,dn=`${Bt}-group`;return{[dn]:Object.assign(Object.assign({},(0,Ee.Wf)(Le)),{display:"inline-block",fontSize:0,[`&${dn}-rtl`]:{direction:"rtl"},[`${Dn}-badge ${Dn}-badge-count`]:{zIndex:1},[`> ${Dn}-badge:not(:first-child) > ${Dn}-button-wrapper`]:{borderInlineStart:"none"}})}},ut=Le=>{const{componentCls:Bt,wrapperMarginInlineEnd:Dn,colorPrimary:dn,radioSize:nt,motionDurationSlow:ft,motionDurationMid:Xt,motionEaseInOutCirc:Rn,colorBgContainer:wn,colorBorder:Zt,lineWidth:Ht,dotSize:Tn,colorBgContainerDisabled:xn,colorTextDisabled:ke,paddingXS:ue,dotColorDisabled:le,lineType:pe,radioDotDisabledSize:he,wireframe:oe,colorWhite:Ae}=Le,Ge=`${Bt}-inner`;return{[`${Bt}-wrapper`]:Object.assign(Object.assign({},(0,Ee.Wf)(Le)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Dn,cursor:"pointer",[`&${Bt}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Le.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${Bt}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${Ht}px ${pe} ${dn}`,borderRadius:"50%",visibility:"hidden",content:'""'},[Bt]:Object.assign(Object.assign({},(0,Ee.Wf)(Le)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Bt}-wrapper:hover &,
|
|
|
&:hover ${Ge}`]:{borderColor:dn},[`${Bt}-input:focus-visible + ${Ge}`]:Object.assign({},(0,Ee.oN)(Le)),[`${Bt}:hover::after, ${Bt}-wrapper:hover &::after`]:{visibility:"visible"},[`${Bt}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:nt,height:nt,marginBlockStart:nt/-2,marginInlineStart:nt/-2,backgroundColor:oe?dn:Ae,borderBlockStart:0,borderInlineStart:0,borderRadius:nt,transform:"scale(0)",opacity:0,transition:`all ${ft} ${Rn}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:nt,height:nt,backgroundColor:wn,borderColor:Zt,borderStyle:"solid",borderWidth:Ht,borderRadius:"50%",transition:`all ${Xt}`},[`${Bt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Bt}-checked`]:{[Ge]:{borderColor:dn,backgroundColor:oe?wn:dn,"&::after":{transform:`scale(${Tn/nt})`,opacity:1,transition:`all ${ft} ${Rn}`}}},[`${Bt}-disabled`]:{cursor:"not-allowed",[Ge]:{backgroundColor:xn,borderColor:Zt,cursor:"not-allowed","&::after":{backgroundColor:le}},[`${Bt}-input`]:{cursor:"not-allowed"},[`${Bt}-disabled + span`]:{color:ke,cursor:"not-allowed"},[`&${Bt}-checked`]:{[Ge]:{"&::after":{transform:`scale(${he/nt})`}}}},[`span${Bt} + *`]:{paddingInlineStart:ue,paddingInlineEnd:ue}})}},Ce=Le=>{const{buttonColor:Bt,controlHeight:Dn,componentCls:dn,lineWidth:nt,lineType:ft,colorBorder:Xt,motionDurationSlow:Rn,motionDurationMid:wn,buttonPaddingInline:Zt,fontSize:Ht,buttonBg:Tn,fontSizeLG:xn,controlHeightLG:ke,controlHeightSM:ue,paddingXS:le,borderRadius:pe,borderRadiusSM:he,borderRadiusLG:oe,buttonCheckedBg:Ae,buttonSolidCheckedColor:Ge,colorTextDisabled:_t,colorBgContainerDisabled:Rt,buttonCheckedBgDisabled:zt,buttonCheckedColorDisabled:qt,colorPrimary:jt,colorPrimaryHover:ar,colorPrimaryActive:xr,buttonSolidCheckedBg:Nt,buttonSolidCheckedHoverBg:pn,buttonSolidCheckedActiveBg:cr}=Le;return{[`${dn}-button-wrapper`]:{position:"relative",display:"inline-block",height:Dn,margin:0,paddingInline:Zt,paddingBlock:0,color:Bt,fontSize:Ht,lineHeight:`${Dn-nt*2}px`,background:Tn,border:`${nt}px ${ft} ${Xt}`,borderBlockStartWidth:nt+.02,borderInlineStartWidth:0,borderInlineEndWidth:nt,cursor:"pointer",transition:[`color ${wn}`,`background ${wn}`,`box-shadow ${wn}`].join(","),a:{color:Bt},[`> ${dn}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-nt,insetInlineStart:-nt,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:nt,paddingInline:0,backgroundColor:Xt,transition:`background-color ${Rn}`,content:'""'}},"&:first-child":{borderInlineStart:`${nt}px ${ft} ${Xt}`,borderStartStartRadius:pe,borderEndStartRadius:pe},"&:last-child":{borderStartEndRadius:pe,borderEndEndRadius:pe},"&:first-child:last-child":{borderRadius:pe},[`${dn}-group-large &`]:{height:ke,fontSize:xn,lineHeight:`${ke-nt*2}px`,"&:first-child":{borderStartStartRadius:oe,borderEndStartRadius:oe},"&:last-child":{borderStartEndRadius:oe,borderEndEndRadius:oe}},[`${dn}-group-small &`]:{height:ue,paddingInline:le-nt,paddingBlock:0,lineHeight:`${ue-nt*2}px`,"&:first-child":{borderStartStartRadius:he,borderEndStartRadius:he},"&:last-child":{borderStartEndRadius:he,borderEndEndRadius:he}},"&:hover":{position:"relative",color:jt},"&:has(:focus-visible)":Object.assign({},(0,Ee.oN)(Le)),[`${dn}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${dn}-button-wrapper-disabled)`]:{zIndex:1,color:jt,background:Ae,borderColor:jt,"&::before":{backgroundColor:jt},"&:first-child":{borderColor:jt},"&:hover":{color:ar,borderColor:ar,"&::before":{backgroundColor:ar}},"&:active":{color:xr,borderColor:xr,"&::before":{backgroundColor:xr}}},[`${dn}-group-solid &-checked:not(${dn}-button-wrapper-disabled)`]:{color:Ge,background:Nt,borderColor:Nt,"&:hover":{color:Ge,background:pn,borderColor:pn},"&:active":{color:Ge,background:cr,borderColor:cr}},"&-disabled":{color:_t,backgroundColor:Rt,borderColor:Xt,cursor:"not-allowed","&:first-child, &:hover":{color:_t,backgroundColor:Rt,borderColor:Xt}},[`&-disabled${dn}-button-wrapper-checked`]:{color:qt,backgroundColor:zt,borderColor:Xt,boxShadow:"none"}}}},xe=Le=>Le-4*2;var Ue=(0,yt.Z)("Radio",Le=>{const{controlOutline:Bt,controlOutlineWidth:Dn,radioSize:dn}=Le,nt=`0 0 0 ${Dn}px ${Bt}`,ft=nt,Xt=xe(dn),Rn=(0,Vt.TS)(Le,{radioDotDisabledSize:Xt,radioFocusShadow:nt,radioButtonFocusShadow:ft});return[qe(Rn),ut(Rn),Ce(Rn)]},Le=>{const{wireframe:Bt,padding:Dn,marginXS:dn,lineWidth:nt,fontSizeLG:ft,colorText:Xt,colorBgContainer:Rn,colorTextDisabled:wn,controlItemBgActiveDisabled:Zt,colorTextLightSolid:Ht,colorPrimary:Tn,colorPrimaryHover:xn,colorPrimaryActive:ke}=Le,ue=4,le=ft,pe=Bt?xe(le):le-(ue+nt)*2;return{radioSize:le,dotSize:pe,dotColorDisabled:wn,buttonSolidCheckedColor:Ht,buttonSolidCheckedBg:Tn,buttonSolidCheckedHoverBg:xn,buttonSolidCheckedActiveBg:ke,buttonBg:Rn,buttonCheckedBg:Rn,buttonColor:Xt,buttonCheckedBgDisabled:Zt,buttonCheckedColorDisabled:wn,buttonPaddingInline:Dn-nt,wrapperMarginInlineEnd:dn}}),Ze=se(45353),St=se(92429),mt=function(Le,Bt){var Dn={};for(var dn in Le)Object.prototype.hasOwnProperty.call(Le,dn)&&Bt.indexOf(dn)<0&&(Dn[dn]=Le[dn]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,dn=Object.getOwnPropertySymbols(Le);nt<dn.length;nt++)Bt.indexOf(dn[nt])<0&&Object.prototype.propertyIsEnumerable.call(Le,dn[nt])&&(Dn[dn[nt]]=Le[dn[nt]]);return Dn};const Pt=(Le,Bt)=>{var Dn,dn;const nt=ve.useContext(De),ft=ve.useContext(at),{getPrefixCls:Xt,direction:Rn,radio:wn}=ve.useContext(Te.E_),Zt=ve.useRef(null),Ht=(0,ht.sQ)(Bt,Zt),{isFormItemInput:Tn}=ve.useContext(et.aM),xn=xr=>{var Nt,pn;(Nt=Le.onChange)===null||Nt===void 0||Nt.call(Le,xr),(pn=nt==null?void 0:nt.onChange)===null||pn===void 0||pn.call(nt,xr)},{prefixCls:ke,className:ue,rootClassName:le,children:pe,style:he}=Le,oe=mt(Le,["prefixCls","className","rootClassName","children","style"]),Ae=Xt("radio",ke),Ge=((nt==null?void 0:nt.optionType)||ft)==="button",_t=Ge?`${Ae}-button`:Ae,[Rt,zt]=Ue(Ae),qt=Object.assign({},oe),jt=ve.useContext(lt.Z);nt&&(qt.name=nt.name,qt.onChange=xn,qt.checked=Le.value===nt.value,qt.disabled=(Dn=qt.disabled)!==null&&Dn!==void 0?Dn:nt.disabled),qt.disabled=(dn=qt.disabled)!==null&&dn!==void 0?dn:jt;const ar=We()(`${_t}-wrapper`,{[`${_t}-wrapper-checked`]:qt.checked,[`${_t}-wrapper-disabled`]:qt.disabled,[`${_t}-wrapper-rtl`]:Rn==="rtl",[`${_t}-wrapper-in-form-item`]:Tn},wn==null?void 0:wn.className,ue,le,zt);return Rt(ve.createElement(Ze.Z,{component:"Radio",disabled:qt.disabled},ve.createElement("label",{className:ar,style:Object.assign(Object.assign({},wn==null?void 0:wn.style),he),onMouseEnter:Le.onMouseEnter,onMouseLeave:Le.onMouseLeave},ve.createElement(Mt.Z,Object.assign({},qt,{className:We()(qt.className,!Ge&&St.A),type:"radio",prefixCls:_t,ref:Ht})),pe!==void 0?ve.createElement("span",null,pe):null)))};var Ft=ve.forwardRef(Pt);const Dt=ve.forwardRef((Le,Bt)=>{const{getPrefixCls:Dn,direction:dn}=ve.useContext(Te.E_),[nt,ft]=(0,Be.Z)(Le.defaultValue,{value:Le.value}),Xt=Nt=>{const pn=nt,cr=Nt.target.value;"value"in Le||ft(cr);const{onChange:Rr}=Le;Rr&&cr!==pn&&Rr(Nt)},{prefixCls:Rn,className:wn,rootClassName:Zt,options:Ht,buttonStyle:Tn="outline",disabled:xn,children:ke,size:ue,style:le,id:pe,onMouseEnter:he,onMouseLeave:oe,onFocus:Ae,onBlur:Ge}=Le,_t=Dn("radio",Rn),Rt=`${_t}-group`,[zt,qt]=Ue(_t);let jt=ke;Ht&&Ht.length>0&&(jt=Ht.map(Nt=>typeof Nt=="string"||typeof Nt=="number"?ve.createElement(Ft,{key:Nt.toString(),prefixCls:_t,disabled:xn,value:Nt,checked:nt===Nt},Nt):ve.createElement(Ft,{key:`radio-group-value-options-${Nt.value}`,prefixCls:_t,disabled:Nt.disabled||xn,value:Nt.value,checked:nt===Nt.value,title:Nt.title,style:Nt.style},Nt.label)));const ar=(0,_e.Z)(ue),xr=We()(Rt,`${Rt}-${Tn}`,{[`${Rt}-${ar}`]:ar,[`${Rt}-rtl`]:dn==="rtl"},wn,Zt,qt);return zt(ve.createElement("div",Object.assign({},(0,Je.Z)(Le,{aria:!0,data:!0}),{className:xr,style:le,onMouseEnter:he,onMouseLeave:oe,onFocus:Ae,onBlur:Ge,id:pe,ref:Bt}),ve.createElement(me,{value:{onChange:Xt,value:nt,disabled:Le.disabled,name:Le.name,optionType:Le.optionType}},jt)))});var an=ve.memo(Dt),it=function(Le,Bt){var Dn={};for(var dn in Le)Object.prototype.hasOwnProperty.call(Le,dn)&&Bt.indexOf(dn)<0&&(Dn[dn]=Le[dn]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,dn=Object.getOwnPropertySymbols(Le);nt<dn.length;nt++)Bt.indexOf(dn[nt])<0&&Object.prototype.propertyIsEnumerable.call(Le,dn[nt])&&(Dn[dn[nt]]=Le[dn[nt]]);return Dn};const en=(Le,Bt)=>{const{getPrefixCls:Dn}=ve.useContext(Te.E_),{prefixCls:dn}=Le,nt=it(Le,["prefixCls"]),ft=Dn("radio",dn);return ve.createElement(Oe,{value:"button"},ve.createElement(Ft,Object.assign({prefixCls:ft},nt,{type:"radio",ref:Bt})))};var _n=ve.forwardRef(en);const yn=Ft;yn.Button=_n,yn.Group=an,yn.__ANT_RADIO=!0;var Ve=yn},11713:function(En,Yt,se){"use strict";se.d(Yt,{default:function(){return br}});var fe=se(94184),We=se.n(fe),Be=se(87462),Je=se(74902),ve=se(4942),Te=se(1413),_e=se(97685),we=se(45987),me=se(71002),De=se(67294);function at(Re){var Ke=De.useRef();Ke.current=Re;var Lt=De.useCallback(function(){for(var dt,Ut=arguments.length,un=new Array(Ut),bn=0;bn<Ut;bn++)un[bn]=arguments[bn];return(dt=Ke.current)===null||dt===void 0?void 0:dt.call.apply(dt,[Ke].concat(un))},[]);return Lt}function Oe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Mt=Oe()?De.useLayoutEffect:De.useEffect,ht=Mt,lt=function(Ke,Lt){var dt=De.useRef(!0);Mt(function(){if(!dt.current)return Ke()},Lt),Mt(function(){return dt.current=!1,function(){dt.current=!0}},[])};function et(Re){var Ke=De.useRef(!1),Lt=De.useState(Re),dt=(0,_e.Z)(Lt,2),Ut=dt[0],un=dt[1];De.useEffect(function(){return Ke.current=!1,function(){Ke.current=!0}},[]);function bn(Kn,Ln){Ln&&Ke.current||un(Kn)}return[Ut,bn]}function Ee(Re){return Re!==void 0}function yt(Re,Ke){var Lt=Ke||{},dt=Lt.defaultValue,Ut=Lt.value,un=Lt.onChange,bn=Lt.postState,Kn=et(function(){return Ee(Ut)?Ut:Ee(dt)?typeof dt=="function"?dt():dt:typeof Re=="function"?Re():Re}),Ln=(0,_e.Z)(Kn,2),on=Ln[0],Hn=Ln[1],jn=Ut!==void 0?Ut:on,wr=bn?bn(jn):jn,Wn=at(un),Or=et([jn]),Yr=(0,_e.Z)(Or,2),$r=Yr[0],jr=Yr[1];lt(function(){var zr=$r[0];on!==zr&&Wn(on,zr)},[$r]),lt(function(){Ee(Ut)||Hn(Ut)},[Ut]);var Er=at(function(zr,ei){Hn(zr,ei),jr([jn],ei)});return[wr,Er]}var Vt={};function qe(Re,Ke){}function ut(Re,Ke){}function Ce(){Vt={}}function xe(Re,Ke,Lt){!Ke&&!Vt[Lt]&&(Re(!1,Lt),Vt[Lt]=!0)}function Ue(Re,Ke){xe(qe,Re,Ke)}function Ze(Re,Ke){xe(ut,Re,Ke)}var St=Ue,mt=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Re=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Re)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Re==null?void 0:Re.substr(0,4))},Pt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Ke){var Lt=Ke.keyCode;if(Ke.altKey&&!Ke.ctrlKey||Ke.metaKey||Lt>=Pt.F1&&Lt<=Pt.F12)return!1;switch(Lt){case Pt.ALT:case Pt.CAPS_LOCK:case Pt.CONTEXT_MENU:case Pt.CTRL:case Pt.DOWN:case Pt.END:case Pt.ESC:case Pt.HOME:case Pt.INSERT:case Pt.LEFT:case Pt.MAC_FF_META:case Pt.META:case Pt.NUMLOCK:case Pt.NUM_CENTER:case Pt.PAGE_DOWN:case Pt.PAGE_UP:case Pt.PAUSE:case Pt.PRINT_SCREEN:case Pt.RIGHT:case Pt.SHIFT:case Pt.UP:case Pt.WIN_KEY:case Pt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ke){if(Ke>=Pt.ZERO&&Ke<=Pt.NINE||Ke>=Pt.NUM_ZERO&&Ke<=Pt.NUM_MULTIPLY||Ke>=Pt.A&&Ke<=Pt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ke===0)return!0;switch(Ke){case Pt.SPACE:case Pt.QUESTION_MARK:case Pt.NUM_PLUS:case Pt.NUM_MINUS:case Pt.NUM_PERIOD:case Pt.NUM_DIVISION:case Pt.SEMICOLON:case Pt.DASH:case Pt.EQUALS:case Pt.COMMA:case Pt.PERIOD:case Pt.SLASH:case Pt.APOSTROPHE:case Pt.SINGLE_QUOTE:case Pt.OPEN_SQUARE_BRACKET:case Pt.BACKSLASH:case Pt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Qe=Pt,Ft=se(47655);function Dt(Re,Ke,Lt){var dt=De.useRef({});return(!("value"in dt.current)||Lt(dt.current.condition,Ke))&&(dt.current.value=Re(),dt.current.condition=Ke),dt.current.value}function an(Re,Ke){typeof Re=="function"?Re(Ke):(0,me.Z)(Re)==="object"&&Re&&"current"in Re&&(Re.current=Ke)}function it(){for(var Re=arguments.length,Ke=new Array(Re),Lt=0;Lt<Re;Lt++)Ke[Lt]=arguments[Lt];var dt=Ke.filter(function(Ut){return Ut});return dt.length<=1?dt[0]:function(Ut){Ke.forEach(function(un){an(un,Ut)})}}function en(){for(var Re=arguments.length,Ke=new Array(Re),Lt=0;Lt<Re;Lt++)Ke[Lt]=arguments[Lt];return Dt(function(){return it.apply(void 0,Ke)},Ke,function(dt,Ut){return dt.length===Ut.length&&dt.every(function(un,bn){return un===Ut[bn]})})}function _n(Re){var Ke,Lt,dt=isMemo(Re)?Re.type.type:Re.type;return!(typeof dt=="function"&&!((Ke=dt.prototype)!==null&&Ke!==void 0&&Ke.render)||typeof Re=="function"&&!((Lt=Re.prototype)!==null&&Lt!==void 0&&Lt.render))}var yn=function(Ke){var Lt=Ke.className,dt=Ke.customizeIcon,Ut=Ke.customizeIconProps,un=Ke.onMouseDown,bn=Ke.onClick,Kn=Ke.children,Ln;return typeof dt=="function"?Ln=dt(Ut):Ln=dt,De.createElement("span",{className:Lt,onMouseDown:function(Hn){Hn.preventDefault(),un&&un(Hn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:bn,"aria-hidden":!0},Ln!==void 0?Ln:De.createElement("span",{className:We()(Lt.split(/\s+/).map(function(on){return"".concat(on,"-icon")}))},Kn))},Ve=yn;function Le(Re,Ke,Lt,dt,Ut){var un=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,bn=arguments.length>6?arguments[6]:void 0,Kn=arguments.length>7?arguments[7]:void 0,Ln=De.useMemo(function(){if((0,me.Z)(dt)==="object")return dt.clearIcon;if(Ut)return Ut},[dt,Ut]),on=De.useMemo(function(){return!!(!un&&dt&&(Lt.length||bn)&&!(Kn==="combobox"&&bn===""))},[dt,un,Lt.length,bn,Kn]);return{allowClear:on,clearIcon:De.createElement(Ve,{className:"".concat(Re,"-clear"),onMouseDown:Ke,customizeIcon:Ln},"\xD7")}}var Bt=De.createContext(null);function Dn(){return De.useContext(Bt)}function dn(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ke=De.useState(!1),Lt=(0,_e.Z)(Ke,2),dt=Lt[0],Ut=Lt[1],un=De.useRef(null),bn=function(){window.clearTimeout(un.current)};De.useEffect(function(){return bn},[]);var Kn=function(on,Hn){bn(),un.current=window.setTimeout(function(){Ut(on),Hn&&Hn()},Re)};return[dt,Kn,bn]}function nt(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ke=De.useRef(null),Lt=De.useRef(null);De.useEffect(function(){return function(){window.clearTimeout(Lt.current)}},[]);function dt(Ut){(Ut||Ke.current===null)&&(Ke.current=Ut),window.clearTimeout(Lt.current),Lt.current=window.setTimeout(function(){Ke.current=null},Re)}return[function(){return Ke.current},dt]}function ft(Re,Ke,Lt,dt){var Ut=De.useRef(null);Ut.current={open:Ke,triggerOpen:Lt,customizedTrigger:dt},De.useEffect(function(){function un(bn){var Kn;if(!((Kn=Ut.current)!==null&&Kn!==void 0&&Kn.customizedTrigger)){var Ln=bn.target;Ln.shadowRoot&&bn.composed&&(Ln=bn.composedPath()[0]||Ln),Ut.current.open&&Re().filter(function(on){return on}).every(function(on){return!on.contains(Ln)&&on!==Ln})&&Ut.current.triggerOpen(!1)}}return window.addEventListener("mousedown",un),function(){return window.removeEventListener("mousedown",un)}},[])}var Xt=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,Rn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,wn="".concat(Xt," ").concat(Rn).split(/[\s\n]+/),Zt="aria-",Ht="data-";function Tn(Re,Ke){return Re.indexOf(Ke)===0}function xn(Re){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Lt;Ke===!1?Lt={aria:!0,data:!0,attr:!0}:Ke===!0?Lt={aria:!0}:Lt=(0,Te.Z)({},Ke);var dt={};return Object.keys(Re).forEach(function(Ut){(Lt.aria&&(Ut==="role"||Tn(Ut,Zt))||Lt.data&&Tn(Ut,Ht)||Lt.attr&&wn.includes(Ut))&&(dt[Ut]=Re[Ut])}),dt}var ke=se(48555),ue=se(14075),le=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],pe=void 0;function he(Re,Ke){var Lt=Re.prefixCls,dt=Re.invalidate,Ut=Re.item,un=Re.renderItem,bn=Re.responsive,Kn=Re.responsiveDisabled,Ln=Re.registerSize,on=Re.itemKey,Hn=Re.className,jn=Re.style,wr=Re.children,Wn=Re.display,Or=Re.order,Yr=Re.component,$r=Yr===void 0?"div":Yr,jr=(0,we.Z)(Re,le),Er=bn&&!Wn;function zr(Oi){Ln(on,Oi)}De.useEffect(function(){return function(){zr(null)}},[]);var ei=un&&Ut!==pe?un(Ut):wr,ci;dt||(ci={opacity:Er?0:1,height:Er?0:pe,overflowY:Er?"hidden":pe,order:bn?Or:pe,pointerEvents:Er?"none":pe,position:Er?"absolute":pe});var Fr={};Er&&(Fr["aria-hidden"]=!0);var fi=De.createElement($r,(0,Be.Z)({className:We()(!dt&&Lt,Hn),style:(0,Te.Z)((0,Te.Z)({},ci),jn)},Fr,jr,{ref:Ke}),ei);return bn&&(fi=De.createElement(ke.Z,{onResize:function(na){var Xi=na.offsetWidth;zr(Xi)},disabled:Kn},fi)),fi}var oe=De.forwardRef(he);oe.displayName="Item";var Ae=oe,Ge=se(77527),_t=se(73935),Rt=se(96523);function zt(Re){if(typeof MessageChannel=="undefined")(0,Rt.Z)(Re);else{var Ke=new MessageChannel;Ke.port1.onmessage=function(){return Re()},Ke.port2.postMessage(void 0)}}function qt(){var Re=De.useRef(null),Ke=function(dt){Re.current||(Re.current=[],zt(function(){(0,_t.unstable_batchedUpdates)(function(){Re.current.forEach(function(Ut){Ut()}),Re.current=null})})),Re.current.push(dt)};return Ke}function jt(Re,Ke){var Lt=De.useState(Ke),dt=(0,_e.Z)(Lt,2),Ut=dt[0],un=dt[1],bn=(0,Ge.Z)(function(Kn){Re(function(){un(Kn)})});return[Ut,bn]}var ar=De.createContext(null),xr=["component"],Nt=["className"],pn=["className"],cr=function(Ke,Lt){var dt=De.useContext(ar);if(!dt){var Ut=Ke.component,un=Ut===void 0?"div":Ut,bn=(0,we.Z)(Ke,xr);return De.createElement(un,(0,Be.Z)({},bn,{ref:Lt}))}var Kn=dt.className,Ln=(0,we.Z)(dt,Nt),on=Ke.className,Hn=(0,we.Z)(Ke,pn);return De.createElement(ar.Provider,{value:null},De.createElement(Ae,(0,Be.Z)({ref:Lt,className:We()(Kn,on)},Ln,Hn)))},Rr=De.forwardRef(cr);Rr.displayName="RawItem";var rt=Rr,Kt=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Bn="responsive",Gn="invalidate";function tr(Re){return"+ ".concat(Re.length," ...")}function Sr(Re,Ke){var Lt=Re.prefixCls,dt=Lt===void 0?"rc-overflow":Lt,Ut=Re.data,un=Ut===void 0?[]:Ut,bn=Re.renderItem,Kn=Re.renderRawItem,Ln=Re.itemKey,on=Re.itemWidth,Hn=on===void 0?10:on,jn=Re.ssr,wr=Re.style,Wn=Re.className,Or=Re.maxCount,Yr=Re.renderRest,$r=Re.renderRawRest,jr=Re.suffix,Er=Re.component,zr=Er===void 0?"div":Er,ei=Re.itemComponent,ci=Re.onVisibleChange,Fr=(0,we.Z)(Re,Kt),fi=jn==="full",Oi=qt(),na=jt(Oi,null),Xi=(0,_e.Z)(na,2),Fi=Xi[0],Ji=Xi[1],Qi=Fi||0,wi=jt(Oi,new Map),zi=(0,_e.Z)(wi,2),Jr=zi[0],hi=zi[1],Ii=jt(Oi,0),Yi=(0,_e.Z)(Ii,2),Ba=Yi[0],$a=Yi[1],Aa=jt(Oi,0),ca=(0,_e.Z)(Aa,2),ea=ca[0],Ei=ca[1],Oa=jt(Oi,0),ki=(0,_e.Z)(Oa,2),ti=ki[0],Wi=ki[1],ua=(0,De.useState)(null),Vi=(0,_e.Z)(ua,2),aa=Vi[0],mi=Vi[1],pa=(0,De.useState)(null),xa=(0,_e.Z)(pa,2),fa=xa[0],wa=xa[1],Ea=De.useMemo(function(){return fa===null&&fi?Number.MAX_SAFE_INTEGER:fa||0},[fa,Fi]),Za=(0,De.useState)(!1),ha=(0,_e.Z)(Za,2),ka=ha[0],Ja=ha[1],Ga="".concat(dt,"-item"),so=Math.max(Ba,ea),Fa=Or===Bn,Ca=un.length&&Fa,_i=Or===Gn,Ui=Ca||typeof Or=="number"&&un.length>Or,da=(0,De.useMemo)(function(){var oa=un;return Ca?Fi===null&&fi?oa=un:oa=un.slice(0,Math.min(un.length,Qi/Hn)):typeof Or=="number"&&(oa=un.slice(0,Or)),oa},[un,Hn,Fi,Or,Ca]),Sa=(0,De.useMemo)(function(){return Ca?un.slice(Ea+1):un.slice(da.length)},[un,da,Ca,Ea]),Ka=(0,De.useCallback)(function(oa,Nr){var Si;return typeof Ln=="function"?Ln(oa):(Si=Ln&&(oa==null?void 0:oa[Ln]))!==null&&Si!==void 0?Si:Nr},[Ln]),io=(0,De.useCallback)(bn||function(oa){return oa},[bn]);function ho(oa,Nr,Si){fa===oa&&(Nr===void 0||Nr===aa)||(wa(oa),Si||(Ja(oa<un.length-1),ci==null||ci(oa)),Nr!==void 0&&mi(Nr))}function Oo(oa,Nr){Ji(Nr.clientWidth)}function Ro(oa,Nr){hi(function(Si){var Ci=new Map(Si);return Nr===null?Ci.delete(oa):Ci.set(oa,Nr),Ci})}function lo(oa,Nr){Ei(Nr),$a(ea)}function Ao(oa,Nr){Wi(Nr)}function ra(oa){return Jr.get(Ka(da[oa],oa))}(0,ue.Z)(function(){if(Qi&&typeof so=="number"&&da){var oa=ti,Nr=da.length,Si=Nr-1;if(!Nr){ho(0,null);return}for(var Ci=0;Ci<Nr;Ci+=1){var Di=ra(Ci);if(fi&&(Di=Di||0),Di===void 0){ho(Ci-1,void 0,!0);break}if(oa+=Di,Si===0&&oa<=Qi||Ci===Si-1&&oa+ra(Si)<=Qi){ho(Si,null);break}else if(oa+so>Qi){ho(Ci-1,oa-Di-ti+ea);break}}jr&&ra(0)+ti>Qi&&mi(null)}},[Qi,Jr,ea,ti,Ka,da]);var Ri=ka&&!!Sa.length,Ta={};aa!==null&&Ca&&(Ta={position:"absolute",left:aa,top:0});var _a={prefixCls:Ga,responsive:Ca,component:ei,invalidate:_i},co=Kn?function(oa,Nr){var Si=Ka(oa,Nr);return De.createElement(ar.Provider,{key:Si,value:(0,Te.Z)((0,Te.Z)({},_a),{},{order:Nr,item:oa,itemKey:Si,registerSize:Ro,display:Nr<=Ea})},Kn(oa,Nr))}:function(oa,Nr){var Si=Ka(oa,Nr);return De.createElement(Ae,(0,Be.Z)({},_a,{order:Nr,key:Si,item:oa,renderItem:io,itemKey:Si,registerSize:Ro,display:Nr<=Ea}))},ao,hs={order:Ri?Ea:Number.MAX_SAFE_INTEGER,className:"".concat(Ga,"-rest"),registerSize:lo,display:Ri};if($r)$r&&(ao=De.createElement(ar.Provider,{value:(0,Te.Z)((0,Te.Z)({},_a),hs)},$r(Sa)));else{var Qo=Yr||tr;ao=De.createElement(Ae,(0,Be.Z)({},_a,hs),typeof Qo=="function"?Qo(Sa):Qo)}var ps=De.createElement(zr,(0,Be.Z)({className:We()(!_i&&dt,Wn),style:wr,ref:Ke},Fr),da.map(co),Ui?ao:null,jr&&De.createElement(Ae,(0,Be.Z)({},_a,{responsive:Fa,responsiveDisabled:!Ca,order:Ea,className:"".concat(Ga,"-suffix"),registerSize:Ao,display:!0,style:Ta}),jr));return Fa&&(ps=De.createElement(ke.Z,{onResize:Oo,disabled:!Ca},ps)),ps}var Ar=De.forwardRef(Sr);Ar.displayName="Overflow",Ar.Item=rt,Ar.RESPONSIVE=Bn,Ar.INVALIDATE=Gn;var Mr=Ar,Pr=Mr,Vr=function(Ke,Lt){var dt,Ut,un=Ke.prefixCls,bn=Ke.id,Kn=Ke.inputElement,Ln=Ke.disabled,on=Ke.tabIndex,Hn=Ke.autoFocus,jn=Ke.autoComplete,wr=Ke.editable,Wn=Ke.activeDescendantId,Or=Ke.value,Yr=Ke.maxLength,$r=Ke.onKeyDown,jr=Ke.onMouseDown,Er=Ke.onChange,zr=Ke.onPaste,ei=Ke.onCompositionStart,ci=Ke.onCompositionEnd,Fr=Ke.open,fi=Ke.attrs,Oi=Kn||De.createElement("input",null),na=Oi,Xi=na.ref,Fi=na.props,Ji=Fi.onKeyDown,Qi=Fi.onChange,wi=Fi.onMouseDown,zi=Fi.onCompositionStart,Jr=Fi.onCompositionEnd,hi=Fi.style;return"maxLength"in Oi.props,Oi=De.cloneElement(Oi,(0,Te.Z)((0,Te.Z)((0,Te.Z)({type:"search"},Fi),{},{id:bn,ref:it(Lt,Xi),disabled:Ln,tabIndex:on,autoComplete:jn||"off",autoFocus:Hn,className:We()("".concat(un,"-selection-search-input"),(dt=Oi)===null||dt===void 0||(Ut=dt.props)===null||Ut===void 0?void 0:Ut.className),role:"combobox","aria-label":"Search","aria-expanded":Fr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(bn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(bn,"_list"),"aria-activedescendant":Fr?Wn:void 0},fi),{},{value:wr?Or:"",maxLength:Yr,readOnly:!wr,unselectable:wr?null:"on",style:(0,Te.Z)((0,Te.Z)({},hi),{},{opacity:wr?null:0}),onKeyDown:function(Yi){$r(Yi),Ji&&Ji(Yi)},onMouseDown:function(Yi){jr(Yi),wi&&wi(Yi)},onChange:function(Yi){Er(Yi),Qi&&Qi(Yi)},onCompositionStart:function(Yi){ei(Yi),zi&&zi(Yi)},onCompositionEnd:function(Yi){ci(Yi),Jr&&Jr(Yi)},onPaste:zr})),Oi},lr=De.forwardRef(Vr);lr.displayName="Input";var si=lr;function Li(Re){return Array.isArray(Re)?Re:Re!==void 0?[Re]:[]}var Ni=typeof window!="undefined"&&window.document&&window.document.documentElement,Hi=Ni;function ri(Re){return Re!=null}function vt(Re){return!Re&&Re!==0}function Sn(Re){return["string","number"].includes((0,me.Z)(Re))}function kn(Re){var Ke=void 0;return Re&&(Sn(Re.title)?Ke=Re.title.toString():Sn(Re.label)&&(Ke=Re.label.toString())),Ke}function In(Re,Ke){Hi?De.useLayoutEffect(Re,Ke):De.useEffect(Re,Ke)}function sr(Re){var Ke;return(Ke=Re.key)!==null&&Ke!==void 0?Ke:Re.value}var qn=function(Ke){Ke.preventDefault(),Ke.stopPropagation()},hr=function(Ke){var Lt=Ke.id,dt=Ke.prefixCls,Ut=Ke.values,un=Ke.open,bn=Ke.searchValue,Kn=Ke.autoClearSearchValue,Ln=Ke.inputRef,on=Ke.placeholder,Hn=Ke.disabled,jn=Ke.mode,wr=Ke.showSearch,Wn=Ke.autoFocus,Or=Ke.autoComplete,Yr=Ke.activeDescendantId,$r=Ke.tabIndex,jr=Ke.removeIcon,Er=Ke.maxTagCount,zr=Ke.maxTagTextLength,ei=Ke.maxTagPlaceholder,ci=ei===void 0?function(mi){return"+ ".concat(mi.length," ...")}:ei,Fr=Ke.tagRender,fi=Ke.onToggleOpen,Oi=Ke.onRemove,na=Ke.onInputChange,Xi=Ke.onInputPaste,Fi=Ke.onInputKeyDown,Ji=Ke.onInputMouseDown,Qi=Ke.onInputCompositionStart,wi=Ke.onInputCompositionEnd,zi=De.useRef(null),Jr=(0,De.useState)(0),hi=(0,_e.Z)(Jr,2),Ii=hi[0],Yi=hi[1],Ba=(0,De.useState)(!1),$a=(0,_e.Z)(Ba,2),Aa=$a[0],ca=$a[1],ea="".concat(dt,"-selection"),Ei=un||jn==="multiple"&&Kn===!1||jn==="tags"?bn:"",Oa=jn==="tags"||jn==="multiple"&&Kn===!1||wr&&(un||Aa);In(function(){Yi(zi.current.scrollWidth)},[Ei]);function ki(mi,pa,xa,fa,wa){return De.createElement("span",{className:We()("".concat(ea,"-item"),(0,ve.Z)({},"".concat(ea,"-item-disabled"),xa)),title:kn(mi)},De.createElement("span",{className:"".concat(ea,"-item-content")},pa),fa&&De.createElement(Ve,{className:"".concat(ea,"-item-remove"),onMouseDown:qn,onClick:wa,customizeIcon:jr},"\xD7"))}function ti(mi,pa,xa,fa,wa){var Ea=function(ha){qn(ha),fi(!un)};return De.createElement("span",{onMouseDown:Ea},Fr({label:pa,value:mi,disabled:xa,closable:fa,onClose:wa}))}function Wi(mi){var pa=mi.disabled,xa=mi.label,fa=mi.value,wa=!Hn&&!pa,Ea=xa;if(typeof zr=="number"&&(typeof xa=="string"||typeof xa=="number")){var Za=String(Ea);Za.length>zr&&(Ea="".concat(Za.slice(0,zr),"..."))}var ha=function(Ja){Ja&&Ja.stopPropagation(),Oi(mi)};return typeof Fr=="function"?ti(fa,Ea,pa,wa,ha):ki(mi,Ea,pa,wa,ha)}function ua(mi){var pa=typeof ci=="function"?ci(mi):ci;return ki({title:pa},pa,!1)}var Vi=De.createElement("div",{className:"".concat(ea,"-search"),style:{width:Ii},onFocus:function(){ca(!0)},onBlur:function(){ca(!1)}},De.createElement(si,{ref:Ln,open:un,prefixCls:dt,id:Lt,inputElement:null,disabled:Hn,autoFocus:Wn,autoComplete:Or,editable:Oa,activeDescendantId:Yr,value:Ei,onKeyDown:Fi,onMouseDown:Ji,onChange:na,onPaste:Xi,onCompositionStart:Qi,onCompositionEnd:wi,tabIndex:$r,attrs:xn(Ke,!0)}),De.createElement("span",{ref:zi,className:"".concat(ea,"-search-mirror"),"aria-hidden":!0},Ei,"\xA0")),aa=De.createElement(Pr,{prefixCls:"".concat(ea,"-overflow"),data:Ut,renderItem:Wi,renderRest:ua,suffix:Vi,itemKey:sr,maxCount:Er});return De.createElement(De.Fragment,null,aa,!Ut.length&&!Ei&&De.createElement("span",{className:"".concat(ea,"-placeholder")},on))},$n=hr,Xe=function(Ke){var Lt=Ke.inputElement,dt=Ke.prefixCls,Ut=Ke.id,un=Ke.inputRef,bn=Ke.disabled,Kn=Ke.autoFocus,Ln=Ke.autoComplete,on=Ke.activeDescendantId,Hn=Ke.mode,jn=Ke.open,wr=Ke.values,Wn=Ke.placeholder,Or=Ke.tabIndex,Yr=Ke.showSearch,$r=Ke.searchValue,jr=Ke.activeValue,Er=Ke.maxLength,zr=Ke.onInputKeyDown,ei=Ke.onInputMouseDown,ci=Ke.onInputChange,Fr=Ke.onInputPaste,fi=Ke.onInputCompositionStart,Oi=Ke.onInputCompositionEnd,na=Ke.title,Xi=De.useState(!1),Fi=(0,_e.Z)(Xi,2),Ji=Fi[0],Qi=Fi[1],wi=Hn==="combobox",zi=wi||Yr,Jr=wr[0],hi=$r||"";wi&&jr&&!Ji&&(hi=jr),De.useEffect(function(){wi&&Qi(!1)},[wi,jr]);var Ii=Hn!=="combobox"&&!jn&&!Yr?!1:!!hi,Yi=na===void 0?kn(Jr):na,Ba=function(){if(Jr)return null;var Aa=Ii?{visibility:"hidden"}:void 0;return De.createElement("span",{className:"".concat(dt,"-selection-placeholder"),style:Aa},Wn)};return De.createElement(De.Fragment,null,De.createElement("span",{className:"".concat(dt,"-selection-search")},De.createElement(si,{ref:un,prefixCls:dt,id:Ut,open:jn,inputElement:Lt,disabled:bn,autoFocus:Kn,autoComplete:Ln,editable:zi,activeDescendantId:on,value:hi,onKeyDown:zr,onMouseDown:ei,onChange:function(Aa){Qi(!0),ci(Aa)},onPaste:Fr,onCompositionStart:fi,onCompositionEnd:Oi,tabIndex:Or,attrs:xn(Ke,!0),maxLength:wi?Er:void 0})),!wi&&Jr?De.createElement("span",{className:"".concat(dt,"-selection-item"),title:Yi,style:Ii?{visibility:"hidden"}:void 0},Jr.label):null,Ba())},ct=Xe;function Tt(Re){return![Qe.ESC,Qe.SHIFT,Qe.BACKSPACE,Qe.TAB,Qe.WIN_KEY,Qe.ALT,Qe.META,Qe.WIN_KEY_RIGHT,Qe.CTRL,Qe.SEMICOLON,Qe.EQUALS,Qe.CAPS_LOCK,Qe.CONTEXT_MENU,Qe.F1,Qe.F2,Qe.F3,Qe.F4,Qe.F5,Qe.F6,Qe.F7,Qe.F8,Qe.F9,Qe.F10,Qe.F11,Qe.F12].includes(Re)}var Wt=function(Ke,Lt){var dt=(0,De.useRef)(null),Ut=(0,De.useRef)(!1),un=Ke.prefixCls,bn=Ke.open,Kn=Ke.mode,Ln=Ke.showSearch,on=Ke.tokenWithEnter,Hn=Ke.autoClearSearchValue,jn=Ke.onSearch,wr=Ke.onSearchSubmit,Wn=Ke.onToggleOpen,Or=Ke.onInputKeyDown,Yr=Ke.domRef;De.useImperativeHandle(Lt,function(){return{focus:function(){dt.current.focus()},blur:function(){dt.current.blur()}}});var $r=nt(0),jr=(0,_e.Z)($r,2),Er=jr[0],zr=jr[1],ei=function(hi){var Ii=hi.which;(Ii===Qe.UP||Ii===Qe.DOWN)&&hi.preventDefault(),Or&&Or(hi),Ii===Qe.ENTER&&Kn==="tags"&&!Ut.current&&!bn&&(wr==null||wr(hi.target.value)),Tt(Ii)&&Wn(!0)},ci=function(){zr(!0)},Fr=(0,De.useRef)(null),fi=function(hi){jn(hi,!0,Ut.current)!==!1&&Wn(!0)},Oi=function(){Ut.current=!0},na=function(hi){Ut.current=!1,Kn!=="combobox"&&fi(hi.target.value)},Xi=function(hi){var Ii=hi.target.value;if(on&&Fr.current&&/[\r\n]/.test(Fr.current)){var Yi=Fr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ii=Ii.replace(Yi,Fr.current)}Fr.current=null,fi(Ii)},Fi=function(hi){var Ii=hi.clipboardData,Yi=Ii.getData("text");Fr.current=Yi},Ji=function(hi){var Ii=hi.target;if(Ii!==dt.current){var Yi=document.body.style.msTouchAction!==void 0;Yi?setTimeout(function(){dt.current.focus()}):dt.current.focus()}},Qi=function(hi){var Ii=Er();hi.target!==dt.current&&!Ii&&Kn!=="combobox"&&hi.preventDefault(),(Kn!=="combobox"&&(!Ln||!Ii)||!bn)&&(bn&&Hn!==!1&&jn("",!0,!1),Wn())},wi={inputRef:dt,onInputKeyDown:ei,onInputMouseDown:ci,onInputChange:Xi,onInputPaste:Fi,onInputCompositionStart:Oi,onInputCompositionEnd:na},zi=Kn==="multiple"||Kn==="tags"?De.createElement($n,(0,Be.Z)({},Ke,wi)):De.createElement(ct,(0,Be.Z)({},Ke,wi));return De.createElement("div",{ref:Yr,className:"".concat(un,"-selector"),onClick:Ji,onMouseDown:Qi},zi)},He=De.forwardRef(Wt);He.displayName="Selector";var pt=He,$t=se(62709),Ot=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Jt=function(Ke){var Lt=Ke===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Lt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Lt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Lt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Lt,adjustY:1},htmlRegion:"scroll"}}},tn=function(Ke,Lt){var dt=Ke.prefixCls,Ut=Ke.disabled,un=Ke.visible,bn=Ke.children,Kn=Ke.popupElement,Ln=Ke.animation,on=Ke.transitionName,Hn=Ke.dropdownStyle,jn=Ke.dropdownClassName,wr=Ke.direction,Wn=wr===void 0?"ltr":wr,Or=Ke.placement,Yr=Ke.builtinPlacements,$r=Ke.dropdownMatchSelectWidth,jr=Ke.dropdownRender,Er=Ke.dropdownAlign,zr=Ke.getPopupContainer,ei=Ke.empty,ci=Ke.getTriggerDOMNode,Fr=Ke.onPopupVisibleChange,fi=Ke.onPopupMouseEnter,Oi=(0,we.Z)(Ke,Ot),na="".concat(dt,"-dropdown"),Xi=Kn;jr&&(Xi=jr(Kn));var Fi=De.useMemo(function(){return Yr||Jt($r)},[Yr,$r]),Ji=Ln?"".concat(na,"-").concat(Ln):on,Qi=typeof $r=="number",wi=De.useMemo(function(){return Qi?null:$r===!1?"minWidth":"width"},[$r,Qi]),zi=Hn;Qi&&(zi=(0,Te.Z)((0,Te.Z)({},zi),{},{width:$r}));var Jr=De.useRef(null);return De.useImperativeHandle(Lt,function(){return{getPopupElement:function(){return Jr.current}}}),De.createElement($t.Z,(0,Be.Z)({},Oi,{showAction:Fr?["click"]:[],hideAction:Fr?["click"]:[],popupPlacement:Or||(Wn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Fi,prefixCls:na,popupTransitionName:Ji,popup:De.createElement("div",{ref:Jr,onMouseEnter:fi},Xi),stretch:wi,popupAlign:Er,popupVisible:un,getPopupContainer:zr,popupClassName:We()(jn,(0,ve.Z)({},"".concat(na,"-empty"),ei)),popupStyle:zi,getTriggerDOMNode:ci,onPopupVisibleChange:Fr}),bn)},Un=De.forwardRef(tn);Un.displayName="SelectTrigger";var _r=Un,nr=se(84506);function er(Re,Ke){var Lt=Re.key,dt;return"value"in Re&&(dt=Re.value),Lt!=null?Lt:dt!==void 0?dt:"rc-index-key-".concat(Ke)}function ur(Re,Ke){var Lt=Re||{},dt=Lt.label,Ut=Lt.value,un=Lt.options,bn=Lt.groupLabel,Kn=dt||(Ke?"children":"label");return{label:Kn,value:Ut||"value",options:un||"options",groupLabel:bn||Kn}}function dr(Re){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Lt=Ke.fieldNames,dt=Ke.childrenAsData,Ut=[],un=ur(Lt,!1),bn=un.label,Kn=un.value,Ln=un.options,on=un.groupLabel;function Hn(jn,wr){jn.forEach(function(Wn){if(wr||!(Ln in Wn)){var Or=Wn[Kn];Ut.push({key:er(Wn,Ut.length),groupOption:wr,data:Wn,label:Wn[bn],value:Or})}else{var Yr=Wn[on];Yr===void 0&&dt&&(Yr=Wn.label),Ut.push({key:er(Wn,Ut.length),group:!0,data:Wn,label:Yr}),Hn(Wn[Ln],!0)}})}return Hn(Re,!1),Ut}function gt(Re){var Ke=(0,Te.Z)({},Re);return"props"in Ke||Object.defineProperty(Ke,"props",{get:function(){return St(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ke}}),Ke}function ot(Re,Ke){if(!Ke||!Ke.length)return null;var Lt=!1;function dt(un,bn){var Kn=(0,nr.Z)(bn),Ln=Kn[0],on=Kn.slice(1);if(!Ln)return[un];var Hn=un.split(Ln);return Lt=Lt||Hn.length>1,Hn.reduce(function(jn,wr){return[].concat((0,Je.Z)(jn),(0,Je.Z)(dt(wr,on)))},[]).filter(function(jn){return jn})}var Ut=dt(Re,Ke);return Lt?Ut:null}var Ct=["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"],ln=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Nn(Re){return Re==="tags"||Re==="multiple"}var cn=De.forwardRef(function(Re,Ke){var Lt,dt,Ut=Re.id,un=Re.prefixCls,bn=Re.className,Kn=Re.showSearch,Ln=Re.tagRender,on=Re.direction,Hn=Re.omitDomProps,jn=Re.displayValues,wr=Re.onDisplayValuesChange,Wn=Re.emptyOptions,Or=Re.notFoundContent,Yr=Or===void 0?"Not Found":Or,$r=Re.onClear,jr=Re.mode,Er=Re.disabled,zr=Re.loading,ei=Re.getInputElement,ci=Re.getRawInputElement,Fr=Re.open,fi=Re.defaultOpen,Oi=Re.onDropdownVisibleChange,na=Re.activeValue,Xi=Re.onActiveValueChange,Fi=Re.activeDescendantId,Ji=Re.searchValue,Qi=Re.autoClearSearchValue,wi=Re.onSearch,zi=Re.onSearchSplit,Jr=Re.tokenSeparators,hi=Re.allowClear,Ii=Re.suffixIcon,Yi=Re.clearIcon,Ba=Re.OptionList,$a=Re.animation,Aa=Re.transitionName,ca=Re.dropdownStyle,ea=Re.dropdownClassName,Ei=Re.dropdownMatchSelectWidth,Oa=Re.dropdownRender,ki=Re.dropdownAlign,ti=Re.placement,Wi=Re.builtinPlacements,ua=Re.getPopupContainer,Vi=Re.showAction,aa=Vi===void 0?[]:Vi,mi=Re.onFocus,pa=Re.onBlur,xa=Re.onKeyUp,fa=Re.onKeyDown,wa=Re.onMouseDown,Ea=(0,we.Z)(Re,Ct),Za=Nn(jr),ha=(Kn!==void 0?Kn:Za)||jr==="combobox",ka=(0,Te.Z)({},Ea);ln.forEach(function(Da){delete ka[Da]}),Hn==null||Hn.forEach(function(Da){delete ka[Da]});var Ja=De.useState(!1),Ga=(0,_e.Z)(Ja,2),so=Ga[0],Fa=Ga[1];De.useEffect(function(){Fa(mt())},[]);var Ca=De.useRef(null),_i=De.useRef(null),Ui=De.useRef(null),da=De.useRef(null),Sa=De.useRef(null),Ka=dn(),io=(0,_e.Z)(Ka,3),ho=io[0],Oo=io[1],Ro=io[2];De.useImperativeHandle(Ke,function(){var Da,ma;return{focus:(Da=da.current)===null||Da===void 0?void 0:Da.focus,blur:(ma=da.current)===null||ma===void 0?void 0:ma.blur,scrollTo:function(es){var ga;return(ga=Sa.current)===null||ga===void 0?void 0:ga.scrollTo(es)}}});var lo=De.useMemo(function(){var Da;if(jr!=="combobox")return Ji;var ma=(Da=jn[0])===null||Da===void 0?void 0:Da.value;return typeof ma=="string"||typeof ma=="number"?String(ma):""},[Ji,jr,jn]),Ao=jr==="combobox"&&typeof ei=="function"&&ei()||null,ra=typeof ci=="function"&&ci(),Ri=en(_i,ra==null||(Lt=ra.props)===null||Lt===void 0?void 0:Lt.ref),Ta=De.useState(!1),_a=(0,_e.Z)(Ta,2),co=_a[0],ao=_a[1];ht(function(){ao(!0)},[]);var hs=yt(!1,{defaultValue:fi,value:Fr}),Qo=(0,_e.Z)(hs,2),ps=Qo[0],oa=Qo[1],Nr=co?ps:!1,Si=!Yr&&Wn;(Er||Si&&Nr&&jr==="combobox")&&(Nr=!1);var Ci=Si?!1:Nr,Di=De.useCallback(function(Da){var ma=Da!==void 0?Da:!Nr;Er||(oa(ma),Nr!==ma&&(Oi==null||Oi(ma)))},[Er,Nr,oa,Oi]),Ha=De.useMemo(function(){return(Jr||[]).some(function(Da){return[`
|
|
|
`,`\r
|
|
|
`].includes(Da)})},[Jr]),Va=function(ma,Ho,es){var ga=!0,za=ma;Xi==null||Xi(null);var Ra=es?null:ot(ma,Jr);return jr!=="combobox"&&Ra&&(za="",zi==null||zi(Ra),Di(!1),ga=!1),wi&&lo!==za&&wi(za,{source:Ho?"typing":"effect"}),ga},Fo=function(ma){!ma||!ma.trim()||wi(ma,{source:"submit"})};De.useEffect(function(){!Nr&&!Za&&jr!=="combobox"&&Va("",!1,!1)},[Nr]),De.useEffect(function(){ps&&Er&&oa(!1),Er&&Oo(!1)},[Er]);var Uo=nt(),ls=(0,_e.Z)(Uo,2),va=ls[0],No=ls[1],cs=function(ma){var Ho=va(),es=ma.which;if(es===Qe.ENTER&&(jr!=="combobox"&&ma.preventDefault(),Nr||Di(!0)),No(!!lo),es===Qe.BACKSPACE&&!Ho&&Za&&!lo&&jn.length){for(var ga=(0,Je.Z)(jn),za=null,Ra=ga.length-1;Ra>=0;Ra-=1){var po=ga[Ra];if(!po.disabled){ga.splice(Ra,1),za=po;break}}za&&wr(ga,{type:"remove",values:[za]})}for(var is=arguments.length,Hs=new Array(is>1?is-1:0),gs=1;gs<is;gs++)Hs[gs-1]=arguments[gs];if(Nr&&Sa.current){var Jl;(Jl=Sa.current).onKeyDown.apply(Jl,[ma].concat(Hs))}fa==null||fa.apply(void 0,[ma].concat(Hs))},ul=function(ma){for(var Ho=arguments.length,es=new Array(Ho>1?Ho-1:0),ga=1;ga<Ho;ga++)es[ga-1]=arguments[ga];if(Nr&&Sa.current){var za;(za=Sa.current).onKeyUp.apply(za,[ma].concat(es))}xa==null||xa.apply(void 0,[ma].concat(es))},As=function(ma){var Ho=jn.filter(function(es){return es!==ma});wr(Ho,{type:"remove",values:[ma]})},ms=De.useRef(!1),zo=function(){Oo(!0),Er||(mi&&!ms.current&&mi.apply(void 0,arguments),aa.includes("focus")&&Di(!0)),ms.current=!0},Ts=function(){Oo(!1,function(){ms.current=!1,Di(!1)}),!Er&&(lo&&(jr==="tags"?wi(lo,{source:"submit"}):jr==="multiple"&&wi("",{source:"blur"})),pa&&pa.apply(void 0,arguments))},Is=[];De.useEffect(function(){return function(){Is.forEach(function(Da){return clearTimeout(Da)}),Is.splice(0,Is.length)}},[]);var qs=function(ma){var Ho,es=ma.target,ga=(Ho=Ui.current)===null||Ho===void 0?void 0:Ho.getPopupElement();if(ga&&ga.contains(es)){var za=setTimeout(function(){var Hs=Is.indexOf(za);if(Hs!==-1&&Is.splice(Hs,1),Ro(),!so&&!ga.contains(document.activeElement)){var gs;(gs=da.current)===null||gs===void 0||gs.focus()}});Is.push(za)}for(var Ra=arguments.length,po=new Array(Ra>1?Ra-1:0),is=1;is<Ra;is++)po[is-1]=arguments[is];wa==null||wa.apply(void 0,[ma].concat(po))},oo=De.useState({}),Ia=(0,_e.Z)(oo,2),Xa=Ia[1];function go(){Xa({})}var yo;ra&&(yo=function(ma){Di(ma)}),ft(function(){var Da;return[Ca.current,(Da=Ui.current)===null||Da===void 0?void 0:Da.getPopupElement()]},Ci,Di,!!ra);var Ko=De.useMemo(function(){return(0,Te.Z)((0,Te.Z)({},Re),{},{notFoundContent:Yr,open:Nr,triggerOpen:Ci,id:Ut,showSearch:ha,multiple:Za,toggleOpen:Di})},[Re,Yr,Ci,Nr,Ut,ha,Za,Di]),wo=!!Ii||zr,xs;wo&&(xs=De.createElement(Ve,{className:We()("".concat(un,"-arrow"),(0,ve.Z)({},"".concat(un,"-arrow-loading"),zr)),customizeIcon:Ii,customizeIconProps:{loading:zr,searchValue:lo,open:Nr,focused:ho,showSearch:ha}}));var Xl=function(){var ma;$r==null||$r(),(ma=da.current)===null||ma===void 0||ma.focus(),wr([],{type:"clear",values:jn}),Va("",!1,!1)},Yl=Le(un,Xl,jn,hi,Yi,Er,lo,jr),vc=Yl.allowClear,Xc=Yl.clearIcon,Ks=De.createElement(Ba,{ref:Sa}),Ds=We()(un,bn,(dt={},(0,ve.Z)(dt,"".concat(un,"-focused"),ho),(0,ve.Z)(dt,"".concat(un,"-multiple"),Za),(0,ve.Z)(dt,"".concat(un,"-single"),!Za),(0,ve.Z)(dt,"".concat(un,"-allow-clear"),hi),(0,ve.Z)(dt,"".concat(un,"-show-arrow"),wo),(0,ve.Z)(dt,"".concat(un,"-disabled"),Er),(0,ve.Z)(dt,"".concat(un,"-loading"),zr),(0,ve.Z)(dt,"".concat(un,"-open"),Nr),(0,ve.Z)(dt,"".concat(un,"-customize-input"),Ao),(0,ve.Z)(dt,"".concat(un,"-show-search"),ha),dt)),yc=De.createElement(_r,{ref:Ui,disabled:Er,prefixCls:un,visible:Ci,popupElement:Ks,animation:$a,transitionName:Aa,dropdownStyle:ca,dropdownClassName:ea,direction:on,dropdownMatchSelectWidth:Ei,dropdownRender:Oa,dropdownAlign:ki,placement:ti,builtinPlacements:Wi,getPopupContainer:ua,empty:Wn,getTriggerDOMNode:function(){return _i.current},onPopupVisibleChange:yo,onPopupMouseEnter:go},ra?De.cloneElement(ra,{ref:Ri}):De.createElement(pt,(0,Be.Z)({},Re,{domRef:_i,prefixCls:un,inputElement:Ao,ref:da,id:Ut,showSearch:ha,autoClearSearchValue:Qi,mode:jr,activeDescendantId:Fi,tagRender:Ln,values:jn,open:Nr,onToggleOpen:Di,activeValue:na,searchValue:lo,onSearch:Va,onSearchSubmit:Fo,onRemove:As,tokenWithEnter:Ha}))),ql;return ra?ql=yc:ql=De.createElement("div",(0,Be.Z)({className:Ds},ka,{ref:Ca,onMouseDown:qs,onKeyDown:cs,onKeyUp:ul,onFocus:zo,onBlur:Ts}),ho&&!Nr&&De.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(jn.map(function(Da){var ma=Da.label,Ho=Da.value;return["number","string"].includes((0,me.Z)(ma))?ma:Ho}).join(", "))),yc,xs,vc&&Xc),De.createElement(Bt.Provider,{value:Ko},ql)}),mn=cn,gn=function(Re,Ke){var Lt=De.useRef({values:new Map,options:new Map}),dt=De.useMemo(function(){var un=Lt.current,bn=un.values,Kn=un.options,Ln=Re.map(function(jn){if(jn.label===void 0){var wr;return(0,Te.Z)((0,Te.Z)({},jn),{},{label:(wr=bn.get(jn.value))===null||wr===void 0?void 0:wr.label})}return jn}),on=new Map,Hn=new Map;return Ln.forEach(function(jn){on.set(jn.value,jn),Hn.set(jn.value,Ke.get(jn.value)||Kn.get(jn.value))}),Lt.current.values=on,Lt.current.options=Hn,Ln},[Re,Ke]),Ut=De.useCallback(function(un){return Ke.get(un)||Lt.current.options.get(un)},[Ke]);return[dt,Ut]};function Fn(Re,Ke){return Li(Re).join("").toUpperCase().includes(Ke)}var fr=function(Re,Ke,Lt,dt,Ut){return De.useMemo(function(){if(!Lt||dt===!1)return Re;var un=Ke.options,bn=Ke.label,Kn=Ke.value,Ln=[],on=typeof dt=="function",Hn=Lt.toUpperCase(),jn=on?dt:function(Wn,Or){return Ut?Fn(Or[Ut],Hn):Or[un]?Fn(Or[bn!=="children"?bn:"label"],Hn):Fn(Or[Kn],Hn)},wr=on?function(Wn){return gt(Wn)}:function(Wn){return Wn};return Re.forEach(function(Wn){if(Wn[un]){var Or=jn(Lt,wr(Wn));if(Or)Ln.push(Wn);else{var Yr=Wn[un].filter(function($r){return jn(Lt,wr($r))});Yr.length&&Ln.push((0,Te.Z)((0,Te.Z)({},Wn),{},(0,ve.Z)({},un,Yr)))}return}jn(Lt,wr(Wn))&&Ln.push(Wn)}),Ln},[Re,dt,Ut,Lt,Ke])},Qt=0,Qr=Oe();function Ur(){var Re;return Qr?(Re=Qt,Qt+=1):Re="TEST_OR_SSR",Re}function Bi(Re){var Ke=De.useState(),Lt=(0,_e.Z)(Ke,2),dt=Lt[0],Ut=Lt[1];return De.useEffect(function(){Ut("rc_select_".concat(Ur()))},[]),Re||dt}function Ai(Re){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Lt=[];return De.Children.forEach(Re,function(dt){dt==null&&!Ke.keepEmpty||(Array.isArray(dt)?Lt=Lt.concat(Ai(dt)):(0,Ft.isFragment)(dt)&&dt.props?Lt=Lt.concat(Ai(dt.props.children,Ke)):Lt.push(dt))}),Lt}var gi=["children","value"],qi=["children"];function xi(Re){var Ke=Re,Lt=Ke.key,dt=Ke.props,Ut=dt.children,un=dt.value,bn=(0,we.Z)(dt,gi);return(0,Te.Z)({key:Lt,value:un!==void 0?un:Lt,children:Ut},bn)}function li(Re){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ai(Re).map(function(Lt,dt){if(!De.isValidElement(Lt)||!Lt.type)return null;var Ut=Lt,un=Ut.type.isSelectOptGroup,bn=Ut.key,Kn=Ut.props,Ln=Kn.children,on=(0,we.Z)(Kn,qi);return Ke||!un?xi(Lt):(0,Te.Z)((0,Te.Z)({key:"__RC_SELECT_GRP__".concat(bn===null?dt:bn,"__"),label:bn},on),{},{options:li(Ln)})}).filter(function(Lt){return Lt})}function $i(Re,Ke,Lt,dt,Ut){return De.useMemo(function(){var un=Re,bn=!Re;bn&&(un=li(Ke));var Kn=new Map,Ln=new Map,on=function(wr,Wn,Or){Or&&typeof Or=="string"&&wr.set(Wn[Or],Wn)};function Hn(jn){for(var wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wn=0;Wn<jn.length;Wn+=1){var Or=jn[Wn];!Or[Lt.options]||wr?(Kn.set(Or[Lt.value],Or),on(Ln,Or,Lt.label),on(Ln,Or,dt),on(Ln,Or,Ut)):Hn(Or[Lt.options],!0)}}return Hn(un),{options:un,valueOptions:Kn,labelOptions:Ln}},[Re,Ke,Lt,dt,Ut])}function Gi(Re){var Ke=De.useRef();Ke.current=Re;var Lt=De.useCallback(function(){return Ke.current.apply(Ke,arguments)},[]);return Lt}var qr=function(){return null};qr.isSelectOptGroup=!0;var vi=qr,Zi=function(){return null};Zi.isSelectOption=!0;var la=Zi;function ta(Re,Ke){var Lt=(0,Te.Z)({},Re);return Array.isArray(Ke)&&Ke.forEach(function(dt){delete Lt[dt]}),Lt}var ii=se(73299),Et=De.createContext(null),wt=Et;function Gt(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var fn=["disabled","title","children","style","className"];function On(Re){return typeof Re=="string"||typeof Re=="number"}var gr=function(Ke,Lt){var dt=Dn(),Ut=dt.prefixCls,un=dt.id,bn=dt.open,Kn=dt.multiple,Ln=dt.mode,on=dt.searchValue,Hn=dt.toggleOpen,jn=dt.notFoundContent,wr=dt.onPopupScroll,Wn=De.useContext(wt),Or=Wn.flattenOptions,Yr=Wn.onActiveValue,$r=Wn.defaultActiveFirstOption,jr=Wn.onSelect,Er=Wn.menuItemSelectedIcon,zr=Wn.rawValues,ei=Wn.fieldNames,ci=Wn.virtual,Fr=Wn.direction,fi=Wn.listHeight,Oi=Wn.listItemHeight,na="".concat(Ut,"-item"),Xi=Dt(function(){return Or},[bn,Or],function(ki,ti){return ti[0]&&ki[1]!==ti[1]}),Fi=De.useRef(null),Ji=function(ti){ti.preventDefault()},Qi=function(ti){Fi.current&&Fi.current.scrollTo(typeof ti=="number"?{index:ti}:ti)},wi=function(ti){for(var Wi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ua=Xi.length,Vi=0;Vi<ua;Vi+=1){var aa=(ti+Vi*Wi+ua)%ua,mi=Xi[aa],pa=mi.group,xa=mi.data;if(!pa&&!xa.disabled)return aa}return-1},zi=De.useState(function(){return wi(0)}),Jr=(0,_e.Z)(zi,2),hi=Jr[0],Ii=Jr[1],Yi=function(ti){var Wi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ii(ti);var ua={source:Wi?"keyboard":"mouse"},Vi=Xi[ti];if(!Vi){Yr(null,-1,ua);return}Yr(Vi.value,ti,ua)};(0,De.useEffect)(function(){Yi($r!==!1?wi(0):-1)},[Xi.length,on]);var Ba=De.useCallback(function(ki){return zr.has(ki)&&Ln!=="combobox"},[Ln,(0,Je.Z)(zr).toString(),zr.size]);(0,De.useEffect)(function(){var ki=setTimeout(function(){if(!Kn&&bn&&zr.size===1){var Wi=Array.from(zr)[0],ua=Xi.findIndex(function(Vi){var aa=Vi.data;return aa.value===Wi});ua!==-1&&(Yi(ua),Qi(ua))}});if(bn){var ti;(ti=Fi.current)===null||ti===void 0||ti.scrollTo(void 0)}return function(){return clearTimeout(ki)}},[bn,on,Or.length]);var $a=function(ti){ti!==void 0&&jr(ti,{selected:!zr.has(ti)}),Kn||Hn(!1)};if(De.useImperativeHandle(Lt,function(){return{onKeyDown:function(ti){var Wi=ti.which,ua=ti.ctrlKey;switch(Wi){case Qe.N:case Qe.P:case Qe.UP:case Qe.DOWN:{var Vi=0;if(Wi===Qe.UP?Vi=-1:Wi===Qe.DOWN?Vi=1:Gt()&&ua&&(Wi===Qe.N?Vi=1:Wi===Qe.P&&(Vi=-1)),Vi!==0){var aa=wi(hi+Vi,Vi);Qi(aa),Yi(aa,!0)}break}case Qe.ENTER:{var mi=Xi[hi];mi&&!mi.data.disabled?$a(mi.value):$a(void 0),bn&&ti.preventDefault();break}case Qe.ESC:Hn(!1),bn&&ti.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ti){Qi(ti)}}}),Xi.length===0)return De.createElement("div",{role:"listbox",id:"".concat(un,"_list"),className:"".concat(na,"-empty"),onMouseDown:Ji},jn);var Aa=Object.keys(ei).map(function(ki){return ei[ki]}),ca=function(ti){return ti.label};function ea(ki,ti){var Wi=ki.group;return{role:Wi?"presentation":"option",id:"".concat(un,"_list_").concat(ti)}}var Ei=function(ti){var Wi=Xi[ti];if(!Wi)return null;var ua=Wi.data||{},Vi=ua.value,aa=Wi.group,mi=xn(ua,!0),pa=ca(Wi);return Wi?De.createElement("div",(0,Be.Z)({"aria-label":typeof pa=="string"&&!aa?pa:null},mi,{key:ti},ea(Wi,ti),{"aria-selected":Ba(Vi)}),Vi):null},Oa={role:"listbox",id:"".concat(un,"_list")};return De.createElement(De.Fragment,null,ci&&De.createElement("div",(0,Be.Z)({},Oa,{style:{height:0,width:0,overflow:"hidden"}}),Ei(hi-1),Ei(hi),Ei(hi+1)),De.createElement(ii.Z,{itemKey:"key",ref:Fi,data:Xi,height:fi,itemHeight:Oi,fullHeight:!1,onMouseDown:Ji,onScroll:wr,virtual:ci,direction:Fr,innerProps:ci?null:Oa},function(ki,ti){var Wi,ua=ki.group,Vi=ki.groupOption,aa=ki.data,mi=ki.label,pa=ki.value,xa=aa.key;if(ua){var fa,wa=(fa=aa.title)!==null&&fa!==void 0?fa:On(mi)?mi.toString():void 0;return De.createElement("div",{className:We()(na,"".concat(na,"-group")),title:wa},mi!==void 0?mi:xa)}var Ea=aa.disabled,Za=aa.title,ha=aa.children,ka=aa.style,Ja=aa.className,Ga=(0,we.Z)(aa,fn),so=ta(Ga,Aa),Fa=Ba(pa),Ca="".concat(na,"-option"),_i=We()(na,Ca,Ja,(Wi={},(0,ve.Z)(Wi,"".concat(Ca,"-grouped"),Vi),(0,ve.Z)(Wi,"".concat(Ca,"-active"),hi===ti&&!Ea),(0,ve.Z)(Wi,"".concat(Ca,"-disabled"),Ea),(0,ve.Z)(Wi,"".concat(Ca,"-selected"),Fa),Wi)),Ui=ca(ki),da=!Er||typeof Er=="function"||Fa,Sa=typeof Ui=="number"?Ui:Ui||pa,Ka=On(Sa)?Sa.toString():void 0;return Za!==void 0&&(Ka=Za),De.createElement("div",(0,Be.Z)({},xn(so),ci?{}:ea(ki,ti),{"aria-selected":Fa,className:_i,title:Ka,onMouseMove:function(){hi===ti||Ea||Yi(ti)},onClick:function(){Ea||$a(pa)},style:ka}),De.createElement("div",{className:"".concat(Ca,"-content")},Sa),De.isValidElement(Er)||Fa,da&&De.createElement(Ve,{className:"".concat(na,"-option-state"),customizeIcon:Er,customizeIconProps:{isSelected:Fa}},Fa?"\u2713":null))}))},Tr=De.forwardRef(gr);Tr.displayName="OptionList";var Wr=Tr;function Gr(Re){var Ke=Re.mode,Lt=Re.options,dt=Re.children,Ut=Re.backfill,un=Re.allowClear,bn=Re.placeholder,Kn=Re.getInputElement,Ln=Re.showSearch,on=Re.onSearch,Hn=Re.defaultOpen,jn=Re.autoFocus,wr=Re.labelInValue,Wn=Re.value,Or=Re.inputValue,Yr=Re.optionLabelProp,$r=isMultiple(Ke),jr=Ln!==void 0?Ln:$r||Ke==="combobox",Er=Lt||convertChildrenToData(dt);if(warning(Ke!=="tags"||Er.every(function(Fr){return!Fr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ke==="tags"||Ke==="combobox"){var zr=Er.some(function(Fr){return Fr.options?Fr.options.some(function(fi){return typeof("value"in fi?fi.value:fi.key)=="number"}):typeof("value"in Fr?Fr.value:Fr.key)=="number"});warning(!zr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ke!=="combobox"||!Yr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ke==="combobox"||!Ut,"`backfill` only works with `combobox` mode."),warning(Ke==="combobox"||!Kn,"`getInputElement` only work with `combobox` mode."),noteOnce(Ke!=="combobox"||!Kn||!un||!bn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),on&&!jr&&Ke!=="combobox"&&Ke!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Hn||jn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Wn!=null){var ei=toArray(Wn);warning(!wr||ei.every(function(Fr){return _typeof(Fr)==="object"&&("key"in Fr||"value"in Fr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!$r||Array.isArray(Wn),"`value` should be array when `mode` is `multiple` or `tags`")}if(dt){var ci=null;toNodeArray(dt).some(function(Fr){if(!React.isValidElement(Fr)||!Fr.type)return!1;var fi=Fr,Oi=fi.type;if(Oi.isSelectOption)return!1;if(Oi.isSelectOptGroup){var na=toNodeArray(Fr.props.children).every(function(Xi){return!React.isValidElement(Xi)||!Fr.type||Xi.type.isSelectOption?!0:(ci=Xi.type,!1)});return!na}return ci=Oi,!0}),ci&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ci.displayName||ci.name||ci,"`.")),warning(Or===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Hr(Re,Ke){if(Re){var Lt=function dt(Ut){for(var un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,bn=0;bn<Ut.length;bn++){var Kn=Ut[bn];if(Kn[Ke==null?void 0:Ke.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!un&&Array.isArray(Kn[Ke==null?void 0:Ke.options])&&dt(Kn[Ke==null?void 0:Ke.options],!0))break}};Lt(Re)}}var ni=null,yi=["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"],Lr=["inputValue"];function pi(Re){return!Re||(0,me.Z)(Re)!=="object"}var Ti=De.forwardRef(function(Re,Ke){var Lt=Re.id,dt=Re.mode,Ut=Re.prefixCls,un=Ut===void 0?"rc-select":Ut,bn=Re.backfill,Kn=Re.fieldNames,Ln=Re.inputValue,on=Re.searchValue,Hn=Re.onSearch,jn=Re.autoClearSearchValue,wr=jn===void 0?!0:jn,Wn=Re.onSelect,Or=Re.onDeselect,Yr=Re.dropdownMatchSelectWidth,$r=Yr===void 0?!0:Yr,jr=Re.filterOption,Er=Re.filterSort,zr=Re.optionFilterProp,ei=Re.optionLabelProp,ci=Re.options,Fr=Re.children,fi=Re.defaultActiveFirstOption,Oi=Re.menuItemSelectedIcon,na=Re.virtual,Xi=Re.direction,Fi=Re.listHeight,Ji=Fi===void 0?200:Fi,Qi=Re.listItemHeight,wi=Qi===void 0?20:Qi,zi=Re.value,Jr=Re.defaultValue,hi=Re.labelInValue,Ii=Re.onChange,Yi=(0,we.Z)(Re,yi),Ba=Bi(Lt),$a=Nn(dt),Aa=!!(!ci&&Fr),ca=De.useMemo(function(){return jr===void 0&&dt==="combobox"?!1:jr},[jr,dt]),ea=De.useMemo(function(){return ur(Kn,Aa)},[JSON.stringify(Kn),Aa]),Ei=yt("",{value:on!==void 0?on:Ln,postState:function(Si){return Si||""}}),Oa=(0,_e.Z)(Ei,2),ki=Oa[0],ti=Oa[1],Wi=$i(ci,Fr,ea,zr,ei),ua=Wi.valueOptions,Vi=Wi.labelOptions,aa=Wi.options,mi=De.useCallback(function(Nr){var Si=Li(Nr);return Si.map(function(Ci){var Di,Ha,Va,Fo,Uo;if(pi(Ci))Di=Ci;else{var ls;Va=Ci.key,Ha=Ci.label,Di=(ls=Ci.value)!==null&&ls!==void 0?ls:Va}var va=ua.get(Di);if(va){var No;if(Ha===void 0&&(Ha=va==null?void 0:va[ei||ea.label]),Va===void 0&&(Va=(No=va==null?void 0:va.key)!==null&&No!==void 0?No:Di),Fo=va==null?void 0:va.disabled,Uo=va==null?void 0:va.title,0)var cs}return{label:Ha,value:Di,key:Va,disabled:Fo,title:Uo}})},[ea,ei,ua]),pa=yt(Jr,{value:zi}),xa=(0,_e.Z)(pa,2),fa=xa[0],wa=xa[1],Ea=De.useMemo(function(){var Nr,Si=mi(fa);return dt==="combobox"&&vt((Nr=Si[0])===null||Nr===void 0?void 0:Nr.value)?[]:Si},[fa,mi,dt]),Za=gn(Ea,ua),ha=(0,_e.Z)(Za,2),ka=ha[0],Ja=ha[1],Ga=De.useMemo(function(){if(!dt&&ka.length===1){var Nr=ka[0];if(Nr.value===null&&(Nr.label===null||Nr.label===void 0))return[]}return ka.map(function(Si){var Ci;return(0,Te.Z)((0,Te.Z)({},Si),{},{label:(Ci=Si.label)!==null&&Ci!==void 0?Ci:Si.value})})},[dt,ka]),so=De.useMemo(function(){return new Set(ka.map(function(Nr){return Nr.value}))},[ka]);De.useEffect(function(){if(dt==="combobox"){var Nr,Si=(Nr=ka[0])===null||Nr===void 0?void 0:Nr.value;ti(ri(Si)?String(Si):"")}},[ka]);var Fa=Gi(function(Nr,Si){var Ci,Di=Si!=null?Si:Nr;return Ci={},(0,ve.Z)(Ci,ea.value,Nr),(0,ve.Z)(Ci,ea.label,Di),Ci}),Ca=De.useMemo(function(){if(dt!=="tags")return aa;var Nr=(0,Je.Z)(aa),Si=function(Di){return ua.has(Di)};return(0,Je.Z)(ka).sort(function(Ci,Di){return Ci.value<Di.value?-1:1}).forEach(function(Ci){var Di=Ci.value;Si(Di)||Nr.push(Fa(Di,Ci.label))}),Nr},[Fa,aa,ua,ka,dt]),_i=fr(Ca,ea,ki,ca,zr),Ui=De.useMemo(function(){return dt!=="tags"||!ki||_i.some(function(Nr){return Nr[zr||"value"]===ki})||_i.some(function(Nr){return Nr[ea.value]===ki})?_i:[Fa(ki)].concat((0,Je.Z)(_i))},[Fa,zr,dt,_i,ki,ea]),da=De.useMemo(function(){return Er?(0,Je.Z)(Ui).sort(function(Nr,Si){return Er(Nr,Si)}):Ui},[Ui,Er]),Sa=De.useMemo(function(){return dr(da,{fieldNames:ea,childrenAsData:Aa})},[da,ea,Aa]),Ka=function(Si){var Ci=mi(Si);if(wa(Ci),Ii&&(Ci.length!==ka.length||Ci.some(function(Va,Fo){var Uo;return((Uo=ka[Fo])===null||Uo===void 0?void 0:Uo.value)!==(Va==null?void 0:Va.value)}))){var Di=hi?Ci:Ci.map(function(Va){return Va.value}),Ha=Ci.map(function(Va){return gt(Ja(Va.value))});Ii($a?Di:Di[0],$a?Ha:Ha[0])}},io=De.useState(null),ho=(0,_e.Z)(io,2),Oo=ho[0],Ro=ho[1],lo=De.useState(0),Ao=(0,_e.Z)(lo,2),ra=Ao[0],Ri=Ao[1],Ta=fi!==void 0?fi:dt!=="combobox",_a=De.useCallback(function(Nr,Si){var Ci=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Di=Ci.source,Ha=Di===void 0?"keyboard":Di;Ri(Si),bn&&dt==="combobox"&&Nr!==null&&Ha==="keyboard"&&Ro(String(Nr))},[bn,dt]),co=function(Si,Ci,Di){var Ha=function(){var ms,zo=Ja(Si);return[hi?{label:zo==null?void 0:zo[ea.label],value:Si,key:(ms=zo==null?void 0:zo.key)!==null&&ms!==void 0?ms:Si}:Si,gt(zo)]};if(Ci&&Wn){var Va=Ha(),Fo=(0,_e.Z)(Va,2),Uo=Fo[0],ls=Fo[1];Wn(Uo,ls)}else if(!Ci&&Or&&Di!=="clear"){var va=Ha(),No=(0,_e.Z)(va,2),cs=No[0],ul=No[1];Or(cs,ul)}},ao=Gi(function(Nr,Si){var Ci,Di=$a?Si.selected:!0;Di?Ci=$a?[].concat((0,Je.Z)(ka),[Nr]):[Nr]:Ci=ka.filter(function(Ha){return Ha.value!==Nr}),Ka(Ci),co(Nr,Di),dt==="combobox"?Ro(""):(!Nn||wr)&&(ti(""),Ro(""))}),hs=function(Si,Ci){Ka(Si);var Di=Ci.type,Ha=Ci.values;(Di==="remove"||Di==="clear")&&Ha.forEach(function(Va){co(Va.value,!1,Di)})},Qo=function(Si,Ci){if(ti(Si),Ro(null),Ci.source==="submit"){var Di=(Si||"").trim();if(Di){var Ha=Array.from(new Set([].concat((0,Je.Z)(so),[Di])));Ka(Ha),co(Di,!0),ti("")}return}Ci.source!=="blur"&&(dt==="combobox"&&Ka(Si),Hn==null||Hn(Si))},ps=function(Si){var Ci=Si;dt!=="tags"&&(Ci=Si.map(function(Ha){var Va=Vi.get(Ha);return Va==null?void 0:Va.value}).filter(function(Ha){return Ha!==void 0}));var Di=Array.from(new Set([].concat((0,Je.Z)(so),(0,Je.Z)(Ci))));Ka(Di),Di.forEach(function(Ha){co(Ha,!0)})},oa=De.useMemo(function(){var Nr=na!==!1&&$r!==!1;return(0,Te.Z)((0,Te.Z)({},Wi),{},{flattenOptions:Sa,onActiveValue:_a,defaultActiveFirstOption:Ta,onSelect:ao,menuItemSelectedIcon:Oi,rawValues:so,fieldNames:ea,virtual:Nr,direction:Xi,listHeight:Ji,listItemHeight:wi,childrenAsData:Aa})},[Wi,Sa,_a,Ta,ao,Oi,so,ea,na,$r,Ji,wi,Aa]);return De.createElement(wt.Provider,{value:oa},De.createElement(mn,(0,Be.Z)({},Yi,{id:Ba,prefixCls:un,ref:Ke,omitDomProps:Lr,mode:dt,displayValues:Ga,onDisplayValuesChange:hs,direction:Xi,searchValue:ki,onSearch:Qo,autoClearSearchValue:wr,onSearchSplit:ps,dropdownMatchSelectWidth:$r,OptionList:Wr,emptyOptions:!Sa.length,activeValue:Oo,activeDescendantId:"".concat(Ba,"_list_").concat(ra)})))}),Mi=Ti;Mi.Option=la,Mi.OptGroup=vi;var Ie=Mi,Fe=Ie,ze=se(10366),je=se(8745),tt=se(33603),st=se(9708),kt=se(53124),nn=se(98866),sn=se(88258),Jn=se(98675),yr=se(65223),Zn=se(4173),Cn=se(87244),vn=se(13458),Pn=se(78642),zn=se(46163),mr=function(Re,Ke){var Lt={};for(var dt in Re)Object.prototype.hasOwnProperty.call(Re,dt)&&Ke.indexOf(dt)<0&&(Lt[dt]=Re[dt]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,dt=Object.getOwnPropertySymbols(Re);Ut<dt.length;Ut++)Ke.indexOf(dt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(Re,dt[Ut])&&(Lt[dt[Ut]]=Re[dt[Ut]]);return Lt};const Yn="SECRET_COMBOBOX_MODE_DO_NOT_USE",Xn=(Re,Ke)=>{var Lt,{prefixCls:dt,bordered:Ut=!0,className:un,rootClassName:bn,getPopupContainer:Kn,popupClassName:Ln,dropdownClassName:on,listHeight:Hn=256,placement:jn,listItemHeight:wr=24,size:Wn,disabled:Or,notFoundContent:Yr,status:$r,builtinPlacements:jr,dropdownMatchSelectWidth:Er,popupMatchSelectWidth:zr,direction:ei,style:ci,allowClear:Fr}=Re,fi=mr(Re,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Oi,getPrefixCls:na,renderEmpty:Xi,direction:Fi,virtual:Ji,popupMatchSelectWidth:Qi,popupOverflow:wi,select:zi}=De.useContext(kt.E_),Jr=na("select",dt),hi=na(),Ii=ei!=null?ei:Fi,{compactSize:Yi,compactItemClassnames:Ba}=(0,Zn.ri)(Jr,Ii),[$a,Aa]=(0,Cn.Z)(Jr),ca=De.useMemo(()=>{const{mode:Ca}=fi;if(Ca!=="combobox")return Ca===Yn?"combobox":Ca},[fi.mode]),ea=ca==="multiple"||ca==="tags",Ei=(0,Pn.Z)(fi.suffixIcon,fi.showArrow),Oa=(Lt=zr!=null?zr:Er)!==null&&Lt!==void 0?Lt:Qi,{status:ki,hasFeedback:ti,isFormItemInput:Wi,feedbackIcon:ua}=De.useContext(yr.aM),Vi=(0,st.F)(ki,$r);let aa;Yr!==void 0?aa=Yr:ca==="combobox"?aa=null:aa=(Xi==null?void 0:Xi("Select"))||De.createElement(sn.Z,{componentName:"Select"});const{suffixIcon:mi,itemIcon:pa,removeIcon:xa,clearIcon:fa}=(0,zn.Z)(Object.assign(Object.assign({},fi),{multiple:ea,hasFeedback:ti,feedbackIcon:ua,showSuffixIcon:Ei,prefixCls:Jr,showArrow:fi.showArrow,componentName:"Select"})),wa=Fr===!0?{clearIcon:fa}:Fr,Ea=(0,ze.Z)(fi,["suffixIcon","itemIcon"]),Za=We()(Ln||on,{[`${Jr}-dropdown-${Ii}`]:Ii==="rtl"},bn,Aa),ha=(0,Jn.Z)(Ca=>{var _i;return(_i=Wn!=null?Wn:Yi)!==null&&_i!==void 0?_i:Ca}),ka=De.useContext(nn.Z),Ja=Or!=null?Or:ka,Ga=We()({[`${Jr}-lg`]:ha==="large",[`${Jr}-sm`]:ha==="small",[`${Jr}-rtl`]:Ii==="rtl",[`${Jr}-borderless`]:!Ut,[`${Jr}-in-form-item`]:Wi},(0,st.Z)(Jr,Vi,ti),Ba,zi==null?void 0:zi.className,un,bn,Aa),so=De.useMemo(()=>jn!==void 0?jn:Ii==="rtl"?"bottomRight":"bottomLeft",[jn,Ii]),Fa=(0,vn.Z)(jr,wi);return $a(De.createElement(Fe,Object.assign({ref:Ke,virtual:Ji,showSearch:zi==null?void 0:zi.showSearch},Ea,{style:Object.assign(Object.assign({},zi==null?void 0:zi.style),ci),dropdownMatchSelectWidth:Oa,builtinPlacements:Fa,transitionName:(0,tt.m)(hi,"slide-up",fi.transitionName),listHeight:Hn,listItemHeight:wr,mode:ca,prefixCls:Jr,placement:so,direction:Ii,suffixIcon:mi,menuItemSelectedIcon:pa,removeIcon:xa,allowClear:wa,notFoundContent:aa,className:Ga,getPopupContainer:Kn||Oi,dropdownClassName:Za,disabled:Ja})))},rr=De.forwardRef(Xn),ir=(0,je.Z)(rr);rr.SECRET_COMBOBOX_MODE_DO_NOT_USE=Yn,rr.Option=la,rr.OptGroup=vi,rr._InternalPanelDoNotUseOrYouWillBeFired=ir;var br=rr},87244:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return Ce}});var fe=se(14747),We=se(80110),Be=se(45503),Je=se(67968),ve=se(67771),Te=se(33297);const _e=xe=>{const{optionHeight:Ue,optionFontSize:Ze,optionLineHeight:St,optionPadding:mt}=xe;return{position:"relative",display:"block",minHeight:Ue,padding:mt,color:xe.colorText,fontWeight:"normal",fontSize:Ze,lineHeight:St,boxSizing:"border-box"}};var me=xe=>{const{antCls:Ue,componentCls:Ze}=xe,St=`${Ze}-item`,mt=`&${Ue}-slide-up-enter${Ue}-slide-up-enter-active`,Pt=`&${Ue}-slide-up-appear${Ue}-slide-up-appear-active`,Qe=`&${Ue}-slide-up-leave${Ue}-slide-up-leave-active`,Ft=`${Ze}-dropdown-placement-`;return[{[`${Ze}-dropdown`]:Object.assign(Object.assign({},(0,fe.Wf)(xe)),{position:"absolute",top:-9999,zIndex:xe.zIndexPopup,boxSizing:"border-box",padding:xe.paddingXXS,overflow:"hidden",fontSize:xe.fontSize,fontVariant:"initial",backgroundColor:xe.colorBgElevated,borderRadius:xe.borderRadiusLG,outline:"none",boxShadow:xe.boxShadowSecondary,[`
|
|
|
${mt}${Ft}bottomLeft,
|
|
|
${Pt}${Ft}bottomLeft
|
|
|
`]:{animationName:ve.fJ},[`
|
|
|
${mt}${Ft}topLeft,
|
|
|
${Pt}${Ft}topLeft,
|
|
|
${mt}${Ft}topRight,
|
|
|
${Pt}${Ft}topRight
|
|
|
`]:{animationName:ve.Qt},[`${Qe}${Ft}bottomLeft`]:{animationName:ve.Uw},[`
|
|
|
${Qe}${Ft}topLeft,
|
|
|
${Qe}${Ft}topRight
|
|
|
`]:{animationName:ve.ly},"&-hidden":{display:"none"},[`${St}`]:Object.assign(Object.assign({},_e(xe)),{cursor:"pointer",transition:`background ${xe.motionDurationSlow} ease`,borderRadius:xe.borderRadiusSM,"&-group":{color:xe.colorTextDescription,fontSize:xe.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},fe.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${St}-option-disabled)`]:{backgroundColor:xe.optionActiveBg},[`&-selected:not(${St}-option-disabled)`]:{color:xe.optionSelectedColor,fontWeight:xe.optionSelectedFontWeight,backgroundColor:xe.optionSelectedBg,[`${St}-option-state`]:{color:xe.colorPrimary}},"&-disabled":{[`&${St}-option-selected`]:{backgroundColor:xe.colorBgContainerDisabled},color:xe.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:xe.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ve.oN)(xe,"slide-up"),(0,ve.oN)(xe,"slide-down"),(0,Te.Fm)(xe,"move-up"),(0,Te.Fm)(xe,"move-down")]};const De=2,at=xe=>{let{controlHeightSM:Ue,controlHeight:Ze,lineWidth:St}=xe;const mt=(Ze-Ue)/2-St,Pt=Math.ceil(mt/2);return[mt,Pt]};function Oe(xe,Ue){const{componentCls:Ze,iconCls:St}=xe,mt=`${Ze}-selection-overflow`,Pt=xe.multipleSelectItemHeight,[Qe]=at(xe),Ft=Ue?`${Ze}-${Ue}`:"";return{[`${Ze}-multiple${Ft}`]:{fontSize:xe.fontSize,[mt]:{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:`${Qe-De}px ${De*2}px`,borderRadius:xe.borderRadius,[`${Ze}-show-search&`]:{cursor:"text"},[`${Ze}-disabled&`]:{background:xe.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${De}px 0`,lineHeight:`${Pt}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Ze}-show-arrow ${Ze}-selector,
|
|
|
&${Ze}-allow-clear ${Ze}-selector
|
|
|
`]:{paddingInlineEnd:xe.fontSizeIcon+xe.controlPaddingHorizontal},[`${Ze}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Pt,marginTop:De,marginBottom:De,lineHeight:`${Pt-xe.lineWidth*2}px`,background:xe.multipleItemBg,border:`${xe.lineWidth}px ${xe.lineType} ${xe.multipleItemBorderColor}`,borderRadius:xe.borderRadiusSM,cursor:"default",transition:`font-size ${xe.motionDurationSlow}, line-height ${xe.motionDurationSlow}, height ${xe.motionDurationSlow}`,userSelect:"none",marginInlineEnd:De*2,paddingInlineStart:xe.paddingXS,paddingInlineEnd:xe.paddingXS/2,[`${Ze}-disabled&`]:{color:xe.multipleItemColorDisabled,borderColor:xe.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:xe.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,fe.Ro)()),{display:"inline-flex",alignItems:"center",color:xe.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${St}`]:{verticalAlign:"-0.2em"},"&:hover":{color:xe.colorIconHover}})},[`${mt}-item + ${mt}-item`]:{[`${Ze}-selection-search`]:{marginInlineStart:0}},[`${Ze}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:xe.inputPaddingHorizontalBase-Qe,"\n &-input,\n &-mirror\n ":{height:Pt,fontFamily:xe.fontFamily,lineHeight:`${Pt}px`,transition:`all ${xe.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:xe.inputPaddingHorizontalBase,insetInlineEnd:xe.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${xe.motionDurationSlow}`}}}}var ht=xe=>{const{componentCls:Ue}=xe,Ze=(0,Be.TS)(xe,{controlHeight:xe.controlHeightSM,multipleSelectItemHeight:xe.controlHeightXS,borderRadius:xe.borderRadiusSM,borderRadiusSM:xe.borderRadiusXS}),St=(0,Be.TS)(xe,{fontSize:xe.fontSizeLG,controlHeight:xe.controlHeightLG,multipleSelectItemHeight:xe.multipleItemHeightLG,borderRadius:xe.borderRadiusLG,borderRadiusSM:xe.borderRadius}),[,mt]=at(xe);return[Oe(xe),Oe(Ze,"sm"),{[`${Ue}-multiple${Ue}-sm`]:{[`${Ue}-selection-placeholder`]:{insetInline:xe.controlPaddingHorizontalSM-xe.lineWidth},[`${Ue}-selection-search`]:{marginInlineStart:mt}}},Oe(St,"lg")]};function lt(xe,Ue){const{componentCls:Ze,inputPaddingHorizontalBase:St,borderRadius:mt}=xe,Pt=xe.controlHeight-xe.lineWidth*2,Qe=Math.ceil(xe.fontSize*1.25),Ft=Ue?`${Ze}-${Ue}`:"";return{[`${Ze}-single${Ft}`]:{fontSize:xe.fontSize,[`${Ze}-selector`]:Object.assign(Object.assign({},(0,fe.Wf)(xe)),{display:"flex",borderRadius:mt,[`${Ze}-selection-search`]:{position:"absolute",top:0,insetInlineStart:St,insetInlineEnd:St,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Ze}-selection-item,
|
|
|
${Ze}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${Pt}px`,transition:`all ${xe.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Pt}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:Qe},[`&${Ze}-open ${Ze}-selection-item`]:{color:xe.colorTextPlaceholder},[`&:not(${Ze}-customize-input)`]:{[`${Ze}-selector`]:{width:"100%",height:xe.controlHeight,padding:`0 ${St}px`,[`${Ze}-selection-search-input`]:{height:Pt},"&:after":{lineHeight:`${Pt}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 ${St}px`,"&:after":{display:"none"}}}}}}}function et(xe){const{componentCls:Ue}=xe,Ze=xe.controlPaddingHorizontalSM-xe.lineWidth;return[lt(xe),lt((0,Be.TS)(xe,{controlHeight:xe.controlHeightSM,borderRadius:xe.borderRadiusSM}),"sm"),{[`${Ue}-single${Ue}-sm`]:{[`&:not(${Ue}-customize-input)`]:{[`${Ue}-selection-search`]:{insetInlineStart:Ze,insetInlineEnd:Ze},[`${Ue}-selector`]:{padding:`0 ${Ze}px`},[`&${Ue}-show-arrow ${Ue}-selection-search`]:{insetInlineEnd:Ze+xe.fontSize*1.5},[`
|
|
|
&${Ue}-show-arrow ${Ue}-selection-item,
|
|
|
&${Ue}-show-arrow ${Ue}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:xe.fontSize*1.5}}}},lt((0,Be.TS)(xe,{controlHeight:xe.singleItemHeightLG,fontSize:xe.fontSizeLG,borderRadius:xe.borderRadiusLG}),"lg")]}const Ee=xe=>{const{componentCls:Ue,selectorBg:Ze}=xe;return{position:"relative",backgroundColor:Ze,border:`${xe.lineWidth}px ${xe.lineType} ${xe.colorBorder}`,transition:`all ${xe.motionDurationMid} ${xe.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ue}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ue}-disabled&`]:{color:xe.colorTextDisabled,background:xe.colorBgContainerDisabled,cursor:"not-allowed",[`${Ue}-multiple&`]:{background:xe.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},yt=function(xe,Ue){let Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:St,borderHoverColor:mt,outlineColor:Pt,antCls:Qe}=Ue,Ft=Ze?{[`${St}-selector`]:{borderColor:mt}}:{};return{[xe]:{[`&:not(${St}-disabled):not(${St}-customize-input):not(${Qe}-pagination-size-changer)`]:Object.assign(Object.assign({},Ft),{[`${St}-focused& ${St}-selector`]:{borderColor:mt,boxShadow:`0 0 0 ${Ue.controlOutlineWidth}px ${Pt}`,outline:0},[`&:hover ${St}-selector`]:{borderColor:mt}})}}},Vt=xe=>{const{componentCls:Ue}=xe;return{[`${Ue}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},qe=xe=>{const{componentCls:Ue,inputPaddingHorizontalBase:Ze,iconCls:St}=xe;return{[Ue]:Object.assign(Object.assign({},(0,fe.Wf)(xe)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ue}-customize-input) ${Ue}-selector`]:Object.assign(Object.assign({},Ee(xe)),Vt(xe)),[`${Ue}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},fe.vS),[`${Ue}-selection-placeholder`]:Object.assign(Object.assign({},fe.vS),{flex:1,color:xe.colorTextPlaceholder,pointerEvents:"none"}),[`${Ue}-arrow`]:Object.assign(Object.assign({},(0,fe.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ze,height:xe.fontSizeIcon,marginTop:-xe.fontSizeIcon/2,color:xe.colorTextQuaternary,fontSize:xe.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[St]:{verticalAlign:"top",transition:`transform ${xe.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ue}-suffix)`]:{pointerEvents:"auto"}},[`${Ue}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ue}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ze,zIndex:1,display:"inline-block",width:xe.fontSizeIcon,height:xe.fontSizeIcon,marginTop:-xe.fontSizeIcon/2,color:xe.colorTextQuaternary,fontSize:xe.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:xe.clearBg,cursor:"pointer",opacity:0,transition:`color ${xe.motionDurationMid} ease, opacity ${xe.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:xe.colorTextTertiary}},"&:hover":{[`${Ue}-clear`]:{opacity:1}}}),[`${Ue}-has-feedback`]:{[`${Ue}-clear`]:{insetInlineEnd:Ze+xe.fontSize+xe.paddingXS}}}},ut=xe=>{const{componentCls:Ue}=xe;return[{[Ue]:{[`&-borderless ${Ue}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ue}-in-form-item`]:{width:"100%"}}},qe(xe),et(xe),ht(xe),me(xe),{[`${Ue}-rtl`]:{direction:"rtl"}},yt(Ue,(0,Be.TS)(xe,{borderHoverColor:xe.colorPrimaryHover,outlineColor:xe.controlOutline})),yt(`${Ue}-status-error`,(0,Be.TS)(xe,{borderHoverColor:xe.colorErrorHover,outlineColor:xe.colorErrorOutline}),!0),yt(`${Ue}-status-warning`,(0,Be.TS)(xe,{borderHoverColor:xe.colorWarningHover,outlineColor:xe.colorWarningOutline}),!0),(0,We.c)(xe,{borderElCls:`${Ue}-selector`,focusElCls:`${Ue}-focused`})]};var Ce=(0,Je.Z)("Select",(xe,Ue)=>{let{rootPrefixCls:Ze}=Ue;const St=(0,Be.TS)(xe,{rootPrefixCls:Ze,inputPaddingHorizontalBase:xe.paddingSM-1,multipleSelectItemHeight:xe.multipleItemHeight});return[ut(St)]},xe=>{const{fontSize:Ue,lineHeight:Ze,controlHeight:St,controlPaddingHorizontal:mt,zIndexPopupBase:Pt,colorText:Qe,fontWeightStrong:Ft,controlItemBgActive:Dt,controlItemBgHover:an,colorBgContainer:it,colorFillSecondary:en,controlHeightLG:_n,controlHeightSM:yn,colorBgContainerDisabled:Ve,colorTextDisabled:Le}=xe;return{zIndexPopup:Pt+50,optionSelectedColor:Qe,optionSelectedFontWeight:Ft,optionSelectedBg:Dt,optionActiveBg:an,optionPadding:`${(St-Ue*Ze)/2}px ${mt}px`,optionFontSize:Ue,optionLineHeight:Ze,optionHeight:St,selectorBg:it,clearBg:it,singleItemHeightLG:_n,multipleItemBg:en,multipleItemBorderColor:"transparent",multipleItemHeight:yn,multipleItemHeightLG:St,multipleSelectorBgDisabled:Ve,multipleItemColorDisabled:Le,multipleItemBorderColorDisabled:"transparent"}})},13458:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return We}});const fe=Be=>{const ve={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Be==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},ve),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ve),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ve),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ve),{points:["br","tr"],offset:[0,-4]})}};function We(Be,Je){return Be||fe(Je)}},78642:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return fe}});function fe(We,Be){return Be!==void 0?Be:We!==null}},46163:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return we}});var fe=se(18299),We=se(16646),Be=se(73475),Je=se(42922),ve=se(3407),Te=se(72395),_e=se(67294);function we(me){let{suffixIcon:De,clearIcon:at,menuItemSelectedIcon:Oe,removeIcon:Mt,loading:ht,multiple:lt,hasFeedback:et,prefixCls:Ee,showSuffixIcon:yt,feedbackIcon:Vt,showArrow:qe,componentName:ut}=me;const Ce=at!=null?at:_e.createElement(We.Z,null),xe=mt=>De===null&&!et&&!qe?null:_e.createElement(_e.Fragment,null,yt!==!1&&mt,et&&Vt);let Ue=null;if(De!==void 0)Ue=xe(De);else if(ht)Ue=xe(_e.createElement(ve.Z,{spin:!0}));else{const mt=`${Ee}-suffix`;Ue=Pt=>{let{open:Qe,showSearch:Ft}=Pt;return xe(Qe&&Ft?_e.createElement(Te.Z,{className:mt}):_e.createElement(Je.Z,{className:mt}))}}let Ze=null;Oe!==void 0?Ze=Oe:lt?Ze=_e.createElement(fe.Z,null):Ze=null;let St=null;return Mt!==void 0?St=Mt:St=_e.createElement(Be.Z,null),{clearIcon:Ce,suffixIcon:Ue,itemIcon:Ze,removeIcon:St}}},33507:function(En,Yt){"use strict";const se=fe=>({[fe.componentCls]:{[`${fe.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${fe.motionDurationMid} ${fe.motionEaseInOut},
|
|
|
opacity ${fe.motionDurationMid} ${fe.motionEaseInOut} !important`}},[`${fe.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${fe.motionDurationMid} ${fe.motionEaseInOut},
|
|
|
opacity ${fe.motionDurationMid} ${fe.motionEaseInOut} !important`}}});Yt.Z=se},33297:function(En,Yt,se){"use strict";se.d(Yt,{Fm:function(){return Oe}});var fe=se(34367),We=se(93590);const Be=new fe.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Je=new fe.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ve=new fe.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Te=new fe.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),_e=new fe.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 fe.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),me=new fe.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),De=new fe.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),at={"move-up":{inKeyframes:me,outKeyframes:De},"move-down":{inKeyframes:Be,outKeyframes:Je},"move-left":{inKeyframes:ve,outKeyframes:Te},"move-right":{inKeyframes:_e,outKeyframes:we}},Oe=(Mt,ht)=>{const{antCls:lt}=Mt,et=`${lt}-${ht}`,{inKeyframes:Ee,outKeyframes:yt}=at[ht];return[(0,We.R)(et,Ee,yt,Mt.motionDurationMid),{[`
|
|
|
${et}-enter,
|
|
|
${et}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:Mt.motionEaseOutCirc},[`${et}-leave`]:{animationTimingFunction:Mt.motionEaseInOutCirc}}]}},67771:function(En,Yt,se){"use strict";se.d(Yt,{Qt:function(){return ve},Uw:function(){return Je},fJ:function(){return Be},ly:function(){return Te},oN:function(){return Oe}});var fe=se(34367),We=se(93590);const Be=new fe.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Je=new fe.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ve=new fe.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Te=new fe.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),_e=new fe.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),we=new fe.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),me=new fe.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),De=new fe.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),at={"slide-up":{inKeyframes:Be,outKeyframes:Je},"slide-down":{inKeyframes:ve,outKeyframes:Te},"slide-left":{inKeyframes:_e,outKeyframes:we},"slide-right":{inKeyframes:me,outKeyframes:De}},Oe=(Mt,ht)=>{const{antCls:lt}=Mt,et=`${lt}-${ht}`,{inKeyframes:Ee,outKeyframes:yt}=at[ht];return[(0,We.R)(et,Ee,yt,Mt.motionDurationMid),{[`
|
|
|
${et}-enter,
|
|
|
${et}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:Mt.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${et}-leave`]:{animationTimingFunction:Mt.motionEaseInQuint}}]}},47897:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return pe}});var fe=se(3407),We=se(94184),Be=se.n(We);function Je(){return Je=Object.assign?Object.assign.bind():function(he){for(var oe=1;oe<arguments.length;oe++){var Ae=arguments[oe];for(var Ge in Ae)Object.prototype.hasOwnProperty.call(Ae,Ge)&&(he[Ge]=Ae[Ge])}return he},Je.apply(this,arguments)}function ve(he){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(oe){return typeof oe}:function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},ve(he)}function Te(he,oe){if(ve(he)!=="object"||he===null)return he;var Ae=he[Symbol.toPrimitive];if(Ae!==void 0){var Ge=Ae.call(he,oe||"default");if(ve(Ge)!=="object")return Ge;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(he)}function _e(he){var oe=Te(he,"string");return ve(oe)==="symbol"?oe:String(oe)}function we(he,oe,Ae){return oe=_e(oe),oe in he?Object.defineProperty(he,oe,{value:Ae,enumerable:!0,configurable:!0,writable:!0}):he[oe]=Ae,he}function me(he){if(Array.isArray(he))return he}function De(he,oe){var Ae=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Ae!=null){var Ge,_t,Rt,zt,qt=[],jt=!0,ar=!1;try{if(Rt=(Ae=Ae.call(he)).next,oe===0){if(Object(Ae)!==Ae)return;jt=!1}else for(;!(jt=(Ge=Rt.call(Ae)).done)&&(qt.push(Ge.value),qt.length!==oe);jt=!0);}catch(xr){ar=!0,_t=xr}finally{try{if(!jt&&Ae.return!=null&&(zt=Ae.return(),Object(zt)!==zt))return}finally{if(ar)throw _t}}return qt}}function at(he,oe){(oe==null||oe>he.length)&&(oe=he.length);for(var Ae=0,Ge=new Array(oe);Ae<oe;Ae++)Ge[Ae]=he[Ae];return Ge}function Oe(he,oe){if(he){if(typeof he=="string")return at(he,oe);var Ae=Object.prototype.toString.call(he).slice(8,-1);if(Ae==="Object"&&he.constructor&&(Ae=he.constructor.name),Ae==="Map"||Ae==="Set")return Array.from(he);if(Ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ae))return at(he,oe)}}function Mt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ht(he,oe){return me(he)||De(he,oe)||Oe(he,oe)||Mt()}function lt(he,oe){if(he==null)return{};var Ae={},Ge=Object.keys(he),_t,Rt;for(Rt=0;Rt<Ge.length;Rt++)_t=Ge[Rt],!(oe.indexOf(_t)>=0)&&(Ae[_t]=he[_t]);return Ae}function et(he,oe){if(he==null)return{};var Ae=lt(he,oe),Ge,_t;if(Object.getOwnPropertySymbols){var Rt=Object.getOwnPropertySymbols(he);for(_t=0;_t<Rt.length;_t++)Ge=Rt[_t],!(oe.indexOf(Ge)>=0)&&Object.prototype.propertyIsEnumerable.call(he,Ge)&&(Ae[Ge]=he[Ge])}return Ae}var Ee=se(67294);function yt(he){if(Array.isArray(he))return he}function Vt(he,oe){var Ae=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Ae!=null){var Ge,_t,Rt,zt,qt=[],jt=!0,ar=!1;try{if(Rt=(Ae=Ae.call(he)).next,oe===0){if(Object(Ae)!==Ae)return;jt=!1}else for(;!(jt=(Ge=Rt.call(Ae)).done)&&(qt.push(Ge.value),qt.length!==oe);jt=!0);}catch(xr){ar=!0,_t=xr}finally{try{if(!jt&&Ae.return!=null&&(zt=Ae.return(),Object(zt)!==zt))return}finally{if(ar)throw _t}}return qt}}function qe(he,oe){(oe==null||oe>he.length)&&(oe=he.length);for(var Ae=0,Ge=new Array(oe);Ae<oe;Ae++)Ge[Ae]=he[Ae];return Ge}function ut(he,oe){if(he){if(typeof he=="string")return qe(he,oe);var Ae=Object.prototype.toString.call(he).slice(8,-1);if(Ae==="Object"&&he.constructor&&(Ae=he.constructor.name),Ae==="Map"||Ae==="Set")return Array.from(he);if(Ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ae))return qe(he,oe)}}function Ce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(he,oe){return yt(he)||Vt(he,oe)||ut(he,oe)||Ce()}function Ue(he){var oe=Ee.useRef();oe.current=he;var Ae=Ee.useCallback(function(){for(var Ge,_t=arguments.length,Rt=new Array(_t),zt=0;zt<_t;zt++)Rt[zt]=arguments[zt];return(Ge=oe.current)===null||Ge===void 0?void 0:Ge.call.apply(Ge,[oe].concat(Rt))},[]);return Ae}function Ze(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var St=Ze()?Ee.useLayoutEffect:Ee.useEffect,mt=function(oe,Ae){var Ge=Ee.useRef(!0);St(function(){return oe(Ge.current)},Ae),St(function(){return Ge.current=!1,function(){Ge.current=!0}},[])},Pt=function(oe,Ae){mt(function(Ge){if(!Ge)return oe()},Ae)},Qe=null;function Ft(he){var oe=Ee.useRef(!1),Ae=Ee.useState(he),Ge=xe(Ae,2),_t=Ge[0],Rt=Ge[1];Ee.useEffect(function(){return oe.current=!1,function(){oe.current=!0}},[]);function zt(qt,jt){jt&&oe.current||Rt(qt)}return[_t,zt]}function Dt(he){return he!==void 0}function an(he,oe){var Ae=oe||{},Ge=Ae.defaultValue,_t=Ae.value,Rt=Ae.onChange,zt=Ae.postState,qt=Ft(function(){return Dt(_t)?_t:Dt(Ge)?typeof Ge=="function"?Ge():Ge:typeof he=="function"?he():he}),jt=xe(qt,2),ar=jt[0],xr=jt[1],Nt=_t!==void 0?_t:ar,pn=zt?zt(Nt):Nt,cr=Ue(Rt),Rr=Ft([Nt]),rt=xe(Rr,2),Kt=rt[0],Bn=rt[1];Pt(function(){var tr=Kt[0];ar!==tr&&cr(ar,tr)},[Kt]),Pt(function(){Dt(_t)||xr(_t)},[_t]);var Gn=Ue(function(tr,Sr){xr(tr,Sr),Bn([Nt],Sr)});return[pn,Gn]}var it={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(oe){var Ae=oe.keyCode;if(oe.altKey&&!oe.ctrlKey||oe.metaKey||Ae>=it.F1&&Ae<=it.F12)return!1;switch(Ae){case it.ALT:case it.CAPS_LOCK:case it.CONTEXT_MENU:case it.CTRL:case it.DOWN:case it.END:case it.ESC:case it.HOME:case it.INSERT:case it.LEFT:case it.MAC_FF_META:case it.META:case it.NUMLOCK:case it.NUM_CENTER:case it.PAGE_DOWN:case it.PAGE_UP:case it.PAUSE:case it.PRINT_SCREEN:case it.RIGHT:case it.SHIFT:case it.UP:case it.WIN_KEY:case it.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(oe){if(oe>=it.ZERO&&oe<=it.NINE||oe>=it.NUM_ZERO&&oe<=it.NUM_MULTIPLY||oe>=it.A&&oe<=it.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&oe===0)return!0;switch(oe){case it.SPACE:case it.QUESTION_MARK:case it.NUM_PLUS:case it.NUM_MINUS:case it.NUM_PERIOD:case it.NUM_DIVISION:case it.SEMICOLON:case it.DASH:case it.EQUALS:case it.COMMA:case it.PERIOD:case it.SLASH:case it.APOSTROPHE:case it.SINGLE_QUOTE:case it.OPEN_SQUARE_BRACKET:case it.BACKSLASH:case it.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},en=it,_n=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],yn=Ee.forwardRef(function(he,oe){var Ae,Ge=he.prefixCls,_t=Ge===void 0?"rc-switch":Ge,Rt=he.className,zt=he.checked,qt=he.defaultChecked,jt=he.disabled,ar=he.loadingIcon,xr=he.checkedChildren,Nt=he.unCheckedChildren,pn=he.onClick,cr=he.onChange,Rr=he.onKeyDown,rt=et(he,_n),Kt=an(!1,{value:zt,defaultValue:qt}),Bn=ht(Kt,2),Gn=Bn[0],tr=Bn[1];function Sr(Vr,lr){var si=Gn;return jt||(si=Vr,tr(si),cr==null||cr(si,lr)),si}function Ar(Vr){Vr.which===en.LEFT?Sr(!1,Vr):Vr.which===en.RIGHT&&Sr(!0,Vr),Rr==null||Rr(Vr)}function Mr(Vr){var lr=Sr(!Gn,Vr);pn==null||pn(lr,Vr)}var Pr=Be()(_t,Rt,(Ae={},we(Ae,"".concat(_t,"-checked"),Gn),we(Ae,"".concat(_t,"-disabled"),jt),Ae));return Ee.createElement("button",Je({},rt,{type:"button",role:"switch","aria-checked":Gn,disabled:jt,className:Pr,ref:oe,onKeyDown:Ar,onClick:Mr}),ar,Ee.createElement("span",{className:"".concat(_t,"-inner")},Ee.createElement("span",{className:"".concat(_t,"-inner-checked")},xr),Ee.createElement("span",{className:"".concat(_t,"-inner-unchecked")},Nt)))});yn.displayName="Switch";var Ve=yn,Le=se(45353),Bt=se(53124),Dn=se(98866),dn=se(98675),nt=se(84780),ft=se(14747),Xt=se(67968),Rn=se(45503);const wn=he=>{const{componentCls:oe,trackHeightSM:Ae,trackPadding:Ge,trackMinWidthSM:_t,innerMinMarginSM:Rt,innerMaxMarginSM:zt,handleSizeSM:qt}=he,jt=`${oe}-inner`;return{[oe]:{[`&${oe}-small`]:{minWidth:_t,height:Ae,lineHeight:`${Ae}px`,[`${oe}-inner`]:{paddingInlineStart:zt,paddingInlineEnd:Rt,[`${jt}-checked`]:{marginInlineStart:`calc(-100% + ${qt+Ge*2}px - ${zt*2}px)`,marginInlineEnd:`calc(100% - ${qt+Ge*2}px + ${zt*2}px)`},[`${jt}-unchecked`]:{marginTop:-Ae,marginInlineStart:0,marginInlineEnd:0}},[`${oe}-handle`]:{width:qt,height:qt},[`${oe}-loading-icon`]:{top:(qt-he.switchLoadingIconSize)/2,fontSize:he.switchLoadingIconSize},[`&${oe}-checked`]:{[`${oe}-inner`]:{paddingInlineStart:Rt,paddingInlineEnd:zt,[`${jt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${jt}-unchecked`]:{marginInlineStart:`calc(100% - ${qt+Ge*2}px + ${zt*2}px)`,marginInlineEnd:`calc(-100% + ${qt+Ge*2}px - ${zt*2}px)`}},[`${oe}-handle`]:{insetInlineStart:`calc(100% - ${qt+Ge}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${jt}`]:{[`${jt}-unchecked`]:{marginInlineStart:he.marginXXS/2,marginInlineEnd:-he.marginXXS/2}},[`&${oe}-checked ${jt}`]:{[`${jt}-checked`]:{marginInlineStart:-he.marginXXS/2,marginInlineEnd:he.marginXXS/2}}}}}}},Zt=he=>{const{componentCls:oe,handleSize:Ae}=he;return{[oe]:{[`${oe}-loading-icon${he.iconCls}`]:{position:"relative",top:(Ae-he.fontSize)/2,color:he.switchLoadingIconColor,verticalAlign:"top"},[`&${oe}-checked ${oe}-loading-icon`]:{color:he.switchColor}}}},Ht=he=>{const{componentCls:oe,motion:Ae,trackPadding:Ge,handleBg:_t,handleShadow:Rt,handleSize:zt}=he,qt=`${oe}-handle`;return{[oe]:{[qt]:{position:"absolute",top:Ge,insetInlineStart:Ge,width:zt,height:zt,transition:`all ${he.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:_t,borderRadius:zt/2,boxShadow:Rt,transition:`all ${he.switchDuration} ease-in-out`,content:'""'}},[`&${oe}-checked ${qt}`]:{insetInlineStart:`calc(100% - ${zt+Ge}px)`},[`&:not(${oe}-disabled):active`]:Ae?{[`${qt}::before`]:{insetInlineEnd:he.switchHandleActiveInset,insetInlineStart:0},[`&${oe}-checked ${qt}::before`]:{insetInlineEnd:0,insetInlineStart:he.switchHandleActiveInset}}:{}}}},Tn=he=>{const{componentCls:oe,trackHeight:Ae,trackPadding:Ge,innerMinMargin:_t,innerMaxMargin:Rt,handleSize:zt}=he,qt=`${oe}-inner`;return{[oe]:{[qt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Rt,paddingInlineEnd:_t,transition:`padding-inline-start ${he.switchDuration} ease-in-out, padding-inline-end ${he.switchDuration} ease-in-out`,[`${qt}-checked, ${qt}-unchecked`]:{display:"block",color:he.colorTextLightSolid,fontSize:he.fontSizeSM,transition:`margin-inline-start ${he.switchDuration} ease-in-out, margin-inline-end ${he.switchDuration} ease-in-out`,pointerEvents:"none"},[`${qt}-checked`]:{marginInlineStart:`calc(-100% + ${zt+Ge*2}px - ${Rt*2}px)`,marginInlineEnd:`calc(100% - ${zt+Ge*2}px + ${Rt*2}px)`},[`${qt}-unchecked`]:{marginTop:-Ae,marginInlineStart:0,marginInlineEnd:0}},[`&${oe}-checked ${qt}`]:{paddingInlineStart:_t,paddingInlineEnd:Rt,[`${qt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${qt}-unchecked`]:{marginInlineStart:`calc(100% - ${zt+Ge*2}px + ${Rt*2}px)`,marginInlineEnd:`calc(-100% + ${zt+Ge*2}px - ${Rt*2}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${qt}`]:{[`${qt}-unchecked`]:{marginInlineStart:Ge*2,marginInlineEnd:-Ge*2}},[`&${oe}-checked ${qt}`]:{[`${qt}-checked`]:{marginInlineStart:-Ge*2,marginInlineEnd:Ge*2}}}}}},xn=he=>{const{componentCls:oe,trackHeight:Ae,trackMinWidth:Ge}=he;return{[oe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ft.Wf)(he)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ge,height:Ae,lineHeight:`${Ae}px`,verticalAlign:"middle",background:he.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${he.motionDurationMid}`,userSelect:"none",[`&:hover:not(${oe}-disabled)`]:{background:he.colorTextTertiary}}),(0,ft.Qy)(he)),{[`&${oe}-checked`]:{background:he.switchColor,[`&:hover:not(${oe}-disabled)`]:{background:he.colorPrimaryHover}},[`&${oe}-loading, &${oe}-disabled`]:{cursor:"not-allowed",opacity:he.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${oe}-rtl`]:{direction:"rtl"}})}};var ke=(0,Xt.Z)("Switch",he=>{const oe=(0,Rn.TS)(he,{switchDuration:he.motionDurationMid,switchColor:he.colorPrimary,switchDisabledOpacity:he.opacityLoading,switchLoadingIconSize:he.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${he.opacityLoading})`,switchHandleActiveInset:"-30%"});return[xn(oe),Tn(oe),Ht(oe),Zt(oe),wn(oe)]},he=>{const{fontSize:oe,lineHeight:Ae,controlHeight:Ge,colorWhite:_t}=he,Rt=oe*Ae,zt=Ge/2,qt=2,jt=Rt-qt*2,ar=zt-qt*2;return{trackHeight:Rt,trackHeightSM:zt,trackMinWidth:jt*2+qt*4,trackMinWidthSM:ar*2+qt*2,trackPadding:qt,handleBg:_t,handleSize:jt,handleSizeSM:ar,handleShadow:`0 2px 4px 0 ${new nt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:jt/2,innerMaxMargin:jt+qt+qt*2,innerMinMarginSM:ar/2,innerMaxMarginSM:ar+qt+qt*2}}),ue=function(he,oe){var Ae={};for(var Ge in he)Object.prototype.hasOwnProperty.call(he,Ge)&&oe.indexOf(Ge)<0&&(Ae[Ge]=he[Ge]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Ge=Object.getOwnPropertySymbols(he);_t<Ge.length;_t++)oe.indexOf(Ge[_t])<0&&Object.prototype.propertyIsEnumerable.call(he,Ge[_t])&&(Ae[Ge[_t]]=he[Ge[_t]]);return Ae};const le=Ee.forwardRef((he,oe)=>{const{prefixCls:Ae,size:Ge,disabled:_t,loading:Rt,className:zt,rootClassName:qt,style:jt}=he,ar=ue(he,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:xr,direction:Nt,switch:pn}=Ee.useContext(Bt.E_),cr=Ee.useContext(Dn.Z),Rr=(_t!=null?_t:cr)||Rt,rt=xr("switch",Ae),Kt=Ee.createElement("div",{className:`${rt}-handle`},Rt&&Ee.createElement(fe.Z,{className:`${rt}-loading-icon`})),[Bn,Gn]=ke(rt),tr=(0,dn.Z)(Ge),Sr=Be()(pn==null?void 0:pn.className,{[`${rt}-small`]:tr==="small",[`${rt}-loading`]:Rt,[`${rt}-rtl`]:Nt==="rtl"},zt,qt,Gn),Ar=Object.assign(Object.assign({},pn==null?void 0:pn.style),jt);return Bn(Ee.createElement(Le.Z,{component:"Switch"},Ee.createElement(Ve,Object.assign({},ar,{prefixCls:rt,className:Sr,style:Ar,disabled:Rr,ref:oe,loadingIcon:Kt}))))});le.__ANT_SWITCH=!0;var pe=le},66368:function(En,Yt,se){"use strict";se.d(Yt,{default:function(){return Mi}});var fe=se(73475),We=se(25877),Be=se(38308),Je=se(94184),ve=se.n(Je),Te=se(87462),_e=se(4942),we=se(1413),me=se(97685),De=se(71002),at=se(45987),Oe=se(67294),Mt=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Ie=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Ie)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Ie==null?void 0:Ie.substr(0,4))};function ht(Ie){var Fe=Oe.useRef();Fe.current=Ie;var ze=Oe.useCallback(function(){for(var je,tt=arguments.length,st=new Array(tt),kt=0;kt<tt;kt++)st[kt]=arguments[kt];return(je=Fe.current)===null||je===void 0?void 0:je.call.apply(je,[Fe].concat(st))},[]);return ze}function lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var et=lt()?Oe.useLayoutEffect:Oe.useEffect,Ee=function(Fe,ze){var je=Oe.useRef(!0);et(function(){return Fe(je.current)},ze),et(function(){return je.current=!1,function(){je.current=!0}},[])},yt=function(Fe,ze){Ee(function(je){if(!je)return Fe()},ze)},Vt=null;function qe(Ie){var Fe=Oe.useRef(!1),ze=Oe.useState(Ie),je=(0,me.Z)(ze,2),tt=je[0],st=je[1];Oe.useEffect(function(){return Fe.current=!1,function(){Fe.current=!0}},[]);function kt(nn,sn){sn&&Fe.current||st(nn)}return[tt,kt]}function ut(Ie){return Ie!==void 0}function Ce(Ie,Fe){var ze=Fe||{},je=ze.defaultValue,tt=ze.value,st=ze.onChange,kt=ze.postState,nn=qe(function(){return ut(tt)?tt:ut(je)?typeof je=="function"?je():je:typeof Ie=="function"?Ie():Ie}),sn=(0,me.Z)(nn,2),Jn=sn[0],yr=sn[1],Zn=tt!==void 0?tt:Jn,Cn=kt?kt(Zn):Zn,vn=ht(st),Pn=qe([Zn]),zn=(0,me.Z)(Pn,2),mr=zn[0],Yn=zn[1];yt(function(){var rr=mr[0];Jn!==rr&&vn(Jn,rr)},[mr]),yt(function(){ut(tt)||yr(tt)},[tt]);var Xn=ht(function(rr,ir){yr(rr,ir),Yn([Zn],ir)});return[Cn,Xn]}var xe=se(62874),Ue=(0,Oe.createContext)(null),Ze=Oe.forwardRef(function(Ie,Fe){var ze=Ie.prefixCls,je=Ie.className,tt=Ie.style,st=Ie.id,kt=Ie.active,nn=Ie.tabKey,sn=Ie.children;return Oe.createElement("div",{id:st&&"".concat(st,"-panel-").concat(nn),role:"tabpanel",tabIndex:kt?0:-1,"aria-labelledby":st&&"".concat(st,"-tab-").concat(nn),"aria-hidden":!kt,style:tt,className:ve()(ze,kt&&"".concat(ze,"-active"),je),ref:Fe},sn)}),St=Ze,mt=["key","forceRender","style","className"];function Pt(Ie){var Fe=Ie.id,ze=Ie.activeKey,je=Ie.animated,tt=Ie.tabPosition,st=Ie.destroyInactiveTabPane,kt=Oe.useContext(Ue),nn=kt.prefixCls,sn=kt.tabs,Jn=je.tabPane,yr="".concat(nn,"-tabpane");return Oe.createElement("div",{className:ve()("".concat(nn,"-content-holder"))},Oe.createElement("div",{className:ve()("".concat(nn,"-content"),"".concat(nn,"-content-").concat(tt),(0,_e.Z)({},"".concat(nn,"-content-animated"),Jn))},sn.map(function(Zn){var Cn=Zn.key,vn=Zn.forceRender,Pn=Zn.style,zn=Zn.className,mr=(0,at.Z)(Zn,mt),Yn=Cn===ze;return Oe.createElement(xe.Z,(0,Te.Z)({key:Cn,visible:Yn,forceRender:vn,removeOnLeave:!!st,leavedClassName:"".concat(yr,"-hidden")},je.tabPaneMotion),function(Xn,rr){var ir=Xn.style,br=Xn.className;return Oe.createElement(St,(0,Te.Z)({},mr,{prefixCls:yr,id:Fe,tabKey:Cn,animated:Jn,active:Yn,style:(0,we.Z)((0,we.Z)({},Pn),ir),className:ve()(zn,br),ref:rr}))})})))}var Qe=se(74902),Ft=se(48555),Dt=se(59864);function an(Ie,Fe,ze){var je=Oe.useRef({});return(!("value"in je.current)||ze(je.current.condition,Fe))&&(je.current.value=Ie(),je.current.condition=Fe),je.current.value}function it(Ie,Fe){typeof Ie=="function"?Ie(Fe):(0,De.Z)(Ie)==="object"&&Ie&&"current"in Ie&&(Ie.current=Fe)}function en(){for(var Ie=arguments.length,Fe=new Array(Ie),ze=0;ze<Ie;ze++)Fe[ze]=arguments[ze];var je=Fe.filter(function(tt){return tt});return je.length<=1?je[0]:function(tt){Fe.forEach(function(st){it(st,tt)})}}function _n(){for(var Ie=arguments.length,Fe=new Array(Ie),ze=0;ze<Ie;ze++)Fe[ze]=arguments[ze];return an(function(){return en.apply(void 0,Fe)},Fe,function(je,tt){return je.length===tt.length&&je.every(function(st,kt){return st===tt[kt]})})}function yn(Ie){var Fe,ze,je=isMemo(Ie)?Ie.type.type:Ie.type;return!(typeof je=="function"&&!((Fe=je.prototype)!==null&&Fe!==void 0&&Fe.render)||typeof Ie=="function"&&!((ze=Ie.prototype)!==null&&ze!==void 0&&ze.render))}var Ve={width:0,height:0,left:0,top:0};function Le(Ie,Fe,ze){return(0,Oe.useMemo)(function(){for(var je,tt=new Map,st=Fe.get((je=Ie[0])===null||je===void 0?void 0:je.key)||Ve,kt=st.left+st.width,nn=0;nn<Ie.length;nn+=1){var sn=Ie[nn].key,Jn=Fe.get(sn);if(!Jn){var yr;Jn=Fe.get((yr=Ie[nn-1])===null||yr===void 0?void 0:yr.key)||Ve}var Zn=tt.get(sn)||(0,we.Z)({},Jn);Zn.right=kt-Zn.left-Zn.width,tt.set(sn,Zn)}return tt},[Ie.map(function(je){return je.key}).join("_"),Fe,ze])}function Bt(Ie,Fe){var ze=Oe.useRef(Ie),je=Oe.useState({}),tt=(0,me.Z)(je,2),st=tt[1];function kt(nn){var sn=typeof nn=="function"?nn(ze.current):nn;sn!==ze.current&&Fe(sn,ze.current),ze.current=sn,st({})}return[ze.current,kt]}var Dn=.1,dn=.01,nt=20,ft=Math.pow(.995,nt);function Xt(Ie,Fe){var ze=(0,Oe.useState)(),je=(0,me.Z)(ze,2),tt=je[0],st=je[1],kt=(0,Oe.useState)(0),nn=(0,me.Z)(kt,2),sn=nn[0],Jn=nn[1],yr=(0,Oe.useState)(0),Zn=(0,me.Z)(yr,2),Cn=Zn[0],vn=Zn[1],Pn=(0,Oe.useState)(),zn=(0,me.Z)(Pn,2),mr=zn[0],Yn=zn[1],Xn=(0,Oe.useRef)();function rr(dt){var Ut=dt.touches[0],un=Ut.screenX,bn=Ut.screenY;st({x:un,y:bn}),window.clearInterval(Xn.current)}function ir(dt){if(tt){dt.preventDefault();var Ut=dt.touches[0],un=Ut.screenX,bn=Ut.screenY;st({x:un,y:bn});var Kn=un-tt.x,Ln=bn-tt.y;Fe(Kn,Ln);var on=Date.now();Jn(on),vn(on-sn),Yn({x:Kn,y:Ln})}}function br(){if(tt&&(st(null),Yn(null),mr)){var dt=mr.x/Cn,Ut=mr.y/Cn,un=Math.abs(dt),bn=Math.abs(Ut);if(Math.max(un,bn)<Dn)return;var Kn=dt,Ln=Ut;Xn.current=window.setInterval(function(){if(Math.abs(Kn)<dn&&Math.abs(Ln)<dn){window.clearInterval(Xn.current);return}Kn*=ft,Ln*=ft,Fe(Kn*nt,Ln*nt)},nt)}}var Re=(0,Oe.useRef)();function Ke(dt){var Ut=dt.deltaX,un=dt.deltaY,bn=0,Kn=Math.abs(Ut),Ln=Math.abs(un);Kn===Ln?bn=Re.current==="x"?Ut:un:Kn>Ln?(bn=Ut,Re.current="x"):(bn=un,Re.current="y"),Fe(-bn,-bn)&&dt.preventDefault()}var Lt=(0,Oe.useRef)(null);Lt.current={onTouchStart:rr,onTouchMove:ir,onTouchEnd:br,onWheel:Ke},Oe.useEffect(function(){function dt(Kn){Lt.current.onTouchStart(Kn)}function Ut(Kn){Lt.current.onTouchMove(Kn)}function un(Kn){Lt.current.onTouchEnd(Kn)}function bn(Kn){Lt.current.onWheel(Kn)}return document.addEventListener("touchmove",Ut,{passive:!1}),document.addEventListener("touchend",un,{passive:!1}),Ie.current.addEventListener("touchstart",dt,{passive:!1}),Ie.current.addEventListener("wheel",bn),function(){document.removeEventListener("touchmove",Ut),document.removeEventListener("touchend",un)}},[])}function Rn(Ie){var Fe=(0,Oe.useState)(0),ze=(0,me.Z)(Fe,2),je=ze[0],tt=ze[1],st=(0,Oe.useRef)(0),kt=(0,Oe.useRef)();return kt.current=Ie,yt(function(){var nn;(nn=kt.current)===null||nn===void 0||nn.call(kt)},[je]),function(){st.current===je&&(st.current+=1,tt(st.current))}}function wn(Ie){var Fe=(0,Oe.useRef)([]),ze=(0,Oe.useState)({}),je=(0,me.Z)(ze,2),tt=je[1],st=(0,Oe.useRef)(typeof Ie=="function"?Ie():Ie),kt=Rn(function(){var sn=st.current;Fe.current.forEach(function(Jn){sn=Jn(sn)}),Fe.current=[],st.current=sn,tt({})});function nn(sn){Fe.current.push(sn),kt()}return[st.current,nn]}var Zt={width:0,height:0,left:0,top:0,right:0};function Ht(Ie,Fe,ze,je,tt,st,kt){var nn=kt.tabs,sn=kt.tabPosition,Jn=kt.rtl,yr,Zn,Cn;return["top","bottom"].includes(sn)?(yr="width",Zn=Jn?"right":"left",Cn=Math.abs(ze)):(yr="height",Zn="top",Cn=-ze),(0,Oe.useMemo)(function(){if(!nn.length)return[0,0];for(var vn=nn.length,Pn=vn,zn=0;zn<vn;zn+=1){var mr=Ie.get(nn[zn].key)||Zt;if(mr[Zn]+mr[yr]>Cn+Fe){Pn=zn-1;break}}for(var Yn=0,Xn=vn-1;Xn>=0;Xn-=1){var rr=Ie.get(nn[Xn].key)||Zt;if(rr[Zn]<Cn){Yn=Xn+1;break}}return Yn>=Pn?[0,0]:[Yn,Pn]},[Ie,Fe,je,tt,st,Cn,sn,nn.map(function(vn){return vn.key}).join("_"),Jn])}function Tn(Ie){var Fe;return Ie instanceof Map?(Fe={},Ie.forEach(function(ze,je){Fe[je]=ze})):Fe=Ie,JSON.stringify(Fe)}var xn="TABS_DQ";function ke(Ie){return String(Ie).replace(/"/g,xn)}function ue(Ie,Fe,ze,je){return!(!ze||je||Ie===!1||Ie===void 0&&(Fe===!1||Fe===null))}function le(Ie,Fe){var ze=Ie.prefixCls,je=Ie.editable,tt=Ie.locale,st=Ie.style;return!je||je.showAdd===!1?null:Oe.createElement("button",{ref:Fe,type:"button",className:"".concat(ze,"-nav-add"),style:st,"aria-label":(tt==null?void 0:tt.addAriaLabel)||"Add tab",onClick:function(nn){je.onEdit("add",{event:nn})}},je.addIcon||"+")}var pe=Oe.forwardRef(le),he=Oe.forwardRef(function(Ie,Fe){var ze=Ie.position,je=Ie.prefixCls,tt=Ie.extra;if(!tt)return null;var st,kt={};return(0,De.Z)(tt)==="object"&&!Oe.isValidElement(tt)?kt=tt:kt.right=tt,ze==="right"&&(st=kt.right),ze==="left"&&(st=kt.left),st?Oe.createElement("div",{className:"".concat(je,"-extra-content"),ref:Fe},st):null}),oe=he,Ae=se(62709);function Ge(Ie,Fe,ze){var je=React.useRef({});return(!("value"in je.current)||ze(je.current.condition,Fe))&&(je.current.value=Ie(),je.current.condition=Fe),je.current.value}function _t(Ie,Fe){typeof Ie=="function"?Ie(Fe):(0,De.Z)(Ie)==="object"&&Ie&&"current"in Ie&&(Ie.current=Fe)}function Rt(){for(var Ie=arguments.length,Fe=new Array(Ie),ze=0;ze<Ie;ze++)Fe[ze]=arguments[ze];var je=Fe.filter(function(tt){return tt});return je.length<=1?je[0]:function(tt){Fe.forEach(function(st){_t(st,tt)})}}function zt(){for(var Ie=arguments.length,Fe=new Array(Ie),ze=0;ze<Ie;ze++)Fe[ze]=arguments[ze];return useMemo(function(){return Rt.apply(void 0,Fe)},Fe,function(je,tt){return je.length===tt.length&&je.every(function(st,kt){return st===tt[kt]})})}function qt(Ie){var Fe,ze,je=(0,Dt.isMemo)(Ie)?Ie.type.type:Ie.type;return!(typeof je=="function"&&!((Fe=je.prototype)!==null&&Fe!==void 0&&Fe.render)||typeof Ie=="function"&&!((ze=Ie.prototype)!==null&&ze!==void 0&&ze.render))}var jt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Fe){var ze=Fe.keyCode;if(Fe.altKey&&!Fe.ctrlKey||Fe.metaKey||ze>=jt.F1&&ze<=jt.F12)return!1;switch(ze){case jt.ALT:case jt.CAPS_LOCK:case jt.CONTEXT_MENU:case jt.CTRL:case jt.DOWN:case jt.END:case jt.ESC:case jt.HOME:case jt.INSERT:case jt.LEFT:case jt.MAC_FF_META:case jt.META:case jt.NUMLOCK:case jt.NUM_CENTER:case jt.PAGE_DOWN:case jt.PAGE_UP:case jt.PAUSE:case jt.PRINT_SCREEN:case jt.RIGHT:case jt.SHIFT:case jt.UP:case jt.WIN_KEY:case jt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Fe){if(Fe>=jt.ZERO&&Fe<=jt.NINE||Fe>=jt.NUM_ZERO&&Fe<=jt.NUM_MULTIPLY||Fe>=jt.A&&Fe<=jt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Fe===0)return!0;switch(Fe){case jt.SPACE:case jt.QUESTION_MARK:case jt.NUM_PLUS:case jt.NUM_MINUS:case jt.NUM_PERIOD:case jt.NUM_DIVISION:case jt.SEMICOLON:case jt.DASH:case jt.EQUALS:case jt.COMMA:case jt.PERIOD:case jt.SLASH:case jt.APOSTROPHE:case jt.SINGLE_QUOTE:case jt.OPEN_SQUARE_BRACKET:case jt.BACKSLASH:case jt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ar=jt,xr=function(Fe){return+setTimeout(Fe,16)},Nt=function(Fe){return clearTimeout(Fe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(xr=function(Fe){return window.requestAnimationFrame(Fe)},Nt=function(Fe){return window.cancelAnimationFrame(Fe)});var pn=0,cr=new Map;function Rr(Ie){cr.delete(Ie)}var rt=function(Fe){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;pn+=1;var je=pn;function tt(st){if(st===0)Rr(je),Fe();else{var kt=xr(function(){tt(st-1)});cr.set(je,kt)}}return tt(ze),je};rt.cancel=function(Ie){var Fe=cr.get(Ie);return Rr(Fe),Nt(Fe)};var Kt=rt,Bn=ar.ESC,Gn=ar.TAB;function tr(Ie){var Fe=Ie.visible,ze=Ie.triggerRef,je=Ie.onVisibleChange,tt=Ie.autoFocus,st=Ie.overlayRef,kt=Oe.useRef(!1),nn=function(){if(Fe){var Zn,Cn;(Zn=ze.current)===null||Zn===void 0||(Cn=Zn.focus)===null||Cn===void 0||Cn.call(Zn),je==null||je(!1)}},sn=function(){var Zn;return(Zn=st.current)!==null&&Zn!==void 0&&Zn.focus?(st.current.focus(),kt.current=!0,!0):!1},Jn=function(Zn){switch(Zn.keyCode){case Bn:nn();break;case Gn:{var Cn=!1;kt.current||(Cn=sn()),Cn?Zn.preventDefault():nn();break}}};Oe.useEffect(function(){return Fe?(window.addEventListener("keydown",Jn),tt&&Kt(sn,3),function(){window.removeEventListener("keydown",Jn),kt.current=!1}):function(){kt.current=!1}},[Fe])}var Sr=(0,Oe.forwardRef)(function(Ie,Fe){var ze=Ie.overlay,je=Ie.arrow,tt=Ie.prefixCls,st=(0,Oe.useMemo)(function(){var nn;return typeof ze=="function"?nn=ze():nn=ze,nn},[ze]),kt=Rt(Fe,st==null?void 0:st.ref);return Oe.createElement(Oe.Fragment,null,je&&Oe.createElement("div",{className:"".concat(tt,"-arrow")}),Oe.cloneElement(st,{ref:qt(st)?kt:void 0}))}),Ar=Sr,Mr={adjustX:1,adjustY:1},Pr=[0,0],Vr={topLeft:{points:["bl","tl"],overflow:Mr,offset:[0,-4],targetOffset:Pr},top:{points:["bc","tc"],overflow:Mr,offset:[0,-4],targetOffset:Pr},topRight:{points:["br","tr"],overflow:Mr,offset:[0,-4],targetOffset:Pr},bottomLeft:{points:["tl","bl"],overflow:Mr,offset:[0,4],targetOffset:Pr},bottom:{points:["tc","bc"],overflow:Mr,offset:[0,4],targetOffset:Pr},bottomRight:{points:["tr","br"],overflow:Mr,offset:[0,4],targetOffset:Pr}},lr=Vr,si=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Li(Ie,Fe){var ze,je=Ie.arrow,tt=je===void 0?!1:je,st=Ie.prefixCls,kt=st===void 0?"rc-dropdown":st,nn=Ie.transitionName,sn=Ie.animation,Jn=Ie.align,yr=Ie.placement,Zn=yr===void 0?"bottomLeft":yr,Cn=Ie.placements,vn=Cn===void 0?lr:Cn,Pn=Ie.getPopupContainer,zn=Ie.showAction,mr=Ie.hideAction,Yn=Ie.overlayClassName,Xn=Ie.overlayStyle,rr=Ie.visible,ir=Ie.trigger,br=ir===void 0?["hover"]:ir,Re=Ie.autoFocus,Ke=Ie.overlay,Lt=Ie.children,dt=Ie.onVisibleChange,Ut=(0,at.Z)(Ie,si),un=Oe.useState(),bn=(0,me.Z)(un,2),Kn=bn[0],Ln=bn[1],on="visible"in Ie?rr:Kn,Hn=Oe.useRef(null),jn=Oe.useRef(null),wr=Oe.useRef(null);Oe.useImperativeHandle(Fe,function(){return Hn.current});var Wn=function(Fr){Ln(Fr),dt==null||dt(Fr)};tr({visible:on,triggerRef:wr,onVisibleChange:Wn,autoFocus:Re,overlayRef:jn});var Or=function(Fr){var fi=Ie.onOverlayClick;Ln(!1),fi&&fi(Fr)},Yr=function(){return Oe.createElement(Ar,{ref:jn,overlay:Ke,prefixCls:kt,arrow:tt})},$r=function(){return typeof Ke=="function"?Yr:Yr()},jr=function(){var Fr=Ie.minOverlayWidthMatchTrigger,fi=Ie.alignPoint;return"minOverlayWidthMatchTrigger"in Ie?Fr:!fi},Er=function(){var Fr=Ie.openClassName;return Fr!==void 0?Fr:"".concat(kt,"-open")},zr=Oe.cloneElement(Lt,{className:ve()((ze=Lt.props)===null||ze===void 0?void 0:ze.className,on&&Er()),ref:qt(Lt)?Rt(wr,Lt.ref):void 0}),ei=mr;return!ei&&br.indexOf("contextMenu")!==-1&&(ei=["click"]),Oe.createElement(Ae.Z,(0,Te.Z)({builtinPlacements:vn},Ut,{prefixCls:kt,ref:Hn,popupClassName:ve()(Yn,(0,_e.Z)({},"".concat(kt,"-show-arrow"),tt)),popupStyle:Xn,action:br,showAction:zn,hideAction:ei,popupPlacement:Zn,popupAlign:Jn,popupTransitionName:nn,popupAnimation:sn,popupVisible:on,stretch:jr()?"minWidth":"",popup:$r(),onPopupVisibleChange:Wn,onPopupClick:Or,getPopupContainer:Pn}),zr)}var Ni=Oe.forwardRef(Li),Hi=Ni,ri=se(78595),vt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Fe){var ze=Fe.keyCode;if(Fe.altKey&&!Fe.ctrlKey||Fe.metaKey||ze>=vt.F1&&ze<=vt.F12)return!1;switch(ze){case vt.ALT:case vt.CAPS_LOCK:case vt.CONTEXT_MENU:case vt.CTRL:case vt.DOWN:case vt.END:case vt.ESC:case vt.HOME:case vt.INSERT:case vt.LEFT:case vt.MAC_FF_META:case vt.META:case vt.NUMLOCK:case vt.NUM_CENTER:case vt.PAGE_DOWN:case vt.PAGE_UP:case vt.PAUSE:case vt.PRINT_SCREEN:case vt.RIGHT:case vt.SHIFT:case vt.UP:case vt.WIN_KEY:case vt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Fe){if(Fe>=vt.ZERO&&Fe<=vt.NINE||Fe>=vt.NUM_ZERO&&Fe<=vt.NUM_MULTIPLY||Fe>=vt.A&&Fe<=vt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Fe===0)return!0;switch(Fe){case vt.SPACE:case vt.QUESTION_MARK:case vt.NUM_PLUS:case vt.NUM_MINUS:case vt.NUM_PERIOD:case vt.NUM_DIVISION:case vt.SEMICOLON:case vt.DASH:case vt.EQUALS:case vt.COMMA:case vt.PERIOD:case vt.SLASH:case vt.APOSTROPHE:case vt.SINGLE_QUOTE:case vt.OPEN_SQUARE_BRACKET:case vt.BACKSLASH:case vt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Sn=vt;function kn(Ie,Fe){var ze=Ie.prefixCls,je=Ie.id,tt=Ie.tabs,st=Ie.locale,kt=Ie.mobile,nn=Ie.moreIcon,sn=nn===void 0?"More":nn,Jn=Ie.moreTransitionName,yr=Ie.style,Zn=Ie.className,Cn=Ie.editable,vn=Ie.tabBarGutter,Pn=Ie.rtl,zn=Ie.removeAriaLabel,mr=Ie.onTabClick,Yn=Ie.getPopupContainer,Xn=Ie.popupClassName,rr=(0,Oe.useState)(!1),ir=(0,me.Z)(rr,2),br=ir[0],Re=ir[1],Ke=(0,Oe.useState)(null),Lt=(0,me.Z)(Ke,2),dt=Lt[0],Ut=Lt[1],un="".concat(je,"-more-popup"),bn="".concat(ze,"-dropdown"),Kn=dt!==null?"".concat(un,"-").concat(dt):null,Ln=st==null?void 0:st.dropdownAriaLabel;function on($r,jr){$r.preventDefault(),$r.stopPropagation(),Cn.onEdit("remove",{key:jr,event:$r})}var Hn=Oe.createElement(ri.ZP,{onClick:function(jr){var Er=jr.key,zr=jr.domEvent;mr(Er,zr),Re(!1)},prefixCls:"".concat(bn,"-menu"),id:un,tabIndex:-1,role:"listbox","aria-activedescendant":Kn,selectedKeys:[dt],"aria-label":Ln!==void 0?Ln:"expanded dropdown"},tt.map(function($r){var jr=$r.closable,Er=$r.disabled,zr=$r.closeIcon,ei=$r.key,ci=$r.label,Fr=ue(jr,zr,Cn,Er);return Oe.createElement(ri.sN,{key:ei,id:"".concat(un,"-").concat(ei),role:"option","aria-controls":je&&"".concat(je,"-panel-").concat(ei),disabled:Er},Oe.createElement("span",null,ci),Fr&&Oe.createElement("button",{type:"button","aria-label":zn||"remove",tabIndex:0,className:"".concat(bn,"-menu-item-remove"),onClick:function(Oi){Oi.stopPropagation(),on(Oi,ei)}},zr||Cn.removeIcon||"\xD7"))}));function jn($r){for(var jr=tt.filter(function(Fr){return!Fr.disabled}),Er=jr.findIndex(function(Fr){return Fr.key===dt})||0,zr=jr.length,ei=0;ei<zr;ei+=1){Er=(Er+$r+zr)%zr;var ci=jr[Er];if(!ci.disabled){Ut(ci.key);return}}}function wr($r){var jr=$r.which;if(!br){[Sn.DOWN,Sn.SPACE,Sn.ENTER].includes(jr)&&(Re(!0),$r.preventDefault());return}switch(jr){case Sn.UP:jn(-1),$r.preventDefault();break;case Sn.DOWN:jn(1),$r.preventDefault();break;case Sn.ESC:Re(!1);break;case Sn.SPACE:case Sn.ENTER:dt!==null&&mr(dt,$r);break}}(0,Oe.useEffect)(function(){var $r=document.getElementById(Kn);$r&&$r.scrollIntoView&&$r.scrollIntoView(!1)},[dt]),(0,Oe.useEffect)(function(){br||Ut(null)},[br]);var Wn=(0,_e.Z)({},Pn?"marginRight":"marginLeft",vn);tt.length||(Wn.visibility="hidden",Wn.order=1);var Or=ve()((0,_e.Z)({},"".concat(bn,"-rtl"),Pn)),Yr=kt?null:Oe.createElement(Hi,{prefixCls:bn,overlay:Hn,trigger:["hover"],visible:tt.length?br:!1,transitionName:Jn,onVisibleChange:Re,overlayClassName:ve()(Or,Xn),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Yn},Oe.createElement("button",{type:"button",className:"".concat(ze,"-nav-more"),style:Wn,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":un,id:"".concat(je,"-more"),"aria-expanded":br,onKeyDown:wr},sn));return Oe.createElement("div",{className:ve()("".concat(ze,"-nav-operations"),Zn),style:yr,ref:Fe},Yr,Oe.createElement(pe,{prefixCls:ze,locale:st,editable:Cn}))}var In=Oe.memo(Oe.forwardRef(kn),function(Ie,Fe){return Fe.tabMoving});function sr(Ie){var Fe,ze=Ie.prefixCls,je=Ie.id,tt=Ie.active,st=Ie.tab,kt=st.key,nn=st.label,sn=st.disabled,Jn=st.closeIcon,yr=Ie.closable,Zn=Ie.renderWrapper,Cn=Ie.removeAriaLabel,vn=Ie.editable,Pn=Ie.onClick,zn=Ie.onFocus,mr=Ie.style,Yn="".concat(ze,"-tab"),Xn=ue(yr,Jn,vn,sn);function rr(Re){sn||Pn(Re)}function ir(Re){Re.preventDefault(),Re.stopPropagation(),vn.onEdit("remove",{key:kt,event:Re})}var br=Oe.createElement("div",{key:kt,"data-node-key":ke(kt),className:ve()(Yn,(Fe={},(0,_e.Z)(Fe,"".concat(Yn,"-with-remove"),Xn),(0,_e.Z)(Fe,"".concat(Yn,"-active"),tt),(0,_e.Z)(Fe,"".concat(Yn,"-disabled"),sn),Fe)),style:mr,onClick:rr},Oe.createElement("div",{role:"tab","aria-selected":tt,id:je&&"".concat(je,"-tab-").concat(kt),className:"".concat(Yn,"-btn"),"aria-controls":je&&"".concat(je,"-panel-").concat(kt),"aria-disabled":sn,tabIndex:sn?null:0,onClick:function(Ke){Ke.stopPropagation(),rr(Ke)},onKeyDown:function(Ke){[Sn.SPACE,Sn.ENTER].includes(Ke.which)&&(Ke.preventDefault(),rr(Ke))},onFocus:zn},nn),Xn&&Oe.createElement("button",{type:"button","aria-label":Cn||"remove",tabIndex:0,className:"".concat(Yn,"-remove"),onClick:function(Ke){Ke.stopPropagation(),ir(Ke)}},Jn||vn.removeIcon||"\xD7"));return Zn?Zn(br):br}var qn=sr,hr=function(Fe){return+setTimeout(Fe,16)},$n=function(Fe){return clearTimeout(Fe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(hr=function(Fe){return window.requestAnimationFrame(Fe)},$n=function(Fe){return window.cancelAnimationFrame(Fe)});var Xe=0,ct=new Map;function Tt(Ie){ct.delete(Ie)}var Wt=function(Fe){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Xe+=1;var je=Xe;function tt(st){if(st===0)Tt(je),Fe();else{var kt=hr(function(){tt(st-1)});ct.set(je,kt)}}return tt(ze),je};Wt.cancel=function(Ie){var Fe=ct.get(Ie);return Tt(Fe),$n(Fe)};var He=Wt,pt=function(Fe){var ze=Fe.activeTabOffset,je=Fe.horizontal,tt=Fe.rtl,st=Fe.indicatorSize,kt=(0,Oe.useState)(),nn=(0,me.Z)(kt,2),sn=nn[0],Jn=nn[1],yr=(0,Oe.useRef)(),Zn=function(Pn){return typeof st=="function"?st(Pn):typeof st=="number"?st:Pn};function Cn(){He.cancel(yr.current)}return(0,Oe.useEffect)(function(){var vn={};return ze&&(je?(tt?(vn.right=ze.right+ze.width/2,vn.transform="translateX(50%)"):(vn.left=ze.left+ze.width/2,vn.transform="translateX(-50%)"),vn.width=Zn(ze.width)):(vn.top=ze.top+ze.height/2,vn.transform="translateY(-50%)",vn.height=Zn(ze.height))),Cn(),yr.current=He(function(){Jn(vn)}),Cn},[ze,je,tt,st]),{style:sn}},$t=pt,Ot=function(Fe){var ze=Fe.current||{},je=ze.offsetWidth,tt=je===void 0?0:je,st=ze.offsetHeight,kt=st===void 0?0:st;return[tt,kt]},Jt=function(Fe,ze){return Fe[ze?0:1]};function tn(Ie,Fe){var ze,je=Oe.useContext(Ue),tt=je.prefixCls,st=je.tabs,kt=Ie.className,nn=Ie.style,sn=Ie.id,Jn=Ie.animated,yr=Ie.activeKey,Zn=Ie.rtl,Cn=Ie.extra,vn=Ie.editable,Pn=Ie.locale,zn=Ie.tabPosition,mr=Ie.tabBarGutter,Yn=Ie.children,Xn=Ie.onTabClick,rr=Ie.onTabScroll,ir=Ie.indicatorSize,br=(0,Oe.useRef)(),Re=(0,Oe.useRef)(),Ke=(0,Oe.useRef)(),Lt=(0,Oe.useRef)(),dt=(0,Oe.useRef)(),Ut=(0,Oe.useRef)(),un=(0,Oe.useRef)(),bn=zn==="top"||zn==="bottom",Kn=Bt(0,function(ra,Ri){bn&&rr&&rr({direction:ra>Ri?"left":"right"})}),Ln=(0,me.Z)(Kn,2),on=Ln[0],Hn=Ln[1],jn=Bt(0,function(ra,Ri){!bn&&rr&&rr({direction:ra>Ri?"top":"bottom"})}),wr=(0,me.Z)(jn,2),Wn=wr[0],Or=wr[1],Yr=(0,Oe.useState)([0,0]),$r=(0,me.Z)(Yr,2),jr=$r[0],Er=$r[1],zr=(0,Oe.useState)([0,0]),ei=(0,me.Z)(zr,2),ci=ei[0],Fr=ei[1],fi=(0,Oe.useState)([0,0]),Oi=(0,me.Z)(fi,2),na=Oi[0],Xi=Oi[1],Fi=(0,Oe.useState)([0,0]),Ji=(0,me.Z)(Fi,2),Qi=Ji[0],wi=Ji[1],zi=wn(new Map),Jr=(0,me.Z)(zi,2),hi=Jr[0],Ii=Jr[1],Yi=Le(st,hi,ci[0]),Ba=Jt(jr,bn),$a=Jt(ci,bn),Aa=Jt(na,bn),ca=Jt(Qi,bn),ea=Ba<$a+Aa,Ei=ea?Ba-ca:Ba-Aa,Oa="".concat(tt,"-nav-operations-hidden"),ki=0,ti=0;bn&&Zn?(ki=0,ti=Math.max(0,$a-Ei)):(ki=Math.min(0,Ei-$a),ti=0);function Wi(ra){return ra<ki?ki:ra>ti?ti:ra}var ua=(0,Oe.useRef)(),Vi=(0,Oe.useState)(),aa=(0,me.Z)(Vi,2),mi=aa[0],pa=aa[1];function xa(){pa(Date.now())}function fa(){window.clearTimeout(ua.current)}Xt(Lt,function(ra,Ri){function Ta(_a,co){_a(function(ao){var hs=Wi(ao+co);return hs})}return ea?(bn?Ta(Hn,ra):Ta(Or,Ri),fa(),xa(),!0):!1}),(0,Oe.useEffect)(function(){return fa(),mi&&(ua.current=window.setTimeout(function(){pa(0)},100)),fa},[mi]);var wa=Ht(Yi,Ei,bn?on:Wn,$a,Aa,ca,(0,we.Z)((0,we.Z)({},Ie),{},{tabs:st})),Ea=(0,me.Z)(wa,2),Za=Ea[0],ha=Ea[1],ka=ht(function(){var ra=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yr,Ri=Yi.get(ra)||{width:0,height:0,left:0,right:0,top:0};if(bn){var Ta=on;Zn?Ri.right<on?Ta=Ri.right:Ri.right+Ri.width>on+Ei&&(Ta=Ri.right+Ri.width-Ei):Ri.left<-on?Ta=-Ri.left:Ri.left+Ri.width>-on+Ei&&(Ta=-(Ri.left+Ri.width-Ei)),Or(0),Hn(Wi(Ta))}else{var _a=Wn;Ri.top<-Wn?_a=-Ri.top:Ri.top+Ri.height>-Wn+Ei&&(_a=-(Ri.top+Ri.height-Ei)),Hn(0),Or(Wi(_a))}}),Ja={};zn==="top"||zn==="bottom"?Ja[Zn?"marginRight":"marginLeft"]=mr:Ja.marginTop=mr;var Ga=st.map(function(ra,Ri){var Ta=ra.key;return Oe.createElement(qn,{id:sn,prefixCls:tt,key:Ta,tab:ra,style:Ri===0?void 0:Ja,closable:ra.closable,editable:vn,active:Ta===yr,renderWrapper:Yn,removeAriaLabel:Pn==null?void 0:Pn.removeAriaLabel,onClick:function(co){Xn(Ta,co)},onFocus:function(){ka(Ta),xa(),Lt.current&&(Zn||(Lt.current.scrollLeft=0),Lt.current.scrollTop=0)}})}),so=function(){return Ii(function(){var Ri=new Map;return st.forEach(function(Ta){var _a,co=Ta.key,ao=(_a=dt.current)===null||_a===void 0?void 0:_a.querySelector('[data-node-key="'.concat(ke(co),'"]'));ao&&Ri.set(co,{width:ao.offsetWidth,height:ao.offsetHeight,left:ao.offsetLeft,top:ao.offsetTop})}),Ri})};(0,Oe.useEffect)(function(){so()},[st.map(function(ra){return ra.key}).join("_")]);var Fa=Rn(function(){var ra=Ot(br),Ri=Ot(Re),Ta=Ot(Ke);Er([ra[0]-Ri[0]-Ta[0],ra[1]-Ri[1]-Ta[1]]);var _a=Ot(un);Xi(_a);var co=Ot(Ut);wi(co);var ao=Ot(dt);Fr([ao[0]-_a[0],ao[1]-_a[1]]),so()}),Ca=st.slice(0,Za),_i=st.slice(ha+1),Ui=[].concat((0,Qe.Z)(Ca),(0,Qe.Z)(_i)),da=Yi.get(yr),Sa=$t({activeTabOffset:da,horizontal:bn,rtl:Zn,indicatorSize:ir}),Ka=Sa.style;(0,Oe.useEffect)(function(){ka()},[yr,ki,ti,Tn(da),Tn(Yi),bn]),(0,Oe.useEffect)(function(){Fa()},[Zn]);var io=!!Ui.length,ho="".concat(tt,"-nav-wrap"),Oo,Ro,lo,Ao;return bn?Zn?(Ro=on>0,Oo=on!==ti):(Oo=on<0,Ro=on!==ki):(lo=Wn<0,Ao=Wn!==ki),Oe.createElement(Ft.Z,{onResize:Fa},Oe.createElement("div",{ref:_n(Fe,br),role:"tablist",className:ve()("".concat(tt,"-nav"),kt),style:nn,onKeyDown:function(){xa()}},Oe.createElement(oe,{ref:Re,position:"left",extra:Cn,prefixCls:tt}),Oe.createElement(Ft.Z,{onResize:Fa},Oe.createElement("div",{className:ve()(ho,(ze={},(0,_e.Z)(ze,"".concat(ho,"-ping-left"),Oo),(0,_e.Z)(ze,"".concat(ho,"-ping-right"),Ro),(0,_e.Z)(ze,"".concat(ho,"-ping-top"),lo),(0,_e.Z)(ze,"".concat(ho,"-ping-bottom"),Ao),ze)),ref:Lt},Oe.createElement(Ft.Z,{onResize:Fa},Oe.createElement("div",{ref:dt,className:"".concat(tt,"-nav-list"),style:{transform:"translate(".concat(on,"px, ").concat(Wn,"px)"),transition:mi?"none":void 0}},Ga,Oe.createElement(pe,{ref:un,prefixCls:tt,locale:Pn,editable:vn,style:(0,we.Z)((0,we.Z)({},Ga.length===0?void 0:Ja),{},{visibility:io?"hidden":null})}),Oe.createElement("div",{className:ve()("".concat(tt,"-ink-bar"),(0,_e.Z)({},"".concat(tt,"-ink-bar-animated"),Jn.inkBar)),style:Ka}))))),Oe.createElement(In,(0,Te.Z)({},Ie,{removeAriaLabel:Pn==null?void 0:Pn.removeAriaLabel,ref:Ut,prefixCls:tt,tabs:Ui,className:!io&&Oa,tabMoving:!!mi})),Oe.createElement(oe,{ref:Ke,position:"right",extra:Cn,prefixCls:tt})))}var Un=Oe.forwardRef(tn),_r=["renderTabBar"],nr=["label","key"];function er(Ie){var Fe=Ie.renderTabBar,ze=(0,at.Z)(Ie,_r),je=Oe.useContext(Ue),tt=je.tabs;if(Fe){var st=(0,we.Z)((0,we.Z)({},ze),{},{panes:tt.map(function(kt){var nn=kt.label,sn=kt.key,Jn=(0,at.Z)(kt,nr);return Oe.createElement(St,(0,Te.Z)({tab:nn,key:sn,tabKey:sn},Jn))})});return Fe(st,Un)}return Oe.createElement(Un,ze)}var ur={},dr=[],gt=function(Fe){dr.push(Fe)};function ot(Ie,Fe){if(0)var ze}function Ct(Ie,Fe){if(0)var ze}function ln(){ur={}}function Nn(Ie,Fe,ze){!Fe&&!ur[ze]&&(Ie(!1,ze),ur[ze]=!0)}function cn(Ie,Fe){Nn(ot,Ie,Fe)}function mn(Ie,Fe){Nn(Ct,Ie,Fe)}cn.preMessage=gt,cn.resetWarned=ln,cn.noteOnce=mn;var gn=null;function Fn(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Fe;return Ie===!1?Fe={inkBar:!1,tabPane:!1}:Ie===!0?Fe={inkBar:!0,tabPane:!1}:Fe=(0,we.Z)({inkBar:!0},(0,De.Z)(Ie)==="object"?Ie:{}),Fe.tabPaneMotion&&Fe.tabPane===void 0&&(Fe.tabPane=!0),!Fe.tabPaneMotion&&Fe.tabPane&&(Fe.tabPane=!1),Fe}var fr=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],Qt=0;function Qr(Ie,Fe){var ze,je=Ie.id,tt=Ie.prefixCls,st=tt===void 0?"rc-tabs":tt,kt=Ie.className,nn=Ie.items,sn=Ie.direction,Jn=Ie.activeKey,yr=Ie.defaultActiveKey,Zn=Ie.editable,Cn=Ie.animated,vn=Ie.tabPosition,Pn=vn===void 0?"top":vn,zn=Ie.tabBarGutter,mr=Ie.tabBarStyle,Yn=Ie.tabBarExtraContent,Xn=Ie.locale,rr=Ie.moreIcon,ir=Ie.moreTransitionName,br=Ie.destroyInactiveTabPane,Re=Ie.renderTabBar,Ke=Ie.onChange,Lt=Ie.onTabClick,dt=Ie.onTabScroll,Ut=Ie.getPopupContainer,un=Ie.popupClassName,bn=Ie.indicatorSize,Kn=(0,at.Z)(Ie,fr),Ln=Oe.useMemo(function(){return(nn||[]).filter(function(wi){return wi&&(0,De.Z)(wi)==="object"&&"key"in wi})},[nn]),on=sn==="rtl",Hn=Fn(Cn),jn=(0,Oe.useState)(!1),wr=(0,me.Z)(jn,2),Wn=wr[0],Or=wr[1];(0,Oe.useEffect)(function(){Or(Mt())},[]);var Yr=Ce(function(){var wi;return(wi=Ln[0])===null||wi===void 0?void 0:wi.key},{value:Jn,defaultValue:yr}),$r=(0,me.Z)(Yr,2),jr=$r[0],Er=$r[1],zr=(0,Oe.useState)(function(){return Ln.findIndex(function(wi){return wi.key===jr})}),ei=(0,me.Z)(zr,2),ci=ei[0],Fr=ei[1];(0,Oe.useEffect)(function(){var wi=Ln.findIndex(function(Jr){return Jr.key===jr});if(wi===-1){var zi;wi=Math.max(0,Math.min(ci,Ln.length-1)),Er((zi=Ln[wi])===null||zi===void 0?void 0:zi.key)}Fr(wi)},[Ln.map(function(wi){return wi.key}).join("_"),jr,ci]);var fi=Ce(null,{value:je}),Oi=(0,me.Z)(fi,2),na=Oi[0],Xi=Oi[1];(0,Oe.useEffect)(function(){je||(Xi("rc-tabs-".concat(Qt)),Qt+=1)},[]);function Fi(wi,zi){Lt==null||Lt(wi,zi);var Jr=wi!==jr;Er(wi),Jr&&(Ke==null||Ke(wi))}var Ji={id:na,activeKey:jr,animated:Hn,tabPosition:Pn,rtl:on,mobile:Wn},Qi=(0,we.Z)((0,we.Z)({},Ji),{},{editable:Zn,locale:Xn,moreIcon:rr,moreTransitionName:ir,tabBarGutter:zn,onTabClick:Fi,onTabScroll:dt,extra:Yn,style:mr,panes:null,getPopupContainer:Ut,popupClassName:un,indicatorSize:bn});return Oe.createElement(Ue.Provider,{value:{tabs:Ln,prefixCls:st}},Oe.createElement("div",(0,Te.Z)({ref:Fe,id:je,className:ve()(st,"".concat(st,"-").concat(Pn),(ze={},(0,_e.Z)(ze,"".concat(st,"-mobile"),Wn),(0,_e.Z)(ze,"".concat(st,"-editable"),Zn),(0,_e.Z)(ze,"".concat(st,"-rtl"),on),ze),kt)},Kn),Oe.createElement(er,(0,Te.Z)({},Qi,{renderTabBar:Re})),Oe.createElement(Pt,(0,Te.Z)({destroyInactiveTabPane:br},Ji,{animated:Hn}))))}var Ur=Oe.forwardRef(Qr),Bi=Ur,Ai=Bi,gi=se(53124),qi=se(98675),li=()=>null,$i=se(33603);const Gi={motionAppear:!1,motionEnter:!0,motionLeave:!0};function qr(Ie){let Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},ze;return Fe===!1?ze={inkBar:!1,tabPane:!1}:Fe===!0?ze={inkBar:!0,tabPane:!0}:ze=Object.assign({inkBar:!0},typeof Fe=="object"?Fe:{}),ze.tabPane&&(ze.tabPaneMotion=Object.assign(Object.assign({},Gi),{motionName:(0,$i.m)(Ie,"switch")})),ze}var vi=se(37419),Zi=function(Ie,Fe){var ze={};for(var je in Ie)Object.prototype.hasOwnProperty.call(Ie,je)&&Fe.indexOf(je)<0&&(ze[je]=Ie[je]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,je=Object.getOwnPropertySymbols(Ie);tt<je.length;tt++)Fe.indexOf(je[tt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,je[tt])&&(ze[je[tt]]=Ie[je[tt]]);return ze};function la(Ie){return Ie.filter(Fe=>Fe)}function ta(Ie,Fe){if(Ie)return Ie;const ze=(0,vi.Z)(Fe).map(je=>{if(Oe.isValidElement(je)){const{key:tt,props:st}=je,kt=st||{},{tab:nn}=kt,sn=Zi(kt,["tab"]);return Object.assign(Object.assign({key:String(tt)},sn),{label:nn})}return null});return la(ze)}var ii=se(14747),Et=se(67968),wt=se(45503),Gt=se(67771),On=Ie=>{const{componentCls:Fe,motionDurationSlow:ze}=Ie;return[{[Fe]:{[`${Fe}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${ze}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${ze}`}}}}},[(0,Gt.oN)(Ie,"slide-up"),(0,Gt.oN)(Ie,"slide-down")]]};const gr=Ie=>{const{componentCls:Fe,tabsCardPadding:ze,cardBg:je,cardGutter:tt,colorBorderSecondary:st,itemSelectedColor:kt}=Ie;return{[`${Fe}-card`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{margin:0,padding:ze,background:je,border:`${Ie.lineWidth}px ${Ie.lineType} ${st}`,transition:`all ${Ie.motionDurationSlow} ${Ie.motionEaseInOut}`},[`${Fe}-tab-active`]:{color:kt,background:Ie.colorBgContainer},[`${Fe}-ink-bar`]:{visibility:"hidden"}},[`&${Fe}-top, &${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginLeft:{_skip_check_:!0,value:`${tt}px`}}}},[`&${Fe}-top`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:`${Ie.borderRadiusLG}px ${Ie.borderRadiusLG}px 0 0`},[`${Fe}-tab-active`]:{borderBottomColor:Ie.colorBgContainer}}},[`&${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:`0 0 ${Ie.borderRadiusLG}px ${Ie.borderRadiusLG}px`},[`${Fe}-tab-active`]:{borderTopColor:Ie.colorBgContainer}}},[`&${Fe}-left, &${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginTop:`${tt}px`}}},[`&${Fe}-left`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Ie.borderRadiusLG}px 0 0 ${Ie.borderRadiusLG}px`}},[`${Fe}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:Ie.colorBgContainer}}}},[`&${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Ie.borderRadiusLG}px ${Ie.borderRadiusLG}px 0`}},[`${Fe}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:Ie.colorBgContainer}}}}}}},Tr=Ie=>{const{componentCls:Fe,itemHoverColor:ze,dropdownEdgeChildVerticalPadding:je}=Ie;return{[`${Fe}-dropdown`]:Object.assign(Object.assign({},(0,ii.Wf)(Ie)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Ie.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Fe}-dropdown-menu`]:{maxHeight:Ie.tabsDropdownHeight,margin:0,padding:`${je}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:Ie.colorBgContainer,backgroundClip:"padding-box",borderRadius:Ie.borderRadiusLG,outline:"none",boxShadow:Ie.boxShadowSecondary,"&-item":Object.assign(Object.assign({},ii.vS),{display:"flex",alignItems:"center",minWidth:Ie.tabsDropdownWidth,margin:0,padding:`${Ie.paddingXXS}px ${Ie.paddingSM}px`,color:Ie.colorText,fontWeight:"normal",fontSize:Ie.fontSize,lineHeight:Ie.lineHeight,cursor:"pointer",transition:`all ${Ie.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:Ie.marginSM},color:Ie.colorTextDescription,fontSize:Ie.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:ze}},"&:hover":{background:Ie.controlItemBgHover},"&-disabled":{"&, &:hover":{color:Ie.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Wr=Ie=>{const{componentCls:Fe,margin:ze,colorBorderSecondary:je,horizontalMargin:tt,verticalItemPadding:st,verticalItemMargin:kt}=Ie;return{[`${Fe}-top, ${Fe}-bottom`]:{flexDirection:"column",[`> ${Fe}-nav, > div > ${Fe}-nav`]:{margin:tt,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Ie.lineWidth}px ${Ie.lineType} ${je}`,content:"''"},[`${Fe}-ink-bar`]:{height:Ie.lineWidthBold,"&-animated":{transition:`width ${Ie.motionDurationSlow}, left ${Ie.motionDurationSlow},
|
|
|
right ${Ie.motionDurationSlow}`}},[`${Fe}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:Ie.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:Ie.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:Ie.boxShadowTabsOverflowRight},[`&${Fe}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Fe}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Fe}-top`]:{[`> ${Fe}-nav,
|
|
|
> div > ${Fe}-nav`]:{"&::before":{bottom:0},[`${Fe}-ink-bar`]:{bottom:0}}},[`${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{order:1,marginTop:`${ze}px`,marginBottom:0,"&::before":{top:0},[`${Fe}-ink-bar`]:{top:0}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{order:0}},[`${Fe}-left, ${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{flexDirection:"column",minWidth:Ie.controlHeight*1.25,[`${Fe}-tab`]:{padding:st,textAlign:"center"},[`${Fe}-tab + ${Fe}-tab`]:{margin:kt},[`${Fe}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:Ie.controlHeight},"&::before":{top:0,boxShadow:Ie.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:Ie.boxShadowTabsOverflowBottom},[`&${Fe}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Fe}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Fe}-ink-bar`]:{width:Ie.lineWidthBold,"&-animated":{transition:`height ${Ie.motionDurationSlow}, top ${Ie.motionDurationSlow}`}},[`${Fe}-nav-list, ${Fe}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Fe}-left`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${Ie.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${Ie.lineWidth}px ${Ie.lineType} ${Ie.colorBorder}`},[`> ${Fe}-content > ${Fe}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:Ie.paddingLG}}}},[`${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{order:1,[`${Fe}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-Ie.lineWidth},borderRight:{_skip_check_:!0,value:`${Ie.lineWidth}px ${Ie.lineType} ${Ie.colorBorder}`},[`> ${Fe}-content > ${Fe}-tabpane`]:{paddingRight:{_skip_check_:!0,value:Ie.paddingLG}}}}}},Gr=Ie=>{const{componentCls:Fe,cardPaddingSM:ze,cardPaddingLG:je,horizontalItemPaddingSM:tt,horizontalItemPaddingLG:st}=Ie;return{[Fe]:{"&-small":{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:tt,fontSize:Ie.titleFontSizeSM}}},"&-large":{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:st,fontSize:Ie.titleFontSizeLG}}}},[`${Fe}-card`]:{[`&${Fe}-small`]:{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:ze}},[`&${Fe}-bottom`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:`0 0 ${Ie.borderRadius}px ${Ie.borderRadius}px`}},[`&${Fe}-top`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:`${Ie.borderRadius}px ${Ie.borderRadius}px 0 0`}},[`&${Fe}-right`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Ie.borderRadius}px ${Ie.borderRadius}px 0`}}},[`&${Fe}-left`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Ie.borderRadius}px 0 0 ${Ie.borderRadius}px`}}}},[`&${Fe}-large`]:{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:je}}}}}},Hr=Ie=>{const{componentCls:Fe,itemActiveColor:ze,itemHoverColor:je,iconCls:tt,tabsHorizontalItemMargin:st,horizontalItemPadding:kt,itemSelectedColor:nn,itemColor:sn}=Ie,Jn=`${Fe}-tab`;return{[Jn]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:kt,fontSize:Ie.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:sn,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:ze}},(0,ii.Qy)(Ie)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-Ie.marginXXS},marginLeft:{_skip_check_:!0,value:Ie.marginXS},color:Ie.colorTextDescription,fontSize:Ie.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${Ie.motionDurationSlow}`,"&:hover":{color:Ie.colorTextHeading}},"&:hover":{color:je},[`&${Jn}-active ${Jn}-btn`]:{color:nn,textShadow:Ie.tabsActiveTextShadow},[`&${Jn}-disabled`]:{color:Ie.colorTextDisabled,cursor:"not-allowed"},[`&${Jn}-disabled ${Jn}-btn, &${Jn}-disabled ${Fe}-remove`]:{"&:focus, &:active":{color:Ie.colorTextDisabled}},[`& ${Jn}-remove ${tt}`]:{margin:0},[tt]:{marginRight:{_skip_check_:!0,value:Ie.marginSM}}},[`${Jn} + ${Jn}`]:{margin:{_skip_check_:!0,value:st}}}},ni=Ie=>{const{componentCls:Fe,tabsHorizontalItemMarginRTL:ze,iconCls:je,cardGutter:tt}=Ie;return{[`${Fe}-rtl`]:{direction:"rtl",[`${Fe}-nav`]:{[`${Fe}-tab`]:{margin:{_skip_check_:!0,value:ze},[`${Fe}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[je]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${Ie.marginSM}px`}},[`${Fe}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${Ie.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${Ie.marginXXS}px`},[je]:{margin:0}}}},[`&${Fe}-left`]:{[`> ${Fe}-nav`]:{order:1},[`> ${Fe}-content-holder`]:{order:0}},[`&${Fe}-right`]:{[`> ${Fe}-nav`]:{order:0},[`> ${Fe}-content-holder`]:{order:1}},[`&${Fe}-card${Fe}-top, &${Fe}-card${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginRight:{_skip_check_:!0,value:tt},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Fe}-dropdown-rtl`]:{direction:"rtl"},[`${Fe}-menu-item`]:{[`${Fe}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},yi=Ie=>{const{componentCls:Fe,tabsCardPadding:ze,cardHeight:je,cardGutter:tt,itemHoverColor:st,itemActiveColor:kt,colorBorderSecondary:nn}=Ie;return{[Fe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ii.Wf)(Ie)),{display:"flex",[`> ${Fe}-nav, > div > ${Fe}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Fe}-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 ${Ie.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${Fe}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${Ie.motionDurationSlow}`},[`${Fe}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Fe}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Fe}-nav-more`]:{position:"relative",padding:ze,background:"transparent",border:0,color:Ie.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:Ie.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${Fe}-nav-add`]:Object.assign({minWidth:je,marginLeft:{_skip_check_:!0,value:tt},padding:`0 ${Ie.paddingXS}px`,background:"transparent",border:`${Ie.lineWidth}px ${Ie.lineType} ${nn}`,borderRadius:`${Ie.borderRadiusLG}px ${Ie.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:Ie.colorText,transition:`all ${Ie.motionDurationSlow} ${Ie.motionEaseInOut}`,"&:hover":{color:st},"&:active, &:focus:not(:focus-visible)":{color:kt}},(0,ii.Qy)(Ie))},[`${Fe}-extra-content`]:{flex:"none"},[`${Fe}-ink-bar`]:{position:"absolute",background:Ie.inkBarColor,pointerEvents:"none"}}),Hr(Ie)),{[`${Fe}-content`]:{position:"relative",width:"100%"},[`${Fe}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Fe}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Fe}-centered`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-nav-wrap`]:{[`&:not([class*='${Fe}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Lr=(0,Et.Z)("Tabs",Ie=>{const Fe=(0,wt.TS)(Ie,{tabsCardPadding:Ie.cardPadding||`${(Ie.cardHeight-Math.round(Ie.fontSize*Ie.lineHeight))/2-Ie.lineWidth}px ${Ie.padding}px`,dropdownEdgeChildVerticalPadding:Ie.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Ie.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${Ie.horizontalItemGutter}px`});return[Gr(Fe),ni(Fe),Wr(Fe),Tr(Fe),gr(Fe),yi(Fe),On(Fe)]},Ie=>{const Fe=Ie.controlHeightLG;return{zIndexPopup:Ie.zIndexPopupBase+50,cardBg:Ie.colorFillAlter,cardHeight:Fe,cardPadding:"",cardPaddingSM:`${Ie.paddingXXS*1.5}px ${Ie.padding}px`,cardPaddingLG:`${Ie.paddingXS}px ${Ie.padding}px ${Ie.paddingXXS*1.5}px`,titleFontSize:Ie.fontSize,titleFontSizeLG:Ie.fontSizeLG,titleFontSizeSM:Ie.fontSize,inkBarColor:Ie.colorPrimary,horizontalMargin:`0 0 ${Ie.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${Ie.paddingSM}px 0`,horizontalItemPaddingSM:`${Ie.paddingXS}px 0`,horizontalItemPaddingLG:`${Ie.padding}px 0`,verticalItemPadding:`${Ie.paddingXS}px ${Ie.paddingLG}px`,verticalItemMargin:`${Ie.margin}px 0 0 0`,itemColor:Ie.colorText,itemSelectedColor:Ie.colorPrimary,itemHoverColor:Ie.colorPrimaryHover,itemActiveColor:Ie.colorPrimaryActive,cardGutter:Ie.marginXXS/2}}),pi=function(Ie,Fe){var ze={};for(var je in Ie)Object.prototype.hasOwnProperty.call(Ie,je)&&Fe.indexOf(je)<0&&(ze[je]=Ie[je]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,je=Object.getOwnPropertySymbols(Ie);tt<je.length;tt++)Fe.indexOf(je[tt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,je[tt])&&(ze[je[tt]]=Ie[je[tt]]);return ze};const Ti=Ie=>{const{type:Fe,className:ze,rootClassName:je,size:tt,onEdit:st,hideAdd:kt,centered:nn,addIcon:sn,popupClassName:Jn,children:yr,items:Zn,animated:Cn,style:vn,indicatorSize:Pn}=Ie,zn=pi(Ie,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:mr,moreIcon:Yn=Oe.createElement(We.Z,null)}=zn,{direction:Xn,tabs:rr,getPrefixCls:ir,getPopupContainer:br}=Oe.useContext(gi.E_),Re=ir("tabs",mr),[Ke,Lt]=Lr(Re);let dt;Fe==="editable-card"&&(dt={onEdit:(on,Hn)=>{let{key:jn,event:wr}=Hn;st==null||st(on==="add"?wr:jn,on)},removeIcon:Oe.createElement(fe.Z,null),addIcon:sn||Oe.createElement(Be.Z,null),showAdd:kt!==!0});const Ut=ir(),un=ta(Zn,yr),bn=qr(Re,Cn),Kn=(0,qi.Z)(tt),Ln=Object.assign(Object.assign({},rr==null?void 0:rr.style),vn);return Ke(Oe.createElement(Ai,Object.assign({direction:Xn,getPopupContainer:br,moreTransitionName:`${Ut}-slide-up`},zn,{items:un,className:ve()({[`${Re}-${Kn}`]:Kn,[`${Re}-card`]:["card","editable-card"].includes(Fe),[`${Re}-editable-card`]:Fe==="editable-card",[`${Re}-centered`]:nn},rr==null?void 0:rr.className,ze,je,Lt),popupClassName:ve()(Jn,Lt),style:Ln,editable:dt,moreIcon:Yn,prefixCls:Re,animated:bn,indicatorSize:Pn!=null?Pn:rr==null?void 0:rr.indicatorSize})))};Ti.TabPane=li;var Mi=Ti},59810:function(En,Yt,se){"use strict";se.d(Yt,{default:function(){return dr}});var fe=se(67294),We=se(74902),Be=se(94184),Je=se.n(Be),ve=se(87462),Te=se(15671),_e=se(43144),we=se(60136),me=se(51630),De=se(4942),at=se(45987),Oe=se(74165),Mt=se(71002),ht=se(15861),lt=se(64217);function et(gt,ot){var Ct="cannot ".concat(gt.method," ").concat(gt.action," ").concat(ot.status,"'"),ln=new Error(Ct);return ln.status=ot.status,ln.method=gt.method,ln.url=gt.action,ln}function Ee(gt){var ot=gt.responseText||gt.response;if(!ot)return ot;try{return JSON.parse(ot)}catch(Ct){return ot}}function yt(gt){var ot=new XMLHttpRequest;gt.onProgress&&ot.upload&&(ot.upload.onprogress=function(cn){cn.total>0&&(cn.percent=cn.loaded/cn.total*100),gt.onProgress(cn)});var Ct=new FormData;gt.data&&Object.keys(gt.data).forEach(function(Nn){var cn=gt.data[Nn];if(Array.isArray(cn)){cn.forEach(function(mn){Ct.append("".concat(Nn,"[]"),mn)});return}Ct.append(Nn,cn)}),gt.file instanceof Blob?Ct.append(gt.filename,gt.file,gt.file.name):Ct.append(gt.filename,gt.file),ot.onerror=function(cn){gt.onError(cn)},ot.onload=function(){return ot.status<200||ot.status>=300?gt.onError(et(gt,ot),Ee(ot)):gt.onSuccess(Ee(ot),ot)},ot.open(gt.method,gt.action,!0),gt.withCredentials&&"withCredentials"in ot&&(ot.withCredentials=!0);var ln=gt.headers||{};return ln["X-Requested-With"]!==null&&ot.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ln).forEach(function(Nn){ln[Nn]!==null&&ot.setRequestHeader(Nn,ln[Nn])}),ot.send(Ct),{abort:function(){ot.abort()}}}var Vt=+new Date,qe=0;function ut(){return"rc-upload-".concat(Vt,"-").concat(++qe)}var Ce=se(80334),xe=function(gt,ot){if(gt&&ot){var Ct=Array.isArray(ot)?ot:ot.split(","),ln=gt.name||"",Nn=gt.type||"",cn=Nn.replace(/\/.*$/,"");return Ct.some(function(mn){var gn=mn.trim();if(/^\*(\/\*)?$/.test(mn))return!0;if(gn.charAt(0)==="."){var Fn=ln.toLowerCase(),fr=gn.toLowerCase(),Qt=[fr];return(fr===".jpg"||fr===".jpeg")&&(Qt=[".jpg",".jpeg"]),Qt.some(function(Qr){return Fn.endsWith(Qr)})}return/\/\*$/.test(gn)?cn===gn.replace(/\/.*$/,""):Nn===gn?!0:/^\w+$/.test(gn)?((0,Ce.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(gn,"'.Skip for check.")),!0):!1})}return!0};function Ue(gt,ot){var Ct=gt.createReader(),ln=[];function Nn(){Ct.readEntries(function(cn){var mn=Array.prototype.slice.apply(cn);ln=ln.concat(mn);var gn=!mn.length;gn?ot(ln):Nn()})}Nn()}var Ze=function(ot,Ct,ln){var Nn=function cn(mn,gn){mn&&(mn.path=gn||"",mn.isFile?mn.file(function(Fn){ln(Fn)&&(mn.fullPath&&!Fn.webkitRelativePath&&(Object.defineProperties(Fn,{webkitRelativePath:{writable:!0}}),Fn.webkitRelativePath=mn.fullPath.replace(/^\//,""),Object.defineProperties(Fn,{webkitRelativePath:{writable:!1}})),Ct([Fn]))}):mn.isDirectory&&Ue(mn,function(Fn){Fn.forEach(function(fr){cn(fr,"".concat(gn).concat(mn.name,"/"))})}))};ot.forEach(function(cn){Nn(cn.webkitGetAsEntry())})},St=Ze,mt=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],Pt=function(gt){(0,we.Z)(Ct,gt);var ot=(0,me.Z)(Ct);function Ct(){var ln;(0,Te.Z)(this,Ct);for(var Nn=arguments.length,cn=new Array(Nn),mn=0;mn<Nn;mn++)cn[mn]=arguments[mn];return ln=ot.call.apply(ot,[this].concat(cn)),ln.state={uid:ut()},ln.reqs={},ln.fileInput=void 0,ln._isMounted=void 0,ln.onChange=function(gn){var Fn=ln.props,fr=Fn.accept,Qt=Fn.directory,Qr=gn.target.files,Ur=(0,We.Z)(Qr).filter(function(Bi){return!Qt||xe(Bi,fr)});ln.uploadFiles(Ur),ln.reset()},ln.onClick=function(gn){var Fn=ln.fileInput;if(Fn){var fr=ln.props,Qt=fr.children,Qr=fr.onClick;if(Qt&&Qt.type==="button"){var Ur=Fn.parentNode;Ur.focus(),Ur.querySelector("button").blur()}Fn.click(),Qr&&Qr(gn)}},ln.onKeyDown=function(gn){gn.key==="Enter"&&ln.onClick(gn)},ln.onFileDrop=function(gn){var Fn=ln.props.multiple;if(gn.preventDefault(),gn.type!=="dragover")if(ln.props.directory)St(Array.prototype.slice.call(gn.dataTransfer.items),ln.uploadFiles,function(Qt){return xe(Qt,ln.props.accept)});else{var fr=(0,We.Z)(gn.dataTransfer.files).filter(function(Qt){return xe(Qt,ln.props.accept)});Fn===!1&&(fr=fr.slice(0,1)),ln.uploadFiles(fr)}},ln.uploadFiles=function(gn){var Fn=(0,We.Z)(gn),fr=Fn.map(function(Qt){return Qt.uid=ut(),ln.processFile(Qt,Fn)});Promise.all(fr).then(function(Qt){var Qr=ln.props.onBatchStart;Qr==null||Qr(Qt.map(function(Ur){var Bi=Ur.origin,Ai=Ur.parsedFile;return{file:Bi,parsedFile:Ai}})),Qt.filter(function(Ur){return Ur.parsedFile!==null}).forEach(function(Ur){ln.post(Ur)})})},ln.processFile=function(){var gn=(0,ht.Z)((0,Oe.Z)().mark(function Fn(fr,Qt){var Qr,Ur,Bi,Ai,gi,qi,xi,li,$i;return(0,Oe.Z)().wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:if(Qr=ln.props.beforeUpload,Ur=fr,!Qr){qr.next=14;break}return qr.prev=3,qr.next=6,Qr(fr,Qt);case 6:Ur=qr.sent,qr.next=12;break;case 9:qr.prev=9,qr.t0=qr.catch(3),Ur=!1;case 12:if(Ur!==!1){qr.next=14;break}return qr.abrupt("return",{origin:fr,parsedFile:null,action:null,data:null});case 14:if(Bi=ln.props.action,typeof Bi!="function"){qr.next=21;break}return qr.next=18,Bi(fr);case 18:Ai=qr.sent,qr.next=22;break;case 21:Ai=Bi;case 22:if(gi=ln.props.data,typeof gi!="function"){qr.next=29;break}return qr.next=26,gi(fr);case 26:qi=qr.sent,qr.next=30;break;case 29:qi=gi;case 30:return xi=((0,Mt.Z)(Ur)==="object"||typeof Ur=="string")&&Ur?Ur:fr,xi instanceof File?li=xi:li=new File([xi],fr.name,{type:fr.type}),$i=li,$i.uid=fr.uid,qr.abrupt("return",{origin:fr,data:qi,parsedFile:$i,action:Ai});case 35:case"end":return qr.stop()}},Fn,null,[[3,9]])}));return function(Fn,fr){return gn.apply(this,arguments)}}(),ln.saveFileInput=function(gn){ln.fileInput=gn},ln}return(0,_e.Z)(Ct,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Nn){var cn=this,mn=Nn.data,gn=Nn.origin,Fn=Nn.action,fr=Nn.parsedFile;if(this._isMounted){var Qt=this.props,Qr=Qt.onStart,Ur=Qt.customRequest,Bi=Qt.name,Ai=Qt.headers,gi=Qt.withCredentials,qi=Qt.method,xi=gn.uid,li=Ur||yt,$i={action:Fn,filename:Bi,data:mn,file:fr,headers:Ai,withCredentials:gi,method:qi||"post",onProgress:function(qr){var vi=cn.props.onProgress;vi==null||vi(qr,fr)},onSuccess:function(qr,vi){var Zi=cn.props.onSuccess;Zi==null||Zi(qr,fr,vi),delete cn.reqs[xi]},onError:function(qr,vi){var Zi=cn.props.onError;Zi==null||Zi(qr,vi,fr),delete cn.reqs[xi]}};Qr(gn),this.reqs[xi]=li($i)}}},{key:"reset",value:function(){this.setState({uid:ut()})}},{key:"abort",value:function(Nn){var cn=this.reqs;if(Nn){var mn=Nn.uid?Nn.uid:Nn;cn[mn]&&cn[mn].abort&&cn[mn].abort(),delete cn[mn]}else Object.keys(cn).forEach(function(gn){cn[gn]&&cn[gn].abort&&cn[gn].abort(),delete cn[gn]})}},{key:"render",value:function(){var Nn,cn=this.props,mn=cn.component,gn=cn.prefixCls,Fn=cn.className,fr=cn.disabled,Qt=cn.id,Qr=cn.style,Ur=cn.multiple,Bi=cn.accept,Ai=cn.capture,gi=cn.children,qi=cn.directory,xi=cn.openFileDialogOnClick,li=cn.onMouseEnter,$i=cn.onMouseLeave,Gi=(0,at.Z)(cn,mt),qr=Je()((Nn={},(0,De.Z)(Nn,gn,!0),(0,De.Z)(Nn,"".concat(gn,"-disabled"),fr),(0,De.Z)(Nn,Fn,Fn),Nn)),vi=qi?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Zi=fr?{}:{onClick:xi?this.onClick:function(){},onKeyDown:xi?this.onKeyDown:function(){},onMouseEnter:li,onMouseLeave:$i,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return fe.createElement(mn,(0,ve.Z)({},Zi,{className:qr,role:"button",style:Qr}),fe.createElement("input",(0,ve.Z)({},(0,lt.Z)(Gi,{aria:!0,data:!0}),{id:Qt,disabled:fr,type:"file",ref:this.saveFileInput,onClick:function(ta){return ta.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:Bi},vi,{multiple:Ur,onChange:this.onChange},Ai!=null?{capture:Ai}:{})),gi)}}]),Ct}(fe.Component),Qe=Pt;function Ft(){}var Dt=function(gt){(0,we.Z)(Ct,gt);var ot=(0,me.Z)(Ct);function Ct(){var ln;(0,Te.Z)(this,Ct);for(var Nn=arguments.length,cn=new Array(Nn),mn=0;mn<Nn;mn++)cn[mn]=arguments[mn];return ln=ot.call.apply(ot,[this].concat(cn)),ln.uploader=void 0,ln.saveUploader=function(gn){ln.uploader=gn},ln}return(0,_e.Z)(Ct,[{key:"abort",value:function(Nn){this.uploader.abort(Nn)}},{key:"render",value:function(){return fe.createElement(Qe,(0,ve.Z)({},this.props,{ref:this.saveUploader}))}}]),Ct}(fe.Component);Dt.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ft,onError:Ft,onSuccess:Ft,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var an=Dt,it=an,en=se(5663),_n=se(73935),yn=se(53124),Ve=se(98866),Le=se(10110),Bt=se(24457),Dn={icon:function(ot,Ct){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:Ct}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:ot}}]}},name:"file",theme:"twotone"},dn=Dn,nt=se(84089),ft=function(ot,Ct){return fe.createElement(nt.Z,(0,ve.Z)({},ot,{ref:Ct,icon:dn}))},Xt=fe.forwardRef(ft),Rn=se(3407),wn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},Zt=wn,Ht=function(ot,Ct){return fe.createElement(nt.Z,(0,ve.Z)({},ot,{ref:Ct,icon:Zt}))},Tn=fe.forwardRef(Ht),xn={icon:function(ot,Ct){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:ot}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:Ct}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:Ct}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:Ct}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:ot}}]}},name:"picture",theme:"twotone"},ke=xn,ue=function(ot,Ct){return fe.createElement(nt.Z,(0,ve.Z)({},ot,{ref:Ct,icon:ke}))},le=fe.forwardRef(ue),pe=se(38379),he=se(57838),oe=se(33603),Ae=se(96159),Ge=se(71577);function _t(gt){return Object.assign(Object.assign({},gt),{lastModified:gt.lastModified,lastModifiedDate:gt.lastModifiedDate,name:gt.name,size:gt.size,type:gt.type,uid:gt.uid,percent:0,originFileObj:gt})}function Rt(gt,ot){const Ct=(0,We.Z)(ot),ln=Ct.findIndex(Nn=>{let{uid:cn}=Nn;return cn===gt.uid});return ln===-1?Ct.push(gt):Ct[ln]=gt,Ct}function zt(gt,ot){const Ct=gt.uid!==void 0?"uid":"name";return ot.filter(ln=>ln[Ct]===gt[Ct])[0]}function qt(gt,ot){const Ct=gt.uid!==void 0?"uid":"name",ln=ot.filter(Nn=>Nn[Ct]!==gt[Ct]);return ln.length===ot.length?null:ln}const jt=function(){const ot=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),ln=ot[ot.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(ln)||[""])[0]},ar=gt=>gt.indexOf("image/")===0,xr=gt=>{if(gt.type&&!gt.thumbUrl)return ar(gt.type);const ot=gt.thumbUrl||gt.url||"",Ct=jt(ot);return/^data:image\//.test(ot)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(Ct)?!0:!(/^data:/.test(ot)||Ct)},Nt=200;function pn(gt){return new Promise(ot=>{if(!gt.type||!ar(gt.type)){ot("");return}const Ct=document.createElement("canvas");Ct.width=Nt,Ct.height=Nt,Ct.style.cssText=`position: fixed; left: 0; top: 0; width: ${Nt}px; height: ${Nt}px; z-index: 9999; display: none;`,document.body.appendChild(Ct);const ln=Ct.getContext("2d"),Nn=new Image;if(Nn.onload=()=>{const{width:cn,height:mn}=Nn;let gn=Nt,Fn=Nt,fr=0,Qt=0;cn>mn?(Fn=mn*(Nt/cn),Qt=-(Fn-gn)/2):(gn=cn*(Nt/mn),fr=-(gn-Fn)/2),ln.drawImage(Nn,fr,Qt,gn,Fn);const Qr=Ct.toDataURL();document.body.removeChild(Ct),window.URL.revokeObjectURL(Nn.src),ot(Qr)},Nn.crossOrigin="anonymous",gt.type.startsWith("image/svg+xml")){const cn=new FileReader;cn.onload=()=>{cn.result&&(Nn.src=cn.result)},cn.readAsDataURL(gt)}else if(gt.type.startsWith("image/gif")){const cn=new FileReader;cn.onload=()=>{cn.result&&ot(cn.result)},cn.readAsDataURL(gt)}else Nn.src=window.URL.createObjectURL(gt)})}var cr=se(84249),Rr=se(90674),rt=se(99569),Kt=se(38703),Bn=se(83062),tr=fe.forwardRef((gt,ot)=>{let{prefixCls:Ct,className:ln,style:Nn,locale:cn,listType:mn,file:gn,items:Fn,progress:fr,iconRender:Qt,actionIconRender:Qr,itemRender:Ur,isImgUrl:Bi,showPreviewIcon:Ai,showRemoveIcon:gi,showDownloadIcon:qi,previewIcon:xi,removeIcon:li,downloadIcon:$i,onPreview:Gi,onDownload:qr,onClose:vi}=gt;var Zi,la;const{status:ta}=gn,[ii,Et]=fe.useState(ta);fe.useEffect(()=>{ta!=="removed"&&Et(ta)},[ta]);const[wt,Gt]=fe.useState(!1);fe.useEffect(()=>{const tt=setTimeout(()=>{Gt(!0)},300);return()=>{clearTimeout(tt)}},[]);const fn=Qt(gn);let On=fe.createElement("div",{className:`${Ct}-icon`},fn);if(mn==="picture"||mn==="picture-card"||mn==="picture-circle")if(ii==="uploading"||!gn.thumbUrl&&!gn.url){const tt=Je()(`${Ct}-list-item-thumbnail`,{[`${Ct}-list-item-file`]:ii!=="uploading"});On=fe.createElement("div",{className:tt},fn)}else{const tt=Bi!=null&&Bi(gn)?fe.createElement("img",{src:gn.thumbUrl||gn.url,alt:gn.name,className:`${Ct}-list-item-image`,crossOrigin:gn.crossOrigin}):fn,st=Je()(`${Ct}-list-item-thumbnail`,{[`${Ct}-list-item-file`]:Bi&&!Bi(gn)});On=fe.createElement("a",{className:st,onClick:kt=>Gi(gn,kt),href:gn.url||gn.thumbUrl,target:"_blank",rel:"noopener noreferrer"},tt)}const gr=Je()(`${Ct}-list-item`,`${Ct}-list-item-${ii}`),Tr=typeof gn.linkProps=="string"?JSON.parse(gn.linkProps):gn.linkProps,Wr=gi?Qr((typeof li=="function"?li(gn):li)||fe.createElement(cr.Z,null),()=>vi(gn),Ct,cn.removeFile):null,Gr=qi&&ii==="done"?Qr((typeof $i=="function"?$i(gn):$i)||fe.createElement(Rr.Z,null),()=>qr(gn),Ct,cn.downloadFile):null,Hr=mn!=="picture-card"&&mn!=="picture-circle"&&fe.createElement("span",{key:"download-delete",className:Je()(`${Ct}-list-item-actions`,{picture:mn==="picture"})},Gr,Wr),ni=Je()(`${Ct}-list-item-name`),yi=gn.url?[fe.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:ni,title:gn.name},Tr,{href:gn.url,onClick:tt=>Gi(gn,tt)}),gn.name),Hr]:[fe.createElement("span",{key:"view",className:ni,onClick:tt=>Gi(gn,tt),title:gn.name},gn.name),Hr],Lr={pointerEvents:"none",opacity:.5},pi=Ai?fe.createElement("a",{href:gn.url||gn.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:gn.url||gn.thumbUrl?void 0:Lr,onClick:tt=>Gi(gn,tt),title:cn.previewFile},typeof xi=="function"?xi(gn):xi||fe.createElement(rt.Z,null)):null,Ti=(mn==="picture-card"||mn==="picture-circle")&&ii!=="uploading"&&fe.createElement("span",{className:`${Ct}-list-item-actions`},pi,ii==="done"&&Gr,Wr),{getPrefixCls:Mi}=fe.useContext(yn.E_),Ie=Mi(),Fe=fe.createElement("div",{className:gr},On,yi,Ti,wt&&fe.createElement(pe.default,{motionName:`${Ie}-fade`,visible:ii==="uploading",motionDeadline:2e3},tt=>{let{className:st}=tt;const kt="percent"in gn?fe.createElement(Kt.Z,Object.assign({},fr,{type:"line",percent:gn.percent,"aria-label":gn["aria-label"],"aria-labelledby":gn["aria-labelledby"]})):null;return fe.createElement("div",{className:Je()(`${Ct}-list-item-progress`,st)},kt)})),ze=gn.response&&typeof gn.response=="string"?gn.response:((Zi=gn.error)===null||Zi===void 0?void 0:Zi.statusText)||((la=gn.error)===null||la===void 0?void 0:la.message)||cn.uploadError,je=ii==="error"?fe.createElement(Bn.Z,{title:ze,getPopupContainer:tt=>tt.parentNode},Fe):Fe;return fe.createElement("div",{className:Je()(`${Ct}-list-item-container`,ln),style:Nn,ref:ot},Ur?Ur(je,gn,Fn,{download:qr.bind(null,gn),preview:Gi.bind(null,gn),remove:vi.bind(null,gn)}):je)});const Sr=(gt,ot)=>{const{listType:Ct="text",previewFile:ln=pn,onPreview:Nn,onDownload:cn,onRemove:mn,locale:gn,iconRender:Fn,isImageUrl:fr=xr,prefixCls:Qt,items:Qr=[],showPreviewIcon:Ur=!0,showRemoveIcon:Bi=!0,showDownloadIcon:Ai=!1,removeIcon:gi,previewIcon:qi,downloadIcon:xi,progress:li={size:[-1,2],showInfo:!1},appendAction:$i,appendActionVisible:Gi=!0,itemRender:qr,disabled:vi}=gt,Zi=(0,he.Z)(),[la,ta]=fe.useState(!1);fe.useEffect(()=>{Ct!=="picture"&&Ct!=="picture-card"&&Ct!=="picture-circle"||(Qr||[]).forEach(Lr=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(Lr.originFileObj instanceof File||Lr.originFileObj instanceof Blob)||Lr.thumbUrl!==void 0||(Lr.thumbUrl="",ln&&ln(Lr.originFileObj).then(pi=>{Lr.thumbUrl=pi||"",Zi()}))})},[Ct,Qr,ln]),fe.useEffect(()=>{ta(!0)},[]);const ii=(Lr,pi)=>{if(Nn)return pi==null||pi.preventDefault(),Nn(Lr)},Et=Lr=>{typeof cn=="function"?cn(Lr):Lr.url&&window.open(Lr.url)},wt=Lr=>{mn==null||mn(Lr)},Gt=Lr=>{if(Fn)return Fn(Lr,Ct);const pi=Lr.status==="uploading",Ti=fr&&fr(Lr)?fe.createElement(le,null):fe.createElement(Xt,null);let Mi=pi?fe.createElement(Rn.Z,null):fe.createElement(Tn,null);return Ct==="picture"?Mi=pi?fe.createElement(Rn.Z,null):Ti:(Ct==="picture-card"||Ct==="picture-circle")&&(Mi=pi?gn.uploading:Ti),Mi},fn=(Lr,pi,Ti,Mi)=>{const Ie={type:"text",size:"small",title:Mi,onClick:Fe=>{pi(),(0,Ae.l$)(Lr)&&Lr.props.onClick&&Lr.props.onClick(Fe)},className:`${Ti}-list-item-action`,disabled:vi};if((0,Ae.l$)(Lr)){const Fe=(0,Ae.Tm)(Lr,Object.assign(Object.assign({},Lr.props),{onClick:()=>{}}));return fe.createElement(Ge.ZP,Object.assign({},Ie,{icon:Fe}))}return fe.createElement(Ge.ZP,Object.assign({},Ie),fe.createElement("span",null,Lr))};fe.useImperativeHandle(ot,()=>({handlePreview:ii,handleDownload:Et}));const{getPrefixCls:On}=fe.useContext(yn.E_),gr=On("upload",Qt),Tr=On(),Wr=Je()(`${gr}-list`,`${gr}-list-${Ct}`),Gr=(0,We.Z)(Qr.map(Lr=>({key:Lr.uid,file:Lr})));let ni={motionDeadline:2e3,motionName:`${gr}-${Ct==="picture-card"||Ct==="picture-circle"?"animate-inline":"animate"}`,keys:Gr,motionAppear:la};const yi=fe.useMemo(()=>{const Lr=Object.assign({},(0,oe.Z)(Tr));return delete Lr.onAppearEnd,delete Lr.onEnterEnd,delete Lr.onLeaveEnd,Lr},[Tr]);return Ct!=="picture-card"&&Ct!=="picture-circle"&&(ni=Object.assign(Object.assign({},yi),ni)),fe.createElement("div",{className:Wr},fe.createElement(pe.CSSMotionList,Object.assign({},ni,{component:!1}),Lr=>{let{key:pi,file:Ti,className:Mi,style:Ie}=Lr;return fe.createElement(tr,{key:pi,locale:gn,prefixCls:gr,className:Mi,style:Ie,file:Ti,items:Qr,progress:li,listType:Ct,isImgUrl:fr,showPreviewIcon:Ur,showRemoveIcon:Bi,showDownloadIcon:Ai,removeIcon:gi,previewIcon:qi,downloadIcon:xi,iconRender:Gt,actionIconRender:fn,itemRender:qr,onPreview:ii,onDownload:Et,onClose:wt})}),$i&&fe.createElement(pe.default,Object.assign({},ni,{visible:Gi,forceRender:!0}),Lr=>{let{className:pi,style:Ti}=Lr;return(0,Ae.Tm)($i,Mi=>({className:Je()(Mi.className,pi),style:Object.assign(Object.assign(Object.assign({},Ti),{pointerEvents:pi?"none":void 0}),Mi.style)}))}))};var Mr=fe.forwardRef(Sr),Pr=se(14747),Vr=se(33507),lr=se(67968),si=se(45503),Ni=gt=>{const{componentCls:ot,iconCls:Ct}=gt;return{[`${ot}-wrapper`]:{[`${ot}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:gt.colorFillAlter,border:`${gt.lineWidth}px dashed ${gt.colorBorder}`,borderRadius:gt.borderRadiusLG,cursor:"pointer",transition:`border-color ${gt.motionDurationSlow}`,[ot]:{padding:`${gt.padding}px 0`},[`${ot}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${ot}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${ot}-disabled):hover`]:{borderColor:gt.colorPrimaryHover},[`p${ot}-drag-icon`]:{marginBottom:gt.margin,[Ct]:{color:gt.colorPrimary,fontSize:gt.uploadThumbnailSize}},[`p${ot}-text`]:{margin:`0 0 ${gt.marginXXS}px`,color:gt.colorTextHeading,fontSize:gt.fontSizeLG},[`p${ot}-hint`]:{color:gt.colorTextDescription,fontSize:gt.fontSize},[`&${ot}-disabled`]:{cursor:"not-allowed",[`p${ot}-drag-icon ${Ct},
|
|
|
p${ot}-text,
|
|
|
p${ot}-hint
|
|
|
`]:{color:gt.colorTextDisabled}}}}}},ri=gt=>{const{componentCls:ot,antCls:Ct,iconCls:ln,fontSize:Nn,lineHeight:cn}=gt,mn=`${ot}-list-item`,gn=`${mn}-actions`,Fn=`${mn}-action`,fr=Math.round(Nn*cn);return{[`${ot}-wrapper`]:{[`${ot}-list`]:Object.assign(Object.assign({},(0,Pr.dF)()),{lineHeight:gt.lineHeight,[mn]:{position:"relative",height:gt.lineHeight*Nn,marginTop:gt.marginXS,fontSize:Nn,display:"flex",alignItems:"center",transition:`background-color ${gt.motionDurationSlow}`,"&:hover":{backgroundColor:gt.controlItemBgHover},[`${mn}-name`]:Object.assign(Object.assign({},Pr.vS),{padding:`0 ${gt.paddingXS}px`,lineHeight:cn,flex:"auto",transition:`all ${gt.motionDurationSlow}`}),[gn]:{[Fn]:{opacity:0},[`${Fn}${Ct}-btn-sm`]:{height:fr,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
|
${Fn}:focus-visible,
|
|
|
&.picture ${Fn}
|
|
|
`]:{opacity:1},[ln]:{color:gt.actionsColor,transition:`all ${gt.motionDurationSlow}`},[`&:hover ${ln}`]:{color:gt.colorText}},[`${ot}-icon ${ln}`]:{color:gt.colorTextDescription,fontSize:Nn},[`${mn}-progress`]:{position:"absolute",bottom:-gt.uploadProgressOffset,width:"100%",paddingInlineStart:Nn+gt.paddingXS,fontSize:Nn,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${mn}:hover ${Fn}`]:{opacity:1,color:gt.colorText},[`${mn}-error`]:{color:gt.colorError,[`${mn}-name, ${ot}-icon ${ln}`]:{color:gt.colorError},[gn]:{[`${ln}, ${ln}:hover`]:{color:gt.colorError},[Fn]:{opacity:1}}},[`${ot}-list-item-container`]:{transition:`opacity ${gt.motionDurationSlow}, height ${gt.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},vt=se(34367),Sn=se(16932);const kn=new vt.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),In=new vt.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var qn=gt=>{const{componentCls:ot}=gt,Ct=`${ot}-animate-inline`;return[{[`${ot}-wrapper`]:{[`${Ct}-appear, ${Ct}-enter, ${Ct}-leave`]:{animationDuration:gt.motionDurationSlow,animationTimingFunction:gt.motionEaseInOutCirc,animationFillMode:"forwards"},[`${Ct}-appear, ${Ct}-enter`]:{animationName:kn},[`${Ct}-leave`]:{animationName:In}}},{[`${ot}-wrapper`]:(0,Sn.J$)(gt)},kn,In]},hr=se(16397),$n=se(84780);const Xe=gt=>{const{componentCls:ot,iconCls:Ct,uploadThumbnailSize:ln,uploadProgressOffset:Nn}=gt,cn=`${ot}-list`,mn=`${cn}-item`;return{[`${ot}-wrapper`]:{[`
|
|
|
${cn}${cn}-picture,
|
|
|
${cn}${cn}-picture-card,
|
|
|
${cn}${cn}-picture-circle
|
|
|
`]:{[mn]:{position:"relative",height:ln+gt.lineWidth*2+gt.paddingXS*2,padding:gt.paddingXS,border:`${gt.lineWidth}px ${gt.lineType} ${gt.colorBorder}`,borderRadius:gt.borderRadiusLG,"&:hover":{background:"transparent"},[`${mn}-thumbnail`]:Object.assign(Object.assign({},Pr.vS),{width:ln,height:ln,lineHeight:`${ln+gt.paddingSM}px`,textAlign:"center",flex:"none",[Ct]:{fontSize:gt.fontSizeHeading2,color:gt.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${mn}-progress`]:{bottom:Nn,width:`calc(100% - ${gt.paddingSM*2}px)`,marginTop:0,paddingInlineStart:ln+gt.paddingXS}},[`${mn}-error`]:{borderColor:gt.colorError,[`${mn}-thumbnail ${Ct}`]:{[`svg path[fill='${hr.blue[0]}']`]:{fill:gt.colorErrorBg},[`svg path[fill='${hr.blue.primary}']`]:{fill:gt.colorError}}},[`${mn}-uploading`]:{borderStyle:"dashed",[`${mn}-name`]:{marginBottom:Nn}}},[`${cn}${cn}-picture-circle ${mn}`]:{[`&, &::before, ${mn}-thumbnail`]:{borderRadius:"50%"}}}}},ct=gt=>{const{componentCls:ot,iconCls:Ct,fontSizeLG:ln,colorTextLightSolid:Nn}=gt,cn=`${ot}-list`,mn=`${cn}-item`,gn=gt.uploadPicCardSize;return{[`
|
|
|
${ot}-wrapper${ot}-picture-card-wrapper,
|
|
|
${ot}-wrapper${ot}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,Pr.dF)()),{display:"inline-block",width:"100%",[`${ot}${ot}-select`]:{width:gn,height:gn,marginInlineEnd:gt.marginXS,marginBottom:gt.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:gt.colorFillAlter,border:`${gt.lineWidth}px dashed ${gt.colorBorder}`,borderRadius:gt.borderRadiusLG,cursor:"pointer",transition:`border-color ${gt.motionDurationSlow}`,[`> ${ot}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${ot}-disabled):hover`]:{borderColor:gt.colorPrimary}},[`${cn}${cn}-picture-card, ${cn}${cn}-picture-circle`]:{[`${cn}-item-container`]:{display:"inline-block",width:gn,height:gn,marginBlock:`0 ${gt.marginXS}px`,marginInline:`0 ${gt.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[mn]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${gt.paddingXS*2}px)`,height:`calc(100% - ${gt.paddingXS*2}px)`,backgroundColor:gt.colorBgMask,opacity:0,transition:`all ${gt.motionDurationSlow}`,content:'" "'}},[`${mn}:hover`]:{[`&::before, ${mn}-actions`]:{opacity:1}},[`${mn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${gt.motionDurationSlow}`,[`${Ct}-eye, ${Ct}-download, ${Ct}-delete`]:{zIndex:10,width:ln,margin:`0 ${gt.marginXXS}px`,fontSize:ln,cursor:"pointer",transition:`all ${gt.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${mn}-actions, ${mn}-actions:hover`]:{[`${Ct}-eye, ${Ct}-download, ${Ct}-delete`]:{color:new $n.C(Nn).setAlpha(.65).toRgbString(),"&:hover":{color:Nn}}},[`${mn}-thumbnail, ${mn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${mn}-name`]:{display:"none",textAlign:"center"},[`${mn}-file + ${mn}-name`]:{position:"absolute",bottom:gt.margin,display:"block",width:`calc(100% - ${gt.paddingXS*2}px)`},[`${mn}-uploading`]:{[`&${mn}`]:{backgroundColor:gt.colorFillAlter},[`&::before, ${Ct}-eye, ${Ct}-download, ${Ct}-delete`]:{display:"none"}},[`${mn}-progress`]:{bottom:gt.marginXL,width:`calc(100% - ${gt.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${ot}-wrapper${ot}-picture-circle-wrapper`]:{[`${ot}${ot}-select`]:{borderRadius:"50%"}}}};var Wt=gt=>{const{componentCls:ot}=gt;return{[`${ot}-rtl`]:{direction:"rtl"}}};const He=gt=>{const{componentCls:ot,colorTextDisabled:Ct}=gt;return{[`${ot}-wrapper`]:Object.assign(Object.assign({},(0,Pr.Wf)(gt)),{[ot]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${ot}-select`]:{display:"inline-block"},[`${ot}-disabled`]:{color:Ct,cursor:"not-allowed"}})}};var pt=(0,lr.Z)("Upload",gt=>{const{fontSizeHeading3:ot,fontSize:Ct,lineHeight:ln,lineWidth:Nn,controlHeightLG:cn}=gt,mn=Math.round(Ct*ln),gn=(0,si.TS)(gt,{uploadThumbnailSize:ot*2,uploadProgressOffset:mn/2+Nn,uploadPicCardSize:cn*2.55});return[He(gn),Ni(gn),Xe(gn),ct(gn),ri(gn),qn(gn),Wt(gn),(0,Vr.Z)(gn)]},gt=>({actionsColor:gt.colorTextDescription})),$t=function(gt,ot,Ct,ln){function Nn(cn){return cn instanceof Ct?cn:new Ct(function(mn){mn(cn)})}return new(Ct||(Ct=Promise))(function(cn,mn){function gn(Qt){try{fr(ln.next(Qt))}catch(Qr){mn(Qr)}}function Fn(Qt){try{fr(ln.throw(Qt))}catch(Qr){mn(Qr)}}function fr(Qt){Qt.done?cn(Qt.value):Nn(Qt.value).then(gn,Fn)}fr((ln=ln.apply(gt,ot||[])).next())})};const Ot=`__LIST_IGNORE_${Date.now()}__`,Jt=(gt,ot)=>{const{fileList:Ct,defaultFileList:ln,onRemove:Nn,showUploadList:cn=!0,listType:mn="text",onPreview:gn,onDownload:Fn,onChange:fr,onDrop:Qt,previewFile:Qr,disabled:Ur,locale:Bi,iconRender:Ai,isImageUrl:gi,progress:qi,prefixCls:xi,className:li,type:$i="select",children:Gi,style:qr,itemRender:vi,maxCount:Zi,data:la={},multiple:ta=!1,action:ii="",accept:Et="",supportServerRender:wt=!0,rootClassName:Gt}=gt,fn=fe.useContext(Ve.Z),On=Ur!=null?Ur:fn,[gr,Tr]=(0,en.Z)(ln||[],{value:Ct,postState:Re=>Re!=null?Re:[]}),[Wr,Gr]=fe.useState("drop"),Hr=fe.useRef(null);fe.useMemo(()=>{const Re=Date.now();(Ct||[]).forEach((Ke,Lt)=>{!Ke.uid&&!Object.isFrozen(Ke)&&(Ke.uid=`__AUTO__${Re}_${Lt}__`)})},[Ct]);const ni=(Re,Ke,Lt)=>{let dt=(0,We.Z)(Ke),Ut=!1;Zi===1?dt=dt.slice(-1):Zi&&(Ut=dt.length>Zi,dt=dt.slice(0,Zi)),(0,_n.flushSync)(()=>{Tr(dt)});const un={file:Re,fileList:dt};Lt&&(un.event=Lt),(!Ut||dt.some(bn=>bn.uid===Re.uid))&&(0,_n.flushSync)(()=>{fr==null||fr(un)})},yi=(Re,Ke)=>$t(void 0,void 0,void 0,function*(){const{beforeUpload:Lt,transformFile:dt}=gt;let Ut=Re;if(Lt){const un=yield Lt(Re,Ke);if(un===!1)return!1;if(delete Re[Ot],un===Ot)return Object.defineProperty(Re,Ot,{value:!0,configurable:!0}),!1;typeof un=="object"&&un&&(Ut=un)}return dt&&(Ut=yield dt(Ut)),Ut}),Lr=Re=>{const Ke=Re.filter(Ut=>!Ut.file[Ot]);if(!Ke.length)return;const Lt=Ke.map(Ut=>_t(Ut.file));let dt=(0,We.Z)(gr);Lt.forEach(Ut=>{dt=Rt(Ut,dt)}),Lt.forEach((Ut,un)=>{let bn=Ut;if(Ke[un].parsedFile)Ut.status="uploading";else{const{originFileObj:Kn}=Ut;let Ln;try{Ln=new File([Kn],Kn.name,{type:Kn.type})}catch(on){Ln=new Blob([Kn],{type:Kn.type}),Ln.name=Kn.name,Ln.lastModifiedDate=new Date,Ln.lastModified=new Date().getTime()}Ln.uid=Ut.uid,bn=Ln}ni(bn,dt)})},pi=(Re,Ke,Lt)=>{try{typeof Re=="string"&&(Re=JSON.parse(Re))}catch(un){}if(!zt(Ke,gr))return;const dt=_t(Ke);dt.status="done",dt.percent=100,dt.response=Re,dt.xhr=Lt;const Ut=Rt(dt,gr);ni(dt,Ut)},Ti=(Re,Ke)=>{if(!zt(Ke,gr))return;const Lt=_t(Ke);Lt.status="uploading",Lt.percent=Re.percent;const dt=Rt(Lt,gr);ni(Lt,dt,Re)},Mi=(Re,Ke,Lt)=>{if(!zt(Lt,gr))return;const dt=_t(Lt);dt.error=Re,dt.response=Ke,dt.status="error";const Ut=Rt(dt,gr);ni(dt,Ut)},Ie=Re=>{let Ke;Promise.resolve(typeof Nn=="function"?Nn(Re):Nn).then(Lt=>{var dt;if(Lt===!1)return;const Ut=qt(Re,gr);Ut&&(Ke=Object.assign(Object.assign({},Re),{status:"removed"}),gr==null||gr.forEach(un=>{const bn=Ke.uid!==void 0?"uid":"name";un[bn]===Ke[bn]&&!Object.isFrozen(un)&&(un.status="removed")}),(dt=Hr.current)===null||dt===void 0||dt.abort(Ke),ni(Ke,Ut))})},Fe=Re=>{Gr(Re.type),Re.type==="drop"&&(Qt==null||Qt(Re))};fe.useImperativeHandle(ot,()=>({onBatchStart:Lr,onSuccess:pi,onProgress:Ti,onError:Mi,fileList:gr,upload:Hr.current}));const{getPrefixCls:ze,direction:je,upload:tt}=fe.useContext(yn.E_),st=ze("upload",xi),kt=Object.assign(Object.assign({onBatchStart:Lr,onError:Mi,onProgress:Ti,onSuccess:pi},gt),{data:la,multiple:ta,action:ii,accept:Et,supportServerRender:wt,prefixCls:st,disabled:On,beforeUpload:yi,onChange:void 0});delete kt.className,delete kt.style,(!Gi||On)&&delete kt.id;const[nn,sn]=pt(st),[Jn]=(0,Le.Z)("Upload",Bt.Z.Upload),{showRemoveIcon:yr,showPreviewIcon:Zn,showDownloadIcon:Cn,removeIcon:vn,previewIcon:Pn,downloadIcon:zn}=typeof cn=="boolean"?{}:cn,mr=(Re,Ke)=>cn?fe.createElement(Mr,{prefixCls:st,listType:mn,items:gr,previewFile:Qr,onPreview:gn,onDownload:Fn,onRemove:Ie,showRemoveIcon:!On&&yr,showPreviewIcon:Zn,showDownloadIcon:Cn,removeIcon:vn,previewIcon:Pn,downloadIcon:zn,iconRender:Ai,locale:Object.assign(Object.assign({},Jn),Bi),isImageUrl:gi,progress:qi,appendAction:Re,appendActionVisible:Ke,itemRender:vi,disabled:On}):Re,Yn=Je()(`${st}-wrapper`,li,Gt,sn,tt==null?void 0:tt.className,{[`${st}-rtl`]:je==="rtl",[`${st}-picture-card-wrapper`]:mn==="picture-card",[`${st}-picture-circle-wrapper`]:mn==="picture-circle"}),Xn=Object.assign(Object.assign({},tt==null?void 0:tt.style),qr);if($i==="drag"){const Re=Je()(sn,st,`${st}-drag`,{[`${st}-drag-uploading`]:gr.some(Ke=>Ke.status==="uploading"),[`${st}-drag-hover`]:Wr==="dragover",[`${st}-disabled`]:On,[`${st}-rtl`]:je==="rtl"});return nn(fe.createElement("span",{className:Yn},fe.createElement("div",{className:Re,style:Xn,onDrop:Fe,onDragOver:Fe,onDragLeave:Fe},fe.createElement(it,Object.assign({},kt,{ref:Hr,className:`${st}-btn`}),fe.createElement("div",{className:`${st}-drag-container`},Gi))),mr()))}const rr=Je()(st,`${st}-select`,{[`${st}-disabled`]:On}),br=(Re=>fe.createElement("div",{className:rr,style:Re},fe.createElement(it,Object.assign({},kt,{ref:Hr}))))(Gi?void 0:{display:"none"});return nn(mn==="picture-card"||mn==="picture-circle"?fe.createElement("span",{className:Yn},mr(br,!!Gi)):fe.createElement("span",{className:Yn},br,mr()))};var Un=fe.forwardRef(Jt),_r=function(gt,ot){var Ct={};for(var ln in gt)Object.prototype.hasOwnProperty.call(gt,ln)&&ot.indexOf(ln)<0&&(Ct[ln]=gt[ln]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Nn=0,ln=Object.getOwnPropertySymbols(gt);Nn<ln.length;Nn++)ot.indexOf(ln[Nn])<0&&Object.prototype.propertyIsEnumerable.call(gt,ln[Nn])&&(Ct[ln[Nn]]=gt[ln[Nn]]);return Ct},er=fe.forwardRef((gt,ot)=>{var{style:Ct,height:ln}=gt,Nn=_r(gt,["style","height"]);return fe.createElement(Un,Object.assign({ref:ot},Nn,{type:"drag",style:Object.assign(Object.assign({},Ct),{height:ln})}))});const ur=Un;ur.Dragger=er,ur.LIST_IGNORE=Ot;var dr=ur},72665:function(En,Yt){"use strict";var se;var fe=typeof Symbol=="function"&&Symbol.for,We=fe?Symbol.for("react.element"):60103,Be=fe?Symbol.for("react.portal"):60106,Je=fe?Symbol.for("react.fragment"):60107,ve=fe?Symbol.for("react.strict_mode"):60108,Te=fe?Symbol.for("react.profiler"):60114,_e=fe?Symbol.for("react.provider"):60109,we=fe?Symbol.for("react.context"):60110,me=fe?Symbol.for("react.async_mode"):60111,De=fe?Symbol.for("react.concurrent_mode"):60111,at=fe?Symbol.for("react.forward_ref"):60112,Oe=fe?Symbol.for("react.suspense"):60113,Mt=fe?Symbol.for("react.suspense_list"):60120,ht=fe?Symbol.for("react.memo"):60115,lt=fe?Symbol.for("react.lazy"):60116,et=fe?Symbol.for("react.block"):60121,Ee=fe?Symbol.for("react.fundamental"):60117,yt=fe?Symbol.for("react.responder"):60118,Vt=fe?Symbol.for("react.scope"):60119;function qe(Ce){if(typeof Ce=="object"&&Ce!==null){var xe=Ce.$$typeof;switch(xe){case We:switch(Ce=Ce.type,Ce){case me:case De:case Je:case Te:case ve:case Oe:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case we:case at:case lt:case ht:case _e:return Ce;default:return xe}}case Be:return xe}}}function ut(Ce){return qe(Ce)===De}se=me,se=De,se=we,se=_e,se=We,se=at,se=Je,se=lt,se=ht,se=Be,se=Te,se=ve,se=Oe,se=function(Ce){return ut(Ce)||qe(Ce)===me},se=ut,se=function(Ce){return qe(Ce)===we},se=function(Ce){return qe(Ce)===_e},se=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===We},se=function(Ce){return qe(Ce)===at},se=function(Ce){return qe(Ce)===Je},se=function(Ce){return qe(Ce)===lt},Yt.isMemo=function(Ce){return qe(Ce)===ht},se=function(Ce){return qe(Ce)===Be},se=function(Ce){return qe(Ce)===Te},se=function(Ce){return qe(Ce)===ve},se=function(Ce){return qe(Ce)===Oe},se=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Je||Ce===De||Ce===Te||Ce===ve||Ce===Oe||Ce===Mt||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===lt||Ce.$$typeof===ht||Ce.$$typeof===_e||Ce.$$typeof===we||Ce.$$typeof===at||Ce.$$typeof===Ee||Ce.$$typeof===yt||Ce.$$typeof===Vt||Ce.$$typeof===et)},se=qe},12060:function(En,Yt,se){"use strict";En.exports=se(72665)},41771:function(En,Yt){"use strict";var se;var fe=typeof Symbol=="function"&&Symbol.for,We=fe?Symbol.for("react.element"):60103,Be=fe?Symbol.for("react.portal"):60106,Je=fe?Symbol.for("react.fragment"):60107,ve=fe?Symbol.for("react.strict_mode"):60108,Te=fe?Symbol.for("react.profiler"):60114,_e=fe?Symbol.for("react.provider"):60109,we=fe?Symbol.for("react.context"):60110,me=fe?Symbol.for("react.async_mode"):60111,De=fe?Symbol.for("react.concurrent_mode"):60111,at=fe?Symbol.for("react.forward_ref"):60112,Oe=fe?Symbol.for("react.suspense"):60113,Mt=fe?Symbol.for("react.suspense_list"):60120,ht=fe?Symbol.for("react.memo"):60115,lt=fe?Symbol.for("react.lazy"):60116,et=fe?Symbol.for("react.block"):60121,Ee=fe?Symbol.for("react.fundamental"):60117,yt=fe?Symbol.for("react.responder"):60118,Vt=fe?Symbol.for("react.scope"):60119;function qe(Ce){if(typeof Ce=="object"&&Ce!==null){var xe=Ce.$$typeof;switch(xe){case We:switch(Ce=Ce.type,Ce){case me:case De:case Je:case Te:case ve:case Oe:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case we:case at:case lt:case ht:case _e:return Ce;default:return xe}}case Be:return xe}}}function ut(Ce){return qe(Ce)===De}se=me,se=De,se=we,se=_e,se=We,se=at,se=Je,se=lt,se=ht,se=Be,se=Te,se=ve,se=Oe,se=function(Ce){return ut(Ce)||qe(Ce)===me},se=ut,se=function(Ce){return qe(Ce)===we},se=function(Ce){return qe(Ce)===_e},se=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===We},se=function(Ce){return qe(Ce)===at},Yt.isFragment=function(Ce){return qe(Ce)===Je},se=function(Ce){return qe(Ce)===lt},se=function(Ce){return qe(Ce)===ht},se=function(Ce){return qe(Ce)===Be},se=function(Ce){return qe(Ce)===Te},se=function(Ce){return qe(Ce)===ve},se=function(Ce){return qe(Ce)===Oe},se=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Je||Ce===De||Ce===Te||Ce===ve||Ce===Oe||Ce===Mt||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===lt||Ce.$$typeof===ht||Ce.$$typeof===_e||Ce.$$typeof===we||Ce.$$typeof===at||Ce.$$typeof===Ee||Ce.$$typeof===yt||Ce.$$typeof===Vt||Ce.$$typeof===et)},se=qe},47655:function(En,Yt,se){"use strict";En.exports=se(41771)},64701:function(En,Yt,se){"use strict";se.r(Yt),se.d(Yt,{ResizableTextArea:function(){return Dn},default:function(){return wn}});var fe=se(87462),We=se(1413),Be=se(4942),Je=se(71002),ve=se(97685),Te=se(45987),_e=se(74902),we=se(94184),me=se.n(we),De=se(67656),at=se(87887),Oe=se(67294);function Mt(Zt){var Ht=Oe.useRef();Ht.current=Zt;var Tn=Oe.useCallback(function(){for(var xn,ke=arguments.length,ue=new Array(ke),le=0;le<ke;le++)ue[le]=arguments[le];return(xn=Ht.current)===null||xn===void 0?void 0:xn.call.apply(xn,[Ht].concat(ue))},[]);return Tn}function ht(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var lt=ht()?Oe.useLayoutEffect:Oe.useEffect,et=lt,Ee=function(Ht,Tn){var xn=Oe.useRef(!0);lt(function(){if(!xn.current)return Ht()},Tn),lt(function(){return xn.current=!1,function(){xn.current=!0}},[])};function yt(Zt){var Ht=Oe.useRef(!1),Tn=Oe.useState(Zt),xn=(0,ve.Z)(Tn,2),ke=xn[0],ue=xn[1];Oe.useEffect(function(){return Ht.current=!1,function(){Ht.current=!0}},[]);function le(pe,he){he&&Ht.current||ue(pe)}return[ke,le]}function Vt(Zt){return Zt!==void 0}function qe(Zt,Ht){var Tn=Ht||{},xn=Tn.defaultValue,ke=Tn.value,ue=Tn.onChange,le=Tn.postState,pe=yt(function(){return Vt(ke)?ke:Vt(xn)?typeof xn=="function"?xn():xn:typeof Zt=="function"?Zt():Zt}),he=(0,ve.Z)(pe,2),oe=he[0],Ae=he[1],Ge=ke!==void 0?ke:oe,_t=le?le(Ge):Ge,Rt=Mt(ue),zt=yt([Ge]),qt=(0,ve.Z)(zt,2),jt=qt[0],ar=qt[1];Ee(function(){var Nt=jt[0];oe!==Nt&&Rt(oe,Nt)},[jt]),Ee(function(){Vt(ke)||Ae(ke)},[ke]);var xr=Mt(function(Nt,pn){Ae(Nt,pn),ar([Ge],pn)});return[_t,xr]}var ut=se(48555),Ce=function(Ht){return+setTimeout(Ht,16)},xe=function(Ht){return clearTimeout(Ht)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ce=function(Ht){return window.requestAnimationFrame(Ht)},xe=function(Ht){return window.cancelAnimationFrame(Ht)});var Ue=0,Ze=new Map;function St(Zt){Ze.delete(Zt)}var mt=function(Ht){var Tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ue+=1;var xn=Ue;function ke(ue){if(ue===0)St(xn),Ht();else{var le=Ce(function(){ke(ue-1)});Ze.set(xn,le)}}return ke(Tn),xn};mt.cancel=function(Zt){var Ht=Ze.get(Zt);return St(Ht),xe(Ht)};var Pt=mt,Qe=`
|
|
|
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;
|
|
|
`,Ft=["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"],Dt={},an;function it(Zt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Tn=Zt.getAttribute("id")||Zt.getAttribute("data-reactid")||Zt.getAttribute("name");if(Ht&&Dt[Tn])return Dt[Tn];var xn=window.getComputedStyle(Zt),ke=xn.getPropertyValue("box-sizing")||xn.getPropertyValue("-moz-box-sizing")||xn.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(xn.getPropertyValue("padding-bottom"))+parseFloat(xn.getPropertyValue("padding-top")),le=parseFloat(xn.getPropertyValue("border-bottom-width"))+parseFloat(xn.getPropertyValue("border-top-width")),pe=Ft.map(function(oe){return"".concat(oe,":").concat(xn.getPropertyValue(oe))}).join(";"),he={sizingStyle:pe,paddingSize:ue,borderSize:le,boxSizing:ke};return Ht&&Tn&&(Dt[Tn]=he),he}function en(Zt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Tn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,xn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;an||(an=document.createElement("textarea"),an.setAttribute("tab-index","-1"),an.setAttribute("aria-hidden","true"),document.body.appendChild(an)),Zt.getAttribute("wrap")?an.setAttribute("wrap",Zt.getAttribute("wrap")):an.removeAttribute("wrap");var ke=it(Zt,Ht),ue=ke.paddingSize,le=ke.borderSize,pe=ke.boxSizing,he=ke.sizingStyle;an.setAttribute("style","".concat(he,";").concat(Qe)),an.value=Zt.value||Zt.placeholder||"";var oe=void 0,Ae=void 0,Ge,_t=an.scrollHeight;if(pe==="border-box"?_t+=le:pe==="content-box"&&(_t-=ue),Tn!==null||xn!==null){an.value=" ";var Rt=an.scrollHeight-ue;Tn!==null&&(oe=Rt*Tn,pe==="border-box"&&(oe=oe+ue+le),_t=Math.max(oe,_t)),xn!==null&&(Ae=Rt*xn,pe==="border-box"&&(Ae=Ae+ue+le),Ge=_t>Ae?"":"hidden",_t=Math.min(Ae,_t))}var zt={height:_t,overflowY:Ge,resize:"none"};return oe&&(zt.minHeight=oe),Ae&&(zt.maxHeight=Ae),zt}var _n=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],yn=0,Ve=1,Le=2,Bt=Oe.forwardRef(function(Zt,Ht){var Tn=Zt,xn=Tn.prefixCls,ke=Tn.onPressEnter,ue=Tn.defaultValue,le=Tn.value,pe=Tn.autoSize,he=Tn.onResize,oe=Tn.className,Ae=Tn.style,Ge=Tn.disabled,_t=Tn.onChange,Rt=Tn.onInternalAutoSize,zt=(0,Te.Z)(Tn,_n),qt=qe(ue,{value:le,postState:function(In){return In!=null?In:""}}),jt=(0,ve.Z)(qt,2),ar=jt[0],xr=jt[1],Nt=function(In){xr(In.target.value),_t==null||_t(In)},pn=Oe.useRef();Oe.useImperativeHandle(Ht,function(){return{textArea:pn.current}});var cr=Oe.useMemo(function(){return pe&&(0,Je.Z)(pe)==="object"?[pe.minRows,pe.maxRows]:[]},[pe]),Rr=(0,ve.Z)(cr,2),rt=Rr[0],Kt=Rr[1],Bn=!!pe,Gn=function(){try{if(document.activeElement===pn.current){var In=pn.current,sr=In.selectionStart,qn=In.selectionEnd,hr=In.scrollTop;pn.current.setSelectionRange(sr,qn),pn.current.scrollTop=hr}}catch($n){}},tr=Oe.useState(Le),Sr=(0,ve.Z)(tr,2),Ar=Sr[0],Mr=Sr[1],Pr=Oe.useState(),Vr=(0,ve.Z)(Pr,2),lr=Vr[0],si=Vr[1],Li=function(){Mr(yn)};et(function(){Bn&&Li()},[le,rt,Kt,Bn]),et(function(){if(Ar===yn)Mr(Ve);else if(Ar===Ve){var kn=en(pn.current,!1,rt,Kt);Mr(Le),si(kn)}else Gn()},[Ar]);var Ni=Oe.useRef(),Hi=function(){Pt.cancel(Ni.current)},ri=function(In){Ar===Le&&(he==null||he(In),pe&&(Hi(),Ni.current=Pt(function(){Li()})))};Oe.useEffect(function(){return Hi},[]);var vt=Bn?lr:null,Sn=(0,We.Z)((0,We.Z)({},Ae),vt);return(Ar===yn||Ar===Ve)&&(Sn.overflowY="hidden",Sn.overflowX="hidden"),Oe.createElement(ut.Z,{onResize:ri,disabled:!(pe||he)},Oe.createElement("textarea",(0,fe.Z)({},zt,{ref:pn,style:Sn,className:me()(xn,oe,(0,Be.Z)({},"".concat(xn,"-disabled"),Ge)),disabled:Ge,value:ar,onChange:Nt})))}),Dn=Bt,dn=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function nt(Zt,Ht){return(0,_e.Z)(Zt||"").slice(0,Ht).join("")}function ft(Zt,Ht,Tn,xn){var ke=Tn;return Zt?ke=nt(Tn,xn):(0,_e.Z)(Ht||"").length<Tn.length&&(0,_e.Z)(Tn||"").length>xn&&(ke=Ht),ke}var Xt=Oe.forwardRef(function(Zt,Ht){var Tn,xn=Zt.defaultValue,ke=Zt.value,ue=Zt.onFocus,le=Zt.onBlur,pe=Zt.onChange,he=Zt.allowClear,oe=Zt.maxLength,Ae=Zt.onCompositionStart,Ge=Zt.onCompositionEnd,_t=Zt.suffix,Rt=Zt.prefixCls,zt=Rt===void 0?"rc-textarea":Rt,qt=Zt.classes,jt=Zt.showCount,ar=Zt.className,xr=Zt.style,Nt=Zt.disabled,pn=Zt.hidden,cr=Zt.classNames,Rr=Zt.styles,rt=Zt.onResize,Kt=(0,Te.Z)(Zt,dn),Bn=qe(xn,{value:ke,defaultValue:xn}),Gn=(0,ve.Z)(Bn,2),tr=Gn[0],Sr=Gn[1],Ar=(0,Oe.useRef)(null),Mr=Oe.useState(!1),Pr=(0,ve.Z)(Mr,2),Vr=Pr[0],lr=Pr[1],si=Oe.useState(!1),Li=(0,ve.Z)(si,2),Ni=Li[0],Hi=Li[1],ri=Oe.useRef(),vt=Oe.useRef(0),Sn=Oe.useState(null),kn=(0,ve.Z)(Sn,2),In=kn[0],sr=kn[1],qn=function(){var ur;(ur=Ar.current)===null||ur===void 0||ur.textArea.focus()};(0,Oe.useImperativeHandle)(Ht,function(){return{resizableTextArea:Ar.current,focus:qn,blur:function(){var ur;(ur=Ar.current)===null||ur===void 0||ur.textArea.blur()}}}),(0,Oe.useEffect)(function(){lr(function(er){return!Nt&&er})},[Nt]);var hr=Number(oe)>0,$n=function(ur){Hi(!0),ri.current=tr,vt.current=ur.currentTarget.selectionStart,Ae==null||Ae(ur)},Xe=function(ur){Hi(!1);var dr=ur.currentTarget.value;if(hr){var gt,ot=vt.current>=oe+1||vt.current===((gt=ri.current)===null||gt===void 0?void 0:gt.length);dr=ft(ot,ri.current,dr,oe)}dr!==tr&&(Sr(dr),(0,at.rJ)(ur.currentTarget,ur,pe,dr)),Ge==null||Ge(ur)},ct=function(ur){var dr=ur.target.value;if(!Ni&&hr){var gt=ur.target.selectionStart>=oe+1||ur.target.selectionStart===dr.length||!ur.target.selectionStart;dr=ft(gt,tr,dr,oe)}Sr(dr),(0,at.rJ)(ur.currentTarget,ur,pe,dr)},Tt=function(ur){var dr=Kt.onPressEnter,gt=Kt.onKeyDown;ur.key==="Enter"&&dr&&dr(ur),gt==null||gt(ur)},Wt=function(ur){lr(!0),ue==null||ue(ur)},He=function(ur){lr(!1),le==null||le(ur)},pt=function(ur){var dr;Sr(""),qn(),(0,at.rJ)((dr=Ar.current)===null||dr===void 0?void 0:dr.textArea,ur,pe)},$t=(0,at.D7)(tr);!Ni&&hr&&ke==null&&($t=nt($t,oe));var Ot=_t,Jt;if(jt){var tn=(0,_e.Z)($t).length;(0,Je.Z)(jt)==="object"?Jt=jt.formatter({value:$t,count:tn,maxLength:oe}):Jt="".concat(tn).concat(hr?" / ".concat(oe):""),Ot=Oe.createElement(Oe.Fragment,null,Ot,Oe.createElement("span",{className:me()("".concat(zt,"-data-count"),cr==null?void 0:cr.count),style:Rr==null?void 0:Rr.count},Jt))}var Un=function(ur){var dr;rt==null||rt(ur),(dr=Ar.current)!==null&&dr!==void 0&&dr.textArea.style.height&&sr(!0)},_r=!Kt.autoSize&&!jt&&!he,nr=Oe.createElement(De.BaseInput,{value:$t,allowClear:he,handleReset:pt,suffix:Ot,prefixCls:zt,classes:{affixWrapper:me()(qt==null?void 0:qt.affixWrapper,(Tn={},(0,Be.Z)(Tn,"".concat(zt,"-show-count"),jt),(0,Be.Z)(Tn,"".concat(zt,"-textarea-allow-clear"),he),Tn))},disabled:Nt,focused:Vr,className:ar,style:(0,We.Z)((0,We.Z)({},xr),In&&!_r?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Jt=="string"?Jt:void 0}},hidden:pn,inputElement:Oe.createElement(Dn,(0,fe.Z)({},Kt,{onKeyDown:Tt,onChange:ct,onFocus:Wt,onBlur:He,onCompositionStart:$n,onCompositionEnd:Xe,className:cr==null?void 0:cr.textarea,style:(0,We.Z)((0,We.Z)({},Rr==null?void 0:Rr.textarea),{},{resize:xr==null?void 0:xr.resize}),disabled:Nt,prefixCls:zt,onResize:Un,ref:Ar}))});return nr}),Rn=Xt,wn=Rn},1337:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return we}});var fe=se(1413),We=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,Be=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Je="".concat(We," ").concat(Be).split(/[\s\n]+/),ve="aria-",Te="data-";function _e(me,De){return me.indexOf(De)===0}function we(me){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,at;De===!1?at={aria:!0,data:!0,attr:!0}:De===!0?at={aria:!0}:at=(0,fe.Z)({},De);var Oe={};return Object.keys(me).forEach(function(Mt){(at.aria&&(Mt==="role"||_e(Mt,ve))||at.data&&_e(Mt,Te)||at.attr&&Je.includes(Mt))&&(Oe[Mt]=me[Mt])}),Oe}},88386:function(En,Yt,se){(function(fe){fe(se(4631))})(function(fe){fe.defineOption("placeholder","",function(we,me,De){var at=De&&De!=fe.Init;if(me&&!at)we.on("blur",ve),we.on("change",Te),we.on("swapDoc",Te),fe.on(we.getInputField(),"compositionupdate",we.state.placeholderCompose=function(){Je(we)}),Te(we);else if(!me&&at){we.off("blur",ve),we.off("change",Te),we.off("swapDoc",Te),fe.off(we.getInputField(),"compositionupdate",we.state.placeholderCompose),We(we);var Oe=we.getWrapperElement();Oe.className=Oe.className.replace(" CodeMirror-empty","")}me&&!we.hasFocus()&&ve(we)});function We(we){we.state.placeholder&&(we.state.placeholder.parentNode.removeChild(we.state.placeholder),we.state.placeholder=null)}function Be(we){We(we);var me=we.state.placeholder=document.createElement("pre");me.style.cssText="height: 0; overflow: visible",me.style.direction=we.getOption("direction"),me.className="CodeMirror-placeholder CodeMirror-line-like";var De=we.getOption("placeholder");typeof De=="string"&&(De=document.createTextNode(De)),me.appendChild(De),we.display.lineSpace.insertBefore(me,we.display.lineSpace.firstChild)}function Je(we){setTimeout(function(){var me=!1,De=we.getInputField();De.nodeName=="TEXTAREA"?me=!De.value:we.lineCount()==1&&(me=!/[^\u200b]/.test(De.querySelector(".CodeMirror-line").textContent)),me?Be(we):We(we)},20)}function ve(we){_e(we)&&Be(we)}function Te(we){var me=we.getWrapperElement(),De=_e(we);me.className=me.className.replace(" CodeMirror-empty","")+(De?" CodeMirror-empty":""),De?Be(we):We(we)}function _e(we){return we.lineCount()===1&&we.getLine(0)===""}})},82801:function(En,Yt,se){(function(fe){fe(se(4631))})(function(fe){var We={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Be=fe.Pos;fe.defineOption("autoCloseBrackets",!1,function(lt,et,Ee){Ee&&Ee!=fe.Init&&(lt.removeKeyMap(ve),lt.state.closeBrackets=null),et&&(Te(Je(et,"pairs")),lt.state.closeBrackets=et,lt.addKeyMap(ve))});function Je(lt,et){return et=="pairs"&&typeof lt=="string"?lt:typeof lt=="object"&<[et]!=null?lt[et]:We[et]}var ve={Backspace:me,Enter:De};function Te(lt){for(var et=0;et<lt.length;et++){var Ee=lt.charAt(et),yt="'"+Ee+"'";ve[yt]||(ve[yt]=_e(Ee))}}Te(We.pairs+"`");function _e(lt){return function(et){return Oe(et,lt)}}function we(lt){var et=lt.state.closeBrackets;if(!et||et.override)return et;var Ee=lt.getModeAt(lt.getCursor());return Ee.closeBrackets||et}function me(lt){var et=we(lt);if(!et||lt.getOption("disableInput"))return fe.Pass;for(var Ee=Je(et,"pairs"),yt=lt.listSelections(),Vt=0;Vt<yt.length;Vt++){if(!yt[Vt].empty())return fe.Pass;var qe=Mt(lt,yt[Vt].head);if(!qe||Ee.indexOf(qe)%2!=0)return fe.Pass}for(var Vt=yt.length-1;Vt>=0;Vt--){var ut=yt[Vt].head;lt.replaceRange("",Be(ut.line,ut.ch-1),Be(ut.line,ut.ch+1),"+delete")}}function De(lt){var et=we(lt),Ee=et&&Je(et,"explode");if(!Ee||lt.getOption("disableInput"))return fe.Pass;for(var yt=lt.listSelections(),Vt=0;Vt<yt.length;Vt++){if(!yt[Vt].empty())return fe.Pass;var qe=Mt(lt,yt[Vt].head);if(!qe||Ee.indexOf(qe)%2!=0)return fe.Pass}lt.operation(function(){var ut=lt.lineSeparator()||`
|
|
|
`;lt.replaceSelection(ut+ut,null),lt.execCommand("goCharLeft"),yt=lt.listSelections();for(var Ce=0;Ce<yt.length;Ce++){var xe=yt[Ce].head.line;lt.indentLine(xe,null,!0),lt.indentLine(xe+1,null,!0)}})}function at(lt){var et=fe.cmpPos(lt.anchor,lt.head)>0;return{anchor:new Be(lt.anchor.line,lt.anchor.ch+(et?-1:1)),head:new Be(lt.head.line,lt.head.ch+(et?1:-1))}}function Oe(lt,et){var Ee=we(lt);if(!Ee||lt.getOption("disableInput"))return fe.Pass;var yt=Je(Ee,"pairs"),Vt=yt.indexOf(et);if(Vt==-1)return fe.Pass;for(var qe=Je(Ee,"closeBefore"),ut=Je(Ee,"triples"),Ce=yt.charAt(Vt+1)==et,xe=lt.listSelections(),Ue=Vt%2==0,Ze,St=0;St<xe.length;St++){var mt=xe[St],Pt=mt.head,Qe,Ft=lt.getRange(Pt,Be(Pt.line,Pt.ch+1));if(Ue&&!mt.empty())Qe="surround";else if((Ce||!Ue)&&Ft==et)Ce&&ht(lt,Pt)?Qe="both":ut.indexOf(et)>=0&<.getRange(Pt,Be(Pt.line,Pt.ch+3))==et+et+et?Qe="skipThree":Qe="skip";else if(Ce&&Pt.ch>1&&ut.indexOf(et)>=0&<.getRange(Be(Pt.line,Pt.ch-2),Pt)==et+et){if(Pt.ch>2&&/\bstring/.test(lt.getTokenTypeAt(Be(Pt.line,Pt.ch-2))))return fe.Pass;Qe="addFour"}else if(Ce){var Dt=Pt.ch==0?" ":lt.getRange(Be(Pt.line,Pt.ch-1),Pt);if(!fe.isWordChar(Ft)&&Dt!=et&&!fe.isWordChar(Dt))Qe="both";else return fe.Pass}else if(Ue&&(Ft.length===0||/\s/.test(Ft)||qe.indexOf(Ft)>-1))Qe="both";else return fe.Pass;if(!Ze)Ze=Qe;else if(Ze!=Qe)return fe.Pass}var an=Vt%2?yt.charAt(Vt-1):et,it=Vt%2?et:yt.charAt(Vt+1);lt.operation(function(){if(Ze=="skip")lt.execCommand("goCharRight");else if(Ze=="skipThree")for(var en=0;en<3;en++)lt.execCommand("goCharRight");else if(Ze=="surround"){for(var _n=lt.getSelections(),en=0;en<_n.length;en++)_n[en]=an+_n[en]+it;lt.replaceSelections(_n,"around"),_n=lt.listSelections().slice();for(var en=0;en<_n.length;en++)_n[en]=at(_n[en]);lt.setSelections(_n)}else Ze=="both"?(lt.replaceSelection(an+it,null),lt.triggerElectric(an+it),lt.execCommand("goCharLeft")):Ze=="addFour"&&(lt.replaceSelection(an+an+an+an,"before"),lt.execCommand("goCharRight"))})}function Mt(lt,et){var Ee=lt.getRange(Be(et.line,et.ch-1),Be(et.line,et.ch+1));return Ee.length==2?Ee:null}function ht(lt,et){var Ee=lt.getTokenAt(Be(et.line,et.ch+1));return/\bstring/.test(Ee.type)&&Ee.start==et.ch&&(et.ch==0||!/\bstring/.test(lt.getTokenTypeAt(et)))}})},57341:function(En,Yt,se){(function(fe){fe(se(4631),se(4786))})(function(fe){fe.defineOption("autoCloseTags",!1,function(me,De,at){if(at!=fe.Init&&at&&me.removeKeyMap("autoCloseTags"),!!De){var Oe={name:"autoCloseTags"};(typeof De!="object"||De.whenClosing!==!1)&&(Oe["'/'"]=function(Mt){return Te(Mt)}),(typeof De!="object"||De.whenOpening!==!1)&&(Oe["'>'"]=function(Mt){return Je(Mt)}),me.addKeyMap(Oe)}});var We=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Be=["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 Je(me){if(me.getOption("disableInput"))return fe.Pass;for(var De=me.listSelections(),at=[],Oe=me.getOption("autoCloseTags"),Mt=0;Mt<De.length;Mt++){if(!De[Mt].empty())return fe.Pass;var ht=De[Mt].head,lt=me.getTokenAt(ht),et=fe.innerMode(me.getMode(),lt.state),Ee=et.state,yt=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(Ee),Vt=yt&&yt.name;if(!Vt)return fe.Pass;var qe=et.mode.configuration=="html",ut=typeof Oe=="object"&&Oe.dontCloseTags||qe&&We,Ce=typeof Oe=="object"&&Oe.indentTags||qe&&Be;lt.end>ht.ch&&(Vt=Vt.slice(0,Vt.length-lt.end+ht.ch));var xe=Vt.toLowerCase();if(!Vt||lt.type=="string"&&(lt.end!=ht.ch||!/[\"\']/.test(lt.string.charAt(lt.string.length-1))||lt.string.length==1)||lt.type=="tag"&&yt.close||lt.string.indexOf("/")==ht.ch-lt.start-1||ut&&_e(ut,xe)>-1||we(me,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(Ee)||[],Vt,ht,!0))return fe.Pass;var Ue=typeof Oe=="object"&&Oe.emptyTags;if(Ue&&_e(Ue,Vt)>-1){at[Mt]={text:"/>",newPos:fe.Pos(ht.line,ht.ch+2)};continue}var Ze=Ce&&_e(Ce,xe)>-1;at[Mt]={indent:Ze,text:">"+(Ze?`
|
|
|
|
|
|
`:"")+"</"+Vt+">",newPos:Ze?fe.Pos(ht.line+1,0):fe.Pos(ht.line,ht.ch+1)}}for(var St=typeof Oe=="object"&&Oe.dontIndentOnAutoClose,Mt=De.length-1;Mt>=0;Mt--){var mt=at[Mt];me.replaceRange(mt.text,De[Mt].head,De[Mt].anchor,"+insert");var Pt=me.listSelections().slice(0);Pt[Mt]={head:mt.newPos,anchor:mt.newPos},me.setSelections(Pt),!St&&mt.indent&&(me.indentLine(mt.newPos.line,null,!0),me.indentLine(mt.newPos.line+1,null,!0))}}function ve(me,De){for(var at=me.listSelections(),Oe=[],Mt=De?"/":"</",ht=me.getOption("autoCloseTags"),lt=typeof ht=="object"&&ht.dontIndentOnSlash,et=0;et<at.length;et++){if(!at[et].empty())return fe.Pass;var Ee=at[et].head,yt=me.getTokenAt(Ee),Vt=fe.innerMode(me.getMode(),yt.state),qe=Vt.state;if(De&&(yt.type=="string"||yt.string.charAt(0)!="<"||yt.start!=Ee.ch-1))return fe.Pass;var ut,Ce=Vt.mode.name!="xml"&&me.getMode().name=="htmlmixed";if(Ce&&Vt.mode.name=="javascript")ut=Mt+"script";else if(Ce&&Vt.mode.name=="css")ut=Mt+"style";else{var xe=Vt.mode.xmlCurrentContext&&Vt.mode.xmlCurrentContext(qe);if(!xe||xe.length&&we(me,xe,xe[xe.length-1],Ee))return fe.Pass;ut=Mt+xe[xe.length-1]}me.getLine(Ee.line).charAt(yt.end)!=">"&&(ut+=">"),Oe[et]=ut}if(me.replaceSelections(Oe),at=me.listSelections(),!lt)for(var et=0;et<at.length;et++)(et==at.length-1||at[et].head.line<at[et+1].head.line)&&me.indentLine(at[et].head.line)}function Te(me){return me.getOption("disableInput")?fe.Pass:ve(me,!0)}fe.commands.closeTag=function(me){return ve(me)};function _e(me,De){if(me.indexOf)return me.indexOf(De);for(var at=0,Oe=me.length;at<Oe;++at)if(me[at]==De)return at;return-1}function we(me,De,at,Oe,Mt){if(!fe.scanForClosingTag)return!1;var ht=Math.min(me.lastLine()+1,Oe.line+500),lt=fe.scanForClosingTag(me,Oe,null,ht);if(!lt||lt.tag!=at)return!1;for(var et=Mt?1:0,Ee=De.length-1;Ee>=0&&De[Ee]==at;Ee--)++et;Oe=lt.to;for(var Ee=1;Ee<et;Ee++){var yt=fe.scanForClosingTag(me,Oe,null,ht);if(!yt||yt.tag!=at)return!1;Oe=yt.to}return!0}})},4786:function(En,Yt,se){(function(fe){fe(se(4631))})(function(fe){"use strict";var We=fe.Pos;function Be(Ee,yt){return Ee.line-yt.line||Ee.ch-yt.ch}var Je="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ve=Je+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Te=new RegExp("<(/?)(["+Je+"]["+ve+"]*)","g");function _e(Ee,yt,Vt,qe){this.line=yt,this.ch=Vt,this.cm=Ee,this.text=Ee.getLine(yt),this.min=qe?Math.max(qe.from,Ee.firstLine()):Ee.firstLine(),this.max=qe?Math.min(qe.to-1,Ee.lastLine()):Ee.lastLine()}function we(Ee,yt){var Vt=Ee.cm.getTokenTypeAt(We(Ee.line,yt));return Vt&&/\btag\b/.test(Vt)}function me(Ee){if(!(Ee.line>=Ee.max))return Ee.ch=0,Ee.text=Ee.cm.getLine(++Ee.line),!0}function De(Ee){if(!(Ee.line<=Ee.min))return Ee.text=Ee.cm.getLine(--Ee.line),Ee.ch=Ee.text.length,!0}function at(Ee){for(;;){var yt=Ee.text.indexOf(">",Ee.ch);if(yt==-1){if(me(Ee))continue;return}if(!we(Ee,yt+1)){Ee.ch=yt+1;continue}var Vt=Ee.text.lastIndexOf("/",yt),qe=Vt>-1&&!/\S/.test(Ee.text.slice(Vt+1,yt));return Ee.ch=yt+1,qe?"selfClose":"regular"}}function Oe(Ee){for(;;){var yt=Ee.ch?Ee.text.lastIndexOf("<",Ee.ch-1):-1;if(yt==-1){if(De(Ee))continue;return}if(!we(Ee,yt+1)){Ee.ch=yt;continue}Te.lastIndex=yt,Ee.ch=yt;var Vt=Te.exec(Ee.text);if(Vt&&Vt.index==yt)return Vt}}function Mt(Ee){for(;;){Te.lastIndex=Ee.ch;var yt=Te.exec(Ee.text);if(!yt){if(me(Ee))continue;return}if(!we(Ee,yt.index+1)){Ee.ch=yt.index+1;continue}return Ee.ch=yt.index+yt[0].length,yt}}function ht(Ee){for(;;){var yt=Ee.ch?Ee.text.lastIndexOf(">",Ee.ch-1):-1;if(yt==-1){if(De(Ee))continue;return}if(!we(Ee,yt+1)){Ee.ch=yt;continue}var Vt=Ee.text.lastIndexOf("/",yt),qe=Vt>-1&&!/\S/.test(Ee.text.slice(Vt+1,yt));return Ee.ch=yt+1,qe?"selfClose":"regular"}}function lt(Ee,yt){for(var Vt=[];;){var qe=Mt(Ee),ut,Ce=Ee.line,xe=Ee.ch-(qe?qe[0].length:0);if(!qe||!(ut=at(Ee)))return;if(ut!="selfClose")if(qe[1]){for(var Ue=Vt.length-1;Ue>=0;--Ue)if(Vt[Ue]==qe[2]){Vt.length=Ue;break}if(Ue<0&&(!yt||yt==qe[2]))return{tag:qe[2],from:We(Ce,xe),to:We(Ee.line,Ee.ch)}}else Vt.push(qe[2])}}function et(Ee,yt){for(var Vt=[];;){var qe=ht(Ee);if(!qe)return;if(qe=="selfClose"){Oe(Ee);continue}var ut=Ee.line,Ce=Ee.ch,xe=Oe(Ee);if(!xe)return;if(xe[1])Vt.push(xe[2]);else{for(var Ue=Vt.length-1;Ue>=0;--Ue)if(Vt[Ue]==xe[2]){Vt.length=Ue;break}if(Ue<0&&(!yt||yt==xe[2]))return{tag:xe[2],from:We(Ee.line,Ee.ch),to:We(ut,Ce)}}}}fe.registerHelper("fold","xml",function(Ee,yt){for(var Vt=new _e(Ee,yt.line,0);;){var qe=Mt(Vt);if(!qe||Vt.line!=yt.line)return;var ut=at(Vt);if(!ut)return;if(!qe[1]&&ut!="selfClose"){var Ce=We(Vt.line,Vt.ch),xe=lt(Vt,qe[2]);return xe&&Be(xe.from,Ce)>0?{from:Ce,to:xe.from}:null}}}),fe.findMatchingTag=function(Ee,yt,Vt){var qe=new _e(Ee,yt.line,yt.ch,Vt);if(!(qe.text.indexOf(">")==-1&&qe.text.indexOf("<")==-1)){var ut=at(qe),Ce=ut&&We(qe.line,qe.ch),xe=ut&&Oe(qe);if(!(!ut||!xe||Be(qe,yt)>0)){var Ue={from:We(qe.line,qe.ch),to:Ce,tag:xe[2]};return ut=="selfClose"?{open:Ue,close:null,at:"open"}:xe[1]?{open:et(qe,xe[2]),close:Ue,at:"close"}:(qe=new _e(Ee,Ce.line,Ce.ch,Vt),{open:Ue,close:lt(qe,xe[2]),at:"open"})}}},fe.findEnclosingTag=function(Ee,yt,Vt,qe){for(var ut=new _e(Ee,yt.line,yt.ch,Vt);;){var Ce=et(ut,qe);if(!Ce)break;var xe=new _e(Ee,yt.line,yt.ch,Vt),Ue=lt(xe,Ce.tag);if(Ue)return{open:Ce,close:Ue}}},fe.scanForClosingTag=function(Ee,yt,Vt,qe){var ut=new _e(Ee,yt.line,yt.ch,qe?{from:0,to:qe}:null);return lt(ut,Vt)}})},4631:function(En){(function(Yt,se){En.exports=se()})(this,function(){"use strict";var Yt=navigator.userAgent,se=navigator.platform,fe=/gecko\/\d/i.test(Yt),We=/MSIE \d/.test(Yt),Be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Yt),Je=/Edge\/(\d+)/.exec(Yt),ve=We||Be||Je,Te=ve&&(We?document.documentMode||6:+(Je||Be)[1]),_e=!Je&&/WebKit\//.test(Yt),we=_e&&/Qt\/\d+\.\d+/.test(Yt),me=!Je&&/Chrome\//.test(Yt),De=/Opera\//.test(Yt),at=/Apple Computer/.test(navigator.vendor),Oe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Yt),Mt=/PhantomJS/.test(Yt),ht=!Je&&/AppleWebKit/.test(Yt)&&/Mobile\/\w+/.test(Yt),lt=/Android/.test(Yt),et=ht||lt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Yt),Ee=ht||/Mac/.test(se),yt=/\bCrOS\b/.test(Yt),Vt=/win/i.test(se),qe=De&&Yt.match(/Version\/(\d*\.\d*)/);qe&&(qe=Number(qe[1])),qe&&qe>=15&&(De=!1,_e=!0);var ut=Ee&&(we||De&&(qe==null||qe<12.11)),Ce=fe||ve&&Te>=9;function xe(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var Ue=function(x,z){var ne=x.className,te=xe(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 St(x,z){return Ze(x).appendChild(z)}function mt(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 ce=0;ce<z.length;++ce)ie.appendChild(z[ce]);return ie}function Pt(x,z,ne,te){var ie=mt(x,z,ne,te);return ie.setAttribute("role","presentation"),ie}var Qe;document.createRange?Qe=function(x,z,ne,te){var ie=document.createRange();return ie.setEnd(te||x,ne),ie.setStart(x,z),ie}:Qe=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 Ft(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 Dt(){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 an(x,z){var ne=x.className;xe(z).test(ne)||(x.className+=(ne?" ":"")+z)}function it(x,z){for(var ne=x.split(" "),te=0;te<ne.length;te++)ne[te]&&!xe(ne[te]).test(z)&&(z+=" "+ne[te]);return z}var en=function(x){x.select()};ht?en=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:ve&&(en=function(x){try{x.select()}catch(z){}});function _n(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function yn(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 Ve(x,z,ne,te,ie){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var ce=te||0,ye=ie||0;;){var Me=x.indexOf(" ",ce);if(Me<0||Me>=z)return ye+(z-ce);ye+=Me-ce,ye+=ne-ye%ne,ce=Me+1}}var Le=function(){this.id=null,this.f=null,this.time=0,this.handler=_n(this.onTimeout,this)};Le.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},Le.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 Bt(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var Dn=50,dn={toString:function(){return"CodeMirror.Pass"}},nt={scroll:!1},ft={origin:"*mouse"},Xt={origin:"+move"};function Rn(x,z,ne){for(var te=0,ie=0;;){var ce=x.indexOf(" ",te);ce==-1&&(ce=x.length);var ye=ce-te;if(ce==x.length||ie+ye>=z)return te+Math.min(ye,z-ie);if(ie+=ce-te,ie+=ne-ie%ne,te=ce+1,ie>=z)return te}}var wn=[""];function Zt(x){for(;wn.length<=x;)wn.push(Ht(wn)+" ");return wn[x]}function Ht(x){return x[x.length-1]}function Tn(x,z){for(var ne=[],te=0;te<x.length;te++)ne[te]=z(x[te],te);return ne}function xn(x,z,ne){for(var te=0,ie=ne(z);te<x.length&&ne(x[te])<=ie;)te++;x.splice(te,0,z)}function ke(){}function ue(x,z){var ne;return Object.create?ne=Object.create(x):(ke.prototype=x,ne=new ke),z&&yn(z,ne),ne}var le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function pe(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||le.test(x))}function he(x,z){return z?z.source.indexOf("\\w")>-1&&pe(x)?!0:z.test(x):pe(x)}function oe(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var Ae=/[\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 Ge(x){return x.charCodeAt(0)>=768&&Ae.test(x)}function _t(x,z,ne){for(;(ne<0?z>0:z<x.length)&&Ge(x.charAt(z));)z+=ne;return z}function Rt(x,z,ne){for(var te=z>ne?-1:1;;){if(z==ne)return z;var ie=(z+ne)/2,ce=te<0?Math.ceil(ie):Math.floor(ie);if(ce==z)return x(ce)?z:ne;x(ce)?ne=ce:z=ce+te}}function zt(x,z,ne,te){if(!x)return te(z,ne,"ltr",0);for(var ie=!1,ce=0;ce<x.length;++ce){var ye=x[ce];(ye.from<ne&&ye.to>z||z==ne&&ye.to==z)&&(te(Math.max(ye.from,z),Math.min(ye.to,ne),ye.level==1?"rtl":"ltr",ce),ie=!0)}ie||te(z,ne,"ltr")}var qt=null;function jt(x,z,ne){var te;qt=null;for(var ie=0;ie<x.length;++ie){var ce=x[ie];if(ce.from<z&&ce.to>z)return ie;ce.to==z&&(ce.from!=ce.to&&ne=="before"?te=ie:qt=ie),ce.from==z&&(ce.from!=ce.to&&ne!="before"?te=ie:qt=ie)}return te!=null?te:qt}var ar=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ne(Ne){return Ne<=247?x.charAt(Ne):1424<=Ne&&Ne<=1524?"R":1536<=Ne&&Ne<=1785?z.charAt(Ne-1536):1774<=Ne&&Ne<=2220?"r":8192<=Ne&&Ne<=8203?"w":Ne==8204?"b":"L"}var te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ie=/[stwN]/,ce=/[LRr]/,ye=/[Lb1n]/,Me=/[1n]/;function Pe(Ne,bt,It){this.level=Ne,this.from=bt,this.to=It}return function(Ne,bt){var It=bt=="ltr"?"L":"R";if(Ne.length==0||bt=="ltr"&&!te.test(Ne))return!1;for(var hn=Ne.length,rn=[],Qn=0;Qn<hn;++Qn)rn.push(ne(Ne.charCodeAt(Qn)));for(var vr=0,Br=It;vr<hn;++vr){var Xr=rn[vr];Xr=="m"?rn[vr]=Br:Br=Xr}for(var ai=0,Zr=It;ai<hn;++ai){var oi=rn[ai];oi=="1"&&Zr=="r"?rn[ai]="n":ce.test(oi)&&(Zr=oi,oi=="r"&&(rn[ai]="R"))}for(var Ki=1,ji=rn[0];Ki<hn-1;++Ki){var ba=rn[Ki];ba=="+"&&ji=="1"&&rn[Ki+1]=="1"?rn[Ki]="1":ba==","&&ji==rn[Ki+1]&&(ji=="1"||ji=="n")&&(rn[Ki]=ji),ji=ba}for(var to=0;to<hn;++to){var Wo=rn[to];if(Wo==",")rn[to]="N";else if(Wo=="%"){var bo=void 0;for(bo=to+1;bo<hn&&rn[bo]=="%";++bo);for(var us=to&&rn[to-1]=="!"||bo<hn&&rn[bo]=="1"?"1":"N",ds=to;ds<bo;++ds)rn[ds]=us;to=bo-1}}for(var Do=0,fs=It;Do<hn;++Do){var sa=rn[Do];fs=="L"&&sa=="1"?rn[Do]="L":ce.test(sa)&&(fs=sa)}for(var So=0;So<hn;++So)if(ie.test(rn[So])){var xo=void 0;for(xo=So+1;xo<hn&&ie.test(rn[xo]);++xo);for(var Co=(So?rn[So-1]:It)=="L",ko=(xo<hn?rn[xo]:It)=="L",Wl=Co==ko?Co?"L":"R":It,ys=So;ys<xo;++ys)rn[ys]=Wl;So=xo-1}for(var Go=[],Wa,Bo=0;Bo<hn;)if(ye.test(rn[Bo])){var Eu=Bo;for(++Bo;Bo<hn&&ye.test(rn[Bo]);++Bo);Go.push(new Pe(0,Eu,Bo))}else{var sl=Bo,xl=Go.length,Zs=bt=="rtl"?1:0;for(++Bo;Bo<hn&&rn[Bo]!="L";++Bo);for(var Po=sl;Po<Bo;)if(Me.test(rn[Po])){sl<Po&&(Go.splice(xl,0,new Pe(1,sl,Po)),xl+=Zs);var Ul=Po;for(++Po;Po<Bo&&Me.test(rn[Po]);++Po);Go.splice(xl,0,new Pe(2,Ul,Po)),xl+=Zs,sl=Po}else++Po;sl<Bo&&Go.splice(xl,0,new Pe(1,sl,Bo))}return bt=="ltr"&&(Go[0].level==1&&(Wa=Ne.match(/^\s+/))&&(Go[0].from=Wa[0].length,Go.unshift(new Pe(0,0,Wa[0].length))),Ht(Go).level==1&&(Wa=Ne.match(/\s+$/))&&(Ht(Go).to-=Wa[0].length,Go.push(new Pe(0,hn-Wa[0].length,hn)))),bt=="rtl"?Go.reverse():Go}}();function xr(x,z){var ne=x.order;return ne==null&&(ne=x.order=ar(x.text,z)),ne}var Nt=[],pn=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]||Nt).concat(ne)}};function cr(x,z){return x._handlers&&x._handlers[z]||Nt}function Rr(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 ce=Bt(ie,ne);ce>-1&&(te[z]=ie.slice(0,ce).concat(ie.slice(ce+1)))}}}function rt(x,z){var ne=cr(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 Kt(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),rt(x,ne||z.type,x,z),Mr(z)||z.codemirrorIgnore}function Bn(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)Bt(ne,z[te])==-1&&ne.push(z[te])}function Gn(x,z){return cr(x,z).length>0}function tr(x){x.prototype.on=function(z,ne){pn(this,z,ne)},x.prototype.off=function(z,ne){Rr(this,z,ne)}}function Sr(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function Ar(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function Mr(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function Pr(x){Sr(x),Ar(x)}function Vr(x){return x.target||x.srcElement}function lr(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),Ee&&x.ctrlKey&&z==1&&(z=3),z}var si=function(){if(ve&&Te<9)return!1;var x=mt("div");return"draggable"in x||"dragDrop"in x}(),Li;function Ni(x){if(Li==null){var z=mt("span","\u200B");St(x,mt("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(Li=z.offsetWidth<=1&&z.offsetHeight>2&&!(ve&&Te<8))}var ne=Li?mt("span","\u200B"):mt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var Hi;function ri(x){if(Hi!=null)return Hi;var z=St(x,document.createTextNode("A\u062EA")),ne=Qe(z,0,1).getBoundingClientRect(),te=Qe(z,1,2).getBoundingClientRect();return Ze(x),!ne||ne.left==ne.right?!1:Hi=te.right-ne.right<3}var vt=`
|
|
|
|
|
|
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 ce=x.slice(z,x.charAt(ie-1)=="\r"?ie-1:ie),ye=ce.indexOf("\r");ye!=-1?(ne.push(ce.slice(0,ye)),z+=ye+1):(ne.push(ce),z=ie+1)}return ne}:function(x){return x.split(/\r\n?|\n/)},Sn=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},kn=function(){var x=mt("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),In=null;function sr(x){if(In!=null)return In;var z=St(x,mt("span","x")),ne=z.getBoundingClientRect(),te=Qe(z,0,1).getBoundingClientRect();return In=Math.abs(ne.left-te.left)>1}var qn={},hr={};function $n(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),qn[x]=z}function Xe(x,z){hr[x]=z}function ct(x){if(typeof x=="string"&&hr.hasOwnProperty(x))x=hr[x];else if(x&&typeof x.name=="string"&&hr.hasOwnProperty(x.name)){var z=hr[x.name];typeof z=="string"&&(z={name:z}),x=ue(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return ct("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return ct("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function Tt(x,z){z=ct(z);var ne=qn[z.name];if(!ne)return Tt(x,"text/plain");var te=ne(x,z);if(Wt.hasOwnProperty(z.name)){var ie=Wt[z.name];for(var ce in ie)ie.hasOwnProperty(ce)&&(te.hasOwnProperty(ce)&&(te["_"+ce]=te[ce]),te[ce]=ie[ce])}if(te.name=z.name,z.helperType&&(te.helperType=z.helperType),z.modeProps)for(var ye in z.modeProps)te[ye]=z.modeProps[ye];return te}var Wt={};function He(x,z){var ne=Wt.hasOwnProperty(x)?Wt[x]:Wt[x]={};yn(z,ne)}function pt(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 $t(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 Ot(x,z,ne){return x.startState?x.startState(z,ne):!0}var Jt=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};Jt.prototype.eol=function(){return this.pos>=this.string.length},Jt.prototype.sol=function(){return this.pos==this.lineStart},Jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Jt.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},Jt.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},Jt.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},Jt.prototype.skipToEnd=function(){this.pos=this.string.length},Jt.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},Jt.prototype.backUp=function(x){this.pos-=x},Jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ve(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ve(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.indentation=function(){return Ve(this.string,null,this.tabSize)-(this.lineStart?Ve(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.match=function(x,z,ne){if(typeof x=="string"){var te=function(ye){return ne?ye.toLowerCase():ye},ie=this.string.substr(this.pos,x.length);if(te(ie)==te(x))return z!==!1&&(this.pos+=x.length),!0}else{var ce=this.string.slice(this.pos).match(x);return ce&&ce.index>0?null:(ce&&z!==!1&&(this.pos+=ce[0].length),ce)}},Jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Jt.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},Jt.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},Jt.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function tn(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],ce=ie.chunkSize();if(z<ce){ne=ie;break}z-=ce}return ne.lines[z]}function Un(x,z,ne){var te=[],ie=z.line;return x.iter(z.line,ne.line+1,function(ce){var ye=ce.text;ie==ne.line&&(ye=ye.slice(0,ne.ch)),ie==z.line&&(ye=ye.slice(z.ch)),te.push(ye),++ie}),te}function _r(x,z,ne){var te=[];return x.iter(z,ne,function(ie){te.push(ie.text)}),te}function nr(x,z){var ne=z-x.height;if(ne)for(var te=x;te;te=te.parent)te.height+=ne}function er(x){if(x.parent==null)return null;for(var z=x.parent,ne=Bt(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 ur(x,z){var ne=x.first;e:do{for(var te=0;te<x.children.length;++te){var ie=x.children[te],ce=ie.height;if(z<ce){x=ie;continue e}z-=ce,ne+=ie.chunkSize()}return ne}while(!x.lines);for(var ye=0;ye<x.lines.length;++ye){var Me=x.lines[ye],Pe=Me.height;if(z<Pe)break;z-=Pe}return ne+ye}function dr(x,z){return z>=x.first&&z<x.first+x.size}function gt(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function ot(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof ot))return new ot(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function Ct(x,z){return x.line-z.line||x.ch-z.ch}function ln(x,z){return x.sticky==z.sticky&&Ct(x,z)==0}function Nn(x){return ot(x.line,x.ch)}function cn(x,z){return Ct(x,z)<0?z:x}function mn(x,z){return Ct(x,z)<0?x:z}function gn(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function Fn(x,z){if(z.line<x.first)return ot(x.first,0);var ne=x.first+x.size-1;return z.line>ne?ot(ne,tn(x,ne).text.length):fr(z,tn(x,z.line).text.length)}function fr(x,z){var ne=x.ch;return ne==null||ne>z?ot(x.line,z):ne<0?ot(x.line,0):x}function Qt(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=Fn(x,z[te]);return ne}var Qr=function(x,z){this.state=x,this.lookAhead=z},Ur=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};Ur.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},Ur.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}},Ur.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ur.fromSaved=function(x,z,ne){return z instanceof Qr?new Ur(x,pt(x.mode,z.state),ne,z.lookAhead):new Ur(x,pt(x.mode,z),ne)},Ur.prototype.save=function(x){var z=x!==!1?pt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Qr(z,this.maxLookAhead):z};function Bi(x,z,ne,te){var ie=[x.state.modeGen],ce={};vi(x,z.text,x.doc.mode,ne,function(Ne,bt){return ie.push(Ne,bt)},ce,te);for(var ye=ne.state,Me=function(Ne){ne.baseTokens=ie;var bt=x.state.overlays[Ne],It=1,hn=0;ne.state=!0,vi(x,z.text,bt.mode,ne,function(rn,Qn){for(var vr=It;hn<rn;){var Br=ie[It];Br>rn&&ie.splice(It,1,rn,ie[It+1],Br),It+=2,hn=Math.min(rn,Br)}if(Qn)if(bt.opaque)ie.splice(vr,It-vr,rn,"overlay "+Qn),It=vr+2;else for(;vr<It;vr+=2){var Xr=ie[vr+1];ie[vr+1]=(Xr?Xr+" ":"")+"overlay "+Qn}},ce),ne.state=ye,ne.baseTokens=null,ne.baseTokenPos=1},Pe=0;Pe<x.state.overlays.length;++Pe)Me(Pe);return{styles:ie,classes:ce.bgClass||ce.textClass?ce:null}}function Ai(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=gi(x,er(z)),ie=z.text.length>x.options.maxHighlightLength&&pt(x.doc.mode,te.state),ce=Bi(x,z,te);ie&&(te.state=ie),z.stateAfter=te.save(!ie),z.styles=ce.styles,ce.classes?z.styleClasses=ce.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 gi(x,z,ne){var te=x.doc,ie=x.display;if(!te.mode.startState)return new Ur(te,!0,z);var ce=Zi(x,z,ne),ye=ce>te.first&&tn(te,ce-1).stateAfter,Me=ye?Ur.fromSaved(te,ye,ce):new Ur(te,Ot(te.mode),ce);return te.iter(ce,z,function(Pe){qi(x,Pe.text,Me);var Ne=Me.line;Pe.stateAfter=Ne==z-1||Ne%5==0||Ne>=ie.viewFrom&&Ne<ie.viewTo?Me.save():null,Me.nextLine()}),ne&&(te.modeFrontier=Me.line),Me}function qi(x,z,ne,te){var ie=x.doc.mode,ce=new Jt(z,x.options.tabSize,ne);for(ce.start=ce.pos=te||0,z==""&&xi(ie,ne.state);!ce.eol();)li(ie,ce,ne.state),ce.start=ce.pos}function xi(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=$t(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function li(x,z,ne,te){for(var ie=0;ie<10;ie++){te&&(te[0]=$t(x,ne).mode);var ce=x.token(z,ne);if(z.pos>z.start)return ce}throw new Error("Mode "+x.name+" failed to advance stream.")}var $i=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function Gi(x,z,ne,te){var ie=x.doc,ce=ie.mode,ye;z=Fn(ie,z);var Me=tn(ie,z.line),Pe=gi(x,z.line,ne),Ne=new Jt(Me.text,x.options.tabSize,Pe),bt;for(te&&(bt=[]);(te||Ne.pos<z.ch)&&!Ne.eol();)Ne.start=Ne.pos,ye=li(ce,Ne,Pe.state),te&&bt.push(new $i(Ne,ye,pt(ie.mode,Pe.state)));return te?bt:new $i(Ne,ye,Pe.state)}function qr(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 vi(x,z,ne,te,ie,ce,ye){var Me=ne.flattenSpans;Me==null&&(Me=x.options.flattenSpans);var Pe=0,Ne=null,bt=new Jt(z,x.options.tabSize,te),It,hn=x.options.addModeClass&&[null];for(z==""&&qr(xi(ne,te.state),ce);!bt.eol();){if(bt.pos>x.options.maxHighlightLength?(Me=!1,ye&&qi(x,z,te,bt.pos),bt.pos=z.length,It=null):It=qr(li(ne,bt,te.state,hn),ce),hn){var rn=hn[0].name;rn&&(It="m-"+(It?rn+" "+It:rn))}if(!Me||Ne!=It){for(;Pe<bt.start;)Pe=Math.min(bt.start,Pe+5e3),ie(Pe,Ne);Ne=It}bt.start=bt.pos}for(;Pe<bt.pos;){var Qn=Math.min(bt.pos,Pe+5e3);ie(Qn,Ne),Pe=Qn}}function Zi(x,z,ne){for(var te,ie,ce=x.doc,ye=ne?-1:z-(x.doc.mode.innerMode?1e3:100),Me=z;Me>ye;--Me){if(Me<=ce.first)return ce.first;var Pe=tn(ce,Me-1),Ne=Pe.stateAfter;if(Ne&&(!ne||Me+(Ne instanceof Qr?Ne.lookAhead:0)<=ce.modeFrontier))return Me;var bt=Ve(Pe.text,null,x.options.tabSize);(ie==null||te>bt)&&(ie=Me-1,te=bt)}return ie}function la(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=tn(x,te).stateAfter;if(ie&&(!(ie instanceof Qr)||te+ie.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var ta=!1,ii=!1;function Et(){ta=!0}function wt(){ii=!0}function Gt(x,z,ne){this.marker=x,this.from=z,this.to=ne}function fn(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function On(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 Tr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ce=x[ie],ye=ce.marker,Me=ce.from==null||(ye.inclusiveLeft?ce.from<=z:ce.from<z);if(Me||ce.from==z&&ye.type=="bookmark"&&(!ne||!ce.marker.insertLeft)){var Pe=ce.to==null||(ye.inclusiveRight?ce.to>=z:ce.to>z);(te||(te=[])).push(new Gt(ye,ce.from,Pe?null:ce.to))}}return te}function Wr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ce=x[ie],ye=ce.marker,Me=ce.to==null||(ye.inclusiveRight?ce.to>=z:ce.to>z);if(Me||ce.from==z&&ye.type=="bookmark"&&(!ne||ce.marker.insertLeft)){var Pe=ce.from==null||(ye.inclusiveLeft?ce.from<=z:ce.from<z);(te||(te=[])).push(new Gt(ye,Pe?null:ce.from-z,ce.to==null?null:ce.to-z))}}return te}function Gr(x,z){if(z.full)return null;var ne=dr(x,z.from.line)&&tn(x,z.from.line).markedSpans,te=dr(x,z.to.line)&&tn(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ie=z.from.ch,ce=z.to.ch,ye=Ct(z.from,z.to)==0,Me=Tr(ne,ie,ye),Pe=Wr(te,ce,ye),Ne=z.text.length==1,bt=Ht(z.text).length+(Ne?ie:0);if(Me)for(var It=0;It<Me.length;++It){var hn=Me[It];if(hn.to==null){var rn=fn(Pe,hn.marker);rn?Ne&&(hn.to=rn.to==null?null:rn.to+bt):hn.to=ie}}if(Pe)for(var Qn=0;Qn<Pe.length;++Qn){var vr=Pe[Qn];if(vr.to!=null&&(vr.to+=bt),vr.from==null){var Br=fn(Me,vr.marker);Br||(vr.from=bt,Ne&&(Me||(Me=[])).push(vr))}else vr.from+=bt,Ne&&(Me||(Me=[])).push(vr)}Me&&(Me=Hr(Me)),Pe&&Pe!=Me&&(Pe=Hr(Pe));var Xr=[Me];if(!Ne){var ai=z.text.length-2,Zr;if(ai>0&&Me)for(var oi=0;oi<Me.length;++oi)Me[oi].to==null&&(Zr||(Zr=[])).push(new Gt(Me[oi].marker,null,null));for(var Ki=0;Ki<ai;++Ki)Xr.push(Zr);Xr.push(Pe)}return Xr}function Hr(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 ni(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(rn){if(rn.markedSpans)for(var Qn=0;Qn<rn.markedSpans.length;++Qn){var vr=rn.markedSpans[Qn].marker;vr.readOnly&&(!te||Bt(te,vr)==-1)&&(te||(te=[])).push(vr)}}),!te)return null;for(var ie=[{from:z,to:ne}],ce=0;ce<te.length;++ce)for(var ye=te[ce],Me=ye.find(0),Pe=0;Pe<ie.length;++Pe){var Ne=ie[Pe];if(!(Ct(Ne.to,Me.from)<0||Ct(Ne.from,Me.to)>0)){var bt=[Pe,1],It=Ct(Ne.from,Me.from),hn=Ct(Ne.to,Me.to);(It<0||!ye.inclusiveLeft&&!It)&&bt.push({from:Ne.from,to:Me.from}),(hn>0||!ye.inclusiveRight&&!hn)&&bt.push({from:Me.to,to:Ne.to}),ie.splice.apply(ie,bt),Pe+=bt.length-3}}return ie}function yi(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function Lr(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function pi(x){return x.inclusiveLeft?-1:0}function Ti(x){return x.inclusiveRight?1:0}function Mi(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ie=z.find(),ce=Ct(te.from,ie.from)||pi(x)-pi(z);if(ce)return-ce;var ye=Ct(te.to,ie.to)||Ti(x)-Ti(z);return ye||z.id-x.id}function Ie(x,z){var ne=ii&&x.markedSpans,te;if(ne)for(var ie=void 0,ce=0;ce<ne.length;++ce)ie=ne[ce],ie.marker.collapsed&&(z?ie.from:ie.to)==null&&(!te||Mi(te,ie.marker)<0)&&(te=ie.marker);return te}function Fe(x){return Ie(x,!0)}function ze(x){return Ie(x,!1)}function je(x,z){var ne=ii&&x.markedSpans,te;if(ne)for(var ie=0;ie<ne.length;++ie){var ce=ne[ie];ce.marker.collapsed&&(ce.from==null||ce.from<z)&&(ce.to==null||ce.to>z)&&(!te||Mi(te,ce.marker)<0)&&(te=ce.marker)}return te}function tt(x,z,ne,te,ie){var ce=tn(x,z),ye=ii&&ce.markedSpans;if(ye)for(var Me=0;Me<ye.length;++Me){var Pe=ye[Me];if(Pe.marker.collapsed){var Ne=Pe.marker.find(0),bt=Ct(Ne.from,ne)||pi(Pe.marker)-pi(ie),It=Ct(Ne.to,te)||Ti(Pe.marker)-Ti(ie);if(!(bt>=0&&It<=0||bt<=0&&It>=0)&&(bt<=0&&(Pe.marker.inclusiveRight&&ie.inclusiveLeft?Ct(Ne.to,ne)>=0:Ct(Ne.to,ne)>0)||bt>=0&&(Pe.marker.inclusiveRight&&ie.inclusiveLeft?Ct(Ne.from,te)<=0:Ct(Ne.from,te)<0)))return!0}}}function st(x){for(var z;z=Fe(x);)x=z.find(-1,!0).line;return x}function kt(x){for(var z;z=ze(x);)x=z.find(1,!0).line;return x}function nn(x){for(var z,ne;z=ze(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function sn(x,z){var ne=tn(x,z),te=st(ne);return ne==te?z:er(te)}function Jn(x,z){if(z>x.lastLine())return z;var ne=tn(x,z),te;if(!yr(x,ne))return z;for(;te=ze(ne);)ne=te.find(1,!0).line;return er(ne)+1}function yr(x,z){var ne=ii&&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&&Zn(x,z,te))return!0}}}function Zn(x,z,ne){if(ne.to==null){var te=ne.marker.find(1,!0);return Zn(x,te.line,fn(te.line.markedSpans,ne.marker))}if(ne.marker.inclusiveRight&&ne.to==z.text.length)return!0;for(var ie=void 0,ce=0;ce<z.markedSpans.length;++ce)if(ie=z.markedSpans[ce],ie.marker.collapsed&&!ie.marker.widgetNode&&ie.from==ne.to&&(ie.to==null||ie.to!=ne.from)&&(ie.marker.inclusiveLeft||ne.marker.inclusiveRight)&&Zn(x,z,ie))return!0}function Cn(x){x=st(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 ce=ne.parent;ce;ne=ce,ce=ne.parent)for(var ye=0;ye<ce.children.length;++ye){var Me=ce.children[ye];if(Me==ne)break;z+=Me.height}return z}function vn(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=Fe(te);){var ie=ne.find(0,!0);te=ie.from.line,z+=ie.from.ch-ie.to.ch}for(te=x;ne=ze(te);){var ce=ne.find(0,!0);z-=te.text.length-ce.from.ch,te=ce.to.line,z+=te.text.length-ce.to.ch}return z}function Pn(x){var z=x.display,ne=x.doc;z.maxLine=tn(ne,ne.first),z.maxLineLength=vn(z.maxLine),z.maxLineChanged=!0,ne.iter(function(te){var ie=vn(te);ie>z.maxLineLength&&(z.maxLineLength=ie,z.maxLine=te)})}var zn=function(x,z,ne){this.text=x,Lr(this,z),this.height=ne?ne(this):1};zn.prototype.lineNo=function(){return er(this)},tr(zn);function mr(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),yi(x),Lr(x,ne);var ie=te?te(x):1;ie!=x.height&&nr(x,ie)}function Yn(x){x.parent=null,yi(x)}var Xn={},rr={};function ir(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?rr:Xn;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function br(x,z){var ne=Pt("span",null,null,_e?"padding-right: .1px":null),te={pre:Pt("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 ce=ie?z.rest[ie-1]:z.line,ye=void 0;te.pos=0,te.addToken=Ke,ri(x.display.measure)&&(ye=xr(ce,x.doc.direction))&&(te.addToken=dt(te.addToken,ye)),te.map=[];var Me=z!=x.display.externalMeasured&&er(ce);un(ce,te,Ai(x,ce,Me)),ce.styleClasses&&(ce.styleClasses.bgClass&&(te.bgClass=it(ce.styleClasses.bgClass,te.bgClass||"")),ce.styleClasses.textClass&&(te.textClass=it(ce.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(Ni(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(_e){var Pe=te.content.lastChild;(/\bcm-tab\b/.test(Pe.className)||Pe.querySelector&&Pe.querySelector(".cm-tab"))&&(te.content.className="cm-tab-wrap-hack")}return rt(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=it(te.pre.className,te.textClass||"")),te}function Re(x){var z=mt("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function Ke(x,z,ne,te,ie,ce,ye){if(z){var Me=x.splitSpaces?Lt(z,x.trailingSpace):z,Pe=x.cm.state.specialChars,Ne=!1,bt;if(!Pe.test(z))x.col+=z.length,bt=document.createTextNode(Me),x.map.push(x.pos,x.pos+z.length,bt),ve&&Te<9&&(Ne=!0),x.pos+=z.length;else{bt=document.createDocumentFragment();for(var It=0;;){Pe.lastIndex=It;var hn=Pe.exec(z),rn=hn?hn.index-It:z.length-It;if(rn){var Qn=document.createTextNode(Me.slice(It,It+rn));ve&&Te<9?bt.appendChild(mt("span",[Qn])):bt.appendChild(Qn),x.map.push(x.pos,x.pos+rn,Qn),x.col+=rn,x.pos+=rn}if(!hn)break;It+=rn+1;var vr=void 0;if(hn[0]==" "){var Br=x.cm.options.tabSize,Xr=Br-x.col%Br;vr=bt.appendChild(mt("span",Zt(Xr),"cm-tab")),vr.setAttribute("role","presentation"),vr.setAttribute("cm-text"," "),x.col+=Xr}else hn[0]=="\r"||hn[0]==`
|
|
|
`?(vr=bt.appendChild(mt("span",hn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),vr.setAttribute("cm-text",hn[0]),x.col+=1):(vr=x.cm.options.specialCharPlaceholder(hn[0]),vr.setAttribute("cm-text",hn[0]),ve&&Te<9?bt.appendChild(mt("span",[vr])):bt.appendChild(vr),x.col+=1);x.map.push(x.pos,x.pos+1,vr),x.pos++}}if(x.trailingSpace=Me.charCodeAt(z.length-1)==32,ne||te||ie||Ne||ce||ye){var ai=ne||"";te&&(ai+=te),ie&&(ai+=ie);var Zr=mt("span",[bt],ai,ce);if(ye)for(var oi in ye)ye.hasOwnProperty(oi)&&oi!="style"&&oi!="class"&&Zr.setAttribute(oi,ye[oi]);return x.content.appendChild(Zr)}x.content.appendChild(bt)}}function Lt(x,z){if(x.length>1&&!/ /.test(x))return x;for(var ne=z,te="",ie=0;ie<x.length;ie++){var ce=x.charAt(ie);ce==" "&&ne&&(ie==x.length-1||x.charCodeAt(ie+1)==32)&&(ce="\xA0"),te+=ce,ne=ce==" "}return te}function dt(x,z){return function(ne,te,ie,ce,ye,Me,Pe){ie=ie?ie+" cm-force-border":"cm-force-border";for(var Ne=ne.pos,bt=Ne+te.length;;){for(var It=void 0,hn=0;hn<z.length&&(It=z[hn],!(It.to>Ne&&It.from<=Ne));hn++);if(It.to>=bt)return x(ne,te,ie,ce,ye,Me,Pe);x(ne,te.slice(0,It.to-Ne),ie,ce,null,Me,Pe),ce=null,te=te.slice(It.to-Ne),Ne=It.to}}}function Ut(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 un(x,z,ne){var te=x.markedSpans,ie=x.text,ce=0;if(!te){for(var ye=1;ye<ne.length;ye+=2)z.addToken(z,ie.slice(ce,ce=ne[ye]),ir(ne[ye+1],z.cm.options));return}for(var Me=ie.length,Pe=0,Ne=1,bt="",It,hn,rn=0,Qn,vr,Br,Xr,ai;;){if(rn==Pe){Qn=vr=Br=hn="",ai=null,Xr=null,rn=1/0;for(var Zr=[],oi=void 0,Ki=0;Ki<te.length;++Ki){var ji=te[Ki],ba=ji.marker;if(ba.type=="bookmark"&&ji.from==Pe&&ba.widgetNode)Zr.push(ba);else if(ji.from<=Pe&&(ji.to==null||ji.to>Pe||ba.collapsed&&ji.to==Pe&&ji.from==Pe)){if(ji.to!=null&&ji.to!=Pe&&rn>ji.to&&(rn=ji.to,vr=""),ba.className&&(Qn+=" "+ba.className),ba.css&&(hn=(hn?hn+";":"")+ba.css),ba.startStyle&&ji.from==Pe&&(Br+=" "+ba.startStyle),ba.endStyle&&ji.to==rn&&(oi||(oi=[])).push(ba.endStyle,ji.to),ba.title&&((ai||(ai={})).title=ba.title),ba.attributes)for(var to in ba.attributes)(ai||(ai={}))[to]=ba.attributes[to];ba.collapsed&&(!Xr||Mi(Xr.marker,ba)<0)&&(Xr=ji)}else ji.from>Pe&&rn>ji.from&&(rn=ji.from)}if(oi)for(var Wo=0;Wo<oi.length;Wo+=2)oi[Wo+1]==rn&&(vr+=" "+oi[Wo]);if(!Xr||Xr.from==Pe)for(var bo=0;bo<Zr.length;++bo)Ut(z,0,Zr[bo]);if(Xr&&(Xr.from||0)==Pe){if(Ut(z,(Xr.to==null?Me+1:Xr.to)-Pe,Xr.marker,Xr.from==null),Xr.to==null)return;Xr.to==Pe&&(Xr=!1)}}if(Pe>=Me)break;for(var us=Math.min(Me,rn);;){if(bt){var ds=Pe+bt.length;if(!Xr){var Do=ds>us?bt.slice(0,us-Pe):bt;z.addToken(z,Do,It?It+Qn:Qn,Br,Pe+Do.length==rn?vr:"",hn,ai)}if(ds>=us){bt=bt.slice(us-Pe),Pe=us;break}Pe=ds,Br=""}bt=ie.slice(ce,ce=ne[Ne++]),It=ir(ne[Ne++],z.cm.options)}}}function bn(x,z,ne){this.line=z,this.rest=nn(z),this.size=this.rest?er(Ht(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=yr(x,z)}function Kn(x,z,ne){for(var te=[],ie,ce=z;ce<ne;ce=ie){var ye=new bn(x.doc,tn(x.doc,ce),ce);ie=ce+ye.size,te.push(ye)}return te}var Ln=null;function on(x){Ln?Ln.ops.push(x):x.ownsGroup=Ln={ops:[x],delayedCallbacks:[]}}function Hn(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 jn(x,z){var ne=x.ownsGroup;if(ne)try{Hn(ne)}finally{Ln=null,z(ne)}}var wr=null;function Wn(x,z){var ne=cr(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ie;Ln?ie=Ln.delayedCallbacks:wr?ie=wr:(ie=wr=[],setTimeout(Or,0));for(var ce=function(Me){ie.push(function(){return ne[Me].apply(null,te)})},ye=0;ye<ne.length;++ye)ce(ye)}}function Or(){var x=wr;wr=null;for(var z=0;z<x.length;++z)x[z]()}function Yr(x,z,ne,te){for(var ie=0;ie<z.changes.length;ie++){var ce=z.changes[ie];ce=="text"?zr(x,z):ce=="gutter"?ci(x,z,ne,te):ce=="class"?ei(x,z):ce=="widget"&&Fr(x,z,te)}z.changes=null}function $r(x){return x.node==x.text&&(x.node=mt("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),ve&&Te<8&&(x.node.style.zIndex=2)),x.node}function jr(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=$r(z);z.background=te.insertBefore(mt("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function Er(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):br(x,z)}function zr(x,z){var ne=z.text.className,te=Er(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,ei(x,z)):ne&&(z.text.className=ne)}function ei(x,z){jr(x,z),z.line.wrapClass?$r(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 ci(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=$r(z);z.gutterBackground=mt("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 ce=z.line.gutterMarkers;if(x.options.lineNumbers||ce){var ye=$r(z),Me=z.gutter=mt("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(Me),ye.insertBefore(Me,z.text),z.line.gutterClass&&(Me.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!ce||!ce["CodeMirror-linenumbers"])&&(z.lineNumber=Me.appendChild(mt("div",gt(x.options,ne),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),ce)for(var Pe=0;Pe<x.display.gutterSpecs.length;++Pe){var Ne=x.display.gutterSpecs[Pe].className,bt=ce.hasOwnProperty(Ne)&&ce[Ne];bt&&Me.appendChild(mt("div",[bt],"CodeMirror-gutter-elt","left: "+te.gutterLeft[Ne]+"px; width: "+te.gutterWidth[Ne]+"px"))}}}function Fr(x,z,ne){z.alignable&&(z.alignable=null);for(var te=xe("CodeMirror-linewidget"),ie=z.node.firstChild,ce=void 0;ie;ie=ce)ce=ie.nextSibling,te.test(ie.className)&&z.node.removeChild(ie);Oi(x,z,ne)}function fi(x,z,ne,te){var ie=Er(x,z);return z.text=z.node=ie.pre,ie.bgClass&&(z.bgClass=ie.bgClass),ie.textClass&&(z.textClass=ie.textClass),ei(x,z),ci(x,z,ne,te),Oi(x,z,te),z.node}function Oi(x,z,ne){if(na(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)na(x,z.rest[te],z,ne,!1)}function na(x,z,ne,te,ie){if(z.widgets)for(var ce=$r(ne),ye=0,Me=z.widgets;ye<Me.length;++ye){var Pe=Me[ye],Ne=mt("div",[Pe.node],"CodeMirror-linewidget"+(Pe.className?" "+Pe.className:""));Pe.handleMouseEvents||Ne.setAttribute("cm-ignore-events","true"),Xi(Pe,Ne,ne,te),x.display.input.setUneditable(Ne),ie&&Pe.above?ce.insertBefore(Ne,ne.gutter||ne.text):ce.appendChild(Ne),Wn(Pe,"redraw")}}function Xi(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 Fi(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!Ft(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;"),St(z.display.measure,mt("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function Ji(x,z){for(var ne=Vr(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 Qi(x){return x.lineSpace.offsetTop}function wi(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function zi(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=St(x.measure,mt("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 Jr(x){return Dn-x.display.nativeBarWidth}function hi(x){return x.display.scroller.clientWidth-Jr(x)-x.display.barWidth}function Ii(x){return x.display.scroller.clientHeight-Jr(x)-x.display.barHeight}function Yi(x,z,ne){var te=x.options.lineWrapping,ie=te&&hi(x);if(!z.measure.heights||te&&z.measure.width!=ie){var ce=z.measure.heights=[];if(te){z.measure.width=ie;for(var ye=z.text.firstChild.getClientRects(),Me=0;Me<ye.length-1;Me++){var Pe=ye[Me],Ne=ye[Me+1];Math.abs(Pe.bottom-Ne.bottom)>2&&ce.push((Pe.bottom+Ne.top)/2-ne.top)}}ce.push(ne.bottom-ne.top)}}function Ba(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(er(x.rest[ie])>ne)return{map:x.measure.maps[ie],cache:x.measure.caches[ie],before:!0}}function $a(x,z){z=st(z);var ne=er(z),te=x.display.externalMeasured=new bn(x.doc,z,ne);te.lineN=ne;var ie=te.built=br(x,te);return te.text=ie.pre,St(x.display.lineMeasure,ie.pre),te}function Aa(x,z,ne,te){return Ei(x,ea(x,z),ne,te)}function ca(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[ra(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function ea(x,z){var ne=er(z),te=ca(x,ne);te&&!te.text?te=null:te&&te.changes&&(Yr(x,te,ne,ho(x)),x.curOp.forceUpdate=!0),te||(te=$a(x,z));var ie=Ba(te,z,ne);return{line:z,view:te,rect:null,map:ie.map,cache:ie.cache,before:ie.before,hasHeights:!1}}function Ei(x,z,ne,te,ie){z.before&&(ne=-1);var ce=ne+(te||""),ye;return z.cache.hasOwnProperty(ce)?ye=z.cache[ce]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(Yi(x,z.view,z.rect),z.hasHeights=!0),ye=Wi(x,z,ne,te),ye.bogus||(z.cache[ce]=ye)),{left:ye.left,right:ye.right,top:ie?ye.rtop:ye.top,bottom:ie?ye.rbottom:ye.bottom}}var Oa={left:0,right:0,top:0,bottom:0};function ki(x,z,ne){for(var te,ie,ce,ye,Me,Pe,Ne=0;Ne<x.length;Ne+=3)if(Me=x[Ne],Pe=x[Ne+1],z<Me?(ie=0,ce=1,ye="left"):z<Pe?(ie=z-Me,ce=ie+1):(Ne==x.length-3||z==Pe&&x[Ne+3]>z)&&(ce=Pe-Me,ie=ce-1,z>=Pe&&(ye="right")),ie!=null){if(te=x[Ne+2],Me==Pe&&ne==(te.insertLeft?"left":"right")&&(ye=ne),ne=="left"&&ie==0)for(;Ne&&x[Ne-2]==x[Ne-3]&&x[Ne-1].insertLeft;)te=x[(Ne-=3)+2],ye="left";if(ne=="right"&&ie==Pe-Me)for(;Ne<x.length-3&&x[Ne+3]==x[Ne+4]&&!x[Ne+5].insertLeft;)te=x[(Ne+=3)+2],ye="right";break}return{node:te,start:ie,end:ce,collapse:ye,coverStart:Me,coverEnd:Pe}}function ti(x,z){var ne=Oa;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 Wi(x,z,ne,te){var ie=ki(z.map,ne,te),ce=ie.node,ye=ie.start,Me=ie.end,Pe=ie.collapse,Ne;if(ce.nodeType==3){for(var bt=0;bt<4;bt++){for(;ye&&Ge(z.line.text.charAt(ie.coverStart+ye));)--ye;for(;ie.coverStart+Me<ie.coverEnd&&Ge(z.line.text.charAt(ie.coverStart+Me));)++Me;if(ve&&Te<9&&ye==0&&Me==ie.coverEnd-ie.coverStart?Ne=ce.parentNode.getBoundingClientRect():Ne=ti(Qe(ce,ye,Me).getClientRects(),te),Ne.left||Ne.right||ye==0)break;Me=ye,ye=ye-1,Pe="right"}ve&&Te<11&&(Ne=ua(x.display.measure,Ne))}else{ye>0&&(Pe=te="right");var It;x.options.lineWrapping&&(It=ce.getClientRects()).length>1?Ne=It[te=="right"?It.length-1:0]:Ne=ce.getBoundingClientRect()}if(ve&&Te<9&&!ye&&(!Ne||!Ne.left&&!Ne.right)){var hn=ce.parentNode.getClientRects()[0];hn?Ne={left:hn.left,right:hn.left+io(x.display),top:hn.top,bottom:hn.bottom}:Ne=Oa}for(var rn=Ne.top-z.rect.top,Qn=Ne.bottom-z.rect.top,vr=(rn+Qn)/2,Br=z.view.measure.heights,Xr=0;Xr<Br.length-1&&!(vr<Br[Xr]);Xr++);var ai=Xr?Br[Xr-1]:0,Zr=Br[Xr],oi={left:(Pe=="right"?Ne.right:Ne.left)-z.rect.left,right:(Pe=="left"?Ne.left:Ne.right)-z.rect.left,top:ai,bottom:Zr};return!Ne.left&&!Ne.right&&(oi.bogus=!0),x.options.singleCursorHeightPerLine||(oi.rtop=rn,oi.rbottom=Qn),oi}function ua(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!sr(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 Vi(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 aa(x){x.display.externalMeasure=null,Ze(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)Vi(x.display.view[z])}function mi(x){aa(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function pa(){return me&<?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function xa(){return me&<?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function fa(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=Fi(x.widgets[ne]));return z}function wa(x,z,ne,te,ie){if(!ie){var ce=fa(z);ne.top+=ce,ne.bottom+=ce}if(te=="line")return ne;te||(te="local");var ye=Cn(z);if(te=="local"?ye+=Qi(x.display):ye-=x.display.viewOffset,te=="page"||te=="window"){var Me=x.display.lineSpace.getBoundingClientRect();ye+=Me.top+(te=="window"?0:xa());var Pe=Me.left+(te=="window"?0:pa());ne.left+=Pe,ne.right+=Pe}return ne.top+=ye,ne.bottom+=ye,ne}function Ea(x,z,ne){if(ne=="div")return z;var te=z.left,ie=z.top;if(ne=="page")te-=pa(),ie-=xa();else if(ne=="local"||!ne){var ce=x.display.sizer.getBoundingClientRect();te+=ce.left,ie+=ce.top}var ye=x.display.lineSpace.getBoundingClientRect();return{left:te-ye.left,top:ie-ye.top}}function Za(x,z,ne,te,ie){return te||(te=tn(x.doc,z.line)),wa(x,te,Aa(x,te,z.ch,ie),ne)}function ha(x,z,ne,te,ie,ce){te=te||tn(x.doc,z.line),ie||(ie=ea(x,te));function ye(Qn,vr){var Br=Ei(x,ie,Qn,vr?"right":"left",ce);return vr?Br.left=Br.right:Br.right=Br.left,wa(x,te,Br,ne)}var Me=xr(te,x.doc.direction),Pe=z.ch,Ne=z.sticky;if(Pe>=te.text.length?(Pe=te.text.length,Ne="before"):Pe<=0&&(Pe=0,Ne="after"),!Me)return ye(Ne=="before"?Pe-1:Pe,Ne=="before");function bt(Qn,vr,Br){var Xr=Me[vr],ai=Xr.level==1;return ye(Br?Qn-1:Qn,ai!=Br)}var It=jt(Me,Pe,Ne),hn=qt,rn=bt(Pe,It,Ne=="before");return hn!=null&&(rn.other=bt(Pe,hn,Ne!="before")),rn}function ka(x,z){var ne=0;z=Fn(x.doc,z),x.options.lineWrapping||(ne=io(x.display)*z.ch);var te=tn(x.doc,z.line),ie=Cn(te)+Qi(x.display);return{left:ne,right:ne,top:ie,bottom:ie+te.height}}function Ja(x,z,ne,te,ie){var ce=ot(x,z,ne);return ce.xRel=ie,te&&(ce.outside=te),ce}function Ga(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return Ja(te.first,0,null,-1,-1);var ie=ur(te,ne),ce=te.first+te.size-1;if(ie>ce)return Ja(te.first+te.size-1,tn(te,ce).text.length,null,1,1);z<0&&(z=0);for(var ye=tn(te,ie);;){var Me=_i(x,ye,ie,z,ne),Pe=je(ye,Me.ch+(Me.xRel>0||Me.outside>0?1:0));if(!Pe)return Me;var Ne=Pe.find(1);if(Ne.line==ie)return Ne;ye=tn(te,ie=Ne.line)}}function so(x,z,ne,te){te-=fa(z);var ie=z.text.length,ce=Rt(function(ye){return Ei(x,ne,ye-1).bottom<=te},ie,0);return ie=Rt(function(ye){return Ei(x,ne,ye).top>te},ce,ie),{begin:ce,end:ie}}function Fa(x,z,ne,te){ne||(ne=ea(x,z));var ie=wa(x,z,Ei(x,ne,te),"line").top;return so(x,z,ne,ie)}function Ca(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function _i(x,z,ne,te,ie){ie-=Cn(z);var ce=ea(x,z),ye=fa(z),Me=0,Pe=z.text.length,Ne=!0,bt=xr(z,x.doc.direction);if(bt){var It=(x.options.lineWrapping?da:Ui)(x,z,ne,ce,bt,te,ie);Ne=It.level!=1,Me=Ne?It.from:It.to-1,Pe=Ne?It.to:It.from-1}var hn=null,rn=null,Qn=Rt(function(Ki){var ji=Ei(x,ce,Ki);return ji.top+=ye,ji.bottom+=ye,Ca(ji,te,ie,!1)?(ji.top<=ie&&ji.left<=te&&(hn=Ki,rn=ji),!0):!1},Me,Pe),vr,Br,Xr=!1;if(rn){var ai=te-rn.left<rn.right-te,Zr=ai==Ne;Qn=hn+(Zr?0:1),Br=Zr?"after":"before",vr=ai?rn.left:rn.right}else{!Ne&&(Qn==Pe||Qn==Me)&&Qn++,Br=Qn==0?"after":Qn==z.text.length?"before":Ei(x,ce,Qn-(Ne?1:0)).bottom+ye<=ie==Ne?"after":"before";var oi=ha(x,ot(ne,Qn,Br),"line",z,ce);vr=oi.left,Xr=ie<oi.top?-1:ie>=oi.bottom?1:0}return Qn=_t(z.text,Qn,1),Ja(ne,Qn,Br,Xr,te-vr)}function Ui(x,z,ne,te,ie,ce,ye){var Me=Rt(function(It){var hn=ie[It],rn=hn.level!=1;return Ca(ha(x,ot(ne,rn?hn.to:hn.from,rn?"before":"after"),"line",z,te),ce,ye,!0)},0,ie.length-1),Pe=ie[Me];if(Me>0){var Ne=Pe.level!=1,bt=ha(x,ot(ne,Ne?Pe.from:Pe.to,Ne?"after":"before"),"line",z,te);Ca(bt,ce,ye,!0)&&bt.top>ye&&(Pe=ie[Me-1])}return Pe}function da(x,z,ne,te,ie,ce,ye){var Me=so(x,z,te,ye),Pe=Me.begin,Ne=Me.end;/\s/.test(z.text.charAt(Ne-1))&&Ne--;for(var bt=null,It=null,hn=0;hn<ie.length;hn++){var rn=ie[hn];if(!(rn.from>=Ne||rn.to<=Pe)){var Qn=rn.level!=1,vr=Ei(x,te,Qn?Math.min(Ne,rn.to)-1:Math.max(Pe,rn.from)).right,Br=vr<ce?ce-vr+1e9:vr-ce;(!bt||It>Br)&&(bt=rn,It=Br)}}return bt||(bt=ie[ie.length-1]),bt.from<Pe&&(bt={from:Pe,to:bt.to,level:bt.level}),bt.to>Ne&&(bt={from:bt.from,to:Ne,level:bt.level}),bt}var Sa;function Ka(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(Sa==null){Sa=mt("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)Sa.appendChild(document.createTextNode("x")),Sa.appendChild(mt("br"));Sa.appendChild(document.createTextNode("x"))}St(x.measure,Sa);var ne=Sa.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),Ze(x.measure),ne||1}function io(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=mt("span","xxxxxxxxxx"),ne=mt("pre",[z],"CodeMirror-line-like");St(x.measure,ne);var te=z.getBoundingClientRect(),ie=(te.right-te.left)/10;return ie>2&&(x.cachedCharWidth=ie),ie||10}function ho(x){for(var z=x.display,ne={},te={},ie=z.gutters.clientLeft,ce=z.gutters.firstChild,ye=0;ce;ce=ce.nextSibling,++ye){var Me=x.display.gutterSpecs[ye].className;ne[Me]=ce.offsetLeft+ce.clientLeft+ie,te[Me]=ce.clientWidth}return{fixedPos:Oo(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function Oo(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function Ro(x){var z=Ka(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/io(x.display)-3);return function(ie){if(yr(x.doc,ie))return 0;var ce=0;if(ie.widgets)for(var ye=0;ye<ie.widgets.length;ye++)ie.widgets[ye].height&&(ce+=ie.widgets[ye].height);return ne?ce+(Math.ceil(ie.text.length/te)||1)*z:ce+z}}function lo(x){var z=x.doc,ne=Ro(x);z.iter(function(te){var ie=ne(te);ie!=te.height&&nr(te,ie)})}function Ao(x,z,ne,te){var ie=x.display;if(!ne&&Vr(z).getAttribute("cm-not-content")=="true")return null;var ce,ye,Me=ie.lineSpace.getBoundingClientRect();try{ce=z.clientX-Me.left,ye=z.clientY-Me.top}catch(It){return null}var Pe=Ga(x,ce,ye),Ne;if(te&&Pe.xRel>0&&(Ne=tn(x.doc,Pe.line).text).length==Pe.ch){var bt=Ve(Ne,Ne.length,x.options.tabSize)-Ne.length;Pe=ot(Pe.line,Math.max(0,Math.round((ce-zi(x.display).left)/io(x.display))-bt))}return Pe}function ra(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 Ri(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)ii&&sn(x.doc,z)<ie.viewTo&&_a(x);else if(ne<=ie.viewFrom)ii&&Jn(x.doc,ne+te)>ie.viewFrom?_a(x):(ie.viewFrom+=te,ie.viewTo+=te);else if(z<=ie.viewFrom&&ne>=ie.viewTo)_a(x);else if(z<=ie.viewFrom){var ce=co(x,ne,ne+te,1);ce?(ie.view=ie.view.slice(ce.index),ie.viewFrom=ce.lineN,ie.viewTo+=te):_a(x)}else if(ne>=ie.viewTo){var ye=co(x,z,z,-1);ye?(ie.view=ie.view.slice(0,ye.index),ie.viewTo=ye.lineN):_a(x)}else{var Me=co(x,z,z,-1),Pe=co(x,ne,ne+te,1);Me&&Pe?(ie.view=ie.view.slice(0,Me.index).concat(Kn(x,Me.lineN,Pe.lineN)).concat(ie.view.slice(Pe.index)),ie.viewTo+=te):_a(x)}var Ne=ie.externalMeasured;Ne&&(ne<Ne.lineN?Ne.lineN+=te:z<Ne.lineN+Ne.size&&(ie.externalMeasured=null))}function Ta(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 ce=te.view[ra(x,z)];if(ce.node!=null){var ye=ce.changes||(ce.changes=[]);Bt(ye,ne)==-1&&ye.push(ne)}}}function _a(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function co(x,z,ne,te){var ie=ra(x,z),ce,ye=x.display.view;if(!ii||ne==x.doc.first+x.doc.size)return{index:ie,lineN:ne};for(var Me=x.display.viewFrom,Pe=0;Pe<ie;Pe++)Me+=ye[Pe].size;if(Me!=z){if(te>0){if(ie==ye.length-1)return null;ce=Me+ye[ie].size-z,ie++}else ce=Me-z;z+=ce,ne+=ce}for(;sn(x.doc,ne)!=ne;){if(ie==(te<0?0:ye.length-1))return null;ne+=te*ye[ie-(te<0?1:0)].size,ie+=te}return{index:ie,lineN:ne}}function ao(x,z,ne){var te=x.display,ie=te.view;ie.length==0||z>=te.viewTo||ne<=te.viewFrom?(te.view=Kn(x,z,ne),te.viewFrom=z):(te.viewFrom>z?te.view=Kn(x,z,te.viewFrom).concat(te.view):te.viewFrom<z&&(te.view=te.view.slice(ra(x,z))),te.viewFrom=z,te.viewTo<ne?te.view=te.view.concat(Kn(x,te.viewTo,ne)):te.viewTo>ne&&(te.view=te.view.slice(0,ra(x,ne)))),te.viewTo=ne}function hs(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 Qo(x){x.display.input.showSelection(x.display.input.prepareSelection())}function ps(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ie=te.cursors=document.createDocumentFragment(),ce=te.selection=document.createDocumentFragment(),ye=0;ye<ne.sel.ranges.length;ye++)if(!(!z&&ye==ne.sel.primIndex)){var Me=ne.sel.ranges[ye];if(!(Me.from().line>=x.display.viewTo||Me.to().line<x.display.viewFrom)){var Pe=Me.empty();(Pe||x.options.showCursorWhenSelecting)&&oa(x,Me.head,ie),Pe||Si(x,Me,ce)}}return te}function oa(x,z,ne){var te=ha(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),ie=ne.appendChild(mt("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 ce=ne.appendChild(mt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ce.style.display="",ce.style.left=te.other.left+"px",ce.style.top=te.other.top+"px",ce.style.height=(te.other.bottom-te.other.top)*.85+"px"}}function Nr(x,z){return x.top-z.top||x.left-z.left}function Si(x,z,ne){var te=x.display,ie=x.doc,ce=document.createDocumentFragment(),ye=zi(x.display),Me=ye.left,Pe=Math.max(te.sizerWidth,hi(x)-te.sizer.offsetLeft)-ye.right,Ne=ie.direction=="ltr";function bt(Zr,oi,Ki,ji){oi<0&&(oi=0),oi=Math.round(oi),ji=Math.round(ji),ce.appendChild(mt("div",null,"CodeMirror-selected","position: absolute; left: "+Zr+`px;
|
|
|
top: `+oi+"px; width: "+(Ki==null?Pe-Zr:Ki)+`px;
|
|
|
height: `+(ji-oi)+"px"))}function It(Zr,oi,Ki){var ji=tn(ie,Zr),ba=ji.text.length,to,Wo;function bo(Do,fs){return Za(x,ot(Zr,Do),"div",ji,fs)}function us(Do,fs,sa){var So=Fa(x,ji,null,Do),xo=fs=="ltr"==(sa=="after")?"left":"right",Co=sa=="after"?So.begin:So.end-(/\s/.test(ji.text.charAt(So.end-1))?2:1);return bo(Co,xo)[xo]}var ds=xr(ji,ie.direction);return zt(ds,oi||0,Ki==null?ba:Ki,function(Do,fs,sa,So){var xo=sa=="ltr",Co=bo(Do,xo?"left":"right"),ko=bo(fs-1,xo?"right":"left"),Wl=oi==null&&Do==0,ys=Ki==null&&fs==ba,Go=So==0,Wa=!ds||So==ds.length-1;if(ko.top-Co.top<=3){var Bo=(Ne?Wl:ys)&&Go,Eu=(Ne?ys:Wl)&&Wa,sl=Bo?Me:(xo?Co:ko).left,xl=Eu?Pe:(xo?ko:Co).right;bt(sl,Co.top,xl-sl,Co.bottom)}else{var Zs,Po,Ul,Xo;xo?(Zs=Ne&&Wl&&Go?Me:Co.left,Po=Ne?Pe:us(Do,sa,"before"),Ul=Ne?Me:us(fs,sa,"after"),Xo=Ne&&ys&&Wa?Pe:ko.right):(Zs=Ne?us(Do,sa,"before"):Me,Po=!Ne&&Wl&&Go?Pe:Co.right,Ul=!Ne&&ys&&Wa?Me:ko.left,Xo=Ne?us(fs,sa,"after"):Pe),bt(Zs,Co.top,Po-Zs,Co.bottom),Co.bottom<ko.top&&bt(Me,Co.bottom,null,ko.top),bt(Ul,ko.top,Xo-Ul,ko.bottom)}(!to||Nr(Co,to)<0)&&(to=Co),Nr(ko,to)<0&&(to=ko),(!Wo||Nr(Co,Wo)<0)&&(Wo=Co),Nr(ko,Wo)<0&&(Wo=ko)}),{start:to,end:Wo}}var hn=z.from(),rn=z.to();if(hn.line==rn.line)It(hn.line,hn.ch,rn.ch);else{var Qn=tn(ie,hn.line),vr=tn(ie,rn.line),Br=st(Qn)==st(vr),Xr=It(hn.line,hn.ch,Br?Qn.text.length+1:null).end,ai=It(rn.line,Br?0:null,rn.ch).start;Br&&(Xr.top<ai.top-2?(bt(Xr.right,Xr.top,null,Xr.bottom),bt(Me,ai.top,ai.left,ai.bottom)):bt(Xr.right,Xr.top,ai.left-Xr.right,Xr.bottom)),Xr.bottom<ai.top&&bt(Me,Xr.bottom,null,ai.top)}ne.appendChild(ce)}function Ci(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()||Fo(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function Di(x){x.state.focused||(x.display.input.focus(),Va(x))}function Ha(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,Fo(x))},100)}function Va(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(rt(x,"focus",x,z),x.state.focused=!0,an(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),_e&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),Ci(x))}function Fo(x,z){x.state.delayingBlurEvent||(x.state.focused&&(rt(x,"blur",x,z),x.state.focused=!1,Ue(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function Uo(x){for(var z=x.display,ne=z.lineDiv.offsetTop,te=0;te<z.view.length;te++){var ie=z.view[te],ce=x.options.lineWrapping,ye=void 0,Me=0;if(!ie.hidden){if(ve&&Te<8){var Pe=ie.node.offsetTop+ie.node.offsetHeight;ye=Pe-ne,ne=Pe}else{var Ne=ie.node.getBoundingClientRect();ye=Ne.bottom-Ne.top,!ce&&ie.text.firstChild&&(Me=ie.text.firstChild.getBoundingClientRect().right-Ne.left-1)}var bt=ie.line.height-ye;if((bt>.005||bt<-.005)&&(nr(ie.line,ye),ls(ie.line),ie.rest))for(var It=0;It<ie.rest.length;It++)ls(ie.rest[It]);if(Me>x.display.sizerWidth){var hn=Math.ceil(Me/io(x.display));hn>x.display.maxLineLength&&(x.display.maxLineLength=hn,x.display.maxLine=ie.line,x.display.maxLineChanged=!0)}}}}function ls(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 va(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-Qi(x));var ie=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,ce=ur(z,te),ye=ur(z,ie);if(ne&&ne.ensure){var Me=ne.ensure.from.line,Pe=ne.ensure.to.line;Me<ce?(ce=Me,ye=ur(z,Cn(tn(z,Me))+x.wrapper.clientHeight)):Math.min(Pe,z.lastLine())>=ye&&(ce=ur(z,Cn(tn(z,Pe))-x.wrapper.clientHeight),ye=Pe)}return{from:ce,to:Math.max(ye,ce+1)}}function No(x,z){if(!Kt(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&&!Mt){var ce=mt("div","\u200B",null,`position: absolute;
|
|
|
top: `+(z.top-ne.viewOffset-Qi(x.display))+`px;
|
|
|
height: `+(z.bottom-z.top+Jr(x)+ne.barHeight)+`px;
|
|
|
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(ce),ce.scrollIntoView(ie),x.display.lineSpace.removeChild(ce)}}}function cs(x,z,ne,te){te==null&&(te=0);var ie;!x.options.lineWrapping&&z==ne&&(z=z.ch?ot(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?ot(z.line,z.ch+1,"before"):z);for(var ce=0;ce<5;ce++){var ye=!1,Me=ha(x,z),Pe=!ne||ne==z?Me:ha(x,ne);ie={left:Math.min(Me.left,Pe.left),top:Math.min(Me.top,Pe.top)-te,right:Math.max(Me.left,Pe.left),bottom:Math.max(Me.bottom,Pe.bottom)+te};var Ne=As(x,ie),bt=x.doc.scrollTop,It=x.doc.scrollLeft;if(Ne.scrollTop!=null&&(Ia(x,Ne.scrollTop),Math.abs(x.doc.scrollTop-bt)>1&&(ye=!0)),Ne.scrollLeft!=null&&(go(x,Ne.scrollLeft),Math.abs(x.doc.scrollLeft-It)>1&&(ye=!0)),!ye)break}return ie}function ul(x,z){var ne=As(x,z);ne.scrollTop!=null&&Ia(x,ne.scrollTop),ne.scrollLeft!=null&&go(x,ne.scrollLeft)}function As(x,z){var ne=x.display,te=Ka(x.display);z.top<0&&(z.top=0);var ie=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,ce=Ii(x),ye={};z.bottom-z.top>ce&&(z.bottom=z.top+ce);var Me=x.doc.height+wi(ne),Pe=z.top<te,Ne=z.bottom>Me-te;if(z.top<ie)ye.scrollTop=Pe?0:z.top;else if(z.bottom>ie+ce){var bt=Math.min(z.top,(Ne?Me:z.bottom)-ce);bt!=ie&&(ye.scrollTop=bt)}var It=x.options.fixedGutter?0:ne.gutters.offsetWidth,hn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-It,rn=hi(x)-ne.gutters.offsetWidth,Qn=z.right-z.left>rn;return Qn&&(z.right=z.left+rn),z.left<10?ye.scrollLeft=0:z.left<hn?ye.scrollLeft=Math.max(0,z.left+It-(Qn?0:10)):z.right>rn+hn-3&&(ye.scrollLeft=z.right+(Qn?0:10)-rn),ye}function ms(x,z){z!=null&&(qs(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function zo(x){qs(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function Ts(x,z,ne){(z!=null||ne!=null)&&qs(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function Is(x,z){qs(x),x.curOp.scrollToPos=z}function qs(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=ka(x,z.from),te=ka(x,z.to);oo(x,ne,te,z.margin)}}function oo(x,z,ne,te){var ie=As(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});Ts(x,ie.scrollLeft,ie.scrollTop)}function Ia(x,z){Math.abs(x.doc.scrollTop-z)<2||(fe||qc(x,{top:z}),Xa(x,z,!0),fe&&qc(x),is(x,100))}function Xa(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 go(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,Zu(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function yo(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+wi(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+Jr(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var Ko=function(x,z,ne){this.cm=ne;var te=this.vert=mt("div",[mt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ie=this.horiz=mt("div",[mt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");te.tabIndex=ie.tabIndex=-1,x(te),x(ie),pn(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),pn(ie,"scroll",function(){ie.clientWidth&&z(ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ve&&Te<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ko.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 ce=x.viewWidth-x.barLeft-(ne?te:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+ce)+"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}},Ko.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ko.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ko.prototype.zeroWidthHack=function(){var x=Ee&&!Oe?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Le,this.disableVert=new Le},Ko.prototype.enableZeroWidthBar=function(x,z,ne){x.style.pointerEvents="auto";function te(){var ie=x.getBoundingClientRect(),ce=ne=="vert"?document.elementFromPoint(ie.right-1,(ie.top+ie.bottom)/2):document.elementFromPoint((ie.right+ie.left)/2,ie.bottom-1);ce!=x?x.style.pointerEvents="none":z.set(1e3,te)}z.set(1e3,te)},Ko.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var wo=function(){};wo.prototype.update=function(){return{bottom:0,right:0}},wo.prototype.setScrollLeft=function(){},wo.prototype.setScrollTop=function(){},wo.prototype.clear=function(){};function xs(x,z){z||(z=yo(x));var ne=x.display.barWidth,te=x.display.barHeight;Xl(x,z);for(var ie=0;ie<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ie++)ne!=x.display.barWidth&&x.options.lineWrapping&&Uo(x),Xl(x,yo(x)),ne=x.display.barWidth,te=x.display.barHeight}function Xl(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 Yl={native:Ko,null:wo};function vc(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&Ue(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new Yl[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),pn(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"?go(x,z):Ia(x,z)},x),x.display.scrollbars.addClass&&an(x.display.wrapper,x.display.scrollbars.addClass)}var Xc=0;function Ks(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:++Xc},on(x.curOp)}function Ds(x){var z=x.curOp;z&&jn(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;yc(ne)})}function yc(x){for(var z=x.ops,ne=0;ne<z.length;ne++)ql(z[ne]);for(var te=0;te<z.length;te++)Da(z[te]);for(var ie=0;ie<z.length;ie++)ma(z[ie]);for(var ce=0;ce<z.length;ce++)Ho(z[ce]);for(var ye=0;ye<z.length;ye++)es(z[ye])}function ql(x){var z=x.cm,ne=z.display;Jl(z),x.updateMaxLine&&Pn(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 gs(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function Da(x){x.updatedDisplay=x.mustUpdate&&Yc(x.cm,x.update)}function ma(x){var z=x.cm,ne=z.display;x.updatedDisplay&&Uo(z),x.barMeasure=yo(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=Aa(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+Jr(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-hi(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Ho(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&go(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==Dt();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&xs(z,x.barMeasure),x.updatedDisplay&&Qc(z,x.barMeasure),x.selectionChanged&&Ci(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&Di(x.cm)}function es(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&ju(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&Xa(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&go(z,x.scrollLeft,!0,!0),x.scrollToPos){var ie=cs(z,Fn(te,x.scrollToPos.from),Fn(te,x.scrollToPos.to),x.scrollToPos.margin);No(z,ie)}var ce=x.maybeHiddenMarkers,ye=x.maybeUnhiddenMarkers;if(ce)for(var Me=0;Me<ce.length;++Me)ce[Me].lines.length||rt(ce[Me],"hide");if(ye)for(var Pe=0;Pe<ye.length;++Pe)ye[Pe].lines.length&&rt(ye[Pe],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&rt(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function ga(x,z){if(x.curOp)return z();Ks(x);try{return z()}finally{Ds(x)}}function za(x,z){return function(){if(x.curOp)return z.apply(x,arguments);Ks(x);try{return z.apply(x,arguments)}finally{Ds(x)}}}function Ra(x){return function(){if(this.curOp)return x.apply(this,arguments);Ks(this);try{return x.apply(this,arguments)}finally{Ds(this)}}}function po(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);Ks(z);try{return x.apply(this,arguments)}finally{Ds(z)}}}function is(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,_n(Hs,x))}function Hs(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=gi(x,z.highlightFrontier),ie=[];z.iter(te.line,Math.min(z.first+z.size,x.display.viewTo+500),function(ce){if(te.line>=x.display.viewFrom){var ye=ce.styles,Me=ce.text.length>x.options.maxHighlightLength?pt(z.mode,te.state):null,Pe=Bi(x,ce,te,!0);Me&&(te.state=Me),ce.styles=Pe.styles;var Ne=ce.styleClasses,bt=Pe.classes;bt?ce.styleClasses=bt:Ne&&(ce.styleClasses=null);for(var It=!ye||ye.length!=ce.styles.length||Ne!=bt&&(!Ne||!bt||Ne.bgClass!=bt.bgClass||Ne.textClass!=bt.textClass),hn=0;!It&&hn<ye.length;++hn)It=ye[hn]!=ce.styles[hn];It&&ie.push(te.line),ce.stateAfter=te.save(),te.nextLine()}else ce.text.length<=x.options.maxHighlightLength&&qi(x,ce.text,te),ce.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return is(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ie.length&&ga(x,function(){for(var ce=0;ce<ie.length;ce++)Ta(x,ie[ce],"text")})}}var gs=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=va(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=hi(x),this.force=ne,this.dims=ho(x),this.events=[]};gs.prototype.signal=function(x,z){Gn(x,z)&&this.events.push(arguments)},gs.prototype.finish=function(){for(var x=0;x<this.events.length;x++)rt.apply(null,this.events[x])};function Jl(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=Jr(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=Jr(x)+"px",z.scrollbarsClipped=!0)}function jd(x){if(x.hasFocus())return null;var z=Dt();if(!z||!Ft(x.display.lineDiv,z))return null;var ne={activeElt:z};if(window.getSelection){var te=window.getSelection();te.anchorNode&&te.extend&&Ft(x.display.lineDiv,te.anchorNode)&&(ne.anchorNode=te.anchorNode,ne.anchorOffset=te.anchorOffset,ne.focusNode=te.focusNode,ne.focusOffset=te.focusOffset)}return ne}function Zd(x){if(!(!x||!x.activeElt||x.activeElt==Dt())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&Ft(document.body,x.anchorNode)&&Ft(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 Yc(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return _a(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&&hs(x)==0)return!1;bc(x)&&(_a(x),z.dims=ho(x));var ie=te.first+te.size,ce=Math.max(z.visible.from-x.options.viewportMargin,te.first),ye=Math.min(ie,z.visible.to+x.options.viewportMargin);ne.viewFrom<ce&&ce-ne.viewFrom<20&&(ce=Math.max(te.first,ne.viewFrom)),ne.viewTo>ye&&ne.viewTo-ye<20&&(ye=Math.min(ie,ne.viewTo)),ii&&(ce=sn(x.doc,ce),ye=Jn(x.doc,ye));var Me=ce!=ne.viewFrom||ye!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;ao(x,ce,ye),ne.viewOffset=Cn(tn(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var Pe=hs(x);if(!Me&&Pe==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var Ne=jd(x);return Pe>4&&(ne.lineDiv.style.display="none"),Vd(x,ne.updateLineNumbers,z.dims),Pe>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,Zd(Ne),Ze(ne.cursorDiv),Ze(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,Me&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,is(x,400)),ne.updateLineNumbers=null,!0}function ju(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==hi(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+wi(x.display)-Ii(x),ne.top)}),z.visible=va(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=va(x.display,x.doc,ne));if(!Yc(x,z))break;Uo(x);var ie=yo(x);Qo(x),xs(x,ie),Qc(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 qc(x,z){var ne=new gs(x,z);if(Yc(x,ne)){Uo(x),ju(x,ne);var te=yo(x);Qo(x),xs(x,te),Qc(x,te),ne.finish()}}function Vd(x,z,ne){var te=x.display,ie=x.options.lineNumbers,ce=te.lineDiv,ye=ce.firstChild;function Me(Qn){var vr=Qn.nextSibling;return _e&&Ee&&x.display.currentWheelTarget==Qn?Qn.style.display="none":Qn.parentNode.removeChild(Qn),vr}for(var Pe=te.view,Ne=te.viewFrom,bt=0;bt<Pe.length;bt++){var It=Pe[bt];if(!It.hidden)if(!It.node||It.node.parentNode!=ce){var hn=fi(x,It,Ne,ne);ce.insertBefore(hn,ye)}else{for(;ye!=It.node;)ye=Me(ye);var rn=ie&&z!=null&&z<=Ne&&It.lineNumber;It.changes&&(Bt(It.changes,"gutter")>-1&&(rn=!1),Yr(x,It,Ne,ne)),rn&&(Ze(It.lineNumber),It.lineNumber.appendChild(document.createTextNode(gt(x.options,Ne)))),ye=It.node.nextSibling}Ne+=It.size}for(;ye;)ye=Me(ye)}function Jc(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Qc(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+Jr(x)+"px"}function Zu(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=Oo(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ie=z.gutters.offsetWidth,ce=te+"px",ye=0;ye<ne.length;ye++)if(!ne[ye].hidden){x.options.fixedGutter&&(ne[ye].gutter&&(ne[ye].gutter.style.left=ce),ne[ye].gutterBackground&&(ne[ye].gutterBackground.style.left=ce));var Me=ne[ye].alignable;if(Me)for(var Pe=0;Pe<Me.length;Pe++)Me[Pe].style.left=ce}x.options.fixedGutter&&(z.gutters.style.left=te+ie+"px")}}function bc(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=gt(x.options,z.first+z.size-1),te=x.display;if(ne.length!=te.lineNumChars){var ie=te.measure.appendChild(mt("div",[mt("div",ne)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ce=ie.firstChild.offsetWidth,ye=ie.offsetWidth-ce;return te.lineGutter.style.width="",te.lineNumInnerWidth=Math.max(ce,te.lineGutter.offsetWidth-ye)+1,te.lineNumWidth=te.lineNumInnerWidth+ye,te.lineNumChars=te.lineNumInnerWidth?ne.length:-1,te.lineGutter.style.width=te.lineNumWidth+"px",Jc(x.display),!0}return!1}function eu(x,z){for(var ne=[],te=!1,ie=0;ie<x.length;ie++){var ce=x[ie],ye=null;if(typeof ce!="string"&&(ye=ce.style,ce=ce.className),ce=="CodeMirror-linenumbers")if(z)te=!0;else continue;ne.push({className:ce,style:ye})}return z&&!te&&ne.push({className:"CodeMirror-linenumbers",style:null}),ne}function Vu(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],ce=ie.className,ye=ie.style,Me=z.appendChild(mt("div",null,"CodeMirror-gutter "+ce));ye&&(Me.style.cssText=ye),ce=="CodeMirror-linenumbers"&&(x.lineGutter=Me,Me.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",Jc(x)}function Ql(x){Vu(x.display),Ri(x),Zu(x)}function Gd(x,z,ne,te){var ie=this;this.input=ne,ie.scrollbarFiller=mt("div",null,"CodeMirror-scrollbar-filler"),ie.scrollbarFiller.setAttribute("cm-not-content","true"),ie.gutterFiller=mt("div",null,"CodeMirror-gutter-filler"),ie.gutterFiller.setAttribute("cm-not-content","true"),ie.lineDiv=Pt("div",null,"CodeMirror-code"),ie.selectionDiv=mt("div",null,null,"position: relative; z-index: 1"),ie.cursorDiv=mt("div",null,"CodeMirror-cursors"),ie.measure=mt("div",null,"CodeMirror-measure"),ie.lineMeasure=mt("div",null,"CodeMirror-measure"),ie.lineSpace=Pt("div",[ie.measure,ie.lineMeasure,ie.selectionDiv,ie.cursorDiv,ie.lineDiv],null,"position: relative; outline: none");var ce=Pt("div",[ie.lineSpace],"CodeMirror-lines");ie.mover=mt("div",[ce],null,"position: relative"),ie.sizer=mt("div",[ie.mover],"CodeMirror-sizer"),ie.sizerWidth=null,ie.heightForcer=mt("div",null,null,"position: absolute; height: "+Dn+"px; width: 1px;"),ie.gutters=mt("div",null,"CodeMirror-gutters"),ie.lineGutter=null,ie.scroller=mt("div",[ie.sizer,ie.heightForcer,ie.gutters],"CodeMirror-scroll"),ie.scroller.setAttribute("tabIndex","-1"),ie.wrapper=mt("div",[ie.scrollbarFiller,ie.gutterFiller,ie.scroller],"CodeMirror"),ve&&Te<8&&(ie.gutters.style.zIndex=-1,ie.scroller.style.paddingRight=0),!_e&&!(fe&&et)&&(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=eu(te.gutters,te.lineNumbers),Vu(ie),ne.init(ie)}var xc=0,jo=null;ve?jo=-.53:fe?jo=15:me?jo=-.7:at&&(jo=-1/3);function Pl(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 Gu(x){var z=Pl(x);return z.x*=jo,z.y*=jo,z}function Xu(x,z){var ne=Pl(z),te=ne.x,ie=ne.y,ce=x.display,ye=ce.scroller,Me=ye.scrollWidth>ye.clientWidth,Pe=ye.scrollHeight>ye.clientHeight;if(te&&Me||ie&&Pe){if(ie&&Ee&&_e){e:for(var Ne=z.target,bt=ce.view;Ne!=ye;Ne=Ne.parentNode)for(var It=0;It<bt.length;It++)if(bt[It].node==Ne){x.display.currentWheelTarget=Ne;break e}}if(te&&!fe&&!De&&jo!=null){ie&&Pe&&Ia(x,Math.max(0,ye.scrollTop+ie*jo)),go(x,Math.max(0,ye.scrollLeft+te*jo)),(!ie||ie&&Pe)&&Sr(z),ce.wheelStartX=null;return}if(ie&&jo!=null){var hn=ie*jo,rn=x.doc.scrollTop,Qn=rn+ce.wrapper.clientHeight;hn<0?rn=Math.max(0,rn+hn-50):Qn=Math.min(x.doc.height,Qn+hn+50),qc(x,{top:rn,bottom:Qn})}xc<20&&(ce.wheelStartX==null?(ce.wheelStartX=ye.scrollLeft,ce.wheelStartY=ye.scrollTop,ce.wheelDX=te,ce.wheelDY=ie,setTimeout(function(){if(ce.wheelStartX!=null){var vr=ye.scrollLeft-ce.wheelStartX,Br=ye.scrollTop-ce.wheelStartY,Xr=Br&&ce.wheelDY&&Br/ce.wheelDY||vr&&ce.wheelDX&&vr/ce.wheelDX;ce.wheelStartX=ce.wheelStartY=null,Xr&&(jo=(jo*xc+Xr)/(xc+1),++xc)}},200)):(ce.wheelDX+=te,ce.wheelDY+=ie))}}var vs=function(x,z){this.ranges=x,this.primIndex=z};vs.prototype.primary=function(){return this.ranges[this.primIndex]},vs.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(!ln(ne.anchor,te.anchor)||!ln(ne.head,te.head))return!1}return!0},vs.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new ja(Nn(this.ranges[z].anchor),Nn(this.ranges[z].head));return new vs(x,this.primIndex)},vs.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},vs.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(Ct(z,te.from())>=0&&Ct(x,te.to())<=0)return ne}return-1};var ja=function(x,z){this.anchor=x,this.head=z};ja.prototype.from=function(){return mn(this.anchor,this.head)},ja.prototype.to=function(){return cn(this.anchor,this.head)},ja.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Es(x,z,ne){var te=x&&x.options.selectionsMayTouch,ie=z[ne];z.sort(function(hn,rn){return Ct(hn.from(),rn.from())}),ne=Bt(z,ie);for(var ce=1;ce<z.length;ce++){var ye=z[ce],Me=z[ce-1],Pe=Ct(Me.to(),ye.from());if(te&&!ye.empty()?Pe>0:Pe>=0){var Ne=mn(Me.from(),ye.from()),bt=cn(Me.to(),ye.to()),It=Me.empty()?ye.from()==ye.head:Me.from()==Me.head;ce<=ne&&--ne,z.splice(--ce,2,new ja(It?bt:Ne,It?Ne:bt))}}return new vs(z,ne)}function Ps(x,z){return new vs([new ja(x,z||x)],0)}function Js(x){return x.text?ot(x.from.line+x.text.length-1,Ht(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function Yu(x,z){if(Ct(x,z.from)<0)return x;if(Ct(x,z.to)<=0)return Js(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+=Js(z).ch-z.to.ch),ot(ne,te)}function tu(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ie=x.sel.ranges[te];ne.push(new ja(Yu(ie.anchor,z),Yu(ie.head,z)))}return Es(x.cm,ne,x.sel.primIndex)}function Ol(x,z,ne){return x.line==z.line?ot(ne.line,x.ch-z.ch+ne.ch):ot(ne.line+(x.line-z.line),x.ch)}function nu(x,z,ne){for(var te=[],ie=ot(x.first,0),ce=ie,ye=0;ye<z.length;ye++){var Me=z[ye],Pe=Ol(Me.from,ie,ce),Ne=Ol(Js(Me),ie,ce);if(ie=Me.to,ce=Ne,ne=="around"){var bt=x.sel.ranges[ye],It=Ct(bt.head,bt.anchor)<0;te[ye]=new ja(It?Ne:Pe,It?Pe:Ne)}else te[ye]=new ja(Pe,Pe)}return new vs(te,x.sel.primIndex)}function ru(x){x.doc.mode=Tt(x.options,x.doc.modeOption),Rl(x)}function Rl(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,is(x,100),x.state.modeGen++,x.curOp&&Ri(x)}function qu(x,z){return z.from.ch==0&&z.to.ch==0&&Ht(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function iu(x,z,ne,te){function ie(ai){return ne?ne[ai]:null}function ce(ai,Zr,oi){mr(ai,Zr,oi,te),Wn(ai,"change",ai,z)}function ye(ai,Zr){for(var oi=[],Ki=ai;Ki<Zr;++Ki)oi.push(new zn(Ne[Ki],ie(Ki),te));return oi}var Me=z.from,Pe=z.to,Ne=z.text,bt=tn(x,Me.line),It=tn(x,Pe.line),hn=Ht(Ne),rn=ie(Ne.length-1),Qn=Pe.line-Me.line;if(z.full)x.insert(0,ye(0,Ne.length)),x.remove(Ne.length,x.size-Ne.length);else if(qu(x,z)){var vr=ye(0,Ne.length-1);ce(It,It.text,rn),Qn&&x.remove(Me.line,Qn),vr.length&&x.insert(Me.line,vr)}else if(bt==It)if(Ne.length==1)ce(bt,bt.text.slice(0,Me.ch)+hn+bt.text.slice(Pe.ch),rn);else{var Br=ye(1,Ne.length-1);Br.push(new zn(hn+bt.text.slice(Pe.ch),rn,te)),ce(bt,bt.text.slice(0,Me.ch)+Ne[0],ie(0)),x.insert(Me.line+1,Br)}else if(Ne.length==1)ce(bt,bt.text.slice(0,Me.ch)+Ne[0]+It.text.slice(Pe.ch),ie(0)),x.remove(Me.line+1,Qn);else{ce(bt,bt.text.slice(0,Me.ch)+Ne[0],ie(0)),ce(It,hn+It.text.slice(Pe.ch),rn);var Xr=ye(1,Ne.length-1);Qn>1&&x.remove(Me.line+1,Qn-1),x.insert(Me.line+1,Xr)}Wn(x,"change",x,z)}function Qs(x,z,ne){function te(ie,ce,ye){if(ie.linked)for(var Me=0;Me<ie.linked.length;++Me){var Pe=ie.linked[Me];if(Pe.doc!=ce){var Ne=ye&&Pe.sharedHist;ne&&!Ne||(z(Pe.doc,Ne),te(Pe.doc,ie,Ne))}}}te(x,null,!0)}function wc(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,lo(x),ru(x),Sc(x),x.options.lineWrapping||Pn(x),x.options.mode=z.modeOption,Ri(x)}function Sc(x){(x.doc.direction=="rtl"?an:Ue)(x.display.lineDiv,"CodeMirror-rtl")}function au(x){ga(x,function(){Sc(x),Ri(x)})}function Cc(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 ou(x,z){var ne={from:Nn(z.from),to:Js(z),text:Un(x,z.from,z.to)};return uu(x,ne,z.from.line,z.to.line+1),Qs(x,function(te){return uu(te,ne,z.from.line,z.to.line+1)},!0),ne}function Ju(x){for(;x.length;){var z=Ht(x);if(z.ranges)x.pop();else break}}function su(x,z){if(z)return Ju(x.done),Ht(x.done);if(x.done.length&&!Ht(x.done).ranges)return Ht(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),Ht(x.done)}function Mc(x,z,ne,te){var ie=x.history;ie.undone.length=0;var ce=+new Date,ye,Me;if((ie.lastOp==te||ie.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&ie.lastModTime>ce-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(ye=su(ie,ie.lastOp==te)))Me=Ht(ye.changes),Ct(z.from,z.to)==0&&Ct(z.from,Me.to)==0?Me.to=Js(z):ye.changes.push(ou(x,z));else{var Pe=Ht(ie.done);for((!Pe||!Pe.ranges)&&Ec(x.sel,ie.done),ye={changes:[ou(x,z)],generation:ie.generation},ie.done.push(ye);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=ce,ie.lastOp=ie.lastSelOp=te,ie.lastOrigin=ie.lastSelOrigin=z.origin,Me||rt(x,"historyAdded")}function lu(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 cu(x,z,ne,te){var ie=x.history,ce=te&&te.origin;ne==ie.lastSelOp||ce&&ie.lastSelOrigin==ce&&(ie.lastModTime==ie.lastSelTime&&ie.lastOrigin==ce||lu(x,ce,Ht(ie.done),z))?ie.done[ie.done.length-1]=z:Ec(z,ie.done),ie.lastSelTime=+new Date,ie.lastSelOrigin=ce,ie.lastSelOp=ne,te&&te.clearRedo!==!1&&Ju(ie.undone)}function Ec(x,z){var ne=Ht(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function uu(x,z,ne,te){var ie=z["spans_"+x.id],ce=0;x.iter(Math.max(x.first,ne),Math.min(x.first+x.size,te),function(ye){ye.markedSpans&&((ie||(ie=z["spans_"+x.id]={}))[ce]=ye.markedSpans),++ce})}function du(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(du(ne[ie]));return te}function Qu(x,z){var ne=Xd(x,z),te=Gr(x,z);if(!ne)return te;if(!te)return ne;for(var ie=0;ie<ne.length;++ie){var ce=ne[ie],ye=te[ie];if(ce&&ye)e:for(var Me=0;Me<ye.length;++Me){for(var Pe=ye[Me],Ne=0;Ne<ce.length;++Ne)if(ce[Ne].marker==Pe.marker)continue e;ce.push(Pe)}else ye&&(ne[ie]=ye)}return ne}function Nl(x,z,ne){for(var te=[],ie=0;ie<x.length;++ie){var ce=x[ie];if(ce.ranges){te.push(ne?vs.prototype.deepCopy.call(ce):ce);continue}var ye=ce.changes,Me=[];te.push({changes:Me});for(var Pe=0;Pe<ye.length;++Pe){var Ne=ye[Pe],bt=void 0;if(Me.push({from:Ne.from,to:Ne.to,text:Ne.text}),z)for(var It in Ne)(bt=It.match(/^spans_(\d+)$/))&&Bt(z,Number(bt[1]))>-1&&(Ht(Me)[It]=Ne[It],delete Ne[It])}}return te}function fu(x,z,ne,te){if(te){var ie=x.anchor;if(ne){var ce=Ct(z,ie)<0;ce!=Ct(ne,ie)<0?(ie=z,z=ne):ce!=Ct(z,ne)<0&&(z=ne)}return new ja(ie,z)}else return new ja(ne||z,z)}function Bl(x,z,ne,te,ie){ie==null&&(ie=x.cm&&(x.cm.display.shift||x.extend)),To(x,new vs([fu(x.sel.primary(),z,ne,ie)],0),te)}function ui(x,z,ne){for(var te=[],ie=x.cm&&(x.cm.display.shift||x.extend),ce=0;ce<x.sel.ranges.length;ce++)te[ce]=fu(x.sel.ranges[ce],z[ce],null,ie);var ye=Es(x.cm,te,x.sel.primIndex);To(x,ye,ne)}function ws(x,z,ne,te){var ie=x.sel.ranges.slice(0);ie[z]=ne,To(x,Es(x.cm,ie,x.sel.primIndex),te)}function ed(x,z,ne,te){To(x,Ps(z,ne),te)}function Yd(x,z,ne){var te={ranges:z.ranges,update:function(ie){this.ranges=[];for(var ce=0;ce<ie.length;ce++)this.ranges[ce]=new ja(Fn(x,ie[ce].anchor),Fn(x,ie[ce].head))},origin:ne&&ne.origin};return rt(x,"beforeSelectionChange",x,te),x.cm&&rt(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?Es(x.cm,te.ranges,te.ranges.length-1):z}function as(x,z,ne){var te=x.history.done,ie=Ht(te);ie&&ie.ranges?(te[te.length-1]=z,kc(x,z,ne)):To(x,z,ne)}function To(x,z,ne){kc(x,z,ne),cu(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function kc(x,z,ne){(Gn(x,"beforeSelectionChange")||x.cm&&Gn(x.cm,"beforeSelectionChange"))&&(z=Yd(x,z,ne));var te=ne&&ne.bias||(Ct(z.primary().head,x.sel.primary().head)<0?-1:1);qd(x,$l(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&zo(x.cm)}function qd(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,Bn(x.cm)),Wn(x,"cursorActivity",x))}function Jd(x){qd(x,$l(x,x.sel,null,!1))}function $l(x,z,ne,te){for(var ie,ce=0;ce<z.ranges.length;ce++){var ye=z.ranges[ce],Me=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[ce],Pe=hu(x,ye.anchor,Me&&Me.anchor,ne,te),Ne=hu(x,ye.head,Me&&Me.head,ne,te);(ie||Pe!=ye.anchor||Ne!=ye.head)&&(ie||(ie=z.ranges.slice(0,ce)),ie[ce]=new ja(Pe,Ne))}return ie?Es(x.cm,ie,z.primIndex):z}function os(x,z,ne,te,ie){var ce=tn(x,z.line);if(ce.markedSpans)for(var ye=0;ye<ce.markedSpans.length;++ye){var Me=ce.markedSpans[ye],Pe=Me.marker,Ne="selectLeft"in Pe?!Pe.selectLeft:Pe.inclusiveLeft,bt="selectRight"in Pe?!Pe.selectRight:Pe.inclusiveRight;if((Me.from==null||(Ne?Me.from<=z.ch:Me.from<z.ch))&&(Me.to==null||(bt?Me.to>=z.ch:Me.to>z.ch))){if(ie&&(rt(Pe,"beforeCursorEnter"),Pe.explicitlyCleared))if(ce.markedSpans){--ye;continue}else break;if(!Pe.atomic)continue;if(ne){var It=Pe.find(te<0?1:-1),hn=void 0;if((te<0?bt:Ne)&&(It=el(x,It,-te,It&&It.line==z.line?ce:null)),It&&It.line==z.line&&(hn=Ct(It,ne))&&(te<0?hn<0:hn>0))return os(x,It,z,te,ie)}var rn=Pe.find(te<0?-1:1);return(te<0?Ne:bt)&&(rn=el(x,rn,te,rn.line==z.line?ce:null)),rn?os(x,rn,z,te,ie):null}}return z}function hu(x,z,ne,te,ie){var ce=te||1,ye=os(x,z,ne,ce,ie)||!ie&&os(x,z,ne,ce,!0)||os(x,z,ne,-ce,ie)||!ie&&os(x,z,ne,-ce,!0);return ye||(x.cantEdit=!0,ot(x.first,0))}function el(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?Fn(x,ot(z.line-1)):null:ne>0&&z.ch==(te||tn(x,z.line)).text.length?z.line<x.first+x.size-1?ot(z.line+1,0):null:new ot(z.line,z.ch+ne)}function td(x){x.setSelection(ot(x.firstLine(),0),ot(x.lastLine()),nt)}function pu(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,ce,ye,Me){ie&&(te.from=Fn(x,ie)),ce&&(te.to=Fn(x,ce)),ye&&(te.text=ye),Me!==void 0&&(te.origin=Me)}),rt(x,"beforeChange",x,te),x.cm&&rt(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 dl(x,z,ne){if(x.cm){if(!x.cm.curOp)return za(x.cm,dl)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((Gn(x,"beforeChange")||x.cm&&Gn(x.cm,"beforeChange"))&&(z=pu(x,z,!0),!z))){var te=ta&&!ne&&ni(x,z.from,z.to);if(te)for(var ie=te.length-1;ie>=0;--ie)nd(x,{from:te[ie].from,to:te[ie].to,text:ie?[""]:z.text,origin:z.origin});else nd(x,z)}}function nd(x,z){if(!(z.text.length==1&&z.text[0]==""&&Ct(z.from,z.to)==0)){var ne=tu(x,z);Mc(x,z,ne,x.cm?x.cm.curOp.id:NaN),Fl(x,z,ne,Gr(x,z));var te=[];Qs(x,function(ie,ce){!ce&&Bt(te,ie.history)==-1&&(_c(ie.history,z),te.push(ie.history)),Fl(ie,z,null,Gr(ie,z))})}}function tl(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ie=x.history,ce,ye=x.sel,Me=z=="undo"?ie.done:ie.undone,Pe=z=="undo"?ie.undone:ie.done,Ne=0;Ne<Me.length&&(ce=Me[Ne],!(ne?ce.ranges&&!ce.equals(x.sel):!ce.ranges));Ne++);if(Ne!=Me.length){for(ie.lastOrigin=ie.lastSelOrigin=null;;)if(ce=Me.pop(),ce.ranges){if(Ec(ce,Pe),ne&&!ce.equals(x.sel)){To(x,ce,{clearRedo:!1});return}ye=ce}else if(te){Me.push(ce);return}else break;var bt=[];Ec(ye,Pe),Pe.push({changes:bt,generation:ie.generation}),ie.generation=ce.generation||++ie.maxGeneration;for(var It=Gn(x,"beforeChange")||x.cm&&Gn(x.cm,"beforeChange"),hn=function(vr){var Br=ce.changes[vr];if(Br.origin=z,It&&!pu(x,Br,!1))return Me.length=0,{};bt.push(ou(x,Br));var Xr=vr?tu(x,Br):Ht(Me);Fl(x,Br,Xr,Qu(x,Br)),!vr&&x.cm&&x.cm.scrollIntoView({from:Br.from,to:Js(Br)});var ai=[];Qs(x,function(Zr,oi){!oi&&Bt(ai,Zr.history)==-1&&(_c(Zr.history,Br),ai.push(Zr.history)),Fl(Zr,Br,null,Qu(Zr,Br))})},rn=ce.changes.length-1;rn>=0;--rn){var Qn=hn(rn);if(Qn)return Qn.v}}}}function mu(x,z){if(z!=0&&(x.first+=z,x.sel=new vs(Tn(x.sel.ranges,function(ie){return new ja(ot(ie.anchor.line+z,ie.anchor.ch),ot(ie.head.line+z,ie.head.ch))}),x.sel.primIndex),x.cm)){Ri(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)Ta(x.cm,te,"gutter")}}function Fl(x,z,ne,te){if(x.cm&&!x.cm.curOp)return za(x.cm,Fl)(x,z,ne,te);if(z.to.line<x.first){mu(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);mu(x,ie),z={from:ot(x.first,0),to:ot(z.to.line+ie,z.to.ch),text:[Ht(z.text)],origin:z.origin}}var ce=x.lastLine();z.to.line>ce&&(z={from:z.from,to:ot(ce,tn(x,ce).text.length),text:[z.text[0]],origin:z.origin}),z.removed=Un(x,z.from,z.to),ne||(ne=tu(x,z)),x.cm?Qd(x.cm,z,te):iu(x,z,te),kc(x,ne,nt),x.cantEdit&&hu(x,ot(x.firstLine(),0))&&(x.cantEdit=!1)}}function Qd(x,z,ne){var te=x.doc,ie=x.display,ce=z.from,ye=z.to,Me=!1,Pe=ce.line;x.options.lineWrapping||(Pe=er(st(tn(te,ce.line))),te.iter(Pe,ye.line+1,function(rn){if(rn==ie.maxLine)return Me=!0,!0})),te.sel.contains(z.from,z.to)>-1&&Bn(x),iu(te,z,ne,Ro(x)),x.options.lineWrapping||(te.iter(Pe,ce.line+z.text.length,function(rn){var Qn=vn(rn);Qn>ie.maxLineLength&&(ie.maxLine=rn,ie.maxLineLength=Qn,ie.maxLineChanged=!0,Me=!1)}),Me&&(x.curOp.updateMaxLine=!0)),la(te,ce.line),is(x,400);var Ne=z.text.length-(ye.line-ce.line)-1;z.full?Ri(x):ce.line==ye.line&&z.text.length==1&&!qu(x.doc,z)?Ta(x,ce.line,"text"):Ri(x,ce.line,ye.line+1,Ne);var bt=Gn(x,"changes"),It=Gn(x,"change");if(It||bt){var hn={from:ce,to:ye,text:z.text,removed:z.removed,origin:z.origin};It&&Wn(x,"change",x,hn),bt&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(hn)}x.display.selForContextMenu=null}function ec(x,z,ne,te,ie){var ce;te||(te=ne),Ct(te,ne)<0&&(ce=[te,ne],ne=ce[0],te=ce[1]),typeof z=="string"&&(z=x.splitLines(z)),dl(x,{from:ne,to:te,text:z,origin:ie})}function ef(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function tf(x,z,ne,te){for(var ie=0;ie<x.length;++ie){var ce=x[ie],ye=!0;if(ce.ranges){ce.copied||(ce=x[ie]=ce.deepCopy(),ce.copied=!0);for(var Me=0;Me<ce.ranges.length;Me++)ef(ce.ranges[Me].anchor,z,ne,te),ef(ce.ranges[Me].head,z,ne,te);continue}for(var Pe=0;Pe<ce.changes.length;++Pe){var Ne=ce.changes[Pe];if(ne<Ne.from.line)Ne.from=ot(Ne.from.line+te,Ne.from.ch),Ne.to=ot(Ne.to.line+te,Ne.to.ch);else if(z<=Ne.to.line){ye=!1;break}}ye||(x.splice(0,ie+1),ie=0)}}function _c(x,z){var ne=z.from.line,te=z.to.line,ie=z.text.length-(te-ne)-1;tf(x.done,ne,te,ie),tf(x.undone,ne,te,ie)}function Lc(x,z,ne,te){var ie=z,ce=z;return typeof z=="number"?ce=tn(x,gn(x,z)):ie=er(z),ie==null?null:(te(ce,ie)&&x.cm&&Ta(x.cm,ie,ne),ce)}function fl(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}fl.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,Yn(ie),Wn(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 tc(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}tc.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 ce=Math.min(z,ie-x),ye=te.height;if(te.removeInner(x,ce),this.height-=ye-te.height,ie==ce&&(this.children.splice(ne--,1),te.parent=null),(z-=ce)==0)break;x=0}else x-=ie}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof fl))){var Me=[];this.collapse(Me),this.children=[new fl(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],ce=ie.chunkSize();if(x<=ce){if(ie.insertInner(x,z,ne),ie.lines&&ie.lines.length>50){for(var ye=ie.lines.length%25+25,Me=ye;Me<ie.lines.length;){var Pe=new fl(ie.lines.slice(Me,Me+=25));ie.height-=Pe.height,this.children.splice(++te,0,Pe),Pe.parent=this}ie.lines=ie.lines.slice(0,ye),this.maybeSpill()}break}x-=ce}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ne=new tc(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ie=Bt(x.parent.children,x);x.parent.children.splice(ie+1,0,ne)}else{var te=new tc(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],ce=ie.chunkSize();if(x<ce){var ye=Math.min(z,ce-x);if(ie.iterN(x,ye,ne))return!0;if((z-=ye)==0)break;x=0}else x-=ce}}};var nc=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};nc.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=er(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 ce=Fi(this);nr(ne,Math.max(0,ne.height-ce)),x&&(ga(x,function(){nf(x,ne,-ce),Ta(x,te,"widget")}),Wn(x,"lineWidgetCleared",x,this,te))}},nc.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ie=Fi(this)-z;ie&&(yr(this.doc,te)||nr(te,te.height+ie),ne&&ga(ne,function(){ne.curOp.forceUpdate=!0,nf(ne,te,ie),Wn(ne,"lineWidgetChanged",ne,x,er(te))}))},tr(nc);function nf(x,z,ne){Cn(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&ms(x,ne)}function rf(x,z,ne,te){var ie=new nc(x,ne,te),ce=x.cm;return ce&&ie.noHScroll&&(ce.display.alignWidgets=!0),Lc(x,z,"widget",function(ye){var Me=ye.widgets||(ye.widgets=[]);if(ie.insertAt==null?Me.push(ie):Me.splice(Math.min(Me.length-1,Math.max(0,ie.insertAt)),0,ie),ie.line=ye,ce&&!yr(x,ye)){var Pe=Cn(ye)<x.scrollTop;nr(ye,ye.height+Fi(ie)),Pe&&ms(ce,ie.height),ce.curOp.forceUpdate=!0}return!0}),ce&&Wn(ce,"lineWidgetAdded",ce,ie,typeof z=="number"?z:er(z)),ie}var af=0,hl=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++af};hl.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&Ks(x),Gn(this,"clear")){var ne=this.find();ne&&Wn(this,"clear",ne.from,ne.to)}for(var te=null,ie=null,ce=0;ce<this.lines.length;++ce){var ye=this.lines[ce],Me=fn(ye.markedSpans,this);x&&!this.collapsed?Ta(x,er(ye),"text"):x&&(Me.to!=null&&(ie=er(ye)),Me.from!=null&&(te=er(ye))),ye.markedSpans=On(ye.markedSpans,Me),Me.from==null&&this.collapsed&&!yr(this.doc,ye)&&x&&nr(ye,Ka(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var Pe=0;Pe<this.lines.length;++Pe){var Ne=st(this.lines[Pe]),bt=vn(Ne);bt>x.display.maxLineLength&&(x.display.maxLine=Ne,x.display.maxLineLength=bt,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&Ri(x,te,ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&Jd(x.doc)),x&&Wn(x,"markerCleared",x,this,te,ie),z&&Ds(x),this.parent&&this.parent.clear()}},hl.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ne,te,ie=0;ie<this.lines.length;++ie){var ce=this.lines[ie],ye=fn(ce.markedSpans,this);if(ye.from!=null&&(ne=ot(z?ce:er(ce),ye.from),x==-1))return ne;if(ye.to!=null&&(te=ot(z?ce:er(ce),ye.to),x==1))return te}return ne&&{from:ne,to:te}},hl.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||ga(te,function(){var ie=z.line,ce=er(z.line),ye=ca(te,ce);if(ye&&(Vi(ye),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!yr(ne.doc,ie)&&ne.height!=null){var Me=ne.height;ne.height=null;var Pe=Fi(ne)-Me;Pe&&nr(ie,ie.height+Pe)}Wn(te,"markerChanged",te,x)})},hl.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||Bt(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},hl.prototype.detachLine=function(x){if(this.lines.splice(Bt(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},tr(hl);function nl(x,z,ne,te,ie){if(te&&te.shared)return uo(x,z,ne,te,ie);if(x.cm&&!x.cm.curOp)return za(x.cm,nl)(x,z,ne,te,ie);var ce=new hl(x,ie),ye=Ct(z,ne);if(te&&yn(te,ce,!1),ye>0||ye==0&&ce.clearWhenEmpty!==!1)return ce;if(ce.replacedWith&&(ce.collapsed=!0,ce.widgetNode=Pt("span",[ce.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||ce.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(ce.widgetNode.insertLeft=!0)),ce.collapsed){if(tt(x,z.line,z,ne,ce)||z.line!=ne.line&&tt(x,ne.line,z,ne,ce))throw new Error("Inserting collapsed marker partially overlapping an existing one");wt()}ce.addToHistory&&Mc(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var Me=z.line,Pe=x.cm,Ne;if(x.iter(Me,ne.line+1,function(It){Pe&&ce.collapsed&&!Pe.options.lineWrapping&&st(It)==Pe.display.maxLine&&(Ne=!0),ce.collapsed&&Me!=z.line&&nr(It,0),gr(It,new Gt(ce,Me==z.line?z.ch:null,Me==ne.line?ne.ch:null)),++Me}),ce.collapsed&&x.iter(z.line,ne.line+1,function(It){yr(x,It)&&nr(It,0)}),ce.clearOnEnter&&pn(ce,"beforeCursorEnter",function(){return ce.clear()}),ce.readOnly&&(Et(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),ce.collapsed&&(ce.id=++af,ce.atomic=!0),Pe){if(Ne&&(Pe.curOp.updateMaxLine=!0),ce.collapsed)Ri(Pe,z.line,ne.line+1);else if(ce.className||ce.startStyle||ce.endStyle||ce.css||ce.attributes||ce.title)for(var bt=z.line;bt<=ne.line;bt++)Ta(Pe,bt,"text");ce.atomic&&Jd(Pe.doc),Wn(Pe,"markerAdded",Pe,ce)}return ce}var ya=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};ya.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();Wn(this,"clear")}},ya.prototype.find=function(x,z){return this.primary.find(x,z)},tr(ya);function uo(x,z,ne,te,ie){te=yn(te),te.shared=!1;var ce=[nl(x,z,ne,te,ie)],ye=ce[0],Me=te.widgetNode;return Qs(x,function(Pe){Me&&(te.widgetNode=Me.cloneNode(!0)),ce.push(nl(Pe,Fn(Pe,z),Fn(Pe,ne),te,ie));for(var Ne=0;Ne<Pe.linked.length;++Ne)if(Pe.linked[Ne].isParent)return;ye=Ht(ce)}),new ya(ce,ye)}function pl(x){return x.findMarks(ot(x.first,0),x.clipPos(ot(x.lastLine())),function(z){return z.parent})}function of(x,z){for(var ne=0;ne<z.length;ne++){var te=z[ne],ie=te.find(),ce=x.clipPos(ie.from),ye=x.clipPos(ie.to);if(Ct(ce,ye)){var Me=nl(x,ce,ye,te.primary,te.primary.type);te.markers.push(Me),Me.parent=te}}}function Ss(x){for(var z=function(te){var ie=x[te],ce=[ie.primary.doc];Qs(ie.primary.doc,function(Pe){return ce.push(Pe)});for(var ye=0;ye<ie.markers.length;ye++){var Me=ie.markers[ye];Bt(ce,Me.doc)==-1&&(Me.parent=null,ie.markers.splice(ye--,1))}},ne=0;ne<x.length;ne++)z(ne)}var sf=0,Eo=function(x,z,ne,te,ie){if(!(this instanceof Eo))return new Eo(x,z,ne,te,ie);ne==null&&(ne=0),tc.call(this,[new fl([new zn("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var ce=ot(ne,0);this.sel=Ps(ce),this.history=new Cc(null),this.id=++sf,this.modeOption=z,this.lineSep=te,this.direction=ie=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),iu(this,{from:ce,to:ce,text:x}),To(this,Ps(ce),nt)};Eo.prototype=ue(tc.prototype,{constructor:Eo,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=_r(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:po(function(x){var z=ot(this.first,0),ne=this.first+this.size-1;dl(this,{from:z,to:ot(ne,tn(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&Ts(this.cm,0,0),To(this,Ps(z),nt)}),replaceRange:function(x,z,ne,te){z=Fn(this,z),ne=ne?Fn(this,ne):z,ec(this,x,z,ne,te)},getRange:function(x,z,ne){var te=Un(this,Fn(this,x),Fn(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(dr(this,x))return tn(this,x)},getLineNumber:function(x){return er(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=tn(this,x)),st(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return Fn(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:po(function(x,z,ne){ed(this,Fn(this,typeof x=="number"?ot(x,z||0):x),null,ne)}),setSelection:po(function(x,z,ne){ed(this,Fn(this,x),Fn(this,z||x),ne)}),extendSelection:po(function(x,z,ne){Bl(this,Fn(this,x),z&&Fn(this,z),ne)}),extendSelections:po(function(x,z){ui(this,Qt(this,x),z)}),extendSelectionsBy:po(function(x,z){var ne=Tn(this.sel.ranges,x);ui(this,Qt(this,ne),z)}),setSelections:po(function(x,z,ne){if(x.length){for(var te=[],ie=0;ie<x.length;ie++)te[ie]=new ja(Fn(this,x[ie].anchor),Fn(this,x[ie].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),To(this,Es(this.cm,te,z),ne)}}),addSelection:po(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new ja(Fn(this,x),Fn(this,z||x))),To(this,Es(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=Un(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=Un(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:po(function(x,z,ne){for(var te=[],ie=this.sel,ce=0;ce<ie.ranges.length;ce++){var ye=ie.ranges[ce];te[ce]={from:ye.from(),to:ye.to(),text:this.splitLines(x[ce]),origin:ne}}for(var Me=z&&z!="end"&&nu(this,te,z),Pe=te.length-1;Pe>=0;Pe--)dl(this,te[Pe]);Me?as(this,Me):this.cm&&zo(this.cm)}),undo:po(function(){tl(this,"undo")}),redo:po(function(){tl(this,"redo")}),undoSelection:po(function(){tl(this,"undo",!0)}),redoSelection:po(function(){tl(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 Cc(this.history.maxGeneration),Qs(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:Nl(this.history.done),undone:Nl(this.history.undone)}},setHistory:function(x){var z=this.history=new Cc(this.history.maxGeneration);z.done=Nl(x.done.slice(0),null,!0),z.undone=Nl(x.undone.slice(0),null,!0)},setGutterMarker:po(function(x,z,ne){return Lc(this,x,"gutter",function(te){var ie=te.gutterMarkers||(te.gutterMarkers={});return ie[z]=ne,!ne&&oe(ie)&&(te.gutterMarkers=null),!0})}),clearGutter:po(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&Lc(z,ne,"gutter",function(){return ne.gutterMarkers[x]=null,oe(ne.gutterMarkers)&&(ne.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!dr(this,x)||(z=x,x=tn(this,x),!x))return null}else if(z=er(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:po(function(x,z,ne){return Lc(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(xe(ne).test(te[ie]))return!1;te[ie]+=" "+ne}return!0})}),removeLineClass:po(function(x,z,ne){return Lc(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",ce=te[ie];if(ce)if(ne==null)te[ie]=null;else{var ye=ce.match(xe(ne));if(!ye)return!1;var Me=ye.index+ye[0].length;te[ie]=ce.slice(0,ye.index)+(!ye.index||Me==ce.length?"":" ")+ce.slice(Me)||null}else return!1;return!0})}),addLineWidget:po(function(x,z,ne){return rf(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return nl(this,Fn(this,x),Fn(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=Fn(this,x),nl(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=Fn(this,x);var z=[],ne=tn(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=Fn(this,x),z=Fn(this,z);var te=[],ie=x.line;return this.iter(x.line,z.line+1,function(ce){var ye=ce.markedSpans;if(ye)for(var Me=0;Me<ye.length;Me++){var Pe=ye[Me];!(Pe.to!=null&&ie==x.line&&x.ch>=Pe.to||Pe.from==null&&ie!=x.line||Pe.from!=null&&ie==z.line&&Pe.from>=z.ch)&&(!ne||ne(Pe.marker))&&te.push(Pe.marker.parent||Pe.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 ce=ie.text.length+te;if(ce>x)return z=x,!0;x-=ce,++ne}),Fn(this,ot(ne,z))},indexFromPos:function(x){x=Fn(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 Eo(_r(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 Eo(_r(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}],of(te,pl(this)),te},unlinkDoc:function(x){if(x instanceof ia&&(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),Ss(pl(this));break}}if(x.history==this.history){var te=[x.id];Qs(x,function(ie){return te.push(ie.id)},!0),x.history=new Cc(null),x.history.done=Nl(this.history.done,te),x.history.undone=Nl(this.history.undone,te)}},iterLinkedDocs:function(x){Qs(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):vt(x)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:po(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&au(this.cm))})}),Eo.prototype.eachLine=Eo.prototype.iter;var rd=0;function eh(x){var z=this;if(rc(z),!(Kt(z,x)||Ji(z.display,x))){Sr(x),ve&&(rd=+new Date);var ne=Ao(z,x,!0),te=x.dataTransfer.files;if(!(!ne||z.isReadOnly()))if(te&&te.length&&window.FileReader&&window.File)for(var ie=te.length,ce=Array(ie),ye=0,Me=function(){++ye==ie&&za(z,function(){ne=Fn(z.doc,ne);var rn={from:ne,to:ne,text:z.doc.splitLines(ce.filter(function(Qn){return Qn!=null}).join(z.doc.lineSeparator())),origin:"paste"};dl(z.doc,rn),as(z.doc,Ps(Fn(z.doc,ne),Fn(z.doc,Js(rn))))})()},Pe=function(rn,Qn){if(z.options.allowDropFileTypes&&Bt(z.options.allowDropFileTypes,rn.type)==-1){Me();return}var vr=new FileReader;vr.onerror=function(){return Me()},vr.onload=function(){var Br=vr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Br)){Me();return}ce[Qn]=Br,Me()},vr.readAsText(rn)},Ne=0;Ne<te.length;Ne++)Pe(te[Ne],Ne);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 bt=x.dataTransfer.getData("Text");if(bt){var It;if(z.state.draggingText&&!z.state.draggingText.copy&&(It=z.listSelections()),kc(z.doc,Ps(ne,ne)),It)for(var hn=0;hn<It.length;++hn)ec(z.doc,"",It[hn].anchor,It[hn].head,"drag");z.replaceSelection(bt,"around","paste"),z.display.input.focus()}}catch(rn){}}}}function th(x,z){if(ve&&(!x.state.draggingText||+new Date-rd<100)){Pr(z);return}if(!(Kt(x,z)||Ji(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!at)){var ne=mt("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",De&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),De&&ne.parentNode.removeChild(ne)}}function id(x,z){var ne=Ao(x,z);if(ne){var te=document.createDocumentFragment();oa(x,ne,te),x.display.dragCursor||(x.display.dragCursor=mt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),St(x.display.dragCursor,te)}}function rc(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function ic(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 ce=0;ce<ne.length;ce++)x(ne[ce])})}}var Ir=!1;function ad(){Ir||(gu(),Ir=!0)}function gu(){var x;pn(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,ic(vu)},100))}),pn(window,"blur",function(){return ic(Fo)})}function vu(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var Os={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"},Ac=0;Ac<10;Ac++)Os[Ac+48]=Os[Ac+96]=String(Ac);for(var yu=65;yu<=90;yu++)Os[yu]=String.fromCharCode(yu);for(var Tc=1;Tc<=12;Tc++)Os[Tc+111]=Os[Tc+63235]="F"+Tc;var Qa={};Qa.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"},Qa.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"},Qa.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"},Qa.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"]},Qa.default=Ee?Qa.macDefault:Qa.pcDefault;function nh(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ne,te,ie,ce,ye=0;ye<z.length-1;ye++){var Me=z[ye];if(/^(cmd|meta|m)$/i.test(Me))ce=!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),ce&&(x="Cmd-"+x),ie&&(x="Shift-"+x),x}function od(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=Tn(ne.split(" "),nh),ce=0;ce<ie.length;ce++){var ye=void 0,Me=void 0;ce==ie.length-1?(Me=ie.join(" "),ye=te):(Me=ie.slice(0,ce+1).join(" "),ye="...");var Pe=z[Me];if(!Pe)z[Me]=ye;else if(Pe!=ye)throw new Error("Inconsistent bindings for "+Me)}delete x[ne]}for(var Ne in z)x[Ne]=z[Ne];return x}function rl(x,z,ne,te){z=ss(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 rl(x,z.fallthrough,ne,te);for(var ce=0;ce<z.fallthrough.length;ce++){var ye=rl(x,z.fallthrough[ce],ne,te);if(ye)return ye}}}function Ic(x){var z=typeof x=="string"?x:Os[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function ml(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(ut?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(ut?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function zl(x,z){if(De&&x.keyCode==34&&x.char)return!1;var ne=Os[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),ml(ne,x,z))}function ss(x){return typeof x=="string"?Qa[x]:x}function ks(x,z){for(var ne=x.doc.sel.ranges,te=[],ie=0;ie<ne.length;ie++){for(var ce=z(ne[ie]);te.length&&Ct(ce.from,Ht(te).to)<=0;){var ye=te.pop();if(Ct(ye.from,ce.from)<0){ce.from=ye.from;break}}te.push(ce)}ga(x,function(){for(var Me=te.length-1;Me>=0;Me--)ec(x.doc,"",te[Me].from,te[Me].to,"+delete");zo(x)})}function Zo(x,z,ne){var te=_t(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Ws(x,z,ne){var te=Zo(x,z.ch,ne);return te==null?null:new ot(z.line,te,ne<0?"after":"before")}function Kl(x,z,ne,te,ie){if(x){z.doc.direction=="rtl"&&(ie=-ie);var ce=xr(ne,z.doc.direction);if(ce){var ye=ie<0?Ht(ce):ce[0],Me=ie<0==(ye.level==1),Pe=Me?"after":"before",Ne;if(ye.level>0||z.doc.direction=="rtl"){var bt=ea(z,ne);Ne=ie<0?ne.text.length-1:0;var It=Ei(z,bt,Ne).top;Ne=Rt(function(hn){return Ei(z,bt,hn).top==It},ie<0==(ye.level==1)?ye.from:ye.to-1,Ne),Pe=="before"&&(Ne=Zo(ne,Ne,1))}else Ne=ie<0?ye.to:ye.from;return new ot(te,Ne,Pe)}}return new ot(te,ie<0?ne.text.length:0,ie<0?"before":"after")}function Us(x,z,ne,te){var ie=xr(z,x.doc.direction);if(!ie)return Ws(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 ce=jt(ie,ne.ch,ne.sticky),ye=ie[ce];if(x.doc.direction=="ltr"&&ye.level%2==0&&(te>0?ye.to>ne.ch:ye.from<ne.ch))return Ws(z,ne,te);var Me=function(Xr,ai){return Zo(z,Xr instanceof ot?Xr.ch:Xr,ai)},Pe,Ne=function(Xr){return x.options.lineWrapping?(Pe=Pe||ea(x,z),Fa(x,z,Pe,Xr)):{begin:0,end:z.text.length}},bt=Ne(ne.sticky=="before"?Me(ne,-1):ne.ch);if(x.doc.direction=="rtl"||ye.level==1){var It=ye.level==1==te<0,hn=Me(ne,It?1:-1);if(hn!=null&&(It?hn<=ye.to&&hn<=bt.end:hn>=ye.from&&hn>=bt.begin)){var rn=It?"before":"after";return new ot(ne.line,hn,rn)}}var Qn=function(Xr,ai,Zr){for(var oi=function(to,Wo){return Wo?new ot(ne.line,Me(to,1),"before"):new ot(ne.line,to,"after")};Xr>=0&&Xr<ie.length;Xr+=ai){var Ki=ie[Xr],ji=ai>0==(Ki.level!=1),ba=ji?Zr.begin:Me(Zr.end,-1);if(Ki.from<=ba&&ba<Ki.to||(ba=ji?Ki.from:Me(Ki.to,-1),Zr.begin<=ba&&ba<Zr.end))return oi(ba,ji)}},vr=Qn(ce+te,te,bt);if(vr)return vr;var Br=te>0?bt.end:Me(bt.begin,-1);return Br!=null&&!(te>0&&Br==z.text.length)&&(vr=Qn(te>0?0:ie.length-1,te,Ne(Br)),vr)?vr:null}var ac={selectAll:td,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),nt)},killLine:function(x){return ks(x,function(z){if(z.empty()){var ne=tn(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:ot(z.head.line+1,0)}:{from:z.head,to:ot(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return ks(x,function(z){return{from:ot(z.from().line,0),to:Fn(x.doc,ot(z.to().line+1,0))}})},delLineLeft:function(x){return ks(x,function(z){return{from:ot(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return ks(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 ks(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(ot(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(ot(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return sd(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return lf(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return ld(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")},Xt)},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")},Xt)},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/)?lf(x,z.head):te},Xt)},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 ce=ne[ie].from(),ye=Ve(x.getLine(ce.line),ce.ch,te);z.push(Zt(te-ye%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return ga(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ie=z[te].head,ce=tn(x.doc,ie.line).text;if(ce){if(ie.ch==ce.length&&(ie=new ot(ie.line,ie.ch-1)),ie.ch>0)ie=new ot(ie.line,ie.ch+1),x.replaceRange(ce.charAt(ie.ch-1)+ce.charAt(ie.ch-2),ot(ie.line,ie.ch-2),ie,"+transpose");else if(ie.line>x.doc.first){var ye=tn(x.doc,ie.line-1).text;ye&&(ie=new ot(ie.line,1),x.replaceRange(ce.charAt(0)+x.doc.lineSeparator()+ye.charAt(ye.length-1),ot(ie.line-1,ye.length-1),ie,"+transpose"))}}ne.push(new ja(ie,ie))}x.setSelections(ne)})},newlineAndIndent:function(x){return ga(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);zo(x)})},openLine:function(x){return x.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function sd(x,z){var ne=tn(x.doc,z),te=st(ne);return te!=ne&&(z=er(te)),Kl(!0,x,te,z,1)}function ld(x,z){var ne=tn(x.doc,z),te=kt(ne);return te!=ne&&(z=er(te)),Kl(!0,x,ne,z,-1)}function lf(x,z){var ne=sd(x,z.line),te=tn(x.doc,ne.line),ie=xr(te,x.doc.direction);if(!ie||ie[0].level==0){var ce=Math.max(ne.ch,te.text.search(/\S/)),ye=z.line==ne.line&&z.ch<=ce&&z.ch;return ot(ne.line,ye?0:ce,ne.sticky)}return ne}function Io(x,z,ne){if(typeof z=="string"&&(z=ac[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)!=dn}finally{x.display.shift=te,x.state.suppressEdits=!1}return ie}function js(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ie=rl(z,x.state.keyMaps[te],ne,x);if(ie)return ie}return x.options.extraKeys&&rl(z,x.options.extraKeys,ne,x)||rl(z,x.options.keyMap,ne,x)}var rh=new Le;function oc(x,z,ne,te){var ie=x.state.keySeq;if(ie){if(Ic(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:rh.set(50,function(){x.state.keySeq==ie&&(x.state.keySeq=null,x.display.input.reset())}),bu(x,ie+" "+z,ne,te))return!0}return bu(x,z,ne,te)}function bu(x,z,ne,te){var ie=js(x,z,te);return ie=="multi"&&(x.state.keySeq=z),ie=="handled"&&Wn(x,"keyHandled",x,z,ne),(ie=="handled"||ie=="multi")&&(Sr(ne),Ci(x)),!!ie}function La(x,z){var ne=zl(z,!0);return ne?z.shiftKey&&!x.state.keySeq?oc(x,"Shift-"+ne,z,function(te){return Io(x,te,!0)})||oc(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return Io(x,te)}):oc(x,ne,z,function(te){return Io(x,te)}):!1}function sc(x,z,ne){return oc(x,"'"+ne+"'",z,function(te){return Io(x,te,!0)})}var il=null;function Dc(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=Dt(),!Kt(z,x))){ve&&Te<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=La(z,x);De&&(il=te?ne:null,!te&&ne==88&&!kn&&(Ee?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),fe&&!Ee&&!te&&ne==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),ne==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&Vn(z)}}function Vn(x){var z=x.display.lineDiv;an(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(Ue(z,"CodeMirror-crosshair"),Rr(document,"keyup",ne),Rr(document,"mouseover",ne))}pn(document,"keyup",ne),pn(document,"mouseover",ne)}function cf(x){x.keyCode==16&&(this.doc.sel.shift=!1),Kt(this,x)}function uf(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(Ji(z.display,x)||Kt(z,x)||x.ctrlKey&&!x.altKey||Ee&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(De&&ne==il){il=null,Sr(x);return}if(!(De&&(!x.which||x.which<10)&&La(z,x))){var ie=String.fromCharCode(te==null?ne:te);ie!="\b"&&(sc(z,x,ie)||z.display.input.onKeyPress(x))}}}var cd=400,ud=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};ud.prototype.compare=function(x,z,ne){return this.time+cd>x&&Ct(z,this.pos)==0&&ne==this.button};var al,Pc;function ih(x,z){var ne=+new Date;return Pc&&Pc.compare(ne,x,z)?(al=Pc=null,"triple"):al&&al.compare(ne,x,z)?(Pc=new ud(ne,x,z),al=null,"double"):(al=new ud(ne,x,z),Pc=null,"single")}function Vo(x){var z=this,ne=z.display;if(!(Kt(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,Ji(ne,x)){_e||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!ts(z,x)){var te=Ao(z,x),ie=lr(x),ce=te?ih(te,ie):"single";window.focus(),ie==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&gl(z,ie,te,ce,x))&&(ie==1?te?wu(z,te,ce,x):Vr(x)==ne.scroller&&Sr(x):ie==2?(te&&Bl(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ie==3&&(Ce?z.display.input.onContextMenu(x):Ha(z)))}}}function gl(x,z,ne,te,ie){var ce="Click";return te=="double"?ce="Double"+ce:te=="triple"&&(ce="Triple"+ce),ce=(z==1?"Left":z==2?"Middle":"Right")+ce,oc(x,ml(ce,ie),ie,function(ye){if(typeof ye=="string"&&(ye=ac[ye]),!ye)return!1;var Me=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),Me=ye(x,ne)!=dn}finally{x.state.suppressEdits=!1}return Me})}function xu(x,z,ne){var te=x.getOption("configureMouse"),ie=te?te(x,z,ne):{};if(ie.unit==null){var ce=yt?ne.shiftKey&&ne.metaKey:ne.altKey;ie.unit=ce?"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=Ee?ne.metaKey:ne.ctrlKey),ie.moveOnDrag==null&&(ie.moveOnDrag=!(Ee?ne.altKey:ne.ctrlKey)),ie}function wu(x,z,ne,te){ve?setTimeout(_n(Di,x),0):x.curOp.focus=Dt();var ie=xu(x,ne,te),ce=x.doc.sel,ye;x.options.dragDrop&&si&&!x.isReadOnly()&&ne=="single"&&(ye=ce.contains(z))>-1&&(Ct((ye=ce.ranges[ye]).from(),z)<0||z.xRel>0)&&(Ct(ye.to(),z)>0||z.xRel<0)?ah(x,te,z,ie):dd(x,te,z,ie)}function ah(x,z,ne,te){var ie=x.display,ce=!1,ye=za(x,function(Ne){_e&&(ie.scroller.draggable=!1),x.state.draggingText=!1,Rr(ie.wrapper.ownerDocument,"mouseup",ye),Rr(ie.wrapper.ownerDocument,"mousemove",Me),Rr(ie.scroller,"dragstart",Pe),Rr(ie.scroller,"drop",ye),ce||(Sr(Ne),te.addNew||Bl(x.doc,ne,null,null,te.extend),_e&&!at||ve&&Te==9?setTimeout(function(){ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),ie.input.focus()},20):ie.input.focus())}),Me=function(Ne){ce=ce||Math.abs(z.clientX-Ne.clientX)+Math.abs(z.clientY-Ne.clientY)>=10},Pe=function(){return ce=!0};_e&&(ie.scroller.draggable=!0),x.state.draggingText=ye,ye.copy=!te.moveOnDrag,ie.scroller.dragDrop&&ie.scroller.dragDrop(),pn(ie.wrapper.ownerDocument,"mouseup",ye),pn(ie.wrapper.ownerDocument,"mousemove",Me),pn(ie.scroller,"dragstart",Pe),pn(ie.scroller,"drop",ye),Ha(x),setTimeout(function(){return ie.input.focus()},20)}function df(x,z,ne){if(ne=="char")return new ja(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new ja(ot(z.line,0),Fn(x.doc,ot(z.line+1,0)));var te=ne(x,z);return new ja(te.from,te.to)}function dd(x,z,ne,te){var ie=x.display,ce=x.doc;Sr(z);var ye,Me,Pe=ce.sel,Ne=Pe.ranges;if(te.addNew&&!te.extend?(Me=ce.sel.contains(ne),Me>-1?ye=Ne[Me]:ye=new ja(ne,ne)):(ye=ce.sel.primary(),Me=ce.sel.primIndex),te.unit=="rectangle")te.addNew||(ye=new ja(ne,ne)),ne=Ao(x,z,!0,!0),Me=-1;else{var bt=df(x,ne,te.unit);te.extend?ye=fu(ye,bt.anchor,bt.head,te.extend):ye=bt}te.addNew?Me==-1?(Me=Ne.length,To(ce,Es(x,Ne.concat([ye]),Me),{scroll:!1,origin:"*mouse"})):Ne.length>1&&Ne[Me].empty()&&te.unit=="char"&&!te.extend?(To(ce,Es(x,Ne.slice(0,Me).concat(Ne.slice(Me+1)),0),{scroll:!1,origin:"*mouse"}),Pe=ce.sel):ws(ce,Me,ye,ft):(Me=0,To(ce,new vs([ye],0),ft),Pe=ce.sel);var It=ne;function hn(Zr){if(Ct(It,Zr)!=0)if(It=Zr,te.unit=="rectangle"){for(var oi=[],Ki=x.options.tabSize,ji=Ve(tn(ce,ne.line).text,ne.ch,Ki),ba=Ve(tn(ce,Zr.line).text,Zr.ch,Ki),to=Math.min(ji,ba),Wo=Math.max(ji,ba),bo=Math.min(ne.line,Zr.line),us=Math.min(x.lastLine(),Math.max(ne.line,Zr.line));bo<=us;bo++){var ds=tn(ce,bo).text,Do=Rn(ds,to,Ki);to==Wo?oi.push(new ja(ot(bo,Do),ot(bo,Do))):ds.length>Do&&oi.push(new ja(ot(bo,Do),ot(bo,Rn(ds,Wo,Ki))))}oi.length||oi.push(new ja(ne,ne)),To(ce,Es(x,Pe.ranges.slice(0,Me).concat(oi),Me),{origin:"*mouse",scroll:!1}),x.scrollIntoView(Zr)}else{var fs=ye,sa=df(x,Zr,te.unit),So=fs.anchor,xo;Ct(sa.anchor,So)>0?(xo=sa.head,So=mn(fs.from(),sa.anchor)):(xo=sa.anchor,So=cn(fs.to(),sa.head));var Co=Pe.ranges.slice(0);Co[Me]=ff(x,new ja(Fn(ce,So),xo)),To(ce,Es(x,Co,Me),ft)}}var rn=ie.wrapper.getBoundingClientRect(),Qn=0;function vr(Zr){var oi=++Qn,Ki=Ao(x,Zr,!0,te.unit=="rectangle");if(Ki)if(Ct(Ki,It)!=0){x.curOp.focus=Dt(),hn(Ki);var ji=va(ie,ce);(Ki.line>=ji.to||Ki.line<ji.from)&&setTimeout(za(x,function(){Qn==oi&&vr(Zr)}),150)}else{var ba=Zr.clientY<rn.top?-20:Zr.clientY>rn.bottom?20:0;ba&&setTimeout(za(x,function(){Qn==oi&&(ie.scroller.scrollTop+=ba,vr(Zr))}),50)}}function Br(Zr){x.state.selectingText=!1,Qn=1/0,Zr&&(Sr(Zr),ie.input.focus()),Rr(ie.wrapper.ownerDocument,"mousemove",Xr),Rr(ie.wrapper.ownerDocument,"mouseup",ai),ce.history.lastSelOrigin=null}var Xr=za(x,function(Zr){Zr.buttons===0||!lr(Zr)?Br(Zr):vr(Zr)}),ai=za(x,Br);x.state.selectingText=ai,pn(ie.wrapper.ownerDocument,"mousemove",Xr),pn(ie.wrapper.ownerDocument,"mouseup",ai)}function ff(x,z){var ne=z.anchor,te=z.head,ie=tn(x.doc,ne.line);if(Ct(ne,te)==0&&ne.sticky==te.sticky)return z;var ce=xr(ie);if(!ce)return z;var ye=jt(ce,ne.ch,ne.sticky),Me=ce[ye];if(Me.from!=ne.ch&&Me.to!=ne.ch)return z;var Pe=ye+(Me.from==ne.ch==(Me.level!=1)?0:1);if(Pe==0||Pe==ce.length)return z;var Ne;if(te.line!=ne.line)Ne=(te.line-ne.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var bt=jt(ce,te.ch,te.sticky),It=bt-ye||(te.ch-ne.ch)*(Me.level==1?-1:1);bt==Pe-1||bt==Pe?Ne=It<0:Ne=It>0}var hn=ce[Pe+(Ne?-1:0)],rn=Ne==(hn.level==1),Qn=rn?hn.from:hn.to,vr=rn?"after":"before";return ne.ch==Qn&&ne.sticky==vr?z:new ja(new ot(ne.line,Qn,vr),te)}function Oc(x,z,ne,te){var ie,ce;if(z.touches)ie=z.touches[0].clientX,ce=z.touches[0].clientY;else try{ie=z.clientX,ce=z.clientY}catch(hn){return!1}if(ie>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;te&&Sr(z);var ye=x.display,Me=ye.lineDiv.getBoundingClientRect();if(ce>Me.bottom||!Gn(x,ne))return Mr(z);ce-=Me.top-ye.viewOffset;for(var Pe=0;Pe<x.display.gutterSpecs.length;++Pe){var Ne=ye.gutters.childNodes[Pe];if(Ne&&Ne.getBoundingClientRect().right>=ie){var bt=ur(x.doc,ce),It=x.display.gutterSpecs[Pe];return rt(x,ne,x,bt,It.className,z),Mr(z)}}}function ts(x,z){return Oc(x,z,"gutterClick",!0)}function vl(x,z){Ji(x.display,z)||hf(x,z)||Kt(x,z,"contextmenu")||Ce||x.display.input.onContextMenu(z)}function hf(x,z){return Gn(x,"gutterContextMenu")?Oc(x,z,"gutterContextMenu",!1):!1}function fd(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),mi(x)}var yl={toString:function(){return"CodeMirror.Init"}},pf={},Su={};function oh(x){var z=x.optionHandlers;function ne(te,ie,ce,ye){x.defaults[te]=ie,ce&&(z[te]=ye?function(Me,Pe,Ne){Ne!=yl&&ce(Me,Pe,Ne)}:ce)}x.defineOption=ne,x.Init=yl,ne("value","",function(te,ie){return te.setValue(ie)},!0),ne("mode",null,function(te,ie){te.doc.modeOption=ie,ru(te)},!0),ne("indentUnit",2,ru,!0),ne("indentWithTabs",!1),ne("smartIndent",!0),ne("tabSize",4,function(te){Rl(te),mi(te),Ri(te)},!0),ne("lineSeparator",null,function(te,ie){if(te.doc.lineSep=ie,!!ie){var ce=[],ye=te.doc.first;te.doc.iter(function(Pe){for(var Ne=0;;){var bt=Pe.text.indexOf(ie,Ne);if(bt==-1)break;Ne=bt+ie.length,ce.push(ot(ye,bt))}ye++});for(var Me=ce.length-1;Me>=0;Me--)ec(te.doc,ie,ce[Me],ot(ce[Me].line,ce[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,ce){te.state.specialChars=new RegExp(ie.source+(ie.test(" ")?"":"| "),"g"),ce!=yl&&te.refresh()}),ne("specialCharPlaceholder",Re,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",et?"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",!Vt),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){fd(te),Ql(te)},!0),ne("keyMap","default",function(te,ie,ce){var ye=ss(ie),Me=ce!=yl&&ss(ce);Me&&Me.detach&&Me.detach(te,ye),ye.attach&&ye.attach(te,Me||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,mf,!0),ne("gutters",[],function(te,ie){te.display.gutterSpecs=eu(ie,te.options.lineNumbers),Ql(te)},!0),ne("fixedGutter",!0,function(te,ie){te.display.gutters.style.left=ie?Oo(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return xs(te)},!0),ne("scrollbarStyle","native",function(te){vc(te),xs(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=eu(te.options.gutters,ie),Ql(te)},!0),ne("firstLineNumber",1,Ql,!0),ne("lineNumberFormatter",function(te){return te},Ql,!0),ne("showCursorWhenSelecting",!1,Qo,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ie){ie=="nocursor"&&(Fo(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,sh),ne("allowDropFileTypes",null),ne("cursorBlinkRate",530),ne("cursorScrollMargin",0),ne("cursorHeight",1,Qo,!0),ne("singleCursorHeightPerLine",!0,Qo,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,Rl,!0),ne("addModeClass",!1,Rl,!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,Rl,!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 sh(x,z,ne){var te=ne&&ne!=yl;if(!z!=!te){var ie=x.display.dragFunctions,ce=z?pn:Rr;ce(x.display.scroller,"dragstart",ie.start),ce(x.display.scroller,"dragenter",ie.enter),ce(x.display.scroller,"dragover",ie.over),ce(x.display.scroller,"dragleave",ie.leave),ce(x.display.scroller,"drop",ie.drop)}}function mf(x){x.options.lineWrapping?(an(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(Ue(x.display.wrapper,"CodeMirror-wrap"),Pn(x)),lo(x),Ri(x),mi(x),setTimeout(function(){return xs(x)},100)}function ia(x,z){var ne=this;if(!(this instanceof ia))return new ia(x,z);this.options=z=z?yn(z):{},yn(pf,z,!1);var te=z.value;typeof te=="string"?te=new Eo(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ie=new ia.inputStyles[z.inputStyle](this),ce=this.display=new Gd(x,te,ie,z);ce.wrapper.CodeMirror=this,fd(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vc(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 Le,keySeq:null,specialChars:null},z.autofocus&&!et&&ce.input.focus(),ve&&Te<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),lh(this),ad(),Ks(this),this.curOp.forceUpdate=!0,wc(this,te),z.autofocus&&!et||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&Va(ne)},20):Fo(this);for(var ye in Su)Su.hasOwnProperty(ye)&&Su[ye](this,z[ye],yl);bc(this),z.finishInit&&z.finishInit(this);for(var Me=0;Me<hd.length;++Me)hd[Me](this);Ds(this),_e&&z.lineWrapping&&getComputedStyle(ce.lineDiv).textRendering=="optimizelegibility"&&(ce.lineDiv.style.textRendering="auto")}ia.defaults=pf,ia.optionHandlers=Su;function lh(x){var z=x.display;pn(z.scroller,"mousedown",za(x,Vo)),ve&&Te<11?pn(z.scroller,"dblclick",za(x,function(Pe){if(!Kt(x,Pe)){var Ne=Ao(x,Pe);if(!(!Ne||ts(x,Pe)||Ji(x.display,Pe))){Sr(Pe);var bt=x.findWordAt(Ne);Bl(x.doc,bt.anchor,bt.head)}}})):pn(z.scroller,"dblclick",function(Pe){return Kt(x,Pe)||Sr(Pe)}),pn(z.scroller,"contextmenu",function(Pe){return vl(x,Pe)}),pn(z.input.getField(),"contextmenu",function(Pe){z.scroller.contains(Pe.target)||vl(x,Pe)});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 ce(Pe){if(Pe.touches.length!=1)return!1;var Ne=Pe.touches[0];return Ne.radiusX<=1&&Ne.radiusY<=1}function ye(Pe,Ne){if(Ne.left==null)return!0;var bt=Ne.left-Pe.left,It=Ne.top-Pe.top;return bt*bt+It*It>20*20}pn(z.scroller,"touchstart",function(Pe){if(!Kt(x,Pe)&&!ce(Pe)&&!ts(x,Pe)){z.input.ensurePolled(),clearTimeout(ne);var Ne=+new Date;z.activeTouch={start:Ne,moved:!1,prev:Ne-te.end<=300?te:null},Pe.touches.length==1&&(z.activeTouch.left=Pe.touches[0].pageX,z.activeTouch.top=Pe.touches[0].pageY)}}),pn(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),pn(z.scroller,"touchend",function(Pe){var Ne=z.activeTouch;if(Ne&&!Ji(z,Pe)&&Ne.left!=null&&!Ne.moved&&new Date-Ne.start<300){var bt=x.coordsChar(z.activeTouch,"page"),It;!Ne.prev||ye(Ne,Ne.prev)?It=new ja(bt,bt):!Ne.prev.prev||ye(Ne,Ne.prev.prev)?It=x.findWordAt(bt):It=new ja(ot(bt.line,0),Fn(x.doc,ot(bt.line+1,0))),x.setSelection(It.anchor,It.head),x.focus(),Sr(Pe)}ie()}),pn(z.scroller,"touchcancel",ie),pn(z.scroller,"scroll",function(){z.scroller.clientHeight&&(Ia(x,z.scroller.scrollTop),go(x,z.scroller.scrollLeft,!0),rt(x,"scroll",x))}),pn(z.scroller,"mousewheel",function(Pe){return Xu(x,Pe)}),pn(z.scroller,"DOMMouseScroll",function(Pe){return Xu(x,Pe)}),pn(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(Pe){Kt(x,Pe)||Pr(Pe)},over:function(Pe){Kt(x,Pe)||(id(x,Pe),Pr(Pe))},start:function(Pe){return th(x,Pe)},drop:za(x,eh),leave:function(Pe){Kt(x,Pe)||rc(x)}};var Me=z.input.getField();pn(Me,"keyup",function(Pe){return cf.call(x,Pe)}),pn(Me,"keydown",za(x,Dc)),pn(Me,"keypress",za(x,uf)),pn(Me,"focus",function(Pe){return Va(x,Pe)}),pn(Me,"blur",function(Pe){return Fo(x,Pe)})}var hd=[];ia.defineInitHook=function(x){return hd.push(x)};function Rs(x,z,ne,te){var ie=x.doc,ce;ne==null&&(ne="add"),ne=="smart"&&(ie.mode.indent?ce=gi(x,z).state:ne="prev");var ye=x.options.tabSize,Me=tn(ie,z),Pe=Ve(Me.text,null,ye);Me.stateAfter&&(Me.stateAfter=null);var Ne=Me.text.match(/^\s*/)[0],bt;if(!te&&!/\S/.test(Me.text))bt=0,ne="not";else if(ne=="smart"&&(bt=ie.mode.indent(ce,Me.text.slice(Ne.length),Me.text),bt==dn||bt>150)){if(!te)return;ne="prev"}ne=="prev"?z>ie.first?bt=Ve(tn(ie,z-1).text,null,ye):bt=0:ne=="add"?bt=Pe+x.options.indentUnit:ne=="subtract"?bt=Pe-x.options.indentUnit:typeof ne=="number"&&(bt=Pe+ne),bt=Math.max(0,bt);var It="",hn=0;if(x.options.indentWithTabs)for(var rn=Math.floor(bt/ye);rn;--rn)hn+=ye,It+=" ";if(hn<bt&&(It+=Zt(bt-hn)),It!=Ne)return ec(ie,It,ot(z,0),ot(z,Ne.length),"+input"),Me.stateAfter=null,!0;for(var Qn=0;Qn<ie.sel.ranges.length;Qn++){var vr=ie.sel.ranges[Qn];if(vr.head.line==z&&vr.head.ch<Ne.length){var Br=ot(z,Ne.length);ws(ie,Qn,new ja(Br,Br));break}}}var Ns=null;function bl(x){Ns=x}function pd(x,z,ne,te,ie){var ce=x.doc;x.display.shift=!1,te||(te=ce.sel);var ye=+new Date-200,Me=ie=="paste"||x.state.pasteIncoming>ye,Pe=vt(z),Ne=null;if(Me&&te.ranges.length>1)if(Ns&&Ns.text.join(`
|
|
|
`)==z){if(te.ranges.length%Ns.text.length==0){Ne=[];for(var bt=0;bt<Ns.text.length;bt++)Ne.push(ce.splitLines(Ns.text[bt]))}}else Pe.length==te.ranges.length&&x.options.pasteLinesPerSelection&&(Ne=Tn(Pe,function(Xr){return[Xr]}));for(var It=x.curOp.updateInput,hn=te.ranges.length-1;hn>=0;hn--){var rn=te.ranges[hn],Qn=rn.from(),vr=rn.to();rn.empty()&&(ne&&ne>0?Qn=ot(Qn.line,Qn.ch-ne):x.state.overwrite&&!Me?vr=ot(vr.line,Math.min(tn(ce,vr.line).text.length,vr.ch+Ht(Pe).length)):Me&&Ns&&Ns.lineWise&&Ns.text.join(`
|
|
|
`)==Pe.join(`
|
|
|
`)&&(Qn=vr=ot(Qn.line,0)));var Br={from:Qn,to:vr,text:Ne?Ne[hn%Ne.length]:Pe,origin:ie||(Me?"paste":x.state.cutIncoming>ye?"cut":"+input")};dl(x.doc,Br),Wn(x,"inputRead",x,Br)}z&&!Me&&gd(x,z),zo(x),x.curOp.updateInput<2&&(x.curOp.updateInput=It),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function md(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&ga(z,function(){return pd(z,ne,0,null,"paste")}),!0}function gd(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 ce=x.getModeAt(ie.head),ye=!1;if(ce.electricChars){for(var Me=0;Me<ce.electricChars.length;Me++)if(z.indexOf(ce.electricChars.charAt(Me))>-1){ye=Rs(x,ie.head.line,"smart");break}}else ce.electricInput&&ce.electricInput.test(tn(x.doc,ie.head.line).text.slice(0,ie.head.ch))&&(ye=Rs(x,ie.head.line,"smart"));ye&&Wn(x,"electricInput",x,ie.head.line)}}}function lc(x){for(var z=[],ne=[],te=0;te<x.doc.sel.ranges.length;te++){var ie=x.doc.sel.ranges[te].head.line,ce={anchor:ot(ie,0),head:ot(ie+1,0)};ne.push(ce),z.push(x.getRange(ce.anchor,ce.head))}return{text:z,ranges:ne}}function gf(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function vd(){var x=mt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=mt("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return _e?x.style.width="1000px":x.setAttribute("wrap","off"),ht&&(x.style.border="1px solid black"),gf(x),z}function yd(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 ce=this.options,ye=ce[te];ce[te]==ie&&te!="mode"||(ce[te]=ie,z.hasOwnProperty(te)&&za(this,z[te])(this,ie,ye),rt(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"](ss(te))},removeKeyMap:function(te){for(var ie=this.state.keyMaps,ce=0;ce<ie.length;++ce)if(ie[ce]==te||ie[ce].name==te)return ie.splice(ce,1),!0},addOverlay:Ra(function(te,ie){var ce=te.token?te:x.getMode(this.options,te);if(ce.startState)throw new Error("Overlays may not be stateful.");xn(this.state.overlays,{mode:ce,modeSpec:te,opaque:ie&&ie.opaque,priority:ie&&ie.priority||0},function(ye){return ye.priority}),this.state.modeGen++,Ri(this)}),removeOverlay:Ra(function(te){for(var ie=this.state.overlays,ce=0;ce<ie.length;++ce){var ye=ie[ce].modeSpec;if(ye==te||typeof te=="string"&&ye.name==te){ie.splice(ce,1),this.state.modeGen++,Ri(this);return}}}),indentLine:Ra(function(te,ie,ce){typeof ie!="string"&&typeof ie!="number"&&(ie==null?ie=this.options.smartIndent?"smart":"prev":ie=ie?"add":"subtract"),dr(this.doc,te)&&Rs(this,te,ie,ce)}),indentSelection:Ra(function(te){for(var ie=this.doc.sel.ranges,ce=-1,ye=0;ye<ie.length;ye++){var Me=ie[ye];if(Me.empty())Me.head.line>ce&&(Rs(this,Me.head.line,te,!0),ce=Me.head.line,ye==this.doc.sel.primIndex&&zo(this));else{var Pe=Me.from(),Ne=Me.to(),bt=Math.max(ce,Pe.line);ce=Math.min(this.lastLine(),Ne.line-(Ne.ch?0:1))+1;for(var It=bt;It<ce;++It)Rs(this,It,te);var hn=this.doc.sel.ranges;Pe.ch==0&&ie.length==hn.length&&hn[ye].from().ch>0&&ws(this.doc,ye,new ja(Pe,hn[ye].to()),nt)}}}),getTokenAt:function(te,ie){return Gi(this,te,ie)},getLineTokens:function(te,ie){return Gi(this,ot(te),ie,!0)},getTokenTypeAt:function(te){te=Fn(this.doc,te);var ie=Ai(this,tn(this.doc,te.line)),ce=0,ye=(ie.length-1)/2,Me=te.ch,Pe;if(Me==0)Pe=ie[2];else for(;;){var Ne=ce+ye>>1;if((Ne?ie[Ne*2-1]:0)>=Me)ye=Ne;else if(ie[Ne*2+1]<Me)ce=Ne+1;else{Pe=ie[Ne*2+2];break}}var bt=Pe?Pe.indexOf("overlay "):-1;return bt<0?Pe:bt==0?null:Pe.slice(0,bt-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 ce=[];if(!ne.hasOwnProperty(ie))return ce;var ye=ne[ie],Me=this.getModeAt(te);if(typeof Me[ie]=="string")ye[Me[ie]]&&ce.push(ye[Me[ie]]);else if(Me[ie])for(var Pe=0;Pe<Me[ie].length;Pe++){var Ne=ye[Me[ie][Pe]];Ne&&ce.push(Ne)}else Me.helperType&&ye[Me.helperType]?ce.push(ye[Me.helperType]):ye[Me.name]&&ce.push(ye[Me.name]);for(var bt=0;bt<ye._global.length;bt++){var It=ye._global[bt];It.pred(Me,this)&&Bt(ce,It.val)==-1&&ce.push(It.val)}return ce},getStateAfter:function(te,ie){var ce=this.doc;return te=gn(ce,te==null?ce.first+ce.size-1:te),gi(this,te+1,ie).state},cursorCoords:function(te,ie){var ce,ye=this.doc.sel.primary();return te==null?ce=ye.head:typeof te=="object"?ce=Fn(this.doc,te):ce=te?ye.from():ye.to(),ha(this,ce,ie||"page")},charCoords:function(te,ie){return Za(this,Fn(this.doc,te),ie||"page")},coordsChar:function(te,ie){return te=Ea(this,te,ie||"page"),Ga(this,te.left,te.top)},lineAtHeight:function(te,ie){return te=Ea(this,{top:te,left:0},ie||"page").top,ur(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ie,ce){var ye=!1,Me;if(typeof te=="number"){var Pe=this.doc.first+this.doc.size-1;te<this.doc.first?te=this.doc.first:te>Pe&&(te=Pe,ye=!0),Me=tn(this.doc,te)}else Me=te;return wa(this,Me,{top:0,left:0},ie||"page",ce||ye).top+(ye?this.doc.height-Cn(Me):0)},defaultTextHeight:function(){return Ka(this.display)},defaultCharWidth:function(){return io(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ie,ce,ye,Me){var Pe=this.display;te=ha(this,Fn(this.doc,te));var Ne=te.bottom,bt=te.left;if(ie.style.position="absolute",ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ie),Pe.sizer.appendChild(ie),ye=="over")Ne=te.top;else if(ye=="above"||ye=="near"){var It=Math.max(Pe.wrapper.clientHeight,this.doc.height),hn=Math.max(Pe.sizer.clientWidth,Pe.lineSpace.clientWidth);(ye=="above"||te.bottom+ie.offsetHeight>It)&&te.top>ie.offsetHeight?Ne=te.top-ie.offsetHeight:te.bottom+ie.offsetHeight<=It&&(Ne=te.bottom),bt+ie.offsetWidth>hn&&(bt=hn-ie.offsetWidth)}ie.style.top=Ne+"px",ie.style.left=ie.style.right="",Me=="right"?(bt=Pe.sizer.clientWidth-ie.offsetWidth,ie.style.right="0px"):(Me=="left"?bt=0:Me=="middle"&&(bt=(Pe.sizer.clientWidth-ie.offsetWidth)/2),ie.style.left=bt+"px"),ce&&ul(this,{left:bt,top:Ne,right:bt+ie.offsetWidth,bottom:Ne+ie.offsetHeight})},triggerOnKeyDown:Ra(Dc),triggerOnKeyPress:Ra(uf),triggerOnKeyUp:cf,triggerOnMouseDown:Ra(Vo),execCommand:function(te){if(ac.hasOwnProperty(te))return ac[te].call(null,this)},triggerElectric:Ra(function(te){gd(this,te)}),findPosH:function(te,ie,ce,ye){var Me=1;ie<0&&(Me=-1,ie=-ie);for(var Pe=Fn(this.doc,te),Ne=0;Ne<ie&&(Pe=Cu(this.doc,Pe,Me,ce,ye),!Pe.hitSide);++Ne);return Pe},moveH:Ra(function(te,ie){var ce=this;this.extendSelectionsBy(function(ye){return ce.display.shift||ce.doc.extend||ye.empty()?Cu(ce.doc,ye.head,te,ie,ce.options.rtlMoveVisually):te<0?ye.from():ye.to()},Xt)}),deleteH:Ra(function(te,ie){var ce=this.doc.sel,ye=this.doc;ce.somethingSelected()?ye.replaceSelection("",null,"+delete"):ks(this,function(Me){var Pe=Cu(ye,Me.head,te,ie,!1);return te<0?{from:Pe,to:Me.head}:{from:Me.head,to:Pe}})}),findPosV:function(te,ie,ce,ye){var Me=1,Pe=ye;ie<0&&(Me=-1,ie=-ie);for(var Ne=Fn(this.doc,te),bt=0;bt<ie;++bt){var It=ha(this,Ne,"div");if(Pe==null?Pe=It.left:It.left=Pe,Ne=vf(this,It,Me,ce),Ne.hitSide)break}return Ne},moveV:Ra(function(te,ie){var ce=this,ye=this.doc,Me=[],Pe=!this.display.shift&&!ye.extend&&ye.sel.somethingSelected();if(ye.extendSelectionsBy(function(bt){if(Pe)return te<0?bt.from():bt.to();var It=ha(ce,bt.head,"div");bt.goalColumn!=null&&(It.left=bt.goalColumn),Me.push(It.left);var hn=vf(ce,It,te,ie);return ie=="page"&&bt==ye.sel.primary()&&ms(ce,Za(ce,hn,"div").top-It.top),hn},Xt),Me.length)for(var Ne=0;Ne<ye.sel.ranges.length;Ne++)ye.sel.ranges[Ne].goalColumn=Me[Ne]}),findWordAt:function(te){var ie=this.doc,ce=tn(ie,te.line).text,ye=te.ch,Me=te.ch;if(ce){var Pe=this.getHelper(te,"wordChars");(te.sticky=="before"||Me==ce.length)&&ye?--ye:++Me;for(var Ne=ce.charAt(ye),bt=he(Ne,Pe)?function(It){return he(It,Pe)}:/\s/.test(Ne)?function(It){return/\s/.test(It)}:function(It){return!/\s/.test(It)&&!he(It)};ye>0&&bt(ce.charAt(ye-1));)--ye;for(;Me<ce.length&&bt(ce.charAt(Me));)++Me}return new ja(ot(te.line,ye),ot(te.line,Me))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?an(this.display.cursorDiv,"CodeMirror-overwrite"):Ue(this.display.cursorDiv,"CodeMirror-overwrite"),rt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Dt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ra(function(te,ie){Ts(this,te,ie)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-Jr(this)-this.display.barHeight,width:te.scrollWidth-Jr(this)-this.display.barWidth,clientHeight:Ii(this),clientWidth:hi(this)}},scrollIntoView:Ra(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:ot(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?Is(this,te):oo(this,te.from,te.to,te.margin)}),setSize:Ra(function(te,ie){var ce=this,ye=function(Pe){return typeof Pe=="number"||/^\d+$/.test(String(Pe))?Pe+"px":Pe};te!=null&&(this.display.wrapper.style.width=ye(te)),ie!=null&&(this.display.wrapper.style.height=ye(ie)),this.options.lineWrapping&&aa(this);var Me=this.display.viewFrom;this.doc.iter(Me,this.display.viewTo,function(Pe){if(Pe.widgets){for(var Ne=0;Ne<Pe.widgets.length;Ne++)if(Pe.widgets[Ne].noHScroll){Ta(ce,Me,"widget");break}}++Me}),this.curOp.forceUpdate=!0,rt(this,"refresh",this)}),operation:function(te){return ga(this,te)},startOperation:function(){return Ks(this)},endOperation:function(){return Ds(this)},refresh:Ra(function(){var te=this.display.cachedTextHeight;Ri(this),this.curOp.forceUpdate=!0,mi(this),Ts(this,this.doc.scrollLeft,this.doc.scrollTop),Jc(this.display),(te==null||Math.abs(te-Ka(this.display))>.5||this.options.lineWrapping)&&lo(this),rt(this,"refresh",this)}),swapDoc:Ra(function(te){var ie=this.doc;return ie.cm=null,this.state.selectingText&&this.state.selectingText(),wc(this,te),mi(this),this.display.input.reset(),Ts(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,Wn(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}},tr(x),x.registerHelper=function(te,ie,ce){ne.hasOwnProperty(te)||(ne[te]=x[te]={_global:[]}),ne[te][ie]=ce},x.registerGlobalHelper=function(te,ie,ce,ye){x.registerHelper(te,ie,ye),ne[te]._global.push({pred:ce,val:ye})}}function Cu(x,z,ne,te,ie){var ce=z,ye=ne,Me=tn(x,z.line),Pe=ie&&x.direction=="rtl"?-ne:ne;function Ne(){var ai=z.line+Pe;return ai<x.first||ai>=x.first+x.size?!1:(z=new ot(ai,z.ch,z.sticky),Me=tn(x,ai))}function bt(ai){var Zr;if(te=="codepoint"){var oi=Me.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(oi)?Zr=null:Zr=new ot(z.line,Math.max(0,Math.min(Me.text.length,z.ch+ne*(oi>=55296&&oi<56320?2:1))),-ne)}else ie?Zr=Us(x.cm,Me,z,ne):Zr=Ws(Me,z,ne);if(Zr==null)if(!ai&&Ne())z=Kl(ie,x.cm,Me,z.line,Pe);else return!1;else z=Zr;return!0}if(te=="char"||te=="codepoint")bt();else if(te=="column")bt(!0);else if(te=="word"||te=="group")for(var It=null,hn=te=="group",rn=x.cm&&x.cm.getHelper(z,"wordChars"),Qn=!0;!(ne<0&&!bt(!Qn));Qn=!1){var vr=Me.text.charAt(z.ch)||`
|
|
|
`,Br=he(vr,rn)?"w":hn&&vr==`
|
|
|
`?"n":!hn||/\s/.test(vr)?null:"p";if(hn&&!Qn&&!Br&&(Br="s"),It&&It!=Br){ne<0&&(ne=1,bt(),z.sticky="after");break}if(Br&&(It=Br),ne>0&&!bt(!Qn))break}var Xr=hu(x,z,ce,ye,!0);return ln(ce,Xr)&&(Xr.hitSide=!0),Xr}function vf(x,z,ne,te){var ie=x.doc,ce=z.left,ye;if(te=="page"){var Me=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Pe=Math.max(Me-.5*Ka(x.display),3);ye=(ne>0?z.bottom:z.top)+ne*Pe}else te=="line"&&(ye=ne>0?z.bottom+3:z.top-3);for(var Ne;Ne=Ga(x,ce,ye),!!Ne.outside;){if(ne<0?ye<=0:ye>=ie.height){Ne.hitSide=!0;break}ye+=ne*5}return Ne}var Ya=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Le,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ya.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ie=ne.div=x.lineDiv;gf(ie,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function ce(Me){for(var Pe=Me.target;Pe;Pe=Pe.parentNode){if(Pe==ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Pe.className))break}return!1}pn(ie,"paste",function(Me){!ce(Me)||Kt(te,Me)||md(Me,te)||Te<=11&&setTimeout(za(te,function(){return z.updateFromDOM()}),20)}),pn(ie,"compositionstart",function(Me){z.composing={data:Me.data,done:!1}}),pn(ie,"compositionupdate",function(Me){z.composing||(z.composing={data:Me.data,done:!1})}),pn(ie,"compositionend",function(Me){z.composing&&(Me.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),pn(ie,"touchstart",function(){return ne.forceCompositionEnd()}),pn(ie,"input",function(){z.composing||z.readFromDOMSoon()});function ye(Me){if(!(!ce(Me)||Kt(te,Me))){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()}),Me.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var Pe=lc(te);bl({lineWise:!0,text:Pe.text}),Me.type=="cut"&&te.operation(function(){te.setSelections(Pe.ranges,0,nt),te.replaceSelection("",null,"cut")})}else return;if(Me.clipboardData){Me.clipboardData.clearData();var Ne=Ns.text.join(`
|
|
|
`);if(Me.clipboardData.setData("Text",Ne),Me.clipboardData.getData("Text")==Ne){Me.preventDefault();return}}var bt=vd(),It=bt.firstChild;te.display.lineSpace.insertBefore(bt,te.display.lineSpace.firstChild),It.value=Ns.text.join(`
|
|
|
`);var hn=document.activeElement;en(It),setTimeout(function(){te.display.lineSpace.removeChild(bt),hn.focus(),hn==ie&&ne.showPrimarySelection()},50)}}pn(ie,"copy",ye),pn(ie,"cut",ye)},Ya.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},Ya.prototype.prepareSelection=function(){var x=ps(this.cm,!1);return x.focus=document.activeElement==this.div,x},Ya.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},Ya.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ya.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 ce=Mu(z,x.anchorNode,x.anchorOffset),ye=Mu(z,x.focusNode,x.focusOffset);if(!(ce&&!ce.bad&&ye&&!ye.bad&&Ct(mn(ce,ye),te)==0&&Ct(cn(ce,ye),ie)==0)){var Me=z.display.view,Pe=te.line>=z.display.viewFrom&&yf(z,te)||{node:Me[0].measure.map[2],offset:0},Ne=ie.line<z.display.viewTo&&yf(z,ie);if(!Ne){var bt=Me[Me.length-1].measure,It=bt.maps?bt.maps[bt.maps.length-1]:bt.map;Ne={node:It[It.length-1],offset:It[It.length-2]-It[It.length-3]}}if(!Pe||!Ne){x.removeAllRanges();return}var hn=x.rangeCount&&x.getRangeAt(0),rn;try{rn=Qe(Pe.node,Pe.offset,Ne.offset,Ne.node)}catch(Qn){}rn&&(!fe&&z.state.focused?(x.collapse(Pe.node,Pe.offset),rn.collapsed||(x.removeAllRanges(),x.addRange(rn))):(x.removeAllRanges(),x.addRange(rn)),hn&&x.anchorNode==null?x.addRange(hn):fe&&this.startGracePeriod()),this.rememberSelection()}},Ya.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)},Ya.prototype.showMultipleSelections=function(x){St(this.cm.display.cursorDiv,x.cursors),St(this.cm.display.selectionDiv,x.selection)},Ya.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},Ya.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return Ft(this.div,z)},Ya.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ya.prototype.blur=function(){this.div.blur()},Ya.prototype.getField=function(){return this.div},Ya.prototype.supportsTouch=function(){return!0},Ya.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():ga(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)},Ya.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},Ya.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(lt&&me&&this.cm.display.gutterSpecs.length&&ch(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ne=Mu(z,x.anchorNode,x.anchorOffset),te=Mu(z,x.focusNode,x.focusOffset);ne&&te&&ga(z,function(){To(z.doc,Ps(ne,te),nt),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},Ya.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=ot(te.line-1,tn(x.doc,te.line-1).length)),ie.ch==tn(x.doc,ie.line).text.length&&ie.line<x.lastLine()&&(ie=ot(ie.line+1,0)),te.line<z.viewFrom||ie.line>z.viewTo-1)return!1;var ce,ye,Me;te.line==z.viewFrom||(ce=ra(x,te.line))==0?(ye=er(z.view[0].line),Me=z.view[0].node):(ye=er(z.view[ce].line),Me=z.view[ce-1].node.nextSibling);var Pe=ra(x,ie.line),Ne,bt;if(Pe==z.view.length-1?(Ne=z.viewTo-1,bt=z.lineDiv.lastChild):(Ne=er(z.view[Pe+1].line)-1,bt=z.view[Pe+1].node.previousSibling),!Me)return!1;for(var It=x.doc.splitLines(uh(x,Me,bt,ye,Ne)),hn=Un(x.doc,ot(ye,0),ot(Ne,tn(x.doc,Ne).text.length));It.length>1&&hn.length>1;)if(Ht(It)==Ht(hn))It.pop(),hn.pop(),Ne--;else if(It[0]==hn[0])It.shift(),hn.shift(),ye++;else break;for(var rn=0,Qn=0,vr=It[0],Br=hn[0],Xr=Math.min(vr.length,Br.length);rn<Xr&&vr.charCodeAt(rn)==Br.charCodeAt(rn);)++rn;for(var ai=Ht(It),Zr=Ht(hn),oi=Math.min(ai.length-(It.length==1?rn:0),Zr.length-(hn.length==1?rn:0));Qn<oi&&ai.charCodeAt(ai.length-Qn-1)==Zr.charCodeAt(Zr.length-Qn-1);)++Qn;if(It.length==1&&hn.length==1&&ye==te.line)for(;rn&&rn>te.ch&&ai.charCodeAt(ai.length-Qn-1)==Zr.charCodeAt(Zr.length-Qn-1);)rn--,Qn++;It[It.length-1]=ai.slice(0,ai.length-Qn).replace(/^\u200b+/,""),It[0]=It[0].slice(rn).replace(/\u200b+$/,"");var Ki=ot(ye,rn),ji=ot(Ne,hn.length?Ht(hn).length-Qn:0);if(It.length>1||It[0]||Ct(Ki,ji))return ec(x.doc,It,Ki,ji,"+input"),!0},Ya.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ya.prototype.reset=function(){this.forceCompositionEnd()},Ya.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ya.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))},Ya.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&ga(this.cm,function(){return Ri(x.cm)})},Ya.prototype.setUneditable=function(x){x.contentEditable="false"},Ya.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||za(this.cm,pd)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},Ya.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},Ya.prototype.onContextMenu=function(){},Ya.prototype.resetPosition=function(){},Ya.prototype.needsContentAttribute=!0;function yf(x,z){var ne=ca(x,z.line);if(!ne||ne.hidden)return null;var te=tn(x.doc,z.line),ie=Ba(ne,te,z.line),ce=xr(te,x.doc.direction),ye="left";if(ce){var Me=jt(ce,z.ch);ye=Me%2?"right":"left"}var Pe=ki(ie.map,z.ch,ye);return Pe.offset=Pe.collapse=="right"?Pe.end:Pe.start,Pe}function ch(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function cc(x,z){return z&&(x.bad=!0),x}function uh(x,z,ne,te,ie){var ce="",ye=!1,Me=x.doc.lineSeparator(),Pe=!1;function Ne(rn){return function(Qn){return Qn.id==rn}}function bt(){ye&&(ce+=Me,Pe&&(ce+=Me),ye=Pe=!1)}function It(rn){rn&&(bt(),ce+=rn)}function hn(rn){if(rn.nodeType==1){var Qn=rn.getAttribute("cm-text");if(Qn){It(Qn);return}var vr=rn.getAttribute("cm-marker"),Br;if(vr){var Xr=x.findMarks(ot(te,0),ot(ie+1,0),Ne(+vr));Xr.length&&(Br=Xr[0].find(0))&&It(Un(x.doc,Br.from,Br.to).join(Me));return}if(rn.getAttribute("contenteditable")=="false")return;var ai=/^(pre|div|p|li|table|br)$/i.test(rn.nodeName);if(!/^br$/i.test(rn.nodeName)&&rn.textContent.length==0)return;ai&&bt();for(var Zr=0;Zr<rn.childNodes.length;Zr++)hn(rn.childNodes[Zr]);/^(pre|p)$/i.test(rn.nodeName)&&(Pe=!0),ai&&(ye=!0)}else rn.nodeType==3&&It(rn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;hn(z),z!=ne;)z=z.nextSibling,Pe=!1;return ce}function Mu(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return cc(x.clipPos(ot(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 ce=x.display.view[ie];if(ce.node==te)return dh(ce,z,ne)}}function dh(x,z,ne){var te=x.text.firstChild,ie=!1;if(!z||!Ft(te,z))return cc(ot(er(x.line),0),!0);if(z==te&&(ie=!0,z=te.childNodes[ne],ne=0,!z)){var ce=x.rest?Ht(x.rest):x.line;return cc(ot(er(ce),ce.text.length),ie)}var ye=z.nodeType==3?z:null,Me=z;for(!ye&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(ye=z.firstChild,ne&&(ne=ye.nodeValue.length));Me.parentNode!=te;)Me=Me.parentNode;var Pe=x.measure,Ne=Pe.maps;function bt(Br,Xr,ai){for(var Zr=-1;Zr<(Ne?Ne.length:0);Zr++)for(var oi=Zr<0?Pe.map:Ne[Zr],Ki=0;Ki<oi.length;Ki+=3){var ji=oi[Ki+2];if(ji==Br||ji==Xr){var ba=er(Zr<0?x.line:x.rest[Zr]),to=oi[Ki]+ai;return(ai<0||ji!=Br)&&(to=oi[Ki+(ai?1:0)]),ot(ba,to)}}}var It=bt(ye,Me,ne);if(It)return cc(It,ie);for(var hn=Me.nextSibling,rn=ye?ye.nodeValue.length-ne:0;hn;hn=hn.nextSibling){if(It=bt(hn,hn.firstChild,0),It)return cc(ot(It.line,It.ch-rn),ie);rn+=hn.textContent.length}for(var Qn=Me.previousSibling,vr=ne;Qn;Qn=Qn.previousSibling){if(It=bt(Qn,Qn.firstChild,-1),It)return cc(ot(It.line,It.ch+vr),ie);vr+=Qn.textContent.length}}var eo=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new Le,this.hasSelection=!1,this.composing=null};eo.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),ht&&(ie.style.width="0px"),pn(ie,"input",function(){ve&&Te>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),pn(ie,"paste",function(ye){Kt(te,ye)||md(ye,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function ce(ye){if(!Kt(te,ye)){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var Me=lc(te);bl({lineWise:!0,text:Me.text}),ye.type=="cut"?te.setSelections(Me.ranges,null,nt):(ne.prevInput="",ie.value=Me.text.join(`
|
|
|
`),en(ie))}else return;ye.type=="cut"&&(te.state.cutIncoming=+new Date)}}pn(ie,"cut",ce),pn(ie,"copy",ce),pn(x.scroller,"paste",function(ye){if(!(Ji(x,ye)||Kt(te,ye))){if(!ie.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var Me=new Event("paste");Me.clipboardData=ye.clipboardData,ie.dispatchEvent(Me)}}),pn(x.lineSpace,"selectstart",function(ye){Ji(x,ye)||Sr(ye)}),pn(ie,"compositionstart",function(){var ye=te.getCursor("from");ne.composing&&ne.composing.range.clear(),ne.composing={start:ye,range:te.markText(ye,te.getCursor("to"),{className:"CodeMirror-composing"})}}),pn(ie,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},eo.prototype.createField=function(x){this.wrapper=vd(),this.textarea=this.wrapper.firstChild},eo.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},eo.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=ps(x);if(x.options.moveInputWithCursor){var ie=ha(x,ne.sel.primary().head,"div"),ce=z.wrapper.getBoundingClientRect(),ye=z.lineDiv.getBoundingClientRect();te.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,ie.top+ye.top-ce.top)),te.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,ie.left+ye.left-ce.left))}return te},eo.prototype.showSelection=function(x){var z=this.cm,ne=z.display;St(ne.cursorDiv,x.cursors),St(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},eo.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&&en(this.textarea),ve&&Te>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",ve&&Te>=9&&(this.hasSelection=null))}},eo.prototype.getField=function(){return this.textarea},eo.prototype.supportsTouch=function(){return!1},eo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||Dt()!=this.textarea))try{this.textarea.focus()}catch(x){}},eo.prototype.blur=function(){this.textarea.blur()},eo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},eo.prototype.receivedFocus=function(){this.slowPoll()},eo.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},eo.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)},eo.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||Sn(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(ve&&Te>=9&&this.hasSelection===ie||Ee&&/[\uf700-\uf7ff]/.test(ie))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var ce=ie.charCodeAt(0);if(ce==8203&&!te&&(te="\u200B"),ce==8666)return this.reset(),this.cm.execCommand("undo")}for(var ye=0,Me=Math.min(te.length,ie.length);ye<Me&&te.charCodeAt(ye)==ie.charCodeAt(ye);)++ye;return ga(z,function(){pd(z,ie.slice(ye),te.length-ye,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},eo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},eo.prototype.onKeyPress=function(){ve&&Te>=9&&(this.hasSelection=null),this.fastPoll()},eo.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ie=z.textarea;z.contextMenuPending&&z.contextMenuPending();var ce=Ao(ne,x),ye=te.scroller.scrollTop;if(!ce||De)return;var Me=ne.options.resetSelectionOnContextMenu;Me&&ne.doc.sel.contains(ce)==-1&&za(ne,To)(ne.doc,Ps(ce),nt);var Pe=ie.style.cssText,Ne=z.wrapper.style.cssText,bt=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ie.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(x.clientY-bt.top-5)+"px; left: "+(x.clientX-bt.left-5)+`px;
|
|
|
z-index: 1000; background: `+(ve?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var It;_e&&(It=window.scrollY),te.input.focus(),_e&&window.scrollTo(null,It),te.input.reset(),ne.somethingSelected()||(ie.value=z.prevInput=" "),z.contextMenuPending=rn,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function hn(){if(ie.selectionStart!=null){var vr=ne.somethingSelected(),Br="\u200B"+(vr?ie.value:"");ie.value="\u21DA",ie.value=Br,z.prevInput=vr?"":"\u200B",ie.selectionStart=1,ie.selectionEnd=Br.length,te.selForContextMenu=ne.doc.sel}}function rn(){if(z.contextMenuPending==rn&&(z.contextMenuPending=!1,z.wrapper.style.cssText=Ne,ie.style.cssText=Pe,ve&&Te<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=ye),ie.selectionStart!=null)){(!ve||ve&&Te<9)&&hn();var vr=0,Br=function(){te.selForContextMenu==ne.doc.sel&&ie.selectionStart==0&&ie.selectionEnd>0&&z.prevInput=="\u200B"?za(ne,td)(ne):vr++<10?te.detectingSelectAll=setTimeout(Br,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout(Br,200)}}if(ve&&Te>=9&&hn(),Ce){Pr(x);var Qn=function(){Rr(window,"mouseup",Qn),setTimeout(rn,20)};pn(window,"mouseup",Qn)}else setTimeout(rn,50)},eo.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},eo.prototype.setUneditable=function(){},eo.prototype.needsContentAttribute=!1;function Hl(x,z){if(z=z?yn(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=Dt();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=Me.getValue()}var ie;if(x.form&&(pn(x.form,"submit",te),!z.leaveSubmitMethodAlone)){var ce=x.form;ie=ce.submit;try{var ye=ce.submit=function(){te(),ce.submit=ie,ce.submit(),ce.submit=ye}}catch(Pe){}}z.finishInit=function(Pe){Pe.save=te,Pe.getTextArea=function(){return x},Pe.toTextArea=function(){Pe.toTextArea=isNaN,te(),x.parentNode.removeChild(Pe.getWrapperElement()),x.style.display="",x.form&&(Rr(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ie))}},x.style.display="none";var Me=ia(function(Pe){return x.parentNode.insertBefore(Pe,x.nextSibling)},z);return Me}function uc(x){x.off=Rr,x.on=pn,x.wheelEventPixels=Gu,x.Doc=Eo,x.splitLines=vt,x.countColumn=Ve,x.findColumn=Rn,x.isWordChar=pe,x.Pass=dn,x.signal=rt,x.Line=zn,x.changeEnd=Js,x.scrollbarModel=Yl,x.Pos=ot,x.cmpPos=Ct,x.modes=qn,x.mimeModes=hr,x.resolveMode=ct,x.getMode=Tt,x.modeExtensions=Wt,x.extendMode=He,x.copyState=pt,x.startState=Ot,x.innerMode=$t,x.commands=ac,x.keyMap=Qa,x.keyName=zl,x.isModifierKey=Ic,x.lookupKey=rl,x.normalizeKeyMap=od,x.StringStream=Jt,x.SharedTextMarker=ya,x.TextMarker=hl,x.LineWidget=nc,x.e_preventDefault=Sr,x.e_stopPropagation=Ar,x.e_stop=Pr,x.addClass=an,x.contains=Ft,x.rmClass=Ue,x.keyNames=Os}oh(ia),yd(ia);var ol="iter insert remove copy getEditor constructor".split(" ");for(var _s in Eo.prototype)Eo.prototype.hasOwnProperty(_s)&&Bt(ol,_s)<0&&(ia.prototype[_s]=function(x){return function(){return x.apply(this.doc,arguments)}}(Eo.prototype[_s]));return tr(Eo),ia.inputStyles={textarea:eo,contenteditable:Ya},ia.defineMode=function(x){!ia.defaults.mode&&x!="null"&&(ia.defaults.mode=x),$n.apply(this,arguments)},ia.defineMIME=Xe,ia.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),ia.defineMIME("text/plain","null"),ia.defineExtension=function(x,z){ia.prototype[x]=z},ia.defineDocExtension=function(x,z){Eo.prototype[x]=z},ia.fromTextArea=Hl,uc(ia),ia.version="5.58.2",ia})},49047:function(En,Yt,se){(function(fe){fe(se(4631),se(29589),se(52539))})(function(fe){"use strict";fe.defineMode("markdown",function(We,Be){var Je=fe.getMode(We,"text/html"),ve=Je.name=="null";function Te(Ve){if(fe.findModeByName){var Le=fe.findModeByName(Ve);Le&&(Ve=Le.mime||Le.mimes[0])}var Bt=fe.getMode(We,Ve);return Bt.name=="null"?null:Bt}Be.highlightFormatting===void 0&&(Be.highlightFormatting=!1),Be.maxBlockquoteDepth===void 0&&(Be.maxBlockquoteDepth=0),Be.taskLists===void 0&&(Be.taskLists=!1),Be.strikethrough===void 0&&(Be.strikethrough=!1),Be.emoji===void 0&&(Be.emoji=!1),Be.fencedCodeBlockHighlighting===void 0&&(Be.fencedCodeBlockHighlighting=!0),Be.fencedCodeBlockDefaultMode===void 0&&(Be.fencedCodeBlockDefaultMode="text/plain"),Be.xml===void 0&&(Be.xml=!0),Be.tokenTypeOverrides===void 0&&(Be.tokenTypeOverrides={});var _e={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 _e)_e.hasOwnProperty(we)&&Be.tokenTypeOverrides[we]&&(_e[we]=Be.tokenTypeOverrides[we]);var me=/^([*\-_])(?:\s*\1){2,}\s*$/,De=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,at=/^\[(x| )\](?=\s)/i,Oe=Be.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Mt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ht=/^[^#!\[\]*_\\<>` "'(~:]+/,lt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,Ee=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,yt=" ";function Vt(Ve,Le,Bt){return Le.f=Le.inline=Bt,Bt(Ve,Le)}function qe(Ve,Le,Bt){return Le.f=Le.block=Bt,Bt(Ve,Le)}function ut(Ve){return!Ve||!/\S/.test(Ve.string)}function Ce(Ve){if(Ve.linkTitle=!1,Ve.linkHref=!1,Ve.linkText=!1,Ve.em=!1,Ve.strong=!1,Ve.strikethrough=!1,Ve.quote=0,Ve.indentedCode=!1,Ve.f==Ue){var Le=ve;if(!Le){var Bt=fe.innerMode(Je,Ve.htmlState);Le=Bt.mode.name=="xml"&&Bt.state.tagStart===null&&!Bt.state.context&&Bt.state.tokenize.isInText}Le&&(Ve.f=Pt,Ve.block=xe,Ve.htmlState=null)}return Ve.trailingSpace=0,Ve.trailingSpaceNewLine=!1,Ve.prevLine=Ve.thisLine,Ve.thisLine={stream:null},null}function xe(Ve,Le){var Bt=Ve.column()===Le.indentation,Dn=ut(Le.prevLine.stream),dn=Le.indentedCode,nt=Le.prevLine.hr,ft=Le.list!==!1,Xt=(Le.listStack[Le.listStack.length-1]||0)+3;Le.indentedCode=!1;var Rn=Le.indentation;if(Le.indentationDiff===null&&(Le.indentationDiff=Le.indentation,ft)){for(Le.list=null;Rn<Le.listStack[Le.listStack.length-1];)Le.listStack.pop(),Le.listStack.length?Le.indentation=Le.listStack[Le.listStack.length-1]:Le.list=!1;Le.list!==!1&&(Le.indentationDiff=Rn-Le.listStack[Le.listStack.length-1])}var wn=!Dn&&!nt&&!Le.prevLine.header&&(!ft||!dn)&&!Le.prevLine.fencedCodeEnd,Zt=(Le.list===!1||nt||Dn)&&Le.indentation<=Xt&&Ve.match(me),Ht=null;if(Le.indentationDiff>=4&&(dn||Le.prevLine.fencedCodeEnd||Le.prevLine.header||Dn))return Ve.skipToEnd(),Le.indentedCode=!0,_e.code;if(Ve.eatSpace())return null;if(Bt&&Le.indentation<=Xt&&(Ht=Ve.match(Oe))&&Ht[1].length<=6)return Le.quote=0,Le.header=Ht[1].length,Le.thisLine.header=!0,Be.highlightFormatting&&(Le.formatting="header"),Le.f=Le.inline,St(Le);if(Le.indentation<=Xt&&Ve.eat(">"))return Le.quote=Bt?1:Le.quote+1,Be.highlightFormatting&&(Le.formatting="quote"),Ve.eatSpace(),St(Le);if(!Zt&&!Le.setext&&Bt&&Le.indentation<=Xt&&(Ht=Ve.match(De))){var Tn=Ht[1]?"ol":"ul";return Le.indentation=Rn+Ve.current().length,Le.list=!0,Le.quote=0,Le.listStack.push(Le.indentation),Le.em=!1,Le.strong=!1,Le.code=!1,Le.strikethrough=!1,Be.taskLists&&Ve.match(at,!1)&&(Le.taskList=!0),Le.f=Le.inline,Be.highlightFormatting&&(Le.formatting=["list","list-"+Tn]),St(Le)}else{if(Bt&&Le.indentation<=Xt&&(Ht=Ve.match(lt,!0)))return Le.quote=0,Le.fencedEndRE=new RegExp(Ht[1]+"+ *$"),Le.localMode=Be.fencedCodeBlockHighlighting&&Te(Ht[2]||Be.fencedCodeBlockDefaultMode),Le.localMode&&(Le.localState=fe.startState(Le.localMode)),Le.f=Le.block=Ze,Be.highlightFormatting&&(Le.formatting="code-block"),Le.code=-1,St(Le);if(Le.setext||(!wn||!ft)&&!Le.quote&&Le.list===!1&&!Le.code&&!Zt&&!et.test(Ve.string)&&(Ht=Ve.lookAhead(1))&&(Ht=Ht.match(Mt)))return Le.setext?(Le.header=Le.setext,Le.setext=0,Ve.skipToEnd(),Be.highlightFormatting&&(Le.formatting="header")):(Le.header=Ht[0].charAt(0)=="="?1:2,Le.setext=Le.header),Le.thisLine.header=!0,Le.f=Le.inline,St(Le);if(Zt)return Ve.skipToEnd(),Le.hr=!0,Le.thisLine.hr=!0,_e.hr;if(Ve.peek()==="[")return Vt(Ve,Le,it)}return Vt(Ve,Le,Le.inline)}function Ue(Ve,Le){var Bt=Je.token(Ve,Le.htmlState);if(!ve){var Dn=fe.innerMode(Je,Le.htmlState);(Dn.mode.name=="xml"&&Dn.state.tagStart===null&&!Dn.state.context&&Dn.state.tokenize.isInText||Le.md_inside&&Ve.current().indexOf(">")>-1)&&(Le.f=Pt,Le.block=xe,Le.htmlState=null)}return Bt}function Ze(Ve,Le){var Bt=Le.listStack[Le.listStack.length-1]||0,Dn=Le.indentation<Bt,dn=Bt+3;if(Le.fencedEndRE&&Le.indentation<=dn&&(Dn||Ve.match(Le.fencedEndRE))){Be.highlightFormatting&&(Le.formatting="code-block");var nt;return Dn||(nt=St(Le)),Le.localMode=Le.localState=null,Le.block=xe,Le.f=Pt,Le.fencedEndRE=null,Le.code=0,Le.thisLine.fencedCodeEnd=!0,Dn?qe(Ve,Le,Le.block):nt}else return Le.localMode?Le.localMode.token(Ve,Le.localState):(Ve.skipToEnd(),_e.code)}function St(Ve){var Le=[];if(Ve.formatting){Le.push(_e.formatting),typeof Ve.formatting=="string"&&(Ve.formatting=[Ve.formatting]);for(var Bt=0;Bt<Ve.formatting.length;Bt++)Le.push(_e.formatting+"-"+Ve.formatting[Bt]),Ve.formatting[Bt]==="header"&&Le.push(_e.formatting+"-"+Ve.formatting[Bt]+"-"+Ve.header),Ve.formatting[Bt]==="quote"&&(!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=Ve.quote?Le.push(_e.formatting+"-"+Ve.formatting[Bt]+"-"+Ve.quote):Le.push("error"))}if(Ve.taskOpen)return Le.push("meta"),Le.length?Le.join(" "):null;if(Ve.taskClosed)return Le.push("property"),Le.length?Le.join(" "):null;if(Ve.linkHref?Le.push(_e.linkHref,"url"):(Ve.strong&&Le.push(_e.strong),Ve.em&&Le.push(_e.em),Ve.strikethrough&&Le.push(_e.strikethrough),Ve.emoji&&Le.push(_e.emoji),Ve.linkText&&Le.push(_e.linkText),Ve.code&&Le.push(_e.code),Ve.image&&Le.push(_e.image),Ve.imageAltText&&Le.push(_e.imageAltText,"link"),Ve.imageMarker&&Le.push(_e.imageMarker)),Ve.header&&Le.push(_e.header,_e.header+"-"+Ve.header),Ve.quote&&(Le.push(_e.quote),!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=Ve.quote?Le.push(_e.quote+"-"+Ve.quote):Le.push(_e.quote+"-"+Be.maxBlockquoteDepth)),Ve.list!==!1){var Dn=(Ve.listStack.length-1)%3;Dn?Dn===1?Le.push(_e.list2):Le.push(_e.list3):Le.push(_e.list1)}return Ve.trailingSpaceNewLine?Le.push("trailing-space-new-line"):Ve.trailingSpace&&Le.push("trailing-space-"+(Ve.trailingSpace%2?"a":"b")),Le.length?Le.join(" "):null}function mt(Ve,Le){if(Ve.match(ht,!0))return St(Le)}function Pt(Ve,Le){var Bt=Le.text(Ve,Le);if(typeof Bt!="undefined")return Bt;if(Le.list)return Le.list=null,St(Le);if(Le.taskList){var Dn=Ve.match(at,!0)[1]===" ";return Dn?Le.taskOpen=!0:Le.taskClosed=!0,Be.highlightFormatting&&(Le.formatting="task"),Le.taskList=!1,St(Le)}if(Le.taskOpen=!1,Le.taskClosed=!1,Le.header&&Ve.match(/^#+$/,!0))return Be.highlightFormatting&&(Le.formatting="header"),St(Le);var dn=Ve.next();if(Le.linkTitle){Le.linkTitle=!1;var nt=dn;dn==="("&&(nt=")"),nt=(nt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ft="^\\s*(?:[^"+nt+"\\\\]+|\\\\\\\\|\\\\.)"+nt;if(Ve.match(new RegExp(ft),!0))return _e.linkHref}if(dn==="`"){var Xt=Le.formatting;Be.highlightFormatting&&(Le.formatting="code"),Ve.eatWhile("`");var Rn=Ve.current().length;if(Le.code==0&&(!Le.quote||Rn==1))return Le.code=Rn,St(Le);if(Rn==Le.code){var wn=St(Le);return Le.code=0,wn}else return Le.formatting=Xt,St(Le)}else if(Le.code)return St(Le);if(dn==="\\"&&(Ve.next(),Be.highlightFormatting)){var Zt=St(Le),Ht=_e.formatting+"-escape";return Zt?Zt+" "+Ht:Ht}if(dn==="!"&&Ve.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Le.imageMarker=!0,Le.image=!0,Be.highlightFormatting&&(Le.formatting="image"),St(Le);if(dn==="["&&Le.imageMarker&&Ve.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Le.imageMarker=!1,Le.imageAltText=!0,Be.highlightFormatting&&(Le.formatting="image"),St(Le);if(dn==="]"&&Le.imageAltText){Be.highlightFormatting&&(Le.formatting="image");var Zt=St(Le);return Le.imageAltText=!1,Le.image=!1,Le.inline=Le.f=Ft,Zt}if(dn==="["&&!Le.image)return Le.linkText&&Ve.match(/^.*?\]/)||(Le.linkText=!0,Be.highlightFormatting&&(Le.formatting="link")),St(Le);if(dn==="]"&&Le.linkText){Be.highlightFormatting&&(Le.formatting="link");var Zt=St(Le);return Le.linkText=!1,Le.inline=Le.f=Ve.match(/\(.*?\)| ?\[.*?\]/,!1)?Ft:Pt,Zt}if(dn==="<"&&Ve.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Le.f=Le.inline=Qe,Be.highlightFormatting&&(Le.formatting="link");var Zt=St(Le);return Zt?Zt+=" ":Zt="",Zt+_e.linkInline}if(dn==="<"&&Ve.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Le.f=Le.inline=Qe,Be.highlightFormatting&&(Le.formatting="link");var Zt=St(Le);return Zt?Zt+=" ":Zt="",Zt+_e.linkEmail}if(Be.xml&&dn==="<"&&Ve.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Tn=Ve.string.indexOf(">",Ve.pos);if(Tn!=-1){var xn=Ve.string.substring(Ve.start,Tn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(xn)&&(Le.md_inside=!0)}return Ve.backUp(1),Le.htmlState=fe.startState(Je),qe(Ve,Le,Ue)}if(Be.xml&&dn==="<"&&Ve.match(/^\/\w*?>/))return Le.md_inside=!1,"tag";if(dn==="*"||dn==="_"){for(var ke=1,ue=Ve.pos==1?" ":Ve.string.charAt(Ve.pos-2);ke<3&&Ve.eat(dn);)ke++;var le=Ve.peek()||" ",pe=!/\s/.test(le)&&(!Ee.test(le)||/\s/.test(ue)||Ee.test(ue)),he=!/\s/.test(ue)&&(!Ee.test(ue)||/\s/.test(le)||Ee.test(le)),oe=null,Ae=null;if(ke%2&&(!Le.em&&pe&&(dn==="*"||!he||Ee.test(ue))?oe=!0:Le.em==dn&&he&&(dn==="*"||!pe||Ee.test(le))&&(oe=!1)),ke>1&&(!Le.strong&&pe&&(dn==="*"||!he||Ee.test(ue))?Ae=!0:Le.strong==dn&&he&&(dn==="*"||!pe||Ee.test(le))&&(Ae=!1)),Ae!=null||oe!=null){Be.highlightFormatting&&(Le.formatting=oe==null?"strong":Ae==null?"em":"strong em"),oe===!0&&(Le.em=dn),Ae===!0&&(Le.strong=dn);var wn=St(Le);return oe===!1&&(Le.em=!1),Ae===!1&&(Le.strong=!1),wn}}else if(dn===" "&&(Ve.eat("*")||Ve.eat("_"))){if(Ve.peek()===" ")return St(Le);Ve.backUp(1)}if(Be.strikethrough){if(dn==="~"&&Ve.eatWhile(dn)){if(Le.strikethrough){Be.highlightFormatting&&(Le.formatting="strikethrough");var wn=St(Le);return Le.strikethrough=!1,wn}else if(Ve.match(/^[^\s]/,!1))return Le.strikethrough=!0,Be.highlightFormatting&&(Le.formatting="strikethrough"),St(Le)}else if(dn===" "&&Ve.match(/^~~/,!0)){if(Ve.peek()===" ")return St(Le);Ve.backUp(2)}}if(Be.emoji&&dn===":"&&Ve.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Le.emoji=!0,Be.highlightFormatting&&(Le.formatting="emoji");var Ge=St(Le);return Le.emoji=!1,Ge}return dn===" "&&(Ve.match(/^ +$/,!1)?Le.trailingSpace++:Le.trailingSpace&&(Le.trailingSpaceNewLine=!0)),St(Le)}function Qe(Ve,Le){var Bt=Ve.next();if(Bt===">"){Le.f=Le.inline=Pt,Be.highlightFormatting&&(Le.formatting="link");var Dn=St(Le);return Dn?Dn+=" ":Dn="",Dn+_e.linkInline}return Ve.match(/^[^>]+/,!0),_e.linkInline}function Ft(Ve,Le){if(Ve.eatSpace())return null;var Bt=Ve.next();return Bt==="("||Bt==="["?(Le.f=Le.inline=an(Bt==="("?")":"]"),Be.highlightFormatting&&(Le.formatting="link-string"),Le.linkHref=!0,St(Le)):"error"}var Dt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function an(Ve){return function(Le,Bt){var Dn=Le.next();if(Dn===Ve){Bt.f=Bt.inline=Pt,Be.highlightFormatting&&(Bt.formatting="link-string");var dn=St(Bt);return Bt.linkHref=!1,dn}return Le.match(Dt[Ve]),Bt.linkHref=!0,St(Bt)}}function it(Ve,Le){return Ve.match(/^([^\]\\]|\\.)*\]:/,!1)?(Le.f=en,Ve.next(),Be.highlightFormatting&&(Le.formatting="link"),Le.linkText=!0,St(Le)):Vt(Ve,Le,Pt)}function en(Ve,Le){if(Ve.match(/^\]:/,!0)){Le.f=Le.inline=_n,Be.highlightFormatting&&(Le.formatting="link");var Bt=St(Le);return Le.linkText=!1,Bt}return Ve.match(/^([^\]\\]|\\.)+/,!0),_e.linkText}function _n(Ve,Le){return Ve.eatSpace()?null:(Ve.match(/^[^\s]+/,!0),Ve.peek()===void 0?Le.linkTitle=!0:Ve.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Le.f=Le.inline=Pt,_e.linkHref+" url")}var yn={startState:function(){return{f:xe,prevLine:{stream:null},thisLine:{stream:null},block:xe,htmlState:null,indentation:0,inline:Pt,text:mt,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(Ve){return{f:Ve.f,prevLine:Ve.prevLine,thisLine:Ve.thisLine,block:Ve.block,htmlState:Ve.htmlState&&fe.copyState(Je,Ve.htmlState),indentation:Ve.indentation,localMode:Ve.localMode,localState:Ve.localMode?fe.copyState(Ve.localMode,Ve.localState):null,inline:Ve.inline,text:Ve.text,formatting:!1,linkText:Ve.linkText,linkTitle:Ve.linkTitle,linkHref:Ve.linkHref,code:Ve.code,em:Ve.em,strong:Ve.strong,strikethrough:Ve.strikethrough,emoji:Ve.emoji,header:Ve.header,setext:Ve.setext,hr:Ve.hr,taskList:Ve.taskList,list:Ve.list,listStack:Ve.listStack.slice(0),quote:Ve.quote,indentedCode:Ve.indentedCode,trailingSpace:Ve.trailingSpace,trailingSpaceNewLine:Ve.trailingSpaceNewLine,md_inside:Ve.md_inside,fencedEndRE:Ve.fencedEndRE}},token:function(Ve,Le){if(Le.formatting=!1,Ve!=Le.thisLine.stream){if(Le.header=0,Le.hr=!1,Ve.match(/^\s*$/,!0))return Ce(Le),null;if(Le.prevLine=Le.thisLine,Le.thisLine={stream:Ve},Le.taskList=!1,Le.trailingSpace=0,Le.trailingSpaceNewLine=!1,!Le.localState&&(Le.f=Le.block,Le.f!=Ue)){var Bt=Ve.match(/^\s*/,!0)[0].replace(/\t/g,yt).length;if(Le.indentation=Bt,Le.indentationDiff=null,Bt>0)return null}}return Le.f(Ve,Le)},innerMode:function(Ve){return Ve.block==Ue?{state:Ve.htmlState,mode:Je}:Ve.localState?{state:Ve.localState,mode:Ve.localMode}:{state:Ve,mode:yn}},indent:function(Ve,Le,Bt){return Ve.block==Ue&&Je.indent?Je.indent(Ve.htmlState,Le,Bt):Ve.localState&&Ve.localMode.indent?Ve.localMode.indent(Ve.localState,Le,Bt):fe.Pass},blankLine:Ce,getType:St,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return yn},"xml"),fe.defineMIME("text/markdown","markdown"),fe.defineMIME("text/x-markdown","markdown")})},52539:function(En,Yt,se){(function(fe){fe(se(4631))})(function(fe){"use strict";fe.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<fe.modeInfo.length;We++){var Be=fe.modeInfo[We];Be.mimes&&(Be.mime=Be.mimes[0])}fe.findModeByMIME=function(Je){Je=Je.toLowerCase();for(var ve=0;ve<fe.modeInfo.length;ve++){var Te=fe.modeInfo[ve];if(Te.mime==Je)return Te;if(Te.mimes){for(var _e=0;_e<Te.mimes.length;_e++)if(Te.mimes[_e]==Je)return Te}}if(/\+xml$/.test(Je))return fe.findModeByMIME("application/xml");if(/\+json$/.test(Je))return fe.findModeByMIME("application/json")},fe.findModeByExtension=function(Je){Je=Je.toLowerCase();for(var ve=0;ve<fe.modeInfo.length;ve++){var Te=fe.modeInfo[ve];if(Te.ext){for(var _e=0;_e<Te.ext.length;_e++)if(Te.ext[_e]==Je)return Te}}},fe.findModeByFileName=function(Je){for(var ve=0;ve<fe.modeInfo.length;ve++){var Te=fe.modeInfo[ve];if(Te.file&&Te.file.test(Je))return Te}var _e=Je.lastIndexOf("."),we=_e>-1&&Je.substring(_e+1,Je.length);if(we)return fe.findModeByExtension(we)},fe.findModeByName=function(Je){Je=Je.toLowerCase();for(var ve=0;ve<fe.modeInfo.length;ve++){var Te=fe.modeInfo[ve];if(Te.name.toLowerCase()==Je)return Te;if(Te.alias){for(var _e=0;_e<Te.alias.length;_e++)if(Te.alias[_e].toLowerCase()==Je)return Te}}}})},80785:function(En,Yt,se){(function(fe){fe(se(4631))})(function(fe){"use strict";fe.defineMode("stex",function(We,Be){"use strict";function Je(ht,lt){ht.cmdState.push(lt)}function ve(ht){return ht.cmdState.length>0?ht.cmdState[ht.cmdState.length-1]:null}function Te(ht){var lt=ht.cmdState.pop();lt&<.closeBracket()}function _e(ht){for(var lt=ht.cmdState,et=lt.length-1;et>=0;et--){var Ee=lt[et];if(Ee.name!="DEFAULT")return Ee}return{styleIdentifier:function(){return null}}}function we(ht,lt,et){return function(){this.name=ht,this.bracketNo=0,this.style=lt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var me={};me.importmodule=we("importmodule","tag",["string","builtin"]),me.documentclass=we("documentclass","tag",["","atom"]),me.usepackage=we("usepackage","tag",["atom"]),me.begin=we("begin","tag",["atom"]),me.end=we("end","tag",["atom"]),me.label=we("label","tag",["atom"]),me.ref=we("ref","tag",["atom"]),me.eqref=we("eqref","tag",["atom"]),me.cite=we("cite","tag",["atom"]),me.bibitem=we("bibitem","tag",["atom"]),me.Bibitem=we("Bibitem","tag",["atom"]),me.RBibitem=we("RBibitem","tag",["atom"]),me.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function De(ht,lt){ht.f=lt}function at(ht,lt){var et;if(ht.match(/^\\[a-zA-Z@]+/)){var Ee=ht.current().slice(1);return et=me.hasOwnProperty(Ee)?me[Ee]:me.DEFAULT,et=new et,Je(lt,et),De(lt,Mt),et.style}if(ht.match(/^\\[$&%#{}_]/)||ht.match(/^\\[,;!\/\\]/))return"tag";if(ht.match("\\["))return De(lt,function(Vt,qe){return Oe(Vt,qe,"\\]")}),"keyword";if(ht.match("\\("))return De(lt,function(Vt,qe){return Oe(Vt,qe,"\\)")}),"keyword";if(ht.match("$$"))return De(lt,function(Vt,qe){return Oe(Vt,qe,"$$")}),"keyword";if(ht.match("$"))return De(lt,function(Vt,qe){return Oe(Vt,qe,"$")}),"keyword";var yt=ht.next();if(yt=="%")return ht.skipToEnd(),"comment";if(yt=="}"||yt=="]"){if(et=ve(lt),et)et.closeBracket(yt),De(lt,Mt);else return"error";return"bracket"}else return yt=="{"||yt=="["?(et=me.DEFAULT,et=new et,Je(lt,et),"bracket"):/\d/.test(yt)?(ht.eatWhile(/[\w.%]/),"atom"):(ht.eatWhile(/[\w\-_]/),et=_e(lt),et.name=="begin"&&(et.argument=ht.current()),et.styleIdentifier())}function Oe(ht,lt,et){if(ht.eatSpace())return null;if(et&&ht.match(et))return De(lt,at),"keyword";if(ht.match(/^\\[a-zA-Z@]+/))return"tag";if(ht.match(/^[a-zA-Z]+/))return"variable-2";if(ht.match(/^\\[$&%#{}_]/)||ht.match(/^\\[,;!\/]/)||ht.match(/^[\^_&]/))return"tag";if(ht.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ht.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ee=ht.next();return Ee=="{"||Ee=="}"||Ee=="["||Ee=="]"||Ee=="("||Ee==")"?"bracket":Ee=="%"?(ht.skipToEnd(),"comment"):"error"}function Mt(ht,lt){var et=ht.peek(),Ee;return et=="{"||et=="["?(Ee=ve(lt),Ee.openBracket(et),ht.eat(et),De(lt,at),"bracket"):/[ \t\r]/.test(et)?(ht.eat(et),null):(De(lt,at),Te(lt),at(ht,lt))}return{startState:function(){var ht=Be.inMathMode?function(lt,et){return Oe(lt,et)}:at;return{cmdState:[],f:ht}},copyState:function(ht){return{cmdState:ht.cmdState.slice(),f:ht.f}},token:function(ht,lt){return lt.f(ht,lt)},blankLine:function(ht){ht.f=at,ht.cmdState.length=0},lineComment:"%"}}),fe.defineMIME("text/x-stex","stex"),fe.defineMIME("text/x-latex","stex")})},29589:function(En,Yt,se){(function(fe){fe(se(4631))})(function(fe){"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},Be={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};fe.defineMode("xml",function(Je,ve){var Te=Je.indentUnit,_e={},we=ve.htmlMode?We:Be;for(var me in we)_e[me]=we[me];for(var me in ve)_e[me]=ve[me];var De,at;function Oe(Qe,Ft){function Dt(en){return Ft.tokenize=en,en(Qe,Ft)}var an=Qe.next();if(an=="<")return Qe.eat("!")?Qe.eat("[")?Qe.match("CDATA[")?Dt(lt("atom","]]>")):null:Qe.match("--")?Dt(lt("comment","-->")):Qe.match("DOCTYPE",!0,!0)?(Qe.eatWhile(/[\w\._\-]/),Dt(et(1))):null:Qe.eat("?")?(Qe.eatWhile(/[\w\._\-]/),Ft.tokenize=lt("meta","?>"),"meta"):(De=Qe.eat("/")?"closeTag":"openTag",Ft.tokenize=Mt,"tag bracket");if(an=="&"){var it;return Qe.eat("#")?Qe.eat("x")?it=Qe.eatWhile(/[a-fA-F\d]/)&&Qe.eat(";"):it=Qe.eatWhile(/[\d]/)&&Qe.eat(";"):it=Qe.eatWhile(/[\w\.\-:]/)&&Qe.eat(";"),it?"atom":"error"}else return Qe.eatWhile(/[^&<]/),null}Oe.isInText=!0;function Mt(Qe,Ft){var Dt=Qe.next();if(Dt==">"||Dt=="/"&&Qe.eat(">"))return Ft.tokenize=Oe,De=Dt==">"?"endTag":"selfcloseTag","tag bracket";if(Dt=="=")return De="equals",null;if(Dt=="<"){Ft.tokenize=Oe,Ft.state=qe,Ft.tagName=Ft.tagStart=null;var an=Ft.tokenize(Qe,Ft);return an?an+" tag error":"tag error"}else return/[\'\"]/.test(Dt)?(Ft.tokenize=ht(Dt),Ft.stringStartCol=Qe.column(),Ft.tokenize(Qe,Ft)):(Qe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ht(Qe){var Ft=function(Dt,an){for(;!Dt.eol();)if(Dt.next()==Qe){an.tokenize=Mt;break}return"string"};return Ft.isInAttribute=!0,Ft}function lt(Qe,Ft){return function(Dt,an){for(;!Dt.eol();){if(Dt.match(Ft)){an.tokenize=Oe;break}Dt.next()}return Qe}}function et(Qe){return function(Ft,Dt){for(var an;(an=Ft.next())!=null;){if(an=="<")return Dt.tokenize=et(Qe+1),Dt.tokenize(Ft,Dt);if(an==">")if(Qe==1){Dt.tokenize=Oe;break}else return Dt.tokenize=et(Qe-1),Dt.tokenize(Ft,Dt)}return"meta"}}function Ee(Qe,Ft,Dt){this.prev=Qe.context,this.tagName=Ft,this.indent=Qe.indented,this.startOfLine=Dt,(_e.doNotIndent.hasOwnProperty(Ft)||Qe.context&&Qe.context.noIndent)&&(this.noIndent=!0)}function yt(Qe){Qe.context&&(Qe.context=Qe.context.prev)}function Vt(Qe,Ft){for(var Dt;;){if(!Qe.context||(Dt=Qe.context.tagName,!_e.contextGrabbers.hasOwnProperty(Dt)||!_e.contextGrabbers[Dt].hasOwnProperty(Ft)))return;yt(Qe)}}function qe(Qe,Ft,Dt){return Qe=="openTag"?(Dt.tagStart=Ft.column(),ut):Qe=="closeTag"?Ce:qe}function ut(Qe,Ft,Dt){return Qe=="word"?(Dt.tagName=Ft.current(),at="tag",Ze):_e.allowMissingTagName&&Qe=="endTag"?(at="tag bracket",Ze(Qe,Ft,Dt)):(at="error",ut)}function Ce(Qe,Ft,Dt){if(Qe=="word"){var an=Ft.current();return Dt.context&&Dt.context.tagName!=an&&_e.implicitlyClosed.hasOwnProperty(Dt.context.tagName)&&yt(Dt),Dt.context&&Dt.context.tagName==an||_e.matchClosing===!1?(at="tag",xe):(at="tag error",Ue)}else return _e.allowMissingTagName&&Qe=="endTag"?(at="tag bracket",xe(Qe,Ft,Dt)):(at="error",Ue)}function xe(Qe,Ft,Dt){return Qe!="endTag"?(at="error",xe):(yt(Dt),qe)}function Ue(Qe,Ft,Dt){return at="error",xe(Qe,Ft,Dt)}function Ze(Qe,Ft,Dt){if(Qe=="word")return at="attribute",St;if(Qe=="endTag"||Qe=="selfcloseTag"){var an=Dt.tagName,it=Dt.tagStart;return Dt.tagName=Dt.tagStart=null,Qe=="selfcloseTag"||_e.autoSelfClosers.hasOwnProperty(an)?Vt(Dt,an):(Vt(Dt,an),Dt.context=new Ee(Dt,an,it==Dt.indented)),qe}return at="error",Ze}function St(Qe,Ft,Dt){return Qe=="equals"?mt:(_e.allowMissing||(at="error"),Ze(Qe,Ft,Dt))}function mt(Qe,Ft,Dt){return Qe=="string"?Pt:Qe=="word"&&_e.allowUnquoted?(at="string",Ze):(at="error",Ze(Qe,Ft,Dt))}function Pt(Qe,Ft,Dt){return Qe=="string"?Pt:Ze(Qe,Ft,Dt)}return{startState:function(Qe){var Ft={tokenize:Oe,state:qe,indented:Qe||0,tagName:null,tagStart:null,context:null};return Qe!=null&&(Ft.baseIndent=Qe),Ft},token:function(Qe,Ft){if(!Ft.tagName&&Qe.sol()&&(Ft.indented=Qe.indentation()),Qe.eatSpace())return null;De=null;var Dt=Ft.tokenize(Qe,Ft);return(Dt||De)&&Dt!="comment"&&(at=null,Ft.state=Ft.state(De||Dt,Qe,Ft),at&&(Dt=at=="error"?Dt+" error":at)),Dt},indent:function(Qe,Ft,Dt){var an=Qe.context;if(Qe.tokenize.isInAttribute)return Qe.tagStart==Qe.indented?Qe.stringStartCol+1:Qe.indented+Te;if(an&&an.noIndent)return fe.Pass;if(Qe.tokenize!=Mt&&Qe.tokenize!=Oe)return Dt?Dt.match(/^(\s*)/)[0].length:0;if(Qe.tagName)return _e.multilineTagIndentPastTag!==!1?Qe.tagStart+Qe.tagName.length+2:Qe.tagStart+Te*(_e.multilineTagIndentFactor||1);if(_e.alignCDATA&&/<!\[CDATA\[/.test(Ft))return 0;var it=Ft&&/^<(\/)?([\w_:\.-]*)/.exec(Ft);if(it&&it[1])for(;an;)if(an.tagName==it[2]){an=an.prev;break}else if(_e.implicitlyClosed.hasOwnProperty(an.tagName))an=an.prev;else break;else if(it)for(;an;){var en=_e.contextGrabbers[an.tagName];if(en&&en.hasOwnProperty(it[2]))an=an.prev;else break}for(;an&&an.prev&&!an.startOfLine;)an=an.prev;return an?an.indent+Te:Qe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:_e.htmlMode?"html":"xml",helperType:_e.htmlMode?"html":"xml",skipAttribute:function(Qe){Qe.state==mt&&(Qe.state=Ze)},xmlCurrentTag:function(Qe){return Qe.tagName?{name:Qe.tagName,close:Qe.type=="closeTag"}:null},xmlCurrentContext:function(Qe){for(var Ft=[],Dt=Qe.context;Dt;Dt=Dt.prev)Dt.tagName&&Ft.push(Dt.tagName);return Ft.reverse()}}}),fe.defineMIME("text/xml","xml"),fe.defineMIME("application/xml","xml"),fe.mimeModes.hasOwnProperty("text/html")||fe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},15979:function(En,Yt,se){"use strict";se.d(Yt,{hP:function(){return xn}});var fe=function(ke,ue){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,pe){le.__proto__=pe}||function(le,pe){for(var he in pe)Object.prototype.hasOwnProperty.call(pe,he)&&(le[he]=pe[he])})(ke,ue)};function We(ke,ue){function le(){this.constructor=ke}fe(ke,ue),ke.prototype=ue===null?Object.create(ue):(le.prototype=ue.prototype,new le)}function Be(ke,ue,le,pe){return new(le||(le=Promise))(function(he,oe){function Ae(Rt){try{_t(pe.next(Rt))}catch(zt){oe(zt)}}function Ge(Rt){try{_t(pe.throw(Rt))}catch(zt){oe(zt)}}function _t(Rt){var zt;Rt.done?he(Rt.value):(zt=Rt.value,zt instanceof le?zt:new le(function(qt){qt(zt)})).then(Ae,Ge)}_t((pe=pe.apply(ke,ue||[])).next())})}function Je(ke,ue){var le,pe,he,oe,Ae={label:0,sent:function(){if(1&he[0])throw he[1];return he[1]},trys:[],ops:[]};return oe={next:Ge(0),throw:Ge(1),return:Ge(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Ge(_t){return function(Rt){return function(zt){if(le)throw new TypeError("Generator is already executing.");for(;Ae;)try{if(le=1,pe&&(he=2&zt[0]?pe.return:zt[0]?pe.throw||((he=pe.return)&&he.call(pe),0):pe.next)&&!(he=he.call(pe,zt[1])).done)return he;switch(pe=0,he&&(zt=[2&zt[0],he.value]),zt[0]){case 0:case 1:he=zt;break;case 4:return Ae.label++,{value:zt[1],done:!1};case 5:Ae.label++,pe=zt[1],zt=[0];continue;case 7:zt=Ae.ops.pop(),Ae.trys.pop();continue;default:if(he=Ae.trys,!((he=he.length>0&&he[he.length-1])||zt[0]!==6&&zt[0]!==2)){Ae=0;continue}if(zt[0]===3&&(!he||zt[1]>he[0]&&zt[1]<he[3])){Ae.label=zt[1];break}if(zt[0]===6&&Ae.label<he[1]){Ae.label=he[1],he=zt;break}if(he&&Ae.label<he[2]){Ae.label=he[2],Ae.ops.push(zt);break}he[2]&&Ae.ops.pop(),Ae.trys.pop();continue}zt=ue.call(ke,Ae)}catch(qt){zt=[6,qt],pe=0}finally{le=he=0}if(5&zt[0])throw zt[1];return{value:zt[0]?zt[1]:void 0,done:!0}}([_t,Rt])}}}function ve(){for(var ke=0,ue=0,le=arguments.length;ue<le;ue++)ke+=arguments[ue].length;var pe=Array(ke),he=0;for(ue=0;ue<le;ue++)for(var oe=arguments[ue],Ae=0,Ge=oe.length;Ae<Ge;Ae++,he++)pe[he]=oe[Ae];return pe}var Te=function(){function ke(){}return ke.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ke.setAttributes=function(ue,le){for(var pe=0,he=le;pe<he.length;pe++){var oe=he[pe],Ae=oe[0],Ge=oe[1];ue.setAttribute(Ae,Ge)}},ke.createRect=function(ue,le,pe){var he=document.createElementNS("http://www.w3.org/2000/svg","rect");return he.setAttribute("width",ue.toString()),he.setAttribute("height",le.toString()),pe&&ke.setAttributes(he,pe),he},ke.createLine=function(ue,le,pe,he,oe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","line");return Ae.setAttribute("x1",ue.toString()),Ae.setAttribute("y1",le.toString()),Ae.setAttribute("x2",pe.toString()),Ae.setAttribute("y2",he.toString()),oe&&ke.setAttributes(Ae,oe),Ae},ke.createPolygon=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return pe.setAttribute("points",ue),le&&ke.setAttributes(pe,le),pe},ke.createCircle=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","circle");return pe.setAttribute("cx",(ue/2).toString()),pe.setAttribute("cy",(ue/2).toString()),pe.setAttribute("r",ue.toString()),le&&ke.setAttributes(pe,le),pe},ke.createEllipse=function(ue,le,pe){var he=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return he.setAttribute("cx",(ue/2).toString()),he.setAttribute("cy",(le/2).toString()),he.setAttribute("rx",(ue/2).toString()),he.setAttribute("ry",(le/2).toString()),pe&&ke.setAttributes(he,pe),he},ke.createGroup=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","g");return ue&&ke.setAttributes(le,ue),le},ke.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ke.createMarker=function(ue,le,pe,he,oe,Ae,Ge){var _t=document.createElementNS("http://www.w3.org/2000/svg","marker");return ke.setAttributes(_t,[["id",ue],["orient",le],["markerWidth",pe.toString()],["markerHeight",he.toString()],["refX",oe.toString()],["refY",Ae.toString()]]),_t.appendChild(Ge),_t},ke.createText=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","text");return le.setAttribute("x","0"),le.setAttribute("y","0"),ue&&ke.setAttributes(le,ue),le},ke.createTSpan=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return pe.textContent=ue,le&&ke.setAttributes(pe,le),pe},ke.createImage=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","image");return ue&&ke.setAttributes(le,ue),le},ke.createPoint=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return pe.x=ue,pe.y=le,pe},ke.createPath=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","path");return pe.setAttribute("d",ue),le&&ke.setAttributes(pe,le),pe},ke}(),_e=function(){function ke(){}return ke.addKey=function(ue){ke.key=ue},Object.defineProperty(ke,"isLicensed",{get:function(){return!!ke.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ke.key)},enumerable:!1,configurable:!0}),ke}(),we=function(){function ke(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ke.prototype.rasterize=function(ue,le,pe){var he=this;return new Promise(function(oe){var Ae=pe!==void 0?pe:document.createElement("canvas");ue===null&&(he.markersOnly=!0,he.naturalSize=!1);var Ge=document.createElementNS("http://www.w3.org/2000/svg","svg");Ge.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ge.setAttribute("width",le.width.baseVal.valueAsString),Ge.setAttribute("height",le.height.baseVal.valueAsString),Ge.setAttribute("viewBox","0 0 "+le.viewBox.baseVal.width.toString()+" "+le.viewBox.baseVal.height.toString()),Ge.innerHTML=le.innerHTML,he.naturalSize===!0?(Ge.width.baseVal.value=ue.naturalWidth,Ge.height.baseVal.value=ue.naturalHeight):he.width!==void 0&&he.height!==void 0&&(Ge.width.baseVal.value=he.width,Ge.height.baseVal.value=he.height),Ae.width=Ge.width.baseVal.value,Ae.height=Ge.height.baseVal.value;var _t=Ge.outerHTML,Rt=Ae.getContext("2d");he.markersOnly!==!0&&Rt.drawImage(ue,0,0,Ae.width,Ae.height);var zt=window.URL,qt=new Image(Ae.width,Ae.height);qt.setAttribute("crossOrigin","anonymous");var jt=new Blob([_t],{type:"image/svg+xml"}),ar=zt.createObjectURL(jt);qt.onload=function(){Rt.drawImage(qt,0,0),zt.revokeObjectURL(ar);var xr=Ae.toDataURL(he.imageType,he.imageQuality);oe(xr)},qt.src=ar})},ke}(),me=function(){},De=function(){function ke(ue){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ue+"_"}return Object.defineProperty(ke.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ke.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(ke.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ke.prototype.addClass=function(ue){return this.styleSheet===void 0&&this.addStyleSheet(),ue.name=""+this.classNamePrefix+ue.localName,this.classes.push(ue),this.styleSheet.sheet.insertRule("."+ue.name+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length),ue},ke.prototype.addRule=function(ue){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ue),this.styleSheet.sheet.insertRule(ue.selector+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length)},ke.prototype.addStyleSheet=function(){var ue;this.styleSheet=document.createElement("style"),((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).appendChild(this.styleSheet),this.addRule(new at("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new at("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new at("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Oe("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Oe("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ke.prototype.removeStyleSheet=function(){var ue;this.styleSheet&&(((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ke}(),at=function(ke,ue){this.selector=ke,this.style=ue},Oe=function(ke,ue){this.localName=ke,this.style=ue},Mt=function(){function ke(ue,le,pe,he,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ue,this.displayMode=le,this.markerItems=pe,this.uiStyleSettings=he,this.styles=oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ke.prototype.show=function(ue){var le=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ue,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var pe=document.createElement("div");pe.className=this.toolbarBlockStyleClass.name,pe.style.whiteSpace="nowrap",this.uiContainer.appendChild(pe),this.addActionButton(pe,'<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(pe,'<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(pe,'<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(pe,'<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(pe,'<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(pe,'<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(pe,'<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(pe,'<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(oe){var Ae=document.createElement("div");Ae.className=""+le.toolbarButtonStyleClass.name,Ae.setAttribute("data-type-name",oe.typeName),Ae.innerHTML=oe.icon,Ae.addEventListener("click",function(){le.markerToolbarButtonClicked(Ae,oe)}),le.buttons.push(Ae),le.markerButtons.push(Ae)}),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 he=document.createElement("div");he.className=this.toolbarBlockStyleClass.name,he.style.whiteSpace="nowrap",he.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(he),this.addActionButton(he,'<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(he,'<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()},ke.prototype.addButtonClickListener=function(ue){this.buttonClickListeners.push(ue)},ke.prototype.removeButtonClickListener=function(ue){this.buttonClickListeners.indexOf(ue)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ue),1)},ke.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ke.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ue=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var le=0;le<this.markerButtons.length;le++)le<ue||le===ue&&this.markerButtons.length-1===ue?this.markerButtonBlock.appendChild(this.markerButtons[le]):(le===ue&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[le]))}},ke.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")},ke.prototype.resetButtonStyles=function(){var ue=this;this.buttons.forEach(function(le){le.className=le.className.replace(ue.uiStyleSettings.toolbarButtonStyleColorsClassName?ue.uiStyleSettings.toolbarButtonStyleColorsClassName:ue.toolbarButtonStyleColorsClass.name,"").trim(),le.className=le.className.replace(ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ue.toolbarActiveButtonStyleColorsClass.name,"").trim(),le.className+=" "+(ue.uiStyleSettings.toolbarButtonStyleColorsClassName?ue.uiStyleSettings.toolbarButtonStyleColorsClassName:ue.toolbarButtonStyleColorsClass.name)})},ke.prototype.addActionButton=function(ue,le,pe){var he=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=le,oe.setAttribute("data-action",pe),oe.addEventListener("click",function(){he.actionToolbarButtonClicked(oe,pe)}),pe){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}ue.appendChild(oe),this.buttons.push(oe)},ke.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Oe("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 Oe("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Oe("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Oe("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 Oe("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var ue=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Oe("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ue)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ue)+`px;
|
|
|
padding: `+ue+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Oe("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new at("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new at("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ke.prototype.markerToolbarButtonClicked=function(ue,le){this.setActiveButton(ue),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(pe){return pe("marker",le)}),this.markerButtonOverflowBlock.style.display="none"},ke.prototype.actionToolbarButtonClicked=function(ue,le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(pe){return pe("action",le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ke.prototype.setActiveButton=function(ue){this.resetButtonStyles(),ue.className=ue.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ue.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ke.prototype.setActiveMarkerButton=function(ue){var le=this.markerButtons.find(function(pe){return pe.getAttribute("data-type-name")===ue});le&&this.setActiveButton(le)},ke.prototype.setCurrentMarker=function(ue){var le=this;this.currentMarker=ue,this.buttons.filter(function(pe){return/delete|notes/.test(pe.getAttribute("data-action"))}).forEach(function(pe){le.currentMarker===void 0?(pe.style.fillOpacity="0.4",pe.style.pointerEvents="none"):(pe.style.fillOpacity="1",pe.style.pointerEvents="all")})},ke}(),ht=function(){function ke(ue,le,pe,he){this.panels=[],this.panelButtons=[],this.markerjsContainer=ue,this.displayMode=le,this.uiStyleSettings=pe,this.styles=he,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ke.prototype.addStyles=function(){var ue;this.toolboxStyleClass=this.styles.addClass(new Oe("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 Oe("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var le=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Oe("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Oe("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Oe("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 Oe("toolbox-panel-row_colors",`
|
|
|
background-color: `+((ue=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ue!==void 0?ue:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Oe("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*le)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*le)+`px;
|
|
|
padding: `+le+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Oe("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new at("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new at("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},ke.prototype.show=function(ue){var le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ue,this.uiContainer.className=this.toolboxStyleClass.name+" "+((le=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&le!==void 0?le:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ke.prototype.setPanelButtons=function(ue){var le,pe,he=this;this.panels=ue,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((le=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&le!==void 0?le:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((pe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&pe!==void 0?pe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Ae;oe.uiStyleSettings=he.uiStyleSettings;var Ge=document.createElement("div");Ge.className=he.toolboxButtonStyleClass.name+" "+((Ae=he.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ae!==void 0?Ae:he.toolboxButtonStyleColorsClass.name),Ge.innerHTML=oe.icon,Ge.title=oe.title,Ge.addEventListener("click",function(){he.panelButtonClick(oe)}),he.panelButtons.push(Ge),he.buttonRow.appendChild(Ge)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ke.prototype.panelButtonClick=function(ue){var le=this,pe=-1;if(ue!==this.activePanel){pe=this.panels.indexOf(ue),this.panelRow.innerHTML="";var he=ue.getUi();he.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(he),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=ue}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){le.displayMode==="inline"?le.panelRow.style.display="none":le.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Ae){var Ge,_t;oe.className=le.toolboxButtonStyleClass.name+" "+(Ae===pe?""+((Ge=le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ge!==void 0?Ge:le.toolboxActiveButtonStyleColorsClass.name):""+((_t=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_t!==void 0?_t:le.toolboxButtonStyleColorsClass.name))})},ke}(),lt=function(ke,ue){this.title=ke,this.icon=ue},et=function(ke){function ue(le,pe,he,oe){var Ae=ke.call(this,le,oe||'<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 Ae.colors=[],Ae.addTransparent=!1,Ae.colorBoxes=[],Ae.colors=pe,Ae.currentColor=he,Ae.setCurrentColor=Ae.setCurrentColor.bind(Ae),Ae.getColorBox=Ae.getColorBox.bind(Ae),Ae}return We(ue,ke),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.overflow="hidden",pe.style.whiteSpace="nowrap",this.colors.forEach(function(he){var oe=le.getColorBox(he);pe.appendChild(oe),le.colorBoxes.push(oe)}),pe},ue.prototype.getColorBox=function(le){var pe=this,he=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-he,Ae=document.createElement("div");Ae.style.display="inline-block",Ae.style.boxSizing="content-box",Ae.style.width=oe-2+"px",Ae.style.height=oe-2+"px",Ae.style.padding="1px",Ae.style.marginRight="2px",Ae.style.marginBottom="2px",Ae.style.borderWidth="2px",Ae.style.borderStyle="solid",Ae.style.borderRadius=(oe+2)/2+"px",Ae.style.borderColor=le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ae.addEventListener("click",function(){pe.setCurrentColor(le,Ae)});var Ge=document.createElement("div");return Ge.style.display="inline-block",Ge.style.width=oe-2+"px",Ge.style.height=oe-2+"px",Ge.style.backgroundColor=le,Ge.style.borderRadius=oe/2+"px",le==="transparent"&&(Ge.style.fill=this.uiStyleSettings.toolboxAccentColor,Ge.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>`),Ae.appendChild(Ge),Ae},ue.prototype.setCurrentColor=function(le,pe){var he=this;this.currentColor=le,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(le)},ue}(lt),Ee=function(){function ke(ue,le,pe){this._state="new",this._isSelected=!1,this._container=ue,this._overlayContainer=le,this.globalSettings=pe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ke.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ke.prototype.ownsTarget=function(ue){return!1},Object.defineProperty(ke.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ke.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ke.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ke.prototype.pointerDown=function(ue,le){},ke.prototype.dblClick=function(ue,le){},ke.prototype.manipulate=function(ue){},ke.prototype.pointerUp=function(ue){this.stateChanged()},ke.prototype.dispose=function(){},ke.prototype.addMarkerVisualToContainer=function(ue){this.container.childNodes.length>0?this.container.insertBefore(ue,this.container.childNodes[0]):this.container.appendChild(ue)},ke.prototype.getState=function(){return{typeName:ke.typeName,state:this.state,notes:this.notes}},ke.prototype.restoreState=function(ue){this._state=ue.state,this.notes=ue.notes},ke.prototype.scale=function(ue,le){},ke.prototype.colorChanged=function(ue){this.onColorChanged&&this.onColorChanged(ue),this.stateChanged()},ke.prototype.fillColorChanged=function(ue){this.onFillColorChanged&&this.onFillColorChanged(ue),this.stateChanged()},ke.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ue=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ue.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ue)&&this.onStateChanged(this)}},ke.typeName="MarkerBase",ke}(),yt=function(){function ke(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ke.prototype.findGripByVisual=function(ue){return this.topLeft.ownsTarget(ue)?this.topLeft:this.topCenter.ownsTarget(ue)?this.topCenter:this.topRight.ownsTarget(ue)?this.topRight:this.centerLeft.ownsTarget(ue)?this.centerLeft:this.centerRight.ownsTarget(ue)?this.centerRight:this.bottomLeft.ownsTarget(ue)?this.bottomLeft:this.bottomCenter.ownsTarget(ue)?this.bottomCenter:this.bottomRight.ownsTarget(ue)?this.bottomRight:void 0},ke}(),Vt=function(){function ke(){this.GRIP_SIZE=10,this.visual=Te.createGroup(),this.visual.appendChild(Te.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Te.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ke.prototype.ownsTarget=function(ue){return ue===this.visual||ue===this.visual.childNodes[0]||ue===this.visual.childNodes[1]},ke}(),qe=function(){function ke(){}return ke.toITransformMatrix=function(ue){return{a:ue.a,b:ue.b,c:ue.c,d:ue.d,e:ue.e,f:ue.f}},ke.toSVGMatrix=function(ue,le){return ue.a=le.a,ue.b=le.b,ue.c=le.c,ue.d=le.d,ue.e=le.e,ue.f=le.f,ue},ke}(),ut=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(Te.createTransform()),oe.setupControlBox(),oe}return We(ue,ke),Object.defineProperty(ue.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"visual",{get:function(){return this._visual},set:function(le){this._visual=le;var pe=Te.createTransform();this._visual.transform.baseVal.appendItem(pe)},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(le){return!!ke.prototype.ownsTarget.call(this,le)||!!(this.controlGrips.findGripByVisual(le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(le))},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.left=le.x,this.top=le.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var he=this.unrotatePoint(le);if(this.manipulationStartX=he.x,this.manipulationStartY=he.y,this.offsetX=he.x-this.left,this.offsetY=he.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(pe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(pe)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ae=this.container.transform.baseVal.getItem(0);Ae.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ae,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ue.prototype.pointerUp=function(le){var pe=this.state;ke.prototype.pointerUp.call(this,le),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(le),this._state="select",pe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ue.prototype.moveVisual=function(le){this.visual.style.transform="translate("+le.x+"px, "+le.y+"px)"},ue.prototype.manipulate=function(le){var pe=this.unrotatePoint(le);this.state==="creating"?this.resize(le):this.state==="move"?(this.left=this.manipulationStartLeft+(pe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(pe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(pe):this.state==="rotate"&&this.rotate(le)},ue.prototype.resize=function(le){var pe=this.manipulationStartLeft,he=this.manipulationStartWidth,oe=this.manipulationStartTop,Ae=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:pe=this.manipulationStartLeft+le.x-this.manipulationStartX,he=this.manipulationStartWidth+this.manipulationStartLeft-pe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:he=this.manipulationStartWidth+le.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+le.y-this.manipulationStartY,Ae=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ae=this.manipulationStartHeight+le.y-this.manipulationStartY}he>=0?(this.left=pe,this.width=he):(this.left=pe+he,this.width=-he),Ae>=0?(this.top=oe,this.height=Ae):(this.top=oe+Ae,this.height=-Ae),this.setSize()},ue.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ue.prototype.rotate=function(le){if(Math.abs(le.x-this.centerX)>.1){var pe=Math.sign(le.x-this.centerX);this.rotationAngle=180*Math.atan((le.y-this.centerY)/(le.x-this.centerX))/Math.PI+90*pe,this.applyRotation()}},ue.prototype.applyRotation=function(){var le=this.container.transform.baseVal.getItem(0);le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(le,0)},ue.prototype.rotatePoint=function(le){if(this.rotationAngle===0)return le;var pe=this.container.getCTM(),he=Te.createPoint(le.x,le.y);return{x:(he=he.matrixTransform(pe)).x,y:he.y}},ue.prototype.unrotatePoint=function(le){if(this.rotationAngle===0)return le;var pe=this.container.getCTM();pe=pe.inverse();var he=Te.createPoint(le.x,le.y);return{x:(he=he.matrixTransform(pe)).x,y:he.y}},ue.prototype.select=function(){ke.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ue.prototype.deselect=function(){ke.prototype.deselect.call(this),this.controlBox.style.display="none"},ue.prototype.setupControlBox=function(){this.controlBox=Te.createGroup();var le=Te.createTransform();le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(le),this.container.appendChild(this.controlBox),this.controlRect=Te.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=Te.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 yt,this.addControlGrips(),this.controlBox.style.display="none"},ue.prototype.adjustControlBox=function(){var le=this.controlBox.transform.baseVal.getItem(0);le.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(le,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()},ue.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()},ue.prototype.createGrip=function(){var le=new Vt;return le.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(le.visual),le},ue.prototype.positionGrips=function(){var le=this.controlGrips.topLeft.GRIP_SIZE,pe=-le/2,he=pe,oe=(this.width+this.CB_DISTANCE)/2-le/2,Ae=(this.height+this.CB_DISTANCE)/2-le/2,Ge=this.height+this.CB_DISTANCE-le/2,_t=this.width+this.CB_DISTANCE-le/2;this.positionGrip(this.controlGrips.topLeft.visual,pe,he),this.positionGrip(this.controlGrips.topCenter.visual,oe,he),this.positionGrip(this.controlGrips.topRight.visual,_t,he),this.positionGrip(this.controlGrips.centerLeft.visual,pe,Ae),this.positionGrip(this.controlGrips.centerRight.visual,_t,Ae),this.positionGrip(this.controlGrips.bottomLeft.visual,pe,Ge),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,Ge),this.positionGrip(this.controlGrips.bottomRight.visual,_t,Ge),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,he-3*this.CB_DISTANCE)},ue.prototype.positionGrip=function(le,pe,he){var oe=le.transform.baseVal.getItem(0);oe.setTranslate(pe,he),le.transform.baseVal.replaceItem(oe,0)},ue.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ue.prototype.showControlBox=function(){this.controlBox.style.display=""},ue.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:qe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:qe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ke.prototype.getState.call(this))},ue.prototype.restoreState=function(le){ke.prototype.restoreState.call(this,le);var pe=le;this.left=pe.left,this.top=pe.top,this.width=pe.width,this.height=pe.height,this.rotationAngle=pe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,pe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,pe.containerTransformMatrix))},ue.prototype.scale=function(le,pe){ke.prototype.scale.call(this,le,pe);var he=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:he.x*le,y:he.y*pe});this.left=oe.x,this.top=oe.y,this.width=this.width*le,this.height=this.height*pe,this.adjustControlBox()},ue}(Ee),Ce=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){return!(!ke.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ue.prototype.createVisual=function(){this.visual=Te.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)},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){ke.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){ke.prototype.resize.call(this,le),this.setSize()},ue.prototype.setSize=function(){ke.prototype.setSize.call(this),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ue.prototype.pointerUp=function(le){ke.prototype.pointerUp.call(this,le),this.setSize()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ue.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ke.prototype.getState.call(this))},ue.prototype.restoreState=function(le){var pe=le;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.opacity=pe.opacity,this.createVisual(),ke.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,pe){ke.prototype.scale.call(this,le,pe),this.setSize()},ue.title="Rectangle marker",ue}(ut),xe=function(ke){function ue(le,pe,he,oe){var Ae=ke.call(this,le,oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ae.widths=[],Ae.widthBoxes=[],Ae.widths=pe,Ae.currentWidth=he,Ae.setCurrentWidth=Ae.setCurrentWidth.bind(Ae),Ae}return We(ue,ke),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",this.widths.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=he===le.currentWidth?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentWidth(he,oe)}),pe.appendChild(oe);var Ae=document.createElement("div");Ae.innerText=he.toString(),Ae.style.marginRight="5px",oe.appendChild(Ae);var Ge=document.createElement("div");Ge.style.minHeight="20px",Ge.style.flexGrow="2",Ge.style.display="flex",Ge.style.alignItems="center";var _t=document.createElement("hr");_t.style.minWidth="20px",_t.style.border="0px",_t.style.borderTop=he+"px solid "+le.uiStyleSettings.toolboxColor,_t.style.flexGrow="2",Ge.appendChild(_t),oe.appendChild(Ge),le.widthBoxes.push(oe)}),pe},ue.prototype.setCurrentWidth=function(le,pe){var he=this;this.currentWidth=le,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ue}(lt),Ue=function(ke){function ue(le,pe,he,oe){var Ae=ke.call(this,le,oe||'<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 Ae.styles=[],Ae.styleBoxes=[],Ae.styles=pe,Ae.currentStyle=he,Ae.setCurrentStyle=Ae.setCurrentStyle.bind(Ae),Ae}return We(ue,ke),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",this.styles.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/le.styles.length-5+"%",oe.style.borderColor=he===le.currentStyle?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentStyle(he,oe)}),pe.appendChild(oe);var Ae=document.createElement("div");Ae.style.minHeight="20px",Ae.style.flexGrow="2",Ae.style.overflow="hidden";var Ge=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+le.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(he!==""?'stroke-dasharray="'+he+'"':"")+` />
|
|
|
</svg>`;Ae.innerHTML=Ge,oe.appendChild(Ae),le.styleBoxes.push(oe)}),pe},ue.prototype.setCurrentStyle=function(le,pe){var he=this;this.currentStyle=le,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ue}(lt),Ze=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new et("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new xe("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return We(ue,ke),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=ke.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="FrameMarker",ue.title="Frame marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ue}(Ce),St=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},mt=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){return!!ke.prototype.ownsTarget.call(this,le)||!(!this.grip1.ownsTarget(le)&&!this.grip2.ownsTarget(le))},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.state==="new"&&(this.x1=le.x,this.y1=le.y,this.x2=le.x,this.y2=le.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(pe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(pe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ue.prototype.pointerUp=function(le){var pe=this.state;ke.prototype.pointerUp.call(this,le),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(le),this._state="select",pe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ue.prototype.adjustVisual=function(){},ue.prototype.manipulate=function(le){this.state==="creating"?this.resize(le):this.state==="move"?(this.x1=this.manipulationStartX1+le.x-this.manipulationStartX,this.y1=this.manipulationStartY1+le.y-this.manipulationStartY,this.x2=this.manipulationStartX2+le.x-this.manipulationStartX,this.y2=this.manipulationStartY2+le.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(le)},ue.prototype.resize=function(le){switch(this.activeGrip){case this.grip1:this.x1=le.x,this.y1=le.y;break;case this.grip2:case void 0:this.x2=le.x,this.y2=le.y}this.adjustVisual(),this.adjustControlBox()},ue.prototype.select=function(){ke.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ue.prototype.deselect=function(){ke.prototype.deselect.call(this),this.controlBox.style.display="none"},ue.prototype.setupControlBox=function(){this.controlBox=Te.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ue.prototype.adjustControlBox=function(){this.positionGrips()},ue.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ue.prototype.createGrip=function(){var le=new Vt;return le.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(le.visual),le},ue.prototype.positionGrips=function(){var le=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-le/2,this.y1-le/2),this.positionGrip(this.grip2.visual,this.x2-le/2,this.y2-le/2)},ue.prototype.positionGrip=function(le,pe,he){var oe=le.transform.baseVal.getItem(0);oe.setTranslate(pe,he),le.transform.baseVal.replaceItem(oe,0)},ue.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ke.prototype.getState.call(this))},ue.prototype.restoreState=function(le){ke.prototype.restoreState.call(this,le);var pe=le;this.x1=pe.x1,this.y1=pe.y1,this.x2=pe.x2,this.y2=pe.y2},ue.prototype.scale=function(le,pe){ke.prototype.scale.call(this,le,pe),this.x1=this.x1*le,this.y1=this.y1*pe,this.x2=this.x2*le,this.y2=this.y2*pe,this.adjustVisual(),this.adjustControlBox()},ue}(Ee),Pt=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new et("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new xe("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){return!(!ke.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorLine&&le!==this.visibleLine)},ue.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorLine=Te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Te.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)},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ue.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()),Te.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ke.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){ke.prototype.restoreState.call(this,le);var pe=le;this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.createVisual(),this.adjustVisual()},ue.typeName="LineMarker",ue.title="Line marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ue}(mt),Qe=function(ke){function ue(le,pe,he,oe){var Ae=ke.call(this,le,oe||'<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 Ae.fonts=[],Ae.fontBoxes=[],Ae.fonts=pe,Ae.currentFont=he,Ae.setCurrentFont=Ae.setCurrentFont.bind(Ae),Ae}return We(ue,ke),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.overflow="hidden",pe.style.flexGrow="2",this.fonts.forEach(function(he){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/le.fonts.length-5+"%",oe.style.borderColor=he===le.currentFont?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentFont(he,oe)}),pe.appendChild(oe);var Ae=document.createElement("div");Ae.style.display="flex",Ae.style.minHeight="20px",Ae.style.flexGrow="2",Ae.style.fontFamily=he,Ae.style.overflow="hidden";var Ge=document.createElement("div");Ge.style.whiteSpace="nowrap",Ge.style.overflow="hidden",Ge.style.textOverflow="ellipsis",Ge.innerHTML="The quick brown fox jumps over the lazy dog",Ae.appendChild(Ge),oe.appendChild(Ae),le.fontBoxes.push(oe)}),pe},ue.prototype.setCurrentFont=function(le,pe){var he=this;this.currentFont=le,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ue}(lt),Ft=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=he.defaultColor,oe.fontFamily=he.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new et("Color",he.defaultColorSet,he.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Qe("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){if(ke.prototype.ownsTarget.call(this,le)||le===this.visual||le===this.textElement||le===this.bgRectangle)return!0;var pe=!1;return this.textElement.childNodes.forEach(function(he){he===le&&(pe=!0)}),pe},ue.prototype.createVisual=function(){this.visual=Te.createGroup(),this.bgRectangle=Te.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Te.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.renderText=function(){var le=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(pe){le.textElement.appendChild(Te.createTSpan(pe.trim()===""?" ":pe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ue.prototype.getTextScale=function(){var le=this.textElement.getBBox(),pe=1;if(le.width>0&&le.height>0){var he=(1*this.width-this.width*this.padding*2/100)/le.width,oe=(1*this.height-this.height*this.padding*2/100)/le.height;pe=Math.min(he,oe)}return pe},ue.prototype.getTextPosition=function(le){var pe=this.textElement.getBBox(),he=0,oe=0;return pe.width>0&&pe.height>0&&(he=(this.width-pe.width*le)/2,oe=this.height/2-pe.height*le/2),{x:he,y:oe}},ue.prototype.sizeText=function(){var le=this.textElement.getBBox(),pe=this.getTextScale(),he=this.getTextPosition(pe);he.y-=le.y*pe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+he.x+"px, "+he.y+"px) scale("+pe+", "+pe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(he.x,he.y),this.textElement.transform.baseVal.getItem(1).setScale(pe,pe))},ue.prototype.manipulate=function(le){ke.prototype.manipulate.call(this,le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(le.x-this.pointerDownPoint.x)>5||Math.abs(le.y-this.pointerDownPoint.y)>5)},ue.prototype.resize=function(le){ke.prototype.resize.call(this,le),this.isMoved=!0,this.setSize(),this.sizeText()},ue.prototype.setSize=function(){ke.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ue.prototype.pointerUp=function(le){var pe=this.state;pe==="creating"&&(this._suppressMarkerCreateEvent=!0),ke.prototype.pointerUp.call(this,le),this.setSize(),(pe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ue.prototype.showTextEditor=function(){var le=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(pe){pe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var pe=Number.parseFloat(le.textEditor.style.fontSize);le.textEditor.clientWidth>=Number.parseInt(le.textEditor.style.maxWidth)&&pe>.9;)pe-=.1,le.textEditor.style.fontSize=Math.max(pe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(pe){pe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(pe){if(pe.clipboardData){var he=pe.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(he)),pe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){le.textEditDivClicked(le.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ue.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var le=this.getTextScale(),pe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),he=this.textElement.getBBox(),oe={x:he.width*le,y:he.height*le};pe.x-=oe.x/2,pe.y-=oe.y/2,this.textEditor.style.top=pe.y+"px",this.textEditor.style.left=pe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-pe.x+"px",this.textEditor.style.fontSize=Math.max(16*le,12)+"px",this.textElement.style.display="none"}},ue.prototype.textEditDivClicked=function(le){this.text=le.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ue.prototype.select=function(){ke.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ue.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ke.prototype.deselect.call(this)},ue.prototype.dblClick=function(le,pe){ke.prototype.dblClick.call(this,le,pe),this.showTextEditor()},ue.prototype.setColor=function(le){this.textElement&&Te.setAttributes(this.textElement,[["fill",le]]),this.color=le,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(le)},ue.prototype.setFont=function(le){this.textElement&&Te.setAttributes(this.textElement,[["font-family",le]]),this.fontFamily=le,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ue.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ue.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ke.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var pe=le;this.color=pe.color,this.fontFamily=pe.fontFamily,this.padding=pe.padding,this.text=pe.text,this.createVisual(),ke.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,pe){ke.prototype.scale.call(this,le,pe),this.setSize(),this.sizeText(),this.positionTextEditor()},ue.typeName="TextMarker",ue.title="Text marker",ue.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>',ue}(ut),Dt=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=he.defaultColor,oe.lineWidth=he.defaultStrokeWidth,oe.pixelRatio=he.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new et("Color",he.defaultColorSet,he.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new xe("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){return!(!ke.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.drawingImage)},ue.prototype.createVisual=function(){this.visual=Te.createGroup(),this.drawingImage=Te.createImage(),this.visual.appendChild(this.drawingImage);var le=Te.createTransform();this.visual.transform.baseVal.appendItem(le),this.addMarkerVisualToContainer(this.visual)},ue.prototype.pointerDown=function(le,pe){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(le.x,le.y),this.drawing=!0):ke.prototype.pointerDown.call(this,le,pe)},ue.prototype.manipulate=function(le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(le.x,le.y),this.canvasContext.stroke()):ke.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){ke.prototype.resize.call(this,le),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ue.prototype.pointerUp=function(le){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ke.prototype.pointerUp.call(this,le)},ue.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)},ue.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ke.prototype.select.call(this)},ue.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ke.prototype.deselect.call(this)},ue.prototype.finishCreation=function(){for(var le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),pe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],he=pe[0],oe=pe[1],Ae=pe[2],Ge=pe[3],_t=!1,Rt=0;Rt<this.canvasElement.height;Rt++)for(var zt=0;zt<this.canvasElement.width;zt++)le.data[Rt*this.canvasElement.width*4+4*zt+3]>0&&(_t=!0,Rt<oe&&(oe=Rt),zt<he&&(he=zt),Rt>Ge&&(Ge=Rt),zt>Ae&&(Ae=zt));if(_t){this.left=he/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Ae-he)/this.pixelRatio,this.height=(Ge-oe)/this.pixelRatio;var qt=document.createElement("canvas");qt.width=Ae-he,qt.height=Ge-oe,qt.getContext("2d").putImageData(this.canvasContext.getImageData(he,oe,Ae-he,Ge-oe),0,0),this.drawingImgUrl=qt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ue.prototype.setDrawingImage=function(){Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ue.prototype.setColor=function(le){this.color=le,this.colorChanged(le)},ue.prototype.setLineWidth=function(le){this.lineWidth=le},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({drawingImgUrl:this.drawingImgUrl},ke.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){this.createVisual(),ke.prototype.restoreState.call(this,le),this.drawingImgUrl=le.drawingImgUrl,this.setDrawingImage()},ue.prototype.scale=function(le,pe){ke.prototype.scale.call(this,le,pe),this.setDrawingImage()},ue.typeName="FreehandMarker",ue.title="Freehand marker",ue.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>',ue}(ut),an=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,he||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return oe.typeBoxes=[],oe.currentType=pe,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return We(ue,ke),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2";for(var he=function(Ge){var _t="both";switch(Ge){case 0:_t="both";break;case 1:_t="start";break;case 2:_t="end";break;case 3:_t="none"}var Rt=document.createElement("div");if(Rt.style.display="flex",Rt.style.flexGrow="2",Rt.style.alignItems="center",Rt.style.justifyContent="space-between",Rt.style.padding="5px",Rt.style.borderWidth="2px",Rt.style.borderStyle="solid",Rt.style.borderColor=_t===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",Rt.addEventListener("click",function(){le.setCurrentType(_t,Rt)}),pe.appendChild(Rt),_t==="both"||_t==="start"){var zt=document.createElement("div");zt.style.display="flex",zt.style.alignItems="center",zt.style.minHeight="20px",zt.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="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,zt.style.marginLeft="5px",Rt.appendChild(zt)}var qt=document.createElement("div");qt.style.display="flex",qt.style.alignItems="center",qt.style.minHeight="20px",qt.style.flexGrow="2";var jt=document.createElement("hr");if(jt.style.minWidth="20px",jt.style.border="0px",jt.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),jt.style.flexGrow="2",qt.appendChild(jt),Rt.appendChild(qt),_t==="both"||_t==="end"){var ar=document.createElement("div");ar.style.display="flex",ar.style.alignItems="center",ar.style.minHeight="20px",ar.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="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,ar.style.marginRight="5px",Rt.appendChild(ar)}oe.typeBoxes.push(Rt)},oe=this,Ae=0;Ae<4;Ae++)he(Ae);return pe},ue.prototype.setCurrentType=function(le,pe){var he=this;this.currentType=le,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings!==void 0?he.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ue}(lt),it=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new an("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){return!(!ke.prototype.ownsTarget.call(this,le)&&le!==this.arrow1&&le!==this.arrow2)},ue.prototype.getArrowPoints=function(le,pe){var he=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return le-he/2+","+(pe+oe/2)+" "+le+","+(pe-oe/2)+" "+(le+he/2)+","+(pe+oe/2)},ue.prototype.createTips=function(){this.arrow1=Te.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Te.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow2)},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.state==="creating"&&this.createTips()},ue.prototype.adjustVisual=function(){if(ke.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",Te.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Te.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var le=0;Math.abs(this.x1-this.x2)>.1&&(le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var pe=this.arrow1.transform.baseVal.getItem(0);pe.setRotate(le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(pe,0);var he=this.arrow2.transform.baseVal.getItem(0);he.setRotate(le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(he,0)}},ue.prototype.setArrowType=function(le){this.arrowType=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({arrowType:this.arrowType},ke.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){ke.prototype.restoreState.call(this,le);var pe=le;this.arrowType=pe.arrowType,this.createTips(),this.adjustVisual()},ue.typeName="ArrowMarker",ue.title="Arrow marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ue}(Pt),en=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.fillColor=he.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new et("Color",he.defaultColorSet,he.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return We(ue,ke),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=ke.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="CoverMarker",ue.title="Cover marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ue}(Ce),_n=function(ke){function ue(le,pe,he,oe){var Ae=ke.call(this,le,oe||'<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 Ae.opacities=[],Ae.opacityBoxes=[],Ae.opacities=pe,Ae.currentOpacity=he,Ae.setCurrentOpacity=Ae.setCurrentOpacity.bind(Ae),Ae}return We(ue,ke),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",pe.style.justifyContent="space-between",this.opacities.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=he===le.currentOpacity?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentOpacity(he,oe)}),pe.appendChild(oe);var Ae=document.createElement("div");Ae.innerText=100*he+"%",oe.appendChild(Ae),le.opacityBoxes.push(oe)}),pe},ue.prototype.setCurrentOpacity=function(le,pe){var he=this;this.currentOpacity=le,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ue}(lt),yn=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=he.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=he.defaultHighlightOpacity,oe.fillPanel=new et("Color",he.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new _n("Opacity",he.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return We(ue,ke),ue.prototype.setOpacity=function(le){this.opacity=le,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=ke.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="HighlightMarker",ue.title="Highlight marker",ue.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>',ue}(en),Ve='<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>',Le='<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>',Bt=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=he.defaultStrokeColor,oe.bgColor=he.defaultFillColor,oe.fontFamily=he.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new et("Text color",he.defaultColorSet,oe.color,Ve),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new et("Fill color",he.defaultColorSet,oe.bgColor,Le),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Qe("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new Vt,oe.tipGrip.visual.transform.baseVal.appendItem(Te.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){return ke.prototype.ownsTarget.call(this,le)||this.tipGrip.ownsTarget(le)||this.tip===le},ue.prototype.createTip=function(){Te.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Te.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ue.prototype.pointerDown=function(le,pe){this.state==="new"&&ke.prototype.pointerDown.call(this,le,pe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(pe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ke.prototype.pointerDown.call(this,le,pe)},ue.prototype.pointerUp=function(le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ke.prototype.pointerUp.call(this,le);else{var pe=this.state==="creating";ke.prototype.pointerUp.call(this,le),this.setTipPoints(pe),this.positionTip()}},ue.prototype.manipulate=function(le){if(this.tipMoving){var pe=this.unrotatePoint(le);this.tipPosition={x:pe.x-this.manipulationStartLeft,y:pe.y-this.manipulationStartTop},this.positionTip()}else ke.prototype.manipulate.call(this,le)},ue.prototype.setBgColor=function(le){this.bgRectangle&&this.tip&&(Te.setAttributes(this.bgRectangle,[["fill",le]]),Te.setAttributes(this.tip,[["fill",le]])),this.bgColor=le,this.fillColorChanged(le)},ue.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},ue.prototype.setTipPoints=function(le){le===void 0&&(le=!1);var pe=Math.min(this.height/2,15),he=this.height/5;le&&(this.tipPosition={x:pe+he/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:pe,y:0},this.tipBase2Position={x:pe+he,y:0}):(this.tipBase1Position={x:0,y:pe},this.tipBase2Position={x:0,y:pe+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-pe-he,y:0},this.tipBase2Position={x:this.width-pe,y:0}):(this.tipBase1Position={x:this.width,y:pe},this.tipBase2Position={x:this.width,y:pe+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-pe-he,y:this.height},this.tipBase2Position={x:this.width-pe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-pe-he},this.tipBase2Position={x:this.width,y:this.height-pe}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:pe,y:this.height},this.tipBase2Position={x:pe+he,y:this.height}):(this.tipBase1Position={x:0,y:this.height-pe},this.tipBase2Position={x:0,y:this.height-pe-he})},ue.prototype.resize=function(le){ke.prototype.resize.call(this,le),this.positionTip()},ue.prototype.positionTip=function(){Te.setAttributes(this.tip,[["points",this.getTipPoints()]]);var le=this.tipGrip.visual.transform.baseVal.getItem(0);le.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(le,0)},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ue.prototype.select=function(){this.positionTip(),ke.prototype.select.call(this)},ue.prototype.getState=function(){var le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ke.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var pe=le;this.bgColor=pe.bgColor,this.tipPosition=pe.tipPosition,ke.prototype.restoreState.call(this,le),this.createTip(),this.setTipPoints()},ue.prototype.scale=function(le,pe){ke.prototype.scale.call(this,le,pe),this.tipPosition={x:this.tipPosition.x*le,y:this.tipPosition.y*pe},this.positionTip()},ue.typeName="CalloutMarker",ue.title="Callout marker",ue.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>',ue}(Ft),Dn=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.fillColor=he.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new et("Line color",ve(he.defaultColorSet,["transparent"]),he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new et("Fill color",ve(he.defaultColorSet,["transparent"]),oe.fillColor,Le),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new xe("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new _n("Opacity",he.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){return!(!ke.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ue.prototype.createVisual=function(){this.visual=Te.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)},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){ke.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){ke.prototype.resize.call(this,le),this.setSize()},ue.prototype.setSize=function(){ke.prototype.setSize.call(this),Te.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ue.prototype.pointerUp=function(le){ke.prototype.pointerUp.call(this,le),this.setSize()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ue.prototype.setOpacity=function(le){this.opacity=le,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ke.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var pe=le;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.opacity=pe.opacity,this.createVisual(),ke.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,pe){ke.prototype.scale.call(this,le,pe),this.setSize()},ue.typeName="EllipseMarker",ue.title="Ellipse marker",ue.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>',ue}(ut),dn=function(ke){function ue(le,pe,he){return ke.call(this,le,pe,he)||this}return We(ue,ke),Object.defineProperty(ue.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(le){return!(!ke.prototype.ownsTarget.call(this,le)&&le!==this.tip1&&le!==this.tip2)},ue.prototype.createTips=function(){this.tip1=Te.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(Te.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Te.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(Te.createTransform()),this.visual.appendChild(this.tip2)},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.state==="creating"&&this.createTips()},ue.prototype.adjustVisual=function(){if(ke.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Te.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()]]),Te.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 le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),pe=this.tip1.transform.baseVal.getItem(0);pe.setRotate(le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(pe,0);var he=this.tip2.transform.baseVal.getItem(0);he.setRotate(le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(he,0)}},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=ke.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){ke.prototype.restoreState.call(this,le),this.createTips(),this.adjustVisual()},ue.typeName="MeasurementMarker",ue.title="Measurement marker",ue.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>',ue}(Pt),nt=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.strokePanel.colors=he.defaultColorSet,oe.fillColor="transparent",oe}return We(ue,ke),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=ke.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="EllipseFrameMarker",ue.title="Ellipse frame marker",ue.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>',ue}(Dn),ft=function(){function ke(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ke.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ke.prototype.addUndoStep=function(ue){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ue)||(this.undoStack.push(ue),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ue)&&this.redoStack.splice(0,this.redoStack.length))},ke.prototype.replaceLastUndoStep=function(ue){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ue)},ke.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ke.prototype.undo=function(){if(this.undoStack.length>1){var ue=this.undoStack.pop();return ue!==void 0&&this.redoStack.push(ue),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ke.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ke}(),Xt=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new et("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new xe("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){return!(!ke.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorCurve&&le!==this.visibleCurve&&!this.curveGrip.ownsTarget(le))},ue.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ue.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorCurve=Te.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Te.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)},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=le.x,this.curveY=le.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(pe)&&(this.activeGrip=this.curveGrip,this._state="resize")},ue.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Te.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ue.prototype.setupControlBox=function(){ke.prototype.setupControlBox.call(this),this.curveControlLine1=Te.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Te.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)},ue.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ke.prototype.addControlGrips.call(this)},ue.prototype.positionGrips=function(){ke.prototype.positionGrips.call(this);var le=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-le/2,this.curveY-le/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()))},ue.prototype.manipulate=function(le){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+le.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+le.y-this.manipulationStartY),ke.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){this.activeGrip===this.curveGrip&&(this.curveX=le.x,this.curveY=le.y),ke.prototype.resize.call(this,le),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual()},ue.prototype.scale=function(le,pe){this.curveX=this.curveX*le,this.curveY=this.curveY*pe,ke.prototype.scale.call(this,le,pe)},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ke.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){ke.prototype.restoreState.call(this,le);var pe=le;this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.curveX=pe.curveX,this.curveY=pe.curveY,this.createVisual(),this.adjustVisual()},ue.typeName="CurveMarker",ue.title="Curve marker",ue.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>',ue}(mt),Rn=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.textColor="transparent",oe.fontSize="1rem",oe.isMoved=!1,oe.captionText="Caption",oe.PADDING=5,oe.captionBoxWidth=0,oe.captionBoxHeight=0,oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.fillColor=he.defaultFillColor,oe.textColor=he.defaultStrokeColor,oe.fontFamily=he.defaultFontFamily,oe.fontSize=he.defaultCaptionFontSize,oe.captionText=he.defaultCaptionText,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.sizeCaption=oe.sizeCaption.bind(oe),oe.setCaptionText=oe.setCaptionText.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.finishTextEditing=oe.finishTextEditing.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.setTextColor=oe.setTextColor.bind(oe),oe.strokePanel=new et("Line color",ve(he.defaultColorSet,["transparent"]),oe.strokeColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new et("Fill color",ve(he.defaultColorSet,["transparent"]),oe.fillColor,Le),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new xe("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.fontFamilyPanel=new Qe("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.textColorPanel=new et("Text color",he.defaultColorSet,oe.textColor,Ve),oe.textColorPanel.onColorChanged=oe.setTextColor,oe}return We(ue,ke),ue.prototype.ownsTarget=function(le){return!(!ke.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.frame&&le!==this.captionBg&&le!==this.captionElement)},ue.prototype.createVisual=function(){this.visual=Te.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Te.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Te.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=Te.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()},ue.prototype.setCaptionText=function(le){this.captionText=le,this.captionElement.textContent=this.captionText,this.sizeCaption()},ue.prototype.pointerDown=function(le,pe){ke.prototype.pointerDown.call(this,le,pe),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){ke.prototype.manipulate.call(this,le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(le.x-this.pointerDownPoint.x)>5||Math.abs(le.y-this.pointerDownPoint.y)>5)},ue.prototype.resize=function(le){ke.prototype.resize.call(this,le),this.setSize()},ue.prototype.sizeCaption=function(){var le=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=le.width+2*this.PADDING,this.captionBoxHeight=le.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Te.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')"]]),Te.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')"]])},ue.prototype.showTextEditor=function(){var le=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(pe){pe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(pe){pe.key==="Enter"&&le.finishTextEditing(le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(pe){pe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){le.finishTextEditing(le.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){le.finishTextEditing(le.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ue.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"))},ue.prototype.finishTextEditing=function(le){this.setCaptionText(le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ue.prototype.setFont=function(le){this.captionElement&&Te.setAttributes(this.captionElement,[["font-family",le]]),this.fontFamily=le,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ue.prototype.setTextColor=function(le){this.captionElement&&Te.setAttributes(this.captionElement,[["fill",le]]),this.textColor=le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ue.prototype.setSize=function(){ke.prototype.setSize.call(this),Te.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ue.prototype.pointerUp=function(le){ke.prototype.pointerUp.call(this,le),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ue.prototype.dblClick=function(le,pe){ke.prototype.dblClick.call(this,le,pe),this.showTextEditor()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.frame&&Te.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.captionBg&&Te.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.frame&&Te.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.frame&&Te.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=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},ke.prototype.getState.call(this));return le.typeName=this.typeName,le},ue.prototype.restoreState=function(le){var pe=le;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.textColor=pe.textColor,this.fontFamily=pe.fontFamily,this.captionText=pe.captionText,this.fontSize=pe.fontSize,this.createVisual(),ke.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,pe){ke.prototype.scale.call(this,le,pe),this.setSize()},ue.typeName="CaptionFrameMarker",ue.title="Caption frame marker",ue.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>',ue}(ut),wn=function(){function ke(ue,le){le===void 0&&(le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ue,this.cancelable=le}return Object.defineProperty(ke.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ke.prototype.preventDefault=function(){this._defaultPrevented=!0},ke}(),Zt=function(ke){function ue(le,pe,he){var oe=ke.call(this,le,!1)||this;return oe.dataUrl=pe,oe.state=he,oe}return We(ue,ke),ue}(wn),Ht=function(ke){function ue(le,pe,he){he===void 0&&(he=!1);var oe=ke.call(this,le,he)||this;return oe.marker=pe,oe}return We(ue,ke),ue}(wn),Tn=function(){function ke(){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 ke.prototype.addEventListener=function(ue,le){this[ue].push(le)},ke.prototype.removeEventListener=function(ue,le){var pe=this[ue].indexOf(le);pe>-1&&this[ue].splice(pe,1)},ke}(),xn=function(){function ke(ue){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new St,this._isOpen=!1,this.undoRedoManager=new ft,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 Tn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ke.instanceCounter++,this.styles=new De(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ue,this.targetRoot=document.body,this.width=ue.clientWidth,this.height=ue.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(ke.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ze,Dt,it,Ft,nt,Dn,yn,Bt,dn,en,Pt,Xt,Rn]},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ze,Dt,it,Ft,Dn,yn,Bt]},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ze,Dt,it,Ft,yn]},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ue){var le=this;this._availableMarkerTypes.splice(0),ue.forEach(function(pe){if(typeof pe=="string"){var he=le.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===pe});he!==void 0&&le._availableMarkerTypes.push(he)}else le._availableMarkerTypes.push(pe)})},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ue){this._zoomLevel=ue,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(ke.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ke.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),_e.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ke.prototype.show=function(){var ue=this;this.styles.styleSheetRoot===void 0&&me.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=me.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(le){return le(new wn(ue))})},ke.prototype.render=function(){return Be(this,void 0,void 0,function(){var ue;return Je(this,function(le){switch(le.label){case 0:return this.setCurrentMarker(),(ue=new we).naturalSize=this.renderAtNaturalSize,ue.imageType=this.renderImageType,ue.imageQuality=this.renderImageQuality,ue.markersOnly=this.renderMarkersOnly,ue.width=this.renderWidth,ue.height=this.renderHeight,[4,ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return le.sent(),[4,ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,le.sent()]}})})},ke.prototype.close=function(ue){var le=this;if(ue===void 0&&(ue=!1),this.isOpen){var pe=!1;ue||this.eventListeners.beforeclose.forEach(function(he){var oe=new wn(le,!0);he(oe),oe.defaultPrevented&&(pe=!0)}),pe||(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(he){return he(new wn(le))}),this.detachEvents(),this._isOpen=!1)}},ke.prototype.addMarkersToToolbar=function(){for(var ue,le=[],pe=0;pe<arguments.length;pe++)le[pe]=arguments[pe];(ue=this._availableMarkerTypes).push.apply(ue,le)},ke.prototype.addRenderEventListener=function(ue){this.addEventListener("render",function(le){ue(le.dataUrl,le.state)})},ke.prototype.removeRenderEventListener=function(ue){},ke.prototype.addCloseEventListener=function(ue){this.addEventListener("close",function(){ue()})},ke.prototype.removeCloseEventListener=function(ue){},ke.prototype.setupResizeObserver=function(){var ue=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ue.resize(ue.target.clientWidth,ue.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ue.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ke.prototype.onPopupTargetResize=function(){var ue=1*this.target.clientWidth/this.target.clientHeight,le=this.editorCanvas.clientWidth/ue>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ue:this.editorCanvas.clientWidth,pe=le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ue;this.resize(le,pe)},ke.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ke.prototype.resize=function(ue,le){this._isResizing=!0;var pe=ue/this.imageWidth,he=le/this.imageHeight;this.imageWidth=Math.round(ue),this.imageHeight=Math.round(le),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(pe,he),this._isResizing=!1},ke.prototype.scaleMarkers=function(ue,le){var pe,he=this;this._currentMarker&&this._currentMarker instanceof Ft?this._currentMarker.scale(ue,le):(pe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==he._currentMarker&&oe.scale(ue,le)}),pe!==void 0&&this.setCurrentMarker(pe)},ke.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"},ke.prototype.setTopLeft=function(){var ue=this.editingTarget.getBoundingClientRect(),le=this.editorCanvas.getBoundingClientRect();this.left=ue.left-le.left,this.top=ue.top-le.top},ke.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)},ke.prototype.addDefs=function(){for(var ue,le=[],pe=0;pe<arguments.length;pe++)le[pe]=arguments[pe];this.defs=Te.createDefs(),this.addDefsToImage(),(ue=this.defs).append.apply(ue,le)},ke.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ke.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)},ke.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ke.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ke.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)},ke.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ke.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)},ke.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 ue=document.createElement("a");ue.href="https://markerjs.com/",ue.target="_blank",ue.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>',ue.title="Powered by marker.js",ue.style.display="grid",ue.style.alignItems="center",ue.style.justifyItems="center",ue.style.padding="3px",ue.style.width="20px",ue.style.height="20px",this.logoUI.appendChild(ue),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ke.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")},ke.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"},ke.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ke.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 ue=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=ue+"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 Mt(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new ht(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ke.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ke.prototype.removeMarker=function(ue){this.markerImage.removeChild(ue.container),this.markers.indexOf(ue)>-1&&this.markers.splice(this.markers.indexOf(ue),1),ue.dispose()},ke.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())},ke.prototype.toolbarButtonClicked=function(ue,le){if(ue==="marker"&&le!==void 0)this.createNewMarker(le);else if(ue==="action")switch(le){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()}},ke.prototype.deleteSelectedMarker=function(){var ue=this;if(this._currentMarker!==void 0){var le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(he){var oe=new Ht(ue,ue._currentMarker,!0);he(oe),oe.defaultPrevented&&(le=!0)}),!le){var pe=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(he){return he(new Ht(ue,pe))})}}},ke.prototype.clear=function(){var ue=this,le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ae){var Ge=new Ht(ue,void 0,!0);Ae(Ge),Ge.defaultPrevented&&(le=!0)}),!le)){this.setCurrentMarker();for(var pe=function(Ae){var Ge=he.markers[Ae];he.setCurrentMarker(he.markers[Ae]),he._currentMarker.dispose(),he.markerImage.removeChild(he._currentMarker.container),he.markers.splice(he.markers.indexOf(he._currentMarker),1),he.eventListeners.markerdelete.forEach(function(_t){return _t(new Ht(ue,Ge))})},he=this,oe=this.markers.length-1;oe>=0;oe--)pe(oe);this.addUndoStep()}},Object.defineProperty(ke.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ke.prototype.showNotesEditor=function(){var ue;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=(ue=this._currentMarker.notes)!==null&&ue!==void 0?ue:"",this.overlayContainer.appendChild(this.notesArea))},ke.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)},ke.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ke.prototype.addUndoStep=function(){var ue=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var le=this.getState(),pe=this.undoRedoManager.getLastUndoStep();if(!pe||pe.width===le.width&&pe.height===le.height){var he=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(le),he<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new wn(ue))})}else this.undoRedoManager.replaceLastUndoStep(le),this.eventListeners.statechange.forEach(function(oe){return oe(new wn(ue))})}},ke.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ke.prototype.undoStep=function(){var ue=this,le=this.undoRedoManager.undo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(pe){return pe(new wn(ue))}))},ke.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ke.prototype.redoStep=function(){var ue=this,le=this.undoRedoManager.redo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(pe){return pe(new wn(ue))}))},ke.prototype.stepZoom=function(){var ue=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ue<this.zoomSteps.length-1?this.zoomSteps[ue+1]:this.zoomSteps[0]},ke.prototype.panTo=function(ue){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ue.x,top:this.prevPanPoint.y-ue.y}),this.prevPanPoint=ue},ke.prototype.startRenderAndClose=function(){return Be(this,void 0,void 0,function(){var ue,le,pe=this;return Je(this,function(he){switch(he.label){case 0:return[4,this.render()];case 1:return ue=he.sent(),le=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new Zt(pe,ue,le))}),this.close(!0),[2]}})})},ke.prototype.getState=function(ue){ue===!0&&this.setCurrentMarker();var le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(pe){return le.markers.push(pe.getState())}),le},ke.prototype.restoreState=function(ue){var le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ue.markers.forEach(function(pe){var he=le._availableMarkerTypes.find(function(Ae){return Ae.typeName===pe.typeName});if(he!==void 0){var oe=le.addNewMarker(he);oe.restoreState(pe),le.markers.push(oe)}}),ue.width&&ue.height&&(ue.width!==this.imageWidth||ue.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ue.width,this.imageHeight/ue.height),this.eventListeners.restorestate.forEach(function(pe){return pe(new wn(le))})},ke.prototype.addNewMarker=function(ue){var le=Te.createGroup();return this.markerImage.appendChild(le),new ue(le,this.overlayContainer,this.settings)},ke.prototype.createNewMarker=function(ue){var le,pe=this;(le=typeof ue=="string"?this._availableMarkerTypes.find(function(he){return he.typeName===ue}):ue)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(le),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(le.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(he){return he(new Ht(pe,pe._currentMarker))}))},ke.prototype.markerCreated=function(ue){var le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ue),this.setCurrentMarker(ue),ue instanceof Dt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Dt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(pe){return pe(new Ht(le,le._currentMarker))})},ke.prototype.colorChanged=function(ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ue,this.settings.defaultStrokeColor=ue)},ke.prototype.fillColorChanged=function(ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ue)},ke.prototype.markerStateChanged=function(ue){var le=this;this.eventListeners.markerchange.forEach(function(pe){return pe(new Ht(le,ue))})},ke.prototype.setCurrentMarker=function(ue){var le=this;this._currentMarker!==ue&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(pe){return pe(new Ht(le,le._currentMarker))})),this._currentMarker=ue,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(pe){return pe(new Ht(le,le._currentMarker))}))},ke.prototype.onPointerDown=function(ue){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ue.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var le=this.markers.find(function(pe){return pe.ownsTarget(ue.target)});le!==void 0?(this.setCurrentMarker(le),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ue.clientX,ue.clientY),ue.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ue.clientX,y:ue.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ue.clientX,ue.clientY))},ke.prototype.onDblClick=function(ue){if(this._isFocused||this.focus(),this.mode==="select"){var le=this.markers.find(function(pe){return pe.ownsTarget(ue.target)});le!==void 0&&le!==this._currentMarker&&this.setCurrentMarker(le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ue.clientX,ue.clientY),ue.target):this.setCurrentMarker()}},ke.prototype.onPointerMove=function(ue){this.touchPoints!==1&&ue.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ue.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ue.clientX,ue.clientY)):this.zoomLevel>1&&this.panTo({x:ue.clientX,y:ue.clientY}))},ke.prototype.onPointerUp=function(ue){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ue.clientX,ue.clientY)),this.isDragging=!1,this.addUndoStep()},ke.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ke.prototype.onKeyUp=function(ue){this._currentMarker===void 0||this.notesArea!==void 0||ue.key!=="Delete"&&ue.key!=="Backspace"||this.deleteSelectedMarker()},ke.prototype.clientToLocalCoordinates=function(ue,le){var pe=this.markerImage.getBoundingClientRect();return{x:(ue-pe.left)/this.zoomLevel,y:(le-pe.top)/this.zoomLevel}},ke.prototype.onWindowResize=function(){this.positionUI()},ke.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ue=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ue+"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()},ke.prototype.addLicenseKey=function(ue){_e.addKey(ue)},ke.prototype.addEventListener=function(ue,le){this.eventListeners.addEventListener(ue,le)},ke.prototype.removeEventListener=function(ue,le){this.eventListeners.removeEventListener(ue,le)},ke.prototype.renderState=function(ue){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ue),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ke.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ke.prototype.focus=function(){var ue=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(le){return le(new wn(ue))}))},ke.prototype.blur=function(){var ue=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(le){return le(new wn(ue))}))},ke.instanceCounter=0,ke}()},95860:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return qe}});var fe=se(87462),We=se(1413),Be=se(4942),Je=se(97685),ve=se(45987),Te=se(94184),_e=se.n(Te),we=se(67294);function me(ut){var Ce=we.useRef();Ce.current=ut;var xe=we.useCallback(function(){for(var Ue,Ze=arguments.length,St=new Array(Ze),mt=0;mt<Ze;mt++)St[mt]=arguments[mt];return(Ue=Ce.current)===null||Ue===void 0?void 0:Ue.call.apply(Ue,[Ce].concat(St))},[]);return xe}function De(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var at=De()?we.useLayoutEffect:we.useEffect,Oe=function(Ce,xe){var Ue=we.useRef(!0);at(function(){return Ce(Ue.current)},xe),at(function(){return Ue.current=!1,function(){Ue.current=!0}},[])},Mt=function(Ce,xe){Oe(function(Ue){if(!Ue)return Ce()},xe)},ht=null;function lt(ut){var Ce=we.useRef(!1),xe=we.useState(ut),Ue=(0,Je.Z)(xe,2),Ze=Ue[0],St=Ue[1];we.useEffect(function(){return Ce.current=!1,function(){Ce.current=!0}},[]);function mt(Pt,Qe){Qe&&Ce.current||St(Pt)}return[Ze,mt]}function et(ut){return ut!==void 0}function Ee(ut,Ce){var xe=Ce||{},Ue=xe.defaultValue,Ze=xe.value,St=xe.onChange,mt=xe.postState,Pt=lt(function(){return et(Ze)?Ze:et(Ue)?typeof Ue=="function"?Ue():Ue:typeof ut=="function"?ut():ut}),Qe=(0,Je.Z)(Pt,2),Ft=Qe[0],Dt=Qe[1],an=Ze!==void 0?Ze:Ft,it=mt?mt(an):an,en=me(St),_n=lt([an]),yn=(0,Je.Z)(_n,2),Ve=yn[0],Le=yn[1];Mt(function(){var Dn=Ve[0];Ft!==Dn&&en(Ft,Dn)},[Ve]),Mt(function(){et(Ze)||Dt(Ze)},[Ze]);var Bt=me(function(Dn,dn){Dt(Dn,dn),Le([an],dn)});return[it,Bt]}var yt=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],Vt=(0,we.forwardRef)(function(ut,Ce){var xe,Ue=ut.prefixCls,Ze=Ue===void 0?"rc-checkbox":Ue,St=ut.className,mt=ut.style,Pt=ut.checked,Qe=ut.disabled,Ft=ut.defaultChecked,Dt=Ft===void 0?!1:Ft,an=ut.type,it=an===void 0?"checkbox":an,en=ut.title,_n=ut.onChange,yn=(0,ve.Z)(ut,yt),Ve=(0,we.useRef)(null),Le=Ee(Dt,{value:Pt}),Bt=(0,Je.Z)(Le,2),Dn=Bt[0],dn=Bt[1];(0,we.useImperativeHandle)(Ce,function(){return{focus:function(){var Rn;(Rn=Ve.current)===null||Rn===void 0||Rn.focus()},blur:function(){var Rn;(Rn=Ve.current)===null||Rn===void 0||Rn.blur()},input:Ve.current}});var nt=_e()(Ze,St,(xe={},(0,Be.Z)(xe,"".concat(Ze,"-checked"),Dn),(0,Be.Z)(xe,"".concat(Ze,"-disabled"),Qe),xe)),ft=function(Rn){Qe||("checked"in ut||dn(Rn.target.checked),_n==null||_n({target:(0,We.Z)((0,We.Z)({},ut),{},{type:it,checked:Rn.target.checked}),stopPropagation:function(){Rn.stopPropagation()},preventDefault:function(){Rn.preventDefault()},nativeEvent:Rn.nativeEvent}))};return we.createElement("span",{className:nt,title:en,style:mt},we.createElement("input",(0,fe.Z)({},yn,{className:"".concat(Ze,"-input"),ref:Ve,onChange:ft,disabled:Qe,checked:!!Dn,type:it})),we.createElement("span",{className:"".concat(Ze,"-inner")}))}),qe=Vt},26819:function(En,Yt){"use strict";var se;var fe=typeof Symbol=="function"&&Symbol.for,We=fe?Symbol.for("react.element"):60103,Be=fe?Symbol.for("react.portal"):60106,Je=fe?Symbol.for("react.fragment"):60107,ve=fe?Symbol.for("react.strict_mode"):60108,Te=fe?Symbol.for("react.profiler"):60114,_e=fe?Symbol.for("react.provider"):60109,we=fe?Symbol.for("react.context"):60110,me=fe?Symbol.for("react.async_mode"):60111,De=fe?Symbol.for("react.concurrent_mode"):60111,at=fe?Symbol.for("react.forward_ref"):60112,Oe=fe?Symbol.for("react.suspense"):60113,Mt=fe?Symbol.for("react.suspense_list"):60120,ht=fe?Symbol.for("react.memo"):60115,lt=fe?Symbol.for("react.lazy"):60116,et=fe?Symbol.for("react.block"):60121,Ee=fe?Symbol.for("react.fundamental"):60117,yt=fe?Symbol.for("react.responder"):60118,Vt=fe?Symbol.for("react.scope"):60119;function qe(Ce){if(typeof Ce=="object"&&Ce!==null){var xe=Ce.$$typeof;switch(xe){case We:switch(Ce=Ce.type,Ce){case me:case De:case Je:case Te:case ve:case Oe:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case we:case at:case lt:case ht:case _e:return Ce;default:return xe}}case Be:return xe}}}function ut(Ce){return qe(Ce)===De}se=me,se=De,se=we,se=_e,se=We,se=at,se=Je,se=lt,se=ht,se=Be,se=Te,se=ve,se=Oe,se=function(Ce){return ut(Ce)||qe(Ce)===me},se=ut,se=function(Ce){return qe(Ce)===we},se=function(Ce){return qe(Ce)===_e},se=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===We},se=function(Ce){return qe(Ce)===at},se=function(Ce){return qe(Ce)===Je},se=function(Ce){return qe(Ce)===lt},Yt.isMemo=function(Ce){return qe(Ce)===ht},se=function(Ce){return qe(Ce)===Be},se=function(Ce){return qe(Ce)===Te},se=function(Ce){return qe(Ce)===ve},se=function(Ce){return qe(Ce)===Oe},se=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Je||Ce===De||Ce===Te||Ce===ve||Ce===Oe||Ce===Mt||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===lt||Ce.$$typeof===ht||Ce.$$typeof===_e||Ce.$$typeof===we||Ce.$$typeof===at||Ce.$$typeof===Ee||Ce.$$typeof===yt||Ce.$$typeof===Vt||Ce.$$typeof===et)},se=qe},18459:function(En,Yt,se){"use strict";En.exports=se(26819)},16651:function(En,Yt){"use strict";var se;var fe=Symbol.for("react.element"),We=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Je=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Te=Symbol.for("react.provider"),_e=Symbol.for("react.context"),we=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),De=Symbol.for("react.suspense"),at=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),Mt=Symbol.for("react.lazy"),ht=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function et(Ee){if(typeof Ee=="object"&&Ee!==null){var yt=Ee.$$typeof;switch(yt){case fe:switch(Ee=Ee.type,Ee){case Be:case ve:case Je:case De:case at:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case we:case _e:case me:case Mt:case Oe:case Te:return Ee;default:return yt}}case We:return yt}}}se=_e,se=Te,se=fe,se=me,se=Be,se=Mt,se=Oe,se=We,se=ve,se=Je,se=De,se=at,se=function(){return!1},se=function(){return!1},se=function(Ee){return et(Ee)===_e},se=function(Ee){return et(Ee)===Te},se=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===fe},se=function(Ee){return et(Ee)===me},se=function(Ee){return et(Ee)===Be},se=function(Ee){return et(Ee)===Mt},se=function(Ee){return et(Ee)===Oe},se=function(Ee){return et(Ee)===We},se=function(Ee){return et(Ee)===ve},se=function(Ee){return et(Ee)===Je},se=function(Ee){return et(Ee)===De},se=function(Ee){return et(Ee)===at},se=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Be||Ee===ve||Ee===Je||Ee===De||Ee===at||Ee===ht||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===Mt||Ee.$$typeof===Oe||Ee.$$typeof===Te||Ee.$$typeof===_e||Ee.$$typeof===me||Ee.$$typeof===lt||Ee.getModuleId!==void 0)},se=et},33993:function(En,Yt,se){"use strict";se(16651)},82523:function(En,Yt){"use strict";var se;var fe=Symbol.for("react.element"),We=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Je=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Te=Symbol.for("react.provider"),_e=Symbol.for("react.context"),we=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),De=Symbol.for("react.suspense"),at=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),Mt=Symbol.for("react.lazy"),ht=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function et(Ee){if(typeof Ee=="object"&&Ee!==null){var yt=Ee.$$typeof;switch(yt){case fe:switch(Ee=Ee.type,Ee){case Be:case ve:case Je:case De:case at:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case we:case _e:case me:case Mt:case Oe:case Te:return Ee;default:return yt}}case We:return yt}}}se=_e,se=Te,se=fe,se=me,se=Be,se=Mt,se=Oe,se=We,se=ve,se=Je,se=De,se=at,se=function(){return!1},se=function(){return!1},se=function(Ee){return et(Ee)===_e},se=function(Ee){return et(Ee)===Te},se=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===fe},se=function(Ee){return et(Ee)===me},se=function(Ee){return et(Ee)===Be},se=function(Ee){return et(Ee)===Mt},se=function(Ee){return et(Ee)===Oe},se=function(Ee){return et(Ee)===We},se=function(Ee){return et(Ee)===ve},se=function(Ee){return et(Ee)===Je},se=function(Ee){return et(Ee)===De},se=function(Ee){return et(Ee)===at},se=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Be||Ee===ve||Ee===Je||Ee===De||Ee===at||Ee===ht||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===Mt||Ee.$$typeof===Oe||Ee.$$typeof===Te||Ee.$$typeof===_e||Ee.$$typeof===me||Ee.$$typeof===lt||Ee.getModuleId!==void 0)},se=et},27183:function(En,Yt,se){"use strict";se(82523)},67656:function(En,Yt,se){"use strict";se.r(Yt),se.d(Yt,{BaseInput:function(){return De},default:function(){return Vt}});var fe=se(87462),We=se(1413),Be=se(4942),Je=se(71002),ve=se(94184),Te=se.n(ve),_e=se(67294),we=se(87887),me=function(ut){var Ce,xe,Ue=ut.inputElement,Ze=ut.prefixCls,St=ut.prefix,mt=ut.suffix,Pt=ut.addonBefore,Qe=ut.addonAfter,Ft=ut.className,Dt=ut.style,an=ut.disabled,it=ut.readOnly,en=ut.focused,_n=ut.triggerFocus,yn=ut.allowClear,Ve=ut.value,Le=ut.handleReset,Bt=ut.hidden,Dn=ut.classes,dn=ut.classNames,nt=ut.dataAttrs,ft=ut.styles,Xt=ut.components,Rn=(Xt==null?void 0:Xt.affixWrapper)||"span",wn=(Xt==null?void 0:Xt.groupWrapper)||"span",Zt=(Xt==null?void 0:Xt.wrapper)||"span",Ht=(Xt==null?void 0:Xt.groupAddon)||"span",Tn=(0,_e.useRef)(null),xn=function(qt){var jt;(jt=Tn.current)!==null&&jt!==void 0&&jt.contains(qt.target)&&(_n==null||_n())},ke=function(){var qt;if(!yn)return null;var jt=!an&&!it&&Ve,ar="".concat(Ze,"-clear-icon"),xr=(0,Je.Z)(yn)==="object"&&yn!==null&&yn!==void 0&&yn.clearIcon?yn.clearIcon:"\u2716";return _e.createElement("span",{onClick:Le,onMouseDown:function(pn){return pn.preventDefault()},className:Te()(ar,(qt={},(0,Be.Z)(qt,"".concat(ar,"-hidden"),!jt),(0,Be.Z)(qt,"".concat(ar,"-has-suffix"),!!mt),qt)),role:"button",tabIndex:-1},xr)},ue=(0,_e.cloneElement)(Ue,{value:Ve,hidden:Bt,className:Te()((Ce=Ue.props)===null||Ce===void 0?void 0:Ce.className,!(0,we.X3)(ut)&&!(0,we.He)(ut)&&Ft)||null,style:(0,We.Z)((0,We.Z)({},(xe=Ue.props)===null||xe===void 0?void 0:xe.style),!(0,we.X3)(ut)&&!(0,we.He)(ut)?Dt:{})});if((0,we.X3)(ut)){var le,pe="".concat(Ze,"-affix-wrapper"),he=Te()(pe,(le={},(0,Be.Z)(le,"".concat(pe,"-disabled"),an),(0,Be.Z)(le,"".concat(pe,"-focused"),en),(0,Be.Z)(le,"".concat(pe,"-readonly"),it),(0,Be.Z)(le,"".concat(pe,"-input-with-clear-btn"),mt&&yn&&Ve),le),!(0,we.He)(ut)&&Ft,Dn==null?void 0:Dn.affixWrapper,dn==null?void 0:dn.affixWrapper),oe=(mt||yn)&&_e.createElement("span",{className:Te()("".concat(Ze,"-suffix"),dn==null?void 0:dn.suffix),style:ft==null?void 0:ft.suffix},ke(),mt);ue=_e.createElement(Rn,(0,fe.Z)({className:he,style:(0,We.Z)((0,We.Z)({},(0,we.He)(ut)?void 0:Dt),ft==null?void 0:ft.affixWrapper),hidden:!(0,we.He)(ut)&&Bt,onClick:xn},nt==null?void 0:nt.affixWrapper,{ref:Tn}),St&&_e.createElement("span",{className:Te()("".concat(Ze,"-prefix"),dn==null?void 0:dn.prefix),style:ft==null?void 0:ft.prefix},St),(0,_e.cloneElement)(Ue,{value:Ve,hidden:null}),oe)}if((0,we.He)(ut)){var Ae="".concat(Ze,"-group"),Ge="".concat(Ae,"-addon"),_t=Te()("".concat(Ze,"-wrapper"),Ae,Dn==null?void 0:Dn.wrapper),Rt=Te()("".concat(Ze,"-group-wrapper"),Ft,Dn==null?void 0:Dn.group);return _e.createElement(wn,{className:Rt,style:Dt,hidden:Bt},_e.createElement(Zt,{className:_t},Pt&&_e.createElement(Ht,{className:Ge},Pt),(0,_e.cloneElement)(ue,{hidden:null}),Qe&&_e.createElement(Ht,{className:Ge},Qe)))}return ue},De=me,at=se(74902),Oe=se(97685),Mt=se(45987),ht=se(21770),lt=se(98423),et=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],Ee=(0,_e.forwardRef)(function(qe,ut){var Ce=qe.autoComplete,xe=qe.onChange,Ue=qe.onFocus,Ze=qe.onBlur,St=qe.onPressEnter,mt=qe.onKeyDown,Pt=qe.prefixCls,Qe=Pt===void 0?"rc-input":Pt,Ft=qe.disabled,Dt=qe.htmlSize,an=qe.className,it=qe.maxLength,en=qe.suffix,_n=qe.showCount,yn=qe.type,Ve=yn===void 0?"text":yn,Le=qe.classes,Bt=qe.classNames,Dn=qe.styles,dn=(0,Mt.Z)(qe,et),nt=(0,ht.Z)(qe.defaultValue,{value:qe.value}),ft=(0,Oe.Z)(nt,2),Xt=ft[0],Rn=ft[1],wn=(0,_e.useState)(!1),Zt=(0,Oe.Z)(wn,2),Ht=Zt[0],Tn=Zt[1],xn=(0,_e.useRef)(null),ke=function(Rt){xn.current&&(0,we.nH)(xn.current,Rt)};(0,_e.useImperativeHandle)(ut,function(){return{focus:ke,blur:function(){var Rt;(Rt=xn.current)===null||Rt===void 0||Rt.blur()},setSelectionRange:function(Rt,zt,qt){var jt;(jt=xn.current)===null||jt===void 0||jt.setSelectionRange(Rt,zt,qt)},select:function(){var Rt;(Rt=xn.current)===null||Rt===void 0||Rt.select()},input:xn.current}}),(0,_e.useEffect)(function(){Tn(function(_t){return _t&&Ft?!1:_t})},[Ft]);var ue=function(Rt){qe.value===void 0&&Rn(Rt.target.value),xn.current&&(0,we.rJ)(xn.current,Rt,xe)},le=function(Rt){St&&Rt.key==="Enter"&&St(Rt),mt==null||mt(Rt)},pe=function(Rt){Tn(!0),Ue==null||Ue(Rt)},he=function(Rt){Tn(!1),Ze==null||Ze(Rt)},oe=function(Rt){Rn(""),ke(),xn.current&&(0,we.rJ)(xn.current,Rt,xe)},Ae=function(){var Rt=(0,lt.Z)(qe,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return _e.createElement("input",(0,fe.Z)({autoComplete:Ce},Rt,{onChange:ue,onFocus:pe,onBlur:he,onKeyDown:le,className:Te()(Qe,(0,Be.Z)({},"".concat(Qe,"-disabled"),Ft),Bt==null?void 0:Bt.input),style:Dn==null?void 0:Dn.input,ref:xn,size:Dt,type:Ve}))},Ge=function(){var Rt=Number(it)>0;if(en||_n){var zt=(0,we.D7)(Xt),qt=(0,at.Z)(zt).length,jt=(0,Je.Z)(_n)==="object"?_n.formatter({value:zt,count:qt,maxLength:it}):"".concat(qt).concat(Rt?" / ".concat(it):"");return _e.createElement(_e.Fragment,null,!!_n&&_e.createElement("span",{className:Te()("".concat(Qe,"-show-count-suffix"),(0,Be.Z)({},"".concat(Qe,"-show-count-has-suffix"),!!en),Bt==null?void 0:Bt.count),style:(0,We.Z)({},Dn==null?void 0:Dn.count)},jt),en)}return null};return _e.createElement(De,(0,fe.Z)({},dn,{prefixCls:Qe,className:an,inputElement:Ae(),handleReset:oe,value:(0,we.D7)(Xt),focused:Ht,triggerFocus:ke,suffix:Ge(),disabled:Ft,classes:Le,classNames:Bt,styles:Dn}))}),yt=Ee,Vt=yt},87887:function(En,Yt,se){"use strict";se.d(Yt,{D7:function(){return ve},He:function(){return fe},X3:function(){return We},nH:function(){return Je},rJ:function(){return Be}});function fe(Te){return!!(Te.addonBefore||Te.addonAfter)}function We(Te){return!!(Te.prefix||Te.suffix||Te.allowClear)}function Be(Te,_e,we,me){if(we){var De=_e;if(_e.type==="click"){var at=Te.cloneNode(!0);De=Object.create(_e,{target:{value:at},currentTarget:{value:at}}),at.value="",we(De);return}if(me!==void 0){De=Object.create(_e,{target:{value:Te},currentTarget:{value:Te}}),Te.value=me,we(De);return}we(De)}}function Je(Te,_e){if(Te){Te.focus(_e);var we=_e||{},me=we.cursor;if(me){var De=Te.value.length;switch(me){case"start":Te.setSelectionRange(0,0);break;case"end":Te.setSelectionRange(De,De);break;default:Te.setSelectionRange(0,De)}}}}function ve(Te){return typeof Te=="undefined"||Te===null?"":String(Te)}},78595:function(En,Yt,se){"use strict";se.d(Yt,{iz:function(){return Gr},ck:function(){return fr},BW:function(){return Wr},sN:function(){return fr},Wd:function(){return Gt},ZP:function(){return Fe},Xl:function(){return jt}});var fe=se(87462),We=se(4942),Be=se(1413),Je=se(74902),ve=se(97685),Te=se(45987),_e=se(94184),we=se.n(_e),me=se(67294),De=se(48555);function at(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Oe=at()?me.useLayoutEffect:me.useEffect,Mt=function(je,tt){var st=me.useRef(!0);Oe(function(){return je(st.current)},tt),Oe(function(){return st.current=!1,function(){st.current=!0}},[])},ht=function(je,tt){Mt(function(st){if(!st)return je()},tt)},lt=Mt,et=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ee=void 0;function yt(ze,je){var tt=ze.prefixCls,st=ze.invalidate,kt=ze.item,nn=ze.renderItem,sn=ze.responsive,Jn=ze.responsiveDisabled,yr=ze.registerSize,Zn=ze.itemKey,Cn=ze.className,vn=ze.style,Pn=ze.children,zn=ze.display,mr=ze.order,Yn=ze.component,Xn=Yn===void 0?"div":Yn,rr=(0,Te.Z)(ze,et),ir=sn&&!zn;function br(Ut){yr(Zn,Ut)}me.useEffect(function(){return function(){br(null)}},[]);var Re=nn&&kt!==Ee?nn(kt):Pn,Ke;st||(Ke={opacity:ir?0:1,height:ir?0:Ee,overflowY:ir?"hidden":Ee,order:sn?mr:Ee,pointerEvents:ir?"none":Ee,position:ir?"absolute":Ee});var Lt={};ir&&(Lt["aria-hidden"]=!0);var dt=me.createElement(Xn,(0,fe.Z)({className:we()(!st&&tt,Cn),style:(0,Be.Z)((0,Be.Z)({},Ke),vn)},Lt,rr,{ref:je}),Re);return sn&&(dt=me.createElement(De.Z,{onResize:function(un){var bn=un.offsetWidth;br(bn)},disabled:Jn},dt)),dt}var Vt=me.forwardRef(yt);Vt.displayName="Item";var qe=Vt;function ut(ze){var je=me.useRef();je.current=ze;var tt=me.useCallback(function(){for(var st,kt=arguments.length,nn=new Array(kt),sn=0;sn<kt;sn++)nn[sn]=arguments[sn];return(st=je.current)===null||st===void 0?void 0:st.call.apply(st,[je].concat(nn))},[]);return tt}var Ce=se(73935),xe=function(je){return+setTimeout(je,16)},Ue=function(je){return clearTimeout(je)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(xe=function(je){return window.requestAnimationFrame(je)},Ue=function(je){return window.cancelAnimationFrame(je)});var Ze=0,St=new Map;function mt(ze){St.delete(ze)}var Pt=function(je){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ze+=1;var st=Ze;function kt(nn){if(nn===0)mt(st),je();else{var sn=xe(function(){kt(nn-1)});St.set(st,sn)}}return kt(tt),st};Pt.cancel=function(ze){var je=St.get(ze);return mt(je),Ue(je)};var Qe=Pt;function Ft(ze){if(typeof MessageChannel=="undefined")Qe(ze);else{var je=new MessageChannel;je.port1.onmessage=function(){return ze()},je.port2.postMessage(void 0)}}function Dt(){var ze=me.useRef(null),je=function(st){ze.current||(ze.current=[],Ft(function(){(0,Ce.unstable_batchedUpdates)(function(){ze.current.forEach(function(kt){kt()}),ze.current=null})})),ze.current.push(st)};return je}function an(ze,je){var tt=me.useState(je),st=(0,ve.Z)(tt,2),kt=st[0],nn=st[1],sn=ut(function(Jn){ze(function(){nn(Jn)})});return[kt,sn]}var it=me.createContext(null),en=["component"],_n=["className"],yn=["className"],Ve=function(je,tt){var st=me.useContext(it);if(!st){var kt=je.component,nn=kt===void 0?"div":kt,sn=(0,Te.Z)(je,en);return me.createElement(nn,(0,fe.Z)({},sn,{ref:tt}))}var Jn=st.className,yr=(0,Te.Z)(st,_n),Zn=je.className,Cn=(0,Te.Z)(je,yn);return me.createElement(it.Provider,{value:null},me.createElement(qe,(0,fe.Z)({ref:tt,className:we()(Jn,Zn)},yr,Cn)))},Le=me.forwardRef(Ve);Le.displayName="RawItem";var Bt=Le,Dn=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],dn="responsive",nt="invalidate";function ft(ze){return"+ ".concat(ze.length," ...")}function Xt(ze,je){var tt=ze.prefixCls,st=tt===void 0?"rc-overflow":tt,kt=ze.data,nn=kt===void 0?[]:kt,sn=ze.renderItem,Jn=ze.renderRawItem,yr=ze.itemKey,Zn=ze.itemWidth,Cn=Zn===void 0?10:Zn,vn=ze.ssr,Pn=ze.style,zn=ze.className,mr=ze.maxCount,Yn=ze.renderRest,Xn=ze.renderRawRest,rr=ze.suffix,ir=ze.component,br=ir===void 0?"div":ir,Re=ze.itemComponent,Ke=ze.onVisibleChange,Lt=(0,Te.Z)(ze,Dn),dt=vn==="full",Ut=Dt(),un=an(Ut,null),bn=(0,ve.Z)(un,2),Kn=bn[0],Ln=bn[1],on=Kn||0,Hn=an(Ut,new Map),jn=(0,ve.Z)(Hn,2),wr=jn[0],Wn=jn[1],Or=an(Ut,0),Yr=(0,ve.Z)(Or,2),$r=Yr[0],jr=Yr[1],Er=an(Ut,0),zr=(0,ve.Z)(Er,2),ei=zr[0],ci=zr[1],Fr=an(Ut,0),fi=(0,ve.Z)(Fr,2),Oi=fi[0],na=fi[1],Xi=(0,me.useState)(null),Fi=(0,ve.Z)(Xi,2),Ji=Fi[0],Qi=Fi[1],wi=(0,me.useState)(null),zi=(0,ve.Z)(wi,2),Jr=zi[0],hi=zi[1],Ii=me.useMemo(function(){return Jr===null&&dt?Number.MAX_SAFE_INTEGER:Jr||0},[Jr,Kn]),Yi=(0,me.useState)(!1),Ba=(0,ve.Z)(Yi,2),$a=Ba[0],Aa=Ba[1],ca="".concat(st,"-item"),ea=Math.max($r,ei),Ei=mr===dn,Oa=nn.length&&Ei,ki=mr===nt,ti=Oa||typeof mr=="number"&&nn.length>mr,Wi=(0,me.useMemo)(function(){var _i=nn;return Oa?Kn===null&&dt?_i=nn:_i=nn.slice(0,Math.min(nn.length,on/Cn)):typeof mr=="number"&&(_i=nn.slice(0,mr)),_i},[nn,Cn,Kn,mr,Oa]),ua=(0,me.useMemo)(function(){return Oa?nn.slice(Ii+1):nn.slice(Wi.length)},[nn,Wi,Oa,Ii]),Vi=(0,me.useCallback)(function(_i,Ui){var da;return typeof yr=="function"?yr(_i):(da=yr&&(_i==null?void 0:_i[yr]))!==null&&da!==void 0?da:Ui},[yr]),aa=(0,me.useCallback)(sn||function(_i){return _i},[sn]);function mi(_i,Ui,da){Jr===_i&&(Ui===void 0||Ui===Ji)||(hi(_i),da||(Aa(_i<nn.length-1),Ke==null||Ke(_i)),Ui!==void 0&&Qi(Ui))}function pa(_i,Ui){Ln(Ui.clientWidth)}function xa(_i,Ui){Wn(function(da){var Sa=new Map(da);return Ui===null?Sa.delete(_i):Sa.set(_i,Ui),Sa})}function fa(_i,Ui){ci(Ui),jr(ei)}function wa(_i,Ui){na(Ui)}function Ea(_i){return wr.get(Vi(Wi[_i],_i))}lt(function(){if(on&&typeof ea=="number"&&Wi){var _i=Oi,Ui=Wi.length,da=Ui-1;if(!Ui){mi(0,null);return}for(var Sa=0;Sa<Ui;Sa+=1){var Ka=Ea(Sa);if(dt&&(Ka=Ka||0),Ka===void 0){mi(Sa-1,void 0,!0);break}if(_i+=Ka,da===0&&_i<=on||Sa===da-1&&_i+Ea(da)<=on){mi(da,null);break}else if(_i+ea>on){mi(Sa-1,_i-Ka-Oi+ei);break}}rr&&Ea(0)+Oi>on&&Qi(null)}},[on,wr,ei,Oi,Vi,Wi]);var Za=$a&&!!ua.length,ha={};Ji!==null&&Oa&&(ha={position:"absolute",left:Ji,top:0});var ka={prefixCls:ca,responsive:Oa,component:Re,invalidate:ki},Ja=Jn?function(_i,Ui){var da=Vi(_i,Ui);return me.createElement(it.Provider,{key:da,value:(0,Be.Z)((0,Be.Z)({},ka),{},{order:Ui,item:_i,itemKey:da,registerSize:xa,display:Ui<=Ii})},Jn(_i,Ui))}:function(_i,Ui){var da=Vi(_i,Ui);return me.createElement(qe,(0,fe.Z)({},ka,{order:Ui,key:da,item:_i,renderItem:aa,itemKey:da,registerSize:xa,display:Ui<=Ii}))},Ga,so={order:Za?Ii:Number.MAX_SAFE_INTEGER,className:"".concat(ca,"-rest"),registerSize:fa,display:Za};if(Xn)Xn&&(Ga=me.createElement(it.Provider,{value:(0,Be.Z)((0,Be.Z)({},ka),so)},Xn(ua)));else{var Fa=Yn||ft;Ga=me.createElement(qe,(0,fe.Z)({},ka,so),typeof Fa=="function"?Fa(ua):Fa)}var Ca=me.createElement(br,(0,fe.Z)({className:we()(!ki&&st,zn),style:Pn,ref:je},Lt),Wi.map(Ja),ti?Ga:null,rr&&me.createElement(qe,(0,fe.Z)({},ka,{responsive:Ei,responsiveDisabled:!Oa,order:Ii,className:"".concat(ca,"-suffix"),registerSize:wa,display:!0,style:ha}),rr));return Ei&&(Ca=me.createElement(De.Z,{onResize:pa,disabled:!Oa},Ca)),Ca}var Rn=me.forwardRef(Xt);Rn.displayName="Overflow",Rn.Item=Bt,Rn.RESPONSIVE=dn,Rn.INVALIDATE=nt;var wn=Rn,Zt=wn,Ht=se(21770),Tn=se(80334),xn=se(91881),ke=me.createContext(null);function ue(ze,je){return ze===void 0?null:"".concat(ze,"-").concat(je)}function le(ze){var je=me.useContext(ke);return ue(je,ze)}var pe=se(56982),he=["children","locked"],oe=me.createContext(null);function Ae(ze,je){var tt=(0,Be.Z)({},ze);return Object.keys(je).forEach(function(st){var kt=je[st];kt!==void 0&&(tt[st]=kt)}),tt}function Ge(ze){var je=ze.children,tt=ze.locked,st=(0,Te.Z)(ze,he),kt=me.useContext(oe),nn=(0,pe.Z)(function(){return Ae(kt,st)},[kt,st],function(sn,Jn){return!tt&&(sn[0]!==Jn[0]||!(0,xn.Z)(sn[1],Jn[1],!0))});return me.createElement(oe.Provider,{value:nn},je)}var _t=[],Rt=me.createContext(null);function zt(){return me.useContext(Rt)}var qt=me.createContext(_t);function jt(ze){var je=me.useContext(qt);return me.useMemo(function(){return ze!==void 0?[].concat((0,Je.Z)(je),[ze]):je},[je,ze])}var ar=me.createContext(null),xr=me.createContext({}),Nt=xr,pn=se(15105),cr=se(75164),Rr=function(ze){if(!ze)return!1;if(ze instanceof Element){if(ze.offsetParent)return!0;if(ze.getBBox){var je=ze.getBBox(),tt=je.width,st=je.height;if(tt||st)return!0}if(ze.getBoundingClientRect){var kt=ze.getBoundingClientRect(),nn=kt.width,sn=kt.height;if(nn||sn)return!0}}return!1};function rt(ze){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Rr(ze)){var tt=ze.nodeName.toLowerCase(),st=["input","select","textarea","button"].includes(tt)||ze.isContentEditable||tt==="a"&&!!ze.getAttribute("href"),kt=ze.getAttribute("tabindex"),nn=Number(kt),sn=null;return kt&&!Number.isNaN(nn)?sn=nn:st&&sn===null&&(sn=0),st&&ze.disabled&&(sn=null),sn!==null&&(sn>=0||je&&sn<0)}return!1}function Kt(ze){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=(0,Je.Z)(ze.querySelectorAll("*")).filter(function(st){return rt(st,je)});return rt(ze,je)&&tt.unshift(ze),tt}var Bn=null;function Gn(){Bn=document.activeElement}function tr(){Bn=null}function Sr(){if(Bn)try{Bn.focus()}catch(ze){}}function Ar(ze,je){if(je.keyCode===9){var tt=Kt(ze),st=tt[je.shiftKey?0:tt.length-1],kt=st===document.activeElement||ze===document.activeElement;if(kt){var nn=tt[je.shiftKey?tt.length-1:0];nn.focus(),je.preventDefault()}}}var Mr=pn.Z.LEFT,Pr=pn.Z.RIGHT,Vr=pn.Z.UP,lr=pn.Z.DOWN,si=pn.Z.ENTER,Li=pn.Z.ESC,Ni=pn.Z.HOME,Hi=pn.Z.END,ri=[Vr,lr,Mr,Pr];function vt(ze,je,tt,st){var kt,nn,sn,Jn,yr="prev",Zn="next",Cn="children",vn="parent";if(ze==="inline"&&st===si)return{inlineTrigger:!0};var Pn=(kt={},(0,We.Z)(kt,Vr,yr),(0,We.Z)(kt,lr,Zn),kt),zn=(nn={},(0,We.Z)(nn,Mr,tt?Zn:yr),(0,We.Z)(nn,Pr,tt?yr:Zn),(0,We.Z)(nn,lr,Cn),(0,We.Z)(nn,si,Cn),nn),mr=(sn={},(0,We.Z)(sn,Vr,yr),(0,We.Z)(sn,lr,Zn),(0,We.Z)(sn,si,Cn),(0,We.Z)(sn,Li,vn),(0,We.Z)(sn,Mr,tt?Cn:vn),(0,We.Z)(sn,Pr,tt?vn:Cn),sn),Yn={inline:Pn,horizontal:zn,vertical:mr,inlineSub:Pn,horizontalSub:mr,verticalSub:mr},Xn=(Jn=Yn["".concat(ze).concat(je?"":"Sub")])===null||Jn===void 0?void 0:Jn[st];switch(Xn){case yr:return{offset:-1,sibling:!0};case Zn:return{offset:1,sibling:!0};case vn:return{offset:-1,sibling:!1};case Cn:return{offset:1,sibling:!1};default:return null}}function Sn(ze){for(var je=ze;je;){if(je.getAttribute("data-menu-list"))return je;je=je.parentElement}return null}function kn(ze,je){for(var tt=ze||document.activeElement;tt;){if(je.has(tt))return tt;tt=tt.parentElement}return null}function In(ze,je){var tt=Kt(ze,!0);return tt.filter(function(st){return je.has(st)})}function sr(ze,je,tt){var st=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!ze)return null;var kt=In(ze,je),nn=kt.length,sn=kt.findIndex(function(Jn){return tt===Jn});return st<0?sn===-1?sn=nn-1:sn-=1:st>0&&(sn+=1),sn=(sn+nn)%nn,kt[sn]}function qn(ze,je,tt,st,kt,nn,sn,Jn,yr,Zn){var Cn=me.useRef(),vn=me.useRef();vn.current=je;var Pn=function(){cr.Z.cancel(Cn.current)};return me.useEffect(function(){return function(){Pn()}},[]),function(zn){var mr=zn.which;if([].concat(ri,[si,Li,Ni,Hi]).includes(mr)){var Yn,Xn,rr,ir=function(){Yn=new Set,Xn=new Map,rr=new Map;var jn=nn();return jn.forEach(function(wr){var Wn=document.querySelector("[data-menu-id='".concat(ue(st,wr),"']"));Wn&&(Yn.add(Wn),rr.set(Wn,wr),Xn.set(wr,Wn))}),Yn};ir();var br=Xn.get(je),Re=kn(br,Yn),Ke=rr.get(Re),Lt=vt(ze,sn(Ke,!0).length===1,tt,mr);if(!Lt&&mr!==Ni&&mr!==Hi)return;(ri.includes(mr)||[Ni,Hi].includes(mr))&&zn.preventDefault();var dt=function(jn){if(jn){var wr=jn,Wn=jn.querySelector("a");Wn!=null&&Wn.getAttribute("href")&&(wr=Wn);var Or=rr.get(jn);Jn(Or),Pn(),Cn.current=(0,cr.Z)(function(){vn.current===Or&&wr.focus()})}};if([Ni,Hi].includes(mr)||Lt.sibling||!Re){var Ut;!Re||ze==="inline"?Ut=kt.current:Ut=Sn(Re);var un,bn=In(Ut,Yn);mr===Ni?un=bn[0]:mr===Hi?un=bn[bn.length-1]:un=sr(Ut,Yn,Re,Lt.offset),dt(un)}else if(Lt.inlineTrigger)yr(Ke);else if(Lt.offset>0)yr(Ke,!0),Pn(),Cn.current=(0,cr.Z)(function(){ir();var Hn=Re.getAttribute("aria-controls"),jn=document.getElementById(Hn),wr=sr(jn,Yn);dt(wr)},5);else if(Lt.offset<0){var Kn=sn(Ke,!0),Ln=Kn[Kn.length-2],on=Xn.get(Ln);yr(Ln,!1),dt(on)}}Zn==null||Zn(zn)}}function hr(ze){Promise.resolve().then(ze)}var $n="__RC_UTIL_PATH_SPLIT__",Xe=function(je){return je.join($n)},ct=function(je){return je.split($n)},Tt="rc-menu-more";function Wt(){var ze=me.useState({}),je=(0,ve.Z)(ze,2),tt=je[1],st=(0,me.useRef)(new Map),kt=(0,me.useRef)(new Map),nn=me.useState([]),sn=(0,ve.Z)(nn,2),Jn=sn[0],yr=sn[1],Zn=(0,me.useRef)(0),Cn=(0,me.useRef)(!1),vn=function(){Cn.current||tt({})},Pn=(0,me.useCallback)(function(br,Re){var Ke=Xe(Re);kt.current.set(Ke,br),st.current.set(br,Ke),Zn.current+=1;var Lt=Zn.current;hr(function(){Lt===Zn.current&&vn()})},[]),zn=(0,me.useCallback)(function(br,Re){var Ke=Xe(Re);kt.current.delete(Ke),st.current.delete(br)},[]),mr=(0,me.useCallback)(function(br){yr(br)},[]),Yn=(0,me.useCallback)(function(br,Re){var Ke=st.current.get(br)||"",Lt=ct(Ke);return Re&&Jn.includes(Lt[0])&&Lt.unshift(Tt),Lt},[Jn]),Xn=(0,me.useCallback)(function(br,Re){return br.some(function(Ke){var Lt=Yn(Ke,!0);return Lt.includes(Re)})},[Yn]),rr=function(){var Re=(0,Je.Z)(st.current.keys());return Jn.length&&Re.push(Tt),Re},ir=(0,me.useCallback)(function(br){var Re="".concat(st.current.get(br)).concat($n),Ke=new Set;return(0,Je.Z)(kt.current.keys()).forEach(function(Lt){Lt.startsWith(Re)&&Ke.add(kt.current.get(Lt))}),Ke},[]);return me.useEffect(function(){return function(){Cn.current=!0}},[]),{registerPath:Pn,unregisterPath:zn,refreshOverflowKeys:mr,isSubPathKey:Xn,getKeyPath:Yn,getKeys:rr,getSubPathKeys:ir}}function He(ze){var je=me.useRef(ze);je.current=ze;var tt=me.useCallback(function(){for(var st,kt=arguments.length,nn=new Array(kt),sn=0;sn<kt;sn++)nn[sn]=arguments[sn];return(st=je.current)===null||st===void 0?void 0:st.call.apply(st,[je].concat(nn))},[]);return ze?tt:void 0}var pt=Math.random().toFixed(5).toString().slice(2),$t=0;function Ot(ze){var je=(0,Ht.Z)(ze,{value:ze}),tt=(0,ve.Z)(je,2),st=tt[0],kt=tt[1];return me.useEffect(function(){$t+=1;var nn="".concat(pt,"-").concat($t);kt("rc-menu-uuid-".concat(nn))},[]),st}var Jt=se(15671),tn=se(43144),Un=se(60136),_r=se(51630),nr=se(98423),er=se(42550);function ur(ze,je,tt,st){var kt=me.useContext(oe),nn=kt.activeKey,sn=kt.onActive,Jn=kt.onInactive,yr={active:nn===ze};return je||(yr.onMouseEnter=function(Zn){tt==null||tt({key:ze,domEvent:Zn}),sn(ze)},yr.onMouseLeave=function(Zn){st==null||st({key:ze,domEvent:Zn}),Jn(ze)}),yr}function dr(ze){var je=me.useContext(oe),tt=je.mode,st=je.rtl,kt=je.inlineIndent;if(tt!=="inline")return null;var nn=ze;return st?{paddingRight:nn*kt}:{paddingLeft:nn*kt}}function gt(ze){var je=ze.icon,tt=ze.props,st=ze.children,kt;return je===null||je===!1?null:(typeof je=="function"?kt=me.createElement(je,(0,Be.Z)({},tt)):typeof je!="boolean"&&(kt=je),kt||st||null)}var ot=["item"];function Ct(ze){var je=ze.item,tt=(0,Te.Z)(ze,ot);return Object.defineProperty(tt,"item",{get:function(){return(0,Tn.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),je}}),tt}var ln=["title","attribute","elementRef"],Nn=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],cn=["active"],mn=function(ze){(0,Un.Z)(tt,ze);var je=(0,_r.Z)(tt);function tt(){return(0,Jt.Z)(this,tt),je.apply(this,arguments)}return(0,tn.Z)(tt,[{key:"render",value:function(){var kt=this.props,nn=kt.title,sn=kt.attribute,Jn=kt.elementRef,yr=(0,Te.Z)(kt,ln),Zn=(0,nr.Z)(yr,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,Tn.ZP)(!sn,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),me.createElement(Zt.Item,(0,fe.Z)({},sn,{title:typeof nn=="string"?nn:void 0},Zn,{ref:Jn}))}}]),tt}(me.Component),gn=me.forwardRef(function(ze,je){var tt,st=ze.style,kt=ze.className,nn=ze.eventKey,sn=ze.warnKey,Jn=ze.disabled,yr=ze.itemIcon,Zn=ze.children,Cn=ze.role,vn=ze.onMouseEnter,Pn=ze.onMouseLeave,zn=ze.onClick,mr=ze.onKeyDown,Yn=ze.onFocus,Xn=(0,Te.Z)(ze,Nn),rr=le(nn),ir=me.useContext(oe),br=ir.prefixCls,Re=ir.onItemClick,Ke=ir.disabled,Lt=ir.overflowDisabled,dt=ir.itemIcon,Ut=ir.selectedKeys,un=ir.onActive,bn=me.useContext(Nt),Kn=bn._internalRenderMenuItem,Ln="".concat(br,"-item"),on=me.useRef(),Hn=me.useRef(),jn=Ke||Jn,wr=(0,er.x1)(je,Hn),Wn=jt(nn),Or=function(Fi){return{key:nn,keyPath:(0,Je.Z)(Wn).reverse(),item:on.current,domEvent:Fi}},Yr=yr||dt,$r=ur(nn,jn,vn,Pn),jr=$r.active,Er=(0,Te.Z)($r,cn),zr=Ut.includes(nn),ei=dr(Wn.length),ci=function(Fi){if(!jn){var Ji=Or(Fi);zn==null||zn(Ct(Ji)),Re(Ji)}},Fr=function(Fi){if(mr==null||mr(Fi),Fi.which===pn.Z.ENTER){var Ji=Or(Fi);zn==null||zn(Ct(Ji)),Re(Ji)}},fi=function(Fi){un(nn),Yn==null||Yn(Fi)},Oi={};ze.role==="option"&&(Oi["aria-selected"]=zr);var na=me.createElement(mn,(0,fe.Z)({ref:on,elementRef:wr,role:Cn===null?"none":Cn||"menuitem",tabIndex:Jn?null:-1,"data-menu-id":Lt&&rr?null:rr},Xn,Er,Oi,{component:"li","aria-disabled":Jn,style:(0,Be.Z)((0,Be.Z)({},ei),st),className:we()(Ln,(tt={},(0,We.Z)(tt,"".concat(Ln,"-active"),jr),(0,We.Z)(tt,"".concat(Ln,"-selected"),zr),(0,We.Z)(tt,"".concat(Ln,"-disabled"),jn),tt),kt),onClick:ci,onKeyDown:Fr,onFocus:fi}),Zn,me.createElement(gt,{props:(0,Be.Z)((0,Be.Z)({},ze),{},{isSelected:zr}),icon:Yr}));return Kn&&(na=Kn(na,ze,{selected:zr})),na});function Fn(ze,je){var tt=ze.eventKey,st=zt(),kt=jt(tt);return me.useEffect(function(){if(st)return st.registerPath(tt,kt),function(){st.unregisterPath(tt,kt)}},[kt]),st?null:me.createElement(gn,(0,fe.Z)({},ze,{ref:je}))}var fr=me.forwardRef(Fn),Qt=["className","children"],Qr=function(je,tt){var st=je.className,kt=je.children,nn=(0,Te.Z)(je,Qt),sn=me.useContext(oe),Jn=sn.prefixCls,yr=sn.mode,Zn=sn.rtl;return me.createElement("ul",(0,fe.Z)({className:we()(Jn,Zn&&"".concat(Jn,"-rtl"),"".concat(Jn,"-sub"),"".concat(Jn,"-").concat(yr==="inline"?"inline":"vertical"),st),role:"menu"},nn,{"data-menu-list":!0,ref:tt}),kt)},Ur=me.forwardRef(Qr);Ur.displayName="SubMenuList";var Bi=Ur,Ai=se(50344);function gi(ze,je){return(0,Ai.Z)(ze).map(function(tt,st){if(me.isValidElement(tt)){var kt,nn,sn=tt.key,Jn=(kt=(nn=tt.props)===null||nn===void 0?void 0:nn.eventKey)!==null&&kt!==void 0?kt:sn,yr=Jn==null;yr&&(Jn="tmp_key-".concat([].concat((0,Je.Z)(je),[st]).join("-")));var Zn={key:Jn,eventKey:Jn};return me.cloneElement(tt,Zn)}return tt})}var qi=se(62709),xi={adjustX:1,adjustY:1},li={topLeft:{points:["bl","tl"],overflow:xi},topRight:{points:["br","tr"],overflow:xi},bottomLeft:{points:["tl","bl"],overflow:xi},bottomRight:{points:["tr","br"],overflow:xi},leftTop:{points:["tr","tl"],overflow:xi},leftBottom:{points:["br","bl"],overflow:xi},rightTop:{points:["tl","tr"],overflow:xi},rightBottom:{points:["bl","br"],overflow:xi}},$i={topLeft:{points:["bl","tl"],overflow:xi},topRight:{points:["br","tr"],overflow:xi},bottomLeft:{points:["tl","bl"],overflow:xi},bottomRight:{points:["tr","br"],overflow:xi},rightTop:{points:["tr","tl"],overflow:xi},rightBottom:{points:["br","bl"],overflow:xi},leftTop:{points:["tl","tr"],overflow:xi},leftBottom:{points:["bl","br"],overflow:xi}},Gi=null;function qr(ze,je,tt){if(je)return je;if(tt)return tt[ze]||tt.other}var vi={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Zi(ze){var je=ze.prefixCls,tt=ze.visible,st=ze.children,kt=ze.popup,nn=ze.popupStyle,sn=ze.popupClassName,Jn=ze.popupOffset,yr=ze.disabled,Zn=ze.mode,Cn=ze.onVisibleChange,vn=me.useContext(oe),Pn=vn.getPopupContainer,zn=vn.rtl,mr=vn.subMenuOpenDelay,Yn=vn.subMenuCloseDelay,Xn=vn.builtinPlacements,rr=vn.triggerSubMenuAction,ir=vn.forceSubMenuRender,br=vn.rootClassName,Re=vn.motion,Ke=vn.defaultMotions,Lt=me.useState(!1),dt=(0,ve.Z)(Lt,2),Ut=dt[0],un=dt[1],bn=zn?(0,Be.Z)((0,Be.Z)({},$i),Xn):(0,Be.Z)((0,Be.Z)({},li),Xn),Kn=vi[Zn],Ln=qr(Zn,Re,Ke),on=me.useRef(Ln);Zn!=="inline"&&(on.current=Ln);var Hn=(0,Be.Z)((0,Be.Z)({},on.current),{},{leavedClassName:"".concat(je,"-hidden"),removeOnLeave:!1,motionAppear:!0}),jn=me.useRef();return me.useEffect(function(){return jn.current=(0,cr.Z)(function(){un(tt)}),function(){cr.Z.cancel(jn.current)}},[tt]),me.createElement(qi.Z,{prefixCls:je,popupClassName:we()("".concat(je,"-popup"),(0,We.Z)({},"".concat(je,"-rtl"),zn),sn,br),stretch:Zn==="horizontal"?"minWidth":null,getPopupContainer:Pn,builtinPlacements:bn,popupPlacement:Kn,popupVisible:Ut,popup:kt,popupStyle:nn,popupAlign:Jn&&{offset:Jn},action:yr?[]:[rr],mouseEnterDelay:mr,mouseLeaveDelay:Yn,onPopupVisibleChange:Cn,forceRender:ir,popupMotion:Hn,fresh:!0},st)}var la=se(62874);function ta(ze){var je=ze.id,tt=ze.open,st=ze.keyPath,kt=ze.children,nn="inline",sn=me.useContext(oe),Jn=sn.prefixCls,yr=sn.forceSubMenuRender,Zn=sn.motion,Cn=sn.defaultMotions,vn=sn.mode,Pn=me.useRef(!1);Pn.current=vn===nn;var zn=me.useState(!Pn.current),mr=(0,ve.Z)(zn,2),Yn=mr[0],Xn=mr[1],rr=Pn.current?tt:!1;me.useEffect(function(){Pn.current&&Xn(!1)},[vn]);var ir=(0,Be.Z)({},qr(nn,Zn,Cn));st.length>1&&(ir.motionAppear=!1);var br=ir.onVisibleChanged;return ir.onVisibleChanged=function(Re){return!Pn.current&&!Re&&Xn(!0),br==null?void 0:br(Re)},Yn?null:me.createElement(Ge,{mode:nn,locked:!Pn.current},me.createElement(la.Z,(0,fe.Z)({visible:rr},ir,{forceRender:yr,removeOnLeave:!1,leavedClassName:"".concat(Jn,"-hidden")}),function(Re){var Ke=Re.className,Lt=Re.style;return me.createElement(Bi,{id:je,className:Ke,style:Lt},kt)}))}var ii=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Et=["active"],wt=function(je){var tt,st=je.style,kt=je.className,nn=je.title,sn=je.eventKey,Jn=je.warnKey,yr=je.disabled,Zn=je.internalPopupClose,Cn=je.children,vn=je.itemIcon,Pn=je.expandIcon,zn=je.popupClassName,mr=je.popupOffset,Yn=je.popupStyle,Xn=je.onClick,rr=je.onMouseEnter,ir=je.onMouseLeave,br=je.onTitleClick,Re=je.onTitleMouseEnter,Ke=je.onTitleMouseLeave,Lt=(0,Te.Z)(je,ii),dt=le(sn),Ut=me.useContext(oe),un=Ut.prefixCls,bn=Ut.mode,Kn=Ut.openKeys,Ln=Ut.disabled,on=Ut.overflowDisabled,Hn=Ut.activeKey,jn=Ut.selectedKeys,wr=Ut.itemIcon,Wn=Ut.expandIcon,Or=Ut.onItemClick,Yr=Ut.onOpenChange,$r=Ut.onActive,jr=me.useContext(Nt),Er=jr._internalRenderSubMenuItem,zr=me.useContext(ar),ei=zr.isSubPathKey,ci=jt(),Fr="".concat(un,"-submenu"),fi=Ln||yr,Oi=me.useRef(),na=me.useRef(),Xi=vn!=null?vn:wr,Fi=Pn!=null?Pn:Wn,Ji=Kn.includes(sn),Qi=!on&&Ji,wi=ei(jn,sn),zi=ur(sn,fi,Re,Ke),Jr=zi.active,hi=(0,Te.Z)(zi,Et),Ii=me.useState(!1),Yi=(0,ve.Z)(Ii,2),Ba=Yi[0],$a=Yi[1],Aa=function(wa){fi||$a(wa)},ca=function(wa){Aa(!0),rr==null||rr({key:sn,domEvent:wa})},ea=function(wa){Aa(!1),ir==null||ir({key:sn,domEvent:wa})},Ei=me.useMemo(function(){return Jr||(bn!=="inline"?Ba||ei([Hn],sn):!1)},[bn,Jr,Hn,Ba,sn,ei]),Oa=dr(ci.length),ki=function(wa){fi||(br==null||br({key:sn,domEvent:wa}),bn==="inline"&&Yr(sn,!Ji))},ti=He(function(fa){Xn==null||Xn(Ct(fa)),Or(fa)}),Wi=function(wa){bn!=="inline"&&Yr(sn,wa)},ua=function(){$r(sn)},Vi=dt&&"".concat(dt,"-popup"),aa=me.createElement("div",(0,fe.Z)({role:"menuitem",style:Oa,className:"".concat(Fr,"-title"),tabIndex:fi?null:-1,ref:Oi,title:typeof nn=="string"?nn:null,"data-menu-id":on&&dt?null:dt,"aria-expanded":Qi,"aria-haspopup":!0,"aria-controls":Vi,"aria-disabled":fi,onClick:ki,onFocus:ua},hi),nn,me.createElement(gt,{icon:bn!=="horizontal"?Fi:void 0,props:(0,Be.Z)((0,Be.Z)({},je),{},{isOpen:Qi,isSubMenu:!0})},me.createElement("i",{className:"".concat(Fr,"-arrow")}))),mi=me.useRef(bn);if(bn!=="inline"&&ci.length>1?mi.current="vertical":mi.current=bn,!on){var pa=mi.current;aa=me.createElement(Zi,{mode:pa,prefixCls:Fr,visible:!Zn&&Qi&&bn!=="inline",popupClassName:zn,popupOffset:mr,popupStyle:Yn,popup:me.createElement(Ge,{mode:pa==="horizontal"?"vertical":pa},me.createElement(Bi,{id:Vi,ref:na},Cn)),disabled:fi,onVisibleChange:Wi},aa)}var xa=me.createElement(Zt.Item,(0,fe.Z)({role:"none"},Lt,{component:"li",style:st,className:we()(Fr,"".concat(Fr,"-").concat(bn),kt,(tt={},(0,We.Z)(tt,"".concat(Fr,"-open"),Qi),(0,We.Z)(tt,"".concat(Fr,"-active"),Ei),(0,We.Z)(tt,"".concat(Fr,"-selected"),wi),(0,We.Z)(tt,"".concat(Fr,"-disabled"),fi),tt)),onMouseEnter:ca,onMouseLeave:ea}),aa,!on&&me.createElement(ta,{id:Vi,open:Qi,keyPath:ci},Cn));return Er&&(xa=Er(xa,je,{selected:wi,active:Ei,open:Qi,disabled:fi})),me.createElement(Ge,{onItemClick:ti,mode:bn==="horizontal"?"vertical":bn,itemIcon:Xi,expandIcon:Fi},xa)};function Gt(ze){var je=ze.eventKey,tt=ze.children,st=jt(je),kt=gi(tt,st),nn=zt();me.useEffect(function(){if(nn)return nn.registerPath(je,st),function(){nn.unregisterPath(je,st)}},[st]);var sn;return nn?sn=kt:sn=me.createElement(wt,ze,kt),me.createElement(qt.Provider,{value:st},sn)}var fn=se(71002),On=["className","title","eventKey","children"],gr=["children"],Tr=function(je){var tt=je.className,st=je.title,kt=je.eventKey,nn=je.children,sn=(0,Te.Z)(je,On),Jn=me.useContext(oe),yr=Jn.prefixCls,Zn="".concat(yr,"-item-group");return me.createElement("li",(0,fe.Z)({role:"presentation"},sn,{onClick:function(vn){return vn.stopPropagation()},className:we()(Zn,tt)}),me.createElement("div",{role:"presentation",className:"".concat(Zn,"-title"),title:typeof st=="string"?st:void 0},st),me.createElement("ul",{role:"group",className:"".concat(Zn,"-list")},nn))};function Wr(ze){var je=ze.children,tt=(0,Te.Z)(ze,gr),st=jt(tt.eventKey),kt=gi(je,st),nn=zt();return nn?kt:me.createElement(Tr,(0,nr.Z)(tt,["warnKey"]),kt)}function Gr(ze){var je=ze.className,tt=ze.style,st=me.useContext(oe),kt=st.prefixCls,nn=zt();return nn?null:me.createElement("li",{role:"separator",className:we()("".concat(kt,"-item-divider"),je),style:tt})}var Hr=["label","children","key","type"];function ni(ze){return(ze||[]).map(function(je,tt){if(je&&(0,fn.Z)(je)==="object"){var st=je,kt=st.label,nn=st.children,sn=st.key,Jn=st.type,yr=(0,Te.Z)(st,Hr),Zn=sn!=null?sn:"tmp-".concat(tt);return nn||Jn==="group"?Jn==="group"?me.createElement(Wr,(0,fe.Z)({key:Zn},yr,{title:kt}),ni(nn)):me.createElement(Gt,(0,fe.Z)({key:Zn},yr,{title:kt}),ni(nn)):Jn==="divider"?me.createElement(Gr,(0,fe.Z)({key:Zn},yr)):me.createElement(fr,(0,fe.Z)({key:Zn},yr),kt)}return null}).filter(function(je){return je})}function yi(ze,je,tt){var st=ze;return je&&(st=ni(je)),gi(st,tt)}var Lr=["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"],pi=[],Ti=me.forwardRef(function(ze,je){var tt,st,kt=ze,nn=kt.prefixCls,sn=nn===void 0?"rc-menu":nn,Jn=kt.rootClassName,yr=kt.style,Zn=kt.className,Cn=kt.tabIndex,vn=Cn===void 0?0:Cn,Pn=kt.items,zn=kt.children,mr=kt.direction,Yn=kt.id,Xn=kt.mode,rr=Xn===void 0?"vertical":Xn,ir=kt.inlineCollapsed,br=kt.disabled,Re=kt.disabledOverflow,Ke=kt.subMenuOpenDelay,Lt=Ke===void 0?.1:Ke,dt=kt.subMenuCloseDelay,Ut=dt===void 0?.1:dt,un=kt.forceSubMenuRender,bn=kt.defaultOpenKeys,Kn=kt.openKeys,Ln=kt.activeKey,on=kt.defaultActiveFirst,Hn=kt.selectable,jn=Hn===void 0?!0:Hn,wr=kt.multiple,Wn=wr===void 0?!1:wr,Or=kt.defaultSelectedKeys,Yr=kt.selectedKeys,$r=kt.onSelect,jr=kt.onDeselect,Er=kt.inlineIndent,zr=Er===void 0?24:Er,ei=kt.motion,ci=kt.defaultMotions,Fr=kt.triggerSubMenuAction,fi=Fr===void 0?"hover":Fr,Oi=kt.builtinPlacements,na=kt.itemIcon,Xi=kt.expandIcon,Fi=kt.overflowedIndicator,Ji=Fi===void 0?"...":Fi,Qi=kt.overflowedIndicatorPopupClassName,wi=kt.getPopupContainer,zi=kt.onClick,Jr=kt.onOpenChange,hi=kt.onKeyDown,Ii=kt.openAnimation,Yi=kt.openTransitionName,Ba=kt._internalRenderMenuItem,$a=kt._internalRenderSubMenuItem,Aa=(0,Te.Z)(kt,Lr),ca=me.useMemo(function(){return yi(zn,Pn,pi)},[zn,Pn]),ea=me.useState(!1),Ei=(0,ve.Z)(ea,2),Oa=Ei[0],ki=Ei[1],ti=me.useRef(),Wi=Ot(Yn),ua=mr==="rtl",Vi=(0,Ht.Z)(bn,{value:Kn,postState:function(Ia){return Ia||pi}}),aa=(0,ve.Z)(Vi,2),mi=aa[0],pa=aa[1],xa=function(Ia){var Xa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function go(){pa(Ia),Jr==null||Jr(Ia)}Xa?(0,Ce.flushSync)(go):go()},fa=me.useState(mi),wa=(0,ve.Z)(fa,2),Ea=wa[0],Za=wa[1],ha=me.useRef(!1),ka=me.useMemo(function(){return(rr==="inline"||rr==="vertical")&&ir?["vertical",ir]:[rr,!1]},[rr,ir]),Ja=(0,ve.Z)(ka,2),Ga=Ja[0],so=Ja[1],Fa=Ga==="inline",Ca=me.useState(Ga),_i=(0,ve.Z)(Ca,2),Ui=_i[0],da=_i[1],Sa=me.useState(so),Ka=(0,ve.Z)(Sa,2),io=Ka[0],ho=Ka[1];me.useEffect(function(){da(Ga),ho(so),ha.current&&(Fa?pa(Ea):xa(pi))},[Ga,so]);var Oo=me.useState(0),Ro=(0,ve.Z)(Oo,2),lo=Ro[0],Ao=Ro[1],ra=lo>=ca.length-1||Ui!=="horizontal"||Re;me.useEffect(function(){Fa&&Za(mi)},[mi]),me.useEffect(function(){return ha.current=!0,function(){ha.current=!1}},[]);var Ri=Wt(),Ta=Ri.registerPath,_a=Ri.unregisterPath,co=Ri.refreshOverflowKeys,ao=Ri.isSubPathKey,hs=Ri.getKeyPath,Qo=Ri.getKeys,ps=Ri.getSubPathKeys,oa=me.useMemo(function(){return{registerPath:Ta,unregisterPath:_a}},[Ta,_a]),Nr=me.useMemo(function(){return{isSubPathKey:ao}},[ao]);me.useEffect(function(){co(ra?pi:ca.slice(lo+1).map(function(oo){return oo.key}))},[lo,ra]);var Si=(0,Ht.Z)(Ln||on&&((tt=ca[0])===null||tt===void 0?void 0:tt.key),{value:Ln}),Ci=(0,ve.Z)(Si,2),Di=Ci[0],Ha=Ci[1],Va=He(function(oo){Ha(oo)}),Fo=He(function(){Ha(void 0)});(0,me.useImperativeHandle)(je,function(){return{list:ti.current,focus:function(Ia){var Xa,go=Di!=null?Di:(Xa=ca.find(function(xs){return!xs.props.disabled}))===null||Xa===void 0?void 0:Xa.key;if(go){var yo,Ko,wo;(yo=ti.current)===null||yo===void 0||(Ko=yo.querySelector("li[data-menu-id='".concat(ue(Wi,go),"']")))===null||Ko===void 0||(wo=Ko.focus)===null||wo===void 0||wo.call(Ko,Ia)}}}});var Uo=(0,Ht.Z)(Or||[],{value:Yr,postState:function(Ia){return Array.isArray(Ia)?Ia:Ia==null?pi:[Ia]}}),ls=(0,ve.Z)(Uo,2),va=ls[0],No=ls[1],cs=function(Ia){if(jn){var Xa=Ia.key,go=va.includes(Xa),yo;Wn?go?yo=va.filter(function(wo){return wo!==Xa}):yo=[].concat((0,Je.Z)(va),[Xa]):yo=[Xa],No(yo);var Ko=(0,Be.Z)((0,Be.Z)({},Ia),{},{selectedKeys:yo});go?jr==null||jr(Ko):$r==null||$r(Ko)}!Wn&&mi.length&&Ui!=="inline"&&xa(pi)},ul=He(function(oo){zi==null||zi(Ct(oo)),cs(oo)}),As=He(function(oo,Ia){var Xa=mi.filter(function(yo){return yo!==oo});if(Ia)Xa.push(oo);else if(Ui!=="inline"){var go=ps(oo);Xa=Xa.filter(function(yo){return!go.has(yo)})}(0,xn.Z)(mi,Xa,!0)||xa(Xa,!0)}),ms=function(Ia,Xa){var go=Xa!=null?Xa:!mi.includes(Ia);As(Ia,go)},zo=qn(Ui,Di,ua,Wi,ti,Qo,hs,Ha,ms,hi);me.useEffect(function(){ki(!0)},[]);var Ts=me.useMemo(function(){return{_internalRenderMenuItem:Ba,_internalRenderSubMenuItem:$a}},[Ba,$a]),Is=Ui!=="horizontal"||Re?ca:ca.map(function(oo,Ia){return me.createElement(Ge,{key:oo.key,overflowDisabled:Ia>lo},oo)}),qs=me.createElement(Zt,(0,fe.Z)({id:Yn,ref:ti,prefixCls:"".concat(sn,"-overflow"),component:"ul",itemComponent:fr,className:we()(sn,"".concat(sn,"-root"),"".concat(sn,"-").concat(Ui),Zn,(st={},(0,We.Z)(st,"".concat(sn,"-inline-collapsed"),io),(0,We.Z)(st,"".concat(sn,"-rtl"),ua),st),Jn),dir:mr,style:yr,role:"menu",tabIndex:vn,data:Is,renderRawItem:function(Ia){return Ia},renderRawRest:function(Ia){var Xa=Ia.length,go=Xa?ca.slice(-Xa):null;return me.createElement(Gt,{eventKey:Tt,title:Ji,disabled:ra,internalPopupClose:Xa===0,popupClassName:Qi},go)},maxCount:Ui!=="horizontal"||Re?Zt.INVALIDATE:Zt.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ia){Ao(Ia)},onKeyDown:zo},Aa));return me.createElement(Nt.Provider,{value:Ts},me.createElement(ke.Provider,{value:Wi},me.createElement(Ge,{prefixCls:sn,rootClassName:Jn,mode:Ui,openKeys:mi,rtl:ua,disabled:br,motion:Oa?ei:null,defaultMotions:Oa?ci:null,activeKey:Di,onActive:Va,onInactive:Fo,selectedKeys:va,inlineIndent:zr,subMenuOpenDelay:Lt,subMenuCloseDelay:Ut,forceSubMenuRender:un,builtinPlacements:Oi,triggerSubMenuAction:fi,getPopupContainer:wi,itemIcon:na,expandIcon:Xi,onItemClick:ul,onOpenChange:As},me.createElement(ar.Provider,{value:Nr},qs),me.createElement("div",{style:{display:"none"},"aria-hidden":!0},me.createElement(Rt.Provider,{value:oa},ca)))))}),Mi=Ti,Ie=Mi;Ie.Item=fr,Ie.SubMenu=Gt,Ie.ItemGroup=Wr,Ie.Divider=Gr;var Fe=Ie},66680:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return We}});var fe=se(67294);function We(Be){var Je=fe.useRef();Je.current=Be;var ve=fe.useCallback(function(){for(var Te,_e=arguments.length,we=new Array(_e),me=0;me<_e;me++)we[me]=arguments[me];return(Te=Je.current)===null||Te===void 0?void 0:Te.call.apply(Te,[Je].concat(we))},[]);return ve}},21770:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return Te}});var fe=se(97685),We=se(66680),Be=se(8410),Je=se(63896);function ve(_e){return _e!==void 0}function Te(_e,we){var me=we||{},De=me.defaultValue,at=me.value,Oe=me.onChange,Mt=me.postState,ht=(0,Je.Z)(function(){return ve(at)?at:ve(De)?typeof De=="function"?De():De:typeof _e=="function"?_e():_e}),lt=(0,fe.Z)(ht,2),et=lt[0],Ee=lt[1],yt=at!==void 0?at:et,Vt=Mt?Mt(yt):yt,qe=(0,We.Z)(Oe),ut=(0,Je.Z)([yt]),Ce=(0,fe.Z)(ut,2),xe=Ce[0],Ue=Ce[1];(0,Be.o)(function(){var St=xe[0];et!==St&&qe(et,St)},[xe]),(0,Be.o)(function(){ve(at)||Ee(at)},[at]);var Ze=(0,We.Z)(function(St,mt){Ee(St,mt),Ue([yt],mt)});return[Vt,Ze]}},91881:function(En,Yt,se){"use strict";var fe=se(71002),We=se(80334);function Be(Je,ve){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_e=new Set;function we(me,De){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Oe=_e.has(me);if((0,We.ZP)(!Oe,"Warning: There may be circular references"),Oe)return!1;if(me===De)return!0;if(Te&&at>1)return!1;_e.add(me);var Mt=at+1;if(Array.isArray(me)){if(!Array.isArray(De)||me.length!==De.length)return!1;for(var ht=0;ht<me.length;ht++)if(!we(me[ht],De[ht],Mt))return!1;return!0}if(me&&De&&(0,fe.Z)(me)==="object"&&(0,fe.Z)(De)==="object"){var lt=Object.keys(me);return lt.length!==Object.keys(De).length?!1:lt.every(function(et){return we(me[et],De[et],Mt)})}return!1}return we(Je,ve)}Yt.Z=Be},98423:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return We}});var fe=se(1413);function We(Be,Je){var ve=(0,fe.Z)({},Be);return Array.isArray(Je)&&Je.forEach(function(Te){delete ve[Te]}),ve}},64217:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return we}});var fe=se(1413),We=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,Be=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Je="".concat(We," ").concat(Be).split(/[\s\n]+/),ve="aria-",Te="data-";function _e(me,De){return me.indexOf(De)===0}function we(me){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,at;De===!1?at={aria:!0,data:!0,attr:!0}:De===!0?at={aria:!0}:at=(0,fe.Z)({},De);var Oe={};return Object.keys(me).forEach(function(Mt){(at.aria&&(Mt==="role"||_e(Mt,ve))||at.data&&_e(Mt,Te)||at.attr&&Je.includes(Mt))&&(Oe[Mt]=me[Mt])}),Oe}},73299:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return ri}});var fe=se(87462),We=se(1413),Be=se(71002),Je=se(97685),ve=se(4942),Te=se(45987),_e=se(67294),we=se(73935),me=se(94184),De=se.n(me),at=se(48555),Oe=_e.forwardRef(function(vt,Sn){var kn=vt.height,In=vt.offsetY,sr=vt.offsetX,qn=vt.children,hr=vt.prefixCls,$n=vt.onInnerResize,Xe=vt.innerProps,ct=vt.rtl,Tt=vt.extra,Wt={},He={display:"flex",flexDirection:"column"};if(In!==void 0){var pt;Wt={height:kn,position:"relative",overflow:"hidden"},He=(0,We.Z)((0,We.Z)({},He),{},(pt={transform:"translateY(".concat(In,"px)")},(0,ve.Z)(pt,ct?"marginRight":"marginLeft",-sr),(0,ve.Z)(pt,"position","absolute"),(0,ve.Z)(pt,"left",0),(0,ve.Z)(pt,"right",0),(0,ve.Z)(pt,"top",0),pt))}return _e.createElement("div",{style:Wt},_e.createElement(at.Z,{onResize:function(Ot){var Jt=Ot.offsetHeight;Jt&&$n&&$n()}},_e.createElement("div",(0,fe.Z)({style:He,className:De()((0,ve.Z)({},"".concat(hr,"-holder-inner"),hr)),ref:Sn},Xe),qn,Tt)))});Oe.displayName="Filler";var Mt=Oe,ht=function(Sn){return+setTimeout(Sn,16)},lt=function(Sn){return clearTimeout(Sn)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ht=function(Sn){return window.requestAnimationFrame(Sn)},lt=function(Sn){return window.cancelAnimationFrame(Sn)});var et=0,Ee=new Map;function yt(vt){Ee.delete(vt)}var Vt=function(Sn){var kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;et+=1;var In=et;function sr(qn){if(qn===0)yt(In),Sn();else{var hr=ht(function(){sr(qn-1)});Ee.set(In,hr)}}return sr(kn),In};Vt.cancel=function(vt){var Sn=Ee.get(vt);return yt(Sn),lt(Sn)};var qe=Vt;function ut(vt,Sn){var kn="touches"in vt?vt.touches[0]:vt;return kn[Sn?"pageX":"pageY"]}var Ce=_e.forwardRef(function(vt,Sn){var kn,In=vt.prefixCls,sr=vt.rtl,qn=vt.scrollOffset,hr=vt.scrollRange,$n=vt.onStartMove,Xe=vt.onStopMove,ct=vt.onScroll,Tt=vt.horizontal,Wt=vt.spinSize,He=vt.containerSize,pt=vt.style,$t=vt.thumbStyle,Ot=_e.useState(!1),Jt=(0,Je.Z)(Ot,2),tn=Jt[0],Un=Jt[1],_r=_e.useState(null),nr=(0,Je.Z)(_r,2),er=nr[0],ur=nr[1],dr=_e.useState(null),gt=(0,Je.Z)(dr,2),ot=gt[0],Ct=gt[1],ln=!sr,Nn=_e.useRef(),cn=_e.useRef(),mn=_e.useState(!1),gn=(0,Je.Z)(mn,2),Fn=gn[0],fr=gn[1],Qt=_e.useRef(),Qr=function(){clearTimeout(Qt.current),fr(!0),Qt.current=setTimeout(function(){fr(!1)},3e3)},Ur=hr-He||0,Bi=He-Wt||0,Ai=Ur>0,gi=_e.useMemo(function(){if(qn===0||Ur===0)return 0;var la=qn/Ur;return la*Bi},[qn,Ur,Bi]),qi=function(ta){ta.stopPropagation(),ta.preventDefault()},xi=_e.useRef({top:gi,dragging:tn,pageY:er,startTop:ot});xi.current={top:gi,dragging:tn,pageY:er,startTop:ot};var li=function(ta){Un(!0),ur(ut(ta,Tt)),Ct(xi.current.top),$n(),ta.stopPropagation(),ta.preventDefault()};_e.useEffect(function(){var la=function(wt){wt.preventDefault()},ta=Nn.current,ii=cn.current;return ta.addEventListener("touchstart",la),ii.addEventListener("touchstart",li),function(){ta.removeEventListener("touchstart",la),ii.removeEventListener("touchstart",li)}},[]);var $i=_e.useRef();$i.current=Ur;var Gi=_e.useRef();Gi.current=Bi,_e.useEffect(function(){if(tn){var la,ta=function(wt){var Gt=xi.current,fn=Gt.dragging,On=Gt.pageY,gr=Gt.startTop;if(qe.cancel(la),fn){var Tr=ut(wt,Tt)-On,Wr=gr;!ln&&Tt?Wr-=Tr:Wr+=Tr;var Gr=$i.current,Hr=Gi.current,ni=Hr?Wr/Hr:0,yi=Math.ceil(ni*Gr);yi=Math.max(yi,0),yi=Math.min(yi,Gr),la=qe(function(){ct(yi,Tt)})}},ii=function(){Un(!1),Xe()};return window.addEventListener("mousemove",ta),window.addEventListener("touchmove",ta),window.addEventListener("mouseup",ii),window.addEventListener("touchend",ii),function(){window.removeEventListener("mousemove",ta),window.removeEventListener("touchmove",ta),window.removeEventListener("mouseup",ii),window.removeEventListener("touchend",ii),qe.cancel(la)}}},[tn]),_e.useEffect(function(){Qr()},[qn]),_e.useImperativeHandle(Sn,function(){return{delayHidden:Qr}});var qr="".concat(In,"-scrollbar"),vi={position:"absolute",visibility:Fn&&Ai?null:"hidden"},Zi={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Tt?(vi.height=8,vi.left=0,vi.right=0,vi.bottom=0,Zi.height="100%",Zi.width=Wt,ln?Zi.left=gi:Zi.right=gi):(vi.width=8,vi.top=0,vi.bottom=0,ln?vi.right=0:vi.left=0,Zi.width="100%",Zi.height=Wt,Zi.top=gi),_e.createElement("div",{ref:Nn,className:De()(qr,(kn={},(0,ve.Z)(kn,"".concat(qr,"-horizontal"),Tt),(0,ve.Z)(kn,"".concat(qr,"-vertical"),!Tt),(0,ve.Z)(kn,"".concat(qr,"-visible"),Fn),kn)),style:(0,We.Z)((0,We.Z)({},vi),pt),onMouseDown:qi,onMouseMove:Qr},_e.createElement("div",{ref:cn,className:De()("".concat(qr,"-thumb"),(0,ve.Z)({},"".concat(qr,"-thumb-moving"),tn)),style:(0,We.Z)((0,We.Z)({},Zi),$t),onMouseDown:li}))}),xe=Ce;function Ue(vt){var Sn=vt.children,kn=vt.setRef,In=_e.useCallback(function(sr){kn(sr)},[]);return _e.cloneElement(Sn,{ref:In})}function Ze(vt,Sn,kn,In,sr,qn,hr){var $n=hr.getKey;return vt.slice(Sn,kn+1).map(function(Xe,ct){var Tt=Sn+ct,Wt=qn(Xe,Tt,{style:{width:In}}),He=$n(Xe);return _e.createElement(Ue,{key:He,setRef:function($t){return sr(Xe,$t)}},Wt)})}function St(vt){return vt instanceof HTMLElement||vt instanceof SVGElement}function mt(vt){return St(vt)?vt:vt instanceof _e.Component?we.findDOMNode(vt):null}var Pt=se(15671),Qe=se(43144),Ft=function(){function vt(){(0,Pt.Z)(this,vt),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,Qe.Z)(vt,[{key:"set",value:function(kn,In){this.maps[kn]=In,this.id+=1}},{key:"get",value:function(kn){return this.maps[kn]}}]),vt}(),Dt=Ft;function an(vt,Sn,kn){var In=_e.useState(0),sr=(0,Je.Z)(In,2),qn=sr[0],hr=sr[1],$n=(0,_e.useRef)(new Map),Xe=(0,_e.useRef)(new Dt),ct=(0,_e.useRef)();function Tt(){qe.cancel(ct.current)}function Wt(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Tt();var $t=function(){$n.current.forEach(function(Jt,tn){if(Jt&&Jt.offsetParent){var Un=mt(Jt),_r=Un.offsetHeight;Xe.current.get(tn)!==_r&&Xe.current.set(tn,Un.offsetHeight)}}),hr(function(Jt){return Jt+1})};pt?$t():ct.current=qe($t)}function He(pt,$t){var Ot=vt(pt),Jt=$n.current.get(Ot);$t?($n.current.set(Ot,$t),Wt()):$n.current.delete(Ot),!Jt!=!$t&&($t?Sn==null||Sn(pt):kn==null||kn(pt))}return(0,_e.useEffect)(function(){return Tt},[]),[He,Wt,Xe.current,qn]}function it(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var en=it()?_e.useLayoutEffect:_e.useEffect,_n=function(Sn,kn){var In=_e.useRef(!0);en(function(){return Sn(In.current)},kn),en(function(){return In.current=!1,function(){In.current=!0}},[])},yn=function(Sn,kn){_n(function(In){if(!In)return Sn()},kn)},Ve=_n;function Le(vt){var Sn=_e.useRef();Sn.current=vt;var kn=_e.useCallback(function(){for(var In,sr=arguments.length,qn=new Array(sr),hr=0;hr<sr;hr++)qn[hr]=arguments[hr];return(In=Sn.current)===null||In===void 0?void 0:In.call.apply(In,[Sn].concat(qn))},[]);return kn}function Bt(vt){var Sn=React.useRef(!1),kn=React.useState(vt),In=_slicedToArray(kn,2),sr=In[0],qn=In[1];React.useEffect(function(){return Sn.current=!1,function(){Sn.current=!0}},[]);function hr($n,Xe){Xe&&Sn.current||qn($n)}return[sr,hr]}function Dn(vt){return vt!==void 0}function dn(vt,Sn){var kn=Sn||{},In=kn.defaultValue,sr=kn.value,qn=kn.onChange,hr=kn.postState,$n=useState(function(){return Dn(sr)?sr:Dn(In)?typeof In=="function"?In():In:typeof vt=="function"?vt():vt}),Xe=_slicedToArray($n,2),ct=Xe[0],Tt=Xe[1],Wt=sr!==void 0?sr:ct,He=hr?hr(Wt):Wt,pt=useEvent(qn),$t=useState([Wt]),Ot=_slicedToArray($t,2),Jt=Ot[0],tn=Ot[1];useLayoutUpdateEffect(function(){var _r=Jt[0];ct!==_r&&pt(ct,_r)},[Jt]),useLayoutUpdateEffect(function(){Dn(sr)||Tt(sr)},[sr]);var Un=useEvent(function(_r,nr){Tt(_r,nr),tn([Wt],nr)});return[He,Un]}var nt=se(31461);function ft(vt,Sn,kn){var In=React.useRef({});return(!("value"in In.current)||kn(In.current.condition,Sn))&&(In.current.value=vt(),In.current.condition=Sn),In.current.value}function Xt(vt,Sn){typeof vt=="function"?vt(Sn):_typeof(vt)==="object"&&vt&&"current"in vt&&(vt.current=Sn)}function Rn(){for(var vt=arguments.length,Sn=new Array(vt),kn=0;kn<vt;kn++)Sn[kn]=arguments[kn];var In=Sn.filter(function(sr){return sr});return In.length<=1?In[0]:function(sr){Sn.forEach(function(qn){Xt(qn,sr)})}}function wn(){for(var vt=arguments.length,Sn=new Array(vt),kn=0;kn<vt;kn++)Sn[kn]=arguments[kn];return useMemo(function(){return Rn.apply(void 0,Sn)},Sn,function(In,sr){return In.length!==sr.length||In.every(function(qn,hr){return qn!==sr[hr]})})}function Zt(vt){var Sn,kn,In=isMemo(vt)?vt.type.type:vt.type;return!(typeof In=="function"&&!((Sn=In.prototype)!==null&&Sn!==void 0&&Sn.render)||typeof vt=="function"&&!((kn=vt.prototype)!==null&&kn!==void 0&&kn.render))}function Ht(vt){return!isValidElement(vt)||isFragment(vt)?!1:Zt(vt)}function Tn(vt,Sn,kn,In){if(!Sn.length)return kn;var sr=_toArray(Sn),qn=sr[0],hr=sr.slice(1),$n;return!vt&&typeof qn=="number"?$n=[]:Array.isArray(vt)?$n=_toConsumableArray(vt):$n=_objectSpread({},vt),In&&kn===void 0&&hr.length===1?delete $n[qn][hr[0]]:$n[qn]=Tn($n[qn],hr,kn,In),$n}function xn(vt,Sn,kn){var In=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Sn.length&&In&&kn===void 0&&!get(vt,Sn.slice(0,-1))?vt:Tn(vt,Sn,kn,In)}function ke(vt){return _typeof(vt)==="object"&&vt!==null&&Object.getPrototypeOf(vt)===Object.prototype}function ue(vt){return Array.isArray(vt)?[]:{}}var le=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function pe(){for(var vt=arguments.length,Sn=new Array(vt),kn=0;kn<vt;kn++)Sn[kn]=arguments[kn];var In=ue(Sn[0]);return Sn.forEach(function(sr){function qn(hr,$n){var Xe=new Set($n),ct=get(sr,hr),Tt=Array.isArray(ct);if(Tt||ke(ct)){if(!Xe.has(ct)){Xe.add(ct);var Wt=get(In,hr);Tt?In=xn(In,hr,[]):(!Wt||_typeof(Wt)!=="object")&&(In=xn(In,hr,ue(ct))),le(ct).forEach(function(He){qn([].concat(_toConsumableArray(hr),[He]),Xe)})}}else In=xn(In,hr,ct)}qn([])}),In}var he={},oe=[],Ae=function(Sn){oe.push(Sn)};function Ge(vt,Sn){if(0)var kn}function _t(vt,Sn){if(0)var kn}function Rt(){he={}}function zt(vt,Sn,kn){!Sn&&!he[kn]&&(vt(!1,kn),he[kn]=!0)}function qt(vt,Sn){zt(Ge,vt,Sn)}function jt(vt,Sn){zt(_t,vt,Sn)}qt.preMessage=Ae,qt.resetWarned=Rt,qt.noteOnce=jt;var ar=null,xr=10;function Nt(vt,Sn,kn,In,sr,qn,hr,$n){var Xe=_e.useRef(),ct=_e.useState(null),Tt=(0,Je.Z)(ct,2),Wt=Tt[0],He=Tt[1];return Ve(function(){if(Wt&&Wt.times<xr){if(!vt.current){He(function(Qr){return(0,We.Z)({},Qr)});return}qn();var pt=Wt.targetAlign,$t=Wt.originAlign,Ot=Wt.index,Jt=Wt.offset,tn=vt.current.clientHeight,Un=!1,_r=pt,nr=null;if(tn){for(var er=pt||$t,ur=0,dr=0,gt=0,ot=Math.min(Sn.length-1,Ot),Ct=0;Ct<=ot;Ct+=1){var ln=sr(Sn[Ct]);dr=ur;var Nn=kn.get(ln);gt=dr+(Nn===void 0?In:Nn),ur=gt}for(var cn=er==="top"?Jt:tn-Jt,mn=ot;mn>=0;mn-=1){var gn=sr(Sn[mn]),Fn=kn.get(gn);if(Fn===void 0){Un=!0;break}if(cn-=Fn,cn<=0)break}switch(er){case"top":nr=dr-Jt;break;case"bottom":nr=gt-tn+Jt;break;default:{var fr=vt.current.scrollTop,Qt=fr+tn;dr<fr?_r="top":gt>Qt&&(_r="bottom")}}nr!==null&&hr(nr),nr!==Wt.lastTop&&(Un=!0)}Un&&He(function(Qr){return(0,We.Z)((0,We.Z)({},Qr),{},{times:Qr.times+1,targetAlign:_r,lastTop:nr})})}},[Wt,vt.current]),function(pt){if(pt==null){$n();return}if(qe.cancel(Xe.current),typeof pt=="number")hr(pt);else if(pt&&(0,Be.Z)(pt)==="object"){var $t,Ot=pt.align;"index"in pt?$t=pt.index:$t=Sn.findIndex(function(Un){return sr(Un)===pt.key});var Jt=pt.offset,tn=Jt===void 0?0:Jt;He({times:0,index:$t,offset:tn,originAlign:Ot})}}}function pn(vt,Sn,kn,In){var sr=kn-vt,qn=Sn-kn,hr=Math.min(sr,qn)*2;if(In<=hr){var $n=Math.floor(In/2);return In%2?kn+$n+1:kn-$n}return sr>qn?kn-(In-qn):kn+(In-sr)}function cr(vt,Sn,kn){var In=vt.length,sr=Sn.length,qn,hr;if(In===0&&sr===0)return null;In<sr?(qn=vt,hr=Sn):(qn=Sn,hr=vt);var $n={__EMPTY_ITEM__:!0};function Xe($t){return $t!==void 0?kn($t):$n}for(var ct=null,Tt=Math.abs(In-sr)!==1,Wt=0;Wt<hr.length;Wt+=1){var He=Xe(qn[Wt]),pt=Xe(hr[Wt]);if(He!==pt){ct=Wt,Tt=Tt||He!==Xe(hr[Wt+1]);break}}return ct===null?null:{index:ct,multiple:Tt}}function Rr(vt,Sn,kn){var In=_e.useState(vt),sr=(0,Je.Z)(In,2),qn=sr[0],hr=sr[1],$n=_e.useState(null),Xe=(0,Je.Z)($n,2),ct=Xe[0],Tt=Xe[1];return _e.useEffect(function(){var Wt=cr(qn||[],vt||[],Sn);(Wt==null?void 0:Wt.index)!==void 0&&(kn==null||kn(Wt.index),Tt(vt[Wt.index])),hr(vt)},[vt]),[ct]}var rt=(typeof navigator=="undefined"?"undefined":(0,Be.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Kt=rt,Bn=function(vt,Sn){var kn=(0,_e.useRef)(!1),In=(0,_e.useRef)(null);function sr(){clearTimeout(In.current),kn.current=!0,In.current=setTimeout(function(){kn.current=!1},50)}var qn=(0,_e.useRef)({top:vt,bottom:Sn});return qn.current.top=vt,qn.current.bottom=Sn,function(hr){var $n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xe=hr<0&&qn.current.top||hr>0&&qn.current.bottom;return $n&&Xe?(clearTimeout(In.current),kn.current=!1):(!Xe||kn.current)&&sr(),!kn.current&&Xe}};function Gn(vt,Sn,kn,In,sr){var qn=(0,_e.useRef)(0),hr=(0,_e.useRef)(null),$n=(0,_e.useRef)(null),Xe=(0,_e.useRef)(!1),ct=Bn(Sn,kn);function Tt(Jt,tn){qe.cancel(hr.current),qn.current+=tn,$n.current=tn,!ct(tn)&&(Kt||Jt.preventDefault(),hr.current=qe(function(){var Un=Xe.current?10:1;sr(qn.current*Un),qn.current=0}))}function Wt(Jt,tn){sr(tn,!0),Kt||Jt.preventDefault()}var He=(0,_e.useRef)(null),pt=(0,_e.useRef)(null);function $t(Jt){if(vt){qe.cancel(pt.current),pt.current=qe(function(){He.current=null},2);var tn=Jt.deltaX,Un=Jt.deltaY,_r=Jt.shiftKey,nr=tn,er=Un;(He.current==="sx"||!He.current&&_r&&Un&&!tn)&&(nr=Un,er=0,He.current="sx");var ur=Math.abs(nr),dr=Math.abs(er);He.current===null&&(He.current=In&&ur>dr?"x":"y"),He.current==="y"?Tt(Jt,er):Wt(Jt,nr)}}function Ot(Jt){vt&&(Xe.current=Jt.detail===$n.current)}return[$t,Ot]}var tr=14/15;function Sr(vt,Sn,kn){var In=(0,_e.useRef)(!1),sr=(0,_e.useRef)(0),qn=(0,_e.useRef)(null),hr=(0,_e.useRef)(null),$n,Xe=function(He){if(In.current){var pt=Math.ceil(He.touches[0].pageY),$t=sr.current-pt;sr.current=pt,kn($t)&&He.preventDefault(),clearInterval(hr.current),hr.current=setInterval(function(){$t*=tr,(!kn($t,!0)||Math.abs($t)<=.1)&&clearInterval(hr.current)},16)}},ct=function(){In.current=!1,$n()},Tt=function(He){$n(),He.touches.length===1&&!In.current&&(In.current=!0,sr.current=Math.ceil(He.touches[0].pageY),qn.current=He.target,qn.current.addEventListener("touchmove",Xe),qn.current.addEventListener("touchend",ct))};$n=function(){qn.current&&(qn.current.removeEventListener("touchmove",Xe),qn.current.removeEventListener("touchend",ct))},Ve(function(){return vt&&Sn.current.addEventListener("touchstart",Tt),function(){var Wt;(Wt=Sn.current)===null||Wt===void 0||Wt.removeEventListener("touchstart",Tt),$n(),clearInterval(hr.current)}},[vt])}var Ar=20;function Mr(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,kn=vt/Sn*100;return isNaN(kn)&&(kn=0),kn=Math.max(kn,Ar),kn=Math.min(kn,vt/2),Math.floor(kn)}function Pr(vt,Sn,kn,In){var sr=_e.useMemo(function(){return[new Map,[]]},[vt,kn.id,In]),qn=(0,Je.Z)(sr,2),hr=qn[0],$n=qn[1],Xe=function(Tt){var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Tt,He=hr.get(Tt),pt=hr.get(Wt);if(He===void 0||pt===void 0)for(var $t=vt.length,Ot=$n.length;Ot<$t;Ot+=1){var Jt,tn=vt[Ot],Un=Sn(tn);hr.set(Un,Ot);var _r=(Jt=kn.get(Un))!==null&&Jt!==void 0?Jt:In;if($n[Ot]=($n[Ot-1]||0)+_r,Un===Tt&&(He=Ot),Un===Wt&&(pt=Ot),He!==void 0&&pt!==void 0)break}return{top:$n[He-1]||0,bottom:$n[pt]}};return Xe}var Vr=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],lr=[],si={overflowY:"auto",overflowAnchor:"none"};function Li(vt,Sn){var kn=vt.prefixCls,In=kn===void 0?"rc-virtual-list":kn,sr=vt.className,qn=vt.height,hr=vt.itemHeight,$n=vt.fullHeight,Xe=$n===void 0?!0:$n,ct=vt.style,Tt=vt.data,Wt=vt.children,He=vt.itemKey,pt=vt.virtual,$t=vt.direction,Ot=vt.scrollWidth,Jt=vt.component,tn=Jt===void 0?"div":Jt,Un=vt.onScroll,_r=vt.onVirtualScroll,nr=vt.onVisibleChange,er=vt.innerProps,ur=vt.extraRender,dr=vt.styles,gt=(0,Te.Z)(vt,Vr),ot=!!(pt!==!1&&qn&&hr),Ct=ot&&Tt&&(hr*Tt.length>qn||!!Ot),ln=$t==="rtl",Nn=De()(In,(0,ve.Z)({},"".concat(In,"-rtl"),ln),sr),cn=Tt||lr,mn=(0,_e.useRef)(),gn=(0,_e.useRef)(),Fn=(0,_e.useState)(0),fr=(0,Je.Z)(Fn,2),Qt=fr[0],Qr=fr[1],Ur=(0,_e.useState)(0),Bi=(0,Je.Z)(Ur,2),Ai=Bi[0],gi=Bi[1],qi=(0,_e.useState)(!1),xi=(0,Je.Z)(qi,2),li=xi[0],$i=xi[1],Gi=function(){$i(!0)},qr=function(){$i(!1)},vi=_e.useCallback(function(on){return typeof He=="function"?He(on):on==null?void 0:on[He]},[He]),Zi={getKey:vi};function la(on){Qr(function(Hn){var jn;typeof on=="function"?jn=on(Hn):jn=on;var wr=Jn(jn);return mn.current.scrollTop=wr,wr})}var ta=(0,_e.useRef)({start:0,end:cn.length}),ii=(0,_e.useRef)(),Et=Rr(cn,vi),wt=(0,Je.Z)(Et,1),Gt=wt[0];ii.current=Gt;var fn=an(vi,null,null),On=(0,Je.Z)(fn,4),gr=On[0],Tr=On[1],Wr=On[2],Gr=On[3],Hr=_e.useMemo(function(){if(!ot)return{scrollHeight:void 0,start:0,end:cn.length-1,offset:void 0};if(!Ct){var on;return{scrollHeight:((on=gn.current)===null||on===void 0?void 0:on.offsetHeight)||0,start:0,end:cn.length-1,offset:void 0}}for(var Hn=0,jn,wr,Wn,Or=cn.length,Yr=0;Yr<Or;Yr+=1){var $r=cn[Yr],jr=vi($r),Er=Wr.get(jr),zr=Hn+(Er===void 0?hr:Er);zr>=Qt&&jn===void 0&&(jn=Yr,wr=Hn),zr>Qt+qn&&Wn===void 0&&(Wn=Yr),Hn=zr}return jn===void 0&&(jn=0,wr=0,Wn=Math.ceil(qn/hr)),Wn===void 0&&(Wn=cn.length-1),Wn=Math.min(Wn+1,cn.length-1),{scrollHeight:Hn,start:jn,end:Wn,offset:wr}},[Ct,ot,Qt,cn,Gr,qn]),ni=Hr.scrollHeight,yi=Hr.start,Lr=Hr.end,pi=Hr.offset;ta.current.start=yi,ta.current.end=Lr;var Ti=_e.useState({width:0,height:qn}),Mi=(0,Je.Z)(Ti,2),Ie=Mi[0],Fe=Mi[1],ze=function(Hn){Fe({width:Hn.width||Hn.offsetWidth,height:Hn.height||Hn.offsetHeight})},je=(0,_e.useRef)(),tt=(0,_e.useRef)(),st=_e.useMemo(function(){return Mr(Ie.width,Ot)},[Ie.width,Ot]),kt=_e.useMemo(function(){return Mr(Ie.height,ni)},[Ie.height,ni]),nn=ni-qn,sn=(0,_e.useRef)(nn);sn.current=nn;function Jn(on){var Hn=on;return Number.isNaN(sn.current)||(Hn=Math.min(Hn,sn.current)),Hn=Math.max(Hn,0),Hn}var yr=Qt<=0,Zn=Qt>=nn,Cn=Bn(yr,Zn),vn=function(){return{x:ln?-Ai:Ai,y:Qt}},Pn=(0,_e.useRef)(vn()),zn=Le(function(){if(_r){var on=vn();(Pn.current.x!==on.x||Pn.current.y!==on.y)&&(_r(on),Pn.current=on)}});function mr(on,Hn){var jn=on;Hn?((0,we.flushSync)(function(){gi(jn)}),zn()):la(jn)}function Yn(on){var Hn=on.currentTarget.scrollTop;Hn!==Qt&&la(Hn),Un==null||Un(on),zn()}var Xn=function(Hn){var jn=Hn,wr=Ot-Ie.width;return jn=Math.max(jn,0),jn=Math.min(jn,wr),jn},rr=Le(function(on,Hn){Hn?((0,we.flushSync)(function(){gi(function(jn){var wr=jn+(ln?-on:on);return Xn(wr)})}),zn()):la(function(jn){var wr=jn+on;return wr})}),ir=Gn(ot,yr,Zn,!!Ot,rr),br=(0,Je.Z)(ir,2),Re=br[0],Ke=br[1];Sr(ot,mn,function(on,Hn){return Cn(on,Hn)?!1:(Re({preventDefault:function(){},deltaY:on}),!0)}),Ve(function(){function on(jn){ot&&jn.preventDefault()}var Hn=mn.current;return Hn.addEventListener("wheel",Re),Hn.addEventListener("DOMMouseScroll",Ke),Hn.addEventListener("MozMousePixelScroll",on),function(){Hn.removeEventListener("wheel",Re),Hn.removeEventListener("DOMMouseScroll",Ke),Hn.removeEventListener("MozMousePixelScroll",on)}},[ot]),Ve(function(){Ot&&gi(function(on){return Xn(on)})},[Ie.width,Ot]);var Lt=function(){var Hn,jn;(Hn=je.current)===null||Hn===void 0||Hn.delayHidden(),(jn=tt.current)===null||jn===void 0||jn.delayHidden()},dt=Nt(mn,cn,Wr,hr,vi,function(){return Tr(!0)},la,Lt);_e.useImperativeHandle(Sn,function(){return{getScrollInfo:vn,scrollTo:function(Hn){function jn(wr){return wr&&(0,Be.Z)(wr)==="object"&&("left"in wr||"top"in wr)}jn(Hn)?(Hn.left!==void 0&&gi(Xn(Hn.left)),dt(Hn.top)):dt(Hn)}}}),Ve(function(){if(nr){var on=cn.slice(yi,Lr+1);nr(on,cn)}},[yi,Lr,cn]);var Ut=Pr(cn,vi,Wr,hr),un=ur==null?void 0:ur({start:yi,end:Lr,virtual:Ct,offsetX:Ai,offsetY:pi,rtl:ln,getSize:Ut}),bn=Ze(cn,yi,Lr,Ot,gr,Wt,Zi),Kn=null;qn&&(Kn=(0,We.Z)((0,ve.Z)({},Xe?"height":"maxHeight",qn),si),ot&&(Kn.overflowY="hidden",Ot&&(Kn.overflowX="hidden"),li&&(Kn.pointerEvents="none")));var Ln={};return ln&&(Ln.dir="rtl"),_e.createElement("div",(0,fe.Z)({style:(0,We.Z)((0,We.Z)({},ct),{},{position:"relative"}),className:Nn},Ln,gt),_e.createElement(at.Z,{onResize:ze},_e.createElement(tn,{className:"".concat(In,"-holder"),style:Kn,ref:mn,onScroll:Yn,onMouseEnter:Lt},_e.createElement(Mt,{prefixCls:In,height:ni,offsetX:Ai,offsetY:pi,scrollWidth:Ot,onInnerResize:Tr,ref:gn,innerProps:er,rtl:ln,extra:un},bn))),Ct&&ni>qn&&_e.createElement(xe,{ref:je,prefixCls:In,scrollOffset:Qt,scrollRange:ni,rtl:ln,onScroll:mr,onStartMove:Gi,onStopMove:qr,spinSize:kt,containerSize:Ie.height,style:dr==null?void 0:dr.verticalScrollBar,thumbStyle:dr==null?void 0:dr.verticalScrollBarThumb}),Ct&&Ot&&_e.createElement(xe,{ref:tt,prefixCls:In,scrollOffset:Ai,scrollRange:Ot,rtl:ln,onScroll:mr,onStartMove:Gi,onStopMove:qr,spinSize:st,containerSize:Ie.width,horizontal:!0,style:dr==null?void 0:dr.horizontalScrollBar,thumbStyle:dr==null?void 0:dr.horizontalScrollBarThumb}))}var Ni=_e.forwardRef(Li);Ni.displayName="List";var Hi=Ni,ri=Hi},66392:function(En,Yt){"use strict";var se;var fe=Symbol.for("react.element"),We=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Je=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Te=Symbol.for("react.provider"),_e=Symbol.for("react.context"),we=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),De=Symbol.for("react.suspense"),at=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),Mt=Symbol.for("react.lazy"),ht=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function et(Ee){if(typeof Ee=="object"&&Ee!==null){var yt=Ee.$$typeof;switch(yt){case fe:switch(Ee=Ee.type,Ee){case Be:case ve:case Je:case De:case at:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case we:case _e:case me:case Mt:case Oe:case Te:return Ee;default:return yt}}case We:return yt}}}se=_e,se=Te,se=fe,se=me,se=Be,se=Mt,se=Oe,se=We,se=ve,se=Je,se=De,se=at,se=function(){return!1},se=function(){return!1},se=function(Ee){return et(Ee)===_e},se=function(Ee){return et(Ee)===Te},se=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===fe},se=function(Ee){return et(Ee)===me},se=function(Ee){return et(Ee)===Be},se=function(Ee){return et(Ee)===Mt},se=function(Ee){return et(Ee)===Oe},se=function(Ee){return et(Ee)===We},se=function(Ee){return et(Ee)===ve},se=function(Ee){return et(Ee)===Je},se=function(Ee){return et(Ee)===De},se=function(Ee){return et(Ee)===at},se=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Be||Ee===ve||Ee===Je||Ee===De||Ee===at||Ee===ht||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===Mt||Ee.$$typeof===Oe||Ee.$$typeof===Te||Ee.$$typeof===_e||Ee.$$typeof===me||Ee.$$typeof===lt||Ee.getModuleId!==void 0)},se=et},31461:function(En,Yt,se){"use strict";se(66392)},84279:function(En,Yt,se){"use strict";var fe=Object.defineProperty,We=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,_e=(a,y,b)=>y in a?fe(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,we=(a,y)=>{for(var b in y||(y={}))ve.call(y,b)&&_e(a,b,y[b]);if(Je)for(var b of Je(y))Te.call(y,b)&&_e(a,b,y[b]);return a},me=(a,y)=>We(a,Be(y)),De=a=>typeof a=="symbol"?a:a+"",at=(a,y)=>{var b={};for(var E in a)ve.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&Je)for(var E of Je(a))y.indexOf(E)<0&&Te.call(a,E)&&(b[E]=a[E]);return b};function Oe(a){return Array.isArray(a)}var Mt={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 ht(){return"window"in globalThis&&"document"in globalThis}function lt(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function et(){return typeof navigator.vibrate=="function"}function Ee(){var a,y;if(!ht())return"other";const b=(y=(a=navigator.userAgentData)==null?void 0:a.platform)!=null?y:navigator.platform;return/^mac/i.test(b)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(b)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function yt(){if(!ht())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 Vt(){return HTMLElement.prototype.hasOwnProperty("popover")}var qe={strings:Mt,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return qe._locale||(qe._locale=ht()?navigator.language.slice(0,5):"en-US"),qe._locale},set locale(a){qe._locale=a,qe._numberFormatter=void 0,qe.dirty=!0},get numberFormatter(){return qe._numberFormatter||(qe._numberFormatter=new Intl.NumberFormat(qe.locale)),qe._numberFormatter},merge(a,y){if(typeof a=="string"&&y)qe.strings[a]=we(we({},qe.strings[a]),y),qe.dirty=!0;else for(const b of Object.keys(a))qe.merge(b,a[b])},get dirty(){return qe._dirty},set dirty(a){qe._dirty||qe._dirty===a||(qe._dirty=!0,setTimeout(()=>{qe._dirty=!1,this._subscribers.forEach(y=>y==null?void 0:y())},0))},subscribe(a){return qe._subscribers.push(a),qe._subscribers.length-1},unsubscribe(a){a<0||a>=qe._subscribers.length||(qe._subscribers[a]=void 0)},update(a){let y=a.querySelectorAll("[data-l10n-tooltip]");for(const b of y){const E=b.getAttribute("data-l10n-tooltip");if(E){const ee=ut(E);ee&&b.setAttribute("data-tooltip",ee)}}y=a.querySelectorAll("[data-l10n-arial-label]");for(const b of y){const E=b.getAttribute("data-l10n-arial-label");if(E){const ee=ut(E);ee&&b.setAttribute("aria-label",ee)}}}};function ut(a,...y){if(a===void 0)return;let b="";const E=qe.locale;qe.strings[E]&&(b=qe.strings[E][a]);const ee=E.slice(0,2);if(!b&&qe.strings[ee]&&(b=qe.strings[ee][a]),b||(b=qe.strings.en[a]),!b)return;const re=/(%@|%([0-9]+)\$@)/g;let ae=re.exec(b),de=0;for(;ae;){if(y[de++]){const be=ae[2]?parseInt(ae[2],10)-1:de-1;let Se=y[be];typeof Se=="number"&&(Se=qe.numberFormatter.format(Se)),b=b.replace(ae[1],Se)}ae=re.exec(b)}return b=b.replace(/%%/g,"%"),b}var Ce={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},xe={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Ue={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"},St={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"},mt={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 Pt(a){var y,b,E,ee,re,ae;const de=a.split("!");let ge,be,Se,$e=255,Ye=255,xt=255,At=-1;const An=de.length>0&&de[0].startsWith("-");An&&(de[0]=de[0].slice(1));for(let kr=0;kr<de.length;kr++){ge=$e,be=Ye,Se=xt;const Mn=(y=de[kr].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],or=Mn==null?void 0:Mn.toLowerCase(),Dr=Mn&&(ae=(re=(ee=(E=(b=Ze[or])!=null?b:Ze[St[Mn]])!=null?E:xe[Mn])!=null?ee:mt[Mn])!=null?re:Ce[Mn])!=null?ae:de[kr].trim();let pr=Dr.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(pr!=null&&pr[1]&&pr[2]&&pr[3])$e=Math.max(0,Math.min(255,Number.parseInt(pr[1],16))),Ye=Math.max(0,Math.min(255,Number.parseInt(pr[2],16))),xt=Math.max(0,Math.min(255,Number.parseInt(pr[3],16)));else if(pr=Dr.match(/^#([\da-f]{3})$/i),pr!=null&&pr[1]){const di=Number.parseInt(pr[1][0],16),Pi=Number.parseInt(pr[1][1],16),bi=Number.parseInt(pr[1][2],16);$e=Math.max(0,Math.min(255,di*16+di)),Ye=Math.max(0,Math.min(255,Pi*16+Pi)),xt=Math.max(0,Math.min(255,bi*16+bi))}else if(pr=Dr.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),pr!=null&&pr[1]&&pr[2]&&pr[3])$e=Math.max(0,Math.min(255,Number.parseInt(pr[1]))),Ye=Math.max(0,Math.min(255,Number.parseInt(pr[2]))),xt=Math.max(0,Math.min(255,Number.parseInt(pr[3])));else return;At>=0&&($e=(1-At)*$e+At*ge,Ye=(1-At)*Ye+At*be,xt=(1-At)*xt+At*Se,At=-1),kr+1<de.length&&(At=Math.max(0,Math.min(100,Number.parseInt(de[++kr])))/100)}return At>=0&&($e=At*$e+(1-At)*ge,Ye=At*Ye+(1-At)*be,xt=At*xt+(1-At)*Se),An&&($e=255-$e,Ye=255-Ye,xt=255-xt),"#"+("00"+Math.round($e).toString(16)).slice(-2)+("00"+Math.round(Ye).toString(16)).slice(-2)+("00"+Math.round(xt).toString(16)).slice(-2)}function Qe(a){var y,b;return a=a.trim(),(b=(y=Ue[a.toLowerCase()])!=null?y:Ue[St[a]])!=null?b:Pt(a)}function Ft(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&y.a===void 0&&(y.a=1),y}function Dt(a,y,b){return b<0&&(b+=6),b>=6&&(b-=6),b<1?(y-a)*b+a:b<3?y:b<4?(y-a)*(4-b)+a:a}function an(a){let[y,b,E]=[a.h,a.s,a.l];y=(y+360)%360/60,E=Math.max(0,Math.min(E,1)),b=Math.max(0,Math.min(b,1));const ee=E<=.5?E*(b+1):E+b-E*b,re=E*2-ee;return{r:Math.round(255*Dt(re,ee,y+2)),g:Math.round(255*Dt(re,ee,y)),b:Math.round(255*Dt(re,ee,y-2))}}function it(a){return a<0?0:a>255?255:Math.round(a)}function en(a){const{r:y,g:b,b:E}=a;let ee=((1<<24)+(it(y)<<16)+(it(b)<<8)+it(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 _n(a){let{r:y,g:b,b:E}=a;y=y/255,b=b/255,E=E/255;const ee=Math.min(y,b,E),re=Math.max(y,b,E),ae=re-ee;let de,ge;re===ee?de=0:y===re?de=(b-E)/ae:b===re?de=2+(E-y)/ae:E===re&&(de=4+(y-b)/ae),de=Math.min(de*60,360),de<0&&(de+=360);const be=(ee+re)/2;return re===ee?ge=0:be<=.5?ge=ae/(re+ee):ge=ae/(2-re-ee),{h:de,s:ge,l:be}}function yn(a){let y=Ft(a);if(!y)return a;let{h:b,s:E,l:ee}=_n(y);return E+=.1,ee-=.1,en(an({h:b,s:E,l:ee}))}var Ve={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"},Le={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},Bt=[{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 Dn(a,y,b){if(!/[A-Za-z\d]/.test(a)||(b==="up"&&(b=void 0),!y&&!b))return a;const E=a.codePointAt(0);if(E===void 0)return a;for(const ee of Bt)if((!y||ee.variant===y)&&(!b||ee.style===b)&&E>=ee.offset&&E<ee.offset+ee.len){const re=ee.start+E-ee.offset;return String.fromCodePoint(Le[re]||re)}return a}function dn(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in Le)if(Le[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of Bt)if(a>=b.start&&a<b.start+b.len)return{char:String.fromCodePoint(a-b.start+b.offset),variant:b.variant,style:b.style};return{char:String.fromCodePoint(a)}}function nt(a){var y;let b="";for(const E of a){if("{}<>[]$&#^_%:'\u02DC".includes(E)){b+=E;continue}const ee=(y=E.codePointAt(0))!=null?y:0;let re=Ve[ee];if(re)re.startsWith("\\")?b+=re+" ":b+=re;else{const{char:ae,variant:de,style:ge}=dn(ee);switch(re=ae,de){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(ge){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}b+=re}}return b}function ft(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var Xt={},Rn=we({},Ve),wn={},Zt={},Ht={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}"},Tn={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}},xn={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}},ke={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:xn},"amsmath.sty":{package:Tn,primitive:!0},"texvc.sty":{package:Ht,primitive:!1}},ue={" ":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},le=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,pe,he;yt()?(pe=new RegExp("\\p{Letter}","u"),he=new RegExp("[0-9\\p{Letter}]","u")):(pe=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,he=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function oe(a,y,b="mord",E){y!==void 0&&(Xt[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},Rn[y]||(Rn[y]=a))}function Ae(a,y,b){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ee=a.charAt(E);oe(ee,ee.codePointAt(0))}return}for(const[E,ee,re,ae]of a)oe(E,ee,re!=null?re:y,ae!=null?ae:b)}function Ge(a,y){for(let b=a;b<=y;b++)oe(String.fromCodePoint(b),b)}function _t(a){var y;return(y=Zt[a])!=null?y:null}function Rt(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const ee=[];for(const ae in wn)ae.startsWith(y)&&!wn[ae].infix&&ee.push({match:ae,frequency:(b=wn[ae].frequency)!=null?b:0});for(const ae in Xt)ae.startsWith(y)&&ee.push({match:ae,frequency:(E=Xt[ae].frequency)!=null?E:0});const re=y.substring(1);for(const ae of Object.keys(a.options.macros))ae.startsWith(re)&&ee.push({match:"\\"+ae,frequency:0});return ee.sort((ae,de)=>{var ge,be;return ae.frequency===de.frequency?ae.match.length===de.match.length?ae.match<de.match?-1:1:ae.match.length-de.match.length:((ge=de.frequency)!=null?ge:0)-((be=ae.frequency)!=null?be:0)}),ee.map(ae=>ae.match)}function zt(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function qt(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:zt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...qt(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:zt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...qt(b[E]))}return y}function jt(a){if(!a)return"";let y="",b=!0;for(const E of a)typeof E.value=="string"?y+=E.value:b=!1;return b?y:""}function ar(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)Zt[E]=b}function xr(a,y,b){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:qt(y),createAtom:b};for(const re of a)Zt[re]=ee}function Nt(a,y,b){var E,ee;b||(b={});const re={definitionType:"function",params:qt(y),ifMode:b.ifMode,isFunction:(E=b.isFunction)!=null?E:!1,applyMode:b.applyMode,infix:(ee=b.infix)!=null?ee:!1,parse:b.parse,createAtom:b.createAtom,applyStyle:b.applyStyle,serialize:b.serialize,render:b.render};if(typeof a=="string")wn["\\"+a]=re;else for(const ae of a)wn["\\"+ae]=re}var pn;function cr(a){return pn||(pn=rt(ke)),a?rt(we(we({},pn),a)):pn}function Rr(a,y){var b,E,ee,re;if(typeof a=="string"){let ae=0;const de=a;return/(^|[^\\])#1/.test(de)&&(ae=1),/(^|[^\\])#2/.test(de)&&(ae=2),/(^|[^\\])#3/.test(de)&&(ae=3),/(^|[^\\])#4/.test(de)&&(ae=4),/(^|[^\\])#5/.test(de)&&(ae=5),/(^|[^\\])#6/.test(de)&&(ae=6),/(^|[^\\])#7/.test(de)&&(ae=7),/(^|[^\\])#8/.test(de)&&(ae=8),/(^|[^\\])#9/.test(de)&&(ae=9),{expand:(b=y==null?void 0:y.expand)!=null?b:!0,captureSelection:(E=y==null?void 0:y.captureSelection)!=null?E:!0,args:ae,def:de}}return we({expand:(ee=y==null?void 0:y.expand)!=null?ee:!0,captureSelection:(re=y==null?void 0:y.captureSelection)!=null?re:!0,args:0},a)}function rt(a){if(!a)return{};const y={};for(const b of Object.keys(a)){const E=a[b];if(E==null)delete y[b];else if(typeof E=="object"&&"package"in E)for(const ee of Object.keys(E.package))y[ee]=Rr(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=Rr(E)}return y}function Kt(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=wn[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=Xt[a]:ue[a]&&(b={definitionType:"symbol",type:"mord",codepoint:ue[a]})}else if(y==="math"){if(b=Xt[a],!b&&a.length===1){const E=Gn("math",a.codePointAt(0));return E.startsWith("\\")?me(we({},Kt(E,"math")),{command:E}):null}}else ue[a]?b={definitionType:"symbol",type:"mord",codepoint:ue[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function Bn(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function Gn(a,y){if(y===void 0)return"";if(a==="math"&&Rn[y])return Rn[y];if(a==="text"){const b=Object.keys(ue).find(E=>ue[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var tr=[0,.68889,0,0,.72222],Sr=[0,.68889,0,0,.66667],Ar=[0,.68889,0,0,.77778],Mr=[0,.68889,0,0,.61111],Pr=[.16667,.68889,0,0,.77778],Vr=[0,.68889,0,0,.55556],lr=[0,0,0,0,.25],si=[0,.825,0,0,2.33334],Li=[0,.9,0,0,2.33334],Ni=[0,.68889,0,0,.54028],Hi=[-.03598,.46402,0,0,.5],ri=[-.13313,.36687,0,0,1],vt=[.01354,.52239,0,0,1],Sn=[.01354,.52239,0,0,1.11111],kn=[0,.54986,0,0,1],In=[0,.69224,0,0,.5],sr=[0,.43056,0,0,1],qn=[.08198,.58198,0,0,.77778],hr=[.19444,.69224,0,0,.41667],$n=[.1808,.675,0,0,1],Xe=[.19444,.69224,0,0,.83334],ct=[.13667,.63667,0,0,1],Tt=[-.064,.437,0,0,1.334],Wt=[.08167,.58167,0,0,.77778],He=[0,.69224,0,0,.72222],pt=[0,.69224,0,0,.66667],$t=[-.13313,.36687,0,0,.77778],Ot=[.06062,.54986,0,0,.77778],Jt=[0,.69224,0,0,.77778],tn=[.25583,.75583,0,0,.77778],Un=[.25142,.75726,0,0,.77778],_r=[.20576,.70576,0,0,.77778],nr=[.30274,.79383,0,0,.77778],er=[.22958,.72958,0,0,.77778],ur=[.1808,.675,0,0,.77778],dr=[.13667,.63667,0,0,.77778],gt=[.13597,.63597,0,0,.77778],ot=[.03517,.54986,0,0,.77778],Ct=[0,.675,0,0,.77778],ln=[.19444,.69224,0,0,.61111],Nn=[0,.54986,0,0,.76042],cn=[0,.54986,0,0,.66667],mn=[.0391,.5391,0,0,.77778],gn=[.03517,.54986,0,0,1.33334],Fn=[.38569,.88569,0,0,.77778],fr=[.23222,.74111,0,0,.77778],Qt=[.19444,.69224,0,0,.77778],Qr=[0,.37788,0,0,.5],Ur=[0,.54986,0,0,.72222],Bi=[0,.69224,0,0,.83334],Ai=[.11111,.69224,0,0,.66667],gi=[.26167,.75726,0,0,.77778],qi=[.48256,.98256,0,0,.77778],xi=[.28481,.79383,0,0,.77778],li=[.08167,.58167,0,0,.22222],$i=[.08167,.58167,0,0,.38889],Gi=[0,.43056,.04028,0,.66667],qr=[.41951,.91951,0,0,.77778],vi=[.24982,.74947,0,0,.38865],Zi=[.08319,.58283,0,0,.75623],la=[0,.10803,0,0,.27764],ta=[0,.47534,0,0,.50181],ii=[.18906,.47534,0,0,.50181],Et=[0,.69141,0,0,.50181],wt=[.24982,.74947,0,0,.27764],Gt=[0,.69141,0,0,.21471],fn=[.25,.75,0,0,.44722],On=[0,.64444,0,0,.575],gr=[.08556,.58556,0,0,.89444],Tr=[0,.69444,0,0,.89444],Wr=[0,.68611,0,0,.9],Gr=[0,.68611,0,0,.86944],Hr=[.25,.75,0,0,.575],ni=[.25,.75,0,0,.31944],yi=[0,.69444,0,0,.63889],Lr=[0,.69444,0,0,.31944],pi=[0,.44444,0,0,.63889],Ti=[0,.44444,0,0,.51111],Mi=[0,.69444,0,0,.575],Ie=[.13333,.63333,0,0,.89444],Fe=[0,.44444,0,0,.31944],ze=[0,.69444,0,0,.86944],je=[0,.68611,0,0,.69166],tt=[0,.68611,0,0,.83055],st=[0,.68611,0,0,.89444],kt=[0,.69444,0,0,.60278],nn=[.19444,.69444,0,0,.51111],sn=[0,.69444,0,0,.83055],Jn=[-.10889,.39111,0,0,1.14999],yr=[.19444,.69444,0,0,.575],Zn=[.19444,.69444,0,0,1.14999],Cn=[.19444,.69444,0,0,.70277],vn=[.05556,.75,0,0,.575],Pn=[0,.68611,0,0,.95833],zn=[.08556,.58556,0,0,.76666],mr=[-.02639,.47361,0,0,.575],Yn=[0,.44444,0,0,.89444],Xn=[0,.55556,0,0,.76666],rr=[-.10889,.39111,0,0,.89444],ir=[.00222,.50222,0,0,.89444],br=[.19667,.69667,0,0,.89444],Re=[.08556,.58556,0,0,1.14999],Ke=[0,.69444,0,0,.70277],Lt=[-.02778,.47222,0,0,.575],dt=[.25,.75,0,0,.51111],Ut=[-.13889,.36111,0,0,1.14999],un=[.19444,.69444,0,0,1.02222],bn=[.12963,.69444,0,0,.89444],Kn=[.19444,.69444,0,0,.44722],Ln=[0,.64444,.13167,0,.59111],on=[.19444,.64444,.13167,0,.59111],Hn=[0,.68611,.17208,0,.8961],jn=[.19444,.44444,.105,0,.53222],wr=[0,.44444,.085,0,.82666],Wn=[0,.69444,.06709,0,.59111],Or=[0,.69444,.12945,0,.35555],Yr=[0,.69444,0,0,.94888],$r=[0,.69444,.11472,0,.59111],jr=[0,.68611,.10778,0,.88555],Er=[0,.69444,.07939,0,.62055],zr=[0,.69444,.12417,0,.30667],ei=[0,.64444,.13556,0,.51111],ci=[.19444,.64444,.13556,0,.51111],Fr=[0,.68333,.16389,0,.74333],fi=[.19444,.43056,.08847,0,.46],Oi=[0,.43056,.07514,0,.71555],na=[0,.69444,.06646,0,.51111],Xi=[0,.69444,0,0,.83129],Fi=[0,.69444,.1225,0,.51111],Ji=[0,.68333,.09403,0,.76666],Qi=[0,.68333,.11111,0,.76666],wi=[0,.69444,.06961,0,.51444],zi=[0,.69444,0,0,.27778],Jr=[.25,.75,0,0,.38889],hi=[0,.64444,0,0,.5],Ii=[0,.69444,0,0,.77778],Yi=[0,.68333,0,0,.75],Ba=[0,.68333,0,0,.77778],$a=[0,.68333,0,0,.68056],Aa=[0,.68333,0,0,.72222],ca=[.25,.75,0,0,.5],ea=[.25,.75,0,0,.27778],Ei=[0,.69444,0,0,.5],Oa=[0,.69444,0,0,.55556],ki=[0,.43056,0,0,.44445],ti=[0,.43056,0,0,.5],Wi=[.19444,.43056,0,0,.55556],ua=[0,.43056,0,0,.55556],Vi=[.08333,.58333,0,0,.77778],aa=[0,.43056,0,0,.27778],mi=[0,.66786,0,0,.27778],pa=[0,.69444,0,0,.75],xa=[0,.66786,0,0,.5],fa=[0,.68333,0,0,.625],wa=[.19444,.69444,0,0,.44445],Ea=[0,.69444,0,0,.72222],Za=[.19444,.69444,0,0,.5],ha=[.19444,.69444,0,0,1],ka=[.011,.511,0,0,1.126],Ja=[.19444,.69444,0,0,.61111],Ga=[.05556,.75,0,0,.5],so=[0,.68333,0,0,.83334],Fa=[.0391,.5391,0,0,.66667],Ca=[-.05555,.44445,0,0,.5],_i=[0,.43056,0,0,.77778],Ui=[0,.55556,0,0,.66667],da=[-.03625,.46375,0,0,.77778],Sa=[-.01688,.48312,0,0,.77778],Ka=[.0391,.5391,0,0,1],io=[0,.69444,0,0,.61111],ho=[-.03472,.46528,0,0,.5],Oo=[.25,.75,0,0,.44445],Ro=[-.14236,.35764,0,0,1],lo=[.244,.744,0,0,.412],Ao=[.19444,.69444,0,0,.88889],ra=[.12963,.69444,0,0,.77778],Ri=[.19444,.69444,0,0,.38889],Ta=[.011,.511,0,0,1.638],_a=[.19444,.69444,0,0,0],co=[0,.44444,0,0,.575],ao=[.19444,.44444,0,0,.575],hs=[0,.68611,0,0,.75555],Qo=[0,.69444,0,0,.66759],ps=[0,.68611,0,0,.80555],oa=[0,.68611,.08229,0,.98229],Nr=[0,.68611,0,0,.76666],Si=[0,.44444,0,0,.58472],Ci=[.19444,.44444,0,0,.6118],Di=[.19444,.43056,0,0,.5],Ha=[0,.68333,.02778,.08334,.76278],Va=[0,.68333,.08125,.05556,.83125],Fo=[0,.43056,0,.05556,.48472],Uo=[.19444,.43056,0,.08334,.51702],ls=[.25,.75,0,0,.42778],va=[0,.69444,0,0,.55],No=[0,.69444,0,0,.73334],cs=[0,.69444,0,0,.79445],ul=[0,.69444,0,0,.51945],As=[0,.69444,0,0,.70278],ms=[0,.69444,0,0,.76389],zo=[.25,.75,0,0,.34306],Ts=[0,.69444,0,0,.56111],Is=[0,.69444,0,0,.25556],qs=[.19444,.45833,0,0,.56111],oo=[0,.45833,0,0,.56111],Ia=[0,.69444,0,0,.30556],Xa=[0,.69444,0,0,.58056],go=[0,.69444,0,0,.67223],yo=[0,.69444,0,0,.85556],Ko=[0,.69444,0,0,.55834],wo=[0,.65556,.11156,0,.5],xs=[0,.69444,.08094,0,.70834],Xl=[.17014,0,0,0,.44445],Yl=[0,.69444,.0799,0,.5],vc=[0,.69444,0,0,.73752],Xc=[0,.69444,.09205,0,.5],Ks=[0,.69444,.09031,0,.77778],Ds=[0,.69444,.07816,0,.27778],yc=[0,.69444,.00316,0,.5],ql=[.19444,.69444,0,0,.83334],Da=[.05556,.75,0,0,.83334],ma=[0,.75,0,0,.5],Ho=[.125,.08333,0,0,.27778],es=[0,.08333,0,0,.27778],ga=[0,.65556,0,0,.5],za=[0,.69444,0,0,.47222],Ra=[0,.69444,0,0,.66667],po=[0,.69444,0,0,.59722],is=[0,.69444,0,0,.54167],Hs=[0,.69444,0,0,.70834],gs=[.25,.75,0,0,.28889],Jl=[0,.69444,0,0,.51667],jd=[0,.44444,0,0,.44445],Zd=[.19444,.44444,0,0,.51667],Yc=[0,.44444,0,0,.38333],ju=[0,.44444,0,0,.51667],qc=[0,.69444,0,0,.83334],Vd=[.35001,.85,0,0,.45834],Jc=[.35001,.85,0,0,.57778],Qc=[.35001,.85,0,0,.41667],Zu=[.35001,.85,0,0,.58334],bc=[0,.72222,0,0,.55556],eu=[1e-5,.6,0,0,.66667],Vu=[1e-5,.6,0,0,.77778],Ql=[.25001,.75,0,0,.94445],Gd=[.306,.805,.19445,0,.47222],xc=[.30612,.805,.19445,0,.47222],jo=[.25001,.75,0,0,.83334],Pl=[.35001,.85,0,0,.47222],Gu=[.25001,.75,0,0,1.11111],Xu=[.65002,1.15,0,0,.59722],vs=[.65002,1.15,0,0,.81111],ja=[.65002,1.15,0,0,.47222],Es=[.65002,1.15,0,0,.66667],Ps=[0,.75,0,0,1],Js=[.55001,1.05,0,0,1.27778],Yu=[.862,1.36,.44445,0,.55556],tu=[.86225,1.36,.44445,0,.55556],Ol=[.55001,1.05,0,0,1.11111],nu=[.65002,1.15,0,0,.52778],ru=[.65002,1.15,0,0,.61111],Rl=[.55001,1.05,0,0,1.51112],qu=[.95003,1.45,0,0,.73611],iu=[.95003,1.45,0,0,1.04445],Qs=[.95003,1.45,0,0,.52778],wc=[.95003,1.45,0,0,.75],Sc=[0,.75,0,0,1.44445],au=[.95003,1.45,0,0,.58334],Cc=[1.25003,1.75,0,0,.79167],ou=[1.25003,1.75,0,0,1.27778],Ju=[1.25003,1.75,0,0,.58334],su=[1.25003,1.75,0,0,.80556],Mc=[0,.825,0,0,1.8889],lu=[1.25003,1.75,0,0,.63889],cu=[.64502,1.155,0,0,.875],Ec=[1e-5,.6,0,0,.875],uu=[-99e-5,.601,0,0,.66667],du=[.64502,1.155,0,0,.66667],Xd=[1e-5,.9,0,0,.88889],Qu=[.65002,1.15,0,0,.88889],Nl=[.90001,0,0,0,.88889],fu=[-.00499,.605,0,0,1.05556],Bl=[0,.12,0,0,.45],ui=[0,.61111,0,0,.525],ws=[.08333,.69444,0,0,.525],ed=[-.08056,.53055,0,0,.525],Yd=[-.05556,.55556,0,0,.525],as=[0,.43056,0,0,.525],To=[.22222,.43056,0,0,.525],kc=[0,0,0,0,.525],qd={"AMS-Regular":{32:lr,65:tr,66:Sr,67:tr,68:tr,69:Sr,70:Mr,71:Ar,72:Ar,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Ar,76:Sr,77:[0,.68889,0,0,.94445],78:tr,79:Pr,80:Mr,81:Pr,82:tr,83:Vr,84:Sr,85:tr,86:tr,87:[0,.68889,0,0,1],88:tr,89:tr,90:Sr,107:Vr,160:lr,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Vr,295:Ni,710:si,732:Li,770:si,771:Li,989:Wt,1008:Gi,8245:[0,.54986,0,0,.275],8463:Ni,8487:tr,8498:Vr,8502:Sr,8503:[0,.68889,0,0,.44445],8504:Sr,8513:[0,.68889,0,0,.63889],8592:Hi,8594:Hi,8602:ri,8603:ri,8606:vt,8608:vt,8610:Sn,8611:Sn,8619:kn,8620:kn,8621:[-.13313,.37788,0,0,1.38889],8622:ri,8624:In,8625:In,8630:sr,8631:sr,8634:qn,8635:qn,8638:hr,8639:hr,8642:hr,8643:hr,8644:$n,8646:$n,8647:$n,8648:Xe,8649:$n,8650:Xe,8651:vt,8652:vt,8653:ri,8654:ri,8655:ri,8666:ct,8667:ct,8669:[-.13313,.37788,0,0,1],8672:Tt,8674:Tt,8705:[0,.825,0,0,.5],8708:Vr,8709:Wt,8717:[0,.43056,0,0,.42917],8722:Hi,8724:[.08198,.69224,0,0,.77778],8726:Wt,8733:Jt,8736:He,8737:He,8738:[.03517,.52239,0,0,.72222],8739:li,8740:[.25142,.74111,0,0,.27778],8741:$i,8742:[.25142,.74111,0,0,.5],8756:pt,8757:pt,8764:$t,8765:[-.13313,.37788,0,0,.77778],8769:$t,8770:da,8774:nr,8776:Sa,8778:Wt,8782:Ot,8783:Ot,8785:qn,8786:qn,8787:qn,8790:Jt,8791:er,8796:[.08198,.91667,0,0,.77778],8806:tn,8807:tn,8808:Un,8809:Un,8812:[.25583,.75583,0,0,.5],8814:_r,8815:_r,8816:nr,8817:nr,8818:er,8819:er,8822:ur,8823:ur,8828:dr,8829:dr,8830:er,8831:er,8832:_r,8833:_r,8840:nr,8841:nr,8842:gt,8843:gt,8847:ot,8848:ot,8858:qn,8859:qn,8861:qn,8862:Ct,8863:Ct,8864:Ct,8865:Ct,8872:[0,.69224,0,0,.61111],8873:He,8874:[0,.69224,0,0,.88889],8876:Mr,8877:Mr,8878:tr,8879:tr,8882:ot,8883:ot,8884:dr,8885:dr,8888:[0,.54986,0,0,1.11111],8890:Wi,8891:ln,8892:ln,8901:[0,.54986,0,0,.27778],8903:Wt,8905:Wt,8906:Wt,8907:Jt,8908:Jt,8909:[-.03598,.46402,0,0,.77778],8910:Nn,8911:Nn,8912:ot,8913:ot,8914:cn,8915:cn,8916:pt,8918:mn,8919:mn,8920:gn,8921:gn,8922:Fn,8923:Fn,8926:dr,8927:dr,8928:nr,8929:nr,8934:fr,8935:fr,8936:fr,8937:fr,8938:_r,8939:_r,8940:nr,8941:nr,8994:Qt,8995:Qt,9416:[.15559,.69224,0,0,.90222],9484:In,9488:In,9492:Qr,9496:Qr,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Ct,9633:Ct,9650:Ur,9651:Ur,9654:ot,9660:Ur,9661:Ur,9664:ot,9674:Ai,9733:[.19444,.69224,0,0,.94445],10003:Bi,10016:Bi,10731:Ai,10846:[.19444,.75583,0,0,.61111],10877:dr,10878:dr,10885:tn,10886:tn,10887:gt,10888:gt,10889:gi,10890:gi,10891:qi,10892:qi,10901:dr,10902:dr,10933:Un,10934:Un,10935:gi,10936:gi,10937:gi,10938:gi,10949:tn,10950:tn,10955:xi,10956:xi,57350:li,57351:$i,57352:Wt,57353:Gi,57356:Un,57357:Un,57358:qr,57359:nr,57360:nr,57361:qr,57366:Un,57367:Un,57368:Un,57369:Un,57370:gt,57371:gt},"Caligraphic-Regular":{32:lr,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:lr},"Fraktur-Regular":{32:lr,33:[0,.69141,0,0,.29574],34:Gt,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:vi,41:vi,42:[0,.62119,0,0,.27764],43:Zi,44:la,45:Zi,46:la,47:[.24982,.74947,0,0,.50181],48:ta,49:ta,50:ta,51:ii,52:ii,53:ii,54:Et,55:ii,56:Et,57:ii,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:wt,93:wt,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:lr,8216:Gt,8217:Gt,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:lr,33:[0,.69444,0,0,.35],34:kt,35:[.19444,.69444,0,0,.95833],36:vn,37:[.05556,.75,0,0,.95833],38:Tr,39:Lr,40:fn,41:fn,42:[0,.75,0,0,.575],43:Ie,44:[.19444,.15556,0,0,.31944],45:Yc,46:[0,.15556,0,0,.31944],47:Hr,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,58:Fe,59:[.19444,.44444,0,0,.31944],60:gr,61:rr,62:gr,63:[0,.69444,0,0,.54305],64:Tr,65:Gr,66:[0,.68611,0,0,.81805],67:tt,68:[0,.68611,0,0,.88194],69:hs,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:Wr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:je,77:[0,.68611,0,0,1.09166],78:Wr,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:Gr,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:ni,92:Hr,93:ni,94:Mi,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:yi,99:Ti,100:yi,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:yi,105:Lr,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Lr,109:[0,.44444,0,0,.95833],110:pi,111:co,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:pi,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:Ti,123:Hr,124:ni,125:Hr,126:[.35,.34444,0,0,.575],160:lr,163:[0,.69444,0,0,.86853],168:Mi,172:[0,.44444,0,0,.76666],176:ze,177:Ie,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Ie,216:[.04861,.73472,0,0,.89444],223:po,230:[0,.44444,0,0,.83055],247:Ie,248:[.09722,.54167,0,0,.575],305:Fe,338:[0,.68611,0,0,1.16944],339:Yn,567:[.19444,.44444,0,0,.35139],710:Mi,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Mi,715:Mi,728:Mi,729:Lr,730:ze,732:Mi,733:Mi,915:je,916:Pn,920:st,923:ps,926:Nr,928:Wr,931:tt,933:st,934:tt,936:st,937:tt,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Lr,8217:Lr,8220:kt,8221:kt,8224:nn,8225:nn,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:Qo,8465:sn,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:sn,8501:Ke,8592:Jn,8593:yr,8594:Jn,8595:yr,8596:Jn,8597:Hr,8598:Zn,8599:Zn,8600:Zn,8601:Zn,8636:Jn,8637:Jn,8640:Jn,8641:Jn,8656:Jn,8657:Cn,8658:Jn,8659:Cn,8660:Jn,8661:[.25,.75,0,0,.70277],8704:yi,8706:[0,.69444,.06389,0,.62847],8707:yi,8709:vn,8711:Pn,8712:zn,8715:zn,8722:Ie,8723:Ie,8725:Hr,8726:Hr,8727:Lt,8728:mr,8729:mr,8730:[.18,.82,0,0,.95833],8733:Yn,8734:[0,.44444,0,0,1.14999],8736:He,8739:ni,8741:Hr,8743:Xn,8744:Xn,8745:Xn,8746:Xn,8747:[.19444,.69444,.12778,0,.56875],8764:rr,8768:[.19444,.69444,0,0,.31944],8771:ir,8776:[.02444,.52444,0,0,.89444],8781:ir,8801:ir,8804:br,8805:br,8810:Re,8811:Re,8826:gr,8827:gr,8834:gr,8835:gr,8838:br,8839:br,8846:Xn,8849:br,8850:br,8851:Xn,8852:Xn,8853:Ie,8854:Ie,8855:Ie,8856:Ie,8857:Ie,8866:Ke,8867:Ke,8868:Tr,8869:Tr,8900:mr,8901:[-.02639,.47361,0,0,.31944],8902:Lt,8968:dt,8969:dt,8970:dt,8971:dt,8994:Ut,8995:Ut,9651:un,9657:Lt,9661:un,9667:Lt,9711:Zn,9824:bn,9825:bn,9826:bn,9827:bn,9837:[0,.75,0,0,.44722],9838:Kn,9839:Kn,10216:fn,10217:fn,10815:Wr,10927:br,10928:br,57376:_a},"Main-BoldItalic":{32:lr,33:[0,.69444,.11417,0,.38611],34:Er,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:Or,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:Ln,49:Ln,50:Ln,51:Ln,52:on,53:Ln,54:Ln,55:on,56:Ln,57:Ln,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:$r,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:Hn,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:Hn,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:Wn,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:jn,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:jn,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:lr,168:[0,.69444,.11473,0,.59111],176:Yr,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:wr,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:wr,567:[.19444,.44444,.04611,0,.385],710:Wn,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:Or,730:Yr,732:$r,733:$r,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:Hn,931:[0,.68611,.11431,0,.82666],933:jr,934:[0,.68611,.05632,0,.82666],936:jr,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:Or,8217:Or,8220:[0,.69444,.16772,0,.62055],8221:Er},"Main-Italic":{32:lr,33:zr,34:wi,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:zr,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:ei,49:ei,50:ei,51:ei,52:ci,53:ei,54:ei,55:ci,56:ei,57:ei,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Fi,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:Fr,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:Fr,79:Ji,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:Fr,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:na,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:fi,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:fi,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:lr,168:[0,.66786,.10474,0,.51111],176:Xi,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:Oi,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:Oi,710:na,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:Xi,732:[0,.66786,.11585,0,.51111],733:Fi,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Ji,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:Fr,931:[0,.68333,.12028,0,.71555],933:Qi,934:[0,.68333,.05986,0,.71555],936:Qi,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:zr,8217:zr,8220:[0,.69444,.1685,0,.51444],8221:wi,8463:Ni},"Main-Regular":{32:lr,33:zi,34:Ei,35:ql,36:Ga,37:Da,38:Ii,39:zi,40:Jr,41:Jr,42:ma,43:Vi,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:ca,48:hi,49:hi,50:hi,51:hi,52:hi,53:hi,54:hi,55:hi,56:hi,57:hi,58:aa,59:[.19444,.43056,0,0,.27778],60:mn,61:$t,62:mn,63:za,64:Ii,65:Yi,66:[0,.68333,0,0,.70834],67:Aa,68:[0,.68333,0,0,.76389],69:$a,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:Yi,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:Ba,76:fa,77:[0,.68333,0,0,.91667],78:Yi,79:Ba,80:$a,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:Aa,85:Yi,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:Yi,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:ea,92:ca,93:ea,94:Ei,95:[.31,.12056,.02778,0,.5],97:ti,98:Oa,99:ki,100:Oa,101:ki,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Oa,105:mi,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:zi,109:[0,.43056,0,0,.83334],110:ua,111:ti,112:Wi,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:ua,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:ki,123:ca,124:ea,125:ca,126:[.35,.31786,0,0,.5],160:lr,163:[0,.69444,0,0,.76909],167:wa,168:xa,172:[0,.43056,0,0,.66667],176:pa,177:Vi,182:Ja,184:Xl,198:[0,.68333,0,0,.90278],215:Vi,216:[.04861,.73194,0,0,.77778],223:Ei,230:[0,.43056,0,0,.72222],247:Vi,248:[.09722,.52778,0,0,.5],305:aa,338:[0,.68333,0,0,1.01389],339:_i,567:[.19444,.43056,0,0,.30556],710:Ei,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Ei,715:Ei,728:Ei,729:mi,730:pa,732:xa,733:Ei,915:fa,916:so,920:Ba,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:Yi,931:Aa,933:Ba,934:Aa,936:Ba,937:Aa,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:zi,8217:zi,8220:Ei,8221:Ei,8224:wa,8225:wa,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:Ni,8465:Ea,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Ea,8501:io,8592:ri,8593:Za,8594:ri,8595:Za,8596:ri,8597:ca,8598:ha,8599:ha,8600:ha,8601:ha,8614:[.011,.511,0,0,1],8617:ka,8618:ka,8636:ri,8637:ri,8640:ri,8641:ri,8652:[.011,.671,0,0,1],8656:ri,8657:Ja,8658:ri,8659:Ja,8660:ri,8661:[.25,.75,0,0,.61111],8704:Oa,8706:[0,.69444,.05556,.08334,.5309],8707:Oa,8709:Ga,8711:so,8712:Fa,8715:Fa,8722:Vi,8723:Vi,8725:ca,8726:ca,8727:ho,8728:Ca,8729:Ca,8730:[.2,.8,0,0,.83334],8733:_i,8734:sr,8736:He,8739:ea,8741:ca,8743:Ui,8744:Ui,8745:Ui,8746:Ui,8747:[.19444,.69444,.11111,0,.41667],8764:$t,8768:[.19444,.69444,0,0,.27778],8771:da,8773:[-.022,.589,0,0,1],8776:Sa,8781:da,8784:[-.133,.67,0,0,.778],8801:da,8804:gt,8805:gt,8810:Ka,8811:Ka,8826:mn,8827:mn,8834:mn,8835:mn,8838:gt,8839:gt,8846:Ui,8849:gt,8850:gt,8851:Ui,8852:Ui,8853:Vi,8854:Vi,8855:Vi,8856:Vi,8857:Vi,8866:io,8867:io,8868:Ii,8869:Ii,8872:[.249,.75,0,0,.867],8900:Ca,8901:[-.05555,.44445,0,0,.27778],8902:ho,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:Oo,8969:Oo,8970:Oo,8971:Oo,8994:Ro,8995:Ro,9136:lo,9137:lo,9651:Ao,9657:ho,9661:Ao,9667:ho,9711:ha,9824:ra,9825:ra,9826:ra,9827:ra,9837:[0,.75,0,0,.38889],9838:Ri,9839:Ri,10216:Jr,10217:Jr,10222:lo,10223:lo,10229:[.011,.511,0,0,1.609],10230:Ta,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:Ta,10815:Yi,10927:gt,10928:gt,57376:_a},"Math-BoldItalic":{32:lr,48:co,49:co,50:co,51:ao,52:ao,53:ao,54:On,55:ao,56:On,57:ao,65:Gr,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:oa,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:hs,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:Qo,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:Si,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:lr,915:[0,.68611,.15972,0,.65694],916:Pn,920:[0,.68611,.03194,0,.86722],923:ps,926:[0,.68611,.07458,0,.84125],928:oa,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Nr,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:Si,960:[0,.44444,.03704,0,.68241],961:Ci,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:Ci,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:lr,48:ti,49:ti,50:ti,51:Di,52:Di,53:Di,54:hi,55:Di,56:hi,57:Di,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:Va,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:Ha,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:Fo,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:lr,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Ha,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:Va,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:Fo,960:[0,.43056,.03588,0,.57003],961:Uo,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:Uo,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:lr,33:[0,.69444,0,0,.36667],34:Ko,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:Ia,40:ls,41:ls,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:va,49:va,50:va,51:va,52:va,53:va,54:va,55:va,56:va,57:va,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:ul,64:No,65:No,66:No,67:As,68:cs,69:[0,.69444,0,0,.64167],70:io,71:No,72:cs,73:[0,.69444,0,0,.33056],74:ul,75:ms,76:Xa,77:[0,.69444,0,0,.97778],78:cs,79:cs,80:As,81:[.10556,.69444,0,0,.79445],82:As,83:io,84:No,85:ms,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:No,89:[0,.69444,.0275,0,.73334],90:go,91:zo,93:zo,94:va,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:Ts,99:[0,.45833,0,0,.48889],100:Ts,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:Ts,105:Is,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Is,109:[0,.45833,0,0,.86667],110:oo,111:[0,.45833,0,0,.55],112:qs,113:qs,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:oo,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:lr,168:va,176:No,180:va,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:va,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:va,729:Ia,730:No,732:va,733:va,915:Xa,916:[0,.69444,0,0,.91667],920:yo,923:go,926:No,928:cs,931:cs,933:yo,934:cs,936:yo,937:cs,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Ia,8217:Ia,8220:Ko,8221:Ko},"SansSerif-Italic":{32:lr,33:[0,.69444,.05733,0,.31945],34:yc,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:Ds,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:Ho,45:[0,.44444,.01946,0,.33333],46:es,47:[.25,.75,.13164,0,.5],48:wo,49:wo,50:wo,51:wo,52:wo,53:wo,54:wo,55:wo,56:wo,57:wo,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:Ra,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:xs,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:is,77:[0,.69444,.08094,0,.875],78:xs,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:Yl,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:lr,168:[0,.67937,.06385,0,.5],176:vc,184:Xl,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:Yl,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Xc,715:Ei,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:vc,732:[0,.67659,.08826,0,.5],733:Xc,915:[0,.69444,.13372,0,.54167],916:qc,920:[0,.69444,.07555,0,.77778],923:io,926:[0,.69444,.12816,0,.66667],928:xs,931:[0,.69444,.11983,0,.72222],933:Ks,934:[0,.69444,.04603,0,.72222],936:Ks,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Ds,8217:Ds,8220:[0,.69444,.14205,0,.5],8221:yc},"SansSerif-Regular":{32:lr,33:[0,.69444,0,0,.31945],34:Ei,35:ql,36:Ga,37:Da,38:[0,.69444,0,0,.75834],39:zi,40:Jr,41:Jr,42:ma,43:Vi,44:Ho,45:[0,.44444,0,0,.33333],46:es,47:ca,48:ga,49:ga,50:ga,51:ga,52:ga,53:ga,54:ga,55:ga,56:ga,57:ga,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:za,64:Ra,65:Ra,66:Ra,67:yi,68:[0,.69444,0,0,.72223],69:po,70:[0,.69444,0,0,.56945],71:Ra,72:Hs,73:zi,74:za,75:[0,.69444,0,0,.69445],76:is,77:[0,.69444,0,0,.875],78:Hs,79:[0,.69444,0,0,.73611],80:yi,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Oa,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:Ra,89:[0,.69444,.025,0,.66667],90:io,91:gs,93:gs,94:Ei,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Jl,99:jd,100:Jl,101:jd,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Jl,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:ju,111:[0,.44444,0,0,.5],112:Zd,113:Zd,114:[0,.44444,.01389,0,.34167],115:Yc,116:[0,.57143,0,0,.36111],117:ju,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:lr,168:[0,.67937,0,0,.5],176:Ra,184:Xl,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Ei,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Ei,715:Ei,728:Ei,729:[0,.67937,0,0,.27778],730:Ra,732:[0,.67659,0,0,.5],733:Ei,915:is,916:qc,920:Ii,923:io,926:Ra,928:Hs,931:Ea,933:Ii,934:Ea,936:Ii,937:Ea,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:zi,8217:zi,8220:Ei,8221:Ei},"Script-Regular":{32:lr,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:lr},"Size1-Regular":{32:lr,40:Vd,41:Vd,47:Jc,91:Qc,92:Jc,93:Qc,123:Zu,125:Zu,160:lr,710:bc,732:bc,770:bc,771:bc,8214:[-99e-5,.601,0,0,.77778],8593:eu,8595:eu,8657:Vu,8659:Vu,8719:Ql,8720:Ql,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:xc,8748:Gd,8749:Gd,8750:xc,8896:jo,8897:jo,8898:jo,8899:jo,8968:Pl,8969:Pl,8970:Pl,8971:Pl,9168:uu,10216:Pl,10217:Pl,10752:Gu,10753:Gu,10754:Gu,10756:jo,10758:jo},"Size2-Regular":{32:lr,40:Xu,41:Xu,47:vs,91:ja,92:vs,93:ja,123:Es,125:Es,160:lr,710:Ps,732:Ps,770:Ps,771:Ps,8719:Js,8720:Js,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:tu,8748:Yu,8749:Yu,8750:tu,8896:Ol,8897:Ol,8898:Ol,8899:Ol,8968:nu,8969:nu,8970:nu,8971:nu,10216:ru,10217:ru,10752:Rl,10753:Rl,10754:Rl,10756:Ol,10758:Ol},"Size3-Regular":{32:lr,40:qu,41:qu,47:iu,91:Qs,92:iu,93:Qs,123:wc,125:wc,160:lr,710:Sc,732:Sc,770:Sc,771:Sc,8730:[.95003,1.45,0,0,1],8968:au,8969:au,8970:au,8971:au,10216:wc,10217:wc},"Size4-Regular":{32:lr,40:Cc,41:Cc,47:ou,91:Ju,92:ou,93:Ju,123:su,125:su,160:lr,710:Mc,732:Mc,770:Mc,771:Mc,8730:[1.25003,1.75,0,0,1],8968:lu,8969:lu,8970:lu,8971:lu,9115:cu,9116:Ec,9117:cu,9118:cu,9119:Ec,9120:cu,9121:du,9122:uu,9123:du,9124:du,9125:uu,9126:du,9127:Xd,9128:Qu,9129:Nl,9130:[0,.3,0,0,.88889],9131:Xd,9132:Qu,9133:Nl,9143:[.88502,.915,0,0,1.05556],10216:su,10217:su,57344:fu,57345:fu,57680:Bl,57681:Bl,57682:Bl,57683:Bl},"Typewriter-Regular":{32:kc,33:ui,34:ui,35:ui,36:ws,37:ws,38:ui,39:ui,40:ws,41:ws,42:[0,.52083,0,0,.525],43:ed,44:[.13889,.125,0,0,.525],45:ed,46:[0,.125,0,0,.525],47:ws,48:ui,49:ui,50:ui,51:ui,52:ui,53:ui,54:ui,55:ui,56:ui,57:ui,58:as,59:[.13889,.43056,0,0,.525],60:Yd,61:[-.19549,.41562,0,0,.525],62:Yd,63:ui,64:ui,65:ui,66:ui,67:ui,68:ui,69:ui,70:ui,71:ui,72:ui,73:ui,74:ui,75:ui,76:ui,77:ui,78:ui,79:ui,80:ui,81:[.13889,.61111,0,0,.525],82:ui,83:ui,84:ui,85:ui,86:ui,87:ui,88:ui,89:ui,90:ui,91:ws,92:ws,93:ws,94:ui,95:[.09514,0,0,0,.525],96:ui,97:as,98:ui,99:as,100:ui,101:as,102:ui,103:To,104:ui,105:ui,106:[.22222,.61111,0,0,.525],107:ui,108:ui,109:as,110:as,111:as,112:To,113:To,114:as,115:as,116:[0,.55358,0,0,.525],117:as,118:as,119:as,120:as,121:To,122:as,123:ws,124:ws,125:ws,126:ui,127:ui,160:kc,176:ui,184:[.19445,0,0,0,.525],305:as,567:To,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:ui,715:ui,728:ui,730:ui,770:ui,771:ui,776:ui,915:ui,916:ui,920:ui,923:ui,926:ui,928:ui,931:ui,933:ui,934:ui,936:ui,937:ui,8216:ui,8217:ui,8242:ui,9251:[.11111,.21944,0,0,.525]}},Jd=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,$l=10,os=.25,hu=1.2,el=.431,td={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[el,el,el],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:[os,os,os],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]},pu=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dl=5,nd={"\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 tl(a,y){a===void 0&&(a=77);const b=qd[y][a];if(b)return{defaultMetrics:!1,depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[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 nd)a=nd[E].codePointAt(0);else if(Jd.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 mu={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]},Fl={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 ec(a){if(Fl[a]){const[be,Se,$e]=Fl[a],Ye=`<span class="stretchy" style="height:${$e}em"><svg width="100%" height="${$e}em" viewBox="0 0 ${be} ${Se}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Qd[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*$e/2)/100}em;min-width:0">${Ye}</span>`}const[y,b,E,ee]=mu[a];let re,ae;const de=E/1e3;y.length===3?(re=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],ae=["xMinYMin","xMidYMin","xMaxYMin"]):y.length===2?(re=["slice-1-of-2","slice-2-of-2"],ae=["xMinYMin","xMaxYMin"]):(re=["slice-1-of-1"],ae=[ee]);const ge=y.map((be,Se)=>`<span class="${re[Se]}" style=height:${de}em><svg width=400em height=${de}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${ae[Se]} slice"><path fill="currentcolor" d="${Qd[be]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${de}em;min-width:${b}em;">${ge}</span>`}function ef(a){return mu[a]?mu[a][2]/1e3:Fl[a][2]}function tf(a){const y=[];for(let b=0;b<a.length;b++){let E=a.charCodeAt(b);if(E===13&&a.charCodeAt(b+1)===10&&(E=10,b++),(E===13||E===12)&&(E=10),E===0&&(E=65533),E>=55296&&E<=56319){const ee=a.charCodeAt(b+1);if(ee>=56320&&ee<=57343){const re=E-55296,ae=ee-56320;E=Dl(2,16)+re*Dl(2,10)+ae,b++}}y.push(E)}return y}var _c=8205,Lc=[[_c,1],[65038,2],[127995,5],[129456,4],[917536,96]],fl,tc=[127462,127487];function nc(a){var y;if(fl===void 0){fl={};for(const b of Lc)for(let E=b[0];E<=b[0]+b[1]-1;E++)fl[E]=!0}return(y=fl[a])!=null?y:!1}function nf(a){return a>=tc[0]&&a<=tc[1]}function rf(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=tf(a);let E=0;for(;E<b.length;){const ee=b[E++],re=b[E];if(re===_c){const ae=E-1;for(E+=2;b[E]===_c;)E+=2;y.push(String.fromCodePoint(...b.slice(ae,E-ae+1)))}else if(nc(re)){const ae=E-1;for(;nc(b[E]);)E+=b[E]===_c?2:1;y.push(String.fromCodePoint(...b.slice(ae,2*E-ae-1)))}else nf(ee)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(ee))}return y}var af=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=rf(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 y=typeof this.s=="string"?a.exec(this.s.slice(this.pos)):a.exec(this.s.slice(this.pos).join(""));return y!=null&&y[0]?(this.pos+=y[0].length,y[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 y=this.match(/^[a-zA-Z\*]+/);return y?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):y=this.get(),"\\"+y}}else{if(a==="{")return"<{>";if(a==="}")return"<}>";if(a==="^"){if(this.peek()==="^"){this.get();const y=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(y)return String.fromCodePoint(Number.parseInt(y.slice(y.lastIndexOf("^")+1),16))}return a}else if(a==="#"){if(!this.end()){let y=!1;if(/[\d?@]/.test(this.peek())&&(y=!0,this.pos+1<this.s.length)){const b=this.s[this.pos+1];y=/[^\dA-Za-z]/.test(b)}return y?"#"+this.get():"#"}}else if(a==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return a}};function hl(a,y){var b,E,ee,re;const ae=[];let de=a.next();if(de&&de!=="\\relax"){if(de==="\\noexpand")de=a.next(),de&&ae.push(de);else if(de==="\\obeyspaces")a.obeyspaces=!0;else if(de==="\\bgroup")ae.push("<{>");else if(de==="\\egroup")ae.push("<}>");else if(de==="\\string"){if(de=a.next(),de)if(de.startsWith("\\"))for(const ge of de)ae.push(ge==="\\"?"\\backslash":ge);else de==="<{>"?ae.push("\\{"):de==="<space>"?ae.push("~"):de==="<}>"&&ae.push("\\}")}else if(de==="\\csname"){for(;a.peek()==="<space>";)a.next();let ge="",be=!1,Se=[];do{if(Se.length===0)if(/^#[\d?@]$/.test(a.peek())){const $e=a.get().slice(1);Se=nl((E=(b=y==null?void 0:y($e))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),de=Se[0]}else de=a.next(),Se=de?[de]:[];be=Se.length===0,!be&&de==="\\endcsname"&&(be=!0,Se.shift()),be||(be=de==="<$>"||de==="<$$>"||de==="<{>"||de==="<}>"||typeof de=="string"&&de.length>1&&de.startsWith("\\")),be||(ge+=Se.shift())}while(!be);ge&&ae.push("\\"+ge),ae.push(...Se)}else if(de!=="\\endcsname")if(de.length>1&&de.startsWith("#")){const ge=de.slice(1);ae.push(...nl((re=(ee=y==null?void 0:y(ge))!=null?ee:y==null?void 0:y("?"))!=null?re:"\\placeholder{}",y))}else ae.push(de)}return ae}function nl(a,y=null){const b=[];let E="";for(const ae of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const de=ae.match(/((?:\\%)|[^%])*/);de!==null&&b.push(de[0])}const ee=new af(nt(b.join(""))),re=[];do re.push(...hl(ee,y));while(!ee.end());return re}function ya(a){let y="";const b=[];for(const E of a)E&&(y&&/^[a-zA-Z\*]/.test(E)&&b.push(y),b.push(E),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(E)&&b.push(" "),y=/\\[a-zA-Z]+\*?$/.test(E)?" ":"");return b.join("")}function uo(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:ya([a,...y.map(b=>`{${b}}`)])}function pl(a){return ya(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var of=class Ud{constructor(y){Ud._registry[y]=this}static createAtom(y,b,E){return Ud._registry[y].createAtom(b,Kt(b,y),E)}static serialize(y,b){var E;if(!y||y.length===0)return"";if((E=b.skipStyles)!=null&&E){const ee=[];for(const re of sf(y)){const ae=Ud._registry[re[0].mode];ee.push(...ae.serialize(re,b))}return ya(ee)}return ya(th(y,b))}static getFont(y,b,E){return Ud._registry[y].getFont(b,E)}};of._registry={};var Ss=of;function sf(a){const y=[];let b=[],E="NONE";for(const ee of a)ee.type!=="first"&&(ee.mode!==E?(b.length>0&&y.push(b),b=[ee],E=ee.mode):b.push(ee));return b.length>0&&y.push(b),y}function Eo(a,y){const b=[];let E=[],ee;for(const re of a)if(re.type!=="first"&&re.style){let ae;y==="variant"?(ae=re.style.variant,re.style.variantStyle&&re.style.variantStyle!=="up"&&(ae+="-"+re.style.variantStyle)):ae=re.style[y],ae===ee?E.push(re):(E.length>0&&b.push(E),E=[re],ee=ae)}return E.length>0&&b.push(E),b}function rd(a,y){var b;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const ae of sf(a)){const de=y.defaultMode;for(const ge of Eo(ae,"color")){const be=ge[0].computedStyle,Se=Ss._registry[ge[0].mode].serialize(ge,me(we({},y),{defaultMode:de==="text"?"text":"math"}));!y.skipStyles&&be.color&&be.color!=="none"&&(!E||ee!==be.color)?re.push(uo("\\textcolor",(b=be.verbatimColor)!=null?b:be.color,ya(Se))):re.push(ya(Se))}}return re}function eh(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return Eo(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"&&(!b||E!==ae.backgroundColor))return uo("\\colorbox",(re=ae.verbatimBackgroundColor)!=null?re:ae.backgroundColor,ya(rd(ee,me(we({},y),{defaultMode:"text"}))))}return ya(rd(ee,y))})}function th(a,y){if(a.length===0)return[];const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.fontSize,ee=[];for(const re of Eo(a,"fontSize")){const ae=re[0].computedStyle.fontSize,de=eh(re,y);de&&(ae&&ae!=="auto"&&(!b||E!==ae)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][ae],...de):ee.push(...de))}return ee}function id(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 rc(a){if(a.length===0)return"ord";const y=id(a[0].type),b=id(a[a.length-1].type);return y&&y===b?y:"ord"}function ic(a,y){if(typeof a=="string")return a;if(typeof a=="number"){console.assert(Number.isFinite(a));const b=Math.ceil(100*a)/100;return b===0?"0":b.toString()+(y!=null?y:"")}return""}var Ir=class Mp{constructor(y,b){var E,ee,re,ae,de;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:Oe(y)?this.children=y.filter(be=>be!==null):y&&y instanceof Mp&&(this.children=[y]),this.children)for(const be of this.children)be.parent=this;this.type=(E=b==null?void 0:b.type)!=null?E:"ignore",this.isSelected=(b==null?void 0:b.isSelected)===!0,b!=null&&b.caret&&(this.caret=b.caret),this.classes=(ee=b==null?void 0:b.classes)!=null?ee:"",this.isTight=(re=b==null?void 0:b.isTight)!=null?re:!1,b!=null&&b.attributes&&(this.attributes=b.attributes);let ge=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(ge=(de=Ss.getFont((ae=b.mode)!=null?ae:"math",this,me(we({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?de:void 0),ge||(ge="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,(b==null?void 0:b.maxFontSize)!==void 0&&(this.maxFontSize=b.maxFontSize),Ac(this,ge)}set atomID(y){y===void 0||y.length===0||(this.id=y)}selected(y){if(this.isSelected!==y&&(this.isSelected=y,this.children))for(const b of this.children)b.selected(y)}setStyle(y,b,E){if(b===void 0)return;const ee=ic(b,E);ee.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[y]=ee)}setTop(y){Number.isFinite(y)&&Math.abs(y)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=ic(y,"em"),this.height-=y,this.depth+=y)}get left(){var y;return(y=this.cssProperties)!=null&&y["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=ic(y,"em")))}set right(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=ic(y,"em")))}set bottom(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=ic(y,"em")))}get width(){return this._width*this.scale}set width(y){this._width=y,this.hasExplicitWidth=!0}set softWidth(y){}get height(){return this._height*this.scale}set height(y){this._height=y}get depth(){return this._depth*this.scale}set depth(y){this._depth=y}wrap(y){const b=y.parent;if(!b)return this;y.isPhantom&&this.setStyle("opacity",0);const E=y.color;E&&E!==b.color&&this.setStyle("color",E);let ee=y.backgroundColor;this.isSelected&&(ee=yn(ee)),ee&&ee!==b.backgroundColor&&(this.setStyle("background-color",ee),this.setStyle("display","inline-block"));const re=y.scalingFactor;return this.scale=re,this.skew*=re,this.italic*=re,this}toMarkup(){var y,b,E,ee;let re=(y=this.value)!=null?y:"";if(this.children)for(const xt of this.children)re+=xt.toMarkup();let ae="";if(this.svgBody)ae=ec(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 xt=(b=this.cssProperties)==null?void 0:b.padding;xt?(ae+=`top:${xt};`,ae+=`left:${xt};`,ae+=`width:calc(100% - 2 * ${xt} );`):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 de="";const ge=this.classes.split(" ");ge.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&ge.push("ML__latex-caret"),this.isSelected&&ge.push("ML__selected");const be=ge.length===1?ge[0]:ge.filter((xt,At,An)=>xt.length>0&&An.indexOf(xt)===At).join(" ");if(be.length>0&&(de+=` class="${be}"`),this.id&&(de+=` data-atom-id=${this.id}`),this.cssId&&(de+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(de+=" "+Object.keys(this.attributes).map(xt=>`${xt}="${this.attributes[xt]}"`).join(" ")),this.htmlData){const xt=this.htmlData.split(",");for(const At of xt){const An=At.match(/([^=]+)=(.+$)/);if(An){const kr=An[1].trim().replace(/ /g,"-");kr&&(de+=` data-${kr}="${An[2]}" `)}else{const kr=At.trim().replace(/ /g,"-");kr&&(de+=` data-${kr} `)}}}const Se=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&Se.width===void 0&&(Se.width=`${Math.ceil(this._width*100)/100}em`);const $e=Object.keys(Se).map(xt=>`${xt}:${Se[xt]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||ae.length>0)&&$e.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const xt=this.htmlStyle.split(";");let At="";for(const An of xt){const kr=An.match(/([^=]+):(.+$)/);if(kr){const Mn=kr[1].trim().replace(/ /g,"-");Mn&&(At+=`${Mn}:${kr[2]};`)}}At&&(de+=` style="${At}"`)}$e.length>0&&(de+=` style="${$e.join(";")}"`);let Ye="";return de.length>0||ae.length>0?Ye=`<span${de}>${re}${ae}</span>`:Ye=re,this.caret==="text"?Ye+='<span class="ML__text-caret"></span>':this.caret==="math"&&(Ye+='<span class="ML__caret"></span>'),Ye}tryCoalesceWith(y){if(this.svgBody||!this.value||y.svgBody||!y.value)return!1;const b=this.children&&this.children.length>0,E=y.children&&y.children.length>0;if(b||E)return!1;if(y.cssProperties||this.cssProperties){for(const ge of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&ge in y.cssProperties||this.cssProperties&&ge in this.cssProperties)return!1}const ee=this.cssProperties?Object.keys(this.cssProperties).length:0,re=y.cssProperties?Object.keys(y.cssProperties).length:0;if(ee!==re)return!1;if(ee>0){for(const ge of Object.keys(this.cssProperties))if(this.cssProperties[ge]!==y.cssProperties[ge])return!1}const ae=this.classes.trim().replace(/\s+/g," ").split(" "),de=y.classes.trim().replace(/\s+/g," ").split(" ");if(ae.length!==de.length)return!1;ae.sort(),de.sort();for(const[ge,be]of ae.entries())if(be==="vertical-separator"||be!==de[ge])return!1;return this.value+=y.value,this.height=Math.max(this.height,y.height),this.depth=Math.max(this.depth,y.depth),this._width=this._width+y._width,this.maxFontSize=Math.max(this.maxFontSize,y.maxFontSize),this.italic=y.italic,!0}};function ad(a){if(!a||a.length===0)return[];a[0].children=ad(a[0].children);const y=[a[0]];for(let b=1;b<a.length;b++)y[y.length-1].tryCoalesceWith(a[b])||(a[b].children=ad(a[b].children),y.push(a[b]));return y}function gu(a){return a.children&&(a.children=ad(a.children)),a}function vu(a,y){if(!a)return new Ir(null,y);const b=new Ir(null,{classes:"ML__strut",type:"ignore"});b.setStyle("height",Math.max(0,a.height),"em");const E=[b];if(a.depth!==0){const ee=new Ir(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 Ir(E,me(we({},y),{type:"lift"}))}function Os(a){const y=ef(a)/2,b=new Ir(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function Ac(a,y){var b;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=tl(a.value.codePointAt(E),y);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,(b=ae.maxFontSize)!=null?b:0);a.height=E,a.depth=ee,a._width=a.children.reduce((ae,de)=>ae+de.width,0),a.maxFontSize=re}}function yu(a){if("individualShift"in a){const y=a.individualShift;let b=y[0];const E=[b],ee=-b.shift-b.box.depth;let re=ee;for(let ae=1;ae<y.length;ae++){const de=y[ae],ge=-de.shift-re-de.box.depth,be=ge-(b.box.height+b.box.depth);re=re+ge,E.push(be),E.push(de),b=de}return[E,ee]}if("top"in a){let y=a.top;for(const b of a.children)y-=typeof b=="number"?b:b.box.height+b.box.depth;return[a.children,y]}else{if("bottom"in a)return[a.children,-a.bottom];if("firstBaseline"in a){const y=a.firstBaseline[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.firstBaseline,-y.box.depth]}else if("shift"in a){const y=a.children[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.children,-y.box.depth-a.shift]}}return[null,0]}function Tc(a){var y;const[b,E]=yu(a);if(!b)return[[],0,0];const ee=new Ir(null,{classes:"pstrut"});let re=0;for(const At of b)if(typeof At!="number"){const An=At.box;re=Math.max(re,An.maxFontSize,An.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const ae=[];let de=E,ge=E,be=E,Se=0;for(const At of b){if(typeof At=="number")be+=At;else{const An=At.box,kr=(y=At.classes)!=null?y:[],Mn=new Ir([ee,An],{classes:kr.join(" "),style:At.style});An.setStyle("height",An.height+An.depth,"em"),An.setStyle("display","inline-block"),Mn.setStyle("top",-re-be-An.depth,"em"),At.marginLeft&&Mn.setStyle("margin-left",At.marginLeft,"em"),At.marginRight&&Mn.setStyle("margin-right",At.marginRight,"em"),ae.push(Mn),be+=An.height+An.depth,Se=Math.max(Se,Mn.width)}de=Math.min(de,be),ge=Math.max(ge,be)}ae.forEach(At=>{At.softWidth=Se});const $e=new Ir(ae,{classes:"vlist"});if($e.softWidth=Se,$e.height=ge,$e.setStyle("height",ge,"em"),de>=0)return[[new Ir($e,{classes:"vlist-r"})],ge,-de];const Ye=new Ir(new Ir(null),{classes:"vlist"});Ye.height=-de,Ye.setStyle("height",-de,"em");const xt=new Ir(8203,{classes:"vlist-s",maxFontSize:0});return xt.softWidth=0,xt.height=0,xt.depth=0,[[new Ir([$e,xt],{classes:"vlist-r"}),new Ir(Ye,{classes:"vlist-r"})],ge,-de]}var Qa=class extends Ir{constructor(a,y){var b;const[E,ee,re]=Tc(a);super(E.length===1?E[0]:E,{type:y==null?void 0:y.type,classes:((b=y==null?void 0:y.classes)!=null?b:"")+" vlist-t"+(E.length===2?" vlist-t2":"")}),this.height=ee,this.depth=re,this.softWidth=E.reduce((ae,de)=>Math.max(ae,de.width),0)}};function nh(a,y){var b,E,ee,re,ae;const de=a.metrics,ge=new Ir(y.base),be=(b=y.baseShift)!=null?b:0,Se=(E=y.slant)!=null?E:0;let $e=0,Ye=0;y.above&&($e=(ee=y.aboveShift)!=null?ee:Math.max(de.bigOpSpacing1,de.bigOpSpacing3-y.above.depth)),y.below&&(Ye=(re=y.belowShift)!=null?re:Math.max(de.bigOpSpacing2,de.bigOpSpacing4-y.below.height));let xt=null;if(y.below&&y.above){const At=de.bigOpSpacing5+y.below.height+y.below.depth+Ye+ge.depth+be;xt=new Qa({bottom:At,children:[de.bigOpSpacing5,{box:y.below,marginLeft:-Se,classes:["ML__center"]},Ye,{box:ge,classes:["ML__center"]},$e,{box:y.above,marginLeft:Se,classes:["ML__center"]},de.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)xt=new Qa({top:ge.height-be,children:[de.bigOpSpacing5,{box:y.below,marginLeft:-Se,classes:["ML__center"]},Ye,{box:ge,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const At=ge.depth+be;xt=new Qa({bottom:At,children:[{box:ge,classes:["ML__center"]},$e,{box:y.above,marginLeft:Se,classes:["ML__center"]},de.bigOpSpacing5]}).wrap(a)}else{const At=ge.depth+be;xt=new Qa({bottom:At,children:[{box:ge},de.bigOpSpacing5]}).wrap(a)}return new Ir(xt,{type:(ae=y.type)!=null?ae:"op"})}var od=7,rl=6,Ic=5,ml=4,zl=3,ss=2,ks=1,Zo=0,Ws=class{constructor(a,y,b){this.id=a,this.sizeDelta=y,this.cramped=b;const E={"-4":2,"-3":1,0:0}[y];this.metrics=Object.keys(td).reduce((ee,re)=>me(we({},ee),{[re]:td[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return Us[[Zo,ks,Zo,ks,ss,zl,ss,zl][this.id]]}get sub(){return Us[[Zo,Zo,Zo,Zo,ss,ss,ss,ss][this.id]]}get fracNum(){return Us[[Zo,ks,Zo,ks,ss,zl,ml,Ic][this.id]]}get fracDen(){return Us[[Zo,Zo,Zo,Zo,ss,ss,ml,ml][this.id]]}get cramp(){return Us[[Zo,Zo,ss,ss,ml,ml,rl,rl][this.id]]}get isTight(){return this.sizeDelta<0}},Kl={7:new Ws(od,0,!1),6:new Ws(rl,0,!0),5:new Ws(Ic,0,!1),4:new Ws(ml,0,!0),3:new Ws(zl,-3,!1),2:new Ws(ss,-3,!0),1:new Ws(ks,-4,!1),0:new Ws(Zo,-4,!0)},Us=me(we({},Kl),{displaystyle:Kl[od],textstyle:Kl[Ic],scriptstyle:Kl[zl],scriptscriptstyle:Kl[ks]});function ac(a,y){var b;if(!a)return 0;const E={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:$l,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(b=a.unit)!=null?b:"pt"];if(Number.isFinite(y)){const ee=Dl(10,y);return Math.round(a.dimension/$l*E*ee)/ee}return a.dimension*E}function sd(a,y){if(a===null)return 0;const b=ac(a)/$l;if(Number.isFinite(y)){const E=Dl(10,y);return Math.round(b*E)/E}return b}function ld(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function lf(a){let y=ld(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${ld(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${ld(a.shrink)}`),y}function Io(a){var y,b;if(a==null)return null;let E="";if("dimension"in a&&(E=`${a.dimension}${(y=a.unit)!=null?y:"pt"}`),"glue"in a&&(E=lf(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),(b=a.relax)!=null&&b&&(E+="\\relax"),E}function js(a,y){return a==null?null:"number"in a?me(we({},a),{number:a.number*y}):"register"in a?"factor"in a&&a.factor?me(we({},a),{factor:a.factor*y}):me(we({},a),{factor:y}):"dimension"in a?me(we({},a),{dimension:a.dimension*y}):"glue"in a?a.shrink&&a.grow?{glue:js(a.glue,y),shrink:js(a.shrink,y),grow:js(a.grow,y)}:a.shrink?{glue:js(a.glue,y),shrink:js(a.shrink,y)}:a.grow?{glue:js(a.glue,y),grow:js(a.grow,y)}:{glue:js(a.glue,y)}:null}var rh={"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 oc(){return we({},rh)}function bu(){return{registers:oc(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:qe.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:Pt,backgroundColorMap:Qe,getMacro:a=>Bn(a,cr())}}var La=class Ep{constructor(y,b){var E,ee,re,ae,de,ge,be,Se,$e,Ye,xt,At,An,kr,Mn;let or;y!=null&&y.parent?(this.parent=y.parent,or=y.parent,this.registers={}):(or=we(we({},bu()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=or.registers),or.atomIdsSettings&&(this.atomIdsSettings=we({},or.atomIdsSettings)),this.renderPlaceholder=or.renderPlaceholder,this.isPhantom=(ae=(re=y==null?void 0:y.isPhantom)!=null?re:(ee=this.parent)==null?void 0:ee.isPhantom)!=null?ae:!1,this.letterShapeStyle=or.letterShapeStyle,this.minFontScale=or.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(ge=(de=this.parent)==null?void 0:de.color)!=null?ge:"",b!=null&&b.backgroundColor&&b.backgroundColor!=="none"?this.backgroundColor=b.backgroundColor:this.backgroundColor=(Se=(be=this.parent)==null?void 0:be.backgroundColor)!=null?Se:"",b!=null&&b.fontSize&&b.fontSize!=="auto"&&b.fontSize!==(($e=this.parent)==null?void 0:$e.size)?this.size=b.fontSize:this.size=(xt=(Ye=this.parent)==null?void 0:Ye.size)!=null?xt:dl;let Dr=(An=(At=this.parent)==null?void 0:At.mathstyle)!=null?An:Us.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(or instanceof Ep)switch(y.mathstyle){case"cramp":Dr=Dr.cramp;break;case"superscript":Dr=Dr.sup;break;case"subscript":Dr=Dr.sub;break;case"numerator":Dr=Dr.fracNum;break;case"denominator":Dr=Dr.fracDen;break}switch(y.mathstyle){case"textstyle":Dr=Us.textstyle;break;case"displaystyle":Dr=Us.displaystyle;break;case"scriptstyle":Dr=Us.scriptstyle;break;case"scriptscriptstyle":Dr=Us.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=Dr,this.smartFence=or.smartFence,this.placeholderSymbol=or.placeholderSymbol,this.colorMap=(kr=or.colorMap)!=null?kr:pr=>pr,this.backgroundColorMap=(Mn=or.backgroundColorMap)!=null?Mn:pr=>pr,this.getMacro=or.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 y=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,y}scale(y){return y*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===od||this.mathstyle.id===rl}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(pu[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(y){var b;if((b=this.registers)!=null&&b[y])return this.registers[y];if(this.parent)return this.parent.getRegister(y)}getRegisterAsNumber(y){const b=this.getRegister(y);if(typeof b=="number")return b;if(typeof b=="string")return Number(b)}getRegisterAsGlue(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];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(y)}getRegisterAsEm(y,b){return sd(this.getRegisterAsDimension(y),b)}getRegisterAsDimension(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];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(y)}setRegister(y,b){if(b===void 0){delete this.registers[y];return}this.registers[y]=b}evaluate(y){if(!y||!("register"in y))return y;let b=this;if("global"in y&&y.global)for(;b.parent;)b=b.parent;let E=1;"factor"in y&&y.factor!==1&&y.factor!==void 0&&(E=y.factor);const ee=b.getRegister(y.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=b.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?me(we({},re),{dimension:E*re.dimension}):"glue"in re?me(we({},re),{glue:me(we({},re.glue),{dimension:E*re.glue.dimension}),shrink:re.shrink?me(we({},re.shrink),{dimension:E*re.shrink.dimension}):void 0,grow:re.grow?me(we({},re.grow),{dimension:E*re.grow.dimension}):void 0}):y}toDimension(y){const b=this.evaluate(y);return b===void 0?null:"dimension"in b?b:"glue"in b?b.glue:"number"in b?{dimension:b.number}:null}toEm(y,b){if(y===null)return 0;const E=this.toDimension(y);return E===null?0:ac(E,b)/$l}toNumber(y){if(y===null)return null;const b=this.evaluate(y);return b===void 0?null:"number"in b?b.number:"dimension"in b?b.dimension:"glue"in b?b.glue.dimension:"string"in b?Number(b.string):null}toColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.colorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}toBackgroundColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.backgroundColorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}},sc=["body","above","below","superscript","subscript"];function il(a){return typeof a=="string"&&sc.includes(a)}function Dc(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var Vn=class Vl{constructor(y){var b,E,ee,re,ae,de;this.type=y.type,typeof y.value=="string"&&(this.value=y.value),this.command=(E=(b=y.command)!=null?b:this.value)!=null?E:"",this.mode=(ee=y.mode)!=null?ee:"math",y.isFunction&&(this.isFunction=!0),y.limits&&(this.subsupPlacement=y.limits),this.style=we({},y.style),this.displayContainsHighlight=(re=y.displayContainsHighlight)!=null?re:!1,this.captureSelection=(ae=y.captureSelection)!=null?ae:!1,this.skipBoundary=(de=y.skipBoundary)!=null?de:!1,y.verbatimLatex!==void 0&&y.verbatimLatex!==null&&(this.verbatimLatex=y.verbatimLatex),y.args&&(this.args=y.args),y.body&&(this.body=y.body),this._changeCounter=0}static createBox(y,b,E){var ee;if(!b)return null;const re=cf(b),ae=[];for(const ge of re){const be=ge[0].style,Se=uf(y,ge,{style:{color:be.color,backgroundColor:be.backgroundColor,fontSize:be.fontSize}});Se&&ae.push(Se)}if(ae.length===0)return null;const de=((ee=E==null?void 0:E.classes)!=null?ee:"").trim();return ae.length===1&&!de&&!(E!=null&&E.type)?ae[0].wrap(y):new Ir(ae,{classes:de,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return Ss.serialize(y,b)}static commonAncestor(y,b){if(y===b||y.parent===b.parent)return y.parent;const E=new WeakSet;let{parent:ee}=y;for(;ee;)E.add(ee),ee=ee.parent;for(ee=b.parent;ee;){if(E.has(ee))return ee;ee=ee.parent}console.assert(!!ee)}static fromJson(y){return typeof y=="string"?new Vl({type:"mord",value:y,mode:"math"}):new Vl(y)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const y={};if(this.type&&(y.type=this.type),this.mode!=="math"&&(y.mode=this.mode),this.command&&this.command!==this.value&&(y.command=this.command),this.value!==void 0&&(y.value=this.value),this.style&&Object.keys(this.style).length>0&&(y.style=we({},this.style)),this.verbatimLatex!==void 0&&(y.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(y.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(y.explicitSubsupPlacement=!0),this.isFunction&&(y.isFunction=!0),this.displayContainsHighlight&&(y.displayContainsHighlight=!0),this.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),this.skipBoundary&&(y.skipBoundary=!0),this.captureSelection&&(y.captureSelection=!0),this.args&&(y.args=ud(this.args)),this._branches)for(const b of Object.keys(this._branches))this._branches[b]&&(y[b]=this._branches[b].filter(E=>E.type!=="first").map(E=>E.toJson()));return y.type==="mord"&&Object.keys(y).length===2&&"value"in y?y.value:y}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(y){if(y){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:b}=this;for(;b;)b.parent||b._changeCounter++,"verbatimLatex"in b&&(b.verbatimLatex=void 0),b._children=void 0,b=b.parent}}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Kt(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?ya([uo(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?ya([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return Ss.serialize(this.body,me(we({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return Ss.serialize(this.above,y)}belowToLatex(y){return Ss.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=me(we({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=Ss.serialize(this.subscript,y);E.length===0?b+="_{}":E.length===1?/^[0-9]$/.test(E)?b+=`_${E}`:b+=`_{${E}}`:b+=`_{${E}}`}if(this.branch("superscript")!==void 0){const E=Ss.serialize(this.superscript,y);E.length===0?b+="^{}":E.length===1?E==="\u2032"?b+="^\\prime ":E==="\u2033"?b+="^\\doubleprime ":/^[0-9]$/.test(E)?b+=`^${E}`:b+=`^{${E}}`:b+=`^{${E}}`}return b}get treeDepth(){let y=1,b=this.parent;for(;b;)b=b.parent,y+=1;return y}get inCaptureSelection(){let y=this;for(;y;){if(y.captureSelection)return!0;y=y.parent}return!1}get parentPrompt(){let y=this.parent;for(;y;){if(y.type==="prompt"&&!y.captureSelection)return y;y=y.parent}return null}branch(y){if(il(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of sc)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(il(y)),il(y)?(this._branches?this._branches[y]||(this._branches[y]=[this.makeFirstAtom(y)]):this._branches={[y]:[this.makeFirstAtom(y)]},this.isDirty=!0,this._branches[y]):[]}get row(){return Dc(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Dc(this.parentBranch)?this.parentBranch[1]:-1}get body(){var y;return(y=this._branches)==null?void 0:y.body}set body(y){this.setChildren(y,"body")}get superscript(){var y;return(y=this._branches)==null?void 0:y.superscript}set superscript(y){this.setChildren(y,"superscript")}get subscript(){var y;return(y=this._branches)==null?void 0:y.subscript}set subscript(y){this.setChildren(y,"subscript")}get above(){var y;return(y=this._branches)==null?void 0:y.above}set above(y){this.setChildren(y,"above")}get below(){var y;return(y=this._branches)==null?void 0:y.below}set below(y){this.setChildren(y,"below")}get computedStyle(){var y,b;const E=typeof this.style.verbatimColor=="string",ee=typeof this.style.verbatimBackgroundColor=="string",re=we(we({},(b=(y=this.parent)==null?void 0:y.computedStyle)!=null?b:{}),this.style);return delete re.variant,delete re.variantStyle,ee||delete re.verbatimBackgroundColor,E||delete re.verbatimColor,re}applyStyle(y){this.isDirty=!0,this.style=we(we({},this.style),y),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 b of this.children)b.applyStyle(y)}getInitialBaseElement(){var y,b,E;return this.hasEmptyBranch("body")?this:(console.assert(((y=this.body)==null?void 0:y[0].type)==="first"),(E=(b=this.body[1])==null?void 0:b.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(y){const b=this.branch(y);return b?(console.assert(b.length>0),console.assert(b[0].type==="first"),b.length===1):!0}setChildren(y,b){var E;if(!y||(console.assert(il(b)),!il(b)))return;console.assert(((E=y[0])==null?void 0:E.type)!=="first");const ee=[this.makeFirstAtom(b),...y];this._branches?this._branches[b]=ee:this._branches={[b]:ee};for(const re of y)re.parent=this,re.parentBranch=b;this.isDirty=!0}makeFirstAtom(y){const b=new Vl({type:"first",mode:this.mode});return b.parent=this,b.parentBranch=y,b}addChild(y,b){console.assert(y.type!=="first"),this.createBranch(b).push(y),this.isDirty=!0,y.parent=this,y.parentBranch=b}addChildBefore(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b),0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildAfter(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildren(y,b){const E=this.createBranch(b);for(const ee of y)ee.parent=this,ee.parentBranch=b,E.push(ee);this.isDirty=!0}addChildrenAfter(y,b){console.assert(y.length===0||y[0].type!=="first"),console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,...y),this.isDirty=!0;for(const ee of y)ee.parent=this,ee.parentBranch=b.parentBranch;return y[y.length-1]}removeBranch(y){const b=this.branch(y);if(il(y)&&(this._branches[y]=void 0),!b)return[];for(const E of b)E.parent=void 0,E.parentBranch=void 0;return console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}removeChild(y){if(console.assert(y.parent===this),y.type==="first")return;const b=this.branch(y.parentBranch),E=b.indexOf(y);console.assert(E>=0),b.splice(E,1),this.isDirty=!0,y.parent=void 0,y.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:y}=this;return y[y.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 y=this.parent.branch(this.parentBranch);return y[y.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const y=this.parent.branch(this.parentBranch);return y[y.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:y}=this;return y[y.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const y=[];for(const b of sc)if(this._branches[b])for(const E of this._branches[b])y.push(...E.children),y.push(E);return this._children=y,y}render(y){if(this.type==="first"&&!y.atomIdsSettings)return null;const b=Kt(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new La({parent:y},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(y,b){var E;const ee=b.base,re=this.superscript,ae=this.subscript;if(!re&&!ae)return ee;let de=null,ge=null;const be=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let Se=0;if(re){const An=new La({parent:y,mathstyle:"superscript"});de=Vl.createBox(An,re),be||(Se=ee.height-y.metrics.supDrop*An.scalingFactor)}let $e=0;if(ae){const An=new La({parent:y,mathstyle:"subscript"});ge=Vl.createBox(An,ae),be||($e=ee.depth+y.metrics.subDrop*An.scalingFactor)}let Ye;y.isDisplayStyle?Ye=y.metrics.sup1:y.isCramped?Ye=y.metrics.sup3:Ye=y.metrics.sup2;const xt=.5/$l/y.scalingFactor;let At=null;if(ge&&de){Se=Math.max(Se,Ye,de.depth+.25*y.metrics.xHeight),$e=Math.max($e,y.metrics.sub2);const An=y.metrics.defaultRuleThickness;if(Se-de.depth-(ge.height-$e)<4*An){$e=4*An-(Se-de.depth)+ge.height;const Mn=.8*y.metrics.xHeight-(Se-de.depth);Mn>0&&(Se+=Mn,$e-=Mn)}const kr=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;At=new Qa({individualShift:[{box:ge,shift:$e,marginLeft:kr},{box:de,shift:-Se}]}).wrap(y)}else ge&&!de?($e=Math.max($e,y.metrics.sub1,ge.height-.8*el),At=new Qa({shift:$e,children:[{box:ge,marginRight:xt,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!ge&&de&&(Se=Math.max(Se,Ye,de.depth+.25*el),At=new Qa({shift:-Se,children:[{box:de,marginRight:xt}]}));return new Ir([ee,new Ir(At,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?Vl.createBox(new La({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?Vl.createBox(new La({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?b.base.wrap(y):nh(y,me(we({},b),{above:E,below:ee}))}bind(y,b){if(!b||y.isPhantom||this.value==="\u200B")return b;let E=this.parent;for(;E&&!E.captureSelection;)E=E.parent;return E!=null&&E.captureSelection||(this.id||(this.id=y.makeID()),b.atomID=this.id),b}createBox(y,b){var E,ee,re,ae;const de=(E=this.value)!=null?E:this.body,ge=(ee=b==null?void 0:b.boxType)!=null?ee:id(this.type);let be=(re=b==null?void 0:b.classes)!=null?re:"";this.mode==="text"&&(be+=" ML__text");const Se=typeof de=="string"||de===void 0?new Ir(de!=null?de:null,{type:ge,isSelected:this.isSelected,mode:this.mode,maxFontSize:y.scalingFactor,style:me(we({variant:"normal"},this.style),{fontSize:Math.max(1,y.size+y.mathstyle.sizeDelta)}),letterShapeStyle:y.letterShapeStyle,classes:be}):(ae=Vl.createBox(y,de,{type:ge,classes:be}))!=null?ae:new Ir(null);return y.isTight&&(Se.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(Se.italic=0),Se.right=Se.italic,this.bind(y,Se),this.caret&&!this.superscript&&!this.subscript&&(Se.caret=this.caret),Se}isDigit(){var y;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((y=this.body)==null?void 0:y.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var y;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((y=this.body)==null?void 0:y.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function cf(a){let y;const b=[];let E=[];for(const ee of a)if(!y&&!ee.style)E.push(ee);else{const re=ee.computedStyle;y&&re.color===y.color&&re.backgroundColor===y.backgroundColor&&re.fontSize===y.fontSize?E.push(ee):(E.length>0&&b.push(E),E=[ee],y=re)}return E.length>0&&b.push(E),b}function uf(a,y,b){var E,ee,re,ae,de;if(!y||y.length===0)return null;const ge=new La({parent:a},b.style),be=!((E=ge.atomIdsSettings)!=null&&E.groupNumbers);let Se=[];if(y.length===1){const Ye=y[0],xt=Ye.render(ge);xt&&(be&&Ye.isSelected&&xt.selected(!0),Se=[xt])}else{let Ye="",xt=!0;for(const At of y){(ee=ge.atomIdsSettings)!=null&&ee.groupNumbers&&Ye&&(xt&&At.isDigit()||!xt&&cd(At))&&(ge.atomIdsSettings.overrideID=Ye);const An=At.render(ge);ge.atomIdsSettings&&(ge.atomIdsSettings.overrideID=void 0),An&&((re=ge.atomIdsSettings)!=null&&re.groupNumbers&&((At.isDigit()||cd(At))&&(!Ye||xt!==At.isDigit())&&(xt=At.isDigit(),Ye=(ae=At.id)!=null?ae:""),Ye&&(!(At.isDigit()||cd(At))||!At.hasEmptyBranch("superscript")||!At.hasEmptyBranch("subscript"))&&(Ye="")),be&&At.isSelected&&An.selected(!0),Se.push(An))}}if(Se.length===0)return null;const $e=new Ir(Se,me(we({isTight:ge.isTight},b),{type:(de=b.type)!=null?de:"lift"}));return $e.isSelected=Se.every(Ye=>Ye.isSelected),$e.wrap(ge)}function cd(a){return a.mode==="text"}function ud(a){return a.map(y=>y===null?"<null>":Array.isArray(y)&&y[0]instanceof Vn?{atoms:y.map(b=>b.toJson())}:typeof y=="object"&&"group"in y?{group:y.group.map(b=>b.toJson())}:y)}var al=class kp extends Vn{constructor(y,b,E){super({type:"text",command:y,mode:"text",displayContainsHighlight:!0}),this.value=b,this.verbatimLatex=b,this.applyStyle(E)}static fromJson(y){return new kp(y.command,y.value,y.style)}render(y){const b=this.createBox(y);return this.caret&&(b.caret=this.caret),b}_serialize(y){var b;return(b=this.verbatimLatex)!=null?b:Gn("text",this.value.codePointAt(0))}};function Pc(a,y){if(a.direction===y.direction){const b=a.ranges.length;if(y.ranges.length===b){let E=0;for(;E<b&&ih(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function ih(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function Vo(a){let y=1/0,b=-1/0;for(const E of a.ranges)y=Math.min(y,E[0],E[1]),b=Math.max(b,E[0],E[1]);return[y,b]}function gl(a){return typeof a=="number"&&!Number.isNaN(a)}function xu(a){return Array.isArray(a)&&a.length===2}function wu(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function ah(a,y){const b=a.at(y);let E;if(b){E=b.mode;let ee=b.parent;for(;!E&ⅇ)ee&&(E=ee.mode),ee=ee.parent}return E}function df(a,y){if(!y)return"";if(typeof y=="string")return y;if(!a||y.after===void 0)return y.value;let b=!1,E=!1,ee=!1,re=!1,ae=!1,de=!1,ge=!1,be=!1,Se=!1,$e=!1,Ye=!1,xt=!1,At=!1,An=!1,kr=!1,Mn=a[0],or=0;for(;Mn!=null&&Mn.type&&/^(subsup|placeholder)$/.test(Mn.type);)or+=1,Mn=a[or];return b=!Mn||Mn.type==="first",Mn&&(An=Mn.mode==="text",E=!An&&Mn.type==="mord"&&pe.test(Mn.value),ee=!An&&Mn.type==="mord"&&/\d+$/.test(Mn.value),re=!An&&Mn.isFunction,ae=Mn.type==="genfrac",de=Mn.type==="surd",ge=Mn.type==="mbin",be=Mn.type==="mrel",Se=Mn.type==="mop"||Mn.type==="operator"||Mn.type==="extensible-symbol",$e=Mn.type==="mpunct"||Mn.type==="minner",Ye=Mn.type==="array",xt=Mn.type==="mopen",At=Mn.type==="mclose"||Mn.type==="leftright",kr=Mn.type==="space"),y.after.includes("nothing")&&b||y.after.includes("letter")&&E||y.after.includes("digit")&&ee||y.after.includes("function")&&re||y.after.includes("frac")&&ae||y.after.includes("surd")&&de||y.after.includes("binop")&&ge||y.after.includes("relop")&&be||y.after.includes("operator")&&Se||y.after.includes("punct")&&$e||y.after.includes("array")&&Ye||y.after.includes("openfence")&&xt||y.after.includes("closefence")&&At||y.after.includes("text")&&An||y.after.includes("space")&&kr?y.value:""}function dd(a,y,b){return b?df(a,b[y]):""}var ff={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\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 Oc(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=pf(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",ts(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function ts(a,y){var b,E,ee;if(!a)return"";let re=!1,ae;const de=(b=y.inlineShortcuts)!=null?b:ff;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(ae=vl(a.slice(1),{inlineShortcuts:de,noWrap:!0}),a=a[0]+"{"+ae.match+"}",a+=ts(ae.rest,y),re=!0),re||(ae=a.match(/^(sqrt|\u221A)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:de,noWrap:!0}),a="\\sqrt{"+((E=ae.match)!=null?E:"\\placeholder{}")+"}",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^(\\cbrt|\u221B)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:de,noWrap:!0}),a="\\sqrt[3]{"+((ee=ae.match)!=null?ee:"\\placeholder{}")+"}",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^abs(.*)/),ae&&(ae=vl(ae[1],{inlineShortcuts:de,noWrap:!0}),a="\\left|"+ae.match+"\\right|",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^["”“](.*?)["”“](.*)/),ae&&(a="\\text{"+ae[1]+"}",a+=ts(ae[2],y),re=!0)),re||(ae=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),ae&&(a=hf(ae[1],de),a+=ts(ae[2],y),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(ae=vl(a.slice(1),{inlineShortcuts:de,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+ae.match+"\\right)":a[0]+ae.match,a+=ts(ae.rest,y),re=!0),re||(ae=a.match(/^([a-zA-Z]+)(.*)/),ae&&(a=hf(ae[1],de),a+=ts(ae[2],y),re=!0)),!re)if(ae=vl(a,{inlineShortcuts:de,noWrap:!0}),ae.match&&ae.rest[0]==="/"){const ge=vl(ae.rest.slice(1),{inlineShortcuts:de,noWrap:!0});ge.match&&(a="\\frac{"+ae.match+"}{"+ge.match+"}"+ts(ge.rest,y)),re=!0}else ae.match&&(a=a.startsWith("(")?"\\left("+ae.match+"\\right)"+ts(ae.rest,y):ae.match+ts(ae.rest,y),re=!0);return re||(ae=a.match(/^(\s+)(.*)$/),ae&&(a=" "+ts(ae[2],y),re=!0)),a}function vl(a,y){let b="";a=a.trim();let E=a,ee=a.charAt(0),re={"(":")","{":"}","[":"]"}[ee];if(re){let ae=1,de=1;for(;de<a.length&&ae>0;)a[de]===ee&&ae++,a[de]===re&&ae--,de++;ae===0?(y.noWrap&&ee==="("?b=ts(a.substring(1,de-1),y):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),b="\\left"+ee+ts(a.substring(1,de-1),y)+"\\right"+re),E=a.slice(Math.max(0,de))):(b=a.substring(1,de),E="")}else{let ae=a.match(/^([a-zA-Z]+)/);if(ae){let de=dd(null,a,y.inlineShortcuts);if(de)return de=de.replace("_{#?}",""),de=de.replace("^{#?}",""),{match:de,rest:a.slice(de.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),b=ae[1]))}return{match:b,rest:E}}function hf(a,y){let b=dd(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var fd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function yl(a){const y=a.trim();for(const b of fd)if(y.startsWith(b[0])&&y.endsWith(b[1]))return[!0,y.substring(b[0].length,y.length-b[1].length)];return[!1,a]}function pf(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=yl(a),y?["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 Su="$$",oh="$$",sh=(a,y,b)=>(fd.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${Su} ${y} ${oh}`),y),mf=class Qf{constructor(y){Qf._modes[y]=this}static onPaste(y,b,E){var ee;if(!b.contentEditable&&b.userSelect==="none")return b.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=b.host)!=null&&ee.dispatchEvent(re)?Qf._modes[y].onPaste(b,E):!1}static copyToClipboard(y,b){if(!y.contentEditable&&y.userSelect==="none"){y.model.announce("plonk");return}const E=y.model,ee=E.selectionIsCollapsed?[0,E.lastOffset]:Vo(E.selection),re=E.getValue(ee,b);navigator.clipboard.writeText(re).then(()=>{},()=>y.model.announce("plonk"))}static onCopy(y,b){var E;if(!b.clipboardData)return;if(!y.contentEditable&&y.userSelect==="none"){y.model.announce("plonk");return}const ee=y.model,re=ee.selectionIsCollapsed?[0,ee.lastOffset]:Vo(ee.selection);let ae=ee.getAtoms(re);if(ae.every(de=>de.mode==="text"||!de.mode))b.clipboardData.setData("text/plain",ae.filter(de=>de instanceof al).map(de=>de.value).join(""));else if(ae.every(de=>de.mode==="latex"))b.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(de=>{var ge;return(ge=de.value)!=null?ge:""}).join(""));else{let de;ae.length===1&&ae[0].verbatimLatex!==void 0?de=ae[0].verbatimLatex:de=ee.getValue(re,"latex-expanded"),b.clipboardData.setData("application/x-latex",de);try{b.clipboardData.setData("text/plain",y.options.onExport(y,de,re))}catch(ge){}if(ae.length===1){const ge=ae[0];(ge.type==="root"||ge.type==="group")&&(ae=ge.body.filter(be=>be.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(ae.map(ge=>ge.toJson())))}catch(ge){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const ge=window.MathfieldElement.computeEngine;if(ge)try{const be=ge.jsonSerializationOptions;ge.jsonSerializationOptions={metadata:["latex"]};const Se=ge.parse(ee.getValue(re,"latex-unstyled"));ge.jsonSerializationOptions=be;const $e=JSON.stringify(Se.json);$e&&b.clipboardData.setData("application/json",$e)}catch(be){}}}b.preventDefault()}static insert(y,b,E={}){var ee;const re=E.mode==="auto"?y.mode:(ee=E.mode)!=null?ee:y.mode;return Qf._modes[re].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};mf._modes={};var ia=mf,lh=[{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","^"]}],hd={"\\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 Rs(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function Ns(a){var y,b;return(b=(y=a.querySelector(".ML__caret"))!=null?y:a.querySelector(".ML__text-caret"))!=null?b:a.querySelector(".ML__latex-caret")}function bl(a){const y=Ns(a);if(!y)return null;const b=y.getBoundingClientRect();return{x:b.right,y:b.bottom,height:b.height}}function pd(a){var y;if(!a.parent)return"root";let b=(y=a.parent.id)!=null?y:"";return b+=typeof a.parentBranch=="string"?"-"+a.parentBranch:`-${a.parentBranch[0]}/${a.parentBranch[0]}`,b}function md(a,y,b){if(!y)return null;const E=a.field.getBoundingClientRect(),ee=y.right-y.left,re=y.bottom-y.top,ae=Math.ceil(y.left-E.left+a.field.scrollLeft*b),de=Math.ceil(y.top-E.top);return{left:ae,right:ae+ee,top:de,bottom:de+re}}function gd(a){const y=a.getBoundingClientRect(),b=parseInt(getComputedStyle(a).marginRight),E={top:y.top-1,bottom:y.bottom,left:y.left,right:y.right-1+b};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=gd(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 lc(a,y){var b,E;if(!y.id)return null;let ee=(E=(b=a.atomBoundsCache)==null?void 0:b.get(y.id))!=null?E:null;if(ee!==null)return ee;const re=a.field.querySelector(`[data-atom-id="${y.id}"]`);return ee=re?gd(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(y.id,ee):a.atomBoundsCache.delete(y.id)),ee!=null?ee:null}function gf(a,y,b){const E=new Map;for(const ee of a.model.getAtoms(y,{includeChildren:!0})){if(b!=null&&b.excludeAtomsWithBackground&&ee.style.backgroundColor)continue;const re=a.field,ae=re.offsetWidth;let ge=Math.floor(re.getBoundingClientRect().width)/ae;ge=isNaN(ge)?1:ge;const be=md(a,lc(a,ee),ge);if(be){const Se=pd(ee);if(E.has(Se)){const $e=E.get(Se);E.set(Se,{left:Math.min($e.left,be.left),right:Math.max($e.right,be.right),top:Math.min($e.top,be.top),bottom:Math.max($e.bottom,be.bottom)})}else E.set(Se,be)}}return[...E.values()]}function vd(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...gf(a,E,y)),[])}function yd(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function Cu(a){let y=0,b=0;const E=a.offsetWidth,ee=a.offsetHeight;for(;a instanceof HTMLElement;)y+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return new DOMRect(b,y,E,ee)}var vf=`@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;
|
|
|
}
|
|
|
`,Ya=`.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);
|
|
|
}
|
|
|
`,yf=`#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);
|
|
|
}
|
|
|
`,ch=`/* 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;
|
|
|
}
|
|
|
`,cc=`/* 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);*/
|
|
|
}
|
|
|
`,uh=`.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));
|
|
|
}
|
|
|
`,Mu=`: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;
|
|
|
}
|
|
|
`,dh=`.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;
|
|
|
}
|
|
|
`,eo;function Hl(a){let y="";switch(a){case"mathfield-element":y=`
|
|
|
: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":y=Ya;break;case"mathfield":y=vf;break;case"environment-popover":y=yf;break;case"suggestion-popover":y=ch;break;case"keystroke-caption":y=cc;break;case"virtual-keyboard":y=uh;break;case"ui":y=Mu;break;case"menu":y=dh;break;default:debugger}return y}function uc(a){return eo||(eo={}),eo[a]||(eo[a]=new CSSStyleSheet,eo[a].replaceSync(Hl(a))),eo[a]}var ol;function _s(a){var y;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${a}`))return;const b=window.document.createElement("style");b.id=`mathlive-style-${a}`,b.append(window.document.createTextNode(Hl(a))),window.document.head.appendChild(b);return}if(ol||(ol={}),((y=ol[a])!=null?y:0)!==0)ol[a]+=1;else{const b=uc(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],ol[a]=1}}function x(a){if("adoptedStyleSheets"in document&&ol!=null&&ol[a]&&(ol[a]-=1,ol[a]<=0)){const y=eo[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class _p extends Vn{constructor(y){var b;super(me(we({},y),{type:"accent",body:(b=y.body)!=null?b:void 0})),y.accentChar?this.accent=y.accentChar:this.svgAccent=y==null?void 0:y.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(y){return new _p(y)}toJson(){return me(we({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new La({parent:y,mathstyle:"cramp"},this.style),ee=(b=Vn.createBox(E,this.body))!=null?b:new Ir("\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,el),de;if(this.svgAccent)de=Os(this.svgAccent),ae=E.metrics.bigOpSpacing1-ae;else if(this.accent){const be=new Ir(this.accent,{fontFamily:"Main-Regular"});be.italic=0;const Se=this.accent===8407?" ML__accent-vec":"";de=new Ir(new Ir(be),{classes:"ML__accent-body"+Se})}de=new Qa({shift:0,children:[{box:new Ir(ee)},-ae,{box:de,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const ge=new Ir(de,{type:"lift"});return this.caret&&(ge.caret=this.caret),this.bind(E,ge.wrap(E)),this.attachSupsub(E,{base:ge})}},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,y])=>[y,a]));function ie(a){var y;return(y={"[":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?y:a.codePointAt(0)}function ce(a,y,b,E){var ee;const ae=new Ir(ie(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((ee=E.classes)!=null?ee:"")}).wrap(y);return b&&ae.setTop((1-y.scalingFactor)*os),ae}function ye(a,y,b,E,ee){var re,ae;const de=new La({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),ge=new Ir(ie(a),{fontFamily:`Size${y}-Regular`,isSelected:ee.isSelected,classes:((re=ee.classes)!=null?re:"")+` ML__delim-size${y}`,type:(ae=ee.type)!=null?ae:"ignore"}).wrap(de);return b&&ge.setTop((1-de.scalingFactor)*os),ge}function Me(a,y,b,E,ee){var re;let ae,de,ge,be;ae=ge=be=ie(a),de=null;let Se="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?ge=ae=be=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?ge=ae=be=8741:a==="\\uparrow"?ge=be=9168:a==="\\Uparrow"?ge=be=8214:a==="\\downarrow"?ae=ge=9168:a==="\\Downarrow"?ae=ge=8214:a==="\\updownarrow"?(ae=8593,ge=9168,be=8595):a==="\\Updownarrow"?(ae=8657,ge=8214,be=8659):a==="["||a==="\\lbrack"?(ae=9121,ge=9122,be=9123,Se="Size4-Regular"):a==="]"||a==="\\rbrack"?(ae=9124,ge=9125,be=9126,Se="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(ge=ae=9122,be=9123,Se="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(ae=9121,ge=be=9122,Se="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(ge=ae=9125,be=9126,Se="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(ae=9124,ge=be=9125,Se="Size4-Regular"):a==="("||a==="\\lparen"?(ae=9115,ge=9116,be=9117,Se="Size4-Regular"):a===")"||a==="\\rparen"?(ae=9118,ge=9119,be=9120,Se="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(ae=9127,de=9128,be=9129,ge=9130,Se="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(ae=9131,de=9132,be=9133,ge=9130,Se="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(ae=9127,be=9129,ge=9130,Se="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(ae=9131,be=9133,ge=9130,Se="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(ae=9127,be=9133,ge=9130,Se="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(ae=9131,be=9129,ge=9130,Se="Size4-Regular"):a==="\\surd"?(ae=57345,be=9143,ge=57344,Se="Size4-Regular"):a==="\\ulcorner"?(ae=9484,ge=be=32):a==="\\urcorner"?(ae=9488,ge=be=32):a==="\\llcorner"?(be=9492,ge=ae=32):a==="\\lrcorner"&&(ae=9496,ge=ae=32);const $e=tl(ae,Se),Ye=$e.height+$e.depth,xt=tl(ge,Se),At=xt.height+xt.depth,An=tl(be,Se),kr=An.height+An.depth;let Mn=0,or=1;if(de!==null){const qo=tl(de,Se);Mn=qo.height+qo.depth,or=2}const Dr=Ye+kr+Mn,pr=Math.max(0,Math.ceil((y-Dr)/(or*At))),di=Dr+pr*or*At;let Pi=os;b&&(Pi=Pi*E.scalingFactor);const bi=di/2-Pi,Pa=.008,qa=[];qa.push({box:new Ir(be,{fontFamily:Se})}),qa.push(-Pa);const Kr=new Ir(ge,{fontFamily:Se});if(de===null)for(let qo=0;qo<pr;qo++)qa.push({box:Kr});else{for(let qo=0;qo<pr;qo++)qa.push({box:Kr});qa.push(-Pa),qa.push({box:new Ir(de,{fontFamily:Se})}),qa.push(-Pa);for(let qo=0;qo<pr;qo++)qa.push({box:Kr})}qa.push(-Pa),qa.push({box:new Ir(ae,{fontFamily:Se})});let Fs="";Se==="Size1-Regular"?Fs=" delim-size1":Se==="Size4-Regular"&&(Fs=" delim-size4");const _l=new Qa({bottom:bi,children:qa},{classes:Fs});return new Ir(_l,me(we({},ee!=null?ee:{}),{classes:((re=ee==null?void 0:ee.classes)!=null?re:"")+" ML__delim-mult"}))}var Pe=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),Ne=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),bt=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),It=[0,1.2,1.8,2.4,3];function hn(a,y,b,E){return a===void 0||a==="."?oi(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),Pe.has(a)||bt.has(a)?ye(a,y,!1,b,E):Ne.has(a)?Me(a,It[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var rn=[{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}],Qn=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],vr=[{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 Xr(a,y,b,E){const ee={"-4":0,"-3":1,0:2}[E.mathstyle.sizeDelta];for(let re=ee;re<b.length&&b[re].type!=="stack";re++){const ae=tl(a,Br(b[re]));if(ae.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let de=ae.height+ae.depth;if(b[re].type==="small"&&(b[re].mathstyle==="scriptscriptstyle"?de*=Math.max(pu[Math.max(1,E.size-2)],E.minFontScale):b[re].mathstyle==="scriptstyle"&&(de*=Math.max(pu[Math.max(1,E.size-1)],E.minFontScale))),de>y)return b[re]}return b[b.length-1]}function ai(a,y,b,E,ee,re){if(!y||y.length===0||y===".")return oi(ee);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let ae;bt.has(y)?ae=rn:Pe.has(y)?ae=vr:ae=Qn;const de=Xr(ie(y),b,ae,ee),ge=new La({parent:ee,mathstyle:de.mathstyle},re==null?void 0:re.style);return de.type==="small"?ce(y,ge,E,me(we({},re),{type:a})):de.type==="large"?ye(y,de.size,E,ge,me(we({},re),{type:a})):(console.assert(de.type==="stack"),Me(y,b,E,ge,me(we({},re),{type:a})))}function Zr(a,y,b,E,ee,re){if(y===".")return oi(ee,re==null?void 0:re.classes);const ae=os*ee.scalingFactor,de=901,ge=5/$l,be=Math.max(b-ae,E+ae),Se=Math.max(be/500*de,2*be-ge);return ai(a,y,Se,!0,ee,re)}function oi(a,y){const b=new Ir(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new La({parent:a,mathstyle:"textstyle"}))}var Ki=class Lp extends Vn{constructor(y){var b;super({type:"placeholder",command:"\\placeholder",mode:(b=y==null?void 0:y.mode)!=null?b:"math",style:y==null?void 0:y.style}),this.captureSelection=!0}static fromJson(y){return new Lp(y)}toJson(){return super.toJson()}render(y){let b;return this.value=y.placeholderSymbol,typeof y.renderPlaceholder=="function"?b=y.renderPlaceholder(y):b=this.createBox(y),this.caret&&(b.classes+=" ML__placeholder-selected"),b}_serialize(y){return y.skipPlaceholders?"":"\\placeholder{}"}},ji=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],ba=["cases","dcases","rcases"],to=["align","align*","aligned","gather","gathered","split"],Wo=["array","subequations","eqnarray"];function bo(a){return Wo.concat(to).concat(ba).concat(ji).includes(a)}function us(a){return ji.includes(a)}function ds(a){return ba.includes(a)}function Do(a){return to.includes(a)}function fs(a,y,b){let E=0;for(const be of b)"align"in be&&(E+=1);let ee=0;const re=[];for(const be of y){let Se=0;for(ee=Math.max(ee,Math.min(be.length,E));Se<be.length;){const $e=[],Ye=Math.min(be.length,Se+E);for(;Se<Ye;){const xt=be[Se];xt.length===0?$e.push([new Vn({type:"first",mode:a.mode})]):xt[0].type!=="first"?$e.push([new Vn({type:"first",mode:a.mode}),...xt]):(console.assert(!xt.slice(1).some(At=>At.type==="first")),$e.push(xt)),Se+=1}re.push($e)}}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 be of re){if(be.length!==ee)for(let Se=be.length;Se<ee;Se++)be.push([new Vn({type:"first",mode:a.mode}),new Ki]);ae.push(be)}let de=0,ge=0;for(const be of ae){ge=0;for(const Se of be){for(const $e of Se)$e.parent=a,$e.parentBranch=[de,ge];ge+=1}de+=1}return a.isDirty=!0,ae}var sa=class Ap extends Vn{constructor(y,b,E,ee={}){var re;super({type:"array"}),this.environmentName=y,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=fs(this,b,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(y){return new Ap(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=me(we({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(b=>b.map(E=>E.map(ee=>ee.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(y.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(y.arraycolsep=this.arraycolsep),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),y}branch(y){var b;if(Dc(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return Dc(y)?(this.isDirty=!0,(b=this.branch(y))!=null?b:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(y=>!!y.align).length}removeBranch(y){if(il(y))return super.removeBranch(y);const b=this.branch(y);return this.array[y[0]][y[1]]=void 0,b.forEach(E=>{E.parent=void 0,E.parentBranch=void 0}),console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}get hasChildren(){return this.children.length>0}get children(){const y=[];for(const b of this.array)for(const E of b)if(E)for(const ee of E)y.push(...ee.children),y.push(ee);return[...y,...super.children]}render(y){var b,E,ee,re,ae,de;const ge=new La({parent:y,mathstyle:this.mathstyleName},this.style),be=ge.getRegisterAsEm("arrayrulewidth"),Se=ge.getRegisterAsEm("arraycolsep"),$e=ge.getRegisterAsEm("doublerulesep"),Ye=(E=(b=this.arraystretch)!=null?b:ge.getRegisterAsNumber("arraystretch"))!=null?E:1;let xt=typeof this.arraycolsep=="number"?this.arraycolsep:Se;this.colSeparationType==="small"&&(xt=.2778*(new La({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const At=Ye*hu,An=.7*At,kr=.3*At;let Mn=0;const or=[];let Dr=0;const pr=this.array.length;for(let ro=0;ro<pr;++ro){const Lo=this.array[ro];Dr=Math.max(Dr,Lo.length);const Jo=new La({parent:ge,mathstyle:this.mathstyleName},this.style);let Ll=An/Jo.scalingFactor,Al=kr/Jo.scalingFactor;const Tl={cells:[],height:0,depth:0,pos:0};for(const cl of Lo){const e0=(ee=Vn.createBox(Jo,cl,{type:"ignore"}))!=null?ee:new Ir(null,{type:"ignore"});Al=Math.max(Al,e0.depth),Ll=Math.max(Ll,e0.height),Tl.cells.push(e0)}let Il=(re=sd(this.rowGaps[ro]))!=null?re:0;Il>0&&(Il+=kr,Al=Math.max(Al,Il),Il=0),ro<pr-1&&!us(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Al+=ge.getRegisterAsEm("jot")),Tl.height=Ll,Tl.depth=Al,Mn+=Ll,Tl.pos=Mn,Mn+=Al+Il,or.push(Tl)}const di=Mn/2+os,Pi=[];for(let ro=0;ro<Dr;ro++){const Lo=[];for(const Jo of or){const Ll=Jo.cells[ro];Ll.depth=Jo.depth,Ll.height=Jo.height,Lo.push({box:Ll,shift:Jo.pos-di})}Lo.length>0&&Pi.push(new Qa({individualShift:Lo}))}const bi=[];let Pa=!1,qa=!1,Kr=0,Fs=!this.leftDelim;const{colFormat:_l}=this;for(const ro of _l){if("align"in ro&&Kr>=Pi.length)break;if("align"in ro)Pa?bi.push(xo(2*xt)):(qa||Fs)&&bi.push(xo(xt)),bi.push(new Ir(Pi[Kr],{classes:"col-align-"+ro.align})),Kr++,Pa=!0,qa=!1,Fs=!1;else if("gap"in ro){if(typeof ro.gap=="number")bi.push(xo(ro.gap));else{const Lo=Co(y,or,di,ro.gap);Lo&&bi.push(Lo)}Pa=!1,qa=!1,Fs=!1}else if("separator"in ro){const Lo=new Ir(null,{classes:"vertical-separator"});Lo.height=Mn,Lo.setStyle("height",Mn,"em"),Lo.setStyle("border-right",`${be}em ${ro.separator} currentColor`),Lo.setStyle("vertical-align",-(Mn-di),"em");let Jo=0;qa?Jo=$e-be:Pa&&(Jo=xt-be),Lo.left=Jo,bi.push(Lo),Pa=!1,qa=!0,Fs=!1}}Pa&&!this.rightDelim&&bi.push(xo(xt));const Xs=new Ir(bi,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Xs.caret=this.caret),this.bind(y,Xs);const qo=Xs.height,zs=Xs.depth,Ms=this.bind(y,new Ir([this.bind(y,Zr("open",(ae=this.leftDelim)!=null?ae:".",qo,zs,ge,{isSelected:this.isSelected})),Xs,this.bind(y,Zr("close",(de=this.rightDelim)!=null?de:".",qo,zs,ge,{isSelected:this.isSelected}))],{type:"ord"}));return Ms?(Ms.setStyle("display","inline-block"),this.caret&&(Ms.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:Ms}))):null}_serialize(y){var b;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(Vn.serialize(this.array[ee][re],y));if(ee<this.array.length-1){const re=this.rowGaps[ee];re!=null&&re.dimension?E.push(`\\\\[${re.dimension} ${(b=re.unit)!=null?b:"pt"}] `):E.push("\\\\ ")}}return this.environmentName==="lines"?E.push("}"):E.push(`\\end{${this.environmentName}}`),ya(E)}getCell(y,b){return this.array[y][b]}setCell(y,b,E){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[y][b]!==void 0);for(const re of this.array[y][b])re.parent=void 0,re.parentBranch=void 0;let ee=E;(E.length===0||E[0].type!=="first")&&(ee=[new Vn({type:"first",mode:this.mode}),...E]),this.array[y][b]=ee;for(const re of ee)re.parent=this,re.parentBranch=[y,b];this.isDirty=!0}addRowBefore(y){console.assert(this.type==="array"&&Array.isArray(this.array));const b=[];for(let E=0;E<this.colCount;E++)b.push(So(this));this.array.splice(y,0,b);for(let E=y;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(y){console.assert(this.type==="array"&&Array.isArray(this.array));const b=[];for(let E=0;E<this.colCount;E++)b.push(So(this));this.array.splice(y+1,0,b);for(let E=y+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(y){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>y);const b=this.array.splice(y,1);for(const E of b)for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0;for(let E=y;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(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y,0,So(this));for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}addColumnAfter(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y+1,0,So(this));for(let b=0;b<this.rowCount;b++)for(let E=y+1;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(y){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>y);for(const b of this.array){const E=b.splice(y,1);for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0}for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}get cells(){const y=[];for(const b of this.array)for(const E of b)E&&y.push(E.filter(ee=>ee.type!=="first"));return y}};function So(a){const y=new Vn({type:"first",mode:a.mode});y.parent=a;const b=new Ki;return b.parent=a,[y,b]}function xo(a){const y=new Ir(null,{classes:"arraycolsep"});return y.width=a,y}function Co(a,y,b,E){if(!E)return null;const ee=[];for(const re of y){const ae=Vn.createBox(a,E,{type:"ignore"});ae&&(ae.depth=re.depth,ae.height=re.height,ee.push({box:ae,shift:re.pos-b}))}return new Qa({individualShift:ee}).wrap(a)}var ko=class Tp extends Vn{constructor(y){super({mode:y.mode,command:y.command,style:y.style,body:y.body,type:"box"}),this.framecolor=y.framecolor,this.backgroundcolor=y.backgroundcolor,this.padding=y.padding,this.offset=y.offset,this.border=y.border}static fromJson(y){return new Tp(y)}toJson(){return me(we({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(y){var b,E,ee,re;const ae=Vn.createBox(y,this.body,{type:"lift"});if(!ae)return null;const de=y.toEm((b=this.offset)!=null?b:{dimension:0});ae.depth+=de,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 ge=new La({parent:y},this.style),be=ge.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),Se=new Ir(null,{classes:"ML__box"});Se.height=ae.height+be,Se.depth=ae.depth+be,Se.setStyle("box-sizing","border-box"),Se.setStyle("position","absolute"),Se.setStyle("top",-be+.3,"em"),Se.setStyle("left",0),Se.setStyle("height",Se.height+Se.depth,"em"),Se.setStyle("width","100%"),this.backgroundcolor&&Se.setStyle("background-color",(ee=ge.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&Se.setStyle("border",`${ge.getRegisterAsEm("fboxrule",2)}em solid ${(re=ge.toColor(this.framecolor))!=null?re:"black"}`),this.border&&Se.setStyle("border",this.border);const $e=new Ir([Se,ae],{type:"lift"});return $e.setStyle("display","inline-block"),$e.setStyle("position","relative"),$e.setStyle("line-height",0),$e.height=ae.height+be+(de>0?de:0),$e.depth=ae.depth+be+(de<0?-de:0),$e.setStyle("padding-left",be,"em"),$e.setStyle("padding-right",be,"em"),$e.setStyle("height",Math.floor(100*(ae.height+ae.depth+2*be+Math.abs(de)))/100,"em"),$e.setStyle("margin-top",-be,"em"),$e.setStyle("top",Math.floor(100*(ae.depth-ae.height+2*be-de))/100,"em"),$e.setStyle("vertical-align",Math.floor(100*(ae.depth+2*be))/100,"em"),this.caret&&($e.caret=this.caret),this.attachSupsub(y,{base:$e})}_serialize(y){return y.skipStyles?ya([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},Wl=class Ip extends Vn{constructor(y,b){var E;super({type:"composition",mode:(E=b==null?void 0:b.mode)!=null?E:"math",value:y})}static fromJson(y){return new Ip(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new Ir(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},ys=class Dp extends Vn{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new Dp(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},Go=class Pp extends Vn{constructor(y,b,E){super({type:"group",mode:b,style:E}),this.body=y,this.boxType=y.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,y&&y.length===1&&y[0].command===","&&(this.captureSelection=!0)}static fromJson(y){return new Pp(y.body,y.mode,y.style)}render(y){const b=Vn.createBox(y,this.body,{type:this.boxType});return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Kt(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},Wa=class Op extends Vn{constructor(y,b,E){super({type:"leftright",style:E.style,displayContainsHighlight:!0}),this.variant=y,this.body=b,this.leftDelim=E.leftDelim,this.rightDelim=E.rightDelim}static fromJson(y){var b;return new Op((b=y.variant)!=null?b:"",y.body,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),y}_serialize(y){var b,E;const ee=this.matchingRightDelim();return this.variant==="left...right"?ya(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",ee]):this.variant==="mleft...mright"?ya(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",ee]):ya([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(y),ee])}matchingRightDelim(){var y,b;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const E=(y=this.leftDelim)!=null?y:".";return(b=ne[E])!=null?b:E}render(y){var b,E;const ee=new La({parent:y},this.style);console.assert(this.body!==void 0);const re=new La({parent:y,mathstyle:"textstyle"},this.style),ae=(b=Vn.createBox(ee,this.body,{type:"inner"}))!=null?b:new Ir(null,{type:"inner"}),de=ae.height/re.scalingFactor,ge=ae.depth/re.scalingFactor,be=[];if(this.leftDelim&&be.push(this.bind(re,Zr("open",this.leftDelim,de,ge,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),ae&&(Bo(ae.children,this,ee,de,ge),be.push(ae)),this.rightDelim){let xt=this.containsCaret?" ML__contains-caret":"",At=this.rightDelim;At==="?"&&(ee.smartFence?(At=this.matchingRightDelim(),xt+=" ML__smart-fence__close"):At="."),be.push(this.bind(re,Zr("close",At,de,ge,re,{isSelected:this.isSelected,classes:xt+" ML__close",mode:this.mode,style:this.style})))}let Se=this.variant==="mleft...mright";const $e=this.leftSibling;$e&&(!Se&&$e.isFunction&&(Se=!0),!Se&&$e.type==="subsup"&&((E=$e.leftSibling)!=null&&E.isFunction)&&(Se=!0));const Ye=new Ir(be,{type:Se?"close":"inner",classes:"left-right"});return Ye.setStyle("margin-top",`${-ae.depth}em`),Ye.setStyle("height",`${ae.height+ae.depth}em`),this.caret&&(Ye.caret=this.caret),this.bind(ee,Ye.wrap(ee))}};function Bo(a,y,b,E,ee){if(a)for(let re=0;re<a.length;re++){const ae=a[re];ae.type==="middle"?(a[re]=y.bind(b,Zr("inner",ae.value,E,ee,b,{isSelected:y.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&&Bo(ae.children,y,b,E,ee)}}var Eu=class Rp extends Vn{constructor(y,b){var E;super({type:"macro",command:y,style:b.style}),this.body=b.body,b.captureSelection===void 0?b.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=b.captureSelection,this.macroArgs=b.args,this.expand=(E=b.expand)!=null?E:!1}static fromJson(y){return new Rp(y.command,y)}toJson(){const y=super.toJson();return this.expand&&(y.expand=!0),this.captureSelection!==void 0&&(y.captureSelection=this.captureSelection),this.macroArgs&&(y.args=this.macroArgs),y}_serialize(y){var b;return y.expandMacro&&this.expand?this.bodyToLatex(y):this.command+((b=this.macroArgs)!=null?b:"")}render(y){const b=Vn.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},sl=class Np extends Vn{constructor(){super({type:"macro-argument"})}static fromJson(y){return new Np}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},xl=class Bp extends Vn{constructor(y,b,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=b,this.placeholderId=y,this.locked=E,this.captureSelection=this.locked}static fromJson(y){return new Bp(y.placeholderId,y.correctness,y.locked,y.body,y)}toJson(){const y=super.toJson();return this.placeholderId&&(y.placeholderId=this.placeholderId),this.body||delete y.body,this.body&&(y.body=this.body.filter(b=>b.type!=="first").map(b=>b.toJson())),this.correctness&&(y.correctness=this.correctness),y.locked=this.locked,y}render(y){const b=new La({parent:y}),E=b.getRegisterAsEm("fboxsep"),ee=E,re=E,ae=Vn.createBox(y,this.body);if(!ae)return null;ae.height||(ae.height=b.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 de=new Ir(ae,{type:"ord"});de.setStyle("display","inline-block"),de.setStyle("height",ae.height+ae.depth,"em"),de.setStyle("vertical-align",-re,"em");let ge="ML__prompt ";this.locked?ge+=" ML__lockedPromptBox ":ge+=" ML__editablePromptBox ",this.correctness==="correct"?ge+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(ge+=" ML__incorrectPromptBox "),this.containsCaret&&(ge+=" ML__focusedPromptBox ");const be=new Ir(null,{classes:ge,attributes:{part:"prompt"}});be.height=de.height+re,be.depth=de.depth+re,be.width=de.width+2*ee,be.setStyle("box-sizing","border-box"),be.setStyle("position","absolute"),be.setStyle("height",de.height+de.depth+2*re,"em"),ee===0&&be.setStyle("width","100%"),ee!==0&&(be.setStyle("width",`calc(100% + ${2*ee}em)`),be.setStyle("top",E,"em"),be.setStyle("left",-ee,"em")),(!this.body||this.body.length===1)&&(be.width=3*ee,be.setStyle("width",`calc(100% + ${3*ee}em)`),be.setStyle("left",-1.5*ee,"em"));let Se="";this.correctness==="incorrect"&&(Se+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),Se&&(be.svgOverlay=Se);const $e=new Ir([be,de],{classes:"ML__prompt-atom"});return $e.setStyle("position","relative"),$e.setStyle("display","inline-block"),$e.setStyle("line-height",0),$e.height=de.height+re+.2,$e.depth=de.depth+re,$e.left=ee,$e.right=ee,$e.setStyle("height",de.height+re,"em"),$e.setStyle("top",de.depth-de.height,"em"),$e.setStyle("vertical-align",de.depth+re,"em"),$e.setStyle("margin-left",.5,"em"),$e.setStyle("margin-right",.5,"em"),this.caret&&($e.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:$e}))}_serialize(y){var b;const E=(b=this.bodyToLatex(y))!=null?b:"";if(y.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]"),uo(ee,E)}},Zs=class $p extends Vn{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new $p(y);for(const E of sc)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new La({parent:y,isPhantom:!0}),ee=this.leftSibling,re=(b=ee.render(E))!=null?b:new Ir(null),ae=new Ir(null);return ae.height=re.height,ae.depth=re.depth,this.attachSupsub(y,{base:ae,isCharacterBox:ee.isCharacterBox(),type:"ignore"})}_serialize(y){return this.supsubToLatex(y)}};function Po(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var Ul=class{constructor(a,y,b){this.errors=[],this.index=0,this.endCount=0;var E,ee,re,ae;b!=null||(b={}),this.tokens=a,this.context=y instanceof La&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new La({from:y,mathstyle:b.mathstyle},b.style),this.args=(E=b.args)!=null?E:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(ee=b.style)!=null?ee:{},parseMode:(re=b.parseMode)!=null?re:"math",mathstyle:(ae=b.mathstyle)!=null?ae:"displaystyle",tabular:!1}}beginContext(a){var y,b,E;const ee=this.parsingContext,re={parent:ee,mathlist:[],style:we({},ee.style),parseMode:(y=a==null?void 0:a.mode)!=null?y:ee.parseMode,mathstyle:(b=a==null?void 0:a.mathstyle)!=null?b: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:pl(this.tokens.slice(this.index,this.index+10)),after:pl(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 Zs({style:this.style}),this.mathlist.push(a)),a}hasPattern(a){return a.test(this.tokens[this.index])}hasInfixCommand(){var a;const{index:y}=this;if(y<this.tokens.length&&this.tokens[y].startsWith("\\")){const b=Kt(this.tokens[y],this.parseMode);return!b||b.definitionType==="symbol"||b.ifMode&&!b.ifMode.includes(this.parseMode)?!1:(a=b.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 y=(a=this.args)==null?void 0:a.call(this,"?");return y?Xo(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Ki({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(a){let y=this.tokens[this.index];for(;y&&y!==a;)y=this.tokens[++this.index];y===a&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(a){const y=this.index;let b=this.end(),E="";for(;!b;){const re=this.get();Po(re)?(E+=re,b=this.end()||E.length>=a.length):b=!0}const ee=a.toUpperCase()===E.toUpperCase();return ee||(this.index=y),ee}scanString(){let a="";for(;!this.end();){const y=this.peek();if(y==="]")return a;if(y==="<space>")a+=" ";else if(y.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),a+=y.substring(1);else if(Po(y))a+=y;else return a;this.next()}return a}scanBalancedString(){let a="",y=this.end(),b=1;for(;!y;){const E=this.get();E==="<space>"?a+=" ":E==="<{>"?(a+="{",b+=1):E==="<}>"?(b-=1,b>0?a+="}":this.index-=1):E==="<$>"?a+="$":E==="<$$>"?a+="$$":a+=E,y=b===0||this.end()}return a}scanLiteralGroup(){var a;if(!this.match("<{>"))return"";let y="",b=1;for(;b>0&&!this.end();){const E=this.get();E==="<}>"?(b-=1,b>0&&(y+="}")):E==="<{>"?(b+=1,y+="{"):(/\\[a-zA-Z]+$/.test(y)&&/^[a-zA-Z]/.test(E)&&(y+=" "),y+=(a={"<space>":" ","<$$>":"$$","<$>":"$"}[E])!=null?a:E)}return y}scanNumber(a=!0){var y,b;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)*((y=ee.codePointAt(1))!=null?y:0),base:"alpha"}:{number:(E?-1:1)*((b=ee.codePointAt(0))!=null?b:0),base:"alpha"}:null;let de="";for(;this.hasPattern(ae);)de+=this.get();if(!a&&(this.match(".")||this.match(",")))for(de+=".";this.hasPattern(ae);)de+=this.get();const ge=a?Number.parseInt(de,re):Number.parseFloat(de);return Number.isNaN(ge)?null:{number:E?-ge:ge,base:re===16?"hexadecimal":re===8?"octal":"decimal"}}scanRegister(){var a;const y=this.index,b=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return b;let E=!1;if(b===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("\\")?b?{register:re,global:!0,factor:(E?-1:1)*b.number}:E?{register:re,global:!0,factor:-1}:{register:re,global:!0}:(this.index=y,null)}let ee=this.get();return ee!=null&&ee.startsWith("\\")?(ee=ee.substring(1),this.context.registers[ee]?!E||b!==null?{register:ee,factor:(E?-1:1)*((a=b==null?void 0:b.number)!=null?a:1)}:{register:ee}:(this.index=y,null)):(this.index=y,null)}scanValue(){const a=this.scanRegister();if(a)return a;const y=this.index,b=this.scanGlueOrDimen();if(b&&("unit"in b||"glue"in b&&"unit"in b.glue))return b;this.index=y;const E=this.scanNumber();if(E)return E;if(this.end()||!Po(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 y=a.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let b;return this.matchKeyword("pt")?b="pt":this.matchKeyword("mm")?b="mm":this.matchKeyword("cm")?b="cm":this.matchKeyword("ex")?b="ex":this.matchKeyword("px")?b="px":this.matchKeyword("em")?b="em":this.matchKeyword("bp")?b="bp":this.matchKeyword("dd")?b="dd":this.matchKeyword("pc")?b="pc":this.matchKeyword("in")?b="in":this.matchKeyword("mu")&&(b="mu"),b?{dimension:y,unit:b}:{dimension:y}}scanGlueOrDimen(){const a=this.scanDimen();if(a===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return a;const y={glue:a};if(this.matchKeyword("plus")){const b=this.scanDimen();if(b)y.grow=b;else return y}if(this.skipWhitespace(),this.match("\\relax"))return y;if(this.skipWhitespace(),this.matchKeyword("minus")){const b=this.scanDimen();if(b)y.shrink=b;else return y}return!y.grow&&!y.shrink?a:y}scanColspec(){this.skipWhitespace();const a=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const y=this.get();y==="c"||y==="r"||y==="l"?a.push({align:y}):y==="|"?a.push({separator:"solid"}):y===":"?a.push({separator:"dashed"}):y==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),a.push({gap:this.scan(b=>b==="<}>")}),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 y=this.scan(b=>b===(a==="displaystyle"?"\\]":"\\)"));return this.match(a==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanModeShift(){let a="";if(this.match("<$>")&&(a="<$>"),!a&&this.match("<$$>")&&(a="<$$>"),!a)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const y=this.scan(b=>b===a);return this.match(a)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanEnvironment(){if(!this.match("\\begin"))return null;const a=this.scanArgument("string");if(!a)return null;const y=_t(a);if(!y)return this.onError({code:"unknown-environment",arg:a}),null;const b=[];if(y.params)for(const de of y.params)if(de.isOptional)b.push(this.scanOptionalArgument(de.type));else{const ge=this.scanArgument(de.type);ge||this.onError({code:"missing-argument",arg:a}),b.push(ge)}this.beginContext({tabular:y.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 de=null;this.skipWhitespace(),this.match("[")&&(de=this.scanDimen(),this.skipWhitespace(),this.match("]")),ee.push(de!=null?de:{dimension:0}),E.push(re),re=[]}else this.mathlist.push(...this.scan(de=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(de)));while(!ae);return re.push(this.mathlist),re.length>0&&E.push(re),this.endContext(),y.createAtom(a,E,ee,b)}scanExpression(){const a=this.mathlist;if(this.mathlist=[],this.parseExpression()){const y=this.mathlist;return this.mathlist=a,y}return this.mathlist=a,null}scan(a){this.beginContext(),a||(a=ae=>ae==="<}>");let y="",b=null,E=[],ee=null;for(;!this.end()&&!a(this.peek());)this.hasInfixCommand()&&!y?(y=this.get(),b=Kt(y,"math"),b&&(E=this.scanArguments(b)[1]),ee=this.mathlist,this.mathlist=[]):this.parseExpression();let re;return y?(console.assert(!!b),E.unshift(this.mathlist),ee&&E.unshift(ee),re=[b.createAtom({command:y,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 y=this.scan(E=>E==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const b=new Go(y,this.parseMode,this.style);return b.verbatimLatex=pl(this.tokens.slice(a,this.index)),b}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 y=new Wa("",this.mathlist,{leftDelim:"(",rightDelim:a===0?")":"?"});return this.endContext(),y}scanDelim(){this.skipWhitespace();const a=this.peek();if(!a)return this.onError({code:"unexpected-end-of-string"}),null;if(!Po(a)&&!a.startsWith("\\"))return null;this.next();const y=Kt(a,"math");return y?y.definitionType==="function"&&y.ifMode&&!y.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:a}),null):y.definitionType==="symbol"&&(y.type==="mopen"||y.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 ys("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new ys("\\mright");let y="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;y="\\mright"}const b=this.scanDelim();if(!b)return this.onError({code:"unexpected-delimiter"}),new ys(y==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(y);)this.parseExpression();const E=this.mathlist;this.endContext();const ee=(a=this.scanDelim())!=null?a:".";return new Wa(y==="\\right"?"left...right":"mleft...mright",E,{leftDelim:b,rightDelim:ee,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let a=this.peek();if(a!=="^"&&a!=="_"&&a!=="'")return!1;const y=this.lastSubsupAtom();for(;a==="^"||a==="_"||a==="'";)this.match("'")?this.match("'")?y.addChild(new Vn({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):y.addChild(new Vn({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&y.addChildren(ft(this.scanArgument("expression")),a==="_"?"subscript":"superscript"),a=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const a=this.match("\\limits"),y=!a&&this.match("\\nolimits"),b=!y&&!a&&this.match("\\displaylimits");if(!a&&!y&&!b)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"),y&&(E.subsupPlacement="adjacent"),b&&(E.subsupPlacement="auto"),!0)}scanArguments(a){if(!(a!=null&&a.params))return[void 0,[]];let y;const b=[];let E=a.infix?2:0;for(;E<a.params.length;){const ee=a.params[E];ee.type==="rest"?b.push(this.scan(re=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(re))):ee.isOptional?b.push(this.scanOptionalArgument(ee.type)):ee.type.endsWith("*")?y=ee.type.slice(0,-1):b.push(this.scanArgument(ee.type)),E+=1}return[y,b]}scanSymbolOrLiteral(){const a=this.peek();if(!a)return null;this.next();let y;if(Po(a)){const b=Ss.createAtom(this.parseMode,a,we({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=Kt(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new ys(a)];if(b.definitionType==="symbol"){const E=we({},this.style);b.variant&&(E.variant=b.variant),y=new Vn({type:b.type,command:a,style:E,value:String.fromCodePoint(b.codepoint),mode:this.parseMode,verbatimLatex:a})}else{if(b.applyMode||b.applyStyle||b.infix)return this.onError({code:"invalid-command",arg:a}),[new ys(a)];b.createAtom&&(y=b.createAtom({command:a,args:[],style:this.style,mode:this.parseMode}))}}return y?[y]:null}scanArgument(a){var y;this.skipFiller();const b=this.parseMode;if(a==="auto"&&(a=b),!this.match("<{>")){if(a==="string")return this.scanString();if(a==="value")return this.scanValue();if(a==="delim")return(y=this.scanDelim())!=null?y:".";if(a==="expression")return this.scanExpression();if(a==="math"){a!==b&&this.beginContext({mode:"math"});const ee=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ee}if(a==="text"){a!==b&&this.beginContext({mode:"text"});const ee=this.scanSymbolOrLiteral();return a!==b&&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 y=null;for(;!this.end()&&!this.match("]");)if(a==="string")y=this.scanString();else if(a==="value")y=this.scanValue();else if(a==="colspec")y=this.scanColspec();else if(a==="bbox"){const b={},E=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const ee of E){const re=ee.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(re)b.padding={dimension:parseInt(re[1]),unit:re[2]};else{const ae=ee.match(/^\s*border\s*:\s*(.*)/);ae?b.border=ae[1]:b.backgroundcolor={string:ee}}}y=b}else a==="math"&&(this.beginContext({mode:"math"}),y=this.mathlist.concat(this.scan(b=>b==="]")),this.endContext());return y}scanSymbolOrCommand(a){var y,b,E;if(a==="\\placeholder"){const de=this.scanOptionalArgument("string"),ge=this.scanOptionalArgument("math"),be=Vn.serialize(ge,{defaultMode:"math"});let Se=[],$e;!$e&&be==="correct"?$e="correct":!$e&&be==="incorrect"?$e="incorrect":be!==""&&(Se=ge);const Ye=this.scanOptionalArgument("string")==="locked",xt=this.scanArgument("auto");let At;return xt&&Array.isArray(xt)&&xt.length>0?At=xt:xt&&typeof xt=="object"&&"group"in xt?At=xt.group:At=Se,de?[new xl(de,$e,Ye,At!=null?At:Se,{mode:this.parseMode,style:this.style})]:[new Ki({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const de=this.index,ge=this.scanLiteralGroup()||this.next();if(!ge)return null;if(this.context.registers[ge.substring(1)]){const be=this.scanArgument("string");be!==null&&(this.context.registers[ge.substring(1)]=be);const Se=ya([a,pl(this.tokens.slice(de,this.index))]);return[new Vn({type:"text",value:"",verbatimLatex:Se})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=Kt(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(de=>new Vn({type:"text",value:de,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new ys(a)]);const ae=this.index;if(re.definitionType==="symbol"){const de=we({},this.style);re.variant&&(de.variant=re.variant),ee=new Vn({type:re.type,command:a,style:de,value:String.fromCodePoint(re.codepoint),mode:this.parseMode})}else{if(re.ifMode&&!re.ifMode.includes(this.parseMode))return[];const de=this.parseMode;re.applyMode&&(this.parseMode=re.applyMode);let ge,be=[];if(re.parse?be=re.parse(this):[ge,be]=this.scanArguments(re),this.parseMode=de,re.applyMode&&!re.applyStyle&&!re.createAtom)return ft(be[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:be,style:this.style,mode:this.parseMode}),ge&&(ee.body=ft(this.scanArgument(ge)));else if(typeof re.applyStyle=="function"){const Se=we(we({},this.style),re.applyStyle(a,be,this.context)),$e=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),ge){const Ye=this.style;this.style=Se;const xt=this.scanArgument(ge);return this.style=Ye,this.parseMode=$e,ft(xt)}this.style=Se}else ee=new Vn({type:"mord",command:(b=re.command)!=null?b:a,style:we({},this.style),value:a,mode:(E=re.applyMode)!=null?E:this.parseMode})}if(!ee)return null;if(ee instanceof Vn&&ee.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const de=ya([a,pl(this.tokens.slice(ae,this.index))]);de&&(ee.verbatimLatex=de)}if(ee.verbatimLatex===null&&(ee.verbatimLatex=void 0),ee.isFunction&&this.smartFence){const de=this.scanSmartFence();if(de)return[ee,de]}return[ee]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(Po(a)){const y=Ss.createAtom(this.parseMode,a,we({},this.style));if(!y)return null;if(y.isFunction&&this.smartFence){const b=this.scanSmartFence();if(b)return[y,b]}return[y]}return a.startsWith("\\")?this.scanSymbolOrCommand(a):a==="<space>"?this.parseMode==="text"?[new al(" "," ",this.style)]:null:(a==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:a}),null)}scanMacro(a){var y;const b=this.context.getMacro(a);if(!b)return null;const E=this.index,ee=b.args,re={"?":(y=this.args)==null?void 0:y.call(this,"?")};for(let ae=1;ae<=ee;ae++){let de=this.scanLiteralGroup();if(!de){const ge=this.index;this.scanExpression(),de=pl(this.tokens.slice(ge,this.index))}re[ae]=de}return new Eu(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:pl(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:Xo(b.def,{context:this.context,parseMode:this.parseMode,args:ae=>re[ae],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var a,y,b,E;let ee=(E=(b=(y=(a=this.scanEnvironment())!=null?a:this.scanModeShift())!=null?y:this.scanModeSet())!=null?b: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 Xo(a,y){var b,E,ee,re;const ae=(b=y==null?void 0:y.args)!=null?b:void 0,de=new Ul(nl(a,ae),y==null?void 0:y.context,{args:ae,mathstyle:(E=y==null?void 0:y.mathstyle)!=null?E:"displaystyle",parseMode:(ee=y==null?void 0:y.parseMode)!=null?ee:"math",style:(re=y==null?void 0:y.style)!=null?re:{}}),ge=[];for(;!de.end();)ge.push(...de.scan(()=>!1));return ge}function t0(a,y){var b;const E=new Ul(nl(a,null),y==null?void 0:y.context,{mathstyle:"displaystyle",parseMode:(b=y==null?void 0:y.parseMode)!=null?b:"math"});for(;!E.end();)E.scan();return E.errors}var n0=class Fp extends Vn{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=vo.go(Cr.go(b,y==="\\pu"?"pu":"ce"),!1);this.body=Xo(E),this._verbatimLatex=y+"{"+b+"}",this.arg=b,this.captureSelection=!0}static fromJson(y){return new Fp(y.command,y.arg)}set verbatimLatex(y){}get verbatimLatex(){return this._verbatimLatex}toJson(){return me(we({},super.toJson()),{arg:this.arg})}render(y){const b=Vn.createBox(y,this.body,{type:"inner"});return this.caret&&(b.caret=this.caret),this.bind(y,b)}_serialize(y){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};Nt(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new n0(a.command,(y=a.args[0])!=null?y:"")}});var Cr={go:function(a,y){if(!a)return[];y===void 0&&(y="ce");var b="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 de=Cr.stateMachines[y],ge=de.transitions[b]||de.transitions["*"];e:for(var be=0;be<ge.length;be++){var Se=Cr.patterns.match_(ge[be].pattern,a);if(Se){for(var $e=ge[be].task,Ye=0;Ye<$e.action_.length;Ye++){var xt;if(de.actions[$e.action_[Ye].type_])xt=de.actions[$e.action_[Ye].type_](E,Se.match_,$e.action_[Ye].option);else if(Cr.actions[$e.action_[Ye].type_])xt=Cr.actions[$e.action_[Ye].type_](E,Se.match_,$e.action_[Ye].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+$e.action_[Ye].type_+")"];Cr.concatArray(ae,xt)}if(b=$e.nextState||b,a.length>0){if($e.revisit||(a=Se.remainder),!$e.toContinue)break e}else return ae}}if(re<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(a,y){if(y)if(Object.prototype.toString.call(y)==="[object Array]")for(var b=0;b<y.length;b++)a.push(y[b]);else a.push(y)},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 y=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 y&&y[0]?{match_:y.slice(1),remainder:a.substr(y[0].length)}:null},"(-)(9)^(-9)":function(a){var y=a.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return y&&y[0]?{match_:y.slice(1),remainder:a.substr(y[0].length)}:null},"state of aggregation $":function(a){var y=Cr.patterns.findObserveGroups(a,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(y&&y.remainder.match(/^($|[\s,;\)\]\}])/))return y;var b=a.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return b?{match_:b[0],remainder:a.substr(b[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return Cr.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return Cr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return Cr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return Cr.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return Cr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return Cr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return Cr.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return Cr.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return Cr.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return Cr.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 Cr.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return Cr.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return Cr.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return Cr.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 Cr.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return Cr.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return Cr.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return Cr.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return Cr.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 y;if(y=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))/),y)return{match_:y[0],remainder:a.substr(y[0].length)};var b=Cr.patterns.findObserveGroups(a,"","$","$","");return b&&(y=b.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),y)?{match_:y[0],remainder:a.substr(y[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 y=a.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return y?{match_:y[0],remainder:a.substr(y[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(a,y,b,E,ee,re,ae,de,ge,be){var Se=function(Mn,or){if(typeof or=="string")return Mn.indexOf(or)!==0?null:or;var Dr=Mn.match(or);return Dr?Dr[0]:null},$e=function(Mn,or,Dr){for(var pr=0;or<Mn.length;){var di=Mn.charAt(or),Pi=Se(Mn.substr(or),Dr);if(Pi!==null&&pr===0)return{endMatchBegin:or,endMatchEnd:or+Pi.length};if(di==="{")pr++;else if(di==="}"){if(pr===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];pr--}or++}return pr>0,null},Ye=Se(a,y);if(Ye===null||(a=a.substr(Ye.length),Ye=Se(a,b),Ye===null))return null;var xt=$e(a,Ye.length,E||ee);if(xt===null)return null;var At=a.substring(0,E?xt.endMatchEnd:xt.endMatchBegin);if(re||ae){var An=this.findObserveGroups(a.substr(xt.endMatchEnd),re,ae,de,ge);if(An===null)return null;var kr=[At,An.match_];return{match_:be?kr.join(""):kr,remainder:An.remainder}}else return{match_:At,remainder:a.substr(xt.endMatchEnd)}},match_:function(a,y){var b=Cr.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return Cr.patterns.patterns[a](y);var E=y.match(b);if(E){var ee;return E[2]?ee=[E[1],E[2]]:E[1]?ee=E[1]:ee=E[0],{match_:ee,remainder:y.substr(E[0].length)}}return null}},actions:{"a=":function(a,y){a.a=(a.a||"")+y},"b=":function(a,y){a.b=(a.b||"")+y},"p=":function(a,y){a.p=(a.p||"")+y},"o=":function(a,y){a.o=(a.o||"")+y},"q=":function(a,y){a.q=(a.q||"")+y},"d=":function(a,y){a.d=(a.d||"")+y},"rm=":function(a,y){a.rm=(a.rm||"")+y},"text=":function(a,y){a.text_=(a.text_||"")+y},insert:function(a,y,b){return{type_:b}},"insert+p1":function(a,y,b){return{type_:b,p1:y}},"insert+p1+p2":function(a,y,b){return{type_:b,p1:y[0],p2:y[1]}},copy:function(a,y){return y},rm:function(a,y){return{type_:"rm",p1:y||""}},text:function(a,y){return Cr.go(y,"text")},"{text}":function(a,y){var b=["{"];return Cr.concatArray(b,Cr.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return Cr.go(y,"tex-math")},"tex-math tight":function(a,y){return Cr.go(y,"tex-math tight")},bond:function(a,y,b){return{type_:"bond",kind_:b||y}},"color0-output":function(a,y){return{type_:"color0",color:y[0]}},ce:function(a,y){return Cr.go(y)},"1/2":function(a,y){var b=[];y.match(/^[+\-]/)&&(b.push(y.substr(0,1)),y=y.substr(1));var E=y.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return E[1]=E[1].replace(/\$/g,""),b.push({type_:"frac",p1:E[1],p2:E[2]}),E[3]&&(E[3]=E[3].replace(/\$/g,""),b.push({type_:"tex-math",p1:E[3]})),b},"9,9":function(a,y){return Cr.go(y,"9,9")}},createTransitions:function(a){var y,b,E,ee,re={};for(y in a)for(b in a[y])for(E=b.split("|"),a[y][b].stateArray=E,ee=0;ee<E.length;ee++)re[E[ee]]=[];for(y in a)for(b in a[y])for(E=a[y][b].stateArray||[],ee=0;ee<E.length;ee++){var ae=a[y][b];if(ae.action_){ae.action_=[].concat(ae.action_);for(var de=0;de<ae.action_.length;de++)typeof ae.action_[de]=="string"&&(ae.action_[de]={type_:ae.action_[de]})}else ae.action_=[];for(var ge=y.split("|"),be=0;be<ge.length;be++)if(E[ee]==="*")for(var Se in re)re[Se].push({pattern:ge[be],task:ae});else re[E[ee]].push({pattern:ge[be],task:ae})}return re},stateMachines:{}};Cr.stateMachines={ce:{transitions:Cr.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,y){var b;if((a.d||"").match(/^[0-9]+$/)){var E=a.d;a.d=void 0,b=this.output(a),a.b=E}else b=this.output(a);return Cr.actions["o="](a,y),b},"d= kv":function(a,y){a.d=y,a.dType="kv"},"charge or bond":function(a,y){if(a.beginsWithBond){var b=[];return Cr.concatArray(b,this.output(a)),Cr.concatArray(b,Cr.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=Cr.patterns.match_("orbital",a.o||""),ee=Cr.patterns.match_("one lowercase greek letter $",a.o||""),re=Cr.patterns.match_("one lowercase latin letter $",a.o||""),ae=Cr.patterns.match_("$one lowercase latin letter$ $",a.o||""),de=y==="-"&&(E&&E.remainder===""||ee||re||ae);de&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var ge=[];return de?(Cr.concatArray(ge,this.output(a)),ge.push({type_:"hyphen"})):(E=Cr.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(Cr.concatArray(ge,Cr.actions["d="](a,y)),Cr.concatArray(ge,this.output(a))):(Cr.concatArray(ge,this.output(a)),Cr.concatArray(ge,Cr.actions.bond(a,y,"-")))),ge},"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,y){return{type_:"state of aggregation",p1:Cr.go(y,"o")}},comma:function(a,y){var b=y.replace(/\s*$/,""),E=b!==y;return E&&a.parenthesisLevel===0?{type_:"comma enumeration L",p1:b}:{type_:"comma enumeration M",p1:b}},output:function(a,y,b){var E;if(!a.r)E=[],!a.a&&!a.b&&!a.p&&!a.o&&!a.q&&!a.d&&!b||(a.sb&&E.push({type_:"entitySkip"}),!a.o&&!a.q&&!a.d&&!a.b&&!a.p&&b!==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"&&Cr.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:Cr.go(a.a,"a"),b:Cr.go(a.b,"bd"),p:Cr.go(a.p,"pq"),o:Cr.go(a.o,"o"),q:Cr.go(a.q,"pq"),d:Cr.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=Cr.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=Cr.go(a.rd);var re;a.rqt==="M"?re=Cr.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=Cr.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,y){var b=["{"];return Cr.concatArray(b,Cr.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:Cr.go(y[0]),p2:Cr.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:Cr.go(y[0]),p2:Cr.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:Cr.go(y[0]),p2:Cr.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:Cr.go(y[0]),p2:Cr.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Cr.go(y[1])}},"r=":function(a,y){a.r=y},"rdt=":function(a,y){a.rdt=y},"rd=":function(a,y){a.rd=y},"rqt=":function(a,y){a.rqt=y},"rq=":function(a,y){a.rq=y},operator:function(a,y,b){return{type_:"operator",kind_:b||y}}}},a:{transitions:Cr.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:Cr.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:Cr.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 y={type_:"text",p1:a.text_};for(var b in a)delete a[b];return y}}}},pq:{transitions:Cr.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,y){return{type_:"state of aggregation subscript",p1:Cr.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Cr.go(y[1],"pq")}}}},bd:{transitions:Cr.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,y){return{type_:"color",color1:y[0],color2:Cr.go(y[1],"bd")}}}},oxidation:{transitions:Cr.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(a,y){return{type_:"roman numeral",p1:y||""}}}},"tex-math":{transitions:Cr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(a){if(a.o){var y={type_:"tex-math",p1:a.o};for(var b in a)delete a[b];return y}}}},"tex-math tight":{transitions:Cr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(a,y){a.o=(a.o||"")+"{"+y+"}"},output:function(a){if(a.o){var y={type_:"tex-math",p1:a.o};for(var b in a)delete a[b];return y}}}},"9,9":{transitions:Cr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Cr.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,y){var b=[];return y[0]==="+-"||y[0]==="+/-"?b.push("\\pm "):y[0]&&b.push(y[0]),y[1]&&(Cr.concatArray(b,Cr.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?Cr.concatArray(b,Cr.go(y[2],"pu-9,9")):b.push(y[2])),(y[3]||y[4])&&(y[3]==="e"||y[4]==="*"?b.push({type_:"cdot"}):b.push({type_:"times"}))),y[5]&&b.push("10^{"+y[5]+"}"),b},"number^":function(a,y){var b=[];return y[0]==="+-"||y[0]==="+/-"?b.push("\\pm "):y[0]&&b.push(y[0]),Cr.concatArray(b,Cr.go(y[1],"pu-9,9")),b.push("^{"+y[2]+"}"),b},operator:function(a,y,b){return{type_:"operator",kind_:b||y}},space:function(){return{type_:"pu-space-1"}},output:function(a){var y,b=Cr.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=Cr.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:Cr.go(a.d,"pu"),q:Cr.go(a.q,"pu")};a.o==="//"?y={type_:"pu-frac",p1:ee.d,p2:ee.q}:(y=ee.d,ee.d.length>1||ee.q.length>1?y.push({type_:" / "}):y.push({type_:"/"}),Cr.concatArray(y,ee.q))}else y=Cr.go(a.d,"pu-2");for(var re in a)delete a[re];return y}}},"pu-2":{transitions:Cr.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,y){a.rm+="^{"+y+"}"},space:function(){return{type_:"pu-space-2"}},output:function(a){var y=[];if(a.rm){var b=Cr.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=Cr.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:Cr.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 y=[];if(a.text_=a.text_||"",a.text_.length>4){var b=a.text_.length%3;b===0&&(b=3);for(var E=a.text_.length-3;E>0;E-=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(0,b)),y.reverse()}else y.push(a.text_);for(var ee in a)delete a[ee];return y},"output-o":function(a){var y=[];if(a.text_=a.text_||"",a.text_.length>4){for(var b=a.text_.length-3,E=0;E<b;E+=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(E))}else y.push(a.text_);for(var ee in a)delete a[ee];return y}}}};var vo={go:function(a,y){if(!a)return"";for(var b="",E=!1,ee=0;ee<a.length;ee++){var re=a[ee];typeof re=="string"?b+=re:(b+=vo._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&vo.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:vo._goInner(a.a),b:vo._goInner(a.b),p:vo._goInner(a.p),o:vo._goInner(a.o),q:vo._goInner(a.q),d:vo._goInner(a.d)};b.a&&(b.a.match(/^[+\-]/)&&(b.a="{"+b.a+"}"),y+=b.a+"\\,"),(b.b||b.p)&&(y+="{\\vphantom{X}}",y+="^{\\hphantom{"+(b.b||"")+"}}_{\\hphantom{"+(b.p||"")+"}}",y+="{\\vphantom{X}}",y+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(b.b||"")+"}}",y+="_{\\vphantom{2}\\llap{\\smash[t]{"+(b.p||"")+"}}}"),b.o&&(b.o.match(/^[+\-]/)&&(b.o="{"+b.o+"}"),y+=b.o),a.dType==="kv"?((b.d||b.q)&&(y+="{\\vphantom{X}}"),b.d&&(y+="^{"+b.d+"}"),b.q&&(y+="_{\\smash[t]{"+b.q+"}}")):a.dType==="oxidation"?(b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"),b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}")):(b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}"),b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"));break;case"rm":y="\\mathrm{"+a.p1+"}";break;case"text":a.p1.match(/[\^_]/)?(a.p1=a.p1.replace(" ","~").replace("-","\\text{-}"),y="\\mathrm{"+a.p1+"}"):y="\\text{"+a.p1+"}";break;case"roman numeral":y="\\mathrm{"+a.p1+"}";break;case"state of aggregation":y="\\mskip2mu "+vo._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+vo._goInner(a.p1);break;case"bond":if(y=vo._getBond(a.kind_),!y)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+a.kind_+")"];break;case"frac":var E="\\frac{"+a.p1+"}{"+a.p2+"}";y="\\mathchoice{\\textstyle"+E+"}{"+E+"}{"+E+"}{"+E+"}";break;case"pu-frac":var ee="\\frac{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+vo._goInner(a.p1)+"}_{"+vo._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+vo._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var re={rd:vo._goInner(a.rd),rq:vo._goInner(a.rq)},ae=vo._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+"}{} ",y=ae;break;case"operator":y=vo._getOperator(a.kind_);break;case"1st-level escape":y=a.p1+" ";break;case"space":y=" ";break;case"entitySkip":y="~";break;case"pu-space-1":y="~";break;case"pu-space-2":y="\\mkern3mu ";break;case"1000 separator":y="\\mkern2mu ";break;case"commaDecimal":y="{,}";break;case"comma enumeration L":y="{"+a.p1+"}\\mkern6mu ";break;case"comma enumeration M":y="{"+a.p1+"}\\mkern3mu ";break;case"comma enumeration S":y="{"+a.p1+"}\\mkern1mu ";break;case"hyphen":y="\\text{-}";break;case"addition compound":y="\\,{\\cdot}\\,";break;case"electron dot":y="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":y="{\\times}";break;case"prime":y="\\prime ";break;case"cdot":y="\\cdot ";break;case"tight cdot":y="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":y="\\times ";break;case"circa":y="{\\sim}";break;case"^":y="uparrow";break;case"v":y="downarrow";break;case"ellipsis":y="\\ldots ";break;case"/":y="/";break;case" / ":y="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return y},_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 E1(a){}function k1(a){}var r0=class zp extends Vn{constructor(y){super(me(we({},y),{type:"delim"})),this.value=y.delim,this.size=y.size}static fromJson(y){return new zp(y)}toJson(){return me(we({},super.toJson()),{delim:this.value,size:this.size})}render(y){return new Ir(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Kt(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):uo(this.command,this.value)}},i0=class Kp extends Vn{constructor(y){super(me(we({},y),{type:"sizeddelim",value:y.delim})),this.delimType=y.delimType,this.size=y.size}static fromJson(y){return new Kp(y)}toJson(){return me(we({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(y){let b=hn(this.value,this.size,y,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return b?(b=this.bind(y,b),this.caret&&(b.caret=this.caret),b):null}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Kt(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):uo(this.command,this.value)}},bd=class Hp extends Vn{constructor(y,b,E,ee){var re,ae;super({type:"enclose",command:y,style:ee.style}),this.body=b,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(y){return new Hp(y.command,y.body,y.notation,y)}toJson(){return me(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(y){var b;if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Kt(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);let ee=(b=this.command)!=null?b:"";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 uo(ee,this.bodyToLatex(y))}render(y){const b=new La({parent:y},this.style),E=Vn.createBox(b,this.body);if(!E)return null;const ee=im(this.borderStyle),re=b.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 Ir(null,{classes:"ML__notation"});let de=E.height+E.depth+2*re;const ge=E.width+2*re;let be="";if(this.notation.horizontalstrike&&(be+=this.line(3,50,97,50)),this.notation.verticalstrike&&(be+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(be+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(be+=this.line(3,3,97,97)),this.notation.updiagonalarrow){be+=this.line(re.toString(),(re+E.depth+E.height).toString(),(re+E.width).toString(),re.toString());const At=.03*Math.sqrt(ge*ge+de*de)*1,An=E.width*At,kr=(E.depth+E.height)*At,Mn=re+E.width;let or=re;or+kr-.4*An<0&&(or=.4*An-kr),be+='<polygon points="',be+=`${Mn},${or} ${Mn-An-.4*kr},${or+kr-.4*An} `,be+=`${Mn-.7*An},${or+.7*kr} ${Mn-An+.4*kr},${or+kr+.4*An} `,be+=`${Mn},${or}`,be+=`" stroke='none' fill="${this.strokeColor}"`,be+="/>"}let Se=0;if(this.notation.phasorangle){const Ye=a0(b),xt=(E.height+E.depth+2*Ye+re).toString(),At=(E.height+E.depth)/2;be+=this.line(re.toString(),xt,(re+At+E.width).toString(),xt),be+=this.line(re.toString(),xt,(re+At).toString(),(re-Ye).toString()),de+=Ye,Se=At,E.left+=de/2-re}if(this.notation.longdiv){const Ye=a0(b);de+=Ye,be+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const xt=.3;Se=xt+Ye,E.left+=xt+Ye,E.setTop(re+Ye),be+='<path d="',be+=`M ${re} ${re} a${xt} ${(E.depth+E.height+2*Ye)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*Ye} "`,be+=` stroke-width="${am(b)}" stroke="${this.strokeColor}" fill="none"`,be+="/>"}if(ae.width=E.width+2*re+Se,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*de)/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),be){let Ye="";this.shadow==="auto"&&(Ye+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(Ye+=`filter: drop-shadow(${this.shadow})`),Ye+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,Ye+=' stroke-linecap="round"',this.svgStrokeStyle&&(Ye+=` stroke-dasharray="${this.svgStrokeStyle}"`),ae.svgStyle=Ye,ae.svgOverlay=be}const $e=new Ir([ae,E]);return $e.setStyle("position","relative"),$e.setStyle("vertical-align",re,"em"),$e.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),$e.setStyle("display","inline-block"),$e.height=ae.height,$e.depth=ae.depth,$e.width=ae.width-2*re,$e.left=re,$e.right=re,this.caret&&($e.caret=this.caret),$e.wrap(b)}line(y,b,E,ee){return`<line x1="${bf(y)}" y1="${bf(b)}" x2="${bf(E)}" y2="${bf(ee)}" vector-effect="non-scaling-stroke"></line>`}};function bf(a){return typeof a=="number"?`${Math.floor(100*a)/100}%`:a}function im(a){if(!a)return"1px";const y=a.match(/([0-9][a-zA-Z\%]+)/);return y===null?"1px":y[1]}function am(a){return(Math.floor(100*a.metrics.sqrtRuleThickness/a.scalingFactor)/100/10).toString()+"em"}function a0(a){const y=a.isDisplayStyle?el:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var ku=class Wp extends Vn{constructor(y,b,E){var ee,re;super(me(we({},E),{type:"genfrac",displayContainsHighlight:!0})),this.above=y,this.below=b,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(y){return new Wp(y.above,y.below,y)}toJson(){const y={};return this.continuousFraction&&(y.continuousFraction=!0),this.numerPrefix&&(y.numerPrefix=this.numerPrefix),this.denomPrefix&&(y.denomPrefix=this.denomPrefix),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),this.hasBarLine||(y.hasBarLine=!1),this.mathstyleName&&(y.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(y.fractionNavigationOrder=this.fractionNavigationOrder),we(we({},super.toJson()),y)}get children(){if(this._children)return this._children;const y=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const b of this.below)y.push(...b.children),y.push(b);for(const b of this.above)y.push(...b.children),y.push(b)}else{for(const b of this.above)y.push(...b.children),y.push(b);for(const b of this.below)y.push(...b.children),y.push(b)}return this._children=y,y}render(y){var b,E;const ee=new La({parent:y,mathstyle:this.mathstyleName},this.style),re=ee.metrics,ae=new La({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),de=this.numerPrefix?new Ir([new Ir(this.numerPrefix),Vn.createBox(ae,this.above)],{isTight:ae.isTight,type:"ignore"}):(b=Vn.createBox(ae,this.above,{type:"ignore"}))!=null?b:new Ir(null,{type:"ignore"}),ge=new La({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),be=this.denomPrefix?new Ir([new Ir(this.denomPrefix),Vn.createBox(ge,this.below,{type:"ignore"})]):(E=Vn.createBox(ge,this.below,{type:"ignore"}))!=null?E:new Ir(null,{type:"ignore"}),Se=this.hasBarLine?re.defaultRuleThickness:0;let $e,Ye=0,xt;ee.isDisplayStyle?($e=ae.metrics.num1,Ye=Se>0?3*Se:7*Se,xt=ge.metrics.denom1):(Se>0?($e=ae.metrics.num2,Ye=Se):($e=ae.metrics.num3,Ye=3*re.defaultRuleThickness),xt=ge.metrics.denom2);const At=[];this.isSelected&&At.push("ML__selected");const An=de.depth,kr=be.height;let Mn;if(Se<=0){const bi=$e-An-(kr-xt);bi<Ye&&($e+=(Ye-bi)/2,xt+=(Ye-bi)/2),Mn=new Qa({individualShift:[{box:de,shift:-$e,classes:[...At,"ML__center"]},{box:be,shift:xt,classes:[...At,"ML__center"]}]}).wrap(ee)}else{const bi=new Ir(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});bi.softWidth=Math.max(de.width,be.width),bi.height=Se/2,bi.depth=Se/2;const Pa=os+Se/2;$e<Ye+An+Pa&&($e=Ye+An+Pa);const qa=os-Se/2;xt<Ye+kr-qa&&(xt=Ye+kr-qa),Mn=new Qa({individualShift:[{box:be,shift:xt,classes:[...At,"ML__center"]},{box:bi,shift:-qa,classes:At},{box:de,shift:-$e,classes:[...At,"ML__center"]}]}).wrap(ee)}const or=ee.isDisplayStyle?re.delim1:re.delim2,Dr=this.leftDelim?this.bind(y,ai("open",this.leftDelim,or,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):oi(ee,"open");let pr=null;this.continuousFraction?pr=new Ir(null,{type:"close"}):this.rightDelim?pr=this.bind(y,ai("close",this.rightDelim,or,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):pr=oi(ee,"close");const di=new Ir([Dr,Mn,pr],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),Pi=this.bind(y,di);return this.caret&&(Pi.caret=this.caret),this.attachSupsub(y,{base:Pi})}},ns=class Up extends Vn{constructor(y,b){var E;super({type:"latex",value:y,mode:"latex"}),this.isSuggestion=(E=b==null?void 0:b.isSuggestion)!=null?E:!1,this.isError=!1}static fromJson(y){const b=new Up(y.value);return y.isSuggestion&&(b.isSuggestion=!0),y.isError&&(b.isError=!0),b}toJson(){const y={};return this.isSuggestion&&(y.isSuggestion=!0),this.isError&&(y.isError=!0),we({type:"latex",value:this.value},y)}get computedStyle(){return{}}render(y){const b=new Ir(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},xd=class jp extends Vn{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new ns(b)),this.skipBoundary=!1}static fromJson(y){return new jp("")}toJson(){return super.toJson()}render(y){const b=Vn.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}_serialize(y){var b,E;return(E=(b=this.body)==null?void 0:b.map(ee=>ee.value).join(""))!=null?E:""}},fh=class Zp extends Vn{constructor(y,b){super(me(we({},b),{type:"extensible-symbol",isFunction:b==null?void 0:b.isFunction})),this.value=y,this.variant=b==null?void 0:b.variant,this.subsupPlacement=b==null?void 0:b.limits}static fromJson(y){return new Zp(y.symbol,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.subsupPlacement&&(y.limits=this.subsupPlacement),this.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),this.value&&(y.symbol=this.value),y}render(y){var b;const E=y.isDisplayStyle&&this.value!=="\\smallint",ee=new Ir(this.value,{fontFamily:E?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(E?"large-op":"small-op"),type:"op",maxFontSize:y.scalingFactor,isSelected:this.isSelected});if(!ee)return null;ee.right=ee.italic;const re=(ee.height-ee.depth)/2-os*y.scalingFactor,ae=ee.italic;ee.setTop(re);let de=ee;if(this.superscript||this.subscript){const ge=(b=this.subsupPlacement)!=null?b:"auto";de=ge==="over-under"||ge==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:ee,baseShift:re,slant:ae}):this.attachSupsub(y,{base:ee})}return new Ir(this.bind(y,de),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Kt(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);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(y)),ya(E)}},Rc=class Vp extends Vn{constructor(y){const b=y.body;super(me(we({},y),{type:"overlap",body:typeof b=="string"?[new Vn({value:b})]:b,style:y==null?void 0:y.style})),this.skipBoundary=!0,this.align=y==null?void 0:y.align,this.boxType=y==null?void 0:y.boxType}static fromJson(y){return new Vp(y)}toJson(){const y={};return this.align&&(y.align=this.align),this.boxType&&(y.boxType=this.boxType),we(we({},super.toJson()),y)}render(y){const b=Vn.createBox(y,this.body,{classes:"inner"});return b?(this.caret&&(b.caret=this.caret),this.bind(y,new Ir([b,new Ir(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Vs=class Gp extends Vn{constructor(y){var b,E,ee,re;super({type:"overunder",command:y.command,style:y.style,mode:y.mode,body:y.body,skipBoundary:(b=y.skipBoundary)!=null?b:!0}),this.subsupPlacement=y.supsubPlacement,this.svgAbove=y.svgAbove,this.svgBelow=y.svgBelow,this.svgBody=y.svgBody,this.above=y.above,this.below=y.below,this.boxType=(E=y.boxType)!=null?E:"ord",this.paddedBody=(ee=y.paddedBody)!=null?ee:!1,this.paddedLabels=(re=y.paddedLabels)!=null?re:!1}static fromJson(y){return new Gp(y)}toJson(){const y=super.toJson();return this.skipBoundary||(y.skipBoundary=!1),this.subsupPlacement&&(y.subsupPlacement=this.subsupPlacement),this.svgAbove&&(y.svgAbove=this.svgAbove),this.svgBelow&&(y.svgBelow=this.svgBelow),this.svgBody&&(y.svgBody=this.svgBody),this.boxType!=="ord"&&(y.boxType=this.boxType),this.paddedBody&&(y.paddedBody=!0),this.paddedLabels&&(y.paddedLabels=!0),y}render(y){let b=this.svgBody?Os(this.svgBody):Vn.createBox(y,this.body,{type:"ignore"});const E=new La({parent:y,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=Os(this.svgAbove):this.above&&(ee=Vn.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=Os(this.svgBelow):this.below&&(re=Vn.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new Ir([oi(y,"open"),b,oi(y,"close")],{type:"ignore"}));let ae=om(y,{base:b,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(y,{base:ae,type:ae.type}):ae=this.attachSupsub(y,{base:ae}),this.caret&&(ae.caret=this.caret),this.bind(y,ae)):null}};function om(a,y){if(!y.base)return null;if(!y.above&&!y.below){const de=new Ir(y.base,{type:y.type});return de.setStyle("position","relative"),de}let b=0;y.above&&(b=a.metrics.bigOpSpacing5);let E=null;const ee=y.base,re=0,ae=["ML__center"];if(y.paddedAboveBelow&&ae.push("ML__label_padding"),y.below&&y.above){const de=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+ee.depth+re;E=new Qa({bottom:de,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]})}else y.below?E=new Qa({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]}]}):y.above&&(E=new Qa({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]}));return new Ir(E,{type:y.type})}var wd=class Xp extends Vn{constructor(y){var b,E,ee,re;super(me(we({},y),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(b=y.isInvisible)!=null?b:!1,this.smashDepth=(E=y.smashDepth)!=null?E:!1,this.smashHeight=(ee=y.smashHeight)!=null?ee:!1,this.smashWidth=(re=y.smashWidth)!=null?re:!1}static fromJson(y){return new Xp(y)}toJson(){const y={};return this.isInvisible&&(y.isInvisible=!0),this.smashDepth&&(y.smashDepth=!0),this.smashHeight&&(y.smashHeight=!0),this.smashWidth&&(y.smashWidth=!0),we(we({},super.toJson()),y)}render(y){const b=new La({parent:y,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Vn.createBox(b,this.body,{classes:"inner"});const E=Vn.createBox(this.isInvisible?b:y,this.body);if(!E)return null;if(this.smashWidth){const ee=new Ir(null,{classes:"fix"});return new Ir([E,ee],{classes:"rlap"}).wrap(y)}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 Qa({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},Sd=class Yp extends Vn{constructor(y){var b;super(we({type:"spacing"},y)),this.width=y==null?void 0:y.width,this._braced=(b=y==null?void 0:y.braced)!=null?b:!1}static fromJson(y){return new Yp(y)}toJson(){const y=super.toJson();return this.width!==void 0&&(y.width=this.width),this._braced&&(y.braced=!0),y}render(y){var b;if(this.command==="space")return new Ir(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new Ir(null,{classes:"mspace"}),E.left=y.toEm(this.width);else{const ee=(b={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?b:"mediumspace";E=new Ir(null,{classes:ee})}return E=this.bind(y,E),this.caret&&(E.caret=this.caret),E}_serialize(y){var b;if(!y.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Kt(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);const ee=(b=this.command)!=null?b:"";return this.width===void 0?ee:this._braced&&!("register"in this.width)?`${ee}{${Io(this.width)}}`:`${ee}${Io(this.width)}`}},o0=class qp extends Vn{constructor(y){var b;super(me(we({},y),{type:"surd",mode:(b=y.mode)!=null?b:"math",style:y.style,displayContainsHighlight:!0,body:y.body})),this.above=y.index}static fromJson(y){return new qp(me(we({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Kt(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=this.command,ee=this.bodyToLatex(y);return this.above&&!this.hasEmptyBranch("above")?uo(`${E}[${this.aboveToLatex(y)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:uo(E,ee)}get children(){if(this._children)return this._children;const y=[];if(this.above)for(const b of this.above)y.push(...b.children),y.push(b);if(this.body)for(const b of this.body)y.push(...b.children),y.push(b);return this._children=y,y}render(y){var b;const E=new La({parent:y,mathstyle:"cramp"},this.style),ee=(b=Vn.createBox(E,this.body,{type:"inner"}))!=null?b:new Ir(null),re=E.scalingFactor,ae=E.metrics.defaultRuleThickness/re,de=y.isDisplayStyle?el:ae,ge=new Ir(null,{classes:"ML__sqrt-line",style:this.style});ge.height=ae,ge.softWidth=ee.width;let be=re*(ae+de/4);const $e=Math.max(re*2*de,ee.height+ee.depth)+be+ae,Ye=new La({parent:y},this.style),xt=this.bind(Ye,new Ir(ai("inner","\\surd",$e,!1,Ye,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!xt)return null;const At=xt.height+xt.depth-ae;At>ee.height+ee.depth+be&&(be=(be+At-(ee.height+ee.depth))/2),xt.setTop(xt.height-ee.height-be);const An=this.bind(y,new Qa({firstBaseline:[{box:new Ir(ee)},be-2*ae,{box:ge},ae]})),kr=Vn.createBox(new La({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!kr){const Dr=new Ir([xt,An],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return Dr.setStyle("display","inline-block"),Dr.setStyle("height",Dr.height+Dr.depth,"em"),this.caret&&(Dr.caret=this.caret),this.bind(y,Dr)}const Mn=new Qa({shift:-.6*(Math.max(xt.height,An.height)-Math.max(xt.depth,An.depth)),children:[{box:kr}]}),or=new Ir([new Ir(Mn,{classes:"ML__sqrt-index",type:"ignore"}),xt,An],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return or.height=xt.height,or.depth=xt.depth,this.caret&&(or.caret=this.caret),this.bind(y,or)}},sm=class extends Ir{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 xf(a,y){if(!a.parent)return;const b=a.parent.children,E=b.indexOf(a);let ee=E-1;for(;ee>=0&&b[ee].type==="ignore";)ee-=1;if(ee<0&&a.parent.parent&&a.parent.type==="lift"){xf(a.parent,y);return}E>0&&b[E-1].type==="skip"?b[E-1].width+=y:b.splice(E,0,new sm(y))}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}},cm={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function um(a){Md(a,(y,b)=>{b.type==="bin"&&(!y||/^(middle|bin|op|rel|open|punct)$/.test(y.type))&&(b.type="ord"),(y==null?void 0:y.type)==="bin"&&/^(rel|close|punct)$/.test(b.type)&&(y.type="ord"),b.type!=="ignore"&&(y=b)})}function Cd(a,y){if(!a.children)return a;const b=a.children;um(b);const E=y.getRegisterAsEm("thinmuskip"),ee=y.getRegisterAsEm("medmuskip"),re=y.getRegisterAsEm("thickmuskip");return Md(b,(ae,de)=>{var ge,be,Se;if(!ae)return;const $e=ae.type,Ye=de.isTight?(ge=cm[$e])!=null?ge:null:(be=lm[$e])!=null?be:null,xt=(Se=Ye==null?void 0:Ye[de.type])!=null?Se:null;xt===3&&xf(de,E),xt===4&&xf(de,ee),xt===5&&xf(de,re)}),a}function Md(a,y,b=void 0){if(!a)return b;a=[...a];for(const E of a)E.type==="lift"?b=Md(E.children,y,b):E.type==="ignore"?Md(E.children,y):(y(b,E),Md(E.children,y),b=E);return b}var hh=class Jp extends Vn{constructor(y){super({type:"tooltip",command:y.command,mode:y.mode,style:y.style,body:y.body,displayContainsHighlight:!0}),this.tooltip=new Vn({type:"root",mode:y.content,body:y.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(y){return new Jp(me(we({},y),{tooltip:dc(y.tooltip)}))}toJson(){var y;const b=(y=this.tooltip.body)==null?void 0:y.filter(E=>E.type!=="first").map(E=>E.toJson());return me(we({},super.toJson()),{tooltip:b})}render(y){const b=Vn.createBox(new La,this.body);if(!b)return null;const E=new La({parent:y,mathstyle:"displaystyle"},{fontSize:dl}),ee=gu(Cd(new Ir(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new Ir([ee,b],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(y,re)}},Nc=class Qp extends Vn{constructor(y,b){super(me(we({},b),{type:"operator",isFunction:b==null?void 0:b.isFunction})),this.value=y,this.variant=b==null?void 0:b.variant,this.variantStyle=b==null?void 0:b.variantStyle,this.subsupPlacement=b==null?void 0:b.limits}static fromJson(y){return new Qp(y.symbol,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.variantStyle&&(y.variantStyle=this.variantStyle),this.subsupPlacement&&(y.limits=this.subsupPlacement),this.value&&(y.symbol=this.value),y}render(y){var b;const E=new Ir(this.value,{type:"op",mode:"math",maxFontSize:y.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:y.letterShapeStyle});let ee=E;if(this.superscript||this.subscript){const re=(b=this.subsupPlacement)!=null?b:"auto";ee=re==="over-under"||re==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:E}):this.attachSupsub(y,{base:E})}return new Ir(this.bind(y,ee),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Kt(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);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(y)),ya(E)}};function dc(a){if(Oe(a))return a.map(E=>dc(E));if(typeof a=="string")return Vn.fromJson(a);a=we({},a);for(const E of sc)a[E]&&(a[E]=dc(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=dc(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=sa.fromJson(a)),y==="box"&&(b=ko.fromJson(a)),y==="chem"&&(b=n0.fromJson(a)),y==="composition"&&(b=Wl.fromJson(a)),y==="delim"&&(b=r0.fromJson(a)),y==="enclose"&&(b=bd.fromJson(a)),y==="error"&&(b=ys.fromJson(a)),y==="extensible-symbol"&&(b=fh.fromJson(a)),y==="genfrac"&&(b=ku.fromJson(a)),y==="group"&&(b=Go.fromJson(a)),y==="latex"&&(b=ns.fromJson(a)),y==="latexgroup"&&(b=xd.fromJson(a)),y==="leftright"&&(b=Wa.fromJson(a)),y==="macro"&&(b=Eu.fromJson(a)),y==="macro-argument"&&(b=sl.fromJson(a)),y==="operator"&&(b=Nc.fromJson(a)),y==="overlap"&&(b=Rc.fromJson(a)),y==="overunder"&&(b=Vs.fromJson(a)),y==="placeholder"&&(b=Ki.fromJson(a)),y==="prompt"&&(b=xl.fromJson(a)),y==="phantom"&&(b=wd.fromJson(a)),y==="sizeddelim"&&(b=i0.fromJson(a)),y==="spacing"&&(b=Sd.fromJson(a)),y==="subsup"&&(b=Zs.fromJson(a)),y==="surd"&&(b=o0.fromJson(a)),y==="text"&&(b=al.fromJson(a)),y==="tooltip"&&(b=hh.fromJson(a)),b||(console.assert(!y||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(y),`MathLive 0.98.5: an unexpected atom type "${y}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),b=Vn.fromJson(a));for(const E of sc)a[E]&&b.setChildren(a[E],E);return a.verbatimLatex!==void 0&&(b.verbatimLatex=a.verbatimLatex),a.subsupPlacement&&(b.subsupPlacement=a.subsupPlacement),a.explicitSubsupPlacement&&(b.explicitSubsupPlacement=!0),a.isFunction&&(b.isFunction=!0),a.isExtensibleSymbol&&(b.isExtensibleSymbol=!0),a.skipBoundary&&(b.skipBoundary=!0),a.captureSelection&&(b.captureSelection=!0),b}function dm(a){if(a&&Array.isArray(a))return a.map(y=>y==="<null>"?null:typeof y=="object"&&"group"in y?{group:y.group.map(b=>dc(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>dc(b)):y)}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"]},ph={"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]$/,fm=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,hm=[/^[a-z]$/,/^[A-Z]$/,l0,fm],pm={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},mm=class extends Ss{constructor(){super("math")}createAtom(a,y,b){var E,ee,re,ae;if(y===null)return new Vn({type:"mord",mode:"math",command:a,value:a,style:b});const de=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const be=new Vn({type:(ee=y.type)!=null?ee:"mord",mode:"math",command:(re=y.command)!=null?re:a,value:String.fromCodePoint(y.codepoint),style:b});return de&&(be.isFunction=!0),a.startsWith("\\")&&(be.verbatimLatex=a),be}const ge=new Vn({type:"mord",mode:"math",command:(ae=y.command)!=null?ae:a,value:a,style:b});return de&&(ge.isFunction=!0),a.startsWith("\\")&&(ge.verbatimLatex=a),ge}serialize(a,y){const b=gm(a,me(we({},y),{defaultMode:"math"}));return b.length===0||y.defaultMode!=="text"?b:["$ ",...b," $"]}getFont(a,y){console.assert(y.variant!==void 0);let{variant:b}=y,{variantStyle:E}=y;b==="normal"&&!E&&/[\u00A3\u0131\u0237]/.test(a.value)&&(b="main",E="italic"),b==="normal"&&!E&&a.value.length===1&&hm.forEach((de,ge)=>{var be;de.test(a.value)&&pm[(be=y.letterShapeStyle)!=null?be:"tex"][ge]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ee=E?b+"-"+E:b;console.assert(s0[ee]!==void 0);const[re,ae]=s0[ee];return ph[b]&&!ph[b].test(a.value)?(a.value=Dn(a.value,b,E),null):(l0.test(a.value)&&(a.classes+=" lcGreek"),ae&&(a.classes+=" "+ae),re)}};function gm(a,y){const{parent:b}=a[0],E=c0(b);return Eo(a,"variant").map(ee=>{const re=c0(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 de=ya(ee.map(ge=>ge._serialize(y)));return ae?uo(ae,de):de})}function c0(a){if(!a)return"";const{style:y}=a;if(y.variant===void 0)return"";let b=y.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(y.variant)&&y.variantStyle&&y.variantStyle!=="up"&&(b+="-"+y.variantStyle),b}new mm;function vm(a,y){return a.map(b=>b._serialize(y))}function ym(a,y){return Eo(a,"fontShape").map(b=>{const E=vm(b,y),{fontShape:ee}=b[0].style;let re="";return ee==="it"&&(re="\\textit"),ee==="sl"&&(re="\\textsl"),ee==="sc"&&(re="\\textsc"),ee==="n"&&(re="\\textup"),!re&&ee?`{${uo("\\fontshape",ee)}${ya(E)}}`:re?uo(re,ya(E)):ya(E)})}function bm(a,y){return Eo(a,"fontSeries").map(b=>{const E=ym(b,y),{fontSeries:ee}=b[0].style;let re="";return ee==="b"&&(re="\\textbf"),ee==="l"&&(re="\\textlf"),ee==="m"&&(re="\\textmd"),ee&&!re?`{${uo("\\fontseries",ee)}${ya(E)}}`:re?uo(re,ya(E)):ya(E)})}function xm(a,y){return Eo(a,"fontSize").map(b=>{var E,ee;const re=bm(b,y),ae=(ee=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(E=b[0].style.fontSize)!=null?E:""])!=null?ee:"";return ae?`${ae} ${ya(re)}`:ya(re)})}function wm(a,y,b){return Eo(a,"fontFamily").map(E=>{var ee,re;const ae=xm(E,y),de=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return de?`\\${de}{${ya(ae)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${ya(ae)}}`:b?`\\text{${ya(ae)}}`:ya(ae)})}var u0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Sm=class extends Ss{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new al(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return wm(a,me(we({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,ee,re,ae;const{fontFamily:de}=y;if(u0[de]?a.classes+=" "+u0[de]:de&&a.setStyle("font-family",de),y.fontShape&&(a.classes+=" ",a.classes+=(b={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[y.fontShape])!=null?b:""),y.fontSeries){const ge=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);ge&&(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=ge[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=ge[2])!=null?re:""])!=null?ae:"")}return"Main-Regular"}};new Sm;var Cm=class extends Ss{constructor(){super("latex")}createAtom(a){return new ns(a)}serialize(a,y){return a.filter(b=>b instanceof ns&&!b.isSuggestion).map(b=>b.value)}getFont(){return null}};new Cm;var Mm={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:["","=","","="]}},mh={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:["\\","|","",""]}},f0={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:[")",")",")",")"]}},Em={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:["=","=","=","="]}},km={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:["<",">","",""]}},_m={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"]}},Lm={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:["=","=","=","="]}},Am={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:["<",">","|",""]}},Tm={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:[".",".",".","."]}},Im={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"]}},Dm={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:["<",">","",""]}},Pm={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 h0(a){const y=a.split("+"),b={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:y.pop()};return y.includes("shift")&&(b.shift=!0),y.includes("alt")&&(b.alt=!0),y.includes("ctrl")&&(b.ctrl=!0),y.includes("cmd")&&(b.cmd=!0),y.includes("win")&&(b.win=!0),y.includes("meta")&&(b.meta=!0),b}function _u(a){let y="";return a.shift&&(y+="shift+"),a.alt&&(y+="alt+"),a.ctrl&&(y+="ctrl+"),a.cmd&&(y+="cmd+"),a.win&&(y+="win+"),a.meta&&(y+="meta+"),y+a.key}var Om={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]"},Ed=[],kd;function gh(){switch(Ee()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Bs(a){(!a.platform||a.platform===gh())&&Ed.push(a)}function Rm(a,y){var b;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(y.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=(b=Om[a])!=null?b:"",E}function Nm(a){if(a.code)return a;const y=Object.entries(_d().mapping);let b=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[ae,de]of y)if(de[re]===a.key){ee=ae,re===3?(b=!0,E=!0):re===2?b=!0:re===1&&(E=!0);break}if(ee)break}return new KeyboardEvent(a.type,me(we({},a),{altKey:b,shiftKey:E,code:ee}))}function Bm(a){var y,b;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 Ed)((y=ee.mapping[a.code])==null?void 0:y[E])===a.key?ee.score+=1:(b=ee.mapping[a.code])!=null&&b[E]&&(ee.score=0);Ed.sort((ee,re)=>re.score-ee.score)}function $m(a){kd=Ed.find(y=>a.startsWith(y.locale))}function _d(){return kd!=null?kd:Ed[0]}function Fm(){switch(gh()){case"apple":return mh;case"windows":return d0;case"linux":return f0}return mh}switch(gh()){case"apple":Bs(mh),Bs(Em),Bs(Im),Bs(Lm);break;case"windows":Bs(d0),Bs(km),Bs(Dm),Bs(Am);break;case"linux":Bs(f0),Bs(_m),Bs(Pm),Bs(Tm);break}Bs(Mm);function vh(a){var y;const b=/macos|ios/.test(Ee()),E=a.split("+");let ee="";for(const re of E)ee&&(ee+=b?"\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+=(y={cmd:"\u2318",meta:b?"\u2318":"Ctrl",shift:b?"\u21E7":"Shift",alt:b?"\u2325":"Alt",ctrl:b?"\u2303":"Ctrl","\n":b?"\u23CE":"Return","[return]":b?"\u23CE":"Return","[enter]":b?"\u2324":"Enter","[tab]":b?"\u21E5":"Tab","[escape]":"Esc","[backspace]":b?"\u232B":"Backspace","[delete]":b?"\u2326":"Del","[pageup]":b?"\u21DE":"Page Up","[pagedown]":b?"\u21DF":"Page Down","[home]":b?"\u2912":"Home","[end]":b?"\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?y:re.toUpperCase();return ee}function wf(a){if(a instanceof MouseEvent||a instanceof PointerEvent)return{x:a.clientX,y:a.clientY};if(a instanceof TouchEvent){const y=[...a.touches].reduce((E,ee)=>({x:E.x+ee.clientX,y:E.y+ee.clientY}),{x:0,y:0}),b=a.touches.length;return{x:y.x/b,y:y.y/b}}}function Bc(a){const y={alt:!1,control:!1,shift:!1,meta:!1};return(a instanceof MouseEvent||a instanceof PointerEvent||a instanceof TouchEvent||a instanceof KeyboardEvent)&&(a.altKey&&(y.alt=!0),a.ctrlKey&&(y.control=!0),a.metaKey&&(y.meta=!0),a.shiftKey&&(y.shift=!0)),y}function zm(a,y){return!a&&y||a&&!y?!1:!a||!y?!0:a.alt===y.alt&&a.control===y.control&&a.shift===y.shift&&a.meta===y.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 Sf(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Km.has(a.code)}function Cf(){var a;let y=document.activeElement;for(;(a=y==null?void 0:y.shadowRoot)!=null&&a.activeElement;)y=y.shadowRoot.activeElement;return y}var wl=class Gl{static get scrim(){return Gl._scrim||(Gl._scrim=new Gl),Gl._scrim}static open(y){Gl.scrim.open(y)}static close(){Gl.scrim.close()}static get state(){return Gl.scrim.state}static get element(){return Gl.scrim.element}constructor(y){var b,E;this.lightDismiss=(b=y==null?void 0:y.lightDismiss)!=null?b:!0,this.translucent=(E=y==null?void 0:y.translucent)!=null?E:!1,this.state="closed"}get element(){if(this._element)return this._element;const y=document.createElement("div");return y.setAttribute("role","presentation"),y.style.position="fixed",y.style.contain="content",y.style.top="0",y.style.left="0",y.style.right="0",y.style.bottom="0",y.style.zIndex="var(--scrim-zindex, 10099)",y.style.outline="none",this.translucent?(y.style.background="rgba(255, 255, 255, .2)",y.style.backdropFilter="contrast(40%)"):y.style.background="transparent",this._element=y,y}open(y){var b;if(this.state!=="closed")return;this.state="opening",this.onDismiss=y==null?void 0:y.onDismiss,this.savedActiveElement=Cf();const{element:E}=this;((b=y==null?void 0:y.root)!=null?b: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`,y!=null&&y.child&&E.append(y.child),this.state="open"}close(){var y,b,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=(y=this.savedOverflow)!=null?y:"",document.body.style.marginRight=(b=this.savedMarginRight)!=null?b:"",Cf()!==this.savedActiveElement&&((ee=(E=this.savedActiveElement)==null?void 0:E.focus)==null||ee.call(E)),re.innerHTML="",this.state="closed"}handleEvent(y){this.lightDismiss&&(y.target===this._element&&y.type==="click"?(this.close(),y.preventDefault(),y.stopPropagation()):y.target===document&&(y.type==="touchmove"||y.type==="scroll")&&(this.close(),y.preventDefault(),y.stopPropagation()))}};function Hm(a,y,b){let E=null,ee=null,re=!1,ae=!1,de=!1;const ge=new AbortController,be=ge.signal;return a.addEventListener("keydown",Se=>{if(re||Se.key==="Process"||Se.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(Se.code)){E=null;return}E=Se,ee=null,b.onKeystroke(Se)?a.textContent="":E=null},{capture:!0,signal:be}),a.addEventListener("keypress",Se=>{re||(E&&ee&&b.onKeystroke(E),ee=Se)},{capture:!0,signal:be}),a.addEventListener("compositionstart",Se=>{a.textContent="",re=!0,b.onCompositionStart(Se.data)},{capture:!0,signal:be}),a.addEventListener("compositionupdate",Se=>{re&&b.onCompositionUpdate(Se.data)},{capture:!0,signal:be}),a.addEventListener("compositionend",Se=>{a.textContent="",re&&(re=!1,b.onCompositionEnd(Se.data))},{capture:!0,signal:be}),a.addEventListener("beforeinput",Se=>Se.stopImmediatePropagation(),{signal:be}),a.addEventListener("input",Se=>{var $e;if(!re&&(a.textContent="",Se.inputType!=="insertCompositionText")){if(Se.inputType==="insertFromPaste"){Se.preventDefault(),Se.stopPropagation();return}b.onInput(($e=Se.data)!=null?$e:""),Se.preventDefault(),Se.stopPropagation()}},{signal:be}),a.addEventListener("paste",Se=>{a.focus({preventScroll:!0}),a.textContent="",b.onPaste(Se)||Se.preventDefault(),Se.stopImmediatePropagation()},{signal:be}),a.addEventListener("cut",Se=>b.onCut(Se),{capture:!0,signal:be}),a.addEventListener("copy",Se=>b.onCopy(Se),{capture:!0,signal:be}),a.addEventListener("blur",Se=>{var $e,Ye;if(((Ye=($e=Se.relatedTarget)==null?void 0:$e._mathfield)==null?void 0:Ye.element)===y){a.focus({preventScroll:!0}),Se.preventDefault(),Se.stopPropagation();return}const xt=wl.state;if(xt==="open"||xt==="opening"){Se.preventDefault(),Se.stopPropagation();return}if(Se.relatedTarget===Se.target.getRootNode().host){Se.preventDefault(),Se.stopPropagation();return}de||ae||(de=!0,E=null,ee=null,b.onBlur(),de=!1)},{capture:!0,signal:be}),a.addEventListener("focus",Se=>{de||ae||(ae=!0,b.onFocus(),ae=!1)},{capture:!0,signal:be}),{dispose:()=>ge.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:()=>Cf()===a,setAriaLabel:Se=>a.setAttribute("aria-label",Se),setValue:Se=>{var $e;a.textContent=Se,a.style.left="-1000px",($e=window.getSelection())==null||$e.selectAllChildren(a)},moveTo:(Se,$e)=>{a.style.top=`${$e}px`,a.style.left=`${Se}px`}}}function Lu(a){var y;if(!a||!Sf(a))return"";let b;return a.key==="Unidentified"&&a.target&&(b=a.target.value),b=(y=b!=null?b:a.key)!=null?y:a.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(b)&&(b=""),b}function p0(a){a=Nm(a);const y=[];return a.ctrlKey&&y.push("ctrl"),a.metaKey&&y.push("meta"),a.altKey&&y.push("alt"),a.shiftKey&&y.push("shift"),y.length===0?`[${a.code}]`:(y.push(`[${a.code}]`),y.join("+"))}function Wm(a){if(ht()){const y=Ee(),b=a.startsWith("!"),E=a.endsWith(y);if(b&&!E||!b&&E)return!0}return a==="!other"?!1:a==="other"}function Um(a,y,b){if(a.length===0)return"";const E=_u(h0(p0(b))),ee=_u({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(Ee()),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===y))return a[re].command;return""}function m0(a){let y=a;return Oe(y)&&(y=y.length>0?y[0]+"("+y.slice(1).join("")+")":""),y}function jm(a,y){let b=[];if(typeof y=="string"){const re=hd[y];Oe(re)?b=re.slice():re&&b.push(re)}const E=m0(y),ee=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const re of a)ee.test(m0(re.command))&&b.push(re.key);return b.map(vh)}function Zm(a,y){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&&(y.score===0||!a.ifLayout.includes(y.id)))return;const b=h0(a.key);let E=a.ifPlatform;if(b.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=Ee()==="ios"?"ios":"macos"),b.win=!1,b.cmd=!1,b.meta=!0}if(b.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",b.win=!1,b.cmd=!1,b.meta=!0}if(E&&!Wm(E))return;if(/^\[.+\]$/.test(b.key))return me(we({},a),{key:_u(b)});const ee=Rm(b.key,y);if(!ee)return me(we({},a),{key:_u(b)});if(ee.shift&&b.shift||ee.alt&&b.alt)throw new Error(`The keybinding ${a.key} (${yh(a.command)}) is conflicting with the key combination ${_u(ee)} using the ${y.displayName} keyboard layout`);return ee.shift=ee.shift||b.shift,ee.alt=ee.alt||b.alt,ee.meta=b.meta,ee.ctrl=b.ctrl,me(we({},a),{key:_u(ee)})}function yh(a){if(Array.isArray(a)){const y=[...a];return y.shift()+"("+y.map(b=>typeof b=="string"?`"${b}"`:b.toString()).join(", ")+")"}return a}function Vm(a,y){const b=[],E=[];for(const ee of a)try{const re=Zm(ee,y);if(!re)continue;const ae=E.find(de=>de.key===re.key&&de.ifMode===re.ifMode);if(ae)throw new Error(`Ambiguous key binding ${ee.key} (${yh(ee.command)}) matches ${ae.key} (${yh(ae.command)}) with the ${y.displayName} keyboard layout`);E.push(re)}catch(re){re instanceof Error&&b.push(re.message)}return[E,b]}var Gm=class extends ia{constructor(){super("latex")}createAtom(a){return new ns(a)}onPaste(a,y){if(!y)return!1;const b=typeof y=="string"?y:y.getData("application/x-latex")||y.getData("text/plain");return b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b)&&(a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Mo(a)),a.startRecording(),!0):!1}insert(a,y,b){if(!a.contentWillChange({data:y,inputType:"insertText"}))return!1;b||(b={}),b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder");const{silenceNotifications:E}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Vo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=[];for(const ge of y)le.test(ge)&&re.push(new ns(ge));let ae=a.at(a.position);if(ae instanceof xd&&(ae=ae.lastChild),!(ae.parent instanceof xd)){const ge=new xd("");ae.parent.addChildAfter(ge,ae),ae=ge.firstChild}const de=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(de)):de&&(a.position=a.offsetOf(de))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Xm(a){return a.atoms.find(y=>y.type==="latexgroup")}function Ld(a){var y,b;const E=a.atoms.find(ee=>ee.type==="latexgroup");return E?(b=(y=E.body)==null?void 0:y.filter(ee=>ee.type==="latex"))!=null?b:[]:[]}function g0(a,y){var b;let E=0,ee=!1;const re=Number.isFinite(y==null?void 0:y.before)?(b=y==null?void 0:y.before)!=null?b:0:a.lastOffset;for(;E<=re&&!ee;){const ge=a.at(E);ee=ge instanceof ns&&ge.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let ae=E,de=!1;for(;ae<=re&&!de;){const ge=a.at(ae);de=!(ge instanceof ns&&ge.isSuggestion),de||ae++}return[E-1,ae-1]}new Gm;function Mf(a){const y=Ld(a.model).filter(b=>b.isSuggestion);if(y.length!==0){a.model.position=a.model.offsetOf(y[0].leftSibling);for(const b of y)b.parent.removeChild(b)}}function Ad(a,y){var b;const{model:E}=a;Mf(a);for(const Se of Ld(E))Se.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){Tu(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof ns&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof ns&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof ns&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const ae=ee.map(Se=>Se.value).join(""),de=Rt(a,ae);if(de.length===0){if(/^\\[a-zA-Z\*]+$/.test(ae))for(const Se of ee)Se.isError=!0;Tu(a);return}const ge=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=ge<0?de.length-1:ge%de.length;const be=de[a.suggestionIndex];if(be!==ae){const Se=ee[ee.length-1];Se.parent.addChildrenAfter([...be.slice(ae.length-be.length)].map($e=>new ns($e,{isSuggestion:!0})),Se),$c(a,{interactive:!0})}qm(a,de)}function v0(a){const[y,b]=g0(a,{before:a.position});if(y===void 0||b===void 0)return!1;let E=!1;return a.getAtoms([y,b]).forEach(ee=>{ee.isSuggestion&&(ee.isSuggestion=!1,E=!0)}),E}function Au(a,y="accept",b){var E,ee;Tu(a);const re=Xm(a.model);if(!re)return!1;if(y==="accept-suggestion"||y==="accept-all"){const be=Ld(a.model).filter(Se=>Se.isSuggestion);if(be.length!==0){for(const Se of be)Se.isSuggestion=!1;a.model.position=a.model.offsetOf(be[be.length-1])}if(y==="accept-suggestion")return be.length!==0}const de=Ld(a.model).filter(be=>!be.isSuggestion).map(be=>be.value).join(""),ge=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(ge),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||(ia.insert(a.model,de,{selectionMode:(ee=b==null?void 0:b.selectItem)!=null&&ee?"item":"placeholder",format:"latex",mode:"math"}),a.snapshot(),a.model.announce("replacement"),a.switchMode("math")),!0}function Ef(a){var y;let b=document.getElementById(a);return b?b.dataset.refcount=Number(Number.parseInt((y=b.dataset.refcount)!=null?y:"0")+1).toString():(b=document.createElement("div"),b.setAttribute("aria-hidden","true"),b.dataset.refcount="1",b.id=a,document.body.append(b)),b}function bh(a){var y;const b=document.getElementById(a);if(!b)return;const E=Number.parseInt((y=b.getAttribute("data-refcount"))!=null?y:"0");E<=1?b.remove():b.dataset.refcount=Number(E-1).toString()}function Ym(a,y){const b=new La({from:a.context}),E=new Vn({mode:"math",type:"root",body:Xo(y,{context:b})}),ee=gu(Cd(new Ir(E.render(b),{classes:"ML__base"}),b));return vu(ee,{classes:"ML__latex"}).toMarkup()}function qm(a,y){var b;if(y.length===0){Tu(a);return}let E="";for(const[re,ae]of y.entries()){const de=ae,ge=Ym(a,ae),be=jm(a.keybindings,de).join("<br>");E+=`<li role="button" data-command="${de}" ${re===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${de}</span><span class="ML__popover__command">${ge}</span>`,be&&(E+=`<span class="ML__popover__keybinding">${be}</span>`),E+="</li>"}const ee=Jm(a,`<ul>${E}</ul>`);xh()&&((b=ee.querySelector(".ML__popover__current"))==null||b.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var re;ee&&!xh()&&(ee.classList.add("is-visible"),kf(a),(re=ee.querySelector(".ML__popover__current"))==null||re.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function xh(){const a=document.getElementById("mathlive-suggestion-popover");return a?a.classList.contains("is-visible"):!1}function kf(a,y){var b;if(!a.element||a.element.mathfield!==a||!xh())return;if(((b=a.model.at(a.model.position))==null?void 0:b.type)!=="latex"){Tu(a);return}if(y!=null&&y.deferred){setTimeout(()=>kf(a),32);return}const E=bl(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,de=window.innerHeight-document.documentElement.clientHeight,ge=window.mathVirtualKeyboard.boundingRect.height,be=document.getElementById("mathlive-suggestion-popover");E.x+be.offsetWidth/2>re-ae?be.style.left=`${re-be.offsetWidth-ae}px`:E.x-be.offsetWidth/2<0?be.style.left="0":be.style.left=`${E.x-be.offsetWidth/2}px`;const Se=E.y-E.height;ee-de-ge-E.y<Se?(be.classList.add("ML__popover--reverse-direction"),be.classList.remove("top-tip"),be.classList.add("bottom-tip"),be.style.top=`${E.y-E.height-be.offsetHeight-15}px`):(be.classList.remove("ML__popover--reverse-direction"),be.classList.add("top-tip"),be.classList.remove("bottom-tip"),be.style.top=`${E.y+15}px`)}function Tu(a){a.suggestionIndex=0;const y=document.getElementById("mathlive-suggestion-popover");y&&(y.classList.remove("is-visible"),y.innerHTML="")}function Jm(a,y){let b=document.getElementById("mathlive-suggestion-popover");return b||(b=Ef("mathlive-suggestion-popover"),_s("suggestion-popover"),_s("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(Au(a,"reject"),ia.insert(a.model,ee.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),a.dirty=!0,a.focus())})),b.innerHTML=window.MathfieldElement.createHTML(y),b}function Qm(){document.getElementById("mathlive-suggestion-popover")&&(bh("mathlive-suggestion-popover"),x("suggestion-popover"),x("core"))}function eg(){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 y=a[1],b=y.match(/http.*\.ts[\?:]/);return b&&(y=a[2]),b=y.match(/(https?:.*):[0-9]+:[0-9]+/),b||(b=y.match(/at (.*(\.ts))[\?:]/),b||(b=y.match(/at (.*(\.mjs|\.js))[\?:]/))),b?b[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 "${y}").`),"")}var _f=null,y0,b0,wh=((b0=(y0=globalThis==null?void 0:globalThis.document)==null?void 0:y0.currentScript)==null?void 0:b0.src)||eg();function x0(a){return gc(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(_f===null)try{const y=yield fetch(wh,{method:"HEAD"});y.status===200&&(_f=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${wh}")`)}return new URL(a,_f!=null?_f:wh).href})}function tg(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var $s="not-loaded";function ng(){return gc(this,null,function*(){return $s="not-loaded",Lf()})}function Lf(){return gc(this,null,function*(){var a;if($s!=="not-loaded")return;if($s="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){$s="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const b=["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(b.every(ae=>E.includes(ae))){$s="ready";return}if(!window.MathfieldElement.fontsDirectory){$s="not-loaded";return}const ee=yield x0(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),$s="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=>tg(ae[0].replace(/-[a-zA-Z]+$/,""),`${ee}/${ae[0]}`,ae[1]));try{(yield Promise.all(re.map(de=>{try{return de.load()}catch(ge){}}))).forEach(de=>document.fonts.add(de)),$s="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")}$s="error"}})}function rg(a){let y=0;for(let b=0;b<a.length;b++)y=y*31+a.charCodeAt(b),y=y|0;return Math.abs(y)}function Mo(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Rs(a)&&a.dirty&&(a.atomBoundsCache=new Map,$c(a,y),a.atomBoundsCache=void 0)})))}function ig(a,y){var b;y=y!=null?y:{};const E=new La({from:me(we({},a.context),{atomIdsSettings:{seed:y.forHighlighting?rg(Vn.serialize([a.model.root],{expandMacro:!1,defaultMode:a.options.defaultMode})):"random",groupNumbers:(b=y.forHighlighting)!=null?b:!1},letterShapeStyle:a.options.letterShapeStyle}),mathstyle:a.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),ee=a.model.root.render(E);return vu(Cd(ee,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function w0(a,y){const{model:b}=a;b.root.caret=void 0,b.root.isSelected=!1,b.root.containsCaret=!0;for(const ee of b.atoms)ee.caret=void 0,ee.isSelected=!1,ee.containsCaret=!1;if(b.selectionIsCollapsed){const ee=b.at(b.position);ee.caret=a.model.mode;let re=ee.parent;for(;re;)re.containsCaret=!0,re=re.parent}else{const ee=b.getAtoms(b.selection,{includeChildren:!0});for(const re of ee)re.isSelected=!0}return ig(a,y).toMarkup()}function $c(a,y){if(!Rs(a))return;y!=null||(y={});const b=a.element.querySelector("[part=virtual-keyboard-toggle]");b&&(b.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,y);const de=a.element.querySelector("[part=menu-toggle]");if(de&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?de.style.display="none":de.style.display=""),a.model.atoms.length<=1){const ge=a.options.contentPlaceholder;ge&&(ae+=`<span part=placeholder class="ML__content-placeholder">${Yo(ge)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(ae),Af(a,y.interactive),a.dirty=!1}function Af(a,y){const b=a.field;if(!b)return;for(const de of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))de.remove();!(y!=null&&y)&&$s!=="error"&&$s!=="ready"&&setTimeout(()=>{$s==="ready"?Af(a):setTimeout(()=>Af(a),128)},32);const E=a.model,ee=b.offsetWidth,re=b.getBoundingClientRect().width;let ae=Math.floor(re)/ee;if(ae=isNaN(ae)?1:ae,E.selectionIsCollapsed){kf(a,{deferred:!0});let de=E.at(E.position);for(;de&&de.type!=="prompt"&&!(de.containsCaret&&de.displayContainsHighlight);)de=de.parent;if(de!=null&&de.containsCaret&&de.displayContainsHighlight){const ge=md(a,lc(a,de),ae);if(ge){ge.left/=ae,ge.right/=ae,ge.top/=ae,ge.bottom/=ae;const be=document.createElement("div");be.classList.add("ML__contains-highlight"),be.style.position="absolute",be.style.left=`${ge.left+1}px`,be.style.top=`${Math.ceil(ge.top)}px`,be.style.width=`${Math.ceil(ge.right-ge.left)}px`,be.style.height=`${Math.ceil(ge.bottom-ge.top)}px`,b.insertBefore(be,b.childNodes[0])}}return}for(const de of ag(vd(a,{excludeAtomsWithBackground:!0}))){de.left/=ae,de.right/=ae,de.top/=ae,de.bottom/=ae;const ge=document.createElement("div");ge.classList.add("ML__selection"),ge.style.position="absolute",ge.style.left=`${de.left}px`,ge.style.top=`${de.top}px`,ge.style.width=`${Math.ceil(de.right-de.left)}px`,ge.style.height=`${Math.ceil(de.bottom-de.top-1)}px`,b.insertBefore(ge,b.childNodes[0])}}function ag(a){let y=[];for(const b of a){let E=!1;for(const ee of y)if(b.left===ee.left&&b.right===ee.right&&b.top===ee.top&&b.bottom===ee.bottom){E=!0;break}E||y.push(b)}a=y,y=[];for(const b of a){let E=0;for(const ee of a)if(b.left>=ee.left&&b.right<=ee.right&&b.top>=ee.top&&b.bottom<=ee.bottom&&(E+=1,E>1))break;E===1&&y.push(b)}return y}var S0=3,Sl;function Ls(a,y){y=we({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),Sl||(Sl={});for(const b of Object.keys(a))console.assert(!Sl[b],"Selector already defined: ",b),Sl[b]=me(we({},y),{fn:a[b]})}function Sh(a){let y;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return Sh(a[1]);y=a[0]}else y=a;return y=y.replace(/-\w/g,b=>b[1].toUpperCase()),Sl[y]}function Iu(a){var y;return(y=Sh(a))==null?void 0:y.target}function og(a,y){var b;if(!y)return!1;let E,ee=[],re=!1,ae=!1;Oe(y)?(E=y[0],ee=y.slice(1)):E=y,E=E.replace(/-\w/g,be=>be[1].toUpperCase());const de=Sl[E],ge=de==null?void 0:de.target;if(ge==="model"){if(!a.isSelectionEditable&&(de!=null&&de.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Mf(a),Sl[E].fn(a.model,...ee),Ad(a),ae=!0,re=!0}else if(ge==="virtual-keyboard")ae=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,re=!0;else if(Sl[E]){if(!a.isSelectionEditable&&(de!=null&&de.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),ae=Sl[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return ge!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||de!=null&&de.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),de!=null&&de.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),ae&&Mo(a),re}function sg(a,y){var b;if(!a)return!1;a.focus(),vp.keypressVibration&&et()&&navigator.vibrate(S0);const E=Sh(y);window.MathfieldElement.playSound((b=E==null?void 0:E.audioFeedback)!=null?b:"keypress");const ee=a.executeCommand(y);return a.scrollIntoView(),ee}Ls({performWithFeedback:(a,y)=>sg(a,y)});function lg(a){return Ad(a,{atIndex:a.suggestionIndex+1}),!1}function cg(a){return Ad(a,{atIndex:a.suggestionIndex-1}),!1}Ls({complete:Au},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Ls({nextSuggestion:lg,previousSuggestion:cg},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Tf="mathlive#virtual-keyboard-message";function Ch(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Tf}var ug=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(y){this.sendMessage("update-setting",{alphabeticLayout:y})}set layouts(y){this.sendMessage("update-setting",{layouts:y})}get normalizedLayouts(){return[]}set editToolbar(y){this.sendMessage("update-setting",{editToolbar:y})}set actionKeycap(y){this.sendMessage("update-setting",{actionKeycap:y})}set shiftKeycap(y){this.sendMessage("update-setting",{shiftKeycap:y})}set backspaceKeycap(y){this.sendMessage("update-setting",{backspaceKeycap:y})}set tabKeycap(y){this.sendMessage("update-setting",{tabKeycap:y})}set container(y){throw new Error("Container inside an iframe cannot be changed")}show(y){this.sendMessage("show",y)}hide(y){this.sendMessage("hide",y)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(y){y?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(y){return this.sendMessage("execute-command",{command:y}),!0}updateToolbar(y){this.sendMessage("update-toolbar",y)}update(y){this.sendMessage("update-setting",y)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}handleEvent(y){if(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");this.handleMessage(y.data)}}handleMessage(y){const{action:b}=y;if(b==="execute-command"){const{command:E}=y;Iu(E)==="virtual-keyboard"&&this.executeCommand(E);return}if(b==="synchronize-proxy"){this._boundingRect=y.boundingRect,this._isShifted=y.isShifted;return}if(b==="geometry-changed"){this._boundingRect=y.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(y,b={}){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:Tf,action:y},b),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]"]]}},If={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"}]},Td;function M0(a,y){var b,E,ee;const re=fc.singleton;if(!re)return;const ae=Du(a),de=(E=(b=re.getKeycap(ae==null?void 0:ae.id))==null?void 0:b.variants)!=null?E:"";if(typeof de=="string"&&!E0(de)||Array.isArray(de)&&de.length===0){y==null||y();return}const ge={};let be="";for(const An of fg(de)){const kr=_0(An),Mn=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);ge[Mn]=kr;const[or,Dr]=Df(kr);be+=`<div id=${Mn} class="item ${Dr}">${or}</div>`}const Se=document.createElement("div");Se.setAttribute("aria-hidden","true"),Se.className="MLK__variant-panel",Se.style.height="auto";const $e=Object.keys(ge).length;let Ye=5;$e===1?Ye=1:$e===2||$e===4?Ye=2:$e===3||$e===5||$e===6?Ye=3:$e>=7&&$e<14&&(Ye=4),Se.style.width=`calc(var(--variant-keycap-length) * ${Ye} + 12px)`,Se.innerHTML=vp.createHTML(be),wl.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:Se}),Td=new AbortController;const{signal:xt}=Td,At=a==null?void 0:a.getBoundingClientRect();if(At){At.top-Se.clientHeight<0&&(Se.style.width="auto",$e<=6?Se.style.height="56px":$e<=12?Se.style.height="108px":$e<=18?Se.style.height="205px":Se.classList.add("compact"));const An=Math.max(0,Math.min(window.innerWidth-Se.offsetWidth,(At.left+At.right-Se.offsetWidth)/2)),kr=At.top-Se.clientHeight+5;Se.style.transform=`translate(${An}px, ${kr}px)`,Se.classList.add("is-visible"),requestAnimationFrame(()=>{Se.addEventListener("pointerup",Mn=>{const or=Du(Mn.target);!(or!=null&&or.id)||!ge[or.id]||(Mh(ge[or.id]),Id(),y==null||y(),Mn.preventDefault())},{capture:!0,passive:!1,signal:xt}),Se.addEventListener("pointerenter",Mn=>{const or=Du(Mn.target);!(or!=null&&or.id)||!ge[or.id]||or.classList.add("is-active")},{capture:!0,signal:xt}),Se.addEventListener("pointerleave",Mn=>{const or=Du(Mn.target);!(or!=null&&or.id)||!ge[or.id]||or.classList.remove("is-active")},{capture:!0,signal:xt}),window.addEventListener("pointercancel",()=>{Id(),y==null||y()},{signal:xt}),window.addEventListener("pointerup",()=>{Id(),y==null||y()},{signal:xt})})}}function Id(){Td==null||Td.abort(),Td=null,wl.state==="open"&&wl.close()}function dg(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(Ze))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+Ze[b]+'"></span>',command:["applyStyle",{color:b}]});return y}if(a==="background-color"){const y=[];for(const b of Object.keys(Ue))y.push({class:"swatch-button",label:'<span style="background:'+Ue[b]+'"></span>',command:["applyStyle",{backgroundColor:b}]});return y}}function E0(a){return If[a]!==void 0}function fg(a){var y;return typeof a!="string"?a:(If[a]||(If[a]=(y=dg(a))!=null?y:[]),If[a])}function hg(a){return typeof a=="string"?a:Object.entries(a).map(([y,b])=>`${y}:${b} !important`).join(";")}function pg(a){return Object.keys(a).map(y=>`${y} {${hg(a[y])}}`).join("")}function Dd(a){if(!a)return"";const y=new La,b=new Vn({mode:"math",type:"root",body:Xo(a,{context:y,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=gu(Cd(new Ir(b.render(y),{classes:"ML__base"}),y));return vu(E,{classes:"ML__latex"}).toMarkup()}function Pd(a){var y;if(Array.isArray(a))return a.map(E=>Pd(E)).flat();const b=typeof a=="string"?{markup:a}:a;return"rows"in b&&Array.isArray(b.rows)&&(b.rows=b.rows.map(E=>E.map(ee=>_0(ee)))),(y=b.id)!=null||(b.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[b]}function mg(){var a,y;let E=window.mathVirtualKeyboard.alphabeticLayout;if(E==="auto"){const de=_d();de&&(E=de.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[qe.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=(y=ee[E])!=null?y: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 de of re){const ge=[];for(const be of de)/[a-z]/.test(be)?ge.push({label:be,class:"hide-shift",shift:{label:be.toUpperCase()},variants:E0(be)?be:void 0}):be==="~"?E!=="dvorak"?ge.push("[backspace]"):ge.push({label:"[backspace]",width:1}):be==="^"?ge.push("[shift]"):be===" "&&ge.push("[separator-5]");ae.push(ge)}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:Pd({rows:ae})}}function k0(a){if(a==="alphabetic")return mg();if(typeof a=="string")return console.assert(C0[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),k0(C0[a]);let y;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=at(ee,["rows"]);y=me(we({},ae),{layers:Pd({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,ae=at(ee,["markup"]);y=me(we({},ae),{layers:Pd(a.markup)})}else y=we({},a),"layers"in a?y.layers=Pd(a.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let b=!1,E=!1;for(const ee of y.layers)if(ee.rows)for(const re of ee.rows.flat()){Pu(re)&&(b=!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)&&(y.displayShiftedKeycaps=b),(!("displayEditToolbar"in a)||a.displayEditToolbar===void 0)&&(y.displayEditToolbar=!E),y}function gg(a,y){var b,E;let ee='<div class="left">';if(a.normalizedLayouts.length>1)for(const[re,ae]of a.normalizedLayouts.entries()){const de=ae,ge=[re===y?"selected":"layer-switch"];de.tooltip&&ge.push("MLK__tooltip"),de.labelClass&&ge.push(...de.labelClass.split(" ")),ee+=`<div class="${ge.join(" ")}"`,de.tooltip&&(ee+=" data-tooltip='"+((b=ut(de.tooltip))!=null?b:de.tooltip)+"' "),re!==y&&(ee+=`data-layer="${de.layers[0].id}"`),ee+=`>${(E=de.label)!=null?E:"untitled"}</div>`}return ee+="</div>",ee}function vg(a,y){let b="";if(a.editToolbar==="none")return"";const ee=[];y.selectionIsCollapsed?ee.push("undo","redo","pasteFromClipboard"):ee.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const re={undo:`<div class='action ${y.canUndo===!1?"disabled":""}'
|
|
|
data-command='"undo"'
|
|
|
data-tooltip='${ut("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${ut("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${ut("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${ut("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${ut("tooltip.paste from clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-paste' /></svg>
|
|
|
</div>
|
|
|
`};return b+=ee.map(ae=>re[ae]).join(""),b}function yg(a){for(const y of a)bg(y)}function bg(a){const y=fc.singleton;if(!y)return;const b={};if(!a.id){if(a.hasAttribute("data-label")&&(b.label=a.dataset.label),a.hasAttribute("data-latex")&&(b.latex=a.dataset.latex),a.hasAttribute("data-key")&&(b.key=a.dataset.key),a.hasAttribute("data-insert")&&(b.insert=a.dataset.insert),a.hasAttribute("data-variants")&&(b.variants=a.dataset.variants),a.hasAttribute("data-aside")&&(b.aside=a.dataset.aside),a.className&&(b.class=a.className),!b.label&&!b.latex&&!b.key&&!b.insert&&(b.latex=a.innerText,b.label=a.innerHTML),a.hasAttribute("data-command"))try{b.command=JSON.parse(a.dataset.command)}catch(E){}a.id=y.registerKeycap(b)}if(!a.innerHTML){const[E,ee]=Df(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xg(){_s("virtual-keyboard"),_s("core"),Lf()}function wg(){x("core"),x("virtual-keyboard")}var Sg=`<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 Cg(a){a.resetKeycapRegistry(),xg();const y=document.createElement("div");y.className="ML__keyboard";const b=document.createElement("div");b.className="MLK__plate",b.innerHTML=window.MathfieldElement.createHTML(Sg+a.normalizedLayouts.map((ae,de)=>Mg(a,ae,de)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(b),y.appendChild(E),y.addEventListener("pointerdown",kg,{passive:!1});const ee=y.querySelectorAll(".ML__edit-toolbar");if(ee)for(const ae of ee)ae.addEventListener("click",de=>{var ge,be;let Se=de.target,$e="";for(;Se&&!$e;)$e=(ge=Se==null?void 0:Se.getAttribute("data-command"))!=null?ge:"",Se=(be=Se==null?void 0:Se.parentElement)!=null?be:null;$e&&a.executeCommand(JSON.parse($e))});yg(y.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const re=y.querySelectorAll(".MLK__layer");console.assert(re.length>0,"No virtual keyboards available");for(const ae of re)ae.addEventListener("pointerdown",de=>de.preventDefault());return a.currentLayer=a.latentLayer,y}function Mg(a,y,b){const E=[];if(!("layers"in y))return"";for(const ee of y.layers)E.push(`<div tabindex="-1" class="MLK__layer" id="${ee.id}">`),(a.normalizedLayouts.length>1||y.displayEditToolbar)&&(E.push("<div class='MLK__toolbar' role='toolbar'>"),E.push(gg(a,b)),y.displayEditToolbar&&E.push('<div class="ML__edit-toolbar right"></div>'),E.push("</div>")),E.push(Eg(a,ee)),E.push("</div>");return E.join("")}function Eg(a,y){if(typeof y=="string")return y;let b="";if(typeof y.style=="string"?b+=`<style>${y.style}</style>`:typeof y.style=="object"&&(b+=`<style>${pg(y.style)}</style>`),y.backdrop&&(b+=`<div class='${y.backdrop}'>`),y.container&&(b+=`<div class='${y.container}'>`),y.rows){b+="<div class=MLK__rows>";for(const E of y.rows){b+="<div dir='ltr' class=MLK__row>";for(const ee of E)if(ee){const re=a.registerKeycap(ee),[ae,de]=Df(ee);/(^|\s)separator/.test(de)?b+=`<div class="${de}"`:b+=`<div tabindex="-1" id="${re}" class="${de}"`,ee.tooltip&&(b+=` data-tooltip="${ee.tooltip}"`),b+=`>${ae}</div>`}b+="</div>"}b+="</div>"}else y.markup&&(b+=y.markup);return y.container&&(b+="</div>"),y.backdrop&&(b+="</div>"),b}function Df(a,y={shifted:!1}){var b,E,ee,re,ae,de,ge;let be="",Se=(b=a.class)!=null?b:"";if(y.shifted&&Pu(a)&&(Se+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?be=Dd(a.shift):typeof a.shift=="object"&&(be=a.shift.label?a.shift.label:(E=Dd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(Se=(re=(ee=a.shift.class)!=null?ee:a.class)!=null?re:"");else{if(be=a.label?a.label:(ae=Dd(a.latex||a.insert||"")||a.key)!=null?ae:"",a.shift){let $e;typeof a.shift=="string"?$e=Dd(a.shift):a.shift.label?$e=a.shift.label:$e=(de=Dd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?de:"",be+=`<span class="MLK__shift">${$e}</span>`}a.aside&&(be+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(Se)&&(Se+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(Se)||(Se+=" MLK__keycap"),!/\bw[0-9]+\b/.test(Se)&&a.width&&(Se+=(ge={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?ge:""),[be,Se||"MLK__keycap"]}var Fc={"[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 _0(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!Fc[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&Fc[a.label]&&(b=me(we(we({},Fc[a.label]),a),{label:Fc[a.label].label})),"key"in a&&a.key&&Fc[a.key]&&(b=me(we(we({},Fc[a.key]),a),{key:Fc[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=we(we({},b),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(b=we(we({},b),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(b=we(we({},b),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(b=we(we({},b),window.mathVirtualKeyboard.tabKeycap)),b):a}var Od;function kg(a){var y;if(a.button!==0)return;const b=fc.singleton;if(!b)return;let E=a.target;for(;E&&!E.getAttribute("data-layer");)E=E.parentElement;if(E){b.currentLayer=(y=E.getAttribute("data-layer"))!=null?y:"",a.preventDefault();return}const ee=Du(a.target);if(!(ee!=null&&ee.id))return;const re=b.getKeycap(ee.id);if(!re)return;console.assert(a.type==="pointerdown");const ae=new AbortController,de=ae.signal;ee.classList.add("is-pressed"),ee.addEventListener("pointerenter",Pf(ae),{capture:!0,signal:de}),ee.addEventListener("pointerleave",Pf(ae),{capture:!0,signal:de}),ee.addEventListener("pointercancel",Pf(ae),{signal:de}),ee.addEventListener("pointerup",Pf(ae),{signal:de}),Pu(re)&&(ee.classList.add("is-active"),b.shiftPressCount++),re.variants&&(Od&&clearTimeout(Od),Od=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),M0(ee,()=>{ae.abort(),ee==null||ee.classList.remove("is-active")}))},300)),a.preventDefault()}function Pf(a){return y=>{const b=Du(y.target);if(!(b!=null&&b.id))return;const E=fc.singleton;if(!E)return;const ee=E.getKeycap(b.id);if(ee){if(y.type==="pointerenter"&&y.target===b&&y.isPrimary&&b.classList.add("is-pressed"),y.type==="pointercancel"){b.classList.remove("is-pressed"),Pu(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted)),a.abort();return}if(y.type==="pointerleave"&&y.target===b){b.classList.remove("is-pressed"),Pu(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){Od&&clearTimeout(Od),Pu(ee)?b.classList.toggle("is-active",E.isShifted):b.classList.contains("is-pressed")&&(b.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"}]):Mh(ee.shift):Mh(ee),E.shiftPressCount===1&&!y.shiftKey&&(E.shiftPressCount=0)),a.abort(),y.preventDefault();return}}}}function Mh(a){var y;let b=a.command;!b&&a.insert&&(b=["insert",a.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!b&&a.key&&(b=["typedText",a.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!b&&a.latex&&(b=["insert",a.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),b||(b=["typedText",a.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(y=fc.singleton)==null||y.executeCommand(b)}function _g(a){if(a.nodeType!==1)return!1;const y=a.classList;return y.contains("MLK__keycap")||y.contains("shift")||y.contains("action")||y.contains("fnbutton")||y.contains("bigfnbutton")}function Du(a){if(!a)return;let y=a;for(;y&&!_g(y);)y=y.parentElement;return y!=null?y:void 0}function Pu(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var fc=class tm{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var y,b,E;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(b=(y=window.document)==null?void 0:y.body)!=null?b: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=L0();ae&&!ae.readOnly&&ae.mathVirtualKeyboardPolicy==="auto"&<()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",ee=>{ee.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{L0()||this.hide()},300)})}get currentLayer(){var y,b,E;return(E=(b=(y=this._element)==null?void 0:y.querySelector(".MLK__layer.is-visible"))==null?void 0:b.id)!=null?E:""}set currentLayer(y){var b;if(!this._element){this.latentLayer=y;return}let E=y?this._element.querySelector(`#${y}.MLK__layer`):null;E||(E=this._element.querySelector(".MLK__layer")),E&&((b=this._element.querySelector(".MLK__layer.is-visible"))==null||b.classList.remove("is-visible"),E.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(y){var b;this._shiftPressCount=y>2||y<0?0:y,(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(y){const b="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[b]=y,b}getKeycap(y){return y?this.keycapRegistry[y]:void 0}getLayer(y){const b=this.normalizedLayouts;for(const E of b)for(const ee of E.layers)if(ee.id===y)return ee}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(y){this._alphabeticLayout=y,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(y){this._actionKeycap=typeof y=="string"?{label:y}:y}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(y){this._shiftKeycap=typeof y=="string"?{label:y}:y}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(y){this._backspaceKeycap=typeof y=="string"?{label:y}:y}get tabKeycap(){return this._tabKeycap}set tabKeycap(y){this._tabKeycap=typeof y=="string"?{label:y}:y}get layouts(){return this._layouts}set layouts(y){this.updateNormalizedLayouts(y),this.rebuild()}updateNormalizedLayouts(y){const b=Array.isArray(y)?[...y]:[y],E=b.findIndex(ee=>ee==="default");E>=0&&b.splice(E,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(b),this._normalizedLayouts=b.map(ee=>k0(ee))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(y){this._editToolbar=y,this.rebuild()}get container(){return this._container}set container(y){this._container=y,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new tm}catch(y){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}get element(){return this._element}set element(y){var b;this._element!==y&&((b=this._element)==null||b.remove(),this._element=y)}get visible(){return this._visible}set visible(y){y?this.show():this.hide()}get boundingRect(){var y;if(!this._visible)return new DOMRect;const b=(y=this._element)==null?void 0:y.getElementsByClassName("MLK__plate")[0];return b?b.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var y,b;const E=this.boundingRect.height;if(this.container===document.body){(y=this._element)==null||y.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(b=this._element)==null||b.style.setProperty("--_keyboard-height",`${E}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const y=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=y,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const y=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(y&&(y.backdrop||y.container)));const b=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(b)for(const E of b){const ee=this.getKeycap(E.id);if(ee){const[re,ae]=Df(ee,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(re),E.className=ae}}}show(y){var b;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}),(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,y!=null&&y.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(y){var b;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}),Id(),wg(),(b=this._element)==null||b.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(E.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var y,b;return(b=(y=this.element)==null?void 0:y.offsetHeight)!=null?b:0}buildAndAttachElement(){var y;console.assert(!this.element),this.element=Cg(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",b=>{b.shiftKey||((b.ctrlKey||b.button===2)&&M0(b.target),b.preventDefault(),b.stopPropagation())},{capture:!0}),(y=this.container)==null||y.appendChild(this.element)}handleEvent(y){if(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");y.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:y.data.action!=="update-setting"&&y.data.action!=="proxy-created"&&y.data.action!=="execute-command"&&(console.assert(y.source!==void 0),this.connectedMathfieldWindow=y.source),this.handleMessage(y.data,y.source)}if(this._element)switch(y.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":y.button!==2&&y.preventDefault();break;case"keydown":{y.key==="Shift"&&!y.repeat&&(this.shiftPressCount=1);break}case"keyup":{(y.key==="Shift"||!y.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(y,b){const{action:E}=y;if(E==="execute-command"){const{command:ee}=y,re=Iu(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},b),E!=="disconnect"&&window===window.top){if(E==="show"){typeof y.animate!="undefined"?this.show({animate:y.animate}):this.show();return}if(E==="hide"){typeof y.animate!="undefined"?this.hide({animate:y.animate}):this.hide();return}if(E==="update-setting"){y.alphabeticLayout&&(this.alphabeticLayout=y.alphabeticLayout),y.layouts&&(this.layouts=y.layouts),y.editToolbar&&(this.editToolbar=y.editToolbar);return}if(E==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},b);return}}}sendMessage(y,b,E){if(E||(E=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||E===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:we({type:Tf,action:y},b)}));return}if(E)E.postMessage(we({type:Tf,action:y},b),{targetOrigin:this.targetOrigin});else if(b.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:b.command})),y==="execute-command"&&Array.isArray(b.command)&&b.command[0]==="insert"){const ee=b.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(y){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:y},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(y){const b=this._element;if(!b)return;b.classList.toggle("is-math-mode",y.mode==="math"),b.classList.toggle("is-text-mode",y.mode==="text"),b.classList.toggle("can-undo",y.canUndo),b.classList.toggle("can-redo",y.canRedo),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-paste",!0);const E=b.querySelectorAll(".ML__edit-toolbar");if(E)for(const ee of E)ee.innerHTML=vg(this,y)}update(y){this._style=y.style,this.updateToolbar(y)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(y){let b,E=[],ee=Iu(y);return Oe(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),ee=Iu(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?Sl[b].fn(void 0,...E):(this.sendMessage("execute-command",{command:y}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function L0(){var a,y;let b=Cf(),E=null;for(;b;){if("host"in b&&((y=(a=b.host)==null?void 0:a.tagName)==null?void 0:y.toLowerCase())==="math-field"){E=b.host;break}b=b.parentNode}return E}if(ht()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=fc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>ug.singleton,configurable:!0});function Of(a){const y={};for(const b of Object.keys(a))switch(b){case"scriptDepth":const E=a.scriptDepth;if(Oe(E))y.scriptDepth=[E[0],E[1]];else if(typeof E=="number")y.scriptDepth=[E,E];else if(typeof E=="string"){const[re,ae]=E.split(",").map(de=>parseInt(de.trim()));y.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=fc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>re})}ee="manual"}y.mathVirtualKeyboardPolicy=ee;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?qe.locale.startsWith("fr")?y.letterShapeStyle="french":y.letterShapeStyle="tex":y.letterShapeStyle=a.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(a.defaultMode)?y.defaultMode=a.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),y.defaultMode="math");break;case"macros":y.macros=rt(a.macros);break;default:Oe(a[b])?y[b]=[...a[b]]:typeof a[b]=="object"&&!(a[b]instanceof Element)&&b!=="computeEngine"?y[b]=we({},a[b]):y[b]=a[b]}return y}function zc(a,y){let b;typeof y=="string"?b=[y]:y===void 0?b=Object.keys(a):b=y;const E={};for(const ee of b)a[ee]===null?E[ee]=null:Oe(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 y=="string"?E[y]:E}function Rf(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:Pt,backgroundColorMap:Qe,letterShapeStyle:qe.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:lh,inlineShortcuts:ff,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sh,value:""}}function A0(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function hc(a,y){!a||!y||(Oe(a)?a.forEach(b=>hc(b,y)):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(y),hc(a.body,y),hc(a.above,y),hc(a.below,y),hc(a.subscript,y),hc(a.superscript,y)))}function Eh(a,y,b,E){function ee(ae,de){for(const ge of re)if(ge.style[ae]!==de)return!1;return!0}if(y=a.normalizeRange(y),y[0]===y[1])return!1;const re=a.getAtoms(y,{includeChildren:!0});E.operation==="toggle"&&(b.color&&ee("color",b.color)&&(b.color="none",delete b.verbatimColor),b.backgroundColor&&ee("backgroundColor",b.backgroundColor)&&(b.backgroundColor="none",delete b.verbatimBackgroundColor),b.fontFamily&&ee("fontFamily",b.fontFamily)&&(b.fontFamily="none"),b.fontSeries&&ee("fontSeries",b.fontSeries)&&(b.fontSeries="auto"),b.fontShape&&ee("fontShape",b.fontShape)&&(b.fontShape="auto"),b.fontSize&&ee("fontSize",b.fontSize)&&(b.fontSize=dl),b.variant&&ee("variant",b.variant)&&(b.variant="normal"),b.variantStyle&&ee("variantStyle",b.variantStyle)&&(b.variantStyle=""));for(const ae of re)ae.applyStyle(b);return!0}function Lg(a,y){const b=a.at(a.position);if(b.type==="composition")b.value=y;else{const{caret:E}=b;b.caret=void 0;const ee=new Wl(y,{mode:b.mode});ee.caret=E,b.parent.addChildAfter(ee,b),a.position+=1}}function Ag(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}ar(["math","displaymath"],Gs),ar("center",Gs),Nt("displaylines","",{parse:a=>{const y=[];let b=[];a.beginContext({tabular:!0});do{if(a.end()||a.match("<}>"))break;a.matchColumnSeparator()||a.matchRowSeparator()?(y.push([b]),b=[]):b.push(...a.scan(E=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(E)))}while(!0);return a.endContext(),y.push([b]),y},createAtom:a=>new sa("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),xr("array","{columns:colspec}",(a,y,b,E)=>new sa(a,kh(y),b,{columns:E[0],mathstyleName:"textstyle"})),xr(["equation","equation*","subequations"],"",(a,y,b)=>new sa(a,kh(y),b,{columns:[{align:"c"}]})),xr(["multline","multline*"],"",Gs),xr(["align","align*","aligned","eqnarray"],"",Gs),xr("split","",Gs),xr(["gather","gathered"],"",Gs),xr(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Gs),xr(["smallmatrix","smallmatrix*"],"[columns:colspec]",Gs),xr(["cases","dcases","rcases"],"",Gs);function Tg(a){for(const y of a)for(const b of y)if(b.length>0)return!1;return!0}function kh(a,y=1){return Tg(a)?Array(y).fill([[new Vn({type:"first"}),new Ki]]):a.map(b=>b.length===0?[[new Vn({type:"first"})]]:b.map(E=>E.length===0?[new Vn({type:"first"})]:(E[0].type!=="first"&&E.unshift(new Vn({type:"first"})),E)))}function Gs(a,y=[[[]]],b=[],E=[]){switch(y=kh(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new sa(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new sa(a,y,b,{mathstyleName:"textstyle"});case"center":return new sa(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new sa(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new sa(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new sa(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Kc(E[0])});case"bmatrix":case"bmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Kc(E[0])});case"Bmatrix":case"Bmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Kc(E[0])});case"vmatrix":case"vmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Kc(E[0])});case"Vmatrix":case"Vmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Kc(E[0])});case"matrix":case"matrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Kc(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new sa(a,y,b,{mathstyleName:"scriptstyle",columns:Kc(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new sa(a,y,b,{mathstyleName:a==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new sa(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new sa(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const de of y)ee=Math.max(ee,de.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 sa(a,y,b,{arraycolsep:0,columns:re,minColumns:2})}}return new sa(a,y,b,{mathstyleName:"textstyle"})}function Kc(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 Ig(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof sa);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof sa)){const E=a.at(a.position);if(b=E,!b.parent.parent){let ee=a.extractAtoms([a.position,a.lastOffset]),re=a.extractAtoms([0,a.position]);re.length===0&&(re=$f()),ee.length===0&&(ee=$f());let ae;return y.endsWith("column")?(ae=Gs("split",[[re,ee]]),a.root=ae,Hc(ae,0,0)?Wc(a,ae,0,0):Hc(ae,0,1)?Wc(a,ae,0,1):a.position=a.offsetOf(E)):(ae=Gs("lines",[[re],[ee]]),a.root=ae,Hc(ae,0,0)?Wc(a,ae,0,0):Hc(ae,1,0)?Wc(a,ae,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof Wa){const ee=b.parent;let re=a.extractAtoms([a.position,a.offsetOf(ee.lastChild)]),ae=a.extractAtoms([a.offsetOf(ee.firstChild),a.position]);ae.length===0&&(ae=$f()),re.length===0&&(re=$f());let de="pmatrix";const ge=ee.leftDelim,be=ee.rightDelim;ge==="("&&(be===")"||be==="?")?de="pmatrix":(ge==="["||ge==="\\lbrack")&&(be==="]"||be==="\\rbrack"||be==="?")?de="bmatrix":ge==="\\vert"&&be==="\\vert"?de="vmatrix":ge==="\\Vert"&&be==="\\Vert"?de="Vmatrix":(ge==="{"||ge==="\\lbrace")&&(be==="."||be==="?")&&(de="cases");const Se=Gs(de,y.endsWith("column")?[[ae,re]]:[[ae],[re]]);return ee.parent.addChildBefore(Se,ee),ee.parent.removeChild(ee),Hc(Se,0,0)?Wc(a,Se,0,0):y.endsWith("column")?Hc(Se,0,1)?Wc(a,Se,0,1):a.position=a.offsetOf(b):Hc(Se,1,0)?Wc(a,Se,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof sa?[b.parent,b.parentBranch]:[void 0,[0,0]]}function Hc(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Dg(a,y,b,E){const ee=y.getCell(b,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function Wc(a,y,b,E){const ee=Dg(a,y,b,E);typeof ee!="number"&&a.setSelection(ee)}function Nf(a,y,b,E,ee){const re=y.getCell(b,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function Bf(a,y){const[b,[E,ee]]=Ig(a,y);if(b)switch(y){case"after row":b.addRowAfter(E),Nf(a,b,E+1,0,"end");break;case"after column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnAfter(ee),Nf(a,b,E,ee+1,"end");break;case"before row":b.addRowBefore(E),Nf(a,b,E,0,"start");break;case"before column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnBefore(ee),Nf(a,b,E,ee,"start");break}}function T0(a){return a.contentWillChange({inputType:"insertText"})?(Bf(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pg(a){return a.contentWillChange({inputType:"insertText"})?(Bf(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function I0(a){return a.contentWillChange({inputType:"insertText"})?(Bf(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Og(a){return a.contentWillChange({inputType:"insertText"})?(Bf(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function D0(a,y){if(!a.contentWillChange({}))return!1;a.mathfield.snapshot();let b=".",E=".";switch(y){case"pmatrix":case"pmatrix*":b="(",E=")";break;case"bmatrix":case"bmatrix*":b="[",E="]";break;case"Bmatrix":case"Bmatrix*":b="\\lbrace",E="\\rbrace";break;case"vmatrix":case"vmatrix*":b="\\vert",E="\\vert";break;case"Vmatrix":case"Vmatrix*":b="\\Vert",E="\\Vert";break;case"matrix":case"matrix*":b=".",E=".";break;case"cases":case"dcases":b="\\lbrace";break;case"rcases":E="\\rbrace";break}const ee=a.at(a.position),re=ee.type==="array"?ee:a.parentEnvironment;return re.environmentName=y,re.leftDelim=b,re.rightDelim=E,a.contentDidChange({}),!0}function P0(a,y){let b=a.at(a.position);for(;b&&!(Array.isArray(b.parentBranch)&&b.parent instanceof sa);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof sa){const E=b.parent,ee=b.parentBranch;let re;switch(y){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 Rg(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function Ng(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}Ls({addRowAfter:T0,addColumnAfter:I0,addRowBefore:Pg,addColumnBefore:Og,removeRow:Rg,removeColumn:Ng,setEnvironment:D0},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function $f(){return[new Ki]}var O0=class nm{constructor(y){this.recording=!1,this.model=y,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(y){y&&this.index>=0&&(this.stack[this.index].selection=y),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(y){return this.recording?(y&&y===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=y!=null?y:"",!0):!1}};O0.maximumDepth=1e3;var Bg=O0;function _h(a,y,b){if(a.at(y).mode!=="text")return y;const E=b==="backward"?-1:1;let ee;if(he.test(a.at(y).value)){let re=y,ae;do ae=a.at(re).mode==="text"&&he.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(y).value)){let re=y;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=y;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 Ou(a,y,b){var E,ee,re,ae,de,ge,be;const Se=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let $e=a.at(a.position);if(y==="forward"&&($e.type==="subsup"?($e=$e.rightSibling,$e||($e=a.at(a.position+1))):$e=a.at(a.position+1)),!$e)return a.announce("plonk"),!1;let Ye=a.offsetOf($e);if($e instanceof al)Ye=_h(a,Ye,y);else if($e instanceof ns)if($e.isSuggestion)for(console.assert(y==="forward");$e&&$e instanceof ns;)$e.isSuggestion=!1,Ye=a.offsetOf($e),$e=$e.rightSibling;else if(y==="forward"){if($e=$e.rightSibling,!$e||!($e instanceof ns))return a.announce("plonk"),!1;for(;$e&&$e instanceof ns&&/[a-zA-Z\*]/.test($e.value);)Ye=a.offsetOf($e),$e=$e.rightSibling}else{if($e=$e.leftSibling,!$e||!($e instanceof ns))return a.announce("plonk"),!1;for(;$e&&$e instanceof ns&&/[a-zA-Z\*]/.test($e.value);)Ye=a.offsetOf($e),$e=$e.leftSibling}else if(y==="forward"&&$e.type==="mopen"){let xt=0;do $e.type==="mopen"?xt+=1:$e.type==="mclose"&&(xt-=1),$e=$e.rightSibling;while(!$e.isLastSibling&&xt!==0);Ye=a.offsetOf($e.leftSibling)}else if(y==="backward"&&$e.type==="mclose"){let xt=0;do $e.type==="mopen"?xt+=1:$e.type==="mclose"&&(xt-=1),$e=$e.leftSibling;while(!$e.isFirstSibling&&xt!==0);Ye=a.offsetOf($e)}else if(y==="backward")if($e.type==="first")for(;Ye>0&&$e.type==="first";)Ye-=1,$e=a.at(Ye);else{const xt=$e.type;$e.type==="subsup"&&(Ye=a.offsetOf(a.at(Ye).leftSibling)),Ye-=1;let At=(ee=a.at(Ye))==null?void 0:ee.type;for(;Ye>=0&&At===xt;)((re=a.at(Ye))==null?void 0:re.type)==="subsup"?Ye=a.offsetOf(a.at(Ye).leftSibling):Ye-=1,At=a.at(Ye).type}else{const{type:xt}=$e;let At=(ae=a.at(Ye))==null?void 0:ae.type;const{lastOffset:An}=a;for(;Ye<=An&&(At===xt||At==="subsup");){for(;((de=a.at(Ye).rightSibling)==null?void 0:de.type)==="subsup";)Ye=a.offsetOf(a.at(Ye).rightSibling);Ye+=1,At=(ge=a.at(Ye))==null?void 0:ge.type}Ye-=1}if((be=b==null?void 0:b.extend)!=null&&be){if(!a.setSelection(a.anchor,Ye))return a.announce("plonk"),!1}else{if(Ye===a.position)return a.announce("plonk"),!1;a.position=Ye}return a.announce("move",Se),a.mathfield.stopCoalescingUndo(),!0}function Cl(a,y,b){var E,ee;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[de,ge]=g0(a);de!==void 0&&ge!==void 0&&a.deleteAtoms([de,ge])}if(y==="upward")return Fg(a,b);if(y==="downward")return zg(a,b);if(b.extend){let de=Ff(a,a.position,y);de<0&&(de=0),de>a.lastOffset&&(de=a.lastOffset);const ge=a.setSelection(a.anchor,de);return a.mathfield.stopCoalescingUndo(),ge}if(a.selectionIsPlaceholder){a.collapseSelection(y);const de=Cl(a,y);return a.mathfield.stopCoalescingUndo(),de}let re=a.position;const ae=re;if(a.collapseSelection(y)?(re=a.position,R0(a,re)||(re=Ff(a,re,y))):re=Ff(a,re,y),re<0||re>a.lastOffset){let de=!0;return a.silenceNotifications||(de=(ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0),de&&a.announce("plonk"),de}return a.setPositionHandlingPlaceholder(re),a.mathfield.stopCoalescingUndo(),a.announce("move",ae),!0}function Ff(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||R0(a,y)?y:Ff(a,y,b)}function R0(a,y){var b;const E=a.at(y);let ee=E.parent;for(;ee&&!ee.inCaptureSelection;)ee=ee.parent;return!(ee!=null&&ee.inCaptureSelection||(b=E.parent)!=null&&b.skipBoundary&&(!E.isFirstSibling&&E.isLastSibling||E.type==="first")||a.mathfield.hasEditablePrompts&&!E.parentPrompt)}function $g(a,y,b){let E=1/0,ee=0;for(;ee<y.length;ee++){const re=Cu(a.getHTMLElement(y[ee])).right,ae=Math.abs(b-re);if(ae<=E)E=ae;else break}return y[ee-1]}function zf(a,y,b,E,ee){const re=a.mathfield.hasEditablePrompts,ae=re?b.filter(be=>be.type==="prompt"&&!be.captureSelection):b,de=Cu(a.mathfield.getHTMLElement(y)).right,ge=a.offsetOf($g(a.mathfield,ae,de))-(re?1:0);if(E){const[be,Se]=a.selection.ranges[0];let $e;ge<(ee==="up"?be:Se)?$e={ranges:[[ge,Se]],direction:"backward"}:$e={ranges:[[be,ge]],direction:"forward"},a.setSelection($e)}else a.setPositionHandlingPlaceholder(ge);a.announce(`move ${ee}`)}function Fg(a,y){var b,E;const ee=(b=y==null?void 0:y.extend)!=null?b:!1;ee||a.collapseSelection("backward");const re=()=>{var ge,be;let Se=!0;return a.silenceNotifications||(Se=(be=(ge=a.mathfield.host)==null?void 0:ge.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?be:!0),a.announce(Se?"plonk":"line"),Se},ae=a.at(a.position);let de=ae;for(;de&&de.parentBranch!=="below"&&!(Array.isArray(de.parentBranch)&&de.parent instanceof sa);)de=de.parent;if(Array.isArray(de==null?void 0:de.parentBranch)&&de.parent instanceof sa){const ge=de.parent;if(de.parentBranch[0]<1)return re();const be=de.parentBranch[0]-1,Se=ge.array[be][de.parentBranch[1]];if(!Se.some(Ye=>Ye.type==="prompt"&&!Ye.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,Se,ee,"up")}else if(de){const ge=(E=de.parent.branch("above"))!=null?E:de.parent.createBranch("above");if(!ge.some(Se=>Se.type==="prompt"&&Se.placeholderId)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ge,ee,"up")}else return re();return a.mathfield.stopCoalescingUndo(),!0}function zg(a,y){var b,E;const ee=(b=y==null?void 0:y.extend)!=null?b:!1;ee||a.collapseSelection("forward");const re=()=>{var ge,be;let Se=!0;return a.silenceNotifications||(Se=(be=(ge=a.mathfield.host)==null?void 0:ge.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?be:!0),a.announce(Se?"plonk":"line"),Se},ae=a.at(a.position);let de=ae;for(;de&&de.parentBranch!=="above"&&!(Array.isArray(de.parentBranch)&&de.parent instanceof sa);)de=de.parent;if(Array.isArray(de==null?void 0:de.parentBranch)&&de.parent instanceof sa){const ge=de.parent;if(de.parentBranch[0]+1>ge.array.length-1)return re();const be=de.parentBranch[0]+1,Se=ge.array[be][de.parentBranch[1]];if(!Se.some(Ye=>Ye.type==="prompt"&&!Ye.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,Se,ee,"down")}else if(de){const ge=(E=de.parent.branch("below"))!=null?E:de.parent.createBranch("below");if(!ge.some(Se=>Se.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ge,ee,"down")}else return re();return!0}function N0(a){const y=a.position,b=a.at(y).parent;return b!=null&&b.parent?(a.position=a.offsetOf(b),a.mathfield.stopCoalescingUndo(),a.announce("move",y),!0):(a.announce("plonk"),!1)}function Kg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!1):E=!0,b=b.parent;return E?y:0}function Hg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!0):E=!1,b=b.parent;return E?y:0}function B0(a){var y;if(a.collapseSelection(),Kg(a)>=a.mathfield.options.scriptDepth[1])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=b.rightSibling)==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new Zs({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function $0(a){var y;if(a.collapseSelection(),Hg(a)>=a.mathfield.options.scriptDepth[0])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=a.at(a.position+1))==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new Zs({style:a.at(a.position).computedStyle}),b),b=a.at(a.position+1)),b.createBranch("subscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.subscript[0]))),!0}function Wg(){function a(ge){const be=[],Se=[];return[...ge.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((Ye,xt)=>{const At=E(Ye);At===0?be.push(Ye):Se.push({documentOrder:xt,tabIndex:At,node:Ye})}),Se.sort((Ye,xt)=>Ye.tabIndex===xt.tabIndex?Ye.documentOrder-xt.documentOrder:Ye.tabIndex-xt.tabIndex).map(Ye=>Ye.node).concat(be)}function y(ge){return!(!b(ge)||ee(ge)||E(ge)<0)}function b(ge){return!(ge.disabled||ge.type==="hidden"&&ge.tagName.toUpperCase()==="INPUT"||de(ge))}function E(ge){var be;const Se=Number.parseInt((be=ge.getAttribute("tabindex"))!=null?be:"NaN",10);return Number.isNaN(Se)?ge.contentEditable==="true"||(ge.nodeName==="AUDIO"||ge.nodeName==="VIDEO")&&ge.getAttribute("tabindex")===null?0:ge.tabIndex:Se}function ee(ge){return ge.tagName.toUpperCase()==="INPUT"&&ge.type==="radio"&&!ae(ge)}function re(ge,be){for(const Se of ge)if(Se.checked&&Se.form===be)return Se;return null}function ae(ge){var be;if(!ge.name)return!0;const $e=((be=ge.form)!=null?be:ge.ownerDocument).querySelectorAll('input[type="radio"][name="'+ge.name+'"]'),Ye=re($e,ge.form);return!Ye||Ye===ge}function de(ge){if(!ht()||ge===document.activeElement||ge.contains(document.activeElement))return!1;if(getComputedStyle(ge).visibility==="hidden")return!0;const be=ge.getBoundingClientRect();if(be.width===0||be.height===0)return!0;for(;ge;){if(getComputedStyle(ge).display==="none")return!0;ge=ge.parentElement}return!1}return ht()?a(document.body):[]}function bs(a,y,b="forward"){const E=a.position;if(Array.isArray(y)){const ee=a.offsetOf(y[0]),re=a.offsetOf(y[y.length-1]);return b==="forward"?a.setSelection(ee,re):a.setSelection(re,ee),a.announce("move",E),a.mathfield.stopCoalescingUndo(),!0}return b==="forward"?bs(a,[y.leftSibling,y]):bs(a,[y,y.leftSibling])}function ll(a,y){const b=a.position;if(typeof y=="number"&&(y=a.at(y)),y.type==="prompt")a.setSelection(a.offsetOf(y.firstChild),a.offsetOf(y.lastChild));else{const E=a.offsetOf(y);y.type==="placeholder"?a.setSelection(E-1,E):a.position=E}return a.announce("move",b),a.mathfield.stopCoalescingUndo(),!0}function Kf(a,y,b=!0){var E,ee;const re=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Cl(a,y);let ae;const de=a.at(a.anchor).parentPrompt;de?y==="forward"?ae=a.offsetOf(de)+1:ae=a.offsetOf(de.leftSibling):ae=Math.max(a.position+re,0);const ge=Lh(a,ae,y);if(!ge||y==="forward"&&a.offsetOf(ge)<ae||y==="backward"&&a.offsetOf(ge)>ae){if(!b||!((ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))==null||ee))return a.announce("plonk"),!1;const Se=Wg();if(!document.activeElement||Se.length<=1)return a.announce("plonk"),!1;let $e=Se.indexOf(document.activeElement)+re;return $e<0&&($e=Se.length-1),$e>=Se.length&&($e=0),Se[$e].focus(),a.mathfield.stopCoalescingUndo(),!0}return ll(a,ge),!0}function Lh(a,y=0,b="forward"){return a.findAtom(E=>E.type==="placeholder"||E.type==="prompt"||!a.mathfield.readOnly&&E.treeDepth>2&&E.isFirstSibling&&E.isLastSibling,y,b)}Ls({moveToOpposite:a=>{const y={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},b=a.at(a.position),{parent:E}=b;if(!E)return a.announce("plonk"),!1;const ee=b.parentBranch;let re;if(typeof ee=="string"&&(re=y[ee]),!re){const de=b.subsupPlacement?$0(a):B0(a);return a.mathfield.stopCoalescingUndo(),de}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:y}=a.at(a.position);return y?(a.position=a.offsetOf(y),a.mathfield.stopCoalescingUndo(),!0):(a.announce("plonk"),!1)},moveAfterParent:a=>N0(a),moveToNextChar:a=>Cl(a,"forward"),moveToPreviousChar:a=>Cl(a,"backward"),moveUp:a=>Cl(a,"upward"),moveDown:a=>Cl(a,"downward"),moveToNextWord:a=>Ou(a,"forward"),moveToPreviousWord:a=>Ou(a,"backward"),moveToGroupStart:a=>{const y=a.offsetOf(a.at(a.position).firstSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:a=>{const y=a.offsetOf(a.at(a.position).lastSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:a=>{var y,b,E,ee;if(a.position===a.lastOffset&&a.anchor===a.lastOffset)return Kf(a,"forward");const re=a.at(a.position);if(re.mode==="text"){if(a.selectionIsCollapsed){let Ye=re;for(;Ye&&Ye.mode==="text";)Ye=Ye.leftSibling;let xt=re;for(;((y=xt.rightSibling)==null?void 0:y.mode)==="text";)xt=xt.rightSibling;if(Ye&&xt)return bs(a,[Ye,xt])}if(re.rightSibling.mode==="text"){let Ye=re;for(;Ye&&Ye.mode==="text";)Ye=Ye.rightSibling;return Ye?(ll(a,(b=Ye.leftSibling)!=null?b:Ye),a.mathfield.switchMode("math"),!0):ll(a,a.lastOffset)}}const de=a.at(a.anchor).parentPrompt,ge=de?a.offsetOf(de)+1:Math.max(a.position+1,0),be=Lh(a,ge,"forward");if(be)return ll(a,be);const Se=F0(a,re,Ye=>Ye.type==="leftright"||Ye.type==="text","forward");if(Se){if(Se.mode==="text"){let Ye=Se;for(;Ye&&Ye.mode==="text";)Ye=Ye.rightSibling;return bs(a,[(E=Se.leftSibling)!=null?E:Se,(ee=Ye.leftSibling)!=null?ee:Ye])}return bs(a,Se)}const $e=re.parent;if($e){if($e.type==="leftright"||$e.type==="surd")return bs(a,$e);if(re.parentBranch==="superscript"&&$e.subscript)return bs(a,$e.subscript);if(re.parentBranch==="above"&&$e.below)return bs(a,$e.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return ll(a,$e);if(re.parentBranch==="above"||re.parentBranch==="below")return bs(a,$e)}return ll(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return Kf(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let de=b;for(;de&&de.mode==="text";)de=de.leftSibling;let ge=b;for(;((y=ge.rightSibling)==null?void 0:y.mode)==="text";)ge=ge.rightSibling;if(de&&ge)return bs(a,[de,ge])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?ll(a,b):ll(a,0)}const ee=a.at(a.anchor).parentPrompt,re=ee?a.offsetOf(ee.leftSibling):Math.max(a.position-1,0),ae=Lh(a,re,"backward");if(ae)return ll(a,ae);if(E==="math"){const de=F0(a,b,be=>be.type==="leftright"||be.type==="text","backward");if(de){if(de.mode==="text"){let be=de;for(;be&&be.mode==="text";)be=be.leftSibling;return bs(a,[de,be])}return bs(a,de)}const ge=b.parent;if(ge){if(ge.type==="leftright"||ge.type==="surd")return bs(a,ge);if(b.parentBranch==="subscript"&&ge.superscript)return bs(a,ge.superscript);if(b.parentBranch==="below"&&ge.above)return bs(a,ge.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return ll(a,ge);if(b.parentBranch==="above"||b.parentBranch==="below")return bs(a,ge)}return ll(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:B0,moveToSubscript:$0},{target:"model",changeSelection:!0}),Ls({moveToNextPlaceholder:a=>Kf(a,"forward"),moveToPreviousPlaceholder:a=>Kf(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function F0(a,y,b,E){if(E==="forward"){let re=y.rightSibling;for(;re&&!b(re);)re=re.rightSibling;return re}let ee=y.leftSibling;for(;ee&&!b(ee);)ee=ee.leftSibling;return ee}function Hf(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ee=!1,re="";for(;!ee;){const ae=a.at(E);ee=y===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 b=="function"&&!b(ae),ee||(ae.mode="text",ae.command=ae.value,ae.verbatimLatex=void 0,re+=ae.value),E-=1,y-=1}a.contentDidChange({data:re,inputType:"insertText"})}function Uc(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ee=!1;const re=[];for(;!ee;){const ae=a.at(E);ee=y===0||!ae||ae.type==="first"||ae.isFirstSibling||ae.mode!=="text"||ae.value===" "||typeof b=="function"&&!b(ae),ee||(re.push(Vn.serialize([ae],{defaultMode:"math"})),ae.mode="math"),E-=1,y-=1}Ah(a),a.contentDidChange({data:ya(re),inputType:"insertText"})}function Ah(a){var y;let b=a.position-1;for(;b>=0&&((y=a.at(b))==null?void 0:y.mode)==="math";)b-=1;if(!(b<0)&&a.at(b).mode==="text"&&a.at(b).value===" "&&a.at(b-1).mode==="math"){a.at(b-1).parent.removeChild(a.at(b-1));const E=a.silenceNotifications;a.silenceNotifications=!0,a.position-=1,a.silenceNotifications=E,a.contentDidChange({inputType:"deleteContent"})}}function Ug(a){let y="",b=a.position,E=!1;for(;!E;){const ee=a.at(b);E=!(ee&&(ee.mode==="text"||ee.mode==="math"&&ee.type&&/mord|mpunct/.test(ee.type))),E||(y=ee.value+y),b-=1}return y}function jg(a,y,b){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!b||!Sf(b))return!1;const ee=Lu(b);if(!E.selectionIsCollapsed)return!!(a.model.mode==="text"&&/[/_^]/.test(ee));const re=Ug(E)+ee;if(a.model.mode==="text"){if(y==="Esc"||/[/\\]/.test(ee))return!0;if(/[\^_]/.test(ee))return/(^|\s)[a-zA-Z][^_]$/.test(re)&&Uc(E,1),!0;const ae={")":"(","}":"{","]":"["}[ee],{parent:de}=E.at(E.position);if(ae&&de instanceof Wa&&de.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 Uc(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){Uc(E,1);const ge=E.at(E.position);return ge.value="\u22C5",ge.style.variant="normal",ge.command="\\cdot",ge.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 Uc(E,1),!0;if(/\([a-z][,;]$/.test(re))return Uc(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Ah(E),!0}else{if(y==="[Space]")return Hf(E,void 0,ae=>/[a-z][:,;.]$/.test(ae.value)),!0;if(/[a-zA-Z]{3,}$/.test(re)&&!/(dxd|abc|xyz|uvw)$/.test(re))return Hf(E,void 0,ae=>/[a-zA-Z]/.test(ae.value)),!0;if(/(^|\W)(if)$/i.test(re))return Hf(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 Hf(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 Zg(a,y){if(!a.isSelectionEditable||!a.keystrokeCaptionVisible)return;const b=z0(),E=a.element.getBoundingClientRect();b.style.left=`${E.left}px`,b.style.top=`${E.top-64}px`,b.innerHTML=window.MathfieldElement.createHTML("<span>"+(vh(y)||y)+"</span>"+b.innerHTML),b.style.visibility="visible",setTimeout(()=>{b.childNodes.length>0&&b.childNodes[b.childNodes.length-1].remove(),b.childNodes.length===0&&(b.style.visibility="hidden")},3e3)}function Vg(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const y=z0();y.innerHTML=""}else{const y=Ef("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function z0(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(_s("keystroke-caption"),_s("core"),Ef("mathlive-keystroke-caption-panel"))}function Gg(){document.getElementById("mathlive-keystroke-caption-panel")&&(bh("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function K0(a,y){var b,E,ee;const{model:re}=a,ae=p0(y);if(y.isTrusted){Bm(y);const xt=_d();a.keyboardLayout!==xt.id&&(a.keyboardLayout=xt.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Zg(a,ae),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let de,ge="",be;const Se=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(ae==="[Backspace]")Se.pop();else if(!Sf(y))a.flushInlineShortcutBuffer();else{const xt=Lu(y),At=[...(E=(b=Se[Se.length-1])==null?void 0:b.keystrokes)!=null?E:[],xt];Se.push({state:re.getState(),keystrokes:At,leftSiblings:Xg(a)});let An=0,kr="";for(;!de&&An<At.length;)be=Se.length-(At.length-An),kr=At.slice(An).join(""),de=dd(Se[be].leftSiblings,kr,a.options.inlineShortcuts),!de&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(kr)&&(de=a.options.onInlineShortcut(a,kr)),An+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(de?a.switchMode("math"):jg(a,ae,y)&&(a.switchMode({math:"text",text:"math"}[re.mode]),ge=""))}if(!de){if(ge||(ge=Um(a.keybindings,re.mode,y)),!ge&&(ae==="[Enter]"||ae==="[Return]")){let xt=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(xt=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),xt||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),xt}if((!ge||ae==="[Space]")&&re.mode==="math"){if(ae==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return ia.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),ge="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const xt=re.at(re.position+1),At=re.at(re.position-1);if((xt==null?void 0:xt.mode)==="text"||(At==null?void 0:At.mode)==="text")return ia.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===","&&Lu(y)===","&&(ge="insertDecimalSeparator")}}if(!de&&!ge){if(re.mathfield.smartFence){if(Ih(re,Lu(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:xt}=re.at(re.position);if(xt instanceof Wa&&xt.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(ae))return a.snapshot(),xt.isDirty=!0,xt.rightDelim=ae,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:Lu(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!re.selectionIsCollapsed){const At=Lu(y);if(At==="("||At==="{"||At==="["){const An={"(":"(","{":"\\lbrace","[":"\\lbrack"}[At],kr={"(":")","{":"\\rbrace","[":"\\rbrack"}[At],[Mn,or]=Vo(re.selection);return a.snapshot(),re.position=or,ia.insert(re,kr,{format:"latex"}),re.position=Mn,ia.insert(re,An,{format:"latex"}),re.setSelection(Mn+1,or+1),re.contentDidChange({data:At,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const $e=re.at(Math.max(re.position,re.anchor)),{parent:Ye}=$e;if(ge==="moveAfterParent"&&(Ye==null?void 0:Ye.type)==="leftright"&&$e.isLastSibling&&a.options.smartFence&&Ih(re,".",a.defaultStyle)&&(ge="",Mo(a)),a.keyboardDelegate.cancelComposition(),ge)a.executeCommand(ge);else if(de){const xt=a.effectiveStyle;re.setState(Se[be].state);const At=Se[Se.length-1].keystrokes;for(const An of At)ia.insert(re,An,{silenceNotifications:!0,style:xt});a.snapshot("insert-shortcut"),re.setState(Se[be].state),re.deferNotifications({content:!0,selection:!0,data:de,type:"insertText"},()=>(ia.insert(re,de,{format:"latex",style:xt}),Ah(a.model),de.endsWith(" ")&&(a.switchMode("text"),ia.insert(re," ",{style:xt,mode:"text"})),a.snapshot(),re.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,re.announce("replacement")}return a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}function Th(a,y,b){const{model:E}=a;if(!a.isSelectionEditable){E.announce("plonk");return}b!=null||(b={}),b.focus&&a.focus(),b.feedback&&window.MathfieldElement.playSound("keypress"),typeof b.mode=="string"&&(a.switchMode(b.mode),a.snapshot());let ee=rf(y);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(ge=>ge.toUpperCase())),b.simulateKeystroke){let ge=!0;for(const be of ee)K0(a,new KeyboardEvent("keypress",{key:be}))&&(ge=!1);if(ge)return}const ae=E.at(E.position),de=we(we({},ae.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(Vo(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{Mf(a);for(const ge of ee)ia.insert(E,ge);a.snapshot("insert-latex"),Ad(a)});else if(E.mode==="text"){for(const ge of ee)ia.insert(E,ge,{style:de});a.snapshot("insert-text")}else if(E.mode==="math")for(const ge of ee)Yg(a,ge,de,ae);a.dirty=!0,a.scrollIntoView()}function Xg(a){const y=a.model,b=[];let E=y.at(Math.min(y.position,y.anchor));for(;E.type!=="first";)b.push(E),E=E.leftSibling;return b}function Yg(a,y,b,E){const ee=a.model;let re={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[y];if(y===" "&&a.options.mathModeSpace&&(re=["insert",a.options.mathModeSpace]),re){a.executeCommand(re);return}if(/\d/.test(y)&&a.options.smartSuperscript&&E.parentBranch==="superscript"&&E.parent.type!=="mop"&&E.parent.type!=="operator"&&E.parent.type!=="extensible-symbol"&&E.hasNoSiblings){qg(ee),ia.insert(ee,y,{style:b}),a.snapshot(),N0(ee),a.snapshot();return}if(/[a-zA-Z0-9]/.test(y)&&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)&&(b=we({},b),ae.style.variant&&(b.variant=ae.style.variant),ae.style.variantStyle&&(b.variantStyle=ae.style.variantStyle))}ia.insert(ee,y,{style:b}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function qg(a){a.selectionIsCollapsed||(a.deleteAtoms(Vo(a.selection)),a.mathfield.snapshot("delete"))}function Ih(a,y,b){if(!y||a.mode!=="math")return!1;const E=a.at(a.position),{parent:ee}=E,re={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[y];if(!re)return!1;const ae=te[re],de=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[ge,be]=Vo(a.selection),Se=a.extractAtoms([ge,be]),$e=ee.addChildrenAfter([new Wa("left...right",Se,{leftDelim:re,rightDelim:de})],a.at(ge));return a.setSelection(a.offsetOf($e.firstChild),a.offsetOf($e.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const ge=ee instanceof Wa?ee.leftDelim+ee.rightDelim:"";if(ge==="\\lbrace\\rbrace"||ge==="\\{\\}"||ge==="\\lbrace?")return a.mathfield.snapshot(),ia.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(de){if(ee instanceof Wa&&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 Wa)){let $e=E;for(;$e&&!($e.type==="mclose"&&$e.value===de);)$e=$e.rightSibling;if($e){a.mathfield.snapshot();const Ye=a.extractAtoms([a.offsetOf(E),a.offsetOf($e)]);return Ye.pop(),ee.addChildrenAfter([new Wa("left...right",Ye,{leftDelim:re,rightDelim:de})],E),a.position=a.offsetOf(ee.firstChild)+1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const ge=a.offsetOf(E.lastSibling);let be;for(be=a.position;be<=ge;be++){const $e=a.at(be);if($e instanceof Wa&&($e.leftDelim==="?"||$e.leftDelim===".")&&H0(re,$e.rightDelim))break}const Se=a.at(be);if(be<=ge&&Se instanceof Wa){Se.leftDelim=re,a.mathfield.snapshot();let $e=a.extractAtoms([a.position,be-1]);return $e=$e.filter(Ye=>Ye.type!=="first"),Se.addChildren($e,Se.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof Wa&&(ee.leftDelim==="?"||ee.leftDelim===".")&&H0(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const $e=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const Ye of $e)ee.parent.addChildBefore(Ye,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof Wa&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),ia.insert(a,`\\left${re}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const $e=a.offsetOf(E.lastSibling),Ye=a.extractAtoms([a.position,$e]);a.at(a.position).body=Ye,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(ae){let ge=E;for(;ge;){if(ge.type==="mopen"&&ge.value===ae){a.mathfield.snapshot();const xt=ge.leftSibling,At=a.extractAtoms([a.offsetOf(ge.leftSibling),a.offsetOf(E)]);At.shift();const An=new Wa("left...right",At,{leftDelim:ae,rightDelim:re});return ee.addChildrenAfter([An],xt),a.position=a.offsetOf(An),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}ge=ge.leftSibling}if(ee instanceof Wa&&E.isLastSibling&&Dh(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 be=a.offsetOf(E.firstSibling);let Se;for(Se=a.position;Se>=be;Se--){const xt=a.at(Se);if(xt instanceof Wa&&(xt.rightDelim==="?"||xt.rightDelim===".")&&Dh(xt.leftDelim,re))break}const $e=a.at(Se);if(Se>=be&&$e instanceof Wa)return a.mathfield.snapshot(),$e.rightDelim=re,$e.addChildren(a.extractAtoms([Se,a.position]),$e.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof Wa&&(ee.rightDelim==="?"||ee.rightDelim===".")&&Dh(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 Ye=ee.parent;return Ye instanceof Wa&&(Ye.rightDelim==="?"||Ye.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(Ye),Ih(a,re,b)):!1}return!1}function Dh(a,y){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y):ne[a]===y:!0}function H0(a,y){return y?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):te[y]===a:!0}Ls({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 y=a.field.getBoundingClientRect();return a.field.scroll(y.left-window.scrollX,0),!0},toggleKeystrokeCaption:Vg,toggleContextMenu:a=>{const y=a.toggleContextMenu();return y||a.model.announce("plonk"),y},plonk:a=>(a.model.announce("plonk"),!0),switchMode:(a,y,b,E)=>(a.switchMode(y,b,E),!0),insert:(a,y,b)=>a.insert(y,b),typedText:(a,y,b)=>(Th(a,y,b),!0),insertDecimalSeparator:a=>{const y=a.model;return y.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&y.at(Math.max(y.position,y.anchor)).isDigit()?(a.insert("{,}",{format:"latex"}),a.snapshot("insert-mord"),!0):(a.insert("."),!0)},commit:a=>{var y;return a.model.contentWillChange({inputType:"insertLineBreak"})&&((y=a.host)==null||y.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(a,y,b)=>{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[${y!=null?y:ee}]{}`,b),!0}}),Ls({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"}),Ls({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(y=>{y&&a.model.contentWillChange({inputType:"insertFromPaste",data:y})?(a.stopCoalescingUndo(),a.stopRecording(),a.insert(y,{mode:a.model.mode})&&(Ad(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Mo(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Jg(a,y){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const b=Ph(a,y),{model:E}=a;return E.selectionIsCollapsed?(a.defaultStyle.fontSeries&&b.fontSeries===a.defaultStyle.fontSeries&&(b.fontSeries="auto"),b.fontShape&&b.fontShape===a.defaultStyle.fontShape&&(b.fontShape="auto"),b.color&&b.color===a.defaultStyle.color&&(b.color="none"),b.backgroundColor&&b.backgroundColor===a.defaultStyle.backgroundColor&&(b.backgroundColor="none"),b.fontSize&&b.fontSize===a.defaultStyle.fontSize&&(b.fontSize="auto"),a.defaultStyle=we(we({},a.defaultStyle),b)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(ee=>Eh(E,ee,b,{operation:"toggle"})),a.snapshot("style-change")}),!0}Ls({applyStyle:Jg},{target:"mathfield",canUndo:!0,changeContent:!0});function Ph(a,y){var b,E,ee,re,ae,de,ge,be,Se,$e;const Ye={};if(typeof y.color=="string"){const At=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";At!==y.color&&(Ye.verbatimColor=(ee=y.verbatimColor)!=null?ee:y.color),Ye.color=At}if(typeof y.backgroundColor=="string"){const At=(ae=a.backgroundColorMap((re=y.backgroundColor)!=null?re:y.verbatimBackgroundColor))!=null?ae:"none";At!==y.backgroundColor&&(Ye.verbatimBackgroundColor=(de=y.verbatimBackgroundColor)!=null?de:y.backgroundColor),Ye.backgroundColor=At}typeof y.fontFamily=="string"&&(Ye.fontFamily=y.fontFamily),typeof y.series=="string"&&(Ye.fontSeries=y.series),typeof y.fontSeries=="string"&&(Ye.fontSeries=y.fontSeries.toLowerCase()),Ye.fontSeries&&(Ye.fontSeries=(ge={bold:"b",medium:"m",normal:"m"}[Ye.fontSeries])!=null?ge:Ye.fontSeries),typeof y.shape=="string"&&(Ye.fontShape=y.shape),typeof y.fontShape=="string"&&(Ye.fontShape=y.fontShape.toLowerCase()),Ye.fontShape&&(Ye.fontShape=(be={italic:"it",up:"n",upright:"n",normal:"n"}[Ye.fontShape])!=null?be:Ye.fontShape),y.variant&&(Ye.variant=y.variant.toLowerCase()),y.variantStyle&&(Ye.variantStyle=y.variantStyle.toLowerCase());const xt=(Se=y.size)!=null?Se:y.fontSize;return typeof xt=="number"?Ye.fontSize=Math.max(1,Math.min(10,xt)):typeof xt=="string"&&(Ye.fontSize=($e={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[xt.toLowerCase()])!=null?$e:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[xt]),Ye}function Oh(a){let[y,b]=Vo(a.selection);if(y=W0(a,y,"backward"),b=W0(a,b,"forward"),y===b){const E=a.at(y);if(E.type==="leftright")return a.setSelection(a.offsetOf(E.firstChild)-1,b);if(E.type==="first"&&(E.parent.type==="leftright"||E.parent.type==="surd"))return a.setSelection(y-1,a.offsetOf(E.parent.lastChild)+1);a.setSelection(y-1,b)}else a.setSelection(y,b);return!0}function W0(a,y,b){var E,ee,re;let ae=a.at(y);if(!ae)return y;const de=b==="forward"?1:-1;if(ae.mode==="text"){for(;ae&&!(ae.mode!=="text"||!he.test(ae.value));)y+=de,ae=a.at(y);return b==="backward"?y-1:y}if(ae.mode==="latex"){if(/[a-zA-Z\*]/.test(ae.value))if(b==="backward")for(;ae&&ae.mode==="latex"&&ae.value!=="\\"&&/[a-zA-Z]/.test(ae.value);)y+=de,ae=a.at(y);else for(;ae&&ae.mode==="latex"&&/[a-zA-Z\*]/.test(ae.value);)y+=de,ae=a.at(y);else if(ae.value==="{"){if(b==="forward"){for(;ae&&ae.mode==="latex"&&ae.value!=="}";)y+=de,ae=a.at(y);return y}return y-1}else if(ae.value==="}"){if(b==="backward"){for(;ae&&ae.mode==="latex"&&ae.value!=="{";)y+=de,ae=a.at(y);return y-1}return y}return y-1}if(ae.mode==="math"){if(ae.isDigit()){for(;(E=a.at(y+de))!=null&&E.isDigit();)y+=de;return b==="backward"?y-1:y}if(ae.style.variant||ae.style.variantStyle){let ge=(ee=a.at(y))==null?void 0:ee.style;for(;ge&&ge.variant===ae.style.variant&&ge.variantStyle===ae.style.variantStyle;)ge=(re=a.at(y+de))==null?void 0:re.style,y+=de;return b==="backward"?y-1:y}return y}return y}Ls({selectGroup:a=>{const y=Oh(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Cl(a,"forward",{extend:!0}),extendSelectionBackward:a=>Cl(a,"backward",{extend:!0}),extendToNextWord:a=>Ou(a,"forward",{extend:!0}),extendToPreviousWord:a=>Ou(a,"backward",{extend:!0}),extendSelectionUpward:a=>Cl(a,"upward",{extend:!0}),extendSelectionDownward:a=>Cl(a,"downward",{extend:!0}),extendToNextBoundary:a=>Ou(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>Ou(a,"backward",{extend:!0}),extendToGroupStart:a=>{const y=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).firstSibling));return y||a.announce("plonk"),y},extendToGroupEnd:a=>{const y=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).lastSibling));return y||a.announce("plonk"),y},extendToMathFieldStart:a=>{const y=a.setSelection(a.anchor,0);return y||a.announce("plonk"),y},extendToMathFieldEnd:a=>{const y=a.setSelection(a.anchor,a.lastOffset);return y||a.announce("plonk"),y}},{target:"model",changeSelection:!0});var jc=null,Rd=0,Wf=class Ys{static start(y,b,E,ee){var re;Ys.element=y,(re=Ys.controller)==null||re.abort(),Ys.controller=new AbortController;const ae={signal:Ys.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,ae),y.addEventListener("pointerup",ee,ae),y.addEventListener("pointercancel",ee,ae),Rh(b)&&(Ys.pointerId=b.pointerId,y.setPointerCapture(b.pointerId))):(window.addEventListener("mousemove",E,ae),window.addEventListener("blur",ee,ae),window.addEventListener("mouseup",ee,ae))}static stop(){var y;(y=Ys.controller)==null||y.abort(),Ys.controller=void 0,typeof Ys.pointerId=="number"&&(Ys.element.releasePointerCapture(Ys.pointerId),Ys.pointerId=void 0)}};function Rh(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function U0(a,y){var b;if(y.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let ee,re=!1,ae=!1,de="none",ge=!1,be=!1;const Se=y.clientX,$e=y.clientY,Ye=Date.now(),xt=E.field,At=setInterval(()=>{ge?xt.scroll({top:0,left:xt.scrollLeft-16}):be&&xt.scroll({top:0,left:xt.scrollLeft+16})},32);function An(){Wf.stop(),re=!1,clearInterval(At),a.element.classList.remove("tracking"),y&&y.preventDefault()}function kr(or){if(!E.hasFocus()){An();return}const Dr=or.clientX,pr=or.clientY,di=Rh(or)&&or.pointerType==="touch"?20:5;if(Date.now()<Ye+500&&Math.abs(Se-Dr)<di&&Math.abs($e-pr)<di){or.preventDefault(),or.stopPropagation();return}const Pi=xt.getBoundingClientRect();be=Dr>Pi.right,ge=Dr<Pi.left;let bi=ee;Rh(or)&&(or.isPrimary||(bi=Nd(E,or.clientX,or.clientY,{bias:0})));const Pa=Nd(E,Dr,pr,{bias:Dr<=Se?Dr===Se?0:-1:1});bi>=0&&Pa>=0&&(E.model.extendSelectionTo(bi,Pa),Mo(a)),ae&&Oh(E.model)}jc&&Math.abs(jc.x-Se)<5&&Math.abs(jc.y-$e)<5&&Date.now()<jc.time+500?(Rd+=1,jc.time=Ye):(jc={x:Se,y:$e,time:Ye},Rd=1);const Mn=xt.getBoundingClientRect();if(Se>=Mn.left&&Se<=Mn.right&&$e>=Mn.top&&$e<=Mn.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=Nd(a,Se,$e,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),y.shiftKey){const or=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),v0(a.model)||or?de="all":de="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),de="selection"):((b=a.model.at(ee).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(ee,ee+1),de="selection"):(a.model.position=ee,v0(a.model)?de="all":de="selection");a.defaultStyle={},y.detail===3||Rd>2?(An(),(y.detail===3||Rd===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},de="all")):re||(re=!0,Wf.start(xt,y,kr,An),(y.detail===2||Rd===2)&&(ae=!0,Oh(a.model),de="all"))}a.hasFocus()||(de="none",a.focus({preventScroll:!0}))}else jc=null;a.stopCoalescingUndo(),de!=="none"&&(a.model.selectionIsCollapsed&&(de="all"),Mo(a)),y.preventDefault()}function Qg(a,y,b){if(a>=b.left&&a<=b.right&&y>=b.top&&y<=b.bottom)return 0;const E=a-(b.left+b.right)/2,ee=y-(b.top+b.bottom)/2;return E*E+ee*ee}function j0(a,y,b,E,ee){if(!b.id)return[1/0,null];if(y.has(b.id))return y.get(b.id);const re=lc(a,b);if(!re)return[1/0,null];let ae=[1/0,null];if(b.hasChildren&&!b.captureSelection&&E>=re.left&&E<=re.right)for(const de of b.children){const ge=j0(a,y,de,E,ee);ge[0]<=ae[0]&&(ae=ge)}return ae[1]||(ae=[Qg(E,ee,re),b]),y.set(b.id,ae),ae}function ev(a,y,b){const[,E]=j0(a,new Map,a.model.root,y,b);return E}function Nd(a,y,b,E){var ee;const re=a.field.querySelector(".ML__latex").getBoundingClientRect();if(!re)return 0;if(y>re.right||b>re.bottom+8)return a.model.lastOffset;if(y<re.left||b<re.top-8)return 0;E=E!=null?E:{},E.bias=(ee=E.bias)!=null?ee:0;let ae=ev(a,y,b);const de=[];let ge=ae;for(;ge;)de.unshift(ge),ge=ge.parent;for(const Se of de)if(Se.captureSelection){ae=Se;break}let be=a.model.offsetOf(ae);if(be<0)return-1;if(ae.leftSibling)if(E.bias===0&&ae.type!=="placeholder"){const Se=lc(a,ae);Se&&y<(Se.left+Se.right)/2&&(be=a.model.offsetOf(ae.leftSibling))}else E.bias<0&&(be=a.model.offsetOf(ae.leftSibling));return be}var tv=class extends ia{constructor(){super("math")}onPaste(a,y){if(!y||!a.model.contentWillChange({data:typeof y=="string"?y:null,dataTransfer:typeof y=="string"?null:y,inputType:"insertFromPaste"}))return!1;let b="",E="auto",ee=typeof y!="string"?y.getData("application/json+mathlive"):"";if(ee)try{const re=JSON.parse(ee);if(re&&Array.isArray(re)){a.snapshot();const ae=dc(re),{model:de}=a;de.selectionIsCollapsed||de.deleteAtoms(Vo(de.selection));const ge=de.at(de.position);if(ge.parent instanceof sa){console.assert(ge.parentBranch!==void 0);const be=[];let Se=[];ae[0].type==="first"&&ae.shift(),ae[ae.length-1].type==="first"&&ae.pop();for(const At of ae)At.type==="first"&&Se.length>0?(be.push(Se),Se=[At]):Se.push(At);Se.length>0&&be.push(Se);let $e=Number(ge.parentBranch[0]),Ye=Number(ge.parentBranch[1]);const xt=ge.parent.maxColumns;for(;ge.parent.colCount-Ye<be.length&&ge.parent.colCount<xt;)ge.parent.addColumn();ge.parent.addChildrenAfter(be[0],ge);for(let At=1;At<be.length;At++)Ye++,Ye>=xt&&(Ye=0,ge.parent.addRowAfter($e),$e++),ge.parent.setCell($e,Ye,be[At])}else ge.parent.addChildrenAfter(ae.filter(be=>be.type!=="first"),ge);return de.position=de.offsetOf(ae[ae.length-1]),de.contentDidChange({inputType:"insertFromPaste"}),Mo(a),!0}}catch(re){}if(ee=typeof y!="string"?y.getData("application/json"):"",ee&&window.MathfieldElement.computeEngine)try{const re=JSON.parse(ee);if(typeof re=="object"&&"latex"in re&&re.latex&&(b=re.latex),!b){const ae=window.MathfieldElement.computeEngine.box(re);ae&&!ae.has("Error")&&(b=ae.latex)}b||(E="latex")}catch(re){}if(!b&&typeof y!="string"&&(b=y.getData("application/x-latex"),b&&(E="latex")),b||(b=typeof y=="string"?y:y.getData("text/plain")),b){let re;return[re,b]=yl(b),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),Mo(a)),a.startRecording(),!0}return!1}insert(a,y,b){var E,ee;const re=typeof y=="string"?y:(ee=(E=window.MathfieldElement.computeEngine)==null?void 0:E.box(y).latex)!=null?ee:"";if(!b.silenceNotifications&&!a.contentWillChange({data:re,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:ae}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const de=a.silenceNotifications;a.silenceNotifications=!0;const ge={"?":"\\placeholder{}","@":"\\placeholder{}"};ge[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Vo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.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 be=-1;ge[0]?ge["@"]=ge[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(be=rv(a),be>=0&&(ge["@"]=a.getValue(be,a.position,"latex"))),ge[0]||(ge[0]=ge["?"]);let Se=!1;const $e=Dr=>(Se=!0,ge[Dr]);let[Ye,xt]=Z0(a,y,$e,b);if(!xt)return!1;const At=xt.length===1&&xt[0].type==="genfrac";At&&be>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(ge["@"]=ge["?"],Se=!1,[Ye,xt]=Z0(a,y,$e,b)):be>=0&&a.deleteAtoms([be,a.position]);const{parent:An}=a.at(a.position),kr=An.hasEmptyBranch("body");if(At&&Ye!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&An instanceof Wa&&An.leftDelim==="("&&kr){const Dr=An.parent,pr=An.parentBranch;Dr.removeChild(An),Dr.setChildren(xt,pr)}const Mn=a.at(a.position);Mn.parent.addChildrenAfter(xt,Mn),Ye==="latex"&&typeof y=="string"&&(An==null?void 0:An.type)==="root"&&kr&&!Se&&(An.verbatimLatex=y),a.silenceNotifications=de;const or=xt[xt.length-1];if(b.selectionMode==="placeholder"){const Dr=xt.flatMap(pr=>[pr,...pr.children]).find(pr=>pr.type==="placeholder");if(Dr){const pr=a.offsetOf(Dr);a.setSelection(pr-1,pr),a.announce("move")}else or&&(a.position=a.offsetOf(or))}else b.selectionMode==="before"||(b.selectionMode==="after"?or&&(a.position=a.offsetOf(or)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(or)));return a.contentDidChange({data:re,inputType:"insertText"}),a.silenceNotifications=ae,!0}};function Z0(a,y,b,E){var ee;let re,ae=[];if(typeof y!="string"||E.format==="math-json"){const de=window.MathfieldElement.computeEngine;if(!de)return["math-json",[]];[re,y]=["latex",de.box(y).latex],ae=Xo(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([re,y]=Oc(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),ae=Xo(y,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Uf(ae)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,y]=Oc(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=yl(y)),ae=Xo(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Uf(ae));return hc(ae,E.style),[re!=null?re:"latex",ae]}function nv(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const y=a[0];return y instanceof Wa&&y.leftDelim==="("&&y.rightDelim===")"?y.removeBranch("body"):null}function Uf(a){if(a){for(let y=0;a[y];y++){const b=a[y];if(b instanceof Wa&&b.leftDelim==="("){let E=0,ee=0,re=0;for(let ae=0;b.body[ae];ae++)b.body[ae].type==="genfrac"&&(E++,ee=ae),re++;re===0&&E===1&&(a[y]=b.body[ee])}}for(const y of a){for(const b of y.branches)if(!y.hasEmptyBranch(b)){Uf(y.branch(b));const E=nv(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof sa)for(const b of y.cells)Uf(b)}}}function rv(a){let y=a.at(a.position);if(y.mode==="text"){for(;!y.isFirstSibling&&y.mode==="text";)y=y.leftSibling;return a.offsetOf(y)}const b=y;let E=!1;if(y.type==="mclose"){const ee=te[y.value];for(;!y.isFirstSibling&&!(y.type==="mopen"&&y.value===ee);)y=y.leftSibling;y.isFirstSibling||(y=y.leftSibling),E=!0}else y.type==="leftright"&&(y=y.leftSibling,E=!0);if(E)for(;!y.isFirstSibling&&(y.isFunction||V0(y));)y=y.leftSibling;else{const ee=[];for(;!y.isFirstSibling&&(V0(y)||ee.length>0);)y.type==="mclose"&&ee.unshift(y.value),y.type==="mopen"&&ee.length>0&&y.value===te[ee[0]]&&ee.shift(),y=y.leftSibling}return b===y?-1:a.offsetOf(y)}function V0(a){return a.isDigit()?!0:a.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(a.type)?!a.isExtensibleSymbol:!1}new tv;var iv=class extends ia{constructor(){super("text")}onPaste(a,y){if(!y)return!1;const b=typeof y=="string"?y:y.getData("text/plain");return b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b)&&(a.model.contentDidChange({inputType:"insertFromPaste"}),a.startRecording(),a.snapshot("paste"),Mo(a)),a.startRecording(),!0):!1}insert(a,y,b={}){if(!a.contentWillChange({data:y,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:E}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Vo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=av(y,a.mathfield.context);if(hc(re,b.style),!re)return!1;const ae=a.at(a.position),de=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(de)):de&&(a.position=a.offsetOf(de))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function av(a,y){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 "),Xo(a,{context:y,parseMode:"text"})}new iv;function Ml(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var fo=4,Cs=20,$o=2*(Cs+fo),jf=(a,y)=>`
|
|
|
<line x1="${a+Cs}" y1="${y+Cs}"
|
|
|
x2="${a>y?a+Cs:7*Cs+10*fo}"
|
|
|
y2="${a<y?y+Cs:7*Cs+10*fo}"/>
|
|
|
<svg id="plus" viewBox="0 0 40 40" x="${a}" y="${y}" 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>`,G0=(a,y)=>`
|
|
|
<line x1="${a+Cs}" y1="${y+Cs}"
|
|
|
x2="${a>y?a+Cs:7*Cs+10*fo}"
|
|
|
y2="${a<y?y+Cs:7*Cs+10*fo}"/>
|
|
|
<svg id="minus" viewBox="0 0 40 40" x="${a}" y="${y}" 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>`,Zf=(a,y,b)=>`
|
|
|
<svg id="arrow" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<g transform="rotate(${b})" 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>`,ov=`
|
|
|
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
viewBox=
|
|
|
"-2 -2 ${8*Cs+10*fo+5} ${8*Cs+10*fo+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${$o+fo}"
|
|
|
height="${3*$o}"
|
|
|
width="${$o}"
|
|
|
rx="${$o/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${$o+fo}"
|
|
|
y="0"
|
|
|
height="${$o}"
|
|
|
width="${3*$o}"
|
|
|
rx="${$o/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${Zf(2*(fo+$o),2*fo+3*$o,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${Zf(2*(fo+$o),2*fo+$o,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${Zf(2*fo+3*$o,2*(fo+$o),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${Zf(2*fo+$o,2*(fo+$o),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${jf(2*fo+$o,fo)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${G0(2*fo+2*$o,fo)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${jf(2*fo+3*$o,fo)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${jf(fo,2*fo+$o)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${G0(fo,2*fo+2*$o)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${jf(fo,2*fo+3*$o)}
|
|
|
</g>
|
|
|
</svg>`,sv=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>`,lv=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>`,cv=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>`,uv=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>`,dv=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>`,fv=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>`,hv=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>`,Nh={matrix:sv,pmatrix:lv,bmatrix:cv,Bmatrix:X0,vmatrix:uv,Vmatrix:dv},Bh={cases:fv,rcases:hv,Bmatrix:X0};function pv(a){var y,b;const E=(y=a.model.parentEnvironment)==null?void 0:y.array;if(!E)return;let ee=0;E.forEach(At=>{(!ee||At.length>ee)&&(ee=At.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Ef("mathlive-environment-popover"),_s("environment-popover"),_s("core"),re.setAttribute("aria-hidden","true"));let ae;const de=re.querySelector(".MLEP__environment-controls");de?ae=de:(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=ov;let ge=[],be="";const Se=a.model.parentEnvironment.environmentName;if(us(Se)){const At=gv(Se);be=Nh[At]("active");const An=Nh,{[At]:kr}=An,Mn=at(An,[De(At)]);ge=Object.values(Mn).map(or=>or("inactive"))}else if(ds(Se)){const At=vv(Se);be=Bh[At]("active");const An=Bh,{[At]:kr}=An,Mn=at(An,[De(At)]);ge=Object.values(Mn).map(or=>or("inactive"))}else Do(Se)&&(be=Nh.matrix("active"),ge=Object.values(Bh).map(At=>At("inactive")));const $e=document.createElement("div");$e.className="MLEP__environment-delimiter-controls",$e.style.display="flex",$e.style.flexDirection="column",$e.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${be}
|
|
|
${ge.join("")}
|
|
|
</div>`,be&&ae.appendChild($e),ae.querySelectorAll("[data-command]").forEach(At=>{const An=At.dataset.command;let kr=An;try{kr=JSON.parse(An)}catch(Mn){}At.addEventListener("mousedown",Mn=>Mn.preventDefault()),kr&&At.addEventListener("click",()=>a.executeCommand(kr))});const xt=(b=a.field)==null?void 0:b.getBoundingClientRect();xt&&(re.style.top=`${window.scrollY+(xt.top-re.clientHeight-15)}px`,re.style.left=`${xt.left+20}px`,re.classList.add("is-visible"))}function $h(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mv(){document.getElementById("mathlive-environment-popover")&&(bh("mathlive-environment-popover"),x("environment-popover"),x("core"))}function Vf(a){if(!a.hasFocus())return;let y=!1;if(a.model.mode==="math"){const b=a.model.parentEnvironment;if(b!=null&&b.array&&bo(b.environmentName)){const E=a.options.environmentPopoverPolicy;y=E==="auto"||E==="on"}}y?pv(a):$h()}function gv(a){return a.replace("*","")}function vv(a){return a==="dcases"?"cases":a}function Y0(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function q0(a,y,b){return y==="left"||y==="leading"&&b==="ltr"||y==="trailing"&&b==="rtl"?a.left:a.right}function Fh(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="rtl"||b==="end"&&E==="ltr"||b==="top"||b==="right"?Math.max(0,a-y):a}function yv(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="ltr"||b==="end"&&E==="rtl"||b==="top"||b==="right"?a:a-y}function bv(a,y){var b,E,ee;const re=(b=Y0(a))!=null?b:"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(),de=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let ge=Math.min(de,(E=y.height)!=null?E:ae.height),be=Fh(y.location.y,ge,y.verticalPos,re);be+ge>window.innerHeight-8&&(y.alternateLocation?(be=Fh(y.alternateLocation.y,ge,y.verticalPos,re),be+ge>window.innerHeight-8&&(be=void 0)):be=void 0),Number.isFinite(be)||(be=Math.max(8,window.innerHeight-8-ge),8+ge>window.innerHeight-8&&(a.style.bottom="8px")),ge=Math.min(be+ge,window.innerHeight-8)-be;const Se=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let $e=Math.min(Se,(ee=y.width)!=null?ee:ae.width),Ye=Fh(y.location.x,$e,y.horizontalPos,re);Ye+$e>window.innerWidth-8&&(y.alternateLocation?(Ye=yv(y.alternateLocation.x,$e,y.verticalPos,re),Ye+$e>window.innerWidth-8&&(Ye=void 0)):Ye=void 0),Number.isFinite(Ye)||(Ye=Math.max(8,window.innerWidth-8-$e),8+$e>window.innerWidth-8&&(a.style.right="8px")),$e=Math.min(Ye+$e,window.innerWidth-8)-Ye,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-Ye-$e).toString()}px`:a.style.left=`${Math.ceil(Ye).toString()}px`,a.style.top=`${Math.ceil(be).toString()}px`,ge!==ae.height&&(a.style.height=`${Math.ceil(ge).toString()}px`),$e!==ae.width&&(a.style.width=`${Math.ceil($e).toString()}px`)}function xv(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function Ru(a){return"submenu"in a}function El(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function zh(a){return"type"in a&&a.type==="divider"}function Kh(a){return"type"in a&&a.type==="heading"}var J0={};function Hh(a){let y=J0[a];if(!y){let b;switch(a){case"checkmark":b=`<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":b='<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":b='<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(b){const E=document.createElement("template");E.innerHTML=b,J0[a]=E,y=E}}if(y){if("content"in y)return y.content.cloneNode(!0);const b=document.createElement("svg");return b.innerHTML=y.innerHTML,b}}var Q0=80,ep=class{constructor(a,y){this._element=null;var b;this.parentMenu=y,this._declaration=a,Ru(a)?(this.type="submenu",this.submenu=new tp(a.submenu,{parentMenu:y,submenuClass:a.submenuClass,columnCount:a.columnCount})):this.type=(b=a.type)!=null?b:"command",this.hasCheck=El(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,y;(a=this._abortController)==null||a.abort(),this._abortController=void 0,(y=this._element)==null||y.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,y;return(y=(a=this.element)==null?void 0:a.classList.contains("active"))!=null?y:!1}set active(a){this.element&&this.element.classList.toggle("active",a)}updateState(a){var y,b,E;const ee=this._declaration;if(zh(ee)){this.enabled=!1,this.checked=!1;return}Kh(ee)&&(this.enabled=!1,this.checked=!1,this.visible=!0),El(ee)&&(this.checked=El(ee)&&((y=Nu(ee.checked,a))!=null?y:!1)),(El(ee)||Ru(ee))&&(this.enabled=(b=Nu(ee.enabled,a))!=null?b:!0,this.visible=(E=Nu(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(El(ee)||Kh(ee)||Ru(ee))&&(this.label=Nu(ee.label,a),this.tooltip=Nu(ee.tooltip,a),this.ariaLabel=Nu(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(Hh("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Hh("mixedmark"))):a.removeAttribute("aria-checked"),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel);const y=document.createElement("span");if(y.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&y.classList.add("heading"),y.innerHTML=this.label,a.append(y),this._tooltip&&a.setAttribute("data-tooltip",this._tooltip),El(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=vh(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(Hh("trailing-chevron"))}get element(){if(this._element)return this._element;if(zh(this._declaration)){const b=document.createElement("li");return b.setAttribute("part","menu-divider"),b.setAttribute("role","divider"),this._element=b,b}const a=document.createElement("li");this._element=a,(El(this._declaration)||Kh(this._declaration)||Ru(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 y=this.abortController.signal;return a.addEventListener("pointerenter",this,{signal:y}),a.addEventListener("pointerleave",this,{signal:y}),a.addEventListener("pointerup",this,{signal:y}),a.addEventListener("click",this,{signal:y}),this._element}dispatchSelect(){if(!El(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 y;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 b=a;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((y=this.parentMenu.activeMenuItem)!=null&&y.movingTowardSubmenu(b))?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 y;if(this.type!=="submenu"||!this.element)return;if((y=a==null?void 0:a.withDelay)!=null&&y){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const b=this.element.getBoundingClientRect(),E=Y0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:q0(b,"trailing",E),y:b.top-4},alternateLocation:{x:q0(b,"leading",E),y:b.top-4}})}movingTowardSubmenu(a){if(!this.element||this.type!=="submenu")return!1;const y=this.rootMenu.lastMoveEvent;if(!y)return!1;const b=a.timeStamp-y.timeStamp;if(b>500)return!1;const E=a.clientX-y.clientX;if(wv(E,y.clientY-a.clientY,b)<=.2)return!1;let re="right";if(this.submenu.element){const ae=this.submenu.element.getBoundingClientRect(),de=this.element.getBoundingClientRect();ae.left<de.left+de.width/2&&(re="left")}return re==="right"?E>0:E<0}};function wv(a,y,b){return Math.hypot(a,y)/b}function Nu(a,y){return a===void 0||typeof a!="function"?a:(y!=null||(y={alt:!1,control:!1,shift:!1,meta:!1}),a(y))}var tp=class Uu{constructor(y,b){this._element=null,this._activeMenuItem=null,this._dirty=!0;var E,ee;this.parentMenu=(E=b==null?void 0:b.parentMenu)!=null?E:null,this._submenuClass=b==null?void 0:b.submenuClass,this.columnCount=(ee=b==null?void 0:b.columnCount)!=null?ee:1,this.isSubmenuOpen=!1,this.menuItems=y}get children(){return this._menuItems}set menuItems(y){const b=this.parentMenu;this.dispose(),this.parentMenu=b,y=[...y],this._menuItems=y.map(E=>E.onCreate?E.onCreate(E,this):new ep(E,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var y;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(y=this._menuItems)==null||y.forEach(b=>b.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(y){if(y.type==="wheel"&&this._element){const b=y;this._element.scrollBy(0,b.deltaY),y.stopPropagation()}}dispatchEvent(y){return this.rootMenu.dispatchEvent(y)}get rootMenu(){return this.parentMenu.rootMenu}updateState(y){var b,E,ee;this._menuItems.forEach(be=>be.updateState(y));const re=this.hasCheck;this.hasCheck=this._menuItems.some(be=>be.visible&&be.hasCheck),this.hasCheck!==re&&this._menuItems.forEach(be=>be.updateState(y));let ae,de=0;for(const be of this._menuItems)be.type==="heading"?(ae&&de===0&&(ae.visible=!1),ae=be,de=0):be.type==="divider"&&ae?(ae.visible=de>0,ae=void 0,de=0):ae&&be.visible&&(de+=1);ae&&(ae.visible=de>0);let ge=!0;for(const be of this._menuItems)be.type==="divider"?(be.visible=!ge,ge=!0):be.visible&&(ge=!1);(b=this.activeMenuItem)!=null&&b.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(y=>y.type!=="divider"&&y.visible&&y.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(y=>y.type!=="divider"&&y.visible)}set dirty(y){console.assert(y===!0),this._dirty!==y&&y&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var y;if(this._element){this._element.textContent="";for(const{element:b,visible:E}of this._menuItems)b&&E&&this._element.append(b);(y=this._element.querySelector("li:first-of-type"))==null||y.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const y=document.createElement("menu");y.setAttribute("role","menu"),y.setAttribute("tabindex","-1"),y.setAttribute("aria-orientation","vertical"),y.setAttribute("part","ui-menu-container"),this._submenuClass&&y.classList.add(this._submenuClass),y.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const b=this._abortController.signal;return y.addEventListener("focus",this,{signal:b}),y.addEventListener("wheel",this,{passive:!0,signal:b}),this._element=y,this.updateElement(),y}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(y){var b,E,ee,re;if(this.rootMenu.cancelDelayedOperation(),y!==this._activeMenuItem){if(this.activeMenuItem){const ae=this.activeMenuItem;ae.active=!1,(b=ae.submenu)==null||b.hide()}if(!((E=y==null?void 0:y.visible)==null||E)){this._activeMenuItem=null;return}this._activeMenuItem=y,y&&(y.active=!0)}y?(ee=y.element)==null||ee.focus({preventScroll:!0}):(re=this._element)==null||re.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let y=0,b=!1;const E=this._menuItems;for(;!b&&y<=E.length-1;){const ee=E[y];b=ee.type!=="divider"&&ee.visible&&ee.enabled,y+=1}return b?E[y-1]:null}get lastMenuItem(){this.updateIfDirty();const y=this._menuItems;let b=y.length-1,E=!1;for(;!E&&b>=0;){const ee=y[b];E=ee.type!=="divider"&&ee.visible&&ee.enabled,b-=1}return E?y[b+1]:null}nextMenuItem(y){if(y===0)return this._activeMenuItem;if(!this._activeMenuItem)return y>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const b=this._menuItems.indexOf(this.firstMenuItem),E=this._menuItems.indexOf(this.lastMenuItem);let ee=this._menuItems.indexOf(this._activeMenuItem),re=1;for(;ee>=b&&ee<=E;){ee+=y>0?1:-1;const ae=this._menuItems[ee];if(!ae)break;if(ae.visible&&ae.enabled){if(re===Math.abs(y))return this._menuItems[ee];re+=1}}return y>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(y){this.updateIfDirty();const E=this._menuItems.filter(ee=>ee.visible&&ee.enabled).indexOf(y);return E<0?-1:E%this.columnCount}static get collator(){return Uu._collator||(Uu._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Uu._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(de=>de.type!=="divider"&&de.visible&&de.enabled);if(E.length===0)return null;const ee=Math.max(...E.map(de=>de.label.length))-y.length;if(ee<0)return null;let re=null,ae=0;for(;ae<ee&&!re;)re=(b=E.find(de=>Uu.collator.compare(y,de.label.substring(ae,y.length))===0))!=null?b:null,ae++;return re}show(y){return!this.visible||!y.container?!1:(this.updateElement(),y.container.appendChild(this.element),Vt()&&(this.element.popover="manual",this.element.showPopover()),y.location&&bv(this.element,{location:y.location,alternateLocation:y.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var y,b,E,ee,re;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),Vt()&&((y=this._element)!=null&&y.popover)&&this.element.hidePopover(),(E=(b=this.parentMenu)==null?void 0:b.element)==null||E.focus(),(re=(ee=this._element)==null?void 0:ee.parentNode)==null||re.removeChild(this._element)}set openSubmenu(y){var b,E,ee,re;const ae=y!==null;((b=this.activeMenuItem)==null?void 0:b.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(y,b){var E;super(y),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(E=b==null?void 0:b.host)!=null?E:null,this.isDynamic=y.some(rp),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(y){zm(this._modifiers,y)||(this._modifiers=y,this.dirty=!0)}get activeSubmenu(){let y=this;for(;y.isSubmenuOpen;)y=y.activeMenuItem.submenu;return y}set dirty(y){this._updating||(console.assert(y===!0),this._dirty!==y&&(this._dirty=!0,y&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(y){this._updating=!0,this.modifiers=y!=null?y:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(y){this.isDynamic&&(this.modifiers=Bc(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,ee;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Bc(y));let re=!0;const ae=this.activeSubmenu,de=ae.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":de==null||de.select(Bc(y));break;case"ArrowRight":if((de==null?void 0:de.type)==="submenu")de.select(Bc(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!de)ae.activeMenuItem=ae.firstMenuItem;else{const ge=(b=ae.getMenuItemColumn(de))!=null?b:-1;if(ge>=0&&ge<((E=ae.columnCount)!=null?E:1)-1){const be=ae.nextMenuItem(1);be&&(ae.activeMenuItem=be)}}break;case"ArrowLeft":if(ae===this.rootMenu)de||(ae.activeMenuItem=ae.firstMenuItem);else if((de&&(ee=ae.getMenuItemColumn(de))!=null?ee:-1)<=0||!de){ae.hide();const be=ae.parentMenu.activeMenuItem;if(be){const{element:Se}=be;Se==null||Se.focus(),Se==null||Se.classList.remove("is-submenu-open")}}else{const be=ae.nextMenuItem(-1);be&&(ae.activeMenuItem=be)}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 ge=ae.findMenuItem(this.typingBuffer);ge&&(ae.activeMenuItem=ge),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Sf(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const ge=ae.findMenuItem(this.typingBuffer);ge&&(ae.activeMenuItem=ge),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else re=!1}re&&(y.preventDefault(),y.stopPropagation())}handleEvent(y){if(y.type==="keydown")this.handleKeydownEvent(y);else if(y.type==="keyup")this.handleKeyupEvent(y);else if(y.type==="pointermove")this.lastMoveEvent=y;else if(y.type==="pointerup"&&y.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(y.type==="contextmenu"){y.preventDefault(),y.stopPropagation();return}super.handleEvent(y)}dispatchEvent(y){return this._host?this._host.dispatchEvent(y):!0}get scrim(){return wl.element}connectScrim(y){const b=this.scrim;b.addEventListener("pointerup",this),b.addEventListener("contextmenu",this),b.addEventListener("keydown",this),b.addEventListener("keyup",this),b.addEventListener("pointermove",this),wl.open({root:y,onDismiss:()=>this.hide()})}disconnectScrim(){const y=this.scrim;y.removeEventListener("pointerup",this),y.removeEventListener("contextmenu",this),y.removeEventListener("keydown",this),y.removeEventListener("keyup",this),y.removeEventListener("pointermove",this),wl.state==="open"&&wl.scrim.close()}get rootMenu(){return this}show(y){return this._onDismiss=y==null?void 0:y.onDismiss,y!=null&&y.modifiers&&(this.modifiers=y.modifiers),this.updateState(),this.connectScrim(y==null?void 0:y.target),super.show(me(we({},y),{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,wl.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(y){this.cancelDelayedOperation();const b=rm.SUBMENU_DELAY;if(b<=0){y();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,y()},b)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};np.SUBMENU_DELAY=120;var Sv=np;function rp(a){return zh(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(El(a)||Ru(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||El(a)&&typeof a.checked=="function"?!0:Ru(a)?a.submenu.some(rp):!1}var Gf=class{};Gf.DELAY=300,Gf.MAX_DISTANCE=10;function Cv(a){return new Promise((y,b)=>{const E=wf(a);E||y(!1);let ee=E;const re=setTimeout(()=>{ae.abort(),y(xv(ee,E)<Gf.MAX_DISTANCE)},Gf.DELAY),ae=new AbortController,de=ae.signal;for(const ge of["pointermove","pointerup","pointercancel"])window.addEventListener(ge,be=>{if(be.type==="pointerup"||be.type==="pointercancel")clearTimeout(re),ae.abort(),y(!1);else if(be.type==="pointermove"){const Se=wf(be);Se&&(ee=Se)}},{passive:!0,signal:de})})}function ip(a,y,b){return gc(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:wf(E),modifiers:Bc(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=y==null?void 0:y.getBoundingClientRect();if(ee&&b.show({target:y,location:{x:Math.ceil(ee.left+ee.width/2),y:Math.ceil(ee.top+ee.height/2)},modifiers:Bc(E)}))return a.preventDefault(),a.stopPropagation(),!0}}if(a.type==="pointerdown"&&a.pointerType!=="mouse"&&a.button===0){let E=a.target;for(;E&&y!==E;)E=E.parentNode;if(!E||!b.visible)return!1;const ee=wf(a);if(yield Cv(a))return b.state!=="closed"?!1:(b.show({target:y,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};Nt(Object.keys(ap),"{body:auto}",{createAtom:a=>new z(me(we({},a),{body:ft(a.args[0]),accentChar:ap[a.command.slice(1)]}))}),Nt(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=jt(ft(a.args[0]));return new z(me(we({},a),{body:ft(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),Nt(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(me(we({},a),{body:ft(a.args[0]),svgAccent:"overarc"}))}),Nt(["underarc","underparen"],"{body:auto}",{createAtom:a=>new Vs(me(we({},a),{body:ft(a.args[0]),svgBelow:"underarc"}))}),Nt("utilde","{body:auto}",{createAtom:a=>{const y=ft(a.args[0]),b=jt(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new Vs(me(we({},a),{body:y,svgBelow:E,boxType:rc(y)}))}}),Nt("^","{:string}",{createAtom:a=>{var y;return new Vn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[a.args[0]])!=null?y:"^"}))}}),Nt("`","{:string}",{createAtom:a=>{var y;return new Vn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[a.args[0]])!=null?y:"`"}))}}),Nt("'","{:string}",{createAtom:a=>{var y;return new Vn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[a.args[0]])!=null?y:"'"}))}}),Nt('"',"{:string}",{createAtom:a=>{var y,b;return new Vn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[a.args[0]])!=null?b:'"'+a.args[0]:'"'}))}}),Nt(".","{:string}",{createAtom:a=>{var y,b;return new Vn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[a.args[0]])!=null?b:"."+a.args[0]:"."}))}}),Nt("=","{:string}",{createAtom:a=>{var y,b;return new Vn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[a.args[0]])!=null?b:"="+a.args[0]:"="}))}}),Nt("~","{:string}",{createAtom:a=>{var y;return new Vn(me(we({type:"mord"},a),{isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[a.args[0]])!=null?y:"\xB4"}))}}),Nt("c","{:string}",{createAtom:a=>{var y;return new Vn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),Nt("enclose","{notation:string}[style:string]{body:auto}",{createAtom:a=>{var y,b;const E=a.args,ee={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(y=a.style)!=null?y:{}};if(E[1]){const ae=E[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const de of ae){const ge=de.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(ge)ee.strokeWidth=ge[1],ee.strokeStyle=ge[2],ee.strokeColor=ge[3];else{const be=de.match(/\s*([a-z]*)\s*=\s*"(.*)"/);be&&(be[1]==="mathbackground"?ee.backgroundcolor=be[2]:be[1]==="mathcolor"?ee.strokeColor=be[2]:be[1]==="padding"?ee.padding=be[2]:be[1]==="shadow"&&(ee.shadow=be[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((b=E[0])!=null?b:"").split(/[, ]/).filter(ae=>ae.length>0).forEach(ae=>{re[ae.toLowerCase()]=!0}),new bd(a.command,ft(E[2]),re,ee)}}),Nt("cancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ft(a.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Nt("bcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ft(a.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Nt("xcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ft(a.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Nt(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new Vs(me(we({},a),{body:ft((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),Nt("overbrace","{:auto}",{createAtom:a=>new Vs(me(we({},a),{body:ft(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),Nt(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new Vs(me(we({},a),{body:ft(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),Nt(["underbrace"],"{:auto}",{createAtom:a=>new Vs(me(we({},a),{body:ft(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),Nt(["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 y,b,E,ee,re;return new Vs(me(we({},a),{svgBody:a.command.slice(1),above:((b=ft((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:ft((E=a.args)==null?void 0:E[1]),below:(re=ft((ee=a.args)==null?void 0:ee[0]))!=null?re:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(a,y)=>a.command+(a.hasEmptyBranch("below")?"":`[${a.belowToLatex(y)}]`)+`{${a.aboveToLatex(y)}}${a.supsubToLatex(y)}`}),Nt(["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 Nc(a.command.slice(1),me(we({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),Nt(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new Nc({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],me(we({},a),{limits:"over-under",variant:"main"}))}),Nt(["lim","mod"],"",{ifMode:"math",createAtom:a=>new Nc(a.command.slice(1),me(we({},a),{limits:"over-under",variant:"main"}))}),Nt(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new Nc(a.command.slice(1),me(we({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),Nt(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`\\ang{${a.bodyToLatex(y)}}`,render:(a,y)=>{const b=a.createBox(y),E=b.caret;b.caret=void 0;const ee=new Ir("\xB0",{style:me(we({},a.style),{variant:"normal",variantStyle:"up"})});return new Ir([b,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),Nt("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new o0(me(we({},a),{body:ft(a.args[1]),index:a.args[0]?ft(a.args[0]):void 0}))}),Nt(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const y=we({},a),b=a.command,E=a.args;switch(b){case"\\dfrac":case"\\frac":case"\\tfrac":y.hasBarLine=!0;break;case"\\atopfrac":y.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":y.hasBarLine=!1,y.leftDelim="(",y.rightDelim=")";break;case"\\cfrac":y.hasBarLine=!0,y.continuousFraction=!0;break;default:}switch(b){case"\\dfrac":case"\\dbinom":y.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":y.mathstyleName="textstyle";break;default:}return new ku(E[0]?ft(E[0]):[new Ki],E[1]?ft(E[1]):[new Ki],y)},serialize:(a,y)=>{const b=a.aboveToLatex(y),E=a.belowToLatex(y);return/^[0-9]$/.test(b)&&/^[0-9]$/.test(E)?`${a.command}${b}${E}`:uo(a.command,b,E)}}),Nt(["brace","brack"],"",{infix:!0,createAtom:a=>new ku(ft(a.args[0]),ft(a.args[1]),me(we({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>ya([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Nt(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new ku(ft(E[0]),ft(E[1]),me(we({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>ya([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Nt(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:a=>{var y,b;const E=a.args;return new ku(ft(E[0]),ft(E[1]),me(we({},a),{leftDelim:(y=E[2])!=null?y:".",rightDelim:(b=E[3])!=null?b:".",hasBarLine:!1}))},serialize:(a,y)=>`${a.aboveToLatex(y)} ${a.command}${a.leftDelim}${a.rightDelim}${a.belowToLatex(y)}`}),Nt("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new ku(ft(a.args[0]),ft(a.args[1]),me(we({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),Nt(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:a=>new fh({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)],me(we({},a),{limits:"auto",variant:"main"}))}),Nt("smallint","",{ifMode:"math",createAtom:a=>new Nc("\u222B",me(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"};Nt(Object.keys(op),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=op[y.slice(1)];return new fh(b,me(we({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),Nt(["Re","Im"],"",{ifMode:"math",createAtom:a=>new Nc({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],me(we({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),Nt("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new r0(me(we({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),Nt("the","{:value}",{createAtom:a=>new Vn(me(we({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new La({parent:y},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new Ir(((b=Io(re))!=null?b:"").split("").map(ae=>new Ir(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 y;return`\\the${(y=Io(a.args[0]))!=null?y:"\\relax"}`}}),Nt("mathtip","{:auto}{:math}",{createAtom:a=>new hh(me(we({},a),{body:ft(a.args[0]),tooltip:ft(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Vn.serialize([a.tooltip],me(we({},y),{defaultMode:"math"}))}}`}),Nt("texttip","{:auto}{:text}",{createAtom:a=>new hh(me(we({},a),{body:ft(a.args[0]),tooltip:ft(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Vn.serialize([a.tooltip],me(we({},y),{defaultMode:"text"}))}}`}),Nt("error","{:math}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),Nt("ensuremath","{:math}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(me(we({},y),{defaultMode:"math"}))}}`}),Nt("color","{:value}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Io(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Nt("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Io(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Nt("boxed","{content:math}",{createAtom:a=>new ko(me(we({},a),{body:ft(a.args[0]),framecolor:{string:"black"}}))}),Nt("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimBackgroundColor:(E=Io(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((ee=y[0])!=null?ee:{string:"yellow"})}}}),Nt("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new ko(me(we({},a),{body:ft(a.args[2]),framecolor:(y=a.args[0])!=null?y:{string:"blue"},backgroundcolor:(b=a.args[1])!=null?b:{string:"yellow"}}))},serialize:(a,y)=>{var b,E;return y.skipStyles?a.bodyToLatex(me(we({},y),{defaultMode:"text"})):uo(a.command,(b=Io(a.framecolor))!=null?b:"",(E=Io(a.backgroundcolor))!=null?E:"",a.bodyToLatex(me(we({},y),{defaultMode:"text"})))}}),Nt("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=ft(a.args[1]);return b?new ko(me(we({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new ko(me(we({},a),{body:E}))},serialize:(a,y)=>{var b,E;if(y.skipStyles)return a.bodyToLatex(y);let ee=a.command;if(Number.isFinite(a.padding)||a.border!==void 0||a.backgroundcolor!==void 0){const re=[];a.padding&&re.push((b=Io(a.padding))!=null?b:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=Io(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return uo(ee,a.bodyToLatex(y))}}),Nt(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[0])})),render:(a,y)=>{const b=new La({parent:y,mathstyle:a.command.slice(1)},a.style),E=Vn.createBox(b,a.body,{type:"lift"});return a.caret&&(E.caret=a.caret),a.bind(y,E)},serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`{${ya([a.command,a.bodyToLatex(y)])}}`}),Nt(["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]})}),Nt("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),Nt("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),Nt("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),Nt("selectfont","",{ifMode:"text",applyStyle:()=>({})}),Nt("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),Nt(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),Nt("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),Nt("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Nt("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Nt("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Nt("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Nt("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Nt("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Nt("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Nt("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Nt("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),Nt("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Nt("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),Nt("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Nt("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),Nt("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),Nt("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),Nt("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),Nt("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),Nt("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),Nt("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),Nt("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),Nt("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),Nt("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),Nt("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),Nt("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),Nt("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),Nt("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),Nt(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),Nt(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),Nt("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),Nt("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),Nt("mbox","{:text}",{ifMode:"math",createAtom:a=>new Vn(me(we({},a),{type:"mord",body:ft(a.args[0]),mode:"math"})),serialize:(a,y)=>uo("\\mbox",a.bodyToLatex(me(we({},y),{defaultMode:"text"})))}),Nt("text","{:text}",{ifMode:"math",applyMode:"text"}),Nt(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>!a.args[0]||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`,render:(a,y)=>{var b;return a.createBox(y,{classes:(b=a.args[0])!=null?b:""})}}),Nt(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.cssId=(b=a.args[0])!=null?b:"",E}}),Nt("htmlData","{data:string}{content:auto}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`\\htmlData{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.htmlData=(b=a.args[0])!=null?b:"",E}}),Nt(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.htmlStyle=(b=a.args[0])!=null?b:"",E}}),Nt("em","{:rest}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`{\\em ${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__emph",boxType:"lift"})}),Nt("emph","{:auto}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\emph{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{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}};Nt(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var y;return new i0(me(we({},a),{delim:(y=a.args[0])!=null?y:".",size:sp[a.command].size,delimType:sp[a.command].mclass}))}}),Nt(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new Sd(me(we({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Nt(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new Sd(me(we({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Nt("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new Vn(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===Ic||E===ml)&&(b=1),(E===zl||E===ss)&&(b=2),(E===ks||E===Zo)&&(b=3);const ee=ft(a.args[b]);return Vn.createBox(y,ee)},serialize:(a,y)=>`\\mathchoice{${Vn.serialize(a.args[0],y)}}{${Vn.serialize(a.args[1],y)}}{${Vn.serialize(a.args[2],y)}}{${Vn.serialize(a.args[3],y)}}`}),Nt("mathop","{:auto}",{createAtom:a=>new Vn(me(we({},a),{type:"mop",body:ft(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,y)=>{var b;let E=Vn.createBox(y,a.body);if(a.superscript||a.subscript){const ee=(b=a.subsupPlacement)!=null?b:"auto";E=ee==="over-under"||ee==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return new Ir(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[uo(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ya(b)}}),Nt(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new Vn(me(we({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:ft(a.args[0])}))}),Nt(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=ft(a.args[0]).map(b=>{var E;return b.type!=="first"&&(b.type="mord",b.value=(E={"\u2217":"*","\u2212":"-"}[b.value])!=null?E:b.value,b.isFunction=!1,!b.style.variant&&!b.style.variantStyle&&(b.style.variant="main",b.style.variantStyle="up")),b});return new Vn(me(we({},a),{type:"mop",body:y,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,y)=>{var b;let E=Vn.createBox(y,a.body);if(a.superscript||a.subscript){const ee=(b=a.subsupPlacement)!=null?b:"auto";E=ee==="over-under"||ee==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return a.caret&&(E.caret=a.caret),new Ir(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[uo(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ya(b)}}),Nt(["char","unicode"],"{charcode:value}",{createAtom:a=>new Vn(me(we({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${Io((y=a.args[0])!=null?y:{number:10067,base:"hexadecimal"})}`},render:(a,y)=>{let b=y.evaluate(a.args[0]);return(!b||!("number"in b))&&(b={number:10067,base:"hexadecimal"}),a.value=String.fromCodePoint(b.number),a.createBox(y)}}),Nt("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new Vn(a),render:(a,y)=>{var b,E,ee;const re=new La({parent:y,mathstyle:"textstyle"},a.style),ae=re.toEm((b=a.args[0])!=null?b:{dimension:0}),de=re.toEm((E=a.args[1])!=null?E:{dimension:10}),ge=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),be=new Ir(null,{classes:"rule",type:"ord"});return be.width=de,be.height=ge+ae,be.depth=-ae,be.setStyle("border-right-width",de,"em"),be.setStyle("border-top-width",ge,"em"),be.setStyle("border-color",a.style.color),be.setStyle("vertical-align",ae,"em"),a.isSelected&&be.setStyle("opacity","50%"),a.bind(re,be),a.caret&&(be.caret=a.caret),be.wrap(y)},serialize:a=>`\\rule${a.args[0]?`[${Io(a.args[0])}]`:""}{${Io(a.args[1])}}{${Io(a.args[2])}}`}),Nt(["overline","underline"],"{:auto}",{createAtom:a=>new Vn(me(we({},a),{body:ft(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new La({parent:y,mathstyle:"cramp"},a.style),ee=Vn.createBox(E,a.body);if(!ee)return null;const re=E.metrics.defaultRuleThickness/E.scalingFactor,ae=new Ir(null,{classes:b+"-line"});ae.height=re,ae.maxFontSize=re*1.125*E.scalingFactor;let de;return b==="overline"?de=new Qa({shift:0,children:[{box:ee},3*re,{box:ae},re]}):de=new Qa({top:ee.height,children:[re,{box:ae},3*re,{box:ee}]}),a.caret&&(de.caret=a.caret),new Ir(de,{classes:b,type:"ignore"})}}),Nt("overset","{:auto}{base:auto}",{createAtom:a=>{const y=ft(a.args[1]);return new Vs(me(we({},a),{above:ft(a.args[0]),body:y,skipBoundary:!1,boxType:rc(y)}))},serialize:(a,y)=>uo(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Nt("underset","{:auto}{base:auto}",{createAtom:a=>{const y=ft(a.args[1]);return new Vs(me(we({},a),{below:ft(a.args[0]),body:y,skipBoundary:!1,boxType:rc(y)}))},serialize:(a,y)=>uo(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Nt("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=ft(a.args[2]);return new Vs(me(we({},a),{above:ft(a.args[0]),below:ft(a.args[1]),body:y,skipBoundary:!1,boxType:rc(y)}))},serialize:(a,y)=>uo(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Nt(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new Vs(me(we({},a),{body:ft(a.args[2]),above:ft(a.args[1]),below:ft(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>uo(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Nt("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,ee;return new wd(me(we({},a),{body:ft(a.args[1]),smashHeight:(b=(y=a.args[0])==null?void 0:y.includes("t"))!=null?b:!0,smashDepth:(ee=(E=a.args[0])==null?void 0:E.includes("b"))!=null?ee:!0}))}}),Nt(["vphantom"],"{:auto}",{createAtom:a=>new wd(me(we({},a),{body:ft(a.args[0]),isInvisible:!0,smashWidth:!0}))}),Nt(["hphantom"],"{:auto}",{createAtom:a=>new wd(me(we({},a),{body:ft(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),Nt(["phantom"],"{:auto}",{createAtom:a=>new wd(me(we({},a),{body:ft(a.args[0]),isInvisible:!0}))}),Nt("not","{:math}",{createAtom:a=>{const y=ft(a.args[0]);return y.length===0?new Vn(me(we({},a),{type:"mrel",value:"\uE020"})):new Vn(me(we({},a),{body:[new Rc(me(we({},a),{body:"\uE020",align:"right"})),...y],captureSelection:!0}))},serialize:(a,y)=>{const b=a.args[0],E=b&&typeof b=="object"&&"group"in b;return a.value!=="\uE020"?E?`\\not{${Vn.serialize(b.group,y)}}`:`\\not${Vn.serialize(b,y)}`:E?"\\not{}":"\\not"},render:(a,y)=>{if(a.value)return a.createBox(y);const E=a.args[0]&&typeof a.args[0]=="object"&&"group"in a.args[0]?"ord":rc(ft(a.args[0])),ee=Vn.createBox(y,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(y,ee)}}),Nt(["ne","neq"],"",{createAtom:a=>new Vn(me(we({},a),{type:"mrel",body:[new Rc(me(we({},a),{body:"\uE020",align:"right",boxType:"rel"})),new Vn(me(we({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),Nt("rlap","{:auto}",{createAtom:a=>new Rc(me(we({},a),{body:ft(a.args[0]),align:"right"}))}),Nt("llap","{:auto}",{createAtom:a=>new Rc(me(we({},a),{body:ft(a.args[0]),align:"left"}))}),Nt("mathrlap","{:math}",{createAtom:a=>new Rc(me(we({},a),{body:ft(a.args[0]),align:"left"}))}),Nt("mathllap","{:math}",{createAtom:a=>new Rc(me(we({},a),{body:ft(a.args[0]),align:"left"}))}),Nt("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new ko(me(we({},a),{body:ft(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return uo("\\raisebox",(b=Io(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Nt("raise","{:value}{:auto}",{createAtom:a=>{var y;return new ko(me(we({},a),{body:ft(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return uo("\\raise",(b=Io(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Nt("lower","{:value}{:auto}",{createAtom:a=>{var y;return new ko(me(we({},a),{body:ft(a.args[1]),padding:{dimension:0},offset:(y=js(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return uo("\\lower",(E=Io(js((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),Ae("0123456789/@.?!"),Ge(65,90),Ge(97,122),Ae([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),Ae([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),Ae([["\\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]]),Ae([["\\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"),Ae([["\\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"]]),Ae([["\\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"]]),Ae([["\\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"),Ae([["+",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"),Ae([["\\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"),Ae([["\\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]]),Ae([["=",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"),Ae([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),Ae([["\\wp",8472],["\\aleph",8501]]),Ae([["\\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"),Ae([["\\ ",160],["~",160]],"space"),Nt(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new Sd(a)}),Nt("space","",{createAtom:a=>new Sd(a)}),Ae([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),Ae([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),Ae([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var lp="<mo>⁡</mo>",Xf="<mo>⁢</mo>";function Yf(a){return a.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function no(a,y){return!a||!y.generateID?"":` extid="${a}"`}function Mv(a,y,b){var E,ee,re,ae,de,ge,be,Se,$e,Ye,xt;let At=!1;y=y!=null?y:a.atoms.length;let An="",kr="",Mn=a.atoms[a.index];const or=(ee=(E=Mn.style)==null?void 0:E.variant)!=null?ee:"",Dr=(ae=(re=Mn.style)==null?void 0:re.variantStyle)!=null?ae:"";let pr="";if(or||Dr){const Pi=Dn(Mn.value,(de=Mn.style)==null?void 0:de.variant,(ge=Mn.style)==null?void 0:ge.variantStyle);if(Pi!==Mn.value)return a.index+=1,An=`<mi${no(Mn.id,b)}>${Pi}</mi>`,jl(An,a,b)||(a.mathML+=An,a.lastType="mi"),!0;pr=(be={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"}[Dr+or])!=null?be:"",pr=` mathvariant="${pr}"`}const di={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(Mn.command==="!")return a.index+=1,An="<mo>!</mo>",jl(An,a,b)||(a.mathML+=An,a.lastType="mo"),!0;if(di[Mn.command]){a.index+=1;let Pi=`<mi${no(Mn.id,b)}${pr}>${di[Mn.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(Pi=Xf+Pi),jl(Pi,a,b)||(a.mathML+=Pi,a.lastType="mi"),!0}if(Mn.command==="\\operatorname")kr=Bu(Mn.body),a.index+=1;else if(or||Dr)for(;a.index<y&&(Mn.type==="mord"||Mn.type==="macro")&&!Mn.isDigit()&&or===(($e=(Se=Mn.style)==null?void 0:Se.variant)!=null?$e:"")&&Dr===((xt=(Ye=Mn.style)==null?void 0:Ye.variantStyle)!=null?xt:"");)kr+=Bu([Mn]),a.index+=1,Mn=a.atoms[a.index];else(Mn.type==="mord"||Mn.type==="macro")&&!Mn.isDigit()&&(kr+=Bu([Mn]),a.index+=1);if(kr.length>0){At=!0,An=`<mi${pr}>${kr}</mi>`;const Pi=a.lastType;An.endsWith(">f</mi>")||An.endsWith(">g</mi>")?(An+=lp,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(An)?"mo":"mi",jl(An,a,b)||((Pi==="mi"||Pi==="mn"||Pi==="mtext"||Pi==="fence")&&(An=Xf+An),a.mathML+=An)}return At}function Ev(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function kv(a){let y=-1,b=a.index,E=!1,ee=!1;for(;b<a.atoms.length&&!E&&!ee;){const re=a.atoms[b];E=!re.isDigit(),ee=!E&&re.superscript!==void 0,b++}return ee&&(y=b-1),y}function jl(a,y,b){var E;let ee=y.atoms[y.index-1];if(!ee)return!1;if(!ee.superscript&&!ee.subscript)if(((E=y.atoms[y.index])==null?void 0:E.type)==="subsup")ee=y.atoms[y.index],y.index+=1;else return!1;const re=y.lastType;y.lastType="";const ae=Ua(ee.superscript,b);y.lastType="";const de=Ua(ee.subscript,b);if(y.lastType=re,!ae&&!de)return!1;let ge="";return ae&&de?ge=`<msubsup>${a}${de}${ae}</msubsup>`:ae?ge=`<msup>${a}${ae}</msup>`:de&&(ge=`<msub>${a}${de}</msub>`),y.mathML+=ge,y.lastType="",!0}function _v(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="";for(;a.index<y&&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 ${no(a.atoms[E].id,b)}>${ee}</mtext>`,a.lastType="mtext",!0):!1}function Lv(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="",re=kv(a);for(re>=0&&re<y&&(y=re);a.index<y&&a.atoms[a.index].isDigit();)ee+=a.atoms[a.index].asDigit(),a.index+=1;return ee.length<=0?!1:(ee="<mn"+no(a.atoms[E].id,b)+">"+ee+"</mn>",re<0&&Ev(a)&&(re=a.index,a.index+=1),jl(ee,a,b)||(a.mathML+=ee,a.lastType="mn"),!0)}function Av(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";if(a.index<y&&a.atoms[a.index].type==="mopen"){let ae=!1,de=0;const ge=a.index;let be=-1,Se=ge+1;for(;Se<y&&!ae;)a.atoms[Se].type==="mopen"?de+=1:a.atoms[Se].type==="mclose"&&(de-=1),de===-1&&(ae=!0,be=Se),Se+=1;ae&&(ee="<mrow>",ee+=Zc(a.atoms[ge],b),ee+=Ua(a.atoms,b,ge+1,be),ee+=Zc(a.atoms[be],b),ee+="</mrow>",a.index=be+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=Xf),jl(ee,a,b)&&(E=!0,a.lastType="",ee=""),re="fence")}return ee.length>0&&(E=!0,a.mathML+=ee,a.lastType=re),E}function Tv(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";const ae=a.atoms[a.index];if(!ae)return!1;const de={"\\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(de[ae.command]){a.index+=1;const ge=`<mo${no(ae.id,b)}>${de[ae.command]}</mo>`;return jl(ge,a,b)||(a.mathML+=ge,a.lastType="mo"),!0}if(a.index<y&&(ae.type==="mbin"||ae.type==="mrel"))ee+=Wh(a.atoms[a.index],b),a.index+=1,re="mo";else if(a.index<y&&(ae.type==="mop"||ae.type==="operator"||ae.type==="extensible-symbol")){if(ae.subsupPlacement==="over-under"&&(ae.superscript||ae.subscript)){const ge=Zc(ae,b);return ae.superscript&&ae.subscript?(ee+="<munderover>"+ge,ee+=Ua(ae.subscript,b),ee+=Ua(ae.superscript,b),ee+="</munderover>"):ae.superscript?(ee+="<mover>"+ge,ee+=Ua(ae.superscript,b),ee+="</mover>"):ae.subscript&&(ee+="<munder>"+ge,ee+=Ua(ae.subscript,b),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const ge=a.atoms[a.index],be=ge.value==="\\operatorname",Se=be?'<mi class="MathML-Unit"'+no(ge.id,b)+">"+Bu(ge.value)+"</mi>":Zc(ge,b);ee+=Se,!be&&!/^<mo>(.*)<\/mo>$/.test(Se)?(ee+=lp,re="applyfunction"):re=be?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ee)&&(ee=Xf+ee),a.index+=1}return ee.length>0&&(E=!0,jl(ee,a,b)||(a.mathML+=ee,a.lastType=re)),E}function Ua(a,y,b,E){y!=null||(y={});const ee={atoms:[],index:b!=null?b: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 Vn)ee.mathML=Wh(a,y);else if(Array.isArray(a)){ee.atoms=a;let re=0;for(E=E||(a?a.length:0);ee.index<E;)if(_v(ee,E,y)||Lv(ee,E,y)||Mv(ee,E,y)||Tv(ee,E,y)||Av(ee,E,y))re+=1;else if(ee.index<E){let ae=Wh(ee.atoms[ee.index],y);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,jl(ae,ee,y)?re+=1:ae.length>0&&(ee.mathML+=ae,re+=1)}re>1&&(ee.mathML="<mrow>"+ee.mathML+"</mrow>")}return ee.mathML}function Zc(a,y){let b="";const E=Bu(a.value);return E&&(b="<mo"+no(a.id,y)+">"+E+"</mo>"),b}function Bu(a){if(!a)return"";if(typeof a=="string")return Yf(a);if(!Array.isArray(a)&&typeof a.body=="string")return Yf(a.body);let y="";for(const b of a)typeof b.value=="string"&&(y+=b.value);return Yf(y)}function Wh(a,y){var b,E,ee,re,ae,de,ge,be,Se,$e,Ye,xt,At,An,kr,Mn,or,Dr,pr,di,Pi,bi;if(a.mode==="text")return`<mi${no(a.id,y)}>${a.value}</mi>`;const Pa={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"},qa={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let Kr="",Fs="",_l,Xs,qo,zs,Ms,ro;const{command:Lo}=a;if(a.command==="\\error")return`<merror${no(a.id,y)}>${Ua(a.body,y)}</merror>`;const Jo={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Ll={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(a.type){case"first":break;case"group":case"root":Kr=Ua(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(Kr+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(Kr+="<mo>"+(Jo[a.leftDelim]||a.leftDelim)+"</mo>")),Kr+="<mtable",a.colFormat){for(Kr+=' columnalign="',qo=0;qo<a.colFormat.length;qo++)a.colFormat[qo].align&&(Kr+={l:"left",c:"center",r:"right"}[a.colFormat[qo].align]+" ");Kr+='"'}for(Kr+=">",Xs=0;Xs<a.array.length;Xs++){for(Kr+="<mtr>",_l=0;_l<a.array[Xs].length;_l++)Kr+="<mtd>"+Ua(a.array[Xs][_l],y)+"</mtd>";Kr+="</mtr>"}Kr+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(Kr+="<mo>"+(Jo[a.leftDelim]||a.rightDelim)+"</mo>"),Kr+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(Kr+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(Kr+="<mo"+no(a.id,y)+">"+(Jo[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(Kr+="<mfrac>",Kr+=Ua(a.above,y)||"<mi> </mi>",Kr+=Ua(a.below,y)||"<mi> </mi>",Kr+="</mfrac>"):(Kr+="<mtable"+no(a.id,y)+">",Kr+="<mtr>"+Ua(a.above,y)+"</mtr>",Kr+="<mtr>"+Ua(a.below,y)+"</mtr>",Kr+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(Kr+="<mo"+no(a.id,y)+">"+(Jo[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(Kr+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(Kr+="<msqrt"+no(a.id,y)+">",Kr+=Ua(a.body,y),Kr+="</msqrt>"):(Kr+="<mroot"+no(a.id,y)+">",Kr+=Ua(a.body,y),Kr+=Ua(a.above,y),Kr+="</mroot>");break;case"leftright":const Al=a,Tl=Al.leftDelim;Kr="<mrow>",Tl&&Tl!=="."&&(Kr+=`<mo${no(a.id,y)}>${(b=Jo[Tl])!=null?b:Tl}</mo>`),a.body&&(Kr+=Ua(a.body,y));const Il=Al.matchingRightDelim();Il&&Il!=="."&&(Kr+=`<mo${no(a.id,y)}>${(E=Jo[Il])!=null?E:Il}</mo>`),Kr+="</mrow>";break;case"sizeddelim":case"delim":Kr+=`<mo${no(a.id,y)}>${Jo[a.value]||a.value}</mo>`;break;case"accent":Kr+='<mover accent="true"'+no(a.id,y)+">",Kr+=Ua(a.body,y),Kr+="<mo>"+(Ll[Lo]||a.accent)+"</mo>",Kr+="</mover>";break;case"line":case"overlap":break;case"overunder":Ms=a.above,zs=a.below,(a.svgAbove||Ms)&&(a.svgBelow||zs)?ro=a.body:Ms&&Ms.length>0?(ro=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(zs=a.body[0].below,ro=a.body[0].body):((de=(ae=a.body)==null?void 0:ae[0])==null?void 0:de.type)==="first"&&((be=(ge=a.body)==null?void 0:ge[1])!=null&&be.below)&&(zs=a.body[1].below,ro=a.body[1].body)):zs&&zs.length>0&&(ro=a.body,($e=(Se=a.body)==null?void 0:Se[0])!=null&&$e.above?(Ms=a.body[0].above,ro=a.body[0].body):((xt=(Ye=a.body)==null?void 0:Ye[0])==null?void 0:xt.type)==="first"&&((An=(At=a.body)==null?void 0:At[1])!=null&&An.above)&&(Ms=a.body[1].overscript,ro=a.body[1].body)),(a.svgAbove||Ms)&&(a.svgBelow||zs)?(Kr+=`<munderover ${no(a.id,y)}>`,Kr+=(kr=Pa[a.svgBody])!=null?kr:Ua(ro,y),Kr+=(Mn=Pa[a.svgBelow])!=null?Mn:Ua(zs,y),Kr+=(or=Pa[a.svgAbove])!=null?or:Ua(Ms,y),Kr+="</munderover>"):a.svgAbove||Ms?(Kr+=`<mover ${no(a.id,y)}>`+((Dr=Pa[a.svgBody])!=null?Dr:Ua(ro,y)),Kr+=(pr=Pa[a.svgAbove])!=null?pr:Ua(Ms,y),Kr+="</mover>"):(a.svgBelow||zs)&&(Kr+=`<munder ${no(a.id,y)}>`+((di=Pa[a.svgBody])!=null?di:Ua(ro,y)),Kr+=(Pi=Pa[a.svgBelow])!=null?Pi:Ua(zs,y),Kr+="</munder>");break;case"placeholder":Kr+="?";break;case"mord":{Kr=typeof a.value=="string"?a.value:Lo,Lo==="\\char"?Kr="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":Kr.length>0&&Kr.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?Kr="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?Kr=a.value.charAt(0):(console.error("Did not expect this"),Kr=""));const cl=/\d/.test(Kr)?"mn":"mi";Kr=`<${cl}${no(a.id,y)}>${Yf(Kr)}</${cl}>`;break}case"mbin":case"mrel":case"minner":Kr=Zc(a,y);break;case"mpunct":Kr='<mo separator="true"'+no(a.id,y)+">"+Lo+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(Kr="<mo"+no(a.id,y)+">",Kr+=Lo==="\\operatorname"?a.body:Lo||a.body,Kr+="</mo>");break;case"box":Kr='<menclose notation="box"',a.backgroundcolor&&(Kr+=' mathbackground="'+a.backgroundcolor+'"'),Kr+=no(a.id,y)+">"+Ua(a.body,y)+"</menclose>";break;case"spacing":Kr+='<mspace width="'+((bi=qa[Lo])!=null?bi:0)+'em"/>';break;case"enclose":Kr='<menclose notation="';for(const cl in a.notation)Object.prototype.hasOwnProperty.call(a.notation,cl)&&a.notation[cl]&&(Kr+=Fs+cl,Fs=" ");Kr+=no(a.id,y)+'">'+Ua(a.body,y)+"</menclose>";break;case"prompt":Kr='<menclose notation="roundexbox""">'+Ua(a.body,y)+"</menclose>";break;case"space":Kr+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":Kr+=Zc(a,y);break;case"mclose":Kr+=Zc(a,y);break;case"macro":{const cl=a.command+Bu(a.macroArgs);cl&&(Kr+=`<mo ${no(a.id,y)}>${cl}</mo>`)}break;case"latexgroup":Kr+=Ua(a.body,y);break;case"latex":Kr+="<mtext"+no(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":Kr+=Ua(a.body,y);break;case"text":Kr+=`<mtext ${no(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${no(a.id,y)} displaystyle="true">${Ua(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${no(a.id,y)} displaystyle="false">${Ua(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return Kr}var $u={"\\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"},Uh={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 Iv(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function Bd(a){let y=0;if(Oe(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Dv(a){if(Oe(a)){for(const y of a)if(y.type!=="first"&&y.id)return y.id.toString()}return""}function cp(a){let y="";if(Oe(a))for(const b of a)b.type!=="first"&&typeof b.value=="string"&&(y+=b.value);return y}function Pv(a){return a?a.map(y=>y.value).join(""):""}function Ma(a,y){var b,E,ee,re,ae;function de(Se){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(Se)?` <say-as interpret-as="character">${Se}</say-as>`:/[A-Z]/.test(Se)?`capital <say-as interpret-as="character">${Se.toLowerCase()}</say-as>`:Se:/[a-z]/.test(Se)?" '"+Se.toUpperCase()+"'":/[A-Z]/.test(Se)?" 'capital "+Se.toUpperCase()+"'":Se}function ge(Se){return"<emphasis>"+Se+"</emphasis>"}if(!y)return"";let be="";if(Oe(y)){let Se=!1,$e=!1;for(let Ye=0;Ye<y.length;Ye++)y[Ye].type!=="first"&&(y[Ye].mode!=="text"&&($e=!1),Ye<y.length-2&&y[Ye].type==="mopen"&&y[Ye+2].type==="mclose"&&y[Ye+1].type==="mord"?(be+=" of ",be+=ge(Ma(a,y[Ye+1])),Ye+=2):y[Ye].mode==="text"?$e?be+=(b=y[Ye].value)!=null?b:" ":($e=!0,be+=Ma("text",y[Ye])):y[Ye].isDigit()?Se?be+=y[Ye].asDigit():(Se=!0,be+=Ma(a,y[Ye])):(Se=!1,be+=Ma(a,y[Ye])))}else if(y.mode==="text")y.id&&a==="math"&&(be+='<mark name="'+y.id.toString()+'"/>'),be+=y.value;else{y.id&&a==="math"&&(be+='<mark name="'+y.id.toString()+'"/>');let Se="",$e="",Ye="",xt=!1;const{command:At}=y;switch(At){case"\\vec":return"vector "+Ma(a,y.body);case"\\acute":return Ma(a,y.body)+" acute";case"\\grave":return Ma(a,y.body)+" grave";case"\\dot":return"dot over"+Ma(a,y.body);case"\\ddot":return"double dot over"+Ma(a,y.body);case"\\mathring":return"ring over"+Ma(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+Ma(a,y.body);case"\\bar":return Ma(a,y.body)+" bar";case"\\breve":return Ma(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+Ma(a,y.body);case"\\hat":case"\\widehat":return"hat over"+Ma(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+Ma(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+Ma(a,y.body)}switch(y.type){case"prompt":const An=y.body.length>1?'start input . <break time="500ms"/> '+Ma(a,y.body)+'. <break time="500ms"/> end input':"blank";be+=' <break time="300ms"/> '+An+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const kr=y.array,Mn=y.environmentName;if(Object.keys(Uh).includes(Mn)){be+=` begin ${Uh[Mn]} `;for(let pr=0;pr<kr.length;pr++){pr>0&&(be+=","),be+=` row ${pr+1} `;for(let di=0;di<kr[pr].length;di++)di>0&&(be+=","),be+=` column ${di+1}: `,be+=Ma("math",kr[pr][di])}be+=` end ${Uh[Mn]} `}break;case"group":At==="\\ne"?be+=" not equal ":(At==="\\not"&&(be+=" not "),be+=Ma("math",y.body));break;case"root":be+=Ma("math",y.body);break;case"genfrac":if(Se=Ma("math",y.above),$e=Ma("math",y.below),Bd(y.above)&&Bd(y.below)){const di={"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 "}[cp(y.above)+"/"+cp(y.below)];di?be=di:be+=Se+" over "+$e}else be+=' the fraction <break time="150ms"/>'+Se+' over <break time="150ms"/>'+$e+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(Ye=Ma("math",y.body),y.hasEmptyBranch("above"))be+=Bd(y.body)?" the square root of "+Ye+" , ":' the square root of <break time="200ms"/>'+Ye+'. <break time="200ms"/> End square root';else{let pr=Ma("math",y.above);pr=pr.trim();const di=pr.replace(/<mark([^/]*)\/>/g,"");di==="3"?be+=' the cube root of <break time="200ms"/>'+Ye+'. <break time="200ms"/> End cube root':di==="n"?be+=' the nth root of <break time="200ms"/>'+Ye+'. <break time="200ms"/> End root':be+=' the root with index: <break time="200ms"/>'+pr+', of <break time="200ms"/>'+Ye+'. <break time="200ms"/> End root'}break;case"leftright":{const pr=y;be+=(ee=pr.leftDelim?$u[pr.leftDelim]:void 0)!=null?ee:pr.leftDelim,be+=Ma("math",y.body),be+=(re=pr.rightDelim?$u[pr.rightDelim]:void 0)!=null?re:pr.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const or=At.replace(/^\\/g,""),Dr=cr()[or];Dr&&(Dr!=null&&Dr.expand?be+=Ma("math",y.body):be+=`${or} `);break;case"placeholder":be+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(At==="\\mathbin"||At==="\\mathrel"||At==="\\mathopen"||At==="\\mathclose"||At==="\\mathpunct"||At==="\\mathord"||At==="\\mathinner"){be=Ma(a,y.body);break}let pr=y.isDigit()?y.asDigit():y.value,di=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(di=y.value,pr=di),a==="text")be+=pr;else{if(y.type==="mbin"&&(be+='<break time="150ms"/>'),pr){const Pi=$u[pr]||(di?$u[di.trim()]:"");if(Pi)be+=" "+Pi;else{const bi=di?Iv(di.trim()):"";be+=bi||de(pr)}}else be+=Ma("math",y.body);y.type==="mbin"&&(be+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const pr=y.command;if(pr==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let di=Ma("math",y.superscript);di=di.trim();let Pi=Ma("math",y.subscript);Pi=Pi.trim(),be+=' the summation from <break time="200ms"/>'+Pi+'<break time="200ms"/> to <break time="200ms"/>'+di+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(y.hasEmptyBranch("subscript"))be+=" the summation of";else{let di=Ma("math",y.subscript);di=di.trim(),be+=' the summation from <break time="200ms"/>'+di+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(pr==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let di=Ma("math",y.superscript);di=di.trim();let Pi=Ma("math",y.subscript);Pi=Pi.trim(),be+=' the product from <break time="200ms"/>'+Pi+'<break time="200ms"/> to <break time="200ms"/>'+di+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(y.hasEmptyBranch("subscript"))be+=" the product of ";else{let di=Ma("math",y.subscript);di=di.trim(),be+=' the product from <break time="200ms"/>'+di+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(pr==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let di=Ma("math",y.superscript);di=di.trim();let Pi=Ma("math",y.subscript);Pi=Pi.trim(),be+=' the integral from <break time="200ms"/>'+ge(Pi)+'<break time="200ms"/> to <break time="200ms"/>'+ge(di)+' <break time="200ms"/> of ',xt=!0}else be+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const di=(ae=$u[y.value])!=null?ae:y.command?$u[y.command]:void 0;be+=di||" "+y.value}else y.command&&(y.command==="\\mathop"?be+=Ma("math",y.body):y.command==="\\operatorname"?be+=Pv(y.body):be+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":Ye=Ma("math",y.body),be+=" crossed out "+Ye+". End crossed out.";break;case"space":case"spacing":break}if(!xt&&!y.hasEmptyBranch("superscript")){let An=Ma(a,y.superscript);An=An.trim();const kr=An.replace(/<[^>]*>/g,"");if(Bd(y.superscript)){if(a==="math"){const Mn=Dv(y.superscript);Mn&&(be+='<mark name="'+Mn+'"/>')}kr==="\u2032"?be+=" prime ":kr==="2"?be+=" squared ":kr==="3"?be+=" cubed ":Number.isNaN(Number.parseInt(kr))?be+=" to the "+An+"; ":be+=' to the <say-as interpret-as="ordinal">'+kr+"</say-as> power; "}else Number.isNaN(Number.parseInt(kr))?be+=" raised to the "+An+"; ":be+=' raised to the <say-as interpret-as="ordinal">'+kr+"</say-as> power; "}if(!xt&&!y.hasEmptyBranch("subscript")){let An=Ma("math",y.subscript);An=An.trim(),be+=Bd(y.subscript)?" sub "+An:" subscript "+An+". End subscript. "}}return be}function Fu(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Ua(a);if(ee){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(y=window.MathfieldElement.textToSpeechRulesOptions)!=null?y:{},window.MathfieldElement.textToSpeechRulesOptions=me(we({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=me(we({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=me(we({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const re=(b=window.SRE)!=null?b:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&re.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let ae="";try{ae=re.toSpeech(ee)}catch(de){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",de)}return ae}return""}let E=Ma("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"&&Ee()==="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 $d={"\\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"},Fd={"\\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 Ov(a){let y="";for(const b of a){const E=y[y.length-1];E!==void 0&&/\d/.test(E)&&/^\d/.test(b)&&(y+=" "),y+=b}return y}function _o(a){var y,b,E,ee,re,ae,de,ge,be,Se,$e,Ye,xt;if(!a)return"";if(Oe(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(_o).join("");if(a[0].mode==="text"){let Dr=0,pr="";for(;((y=a[Dr])==null?void 0:y.mode)==="text";)pr+=a[Dr].body?_o(a[Dr].body):a[Dr].value,Dr++;return`"${pr}" ${_o(a.slice(Dr))}`}let Mn=0;const or=[];for(;a[Mn]&&a[Mn].mode==="math";){let Dr="";for(;a[Mn]&&a[Mn].type==="mord"&&/\d/.test(a[Mn].value);)Dr+=a[Mn++].value;Dr?or.push(Dr):or.push(_o(a[Mn++]))}return or.push(_o(a.slice(Mn))),Ov(or)}if(a.mode==="text")return`"${a.value}"`;let At="";const{command:An}=a;let kr;if(An==="\\placeholder")return`(${_o(a.body)})`;switch(a.type){case"accent":const Mn={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[An];At=`${Mn!=null?Mn:""} ${_o(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(bi=>bi.value).join("");case"group":case"root":At=(b=$d[An])!=null?b:_o(a.body);break;case"genfrac":{const bi=a;(bi.leftDelim||bi.rightDelim)&&(At=bi.leftDelim==="."||!bi.leftDelim?"{:":bi.leftDelim),bi.hasBarLine?(At+="(",At+=_o(bi.above),At+=")/(",At+=_o(bi.below),At+=")"):(At+="("+_o(bi.above)+"),",At+="("+_o(bi.below)+")"),(bi.leftDelim||bi.rightDelim)&&(At+=bi.rightDelim==="."||!bi.rightDelim?"{:":bi.rightDelim)}break;case"surd":At+=a.hasEmptyBranch("above")?"sqrt("+_o(a.body)+")":"root("+_o(a.above)+")("+_o(a.body)+")";break;case"latex":At=a.value;break;case"leftright":{const bi=a,Pa=bi.leftDelim;At+=Pa==="."||!Pa?"{:":Pa,At+=_o(bi.body);const qa=bi.matchingRightDelim();At+=qa==="."||!qa?":}":qa}break;case"sizeddelim":case"delim":At=a.value;break;case"overlap":break;case"overunder":break;case"mord":At=(ee=(E=$d[An])!=null?E:An)!=null?ee:typeof a.value=="string"?a.value:"",At.startsWith("\\")&&(At+=" "),kr=An?An.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,kr?At=String.fromCodePoint(Number.parseInt("0x"+kr[1])):At.length>0&&At.startsWith("\\")&&(At=typeof a.value=="string"?a.value.charAt(0):a.command),At=Rv(At,a.style);break;case"mbin":case"mrel":case"minner":At=(ae=(re=$d[An])!=null?re:Fd[An])!=null?ae:a.value;break;case"mopen":case"mclose":At=a.value;break;case"mpunct":At=(de=Fd[An])!=null?de:An;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(Fd[An]?At=Fd[An]:At=An==="\\operatorname"?_o(a.body):(ge=a.value)!=null?ge:An,At+=" ");break;case"array":const or=a.array,Dr=a.environmentName,pr=(be={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Dr])!=null?be:["(",")"],di=[];for(const bi of or){const Pa=[];for(const qa of bi)Pa.push(pr[0]+_o(qa)+pr[1]);di.push(Pa.join(","))}const Pi=(Se={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Dr])!=null?Se:["(",")"];At=Pi[0]+di.join(",")+Pi[1];break;case"box":break;case"spacing":At=($e=$d[An])!=null?$e:" ";break;case"enclose":At="("+_o(a.body)+")";break;case"space":At=" ";break;case"subsup":At="";break;case"macro":At=(xt=(Ye=$d[An])!=null?Ye:Fd[An])!=null?xt:_o(a.body);break}if(!a.hasEmptyBranch("subscript")){At+="_";const Mn=_o(a.subscript);At+=Mn.length!==1?`(${Mn})`:Mn}if(!a.hasEmptyBranch("superscript")){At+="^";const Mn=_o(a.superscript);At+=Mn.length!==1?`(${Mn})`:Mn}return At}function Rv(a,y){if(!y)return a;let b=a;return y.variant==="double-struck"&&(b=`bbb "${b}"`),y.variant==="script"&&(b=`cc "${b}"`),y.variant==="fraktur"&&(b=`fr "${b}"`),y.variant==="sans-serif"&&(b=`sf "${b}"`),y.variant==="monospace"&&(b=`tt "${b}"`),y.variantStyle==="bold"&&(b=`bb "${b}"`),y.color?`color({${y.color}})(${b})`:b}function Yo(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const ee=new La({from:me(we({},bu()),{renderPlaceholder:()=>new Ir(160,{maxFontSize:1}),letterShapeStyle:(E=y==null?void 0:y.letterShapeStyle)!=null?E:"tex"}),mathstyle:y.mathstyle}),ae=new Vn({mode:"math",type:"root",body:Xo(a,{context:ee,parseMode:"math",mathstyle:y.mathstyle})}).render(ee);return ae?(gu(Cd(ae,ee)),vu(ae,{classes:"ML__latex"}).toMarkup()):""}function _1(a){return t0(a,{context:bu()})}function Nv(a,y={}){return Ua(Xo(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function Bv(a){const y=Xo(a,{parseMode:"math",mathstyle:"displaystyle"});return Fu(y)}var qf;function $v(a){var y,b;if(!qf){const E=(y=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;E?qf=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(b=qf==null?void 0:qf.box(a).latex)!=null?b:""}function L1(a,y="math"){return _o(new Vn({type:"root",body:Xo(a,{parseMode:y})}))}function A1(a){return Oc(a,{format:"ascii-math"})[1]}function jh(a){if(typeof a=="string"){const y=Fv(a);if(!y)throw new Error(`Invalid color: ${a}`);return y}return"C"in a?Kv(a):"a"in a?up(a):a}function zu(a){return a<0?0:a>255?255:Math.round(a)}function Fv(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&typeof y.a=="undefined"&&(y.a=1),y}function Zh(a){const[y,b,E]=[a.L,a.C,a.H],ee=E*Math.PI/180,re={L:y,a:b*Math.cos(ee),b:b*Math.sin(ee)};return a.alpha!==void 0&&(re.alpha=a.alpha),re}function zv(a){const[y,b,E]=[a.L,a.a,a.b],ee=Math.sqrt(b*b+E*E),ae=Math.atan2(E,b)*180/Math.PI,de={L:y,C:ee,H:ae};return a.alpha!==void 0&&(de.alpha=a.alpha),de}function Vh(a){const[y,b,E]=[a.L,a.a,a.b],ee=Math.pow(.9999999984505198*y+.39633779217376786*b+.2158037580607588*E,3),re=Math.pow(1.00000000888176*y-.10556134232365635*b-.0638541747717059*E,3),ae=Math.pow(y*1.000000054672411-.0894841820949657*b-1.2914855378640917*E,3),de=4.076741661347994*ee-3.307711590408193*re+.230969928729428*ae,ge=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*ae,be=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*ae,Se=$e=>{const Ye=Math.abs($e);return Ye<=.0031308?$e*12.92:(Math.sign($e)||1)*(1.055*Math.pow(Ye,1/2.4)-.055)};return[Se(de),Se(ge),Se(be)]}function Gh(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Xh(a,y){let[b,E,ee]=a;return b=zu(b*255),E=zu(E*255),ee=zu(ee*255),y!==void 0?{r:b,g:E,b:ee,alpha:y}:{r:b,g:E,b:ee}}function up(a){let[y,b,E]=Vh(a);if(Gh([y,b,E]))return Xh([y,b,E],a.alpha);const ee=zv(a);if(ee.C=0,[y,b,E]=Vh(Zh(ee)),!Gh([y,b,E]))return Xh([y,b,E],a.alpha);let re=0,ae=a.L,de=(re+ae)/2;ee.C=de;const ge=.36/Math.pow(2,12);for(;ae-re>ge;)de=(re+ae)/2,ee.C=de,[y,b,E]=Vh(Zh(ee)),Gh([y,b,E])?re=de:ae=de;return Xh([y,b,E],a.alpha)}function Kv(a){return up(Zh(a))}function dp(a,y){const b=jh(a),E=jh(y),ee=.56,re=.57,ae=.62,de=.65,ge=.022,be=1.414,Se=.1,$e=5e-4,Ye=1.14,xt=.027,At=1.14,An=.027;function kr(bi){return bi>=ge?bi:bi+Dl(ge-bi,be)}function Mn(bi){return(bi<0?-1:1)*Math.pow(Math.abs(bi),2.4)}const or=kr(Mn(E.r/255)*.2126729+Mn(E.g/255)*.7151522+Mn(E.b/255)*.072175),Dr=kr(Mn(b.r/255)*.2126729+Mn(b.g/255)*.7151522+Mn(b.b/255)*.072175);let pr,di,Pi;return Math.abs(Dr-or)<$e?di=0:Dr>or?(pr=Dl(Dr,ee)-Dl(or,re),di=pr*Ye):(pr=Dl(Dr,de)-Dl(or,ae),di=pr*At),Math.abs(di)<Se?Pi=0:di>0?Pi=di-An:Pi=di+xt,Pi*100}function fp(a,y,b){b!=null||(b="#fff"),y!=null||(y="#000");const E=dp(a,b),ee=dp(a,y);return Math.abs(E)>Math.abs(ee)?b:y}function Hv(a){const y=jh(a);let b=((1<<24)+(zu(y.r)<<16)+(zu(y.g)<<8)+zu(y.b)).toString(16).slice(1);return y.alpha!==void 0&&y.alpha<1&&(b+=("00"+Math.round(y.alpha*255).toString(16)).slice(-2)),b[0]===b[1]&&b[2]===b[3]&&b[4]===b[5]&&b[6]===b[7]&&(b=b[0]+b[2]+b[4]+(y.alpha!==void 0&&y.alpha<1?b[6]:"")),"#"+b}function mo(a){const y=hp(a);let b="";for(const E of y){if(typeof E.value!="string")return"";b+=E.value}return b}function hp(a){const b=a.model.selection.ranges;return b.length!==1?[]:a.model.getAtoms(b[0])}function Wv(a,y){const b=hp(a);if(b.length!==1)return!1;const E=ph[y];return E?!!E.test(b[0].value):!1}function Uv(a,y){return mo(a).length>0}function jv(a){return[Yh(a,"double-struck","mathbb","tooltip.blackboard"),Yh(a,"fraktur","mathfrak","tooltip.fraktur"),Yh(a,"calligraphic","mathcal","tooltip.caligraphic"),qh(a,"up","mathrm","tooltip.roman-upright"),qh(a,"bold","mathbf","tooltip.bold"),qh(a,"italic","mathit","tooltip.italic")]}function Zv(a){return[{label:()=>Yo(`\\vec{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overrightarrow{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overleftarrow{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\dot{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\ddot{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\bar{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overline{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overgroup{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overbrace{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\underline{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\undergroup{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\underbrace{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function Vv(a){return[{label:()=>Yo(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\bbox[5px, border: 2px dashed black]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function Gv(a){const y=[];for(const b of Object.keys(Ue))y.push({class:(Hv(fp(Ue[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ue[b]} "></span>`,ariaLabel:()=>{var E;return(E=ut(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({backgroundColor:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({backgroundColor:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}function Xv(a){const y=[];for(const b of Object.keys(Ze))y.push({class:(fp(Ze[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ze[b]} "></span>`,ariaLabel:()=>{var E;return(E=ut(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({color:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({color:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}var Yv=class extends ep{constructor(a,y,b,E){super(a,y),this.row=b,this.col=E}set active(a){const y=this.parentMenu.children;if(a)for(const b of y)b.element.classList.toggle("active",b.row<=this.row&&b.col<=this.col);else for(const b of y)b.element.classList.remove("active")}};function qv(a){const y=[];for(let b=1;b<=5;b++)for(let E=1;E<=5;E++)y.push({onCreate:(ee,re)=>new Yv(ee,re,b,E),label:"\u2610",tooltip:()=>ut("tooltip.row-by-col",b,E),data:{row:b,col:E},onMenuSelect:()=>{a.insert(`\\begin{pmatrix}${Array(b).fill(Array(E).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return y}function Jv(a){return[{label:()=>ut("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Vc(a)},{label:()=>ut("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Vc(a)},{label:()=>ut("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Vc(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=e1(a);return b<y.maxColumns}},{label:()=>ut("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Vc(a)},{type:"divider"},{label:()=>ut("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Vc(a)},{label:()=>ut("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Vc(a)},{type:"divider"},{label:()=>ut("menu.borders"),visible:()=>(Qv(a)||Vc(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>zd(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>zd(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>zd(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>zd(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>zd(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>ut("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:qv(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>ut("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>ut("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Au(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>ut("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Au(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>ut("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>ut("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:jv(a),submenuClass:"variant-submenu"},{label:()=>ut("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Xv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ut("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ut("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Zv(a),submenuClass:"variant-submenu"},{label:()=>ut("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&mo(a).length>0,submenu:Vv(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>ut("menu.evaluate"),id:"ce-evaluate",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const y=t1(a);if(!y){a.model.announce("plonk");return}a.model.selectionIsCollapsed?(a.model.position=a.model.lastOffset,a.insert(`=${y}`,{insertionMode:"insertAfter",selectionMode:"item"})):a.insert(y,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>ut("menu.simplify"),id:"ce-simplify",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var y,b;if(a.model.selectionIsCollapsed){const E=(y=a.expression)==null?void 0:y.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=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection)).simplify();if(!E){a.model.announce("plonk");return}a.insert(E.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var y;if(window.MathfieldElement.computeEngine===null)return"";const b=(y=a.expression)==null?void 0:y.unknowns[0];return b?ut("menu.solve-for",Yo(b)):ut("menu.solve")},id:"ce-solve",visible:()=>{var y;return a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((y=a.expression)==null?void 0:y.unknowns.length)===1&&a.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var y;const b=a.expression,E=b==null?void 0:b.unknowns[0],ee=(y=b.solve(E))==null?void 0:y.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:()=>ut("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>ut("menu.copy"),id:"copy",submenu:[{label:()=>ut("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>ia.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>ut("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>ia.copyToClipboard(a,"ascii-math")},{label:()=>ut("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>ia.copyToClipboard(a,"math-ml")}]},{label:()=>ut("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>ut("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Vc(a){var y;return!!((y=a.model.parentEnvironment)!=null&&y.array)}function Qv(a){return a.model.at(a.model.position).type==="array"}function e1(a){var y;const b=(y=a.model.parentEnvironment)==null?void 0:y.array;return b?[b.length,b.reduce((E,ee)=>Math.max(E,ee.length),0)]:[0,0]}function zd(a,y){Mf(a),a.flushInlineShortcutBuffer(),D0(a.model,y),Mo(a)}function t1(a){var y,b;let E;if(a.model.selectionIsCollapsed?E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(),{canonical:!1}):E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection),{canonical:!1}),!E)return"";let ee=E.evaluate();return ee.isSame(E)&&(ee=E.N()),ee.latex}function Yh(a,y,b,E){return{label:()=>Yo(`\\${b}{${mo(a)}}`),tooltip:()=>{var ee;return(ee=ut(E))!=null?ee:E},visible:()=>Wv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variant:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variant:y},{operation:"toggle"}),a.adoptStyle="none"}}}function qh(a,y,b,E){return{label:()=>Yo(`\\${b}{${mo(a)}}`),tooltip:()=>{var ee;return(ee=ut(E))!=null?ee:E},visible:()=>Uv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variantStyle:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variantStyle:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Ku(a,y){return a+Fu(y)}Ls({speak:(a,y,b)=>n1(a,y,b)},{target:"mathfield"});function n1(a,y,b){var E,ee;b=b!=null?b:{withHighlighting:!1};const{model:re}=a;function ae(Se){let $e=null;switch(Se){case"all":$e=re.root;break;case"selection":$e=re.getAtoms(re.selection);break;case"left":{$e=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{$e=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":$e=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:Ye}=re.at(re.position);Ye!=null&&Ye.parent?$e=Ye:$e=re.root;break}default:$e=re.root}return $e}function de(Se){let $e="";switch(Se){case"all":console.log("Internal failure: speak all failed");break;case"selection":$e="no selection";break;case"left":$e="at start";break;case"right":$e="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":$e="no parent";break;default:console.log('unknown speak_ param value: "'+Se+'"');break}return $e}const ge=ae(y);if(ge===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,de(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const be=Fu(ge);return ht()&&b.withHighlighting?(mc().readAloudMathfield=a,$c(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,be)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(be),!1}function r1(a){var y,b;if(!ht()){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:(y=window.MathfieldElement.speechEngineVoice)!=null?y:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((b=window.MathfieldElement.speechEngineVoice)!=null?b:"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 de=new Uint8Array(ae.AudioStream),ge=new Blob([de.buffer],{type:"audio/mpeg"}),be=URL.createObjectURL(ge);new Audio(be).play().catch($e=>console.log($e))}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 y;let b;if(a.parent.type==="prompt")a.parentBranch==="body"&&(b="prompt");else if(a.parentBranch==="body")b=a.type&&(y={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[a.type])!=null?y:"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"&&(b="index"):a.parentBranch==="superscript"?b="superscript":a.parentBranch==="subscript"&&(b="subscript");return b||console.log("unknown relationship"),b!=null?b:"parent"}function i1(a,y,b,E){let ee="";if(y==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(y==="delete")ee=Ku("deleted: ",E);else if(y==="focus"||y.includes("move"))ee=a1(a.model,b)+(a.model.selectionIsCollapsed?"":"selected: ")+o1(a.model);else if(y==="replacement")ee=Ku("",a.model.at(a.model.position));else if(y==="line"){const re=Ku("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?Ku(y+" ",E):y;if(ee){const re=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=ee+re}}function a1(a,y){if(Number.isNaN(y))return"";const b=a.at(y);if(!b||b.treeDepth<=a.at(a.position).treeDepth)return"";let E="",ee=b.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 Ku("",a.getAtoms(a.selection));let y="";const b=a.at(a.position),E=pp(b);return b.isFirstSibling&&(y=(E?"start of "+E:"unknown")+": "),b.isLastSibling?b.isFirstSibling||(y+=E?"end of "+E:"unknown"):y+=Ku("",b),y}var s1=class{constructor(a,y,b){this.mathfield=a,this.mode=y,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=b}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,y){var b;const E=this.silenceNotifications;this.silenceNotifications=(b=y==null?void 0:y.silenceNotifications)!=null?b:!0;let ee={};if((y==null?void 0:y.type)==="undo"&&(ee={inputType:"historyUndo"}),(y==null?void 0:y.type)==="redo"&&(ee={inputType:"historyRedo"}),this.contentWillChange(ee)){const re=this.silenceNotifications;this.silenceNotifications=!0,this.mode=a.mode,this.root=dc(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,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var b,E,ee;const re=this.normalizeSelection(a,y);if(re===void 0)throw new TypeError("Invalid selection");if(re.ranges.length===1&&re.ranges[0][0]===re.ranges[0][1]){const Se=re.ranges[0][0];if(!this.mathfield.dirty&&!((b=this.at(Se))!=null&&b.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(Se-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(Se-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ee=this.at(Se+1))!=null&&ee.parentPrompt){this._anchor=this.normalizeOffset(Se+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=Se,this._position=Se,this._selection=re;return}const ae=Vo(re);re.direction==="backward"?[this._position,this._anchor]=ae:[this._anchor,this._position]=ae;const de=this.at(ae[0]+1),ge=this.at(ae[1]),be=Vn.commonAncestor(de,ge);(be==null?void 0:be.type)==="array"&&de.parent===be&&ge.parent===be?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 y;const b=this.at(a);(b==null?void 0:b.type)==="placeholder"?this.setSelection(a-1,a):((y=b==null?void 0:b.rightSibling)==null?void 0:y.type)==="placeholder"?this.setSelection(a,a+1):this.position=a,b instanceof ns&&b.isSuggestion&&(b.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 y=this.at(a),{parent:b}=y;if(!b)return[0,this.lastOffset];const E=y.parent.branch(y.parentBranch);return[this.offsetOf(E[0]),this.offsetOf(E[E.length-1])]}getBranchRange(a,y){const b=this.at(a).branch(y);return[this.offsetOf(b[0]),this.offsetOf(b[b.length-1])]}getAtoms(a,y,b){let E=b!=null?b:{};if(wu(a)){if(E=y!=null?y:{},a.ranges.length>1)return a.ranges.reduce((be,Se)=>[...be,...this.getAtoms(Se,E)],[]);a=a.ranges[0]}let ee,re;if(gl(a)){if(ee=a,!gl(y))return[];re=y}else[ee,re]=a,E=y!=null?y:{};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,de=Math.max(ee,re);if(!E.includeChildren&&ae===1&&de===this.lastOffset)return[this.root];let ge=[];for(let be=ae;be<=de;be++){const Se=this.atoms[be];mp(this,Se,ae,de)&&ge.push(Se)}return E.includeChildren||(ge=ge.filter(be=>{let Se=!1,{parent:$e}=be;for(;$e&&!Se;)Se=mp(this,$e,ae,de),$e=$e.parent;return!Se})),ge}getAllAtoms(a=0){const y=[],b=this.lastOffset;for(let E=a;E<=b;E++)y.push(this.atoms[E]);for(let E=0;E<a;E++)y.push(this.atoms[E]);return y}findAtom(a,y=0,b="forward"){let E;const ee=this.lastOffset;if(b==="forward"){for(let re=y;re<=ee;re++)if(E=this.atoms[re],a(E))return E;for(let re=0;re<y;re++)if(E=this.atoms[re],a(E))return E;return}for(let re=y;re>=0;re--)if(E=this.atoms[re],a(E))return E;for(let re=ee;re>y;re--)if(E=this.atoms[re],a(E))return E}extractAtoms(a){let y=this.getAtoms(a);if(y.length===1&&!y[0].parent)if(y[0].type==="root")y=[...y[0].body],y.shift();else return y=this.root.cells.flat(),this.root=new Vn({type:"root",body:[]}),y;for(const b of y)b.parent.removeChild(b);return y}deleteAtoms(a){this.extractAtoms(a),this.position=a[0]}atomToString(a,y){const b=y!=null?y:"latex";if(b.startsWith("latex"))return Vn.serialize([a],{expandMacro:b==="latex-expanded",skipStyles:b==="latex-unstyled",skipPlaceholders:b==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(b==="math-ml")return Ua(a);if(b==="spoken")return Fu(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=Fu(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}if(b==="spoken-ssml"||b==="spoken-ssml-with-highlighting"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const ee=Fu(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return b==="ascii-math"?_o(a):(console.error(`MathLive 0.98.5: Unexpected format "${b}`),"")}getValue(a,y,b){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(gl(a)&&gl(y)?(E=[this.normalizeRange([a,y])],ee=b):xu(a)?(E=[this.normalizeRange(a)],ee=y):wu(a)?(E=a.ranges,ee=y):(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 ya(E.map(ae=>Vn.serialize(this.getAtoms(ae),re)))}return E.map(re=>this.getAtoms(re).map(ae=>this.atomToString(ae,ee)).join("")).join("")}extendSelectionTo(a,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const b=this.normalizeRange([a,y]);let[E,ee]=b,{parent:re}=this.at(ee);if(re&&(re.type==="genfrac"||re.type==="subsup"))for(;re!==this.root&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),re=re.parent;for(re=this.at(E).parent;re!==this.root&&Jh(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&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),console.assert(ee>=0),re=re.parent;this._position=this.normalizeOffset(y),this._selection={ranges:[[E,ee]],direction:"none"}})}announce(a,y,b=[]){var E,ee;((ee=(E=this.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("announce",{detail:{command:a,previousPosition:y,atoms:b},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0)&&i1(this.mathfield,a,y,b)}deferNotifications(a,y){const b=this._selection,E=this._anchor,ee=this._position,re=this.silenceNotifications;this.silenceNotifications=!0;const ae=this.root.changeCounter;y();const de=this.root.changeCounter!==ae,ge=E!==this._anchor||ee!==this._position||Pc(this._selection,b)==="different";return this.silenceNotifications=re,a.content&&de&&this.contentDidChange({inputType:a.type}),a.selection&&ge&&this.selectionDidChange(),de||ge}normalizeOffset(a){return a>0?a=Math.min(a,this.lastOffset):a<0&&(a=this.lastOffset+a+1),a}normalizeRange(a){let[y,b]=a;return y=this.normalizeOffset(y),b=this.normalizeOffset(b),y<b?[y,b]:[b,y]}normalizeSelection(a,y){var b;let E;if(gl(a)){const ee=this.normalizeOffset(a);if(gl(y)){const re=this.normalizeOffset(y);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else E={ranges:[[ee,ee]],direction:"none"}}else if(xu(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 wu(a)&&(E={ranges:a.ranges.map(ee=>this.normalizeRange(ee)),direction:(b=a.direction)!=null?b:"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 y=this.at(this.position);if(y){for(;y&&((a=y.parent)==null?void 0:a.type)!=="array";)y=y.parent;if(!(!(y!=null&&y.parent)||y.parent.type!=="array"))return y.parentBranch}}contentWillChange(a={}){if(this.silenceNotifications||!this.mathfield)return!0;const y=this.silenceNotifications;this.silenceNotifications=!0;const b=this.mathfield.onContentWillChange(a);return this.silenceNotifications=y,b}contentDidChange(a){var y;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ml(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const b=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",me(we({},a),{data:a.data?a.data:(y=a.inputType)!=null?y:"",bubbles:!0,composed:!0}))),this.silenceNotifications=b}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ml(this.mathfield)),this.silenceNotifications))return;const a=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=a}};function mp(a,y,b,E){const ee=a.offsetOf(y);if(ee<b||ee>E)return!1;if(!y.hasChildren)return!0;const re=a.offsetOf(y.firstChild);if(re>=b&&re<=E){const ae=a.offsetOf(y.lastChild);if(ae>=b&&ae<=E)return!0}return!1}function Jh(a,y,b){if(!(y!=null&&y.hasChildren))return!1;const[E,ee]=b,re=a.offsetOf(y.firstChild),ae=a.offsetOf(y.lastChild);return re>=E&&re<=ee&&ae>=re&&ae<=ee}function Kd(a,y,b,E){var ee,re,ae,de,ge,be;const Se=b.parent;if(Se&&b instanceof Wa){const $e=!E&&y==="forward"||E==="body"&&y==="backward";let Ye=$e?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return $e?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(Se.addChildrenAfter(b.removeBranch("body"),b),Se.removeChild(b),Ye--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(Se.addChildrenAfter(b.removeBranch("body"),b),Se.removeChild(b),Ye--),a.position=Ye,!0}if(Se&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const $e=b.leftSibling;b.hasChildren&&Se.addChildrenAfter(b.removeBranch("body"),b),Se.removeChild(b),a.position=a.offsetOf($e)}else y==="forward"&&E==="body"?a.position=a.offsetOf(b):!E&&y==="backward"?b.hasChildren?a.position=a.offsetOf(b.lastChild):(a.position=Math.max(0,a.offsetOf(b)-1),Se.removeChild(b)):E==="above"&&(b.hasEmptyBranch("above")&&b.removeBranch("above"),y==="backward"?a.position=a.offsetOf(b.leftSibling):a.position=a.offsetOf(b.body[0]));return!0}if(Se&&(b.type==="box"||b.type==="enclose")){const $e=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return Se.addChildrenAfter(b.removeBranch("body"),b),Se.removeChild(b),a.position=a.offsetOf($e),!0}if(b.type==="genfrac"||b.type==="overunder"){if(!E)return b.type==="overunder"&&b.hasEmptyBranch("body")||b.type==="genfrac"&&b.hasEmptyBranch("below")&&b.hasEmptyBranch("above")?!1:(a.position=a.offsetOf(y==="forward"?b.firstChild:b.lastChild),!0);const $e=Hd.fractionNavigationOrder==="numerator-denominator"?"above":"below",Ye=$e==="above"?"below":"above";if(Se&&(y==="forward"&&E===$e||y==="backward"&&E===Ye)){const xt=b.removeBranch($e),At=b.removeBranch(Ye);return Se.addChildrenAfter([...xt,...At],b),Se.removeChild(b),a.position=a.offsetOf(xt.length>0?xt[xt.length-1]:At[0]),!0}return y==="backward"?a.position=a.offsetOf(b.leftSibling):a.position=a.offsetOf(b),!0}if(b.isExtensibleSymbol||b.type==="subsup"){if(!E&&y==="forward")return!1;if(!E){if(b.subscript||b.superscript){const $e=y==="forward"?(ae=(ee=b.superscript)==null?void 0:ee[0])!=null?ae:(re=b.subscript)==null?void 0:re[0]:(be=(de=b.subscript)==null?void 0:de[0].lastSibling)!=null?be:(ge=b.superscript)==null?void 0:ge[0].lastSibling;return $e&&(a.position=a.offsetOf($e)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const $e=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=$e,!0}if(E==="superscript")if(y==="backward"){const $e=a.offsetOf(b.firstChild)-1;console.assert($e>=0),a.position=$e}else b.subscript?a.position=a.offsetOf(b.subscript[0]):a.position=a.offsetOf(b);else E==="subscript"&&(y==="backward"&&b.superscript?a.position=a.offsetOf(b.superscript[0].lastSibling):y==="backward"?a.position=a.offsetOf(b.firstChild)-1:a.position=a.offsetOf(b));if(E&&b.hasEmptyBranch(E)&&(b.removeBranch(E),b.type==="subsup"&&!b.subscript&&!b.superscript)){const $e=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=$e}return!0}if((Se==null?void 0:Se.type)==="genfrac"&&!E&&b.type!=="first"){let $e=a.offsetOf(b.leftSibling);return Se.removeChild(b),Se.hasEmptyBranch("above")&&Se.hasEmptyBranch("below")?($e=a.offsetOf(Se.leftSibling),Se.parent.removeChild(Se),a.announce("delete",void 0,[Se]),a.position=$e,!0):(a.announce("delete",void 0,[b]),a.position=$e,!0)}if(y==="backward"&&((Se==null?void 0:Se.command)==="\\ln"||(Se==null?void 0:Se.command)==="\\log")&&b.parentBranch!=="body"){const $e=a.offsetOf(Se.leftSibling);return Se.parent.removeChild(Se),a.announce("delete",void 0,[Se]),a.position=$e,!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 y=a.at(a.position);if(!(y&&Kd(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(Kd(a,"backward",y.parent,y.parentBranch))return;y=null}if(!y){a.announce("plonk");return}a.position=a.offsetOf(y.leftSibling),y.parent.removeChild(y),a.announce("delete",void 0,[y])}}):kl(a,Vo(a.selection),"deleteContentBackward")}function c1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentForward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var y,b;let E=a.at(a.position).rightSibling;if(E&&Kd(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&Kd(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&Kd(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=(y=a.at(a.position))==null?void 0:y.rightSibling;for(;(ee==null?void 0:ee.type)==="subsup";)ee.parent.removeChild(ee),ee=(b=a.at(a.position))==null?void 0:b.rightSibling;a.announce("delete",void 0,[E])}):kl(a,Vo(a.selection),"deleteContentForward")}function kl(a,y,b){const E=a.getAtoms(y);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 de=E[E.length-1];if(ae===ee&&de===re){const ge=E[0].parent;ge.parent&&ge.type!=="prompt"&&(y=[a.offsetOf(ge.leftSibling),a.offsetOf(ge)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const ge=E[0].parent,be=E[0].parentBranch==="below"?"above":"below",Se=a.offsetOf(ge.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var $e,Ye;const xt=ge.removeBranch(be);if(xt.length===1&&xt[0].type==="placeholder")(Ye=ge.parent)==null||Ye.removeChild(ge),a.position=Math.max(0,Se);else{const At=ge.parent.addChildrenAfter(xt,ge);($e=ge.parent)==null||$e.removeChild(ge),a.position=a.offsetOf(At)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}Ls({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&kl(a,[0,-1],"deleteContent"),deleteForward:a=>c1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&kl(a,[a.anchor,_h(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&kl(a,[a.anchor,_h(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&kl(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&kl(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&kl(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&kl(a,[a.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var u1=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${ut("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="${ut("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>`,f1=class{constructor(a,y){this.focusBlurInProgress=!1;var b,E,ee;this.options=we(me(we({},Rf()),{macros:cr(),registers:oc()}),Of(y)),this.eventController=new AbortController;const re=this.eventController.signal;y.eventSink&&(this.host=y.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=(b=y.value)!=null?b:this.element.textContent)!=null?E:"";ae=ae.trim();const de=A0(this.options),ge=new Vn({type:"root",mode:de,body:Xo(ae,{context:this.context})});this.model=new s1(this,de,ge),this.undoManager=new Bg(this.model);const be=[];if(be.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>"),be.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),be.push("<span part=content class=ML__content>"),be.push(w0(this)),be.push("</span>"),window.mathVirtualKeyboard&&(be.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">`),be.push(u1),be.push("</div>")),be.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),be.push(d1),be.push("</div>"),be.push("</span>"),be.push("<span class=ML__sr-only>"),be.push("<span role=status aria-live=assertive aria-atomic=true></span>"),be.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(be.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=qe.subscribe(()=>qe.update(this.element)),qe.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",$e=>$e.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(Ml(this)))},{signal:re}),this._menu=new Sv(Jv(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const Se=this.element.querySelector("[part=menu-toggle]");Se==null||Se.addEventListener("pointerdown",$e=>{if($e.currentTarget!==Se||this._menu.state!=="closed")return;this.element.classList.add("tracking");const Ye=Se.getBoundingClientRect();this._menu.modifiers=Bc($e),this._menu.show({target:Se,location:{x:Ye.left,y:Ye.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),$e.preventDefault(),$e.stopPropagation()},{signal:re}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(Se.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(()=>Mo(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),kd&&!qe.locale.startsWith(kd.locale)&&$m(qe.locale),$s!=="ready"&&document.fonts.ready.then(()=>Af(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),y=this.adoptStyle==="right"?a.rightSibling:a;if(!y)return this.defaultStyle;if(y.type==="group"){const b=y.branch("body");return!b||b.length<2?{}:this.adoptStyle==="right"?b[1].computedStyle:b[b.length-1].computedStyle}return y.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ml(this)),Vf(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,$h())}showMenu(a){var y,b;const E=(b=(y=a==null?void 0:a.location)!=null?y:bl(this.field))!=null?b: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 y,b,E;return(E=(b=(y=this.options).colorMap)==null?void 0:b.call(y,a))!=null?E:Pt(a)}}get backgroundColorMap(){return a=>{var y,b,E,ee,re,ae;return(ae=(re=(b=(y=this.options).backgroundColorMap)==null?void 0:b.call(y,a))!=null?re:(ee=(E=this.options).colorMap)==null?void 0:ee.call(E,a))!=null?ae:Qe(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,y;return(y=(a=this.host)==null?void 0:a.disabled)!=null?y:!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),y=this.model.at(this.model.position),b=Vn.commonAncestor(a,y);return!!((b==null?void 0:b.type)==="prompt"||b!=null&&b.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 y=we({},a[0].style);for(const b of a)for(const[E,ee]of Object.entries(b.style))y[E]!==ee&&delete y[E];return y}queryStyle(a){const y=Ph(this,a);"verbatimColor"in y&&delete y.verbatimColor,"verbatimBackgroundColor"in y&&delete y.verbatimBackgroundColor;const b=Object.keys(y).length;if(b===0)return"all";if(b>1){for(const ge of Object.keys(y)){const be=this.queryStyle({[ge]:y[ge]});if(be==="none")return"none";if(be==="some")return"some"}return"all"}const E=Object.keys(y)[0],ee=y[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 de=0;for(const ge of re){if(ge.type==="first"){ae-=1;continue}ge.style[E]===ee&&(de+=1)}return de===0?"none":de===ae?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=Vm(this.options.keybindings,(a=_d())!=null?a:Fm());return((y=_d())==null?void 0:y.score)>0&&(this._keybindings=b,E.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",E)),b}get menu(){return this._menu}setOptions(a){var y;this.options=we(we({},this.options),Of(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 b=this.options.defaultMode;b==="inline-math"&&(b="math"),((y=this.model.root.firstChild)==null?void 0:y.mode)!==b&&(this.model.root.firstChild.mode=b),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const E=Vn.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&ia.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)&&Mo(this)}getOptions(a){return zc(this.options,a)}getOption(a){return zc(this.options,a)}handleEvent(a){return gc(this,null,function*(){var y;if(Rs(this)){if(Ch(a)){if(!yd(a.origin,(y=this.options.originValidator)!=null?y:"none"))throw new DOMException(`Message from unknown origin (${a.origin}) cannot be handled`,"SecurityError");const{action:b}=a.data;if(b==="execute-command"){const E=a.data.command;if(Iu(E)==="virtual-keyboard")return;this.executeCommand(E)}else b==="update-state"||(b==="focus"?this.focus({preventScroll:!0}):b==="blur"&&this.blur());return}switch(a.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&U0(this,a);break;case"pointerdown":this.userSelect!=="none"&&(U0(this,a),a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&Vf(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Rs(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Rs(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Rs(this))return;qe.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,Gg(),Qm(),mv()}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 Iu(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Ml(this))),!1):og(this,a)}get errors(){return t0(this.model.getValue(),{context:this.context})}getValue(a,y,b){return this.model.getValue(a,y,b)}setValue(a,y){var b;y=y!=null?y:{mode:"math"},y.insertionMode===void 0&&(y.insertionMode="replaceAll"),(y.format===void 0||y.format==="auto")&&(y.format="latex"),(y.mode===void 0||y.mode==="auto")&&(y.mode=(b=ah(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();ia.insert(this.model,a,y)&&(Mo(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&&$c(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=bl(this.field);else{const E=vd(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);b={x:ee+y.left-this.field.scrollLeft,y:re+y.top-this.field.scrollTop,height:0}}}if(this.host&&b){const E=this.host.getBoundingClientRect(),ee=b.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+b.height),this.host.scroll({top:re,left:0})}if(b){const E=b.x-window.scrollX;let ee=this.field.scrollLeft;E<y.left?ee=E-y.left+this.field.scrollLeft-20:E>y.right&&(ee=E-y.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:ee})}}insert(a,y){return typeof a!="string"||a.length===0&&((y==null?void 0:y.insertionMode)==="insertBefore"||(y==null?void 0:y.insertionMode)==="insertAfter")||a.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),y=y!=null?y:{mode:"math"},y.focus&&this.focus(),y.feedback&&(window.MathfieldElement.keypressVibration&&et()&&navigator.vibrate(S0),window.MathfieldElement.playSound("keypress")),a==="\\\\"?T0(this.model):a==="&"?I0(this.model):this.model.selectionIsCollapsed?ia.insert(this.model,a,we({style:this.model.at(this.model.position).computedStyle},y)):ia.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),Mo(this),y.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(a,y="",b=""){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:!!b||!!y,selection:!0,type:"insertText"},()=>{let de=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const ge=Xo(y,{context:this.context,parseMode:a});ae.collapseSelection("forward");const be=ae.at(ae.position);ae.position=ae.offsetOf(be.parent.addChildrenAfter(ge,be)),de=!0}if(this.model.mode=a,a==="latex"){let ge=ae.selectionIsCollapsed;Au(this,"accept");let be,Se=ae.at(ae.position);if(ge)be="\\";else{const Ye=Vo(ae.selection);be=this.model.getValue(Ye,"latex");const xt=this.model.extractAtoms(Ye);xt.length===1&&xt[0].type==="placeholder"&&(be=y,ge=!0),Se=ae.at(Ye[0])}const $e=new xd(be);Se.parent.addChildAfter($e,Se),ge?ae.position=ae.offsetOf($e.lastChild):ae.setSelection(ae.offsetOf($e.firstChild),ae.offsetOf($e.lastChild))}else Ld(ae).forEach(ge=>{ge.isError=!1});if(b){const ge=Xo(b,{context:this.context,parseMode:re});ae.collapseSelection("forward");const be=ae.at(ae.position);ae.position=ae.offsetOf(be.parent.addChildrenAfter(ge,be)),de=!0}return Mo(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),de}),this.model.mode=a,window.mathVirtualKeyboard.update(Ml(this))}hasFocus(){return!this.blurred}focus(a){var y;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(y=a==null?void 0:a.preventScroll)!=null&&y||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(a,y={}){var b,E;const ee={operation:"set",silenceNotifications:!1};xu(y)?ee.range=y:(y.operation==="toggle"&&(ee.operation="toggle"),ee.range=y.range,ee.silenceNotifications=(b=y.silenceNotifications)!=null?b:!1);const re=Ph(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 de=we({},this.defaultStyle);for(const ge of Object.keys(re))de[ge]===re[ge]?(ge==="color"&&delete de.verbatimColor,ge==="backgroundColor"&&delete de.verbatimBackgroundColor,delete de[ge]):de[ge]=re[ge];this.defaultStyle=de;return}this.model.deferNotifications({content:!ee.silenceNotifications,type:"insertText"},()=>{if(ee.range===void 0)for(const de of this.model.selection.ranges)Eh(this.model,de,re,{operation:ae});else Eh(this.model,ee.range,re,{operation:ae})}),Mo(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 y;return(y=this.element)==null?void 0:y.focus()}}),!0):!1}getCaretPoint(){const a=bl(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=Nd(this,a,y,{bias:0});if(b<0)return!1;const E=this.model.position;return this.model.position=b,this.model.announce("move",E),Mo(this),!0}getPrompt(a){const y=this.model.findAtom(b=>b.type==="prompt"&&b.placeholderId===a);return console.assert(y!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),y}getPromptValue(a,y){const b=this.getPrompt(a);if(!b)return"";const E=this.model.offsetOf(b.firstChild),ee=this.model.offsetOf(b.lastChild);return this.model.getValue(E,ee,y)}getPrompts(a){return this.model.getAllAtoms().filter(y=>y.type!=="prompt"?!1:a?!(a.id&&y.placeholderId!==a.id||a.locked&&y.locked!==a.locked||a.correctness==="undefined"&&y.correctness||a.correctness&&y.correctness!==a.correctness):!0).map(y=>y.placeholderId)}setPromptValue(a,y,b){if(y!==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(y,me(we({},b),{insertionMode:"replaceSelection"}))}b!=null&&b.silenceNotifications&&(this.valueOnFocus=this.getValue()),Mo(this)}setPromptState(a,y,b){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}y==="undefined"?E.correctness=void 0:typeof y=="string"&&(E.correctness=y),typeof b=="boolean"&&(E.locked=b,E.captureSelection=b),Mo(this)}getPromptState(a){const y=this.getPrompt(a);return y?[y.correctness,y.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[void 0,!0])}getPromptRange(a){const y=this.getPrompt(a);return y?this.model.getBranchRange(this.model.offsetOf(y),"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 y;this.undoManager.snapshot(a)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ml(this)),(y=this.host)==null||y.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(Ml(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(Ml(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,y;const b=this.model;this.keyboardDelegate.setValue(b.getValue(this.model.selection,"latex-expanded"));{const E=b.at(b.position),ee=(a=E.mode)!=null?a:A0(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(Au(this,"accept",{mode:ee}),b.position=b.offsetOf(E)):this.switchMode(ee))}(y=this.host)==null||y.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ml(this)),Vf(this)}onContentWillChange(a){var y,b,E;return(E=(b=this.host)==null?void 0:b.dispatchEvent(new InputEvent("beforeinput",me(we({},a),{data:a.data?a.data:(y=a.inputType)!=null?y:"",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(),$c(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,y,b;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",Tu(this),this.model.getValue()!==this.valueOnFocus&&((a=this.host)==null||a.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(y=this.host)==null||y.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(b=this.host)==null||b.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),Mo(this),this.focusBlurInProgress=!1,$h();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Rs(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ee})},{once:!0,signal:ee}),setTimeout(()=>E.abort(),100)}onInput(a){Th(this,a)}onKeystroke(a){return K0(this,a)}onCompositionStart(a){this.model.deleteAtoms(Vo(this.model.selection));const y=bl(this.field);y&&requestAnimationFrame(()=>{$c(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){Lg(this.model,a),Mo(this)}onCompositionEnd(a){Ag(this.model),Th(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),ia.onCopy(this,a),kl(this.model,Vo(this.model.selection),"deleteByCut"),this.snapshot("cut"),Mo(this))}onCopy(a){ia.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=ia.onPaste(this.model.at(this.model.position).mode,this,a.clipboardData)),y||this.model.announce("plonk"),a.preventDefault(),a.stopPropagation(),y}onGeometryChange(){this._menu.hide(),kf(this),Vf(this)}onWheel(a){const y=5*a.deltaX;if(!Number.isFinite(y)||y===0)return;const b=this.field;y<0&&b.scrollLeft===0||y>0&&b.offsetWidth+b.scrollLeft>=b.scrollWidth||(b.scrollBy({top:0,left:y}),a.preventDefault(),a.stopPropagation())}getHTMLElement(a){let y=a;for(;!y.id&&y.hasChildren;)y=a.children[0];return this.field.querySelector(`[data-atom-id="${y.id}"]`)}get context(){var a,y;return{registers:(a=this.options.registers)!=null?a:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(y=this.options.placeholderSymbol)!=null?y:"\u25A2",colorMap:b=>this.colorMap(b),backgroundColorMap:b=>this.backgroundColorMap(b),getMacro:b=>Bn(b,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function gp(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const y of a.children)gp(y)}function Qh(a,y){var b;a&&(!y||((b=a.dataset)==null?void 0:b.atomId)===y?(a.classList.add("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E)})):(a.classList.remove("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E,y)})))}function h1(a,y){var b;if(!ht())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(y);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:(b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna",Engine:"standard",Text:y,TextType:"ssml",SpeechMarkTypes:["ssml"]};mc().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 de=new TextDecoder("utf-8").decode(new Uint8Array(ae.AudioStream));mc().readAloudMarks=de.split(`
|
|
|
`).map(ge=>ge?JSON.parse(ge):{}),mc().readAloudTokens=[];for(const ge of mc().readAloudMarks)ge.value&&mc().readAloudTokens.push(ge.value);mc().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(ge,be)=>{if(ge){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${ge}`);return}if(!(be!=null&&be.AudioStream))return;const Se=new Uint8Array(be.AudioStream),$e=new Blob([Se.buffer],{type:"audio/mpeg"}),Ye=URL.createObjectURL($e),xt=mc();xt.readAloudAudio?xt.readAloudAudio.pause():(xt.readAloudAudio=new Audio,xt.readAloudAudio.addEventListener("ended",()=>{const At=xt.readAloudMathfield;xt.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),At?($c(At),xt.readAloudElement=null,xt.readAloudMathfield=null,xt.readAloudTokens=[],xt.readAloudMarks=[],xt.readAloudCurrentMark=""):gp(xt.readAloudElement)}),xt.readAloudAudio.addEventListener("timeupdate",()=>{let At="";const An=xt.readAloudAudio.currentTime*1e3+100;for(const kr of xt.readAloudMarks)kr.time<An&&(At=kr.value);xt.readAloudCurrentMark!==At&&(xt.readAloudCurrentToken=At,At&&At===xt.readAloudFinalToken?xt.readAloudAudio.pause():(xt.readAloudCurrentMark=At,Qh(xt.readAloudElement,xt.readAloudCurrentMark)))})),xt.readAloudAudio.src=Ye,xt.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),xt.readAloudAudio.play()})})}ht()||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 Na=new WeakMap,p1=.5,pc={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 = ..."},rs=class Gc extends HTMLElement{static get formAssociated(){return Hu()}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(y){y!==this._fontsDirectory&&(this._fontsDirectory=y,ng())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(y){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(y){this._soundsDirectory=y,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(y){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(y){var b,E,ee;this.audioBuffers={},y===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof y=="string"?this._keypressSound={spacebar:y,return:y,delete:y,default:y}:typeof y=="object"&&"default"in y&&(this._keypressSound={spacebar:(b=y.spacebar)!=null?b:y.default,return:(E=y.return)!=null?E:y.default,delete:(ee=y.delete)!=null?ee:y.default,default:y.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(y){this.audioBuffers={},this._plonkSound=y}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(y){this._speechEngine=y}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(y){this._speechEngineRate=y}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(y){this._speechEngineVoice=y}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(y){this._textToSpeechMarkup=y}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(y){this._textToSpeechRules=y}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(y){this._textToSpeechRulesOptions=y}static get locale(){return qe.locale}static set locale(y){y==="auto"&&(y=navigator.language.slice(0,5)),qe.locale=y}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(y){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return qe.strings}static set strings(y){qe.merge(y)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(y){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(y){this._decimalSeparator=y,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(y){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var y,b;if(this._computeEngine===void 0){const E=(y=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;if(!E)return null;this._computeEngine=new E,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(b=this._computeEngine)!=null?b:null}static set computeEngine(y){this._computeEngine=y}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(y){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(y){this._isFunction=y}static loadSound(y){return gc(this,null,function*(){delete this.audioBuffers[y];let b="";switch(y){case"keypress":b=this._keypressSound.default;break;case"return":b=this._keypressSound.return;break;case"spacebar":b=this._keypressSound.spacebar;break;case"delete":b=this._keypressSound.delete;break;case"plonk":b=this.plonkSound;break}if(typeof b!="string")return;b=b.trim();const E=this.soundsDirectory;if(!(E==null||E==="null"||b==="none"||b==="null"))try{const re=yield(yield fetch(yield x0(`${E}/${b}`))).arrayBuffer(),ae=yield this.audioContext.decodeAudioData(re);this.audioBuffers[y]=ae}catch(ee){}})}static playSound(y){return gc(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[y]||(yield this.loadSound(y)),!this.audioBuffers[y])return;const b=this.audioContext.createBufferSource();b.buffer=this.audioBuffers[y];const E=this.audioContext.createGain();E.gain.value=p1,b.connect(E).connect(this.audioContext.destination),b.start()})}constructor(y){if(super(),y){const b=[];for(const E of Object.keys(y))if(pc[E])if(pc[E].startsWith("mf."))if(pc[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pc[E]}`);else{const ee=pc[E].match(/([a-zA-Z]+) =/);b.push(`Option \`${E}\` has been renamed \`${ee[1]}\``)}else b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pc[E]}`);if(b.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 b)console.warn(E);console.groupEnd()}}if(Hu()&&(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=[uc("core"),uc("mathfield"),uc("mathfield-element"),uc("ui"),uc("menu")],this.shadowRoot.appendChild(document.createElement("span"));const b=document.createElement("slot");b.style.display="none",this.shadowRoot.appendChild(b)}else this.shadowRoot.innerHTML="<style>"+Hl("core")+Hl("mathfield")+Hl("mathfield-element")+Hl("ui")+Hl("menu")+'</style><span></span><slot style="display:none"></slot>';y&&this._setOptions(y),this.shadowRoot.addEventListener("slotchange",()=>{var b;const E=this.shadowRoot.querySelector("slot:not([name])");this.value=(b=E==null?void 0:E.assignedNodes().map(ee=>ee.nodeType===3?ee.textContent:"").join("").trim())!=null?b:""})}showMenu(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.showMenu(y))!=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",y=>{var b;y.target===this&&!((b=this._mathfield)!=null&&b.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:y.altKey,button:y.button,buttons:y.buttons,clientX:y.clientX,clientY:y.clientY,ctrlKey:y.ctrlKey,metaKey:y.metaKey,movementX:y.movementX,movementY:y.movementY,relatedTarget:y.relatedTarget,screenX:y.screenX,screenY:y.screenY,shiftKey:y.shiftKey}))},{once:!0})}getPromptValue(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.getPromptValue(y,b))!=null?ee:""}setPromptValue(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptValue(y,b,E)}getPromptRange(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptRange(y))!=null?E:null}getPrompts(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPrompts(y))!=null?E:[]}get form(){var y;return(y=this._internals)==null?void 0:y.form}get name(){var y;return(y=this.getAttribute("name"))!=null?y:""}get type(){return this.localName}get mode(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.mode)!=null?b:this.defaultMode==="text"?"text":"math"}set mode(y){var b;(b=this._mathfield)==null||b.switchMode(y)}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(y){var b,E;if(!this._mathfield)return;const ee=(E=(b=Gc.computeEngine)==null?void 0:b.box(y).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 y,b;return(b=(y=this._mathfield)==null?void 0:y.errors)!=null?b:[]}_getOptions(y){return this._mathfield?zc(this._mathfield.options,y):Na.has(this)?we({},zc(we(we({},Rf()),Of(Na.get(this).options)),y)):null}getOptions(y){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?zc(this._mathfield.options,y):Na.has(this)?zc(we(we({},Rf()),Of(Na.get(this).options)),y):null}reflectAttributes(){const y=Rf(),b=this._getOptions();Object.keys(Gc.optionsAttributes).forEach(E=>{const ee=Zl(E);Gc.optionsAttributes[E]==="on/off"?y[ee]!==b[ee]?this.setAttribute(E,b[ee]?"on":"off"):this.removeAttribute(E):y[ee]!==b[ee]&&(Gc.optionsAttributes[E]==="boolean"?b[ee]?this.setAttribute(E,""):this.removeAttribute(E):(typeof b[ee]=="string"||typeof b[ee]=="number")&&this.setAttribute(E,b[ee].toString()))})}getOption(y){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([y])[y]}_getOption(y){return this._getOptions([y])[y]}_setOptions(y){if(this._mathfield)this._mathfield.setOptions(y);else if(Na.has(this)){const b=we(we({},Na.get(this).options),y);Na.set(this,me(we({},Na.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else Na.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:y,menuItems:void 0});this.reflectAttributes()}setOptions(y){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 b of Object.keys(y))pc[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${pc[b]}`);console.groupEnd(),this._setOptions(y)}executeCommand(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.executeCommand(y))!=null?E:!1}getValue(y,b,E){var ee,re;if(this._mathfield)return this._mathfield.model.getValue(y,b,E);if(Na.has(this)){let ae,de,ge;if(wu(y)?([ae,de]=y.ranges[0],ge=b):xu(y)?([ae,de]=y,ge=b):gl(y)&&gl(b)?(ae=y,de=b,ge=E):(ae=0,de=-1,ge=y),(ge===void 0||ge==="latex")&&ae===0&&de===-1)return(re=(ee=Na.get(this).value)!=null?ee:this.textContent)!=null?re:""}return""}setValue(y,b){if(this._mathfield&&y!==void 0){b!=null||(b={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(y,b);return}if(Na.has(this)){const ee=Na.get(this).options;Na.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=Wd(this);Na.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:E,menuItems:void 0})}hasFocus(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.hasFocus())!=null?b:!1}focus(){var y;(y=this._mathfield)==null||y.focus()}blur(){var y;(y=this._mathfield)==null||y.blur()}select(){var y;(y=this._mathfield)==null||y.select()}insert(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.insert(y,b))!=null?ee:!1}applyStyle(y,b){var E;return(E=this._mathfield)==null?void 0:E.applyStyle(y,b)}queryStyle(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.queryStyle(y))!=null?E:"none"}get caretPoint(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.getCaretPoint())!=null?b:null}set caretPoint(y){var b;y&&((b=this._mathfield)==null||b.setCaretPoint(y.x,y.y))}setCaretPoint(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.setCaretPoint(y,b))!=null?ee:!1}offsetFromPoint(y,b,E){return this._mathfield?Nd(this._mathfield,y,b,E):-1}hitboxFromOffset(y){if(!this._mathfield)return null;const b=this._mathfield.model.at(y);if(!b)return null;const E=lc(this._mathfield,b);return E?new DOMRect(E.left,E.top,E.right-E.left,E.bottom-E.top):null}resetUndo(){var y;(y=this._mathfield)==null||y.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(y){var b,E,ee,re;wl.state==="closed"&&((E=(b=this._mathfield)==null?void 0:b.menu)==null?void 0:E.state)==="closed"&&(y.type==="pointerdown"&&this.onPointerDown(),y.type==="focus"&&((ee=this._mathfield)==null||ee.focus()),y.type==="blur"&&((re=this._mathfield)==null||re.blur()))}connectedCallback(){var y,b,E,ee;const re=window.getComputedStyle(this),ae=this.shadowRoot,de=re.userSelect!=="none";if(de)ae.host.addEventListener("pointerdown",this,!0);else{const Se=ae.querySelector("span");Se.style.pointerEvents="none"}ae.host.addEventListener("focus",this,!0),ae.host.addEventListener("blur",this,!0),Hu()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),de&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const ge=ae.querySelector("slot:not([name])");if(ge)try{this._style=ge.assignedElements().filter(Se=>Se.tagName.toLowerCase()==="style").map(Se=>Se.textContent).join("")}catch(Se){console.error(Se)}if(this._style){const Se=document.createElement("style");Se.textContent=this._style,ae.appendChild(Se)}let be="";if(this.hasAttribute("value")?be=this.getAttribute("value"):be=(y=ge==null?void 0:ge.assignedNodes().map(Se=>Se.nodeType===3?Se.textContent:"").join("").trim())!=null?y:"",this._mathfield=new f1(ae.querySelector(":host > span"),me(we({},(E=(b=Na.get(this))==null?void 0:b.options)!=null?E:Wd(this)),{eventSink:this,value:be})),!Na.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const Se of Object.keys(Gc.optionsAttributes))this.upgradeProperty(Zl(Se))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Na.has(this)){const Se=this._mathfield,$e=Na.get(this),Ye=$e.menuItems;Se.model.deferNotifications({content:!1,selection:!1},()=>{const xt=$e.value;xt!==void 0&&Se.setValue(xt),Se.model.selection=$e.selection,Na.delete(this)}),Ye&&(this.menuItems=Ye)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Lf()}disconnectedCallback(){var y,b;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=zc(this._mathfield.options,Object.keys(Gc.optionsAttributes).map(ee=>Zl(ee)));Na.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(b=(y=this._mathfield.menu)==null?void 0:y.menuItems)!=null?b:void 0,options:E}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(y){if(this.hasOwnProperty(y)){const b=this[y];delete this[y],(y==="readonly"||y==="read-only")&&(y="readOnly"),this[y]=b}}attributeChangedCallback(y,b,E){if(b===E)return;const ee=E!==null;switch(y){case"contenteditable":Mo(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(y){const b=!!y;b?(this.setAttribute("readonly",""),Hu()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Hu()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:b})}get disabled(){return this.hasAttribute("disabled")}set disabled(y){var b;const E=!!y;E?this.setAttribute("disabled",""):this.removeAttribute("disabled"),Hu()?this._internals.ariaDisabled=E?"true":"false":this.setAttribute("aria-disabled",E?"true":"false"),E&&((b=this._mathfield)!=null&&b.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(y){this.setValue(y)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(y){this._setOptions({defaultMode:y})}get macros(){return this._getOption("macros")}set macros(y){this._setOptions({macros:y})}get registers(){const y=this;return new Proxy({},{get:(b,E)=>{if(typeof E=="string")return y._getOption("registers")[E]},set(b,E,ee){return typeof E!="string"?!1:(y._setOptions({registers:me(we({},y._getOption("registers")),{[E]:ee})}),!0)}})}set registers(y){this._setOptions({registers:y})}get colorMap(){return this._getOption("colorMap")}set colorMap(y){this._setOptions({colorMap:y})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(y){this._setOptions({backgroundColorMap:y})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(y){this._setOptions({letterShapeStyle:y})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(y){this._setOptions({minFontScale:y})}get smartMode(){return this._getOption("smartMode")}set smartMode(y){this._setOptions({smartMode:y})}get smartFence(){return this._getOption("smartFence")}set smartFence(y){this._setOptions({smartFence:y})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(y){this._setOptions({smartSuperscript:y})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(y){this._setOptions({scriptDepth:y})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(y){this._setOptions({removeExtraneousParentheses:y})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(y){this._setOptions({mathModeSpace:y})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(y){this._setOptions({placeholderSymbol:y})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(y){this._setOptions({popoverPolicy:y})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(y){this._setOptions({environmentPopoverPolicy:y})}get menuItems(){var y,b,E;return this._mathfield?(y=this._mathfield.menu._menuItems.map(ee=>ee.menuItem))!=null?y:[]:(E=(b=Na.get(this))==null?void 0:b.menuItems)!=null?E:[]}set menuItems(y){var b;if(this._mathfield){const E=(b=this._mathfield.element)==null?void 0:b.querySelector("[part=menu-toggle]");E&&(E.style.display=y.length===0?"none":""),this._mathfield.menu.menuItems=y}Na.has(this)?Na.set(this,me(we({},Na.get(this)),{menuItems:y})):Na.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:Wd(this),menuItems:y})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(y){this._setOptions({mathVirtualKeyboardPolicy:y})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(y){this._setOptions({inlineShortcuts:y})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(y){this._setOptions({inlineShortcutTimeout:y})}get keybindings(){return this._getOption("keybindings")}set keybindings(y){this._setOptions({keybindings:y})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(y){this._setOptions({onInlineShortcut:y})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(y){this._setOptions({onScrollIntoView:y})}get onExport(){return this._getOption("onExport")}set onExport(y){this._setOptions({onExport:y})}get readOnly(){return this._getOption("readOnly")}set readOnly(y){this._setOptions({readOnly:y})}get isSelectionEditable(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.isSelectionEditable)!=null?b:!1}setPromptState(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptState(y,b,E)}getPromptState(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptState(y))!=null?E:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(y){this._setOptions({virtualKeyboardTargetOrigin:y})}get selection(){return this._mathfield?this._mathfield.model.selection:Na.has(this)?Na.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(y){if(typeof y=="number"&&(y={ranges:[[y,y]]}),this._mathfield){this._mathfield.model.selection=y,Mo(this._mathfield);return}if(Na.has(this)){Na.set(this,me(we({},Na.get(this)),{selection:y}));return}Na.set(this,{value:void 0,selection:y,options:Wd(this),menuItems:void 0})}get selectionIsCollapsed(){const y=this.selection;return y.ranges.length===1&&y.ranges[0][0]===y.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Na.has(this)?Na.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,Mo(this._mathfield)),Na.has(this)){Na.set(this,me(we({},Na.get(this)),{selection:{ranges:[[y,y]]}}));return}Na.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:Wd(this),menuItems:void 0})}getOffsetDepth(y){var b,E;return this._mathfield?((E=(b=this._mathfield.model.at(y))==null?void 0:b.treeDepth)!=null?E:2)-2:0}get lastOffset(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.lastOffset)!=null?b:-1}};rs.version="0.98.5",rs._fontsDirectory="./fonts",rs._soundsDirectory="./sounds",rs.keypressVibration=!0,rs._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},rs._plonkSound="plonk.wav",rs.audioBuffers={},rs.createHTML=a=>a,rs._speechEngineRate="100%",rs._speechEngineVoice="Joanna",rs._textToSpeechMarkup="",rs._textToSpeechRules="mathlive",rs._textToSpeechRulesOptions={},rs.speakHook=r1,rs.readAloudHook=h1,rs._decimalSeparator=".",rs.fractionNavigationOrder="numerator-denominator",rs._isFunction=a=>{var y,b;const E=window.MathfieldElement.computeEngine;return(b=(y=E==null?void 0:E.parse(a).domain)==null?void 0:y.isFunction)!=null?b:!1};var Hd=rs;function Zl(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function Wd(a){const y={readOnly:!1},b=Hd.optionsAttributes;return Object.keys(b).forEach(E=>{if(a.hasAttribute(E)){const ee=a.getAttribute(E);E==="placeholder"?y.contentPlaceholder=ee!=null?ee:"":b[E]==="boolean"?y[Zl(E)]=!0:b[E]==="on/off"?ee==="on"?y[Zl(E)]=!0:ee==="off"?y[Zl(E)]=!1:y[Zl(E)]=void 0:b[E]==="number"?y[Zl(E)]=Number.parseFloat(ee!=null?ee:"0"):y[Zl(E)]=ee}}),y}function Hu(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var vp=Hd,yp,bp,xp,wp;if(ht()&&!((yp=window.customElements)!=null&&yp.get("math-field"))){(xp=window[bp=Symbol.for("io.cortexjs.mathlive")])!=null||(window[bp]={});const a=window[Symbol.for("io.cortexjs.mathlive")];a.version="0.98.5",window.MathfieldElement=Hd,(wp=window.customElements)==null||wp.define("math-field",Hd)}function m1(a,y,b){let E=b,ee=0;const re=a.length;for(;E<y.length;){const ae=y[E];if(ee<=0&&y.slice(E,E+re)===a)return E;ae==="\\"?E++:ae==="{"?ee++:ae==="}"&&ee--,E++}return-1}function Jf(a,y,b,E,ee="latex"){const re=[];for(const ae of a)if(ae.type==="text"){const de=ae.data;let ge=!0,be=0,Se;Se=de.indexOf(y),Se!==-1&&(be=Se,be>0&&re.push({type:"text",data:de.slice(0,be)}),ge=!1);let $e=!1;for(;!$e;){if(ge){if(Se=de.indexOf(y,be),Se===-1){$e=!0;break}be!==Se&&re.push({type:"text",data:de.slice(be,Se)}),be=Se}else{if(Se=m1(b,de,be+y.length),Se===-1){$e=!0;break}let Ye=de.slice(be+y.length,Se);ee==="ascii-math"&&([,Ye]=Oc(Ye,{format:"ascii-math"})),re.push({type:"math",data:Ye,rawData:de.slice(be,Se+b.length),mathstyle:E}),be=Se+b.length}ge=!ge}be<de.length&&re.push({type:"text",data:de.slice(be)})}else re.push(ae);return re}function Sp(a,y,b){let E=[{type:"text",data:a}];return y!=null&&y.inline&&y.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle","ascii-math")}),E}function g1(a,y){const b=document.createElement("span");b.setAttribute("translate","no");try{const E="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+y.renderToMathML(a)+"</math>";b.innerHTML=window.MathfieldElement.createHTML(E)}catch(E){console.error(`MathLive 0.98.5: Could not convert "${a}"' to MathML with ${E}`),b.textContent=a}return b.className="ML__sr-only",b}function v1(a,y,b,E){try{const ee=y.renderToMarkup(a,{mathstyle:b,format:"html"}),re=document.createElement("span");return re.dataset.latex=a,re.style.display=b==="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 Wu(a,y,b,E){var ee;const re=v1(a,b,y||"textstyle",E),ae=(ee=b.renderAccessibleContent)!=null?ee:"";if(re&&/\b(mathml|speakable-text)\b/i.test(ae)){const de=document.createElement("span");if(/\bmathml\b/i.test(ae)&&b.renderToMathML&&de.append(g1(a,b)),/\bspeakable-text\b/i.test(ae)&&b.renderToSpeakableText){const ge=document.createElement("span");ge.setAttribute("translate","no");const be=b.renderToSpeakableText(a);ge.innerHTML=window.MathfieldElement.createHTML(be),ge.className="ML__sr-only",de.append(ge)}return de.append(re),de}return re}function y1(a,y){var b,E,ee;let re=null;if((b=y.TeX)!=null&&b.processEnvironments&&/^\s*\\begin/.test(a)){re=document.createDocumentFragment();const ae=Wu(a,"",y,!0);ae&&re.appendChild(ae)}else{if(!a.trim())return null;const ae=Sp(a,(E=y.TeX)==null?void 0:E.delimiters,(ee=y.asciiMath)==null?void 0:ee.delimiters);if(ae.length===1&&ae[0].type==="text")return null;re=document.createDocumentFragment();for(const de of ae)if(de.type==="text")re.appendChild(document.createTextNode(de.data));else{const ge=Wu(de.data,de.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);ge&&re.appendChild(ge)}}return re}function Cp(a,y){var b,E,ee,re,ae,de,ge,be,Se,$e,Ye,xt,At,An,kr,Mn;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const or=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(or)){a.textContent="";const pr=Wu(or,"",y,!0);pr&&a.append(pr);return}const Dr=Sp(or,(ee=y.TeX)==null?void 0:ee.delimiters,(re=y.asciiMath)==null?void 0:re.delimiters);if(Dr.length===1&&Dr[0].type==="math"){a.textContent="";const pr=Wu(Dr[0].data,Dr[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);pr&&a.append(pr);return}if(Dr.length===1&&Dr[0].type==="text")return}for(let or=a.childNodes.length-1;or>=0;or--){const Dr=a.childNodes[or];if(Dr.nodeType===3){const pr=y1((ae=Dr.textContent)!=null?ae:"",y);pr&&(or+=pr.childNodes.length-1,Dr.replaceWith(pr))}else if(Dr.nodeType===1){const pr=Dr,di=Dr.nodeName.toLowerCase();if(di==="script"){const Pi=Dr;let bi;if((de=y.processScriptTypePattern)!=null&&de.test(Pi.type))bi=(ge=Pi.textContent)!=null?ge:"";else if((be=y.processMathJSONScriptTypePattern)!=null&&be.test(Pi.type))try{bi=($e=y.serializeToLatex)==null?void 0:$e.call(y,JSON.parse((Se=Pi.textContent)!=null?Se:""))}catch(Pa){console.error(Pa)}if(bi){let Pa="textstyle";for(const Kr of Pi.type.split(";")){const[Fs,_l]=Kr.toLowerCase().split("=");Fs.trim()==="mode"&&(Pa=_l.trim()==="display"?"displaystyle":"textstyle")}const qa=Wu(bi,Pa,y,!0);qa&&Pi.parentNode.replaceChild(qa,Pi)}}else if(((xt=(Ye=y.processClassPattern)==null?void 0:Ye.test(pr.className))!=null?xt:!1)||!((An=(At=y.skipTags)==null?void 0:At.includes(di))!=null&&An||(Mn=(kr=y.ignoreClassPattern)==null?void 0:kr.test(pr.className))!=null&&Mn))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const bi=a.textContent;a.textContent="";const Pa=Wu(bi!=null?bi:"","displaystyle",y,!0);Pa&&a.append(Pa)}else Cp(pr,y)}}}var b1={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,y){var b,E,ee,re;try{const ae=we(we({},b1),y);ae.ignoreClassPattern=new RegExp((b=ae.ignoreClass)!=null?b:""),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:""),Lf(),_s("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,y){const b=fc.singleton;return b?(b.show(),Id(),b.currentLayer=y,b.render(),b.focus(),!0):!1}function S1(){const a=window.mathVirtualKeyboard;return a.visible?a.hide({animate:!0}):a.show({animate:!0}),!1}Ls({switchKeyboardLayer:w1,toggleVirtualKeyboard:S1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function mc(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function T1(){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 I1(a){M1(document.body,a)}function C1(a){if(typeof a=="string"){const y=document.getElementById(a);if(y===null)throw new Error(`The element with ID "${a}" could not be found.`);return y}return typeof a=="string"?null:a}function M1(a,y){var b,E,ee,re;const ae=C1(a);if(!ae)return;const de=y!=null?y:{};(b=de.renderToMarkup)!=null||(de.renderToMarkup=Yo),(E=de.renderToMathML)!=null||(de.renderToMathML=Nv),(ee=de.renderToSpeakableText)!=null||(de.renderToSpeakableText=Bv),(re=de.serializeToLatex)!=null||(de.serializeToLatex=$v),x1(ae,de)}var D1={mathlive:"0.98.5"}},17423:function(En,Yt,se){"use strict";se.d(Yt,{Z:function(){return we}});const fe=me=>typeof me=="object"&&me!=null&&me.nodeType===1,We=(me,De)=>(!De||me!=="hidden")&&me!=="visible"&&me!=="clip",Be=(me,De)=>{if(me.clientHeight<me.scrollHeight||me.clientWidth<me.scrollWidth){const at=getComputedStyle(me,null);return We(at.overflowY,De)||We(at.overflowX,De)||(Oe=>{const Mt=(ht=>{if(!ht.ownerDocument||!ht.ownerDocument.defaultView)return null;try{return ht.ownerDocument.defaultView.frameElement}catch(lt){return null}})(Oe);return!!Mt&&(Mt.clientHeight<Oe.scrollHeight||Mt.clientWidth<Oe.scrollWidth)})(me)}return!1},Je=(me,De,at,Oe,Mt,ht,lt,et)=>ht<me&<>De||ht>me&<<De?0:ht<=me&&et<=at||lt>=De&&et>=at?ht-me-Oe:lt>De&&et<at||ht<me&&et>at?lt-De+Mt:0,ve=me=>{const De=me.parentElement;return De==null?me.getRootNode().host||null:De},Te=(me,De)=>{var at,Oe,Mt,ht;if(typeof document=="undefined")return[];const{scrollMode:lt,block:et,inline:Ee,boundary:yt,skipOverflowHiddenElements:Vt}=De,qe=typeof yt=="function"?yt:dn=>dn!==yt;if(!fe(me))throw new TypeError("Invalid target");const ut=document.scrollingElement||document.documentElement,Ce=[];let xe=me;for(;fe(xe)&&qe(xe);){if(xe=ve(xe),xe===ut){Ce.push(xe);break}xe!=null&&xe===document.body&&Be(xe)&&!Be(document.documentElement)||xe!=null&&Be(xe,Vt)&&Ce.push(xe)}const Ue=(Oe=(at=window.visualViewport)==null?void 0:at.width)!=null?Oe:innerWidth,Ze=(ht=(Mt=window.visualViewport)==null?void 0:Mt.height)!=null?ht:innerHeight,{scrollX:St,scrollY:mt}=window,{height:Pt,width:Qe,top:Ft,right:Dt,bottom:an,left:it}=me.getBoundingClientRect(),{top:en,right:_n,bottom:yn,left:Ve}=(dn=>{const nt=window.getComputedStyle(dn);return{top:parseFloat(nt.scrollMarginTop)||0,right:parseFloat(nt.scrollMarginRight)||0,bottom:parseFloat(nt.scrollMarginBottom)||0,left:parseFloat(nt.scrollMarginLeft)||0}})(me);let Le=et==="start"||et==="nearest"?Ft-en:et==="end"?an+yn:Ft+Pt/2-en+yn,Bt=Ee==="center"?it+Qe/2-Ve+_n:Ee==="end"?Dt+_n:it-Ve;const Dn=[];for(let dn=0;dn<Ce.length;dn++){const nt=Ce[dn],{height:ft,width:Xt,top:Rn,right:wn,bottom:Zt,left:Ht}=nt.getBoundingClientRect();if(lt==="if-needed"&&Ft>=0&&it>=0&&an<=Ze&&Dt<=Ue&&Ft>=Rn&&an<=Zt&&it>=Ht&&Dt<=wn)return Dn;const Tn=getComputedStyle(nt),xn=parseInt(Tn.borderLeftWidth,10),ke=parseInt(Tn.borderTopWidth,10),ue=parseInt(Tn.borderRightWidth,10),le=parseInt(Tn.borderBottomWidth,10);let pe=0,he=0;const oe="offsetWidth"in nt?nt.offsetWidth-nt.clientWidth-xn-ue:0,Ae="offsetHeight"in nt?nt.offsetHeight-nt.clientHeight-ke-le:0,Ge="offsetWidth"in nt?nt.offsetWidth===0?0:Xt/nt.offsetWidth:0,_t="offsetHeight"in nt?nt.offsetHeight===0?0:ft/nt.offsetHeight:0;if(ut===nt)pe=et==="start"?Le:et==="end"?Le-Ze:et==="nearest"?Je(mt,mt+Ze,Ze,ke,le,mt+Le,mt+Le+Pt,Pt):Le-Ze/2,he=Ee==="start"?Bt:Ee==="center"?Bt-Ue/2:Ee==="end"?Bt-Ue:Je(St,St+Ue,Ue,xn,ue,St+Bt,St+Bt+Qe,Qe),pe=Math.max(0,pe+mt),he=Math.max(0,he+St);else{pe=et==="start"?Le-Rn-ke:et==="end"?Le-Zt+le+Ae:et==="nearest"?Je(Rn,Zt,ft,ke,le+Ae,Le,Le+Pt,Pt):Le-(Rn+ft/2)+Ae/2,he=Ee==="start"?Bt-Ht-xn:Ee==="center"?Bt-(Ht+Xt/2)+oe/2:Ee==="end"?Bt-wn+ue+oe:Je(Ht,wn,Xt,xn,ue+oe,Bt,Bt+Qe,Qe);const{scrollLeft:Rt,scrollTop:zt}=nt;pe=_t===0?0:Math.max(0,Math.min(zt+pe/_t,nt.scrollHeight-ft/_t+Ae)),he=Ge===0?0:Math.max(0,Math.min(Rt+he/Ge,nt.scrollWidth-Xt/Ge+oe)),Le+=zt-pe,Bt+=Rt-he}Dn.push({el:nt,top:pe,left:he})}return Dn},_e=me=>me===!1?{block:"end",inline:"nearest"}:(De=>De===Object(De)&&Object.keys(De).length!==0)(me)?me:{block:"start",inline:"nearest"};function we(me,De){if(!me.isConnected||!(Mt=>{let ht=Mt;for(;ht&&ht.parentNode;){if(ht.parentNode===document)return!0;ht=ht.parentNode instanceof ShadowRoot?ht.parentNode.host:ht.parentNode}return!1})(me))return;const at=(Mt=>{const ht=window.getComputedStyle(Mt);return{top:parseFloat(ht.scrollMarginTop)||0,right:parseFloat(ht.scrollMarginRight)||0,bottom:parseFloat(ht.scrollMarginBottom)||0,left:parseFloat(ht.scrollMarginLeft)||0}})(me);if((Mt=>typeof Mt=="object"&&typeof Mt.behavior=="function")(De))return De.behavior(Te(me,De));const Oe=typeof De=="boolean"||De==null?void 0:De.behavior;for(const{el:Mt,top:ht,left:lt}of Te(me,_e(De))){const et=ht-at.top+at.bottom,Ee=lt-at.left+at.right;Mt.scroll({top:et,left:Ee,behavior:Oe})}}}}]);
|
|
|
}()); |