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

3479 lines
2.3 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

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

!(function(){var qc=Math.pow;var Au=(gn,kt,ee)=>new Promise((ne,xe)=>{var Me=he=>{try{fe(ee.next(he))}catch(ce){xe(ce)}},Ce=he=>{try{fe(ee.throw(he))}catch(ce){xe(ce)}},fe=he=>he.done?ne(he.value):Promise.resolve(he.value).then(Me,Ce);fe((ee=ee.apply(gn,kt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[7460],{89489:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},59477:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},40001:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},81953:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},49198:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},84105:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={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"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},18785:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={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"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},87169:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},73331:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},15277:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},52671:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},8657:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},10906:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},56082:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},33853:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={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"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},15075:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},62772:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={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"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},43531:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},76618:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},61485:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},38819:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={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"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},47472:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},87395:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(ve,ue){return xe.createElement(fe.Z,(0,ne.Z)({},ve,{ref:ue,icon:Ce}))},ce=xe.forwardRef(he),ae=ce},14618:function(){"use strict"},66552:function(){"use strict"},18760:function(gn,kt){"use strict";kt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},33299:function(gn,kt){"use strict";kt.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},4151:function(){"use strict"},37532:function(gn,kt,ee){"use strict";var ne=ee(59301),xe=Object.defineProperty,Me=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,he=(se,ve,ue)=>ve in se?xe(se,ve,{enumerable:!0,configurable:!0,writable:!0,value:ue}):se[ve]=ue,ce=(se,ve)=>{for(var ue in ve||(ve={}))Ce.call(ve,ue)&&he(se,ue,ve[ue]);if(Me)for(var ue of Me(ve))fe.call(ve,ue)&&he(se,ue,ve[ue]);return se};const ae=se=>React.createElement("svg",ce({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},se),React.createElement("title",null,"\u5360\u7528\u5185\u5B58"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{fillOpacity:.01,fill:"#FFF",d:"M0 0h30v30H0z"}),React.createElement("path",{d:"M6.866 26.928h-1.28a2.561 2.561 0 0 1-2.562-2.561V5.585a2.561 2.561 0 0 1 2.561-2.56h1.28v4.268a2.561 2.561 0 0 0 2.562 2.56h3.842a2.561 2.561 0 0 0 2.56-2.56V3.024h2.915l8.184 8.184v13.159a2.561 2.561 0 0 1-2.561 2.561h-1.28v-5.976c0-.943-.765-1.707-1.708-1.707H8.573c-.943 0-1.707.764-1.707 1.707v5.976Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M8.573 3.024h5.55v4.269a.854.854 0 0 1-.854.853H9.427a.854.854 0 0 1-.854-.853V3.024ZM8.573 26.928v-5.976H21.38v5.976z",fill:"#1890FF"})));kt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},75752:function(gn,kt,ee){"use strict";var ne=ee(59301),xe=Object.defineProperty,Me=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,he=(se,ve,ue)=>ve in se?xe(se,ve,{enumerable:!0,configurable:!0,writable:!0,value:ue}):se[ve]=ue,ce=(se,ve)=>{for(var ue in ve||(ve={}))Ce.call(ve,ue)&&he(se,ue,ve[ue]);if(Me)for(var ue of Me(ve))fe.call(ve,ue)&&he(se,ue,ve[ue]);return se};const ae=se=>React.createElement("svg",ce({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},se),React.createElement("title",null,"\u8FD0\u884C\u65F6\u95F4"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M30 15c0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0c8.284 0 15 6.716 15 15Z",fill:"#BAFFF0"}),React.createElement("path",{d:"M25.5 15c0 5.8-4.7 10.5-10.5 10.5S4.5 20.8 4.5 15 9.2 4.5 15 4.5 25.5 9.2 25.5 15Z",fill:"#44D7B6"}),React.createElement("path",{d:"M13.5 9a1.5 1.5 0 0 1 1.5 1.5v4.379l3.56 3.56a1.5 1.5 0 0 1-2.12 2.122l-4-4A1.5 1.5 0 0 1 12 15.5v-5A1.5 1.5 0 0 1 13.5 9Z",fill:"#FFF"})));kt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},3352: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 gn={},kt="5.0",ee={},ne=null,xe=!1,Me=!1,Ce=null,fe=!1,he=null,ce=null,ae=0;ae<arguments.length;ae++){var se=arguments[ae];if(se!==null)switch(typeof se){case"number":kt=se.toFixed(1);break;case"string":se.match(new RegExp("^[0-9]\\.[0-9]+$"))?kt=se:Ce=se;break;case"object":typeof se.is3D!="undefined"?ne=se:ee=se;break;case"boolean":xe=se,Me=!0;break}}ne===null&&(ne={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ee.material_id!==void 0&&!Me&&(xe=!0)),Ce!==null&&ee.id===void 0&&(ee.id=Ce);var ve="",ue="",pe=!1,oe=null,ge=null,ye=null,we=!1,Be=null,ze=null,$e=null,Le=null,Ne=null;ee.height!==void 0&&(ee.height=Math.round(ee.height)),ee.width!==void 0&&(ee.width=Math.round(ee.width));var Re=function(_t){return parseFloat(_t)>4?parseFloat(_t):5};gn.setHTML5Codebase=function(_t,vt){ce=_t,wt(_t,vt)},gn.setJavaCodebase=gn.setJavaCodebaseVersion=gn.isCompiledInstalled=gn.setPreCompiledScriptPath=gn.setPreCompiledResourcePath=function(){},gn.setHTML5CodebaseVersion=function(_t,vt){var jt=parseFloat(_t);if(jt!==NaN&&jt<5){console.log("The GeoGebra HTML5 codebase version "+jt+" is deprecated. Using version latest instead.");return}he=_t,Ze(_t,vt)},gn.getHTML5CodebaseVersion=function(){return ge},gn.getParameters=function(){return ee},gn.setFontsCSSURL=function(_t){Le=_t},gn.setGiacJSURL=function(_t){},gn.setJNLPFile=function(_t){ve=_t},gn.setJNLPBaseDir=function(_t){},gn.inject=function(){function _t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var vt="auto",jt=ee.id,yn,Xt=!1,Ln=0;Ln<arguments.length;Ln++){var pn=arguments[Ln];typeof pn=="string"?(pn=pn.toLowerCase(),pn.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?vt=pn:jt=arguments[Ln]):typeof pn=="boolean"?Xt=pn:pn instanceof HTMLElement&&(yn=pn)}hn();function hn(){if(!fe){setTimeout(hn,200);return}vt=St(vt);var un=yn||document.getElementById(jt);if(!un){console.log("possibly bug on ajax loading? ");return}if(gn.removeExistingApplet(un,!1),ee.width===void 0&&un.clientWidth&&(ee.width=un.clientWidth),ee.height===void 0&&un.clientHeight&&(ee.height=un.clientHeight),!(ee.width&&ee.height)&&vt==="html5"&&(delete ee.width,delete ee.height),oe=vt,vt==="screenshot")ct(un,ee);else{var Xe=!1;ee.hasOwnProperty("playButton")&&ee.playButton||ee.hasOwnProperty("clickToLoad")&&ee.clickToLoad?Xe=!0:ee.hasOwnProperty("playButtonAutoDecide")&&ee.playButtonAutoDecide&&(Xe=(!Se()||_t())&&Ie()),Xe?(oe="screenshot",We(un,ee,Xt,vt)):Tt(un,ee,Xt)}}};function Se(){try{return window.self!==window.top}catch(_t){return!0}}function Ie(){return ee.hasOwnProperty("screenshotGenerator")&&ee.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}gn.getViews=function(){return ne},gn.isJavaInstalled=function(){return!1};var Ae=function(_t){var vt=function(Ln){var pn=JSON.parse(Ln),hn=function(ke){return ke.type=="G"||ke.type=="E"},un=pn.elements?pn.elements.filter(hn)[0]:pn;if(!un||!un.url){jt();return}ee.fileName=un.url,it(un.settings||{}),ne.is3D=!0;var Xe="https://www.geogebra.org/images/";gn.setPreviewImage(Be||un.previewUrl,Xe+"GeoGebra_loading.png",Xe+"applet_play.png"),_t()},jt=function(){ee.onError&&ee.onError(),Wt("Error: Fetching material (id "+ee.material_id+") failed.",ee)},yn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Xt="/materials/"+ee.material_id+"?scope=basic";Ue("https://"+yn+"/api/proxy.php?path="+encodeURIComponent(Xt),vt,jt)};function it(_t){var vt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(jt){_t[jt]=!!_t[jt]}),vt.forEach(function(jt){ee[jt]===void 0&&_t[jt]!==void 0&&(ee[jt]=_t[jt])}),ee.showToolBarHelp===void 0&&(ee.showToolBarHelp=ee.showToolBar)}function Ue(_t,vt,jt){var yn=new XMLHttpRequest;yn.open("GET",_t),yn.onload=function(){vt(yn.responseText)},yn.onerror=jt,yn.send()}gn.isHTML5Installed=function(){return!0},gn.getLoadedAppletType=function(){return oe},gn.setPreviewImage=function(_t,vt,jt){Be=_t,ze=vt,$e=jt},gn.removeExistingApplet=function(_t,vt){var jt;typeof _t=="string"&&(_t=document.getElementById(_t)),oe=null;var yn=null;for(jt=0;jt<_t.childNodes.length;jt++){var Xt=_t.childNodes[jt],Ln=Xt.className;Ln==="applet_screenshot"?vt?(Xt.style.display="block",oe="screenshot"):Xt.style.display="none":Ln!=="applet_scaler prerender"&&(_t.removeChild(Xt),yn=Ln&&Ln.indexOf("appletParameters")!=-1?Xt.id:null,jt--)}var pn=ee.id!==void 0?ee.id:yn,hn=window[pn];hn&&typeof hn.getBase64=="function"&&(hn.remove(),window[pn]=null)},gn.refreshHitPoints=function(){if(Re(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var _t=gn.getAppletObject();return _t&&typeof _t.recalculateEnvironments=="function"?(_t.recalculateEnvironments(),!0):!1},gn.startAnimation=function(){var _t=gn.getAppletObject();return _t&&typeof _t.startAnimation=="function"?(_t.startAnimation(),!0):!1},gn.stopAnimation=function(){var _t=gn.getAppletObject();return _t&&typeof _t.stopAnimation=="function"?(_t.stopAnimation(),!0):!1},gn.getAppletObject=function(){var _t=ee.id!==void 0?ee.id:"ggbApplet";return window[_t]},gn.resize=function(){};var gt=function(_t,vt,jt){var yn=document.createElement("param");yn.setAttribute("name",vt),yn.setAttribute("value",jt),_t.appendChild(yn)},Ve=function(_t){return _t&&_t!=="false"},Tt=function(_t,vt,jt){Re(ge)<=4.2&&(jt=!0);var yn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ge||ggbHTML5LoadedCodebaseIsWebSimple&&!we)&&(yn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Xt=document.createElement("div");Xt.classList.add("appletParameters","notranslate");var Ln=vt.width,pn=vt.height;if(vt.disableAutoScale=vt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():vt.disableAutoScale,vt.width!==void 0)if(Re(ge)<=4.4)Ve(vt.showToolBar)&&(vt.height-=7),Ve(vt.showAlgebraInput)&&(vt.height-=37),vt.width<605&&Ve(vt.showToolBar)&&(vt.width=605,Ln=605);else{var hn=100;(Ve(vt.showToolBar)||Ve(vt.showMenuBar))&&(vt.hasOwnProperty("customToolBar")&&(vt.customToolbar=vt.customToolBar),hn=Ve(vt.showMenuBar)?245:155),Ln<hn&&(vt.width=hn,Ln=hn)}Xt.style.border="none",Xt.style.display="inline-block";for(var un in vt)vt.hasOwnProperty(un)&&un!=="appletOnLoad"&&Xt.setAttribute("data-param-"+un,vt[un]);Le&&Xt.setAttribute("data-param-fontscssurl",Le),gn.resize=function(){GGBAppletUtils.responsiveResize(_t,vt)},window.addEventListener("resize",function(mt){gn.resize()});var Xe=typeof vt.appletOnLoad=="function"?vt.appletOnLoad:function(){};if(!jt&&vt.width!==void 0){vt.hasOwnProperty("showSplash")||Xt.setAttribute("data-param-showSplash","false");var ke=_t.querySelector(".applet_scaler.prerender"),_e=ke!==null;if(_e)var Te=ke.querySelector(".ggb_preview");else{var Te=ut(Ln,pn,vt.borderColor,!1);ke=document.createElement("div"),ke.className="applet_scaler",ke.style.position="relative",ke.style.display="block",ke.style.width=Ln+"px",ke.style.height=pn+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ke,"66%"),Re(ge)>=5?(vt.appletOnLoad=function(mt){var Nt=_t.querySelector(".ggb_preview");Nt&&Nt.parentNode.removeChild(Nt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ke),window.GGBT_wsf_view&&$(window).trigger("resize"),Xe(mt)},_e||ke.appendChild(Te)):Xt.appendChild(Te),ke.appendChild(Xt),_e||_t.appendChild(ke),setTimeout(function(){gn.resize()},1)}else{var Fe=document.createElement("div");Fe.className="applet_scaler",Fe.style.position="relative",Fe.style.display="block",Fe.appendChild(Xt),_t.appendChild(Fe),vt.appletOnLoad=function(mt){gn.resize(),Xe(mt)}}function me(mt,Nt){Nt&&typeof Nt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(mt,Nt.appletOnLoad):renderGGBElement(mt),Wt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Nt)}function at(mt,Nt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:mt,params:Nt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(rn){me(rn.article,rn.params)}),html5AppletsToProcess=null)},Re(ge)<5&&(mt.className+=" geogebraweb")):me(mt,Nt)}if(yn){scriptLoadStarted=!0;for(var Pt=0;Pt<Xt.childNodes.length;Pt++){var Qe=Xt.childNodes[Pt].tagName;Qe==="TABLE"&&(Xt.removeChild(Xt.childNodes[Pt]),Pt--)}if(ggbHTML5LoadedScript!==null){var Je=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Je!=null&&Je.parentNode.removeChild(Je)}var xt=document.createElement("script"),ot=function(){at(Xt,vt)};xt.src=ue+ye,ggbHTML5LoadedCodebaseIsWebSimple=we,ggbHTML5LoadedCodebaseVersion=ge,ggbHTML5LoadedScript=xt.src,Wt("GeoGebra HTML5 codebase loaded: '"+ue+"'.",vt),!ce&&(!he||he=="5.0")?(we?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),ot()):ue.requirejs?__webpack_require__.e(7206).then(function(){var mt=[__webpack_require__(97206)];ot.apply(null,mt)}.bind(this)).catch(__webpack_require__.oe):(xt.onload=ot,_t.appendChild(xt))}else at(Xt,vt);vt.height=pn,vt.width=Ln},ct=function(_t,vt,jt){var yn=ut(vt.width,vt.height,vt.borderColor,jt),Xt=document.createElement("div");Xt.style.position="relative",Xt.style.display="block",Xt.style.width=vt.width+"px",Xt.style.height=vt.height+"px",Xt.className="applet_screenshot applet_scaler"+(jt?" applet_screenshot_play":""),Xt.appendChild(yn);var Ln=GGBAppletUtils.getScale(vt,_t,jt);jt?(_t.appendChild(lt()),window.GGBT_wsf_view||(_t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Xt,"66%"),_t.appendChild(Xt),Ln!==1&&!isNaN(Ln)&&(GGBAppletUtils.scaleElement(Xt,Ln),Xt.style.width=vt.width+"px",Xt.style.height=vt.height+"px",Xt.parentNode.style.width=vt.width*Ln+"px",Xt.parentNode.style.height=vt.height*Ln+"px"),gn.resize=function(){Ot(_t,yn,Xt,jt)},window.addEventListener("resize",function(pn){gn.resize()}),gn.resize()};function Ot(_t,vt,jt,yn){if(_t.contains(vt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(_t.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(_t)}var Xt=GGBAppletUtils.getScale(ee,_t,yn);jt.parentNode!==null&&(!isNaN(Xt)&&Xt!==1?(GGBAppletUtils.scaleElement(jt,Xt),jt.parentNode.style.width=ee.width*Xt+"px",jt.parentNode.style.height=ee.height*Xt+"px"):(GGBAppletUtils.scaleElement(jt,1),jt.parentNode.style.width=ee.width+"px",jt.parentNode.style.height=ee.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(_t),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}gn.onExitFullscreen=function(_t,vt){vt.appendChild(_t)};var We=function(_t,vt,jt,yn){ct(_t,vt,!0);for(var Xt=function(){var hn=[];for(pn=0;pn<_t.childNodes.length;pn++)hn.push(_t.childNodes[pn]);if(window.GGBT_wsf_view){var un=window.GGBT_wsf_view.renderFullScreen(_t,vt.id),Xe=document.getElementById("fullscreencontainer"),ke=jQuery(_t).find(".fullscreencontent");ke.length>0?(un.remove(),ke.attr("id","fullscreencontent").show(),jQuery(Xe).append(ke),window.dispatchEvent(new Event("resize"))):Tt(un,vt,!1),window.GGBT_wsf_view.launchFullScreen(Xe)}else oe=yn,Tt(_t,vt,!1);if(!window.GGBT_wsf_view)for(pn=0;pn<hn.length;pn++)_t.removeChild(hn[pn])},Ln=_t.getElementsByClassName("ggb_preview_play"),pn=0;pn<Ln.length;pn++)Ln[pn].addEventListener("click",Xt,!1),Ln[pn].addEventListener("ontouchstart",Xt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(_t),Ie()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},lt=function(){var _t=document.createElement("div");if(_t.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var vt='.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");}',jt=document.createElement("style");jt.styleSheet?jt.styleSheet.cssText=vt:jt.appendChild(document.createTextNode(vt)),document.getElementsByTagName("head")[0].appendChild(jt)}return _t},ut=function(_t,vt,jt,yn){var Xt=document.createElement("div");Xt.className="ggb_preview",Xt.style.position="absolute",Xt.style.zIndex="90",Xt.style.width=_t-2+"px",Xt.style.height=vt-2+"px",Xt.style.top="0px",Xt.style.left="0px",Xt.style.overflow="hidden",Xt.style.backgroundColor="white";var Ln="lightgrey";jt!==void 0&&(jt==="none"?Ln="transparent":Ln=jt),Xt.style.border="1px solid "+Ln;var pn=document.createElement("img");if(pn.style.position="relative",pn.style.zIndex="1000",pn.style.top="-1px",pn.style.left="-1px",Be!==null&&pn.setAttribute("src",Be),pn.style.opacity=.7,ze!==null){var hn,un,Xe;if(!yn){hn=document.createElement("img"),hn.style.position="absolute",hn.style.zIndex="1001",hn.style.opacity=1,pn.style.opacity=.3,un=360,un>_t/4*3&&(un=_t/4*3),Xe=un/5.8,hn.setAttribute("src",ze),hn.setAttribute("width",un),hn.setAttribute("height",Xe);var ke=(_t-un)/2,_e=(vt-Xe)/2;hn.style.left=ke+"px",hn.style.top=_e+"px",Xt.appendChild(hn)}}return Xt.appendChild(pn),Xt},St=function(_t){return _t=_t.toLowerCase(),_t==="html5"||_t==="screenshot"?_t:"html5"},qe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ze=function(_t,vt){if(ge=_t,vt){wt(ge,!0);return}var jt=!xe;if(jt){var yn=Re(ge);!isNaN(yn)&&yn<4.4&&(jt=!1)}var Xt,Ln;window.location.protocol.substr(0,4)==="http"?Xt=window.location.protocol:Xt="http:";var pn=ge.indexOf("//");pn>0?Ln=ge:pn===0?Ln=Xt+ge:Ln="https://www.geogebra.org/apps/5.2.814.0/";for(var hn in qe)if(ge.slice(qe[hn].length*-1)===qe[hn]||ge.slice((qe[hn].length+1)*-1)===qe[hn]+"/"){wt(Ln,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&jt&&!ne.is3D&&!ne.AV&&!ne.SV&&!ne.CV&&!ne.EV2&&!ne.CP&&!ne.PC&&!ne.DA&&!ne.FI&&!ne.PV&&!Ve(ee.showToolBar)&&!Ve(ee.showMenuBar)&&!Ve(ee.showAlgebraInput)&&!Ve(ee.enableRightClick)&&(!ee.appName||ee.appName=="classic")?Ln+="webSimple/":Ln+="web3d/",wt(Ln,!1)},wt=function(_t,vt){if(_t.requirejs){ue=_t;return}_t.slice(-1)!=="/"&&(_t+="/"),ue=_t,vt===null&&(vt=_t.indexOf("http")===-1),pe=vt,ye="web.nocache.js",we=!1;var jt=ue.split("/");jt.length>1&&(!vt&&jt[jt.length-2]==="webSimple"?(ye="webSimple.nocache.js",we=!0):qe.indexOf(jt[jt.length-2])>=0&&(ye=jt[jt.length-2]+".nocache.js")),jt=_t.split("/"),ge=jt[jt.length-3],ge.substr(0,4)==="test"?ge=ge.substr(4,1)+"."+ge.substr(5,1):(ge.substr(0,3)==="war"||ge.substr(0,4)==="beta")&&(ge="5.0");var yn=parseFloat(ge);yn!==NaN&&yn<5&&_t.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+yn+" is deprecated. Using version latest instead."),Ze("5.0",vt))},Wt=function(_t,vt){window.console&&window.console.log&&(!vt||typeof vt.showLogging=="undefined"||vt.showLogging&&vt.showLogging!=="false")&&console.log(_t)};ee.material_id!==void 0?Ae(Kt):Kt();function Kt(){var _t=kt;he!==null?_t=he:parseFloat(_t)<5&&(_t="5.0"),Ze(_t,!1),ce!==null&&wt(ce,pe),fe=!0}return gn},GGBAppletUtils=function(){"use strict";function gn(){return window.GGBT_wsf_edit!==void 0}function kt(fe,he){he!=1?(fe.style.transformOrigin="0% 0% 0px",fe.style.webkitTransformOrigin="0% 0% 0px",fe.style.transform="scale("+he+","+he+")",fe.style.webkitTransform="scale("+he+","+he+")",fe.style.maxWidth="initial",fe.querySelector(".ggb_preview")!==null&&(fe.querySelector(".ggb_preview").style.maxWidth="initial"),fe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(fe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),fe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(fe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(fe.style.transform="none",fe.style.webkitTransform="none")}function ee(fe,he,ce,ae,se,ve){var ue=null;if(ve!=null&&ve!="")for(var pe=fe.parentNode;pe!=null;)if((" "+pe.className+" ").indexOf(" "+ve+" ")>-1){ue=pe;break}else pe=pe.parentNode;var oe=0,ge=0,ye=0,we=0,Be=0,ze=0,$e=0;if(ue)oe=ue.offsetWidth,ge=Math.max(ae?ue.offsetWidth:0,ue.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(oe=Math.min(window.innerWidth,document.documentElement.clientWidth),ge=Math.min(window.innerHeight,document.documentElement.clientHeight),ye=oe):(oe=window.innerWidth,ge=window.innerHeight,ye=window.innerWidth),fe){var Le=fe.getBoundingClientRect();Le.left>0&&Le.left<=oe&&(se===void 0||!se)&&(document.dir==="rtl"?(Be=oe-Le.width-Le.left,ze=ye<=480?10:30):(ze=Le.left,Be=ye<=480?10:30),we=ze+Be)}if(fe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Ne=fe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we=40,$e=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(we=0,$e=40)}}return fe&&((ce===void 0||!ce)&&he>0&&he+we<oe?oe=he:oe-=we,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ce===void 0||!ce)&&(ge-=$e)),{width:oe,height:ge}}function ne(fe,he,ce,ae,se){if(fe.isScreenshoGenerator)return 1;var ve=ae!==void 0&&ae,ue=fe.noScaleMargin!=null&&fe.noScaleMargin,pe=function(Ne){return Ne&&Ne!=="false"},oe=pe(fe.autoHeight),ge=ee(he,fe.width,ce,oe,ve&&window.GGBT_wsf_view||ue,se),ye=parseInt(ge.width),we=fe.width,Be=fe.height;if(we===void 0){var ze=he.querySelector(".appletParameters");ze&&(we=ze.offsetWidth,Be=ze.offsetHeight)}var $e=ye/we,Le=ve?1:ge.height/Be;return ce!==void 0&&!ce&&($e=Math.min(1,$e),Le=Math.min(1,Le)),Math.min($e,Le)}function xe(fe,he,ce){var ae=1,se,ve=!1;if(fe.hasOwnProperty("allowUpscale")&&(ve=fe.allowUpscale),fe.hasOwnProperty("scale")&&(ae=parseFloat(fe.scale),(isNaN(ae)||ae===null||ae===0)&&(ae=1),ae>1&&(ve=!0)),he&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ve=!0),!(fe.hasOwnProperty("disableAutoScale")&&fe.disableAutoScale))se=ne(fe,he,ve,ce,fe.scaleContainerClass);else return ae;return ve&&(!fe.hasOwnProperty("scale")||ae===1)?se:Math.min(ae,se)}function Me(fe){var he=Math.min(window.innerWidth,document.documentElement.clientWidth),ce=Math.min(window.innerHeight,document.documentElement.clientHeight),ae=fe.getBoundingClientRect(),se=(he-ae.width)/2,ve=(ce-ae.height)/2;ve<0&&(ve=0),fe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(se<40?fe.style.left="40px":fe.style.left=se+"px",fe.style.top=ve+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ve<40?fe.style.top="40px":fe.style.top=ve+"px",fe.style.left=se+"px")}function Ce(fe,he){var ce=fe.querySelector(".appletParameters");if(ce){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(he.id!==ce.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(fe)}if(ce.parentElement&&/fullscreen/.test(ce.parentElement.className))return;var ae=xe(he,fe);gn()&&ce.setAttribute("data-param-scale",ae);for(var se=null,ve=0;ve<fe.childNodes.length;ve++)if(fe.childNodes[ve].className!==void 0&&fe.childNodes[ve].className.match(/^applet_scaler/)){se=fe.childNodes[ve];break}if(se!==null&&se.querySelector(".noscale")!==null)return;var ue=he.id!==void 0?he.id:"ggbApplet",pe=window[ue];(pe==null||!pe.recalculateEnvironments)&&se!==null&&!se.className.match(/fullscreen/)&&(se.parentNode.style.transform="",!isNaN(ae)&&ae!==1?(se.parentNode.style.width=he.width*ae+"px",se.parentNode.style.height=he.height*ae+"px",kt(se,ae)):(kt(se,1),se.parentNode.style.width=he.width+"px",se.parentNode.style.height=he.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Me(fe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ce).parents(".content-added-content"))}}return{responsiveResize:Ce,isFlexibleWorksheetEditor:gn,positionCenter:Me,getScale:xe,scaleElement:kt}}();__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 gn=n.location.search;return gn.indexOf(J)!=-1||gn.indexOf(K)!=-1}function q(gn,kt){}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(gn){var kt=s[L].bindings;s[L].bindings=function(){for(var ee=kt?kt():{},ne=gn[webModule.__softPermutationId],xe=O;xe<ne.length;xe++){var Me=ne[xe];ee[Me[O]]=Me[P]}return ee}};var t;function u(){return v(),t}function v(){if(!t){var gn=o.createElement(Q);if(gn.id=L,gn.style.cssText=R+S,gn.tabIndex=-1,o.body.appendChild(gn),t=gn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var kt=document.compatMode==U?V:W;t.write(kt+X),t.close()}}}function w(gn){function kt(ne){function xe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Me=xe();if(Me){ne();return}function Ce(){if(!Me){if(!xe())return;Me=!0,ne(),o.removeEventListener&&o.removeEventListener(Z,Ce,!1),fe&&clearInterval(fe)}}o.addEventListener&&o.addEventListener(Z,Ce,!1);var fe=setInterval(function(){Ce()},$)}function ee(ne){var xe=u(),Me=xe.body,Ce=xe.createElement(_);Ce.language=ab,Ce.crossOrigin=W,Ce.src=ne,webModule.__errFn&&(Ce.onerror=function(){webModule.__errFn(L,new Error(bb+ne))}),Me.appendChild(Ce)}kt(function(){ee(gn)})}webModule.__startLoadingFragment=function(gn){return C(gn)},webModule.__installRunAsyncCode=function(gn){var kt=u(),ee=kt.body,ne=kt.createElement(_);ne.language=ab,ne.text=gn,ee.appendChild(ne),ee.removeChild(ne)};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(gn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(gn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(gn){var kt=c[gn];return kt==null?null:kt},r=d,webModule.__errFn=e}function B(){function gn(fe){var he=fe.lastIndexOf(rb);he==-1&&(he=fe.length);var ce=fe.indexOf(sb);ce==-1&&(ce=fe.length);var ae=fe.lastIndexOf(tb,Math.min(ce,he));return ae>=O?fe.substring(O,ae+P):W}function kt(fe){if(!fe.match(/^\w+:\/\//)){var he=o.createElement(ub);he.src=fe+vb,fe=gn(he.src)}return fe}function ee(){var fe=__gwt_getMetaProperty(wb);return fe!=null?fe:W}function ne(){for(var fe=o.getElementsByTagName(_),he=O;he<fe.length;++he)if(fe[he].src.indexOf(xb)!=-1)return gn(fe[he].src);return W}function xe(){var fe=o.getElementsByTagName(yb);return fe.length>O?fe[fe.length-P].href:W}function Me(){var fe=o.location;return fe.href==fe.protocol+zb+fe.host+fe.pathname+fe.search+fe.hash}var Ce=ee();return Ce==W&&(Ce=ne()),Ce==W&&(Ce=xe()),Ce==W&&Me()&&(Ce=gn(o.location.href)),Ce=kt(Ce),Ce}function C(gn){return gn.match(/^\//)||gn.match(/^[a-zA-Z]+:\/\//)?gn:webModule.__moduleBase+gn}function D(){var gn=[],kt=O,ee=[],ne=[];function xe(fe){var he=ne[fe](),ce=ee[fe];if(he in ce)return he;var ae=[];for(var se in ce)ae[ce[se]]=se;throw r&&r(fe,ae,he),null}if(__gwt_isKnownPropertyValue=function(fe,he){return he in ee[fe]},webModule.__getPropMap=function(){var fe={};for(var he in ee)ee.hasOwnProperty(he)&&(fe[he]=xe(he));return fe},webModule.__computePropValue=xe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Me;try{Me=Cb;var Ce=Me.indexOf(Db);Ce!=-1&&(kt=parseInt(Me.substring(Ce+P),$),Me=Me.substring(O,Ce))}catch(fe){}return webModule.__softPermutationId=kt,C(Me+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})()},79090:function(gn,kt,ee){"use strict";ee.d(kt,{Ax:function(){return Ce},Ds:function(){return fe},KI:function(){return ce},SI:function(){return Me},f1:function(){return xe}});var ne=ee(6521);function xe(ae){let se=!0;if(ae.length>0){for(let ve=0;ve<ae.length;ve++)if(ae[ve].compile_success==0||!ae[ve].compile_success){se=!1;break}}else se=!1;return se}function Me(ae,se=""){let ve=[];for(let ue=0;ue<ae.length;ue++){let pe=ae[ue],oe=se?`${se}/${pe.name}`:`${pe.name}`;ve.push({title:pe.name,type:pe.type,isLeaf:pe.type!=="tree",key:oe})}return ve}function Ce(ae,se,ve){for(let ue=0;ue<ae.length;ue++){let pe=ae[ue];if(pe.key===se){pe.children=ve;break}pe.children&&Ce(pe.children,se,ve)}return ae}function fe(ae,se,ve){let ue;return function(){let pe=this,oe=arguments,ge=function(){ue=null,ve||ae.apply(pe,oe)},ye=ve&&!ue;clearTimeout(ue),ue=setTimeout(ge,se),ye&&ae.apply(pe,oe)}}const he=!0,ce=ne.Z.API_SERVER},61205:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ye}});var ne=ee(59301),xe=ee(79769),Me=ee(1012),Ce=ee(92310),fe=ee.n(Ce),he={upload:"upload___jpwPD"},ce=Object.defineProperty,ae=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ue=(we,Be,ze)=>Be in we?ce(we,Be,{enumerable:!0,configurable:!0,writable:!0,value:ze}):we[Be]=ze,pe=(we,Be)=>{for(var ze in Be||(Be={}))se.call(Be,ze)&&ue(we,ze,Be[ze]);if(ae)for(var ze of ae(Be))ve.call(Be,ze)&&ue(we,ze,Be[ze]);return we},oe=(we,Be,ze)=>new Promise(($e,Le)=>{var Ne=Ie=>{try{Se(ze.next(Ie))}catch(Ae){Le(Ae)}},Re=Ie=>{try{Se(ze.throw(Ie))}catch(Ae){Le(Ae)}},Se=Ie=>Ie.done?$e(Ie.value):Promise.resolve(Ie.value).then(Ne,Re);Se((ze=ze.apply(we,Be)).next())}),ye=(0,ne.forwardRef)(({chunkSize:we=1024*1024*2,options:Be={},onBeginInitFile:ze,onBefore:$e,onProgress:Le,onComplete:Ne,onError:Re,onCancel:Se,children:Ie,accept:Ae,className:it,style:Ue={},concurrency:gt=4},Ve)=>{const Tt=(0,ne.useRef)((0,Me.Z)()),ct=(0,ne.useRef)(new Map);(0,ne.useImperativeHandle)(Ve,()=>({cancel:ut=>{var St;ut?((St=ct.current.get(ut))==null||St.abort(),ct.current.delete(ut)):(ct.current.forEach(qe=>qe.abort()),ct.current.clear()),Se==null||Se(ut?{name:ut}:null)}}));const Ot=()=>{const ut=document.getElementById(Tt.current);ut&&(ut.value="")},We=ut=>oe(void 0,null,function*(){const St=ut.name+ut.size+ut.lastModified;if(ct.current.has(St))return;if(($e==null?void 0:$e(ut))===!0){Ot();return}ze==null||ze(ut);const qe=new AbortController;ct.current.set(St,qe);try{const Ze=Math.ceil(ut.size/we),wt=yield(0,xe.ZP)("/api/attachments/multipart_upload_start",{method:"POST",body:pe({fileName:ut.name,chunkCount:Ze},Be)});if((wt==null?void 0:wt.status)!==0)throw new Error("init failed");const{upload_id:Wt}=wt,Kt=[];for(let vt=0;vt<Ze;vt++){const jt=vt*we,yn=Math.min(jt+we,ut.size),Xt=ut.slice(jt,yn),Ln=new FormData;Ln.append("chunk",Xt),Ln.append("fileName",ut.name),Ln.append("chunkIndex",String(vt+1)),Ln.append("uploadId",Wt),Object.keys(Be).forEach(pn=>Ln.append(pn,Be[pn])),Kt.push(()=>(0,xe.ZP)("/api/attachments/multipart_upload",{method:"POST",body:Ln,signal:qe.signal},!0).then(pn=>{const hn=Math.round((vt+1)/Ze*100);Le==null||Le({file:ut,percent:hn})}))}for(let vt=0;vt<Kt.length;vt+=gt){if(qe.signal.aborted)throw new Error("cancelled");yield Promise.all(Kt.slice(vt,vt+gt).map(jt=>jt()))}const _t=yield(0,xe.ZP)("/api/attachments/multipart_upload_end",{method:"POST",body:pe({fileName:ut.name,chunkCount:Ze,uploadId:Wt},Be)});if(_t!=null&&_t.object)Ne==null||Ne(_t,ut);else throw new Error("complete failed")}catch(Ze){Ze.name!=="AbortError"&&(Re==null||Re(Ze,ut))}finally{ct.current.delete(St)}}),lt=ut=>{const St=ut.target.files;St&&(Array.from(St).forEach(qe=>We(qe)),Ot())};return ne.createElement(ne.Fragment,null,ne.createElement("input",{type:"file",multiple:!0,id:Tt.current,style:{display:"none"},onChange:lt,accept:Ae}),ne.createElement("label",{htmlFor:Tt.current,className:fe()(he.upload,it),style:Ue},Ie))})},15868:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ue}});var ne=ee(59301),xe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Me=ee(92310),Ce=ee.n(Me),fe=ee(71418),he=ee(2859),ce=ee(79769),ae=ee(25544),se=(pe,oe,ge)=>new Promise((ye,we)=>{var Be=Le=>{try{$e(ge.next(Le))}catch(Ne){we(Ne)}},ze=Le=>{try{$e(ge.throw(Le))}catch(Ne){we(Ne)}},$e=Le=>Le.done?ye(Le.value):Promise.resolve(Le.value).then(Be,ze);$e((ge=ge.apply(pe,oe)).next())}),ue=({data:pe,className:oe,fullWidth:ge,style:ye={},onClose:we,onOk:Be,showFullTools:ze,noAssociationId:$e})=>{const Le=(0,ne.useRef)(null),Ne=(0,ne.useRef)(null),Re=(0,ne.useRef)(null),Se=(0,ne.useRef)(null),[Ie,Ae]=(0,ne.useState)(!1),[it,Ue]=(0,ne.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ne.useEffect)(()=>{Re.current||(Re.current=document.createElement("style"),document.head.appendChild(Re.current)),pe!=null&&pe.visible?(document.body.setAttribute("data-custom","y-hidden"),Re.current.innerHTML=" html { overflow-y: hidden; }",pe!=null&&pe.src&&gt()):(document.body.removeAttribute("data-custom"),Re.current&&(document.head.removeChild(Re.current),Re.current=null))},[pe==null?void 0:pe.visible]);const gt=()=>se(void 0,null,function*(){Ae(!0),Ue("\u6B63\u5728\u52A0\u8F7D\u4E2D");const We=yield(0,ae.ZJ)(pe==null?void 0:pe.src);Le.current.src="",Le.current.src=We,Le.current.onload=function(){Ot()},Ae(!1),Ue("")}),Ve=()=>{document.body.removeAttribute("data-custom"),Re.current.innerHTML=" ",we()},Tt=We=>se(void 0,null,function*(){Ae(!0),Ue("\u6B63\u5728\u4FDD\u5B58\u4E2D");const lt=yield(0,ce.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:pe.title,file:We.dataUrl}});lt!=null&&lt.id&&!$e?(yield(0,ce.ZP)(`/api/attachments/${pe.id}/add_subitem.json`,{method:"post",body:{subitem_id:lt==null?void 0:lt.id,settings:JSON.stringify(We.state)}})).status===0&&Be():lt!=null&&lt.id&&Be(lt),document.body.removeAttribute("data-custom"),Re.current.innerHTML=" ",Ae(!1),Ue("")}),ct=()=>{const We=document.querySelector('a[href="https://markerjs.com/"]');We&&We.parentNode&&(We.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(ut=>{const St=document.querySelector(ut.name);St&&St.setAttribute("title",ut.title)})},Ot=()=>{Ne.current=new he.hP(Le.current),Ne.current.targetRoot=Se.current,Ne.current.addEventListener("render",Tt),Ne.current.addEventListener("beforeclose",Ve),ze&&(Ne.current.availableMarkerTypes=Ne.current.ALL_MARKER_TYPES,Ne.current.uiStyleSettings.redoButtonVisible=!0,Ne.current.uiStyleSettings.notesButtonVisible=!0,Ne.current.uiStyleSettings.zoomButtonVisible=!0,Ne.current.uiStyleSettings.zoomOutButtonVisible=!0,Ne.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ne.current.uiStyleSettings,Ne.current.show(),pe!=null&&pe.snapshotData&&Ne.current.restoreState(pe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),ct()},300)};return ne.createElement(ne.Fragment,null,(pe==null?void 0:pe.visible)&&ne.createElement(fe.Z,{spinning:Ie,tip:it,style:{position:"absolute"}},ne.createElement("div",{ref:Se,className:Ce()(xe.imageDimensions,oe,ge?xe.fullWidth:""),style:ye},ne.createElement("img",{className:xe.img,ref:Le}))))}},3315:function(gn,kt,ee){"use strict";var ne=ee(59301),xe=ee(95237),Me=ee(43604),Ce=ee(99313),fe=ee(3113),he=ee(39655),ce=ee(18760),ae=ee(48136),se=ee(59301);const ve=(0,ne.forwardRef)(({callback:ue,showSaveButton:pe,value:oe=""},ge)=>{const ye=(0,ne.useRef)(),we=[{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 "}]}]}],Be=[{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}`}]}]}],ze=Ne=>{ye.current.setValue(ye.current.getValue()+" "+Ne.value+" ")},$e=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:se.createElement(xe.Z,{className:ce.Z.lists,gutter:[10,10]},we.map((Ne,Re)=>se.createElement(Me.Z,{flex:"110px",className:ce.Z.item},se.createElement("div",null,se.createElement(he.Z,{value:`$$${Ne.value}$$`}),Ne.name),se.createElement("div",{className:ce.Z.children},Ne.children.map((Se,Ie)=>se.createElement("div",{key:Ie},se.createElement("h1",null,Se.name),se.createElement(xe.Z,{gutter:[10,10]},Se.data.map((Ae,it)=>se.createElement(Me.Z,{key:it,onClick:()=>ze(Ae),className:ce.Z.diamond},se.createElement(he.Z,{value:"`$$"+Ae.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:se.createElement(xe.Z,{className:ce.Z.lists,gutter:[10,10]},Be.map((Ne,Re)=>se.createElement(Me.Z,{flex:"110px",className:ce.Z.item},se.createElement("div",null,se.createElement(he.Z,{value:"`$$"+Ne.value+"$$`"}),Ne.name),se.createElement("div",{className:ce.Z.children},Ne.children.map((Se,Ie)=>se.createElement("div",{key:Ie},Se.name&&se.createElement("h1",null,Se.name),se.createElement(xe.Z,{gutter:[10,10]},Se.data.map((Ae,it)=>se.createElement(Me.Z,{key:it,onClick:()=>ze(Ae),className:ce.Z.diamond},se.createElement(he.Z,{value:"`$$"+Ae.value+"$$`"}))))))))))}],Le=()=>{var Ne=document.createElement("div");Ne.innerHTML=ye.current.getValue();var Re=Ne.innerText;return ue&&ue(Re),Re};return(0,ne.useImperativeHandle)(ge,()=>({getData:Le})),se.createElement("div",{className:ce.Z.mathWrap},se.createElement(Ce.default,{defaultActiveKey:"1",items:$e}),se.createElement("math-field",{locale:"zh_cn",className:ce.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ye,style:{width:800,marginTop:30,fontSize:18}},oe||""),pe&&se.createElement("div",{className:ce.Z.button},se.createElement(fe.ZP,{size:"large",onClick:Le,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});kt.Z=ve},59955:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Ce}});var ne=ee(91482),xe={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Me=ee(59301),Ce=({message:fe,className:he,children:ce,style:ae={}})=>Me.createElement("div",{className:`custom-spinner ${xe.idsRingWrapper} ${he}`},Me.createElement("div",{className:xe.ldsRing},Me.createElement("div",null),Me.createElement("div",null),Me.createElement("div",null),Me.createElement("div",null)),fe?Me.createElement("p",{style:ae},fe):null,ce,Me.createElement(ne.Outlet,null))},22854:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Ce}});var ne=ee(59301),xe=ee(21798),Me=ee(59301),Ce=({defaultX:fe="40%",leftChild:he,rightChild:ce,className:ae,hideResize:se=!1})=>{const[ve,ue]=(0,ne.useState)(fe),pe=(0,ne.useRef)();function oe(){pe.current=!0}(0,ne.useEffect)(()=>{function we(ze){pe.current&&(xe.Z.publish("resize-move-bar",ze),ue(ze.pageX))}function Be(){pe.current=!1}return window.addEventListener("mousemove",we),window.addEventListener("mouseup",Be),()=>{window.removeEventListener("mousemove",we),window.removeEventListener("mouseup",Be)}},[]);const ge=typeof ve=="number"&&ve!==.01?`${ve}px`:fe,ye=`calc(100% - ${se?"0px":"4px"} - ${ge})`;return Me.createElement("div",{className:`split-panel-container ${ae}`},Me.createElement("section",{style:{width:ge,display:ve===.01?"none":""}},he),Me.createElement("section",{className:"resize-x-bar",onMouseDown:oe},Me.createElement("a",{className:"btn-resize"},Me.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Me.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),Me.createElement("section",{style:{width:ye}},ce))}},45366:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return he}});var ne=ee(59301),xe={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},Me=ee(92310),Ce=ee.n(Me),he=({className:ce,style:ae={},leftNode:se,leftTitle:ve="\u81EA\u6D4B\u8F93\u5165",rightNode:ue,rightTitle:pe="\u8FD0\u884C\u7ED3\u679C"})=>ne.createElement("div",{className:Ce()(xe.result,ce),style:ae},ne.createElement("div",{className:xe.left},ne.createElement("div",{className:xe.title},ne.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),ne.createElement("span",null,ve)),ne.createElement("div",{className:xe.leftNode},se)),ne.createElement("div",{className:xe.right},ne.createElement("div",{className:xe.title},ne.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),ne.createElement("span",null,pe)),ne.createElement("div",{className:xe.rightNode},ue)))},4769:function(gn,kt,ee){"use strict";var ne=ee(59301);const xe=Ce=>String(Ce).length===1?`0${Ce}`:Ce,Me=({className:Ce="",onChange:fe,defaultValue:he=0})=>{const[ce,ae]=(0,ne.useState)(he);(0,ne.useEffect)(()=>{const pe=setTimeout(()=>{ae(ce+1e3)},1e3);return fe(ce+1e3),()=>{clearInterval(pe)}},[ce]);const se=parseInt(ce/(60*6e4))||"00",ve=parseInt(ce%(60*6e4)/6e4)||"00",ue=parseInt(ce%6e4/1e3)||"00";return ne.createElement("div",{className:Ce},xe(se),":",xe(ve),":",xe(ue))};kt.Z=Me},20978:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ye}});var ne=ee(59301),xe=ee(8591),Me=ee(38854),Ce=ee(9667),fe=ee(16471),he=ee(7544),ce=ee(56102),ae=ee(1427),se={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},ve=(we,Be,ze)=>new Promise(($e,Le)=>{var Ne=Ie=>{try{Se(ze.next(Ie))}catch(Ae){Le(Ae)}},Re=Ie=>{try{Se(ze.throw(Ie))}catch(Ae){Le(Ae)}},Se=Ie=>Ie.done?$e(Ie.value):Promise.resolve(Ie.value).then(Ne,Re);Se((ze=ze.apply(we,Be)).next())});function ue(we){if(isNaN(we))return{minutes:"00",seconds:"00"};const Be=new Date(we*1e3).toISOString().substr(11,8);return{hour:Be.substr(0,2),minutes:Be.substr(3,2),seconds:Be.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function pe(we,Be){return we-Be}function oe(we){we.sort(pe);let Be=0;for(let ze=0;ze<we.length-1;ze++){let $e=Math.abs(we[ze+1]-we[ze]);$e<21&&(Be+=$e)}return Be}const ge=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var ye=(0,ne.forwardRef)(({allow_skip:we,src:Be,toLog:ze,videoId:$e,logWatchHistory:Le,courseId:Ne=null,startTime:Re,handlePause:Se=()=>{},handlePlay:Ie=()=>{},handlePlayEnded:Ae=()=>{},autoPlay:it=!1,onPlayEnded:Ue=()=>{},isShowWaterMark:gt=!0},Ve)=>{var Tt;const Ot=((Tt=Be==null?void 0:Be.split("."))==null?void 0:Tt.pop())==="flv",We=(0,ne.useRef)(),lt=(0,ne.useRef)(),ut=(0,ne.useRef)(),St=(0,ne.useRef)(),qe=(0,ne.useRef)(),Ze=(0,ne.useRef)(),wt=(0,ne.useRef)(),Wt=(0,ne.useRef)(),Kt=(0,ne.useRef)(),_t=(0,ne.useRef)(),vt=(0,ne.useRef)(),jt=(0,ne.useRef)(),yn=(0,ne.useRef)(),Xt=(0,ne.useRef)(),Ln=navigator.userAgent.toLowerCase().match(ge),pn=Ln?Ln[0]:"pc",hn=(0,ne.useRef)(!1),un=(0,he.eY)();let Xe=0,ke=0,_e=0,Te=null,Fe=!1,me=20,at=1,Pt=!1,Qe=!1,Je=[];(0,ne.useImperativeHandle)(Ve,()=>({getLastUpdatedTime:()=>We.current.currentTime,getDuration:()=>We.current.duration})),xe.ZP.config({maxCount:1,getContainer:()=>ut.current});const xt=(0,ne.useCallback)((dn,At=!1)=>{let Lt={point:We.current.currentTime};Te?(Lt.log_id=Te,Lt.watch_duration=oe(Je),Lt.total_duration=ke):(Ne?(Lt.video_id=parseInt($e,10),Lt.course_id=Ne):Lt.video_id=$e,Lt.duration=Xe,Lt.device=pn),At&&(Lt.ed="1");function qt(){return ve(this,null,function*(){Pt=!0,Te=yield Le==null?void 0:Le(Lt),Pt=!1,dn&&dn()})}qt()},[$e,Ne]);(0,ne.useEffect)(()=>{We.current&&(St.current.style.display="none",qe.current.style.display="block"),xe.ZP.destroy();let dn=null;return Ce.Z.isSupported&&Ot&&Be&&(Be==null?void 0:Be.indexOf(".m3u8"))<0?(dn=Ce.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:Be,muted:!1}),We.current&&(dn.attachMediaElement(We.current),dn.load())):We.current.setAttribute("src",Be),mt(),()=>{dn&&(dn.unload(),dn.pause(),dn.destroy(),dn=null)}},[We,Ot,Be]);function ot(){We.current.paused?(St.current.style.display="none",qe.current.style.display="block"):(St.current.style.display="block",qe.current.style.display="none")}function mt(){vt.current.style.display="none",yn.current.style.display="none",jt.current.style.display="none",We.current.muted||We.current.volume===0?vt.current.style.display="block":We.current.volume>0&&We.current.volume<=.5?yn.current.style.display="block":jt.current.style.display="block"}(0,ne.useEffect)(()=>{const dn=document.getElementById("play"),At=document.querySelectorAll(".playback-icons use");function Lt(){Ie(),Re&&!hn.current&&(We.current.currentTime=Re),hn.current=!0,Je.push(We.current.currentTime),Fe||(Fe=!0,ze&&xt())}function qt(){return ve(this,null,function*(){ot(),Je.push(We.current.currentTime),ze&&xt(()=>{Te=null,_e=0,Fe=!1,Pt=!1,Qe=!1,Je=[],ke=0,at=1},!0),Ue()})}function Tn(){Ze.current.value=Math.round(We.current.currentTime),wt.current.value=Math.round(We.current.currentTime)}function Jt(){const Yn=ue(Math.round(We.current.currentTime));Kt.current.innerText=`${Yn.hour>0?Yn.hour+":":""}${Yn.minutes}:${Yn.seconds}`,Kt.current.setAttribute("datetime",`${Yn.hour>0?" "+Yn.hour+" ":""}${Yn.minutes}m ${Yn.seconds}s`)}function On(){var Yn,mr,si,or,ii,ki,gi;const Li=Math.round((Yn=We.current)==null?void 0:Yn.duration);(si=(mr=Ze.current)==null?void 0:mr.setAttribute)==null||si.call(mr,"max",Li),(ii=(or=wt.current)==null?void 0:or.setAttribute)==null||ii.call(or,"max",Li);const ui=ue(Li);Wt.current&&(Wt.current.innerText=`${ui.hour>0?ui.hour+":":""}${ui.minutes}:${ui.seconds}`,(gi=(ki=Wt.current).setAttribute)==null||gi.call(ki,"datetime",`${ui.hour>0?" "+ui.hour+" ":""}${ui.minutes}m ${ui.seconds}s`))}function zn(){try{const Yn=Math.round(We.current.duration);Ze.current.setAttribute("max",Yn),wt.current.setAttribute("max",Yn);const mr=ue(Yn);Wt.current.innerText=`${mr.hour>0?mr.hour+":":""}${mr.minutes}:${mr.seconds}`,Wt.current.setAttribute("datetime",`${mr.hour>0?" "+mr.hour+" ":""}${mr.minutes}m ${mr.seconds}s`),Tn(),Jt();const{width:si,height:or,x:ii,y:ki}=lt.current.getBoundingClientRect();if(ii<0||ki<0||!si)return;if(!Qe){let gi=We.current.currentTime,Li=gi-_e;Math.abs(Li)<10?(ke+=Math.abs(Li),_e=gi,Pt||ke-at*me>=0&&(at++,Je.push(_e),ze&&xt())):(_e=gi,ze&&xt())}}catch(Yn){console.log(Yn)}}function qn(){Qe=!0}function Xn(){We.current.playing&&Je.push(We.current.currentTime,_e),_e=We.current.currentTime,Qe=!1}function vr(){Xe=We.current.duration,Xe<=20&&(me=Xe/3),We.current.addEventListener("play",Lt)}function _r(Yn){Yn.preventDefault(),(0,ae.vp)()?(We.current.style.width="100%",We.current.style.height="100%"):We.current.style.cssText=""}function Qn(){Se()}function Cr(Yn){if(!we){xe.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const mr=Yn.target.dataset.seek?Yn.target.dataset.seek:Yn.target.value;We.current.currentTime=mr,wt.current.value=mr,Ze.current.value=mr}function ni(Yn){const mr=Math.round(Yn.offsetX/Yn.target.clientWidth*parseInt(Yn.target.getAttribute("max"),10));Ze.current.setAttribute("data-seek",mr);const si=ue(mr);_t.current.textContent=`${si.hour>0?si.hour+":":""}${si.minutes}:${si.seconds}`;const or=We.current.getBoundingClientRect();_t.current.style.left=`${Yn.pageX-or.left}px`}function Jr(Yn){switch(Yn.code){case"Space":Yn.preventDefault(),It();break;case"ArrowRight":if(Yn.preventDefault(),!we){xe.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(We.current.currentTime>=We.current.duration)break;We.current.currentTime=parseInt(We.current.currentTime)+5,Tn();break;case"ArrowLeft":if(Yn.preventDefault(),!we){xe.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(We.current.currentTime===0)break;We.current.currentTime=parseInt(We.current.currentTime)-5,Tn();break;case"ArrowUp":Yn.preventDefault(),We.current.volume<1&&(We.current.volume=(parseInt(We.current.volume*10)+1)/10);break;case"ArrowDown":Yn.preventDefault(),We.current.volume>0&&(We.current.volume=(parseInt(We.current.volume*10)-1)/10);break}}return ut.current.addEventListener((0,ae.gH)(),_r),We.current.addEventListener("canplay",vr),We.current.addEventListener("ended",qt),We.current.addEventListener("seeking",qn),We.current.addEventListener("seeked",Xn),We.current.addEventListener("loadedmetadata",On),Ze.current.addEventListener("mousemove",ni),Ze.current.addEventListener("input",Cr),We.current.addEventListener("timeupdate",zn),We.current.addEventListener("pause",Qn),We.current.addEventListener("volumechange",mt),document.addEventListener("keydown",Jr),()=>{var Yn,mr,si,or,ii,ki,gi,Li,ui,dr,Hr,Cn;(Yn=We.current)==null||Yn.removeEventListener("canplay",vr),(mr=We.current)==null||mr.removeEventListener("play",Lt),(si=We.current)==null||si.removeEventListener("ended",qt),(or=We.current)==null||or.removeEventListener("seeking",qn),(ii=We.current)==null||ii.removeEventListener("seeked",Xn),(ki=Ze.current)==null||ki.removeEventListener("mousemove",ni),(gi=Ze.current)==null||gi.removeEventListener("input",Cr),(Li=We.current)==null||Li.removeEventListener("timeupdate",zn),(ui=We.current)==null||ui.removeEventListener("pause",Qn),(dr=We.current)==null||dr.removeEventListener("loadedmetadata",On),(Hr=We.current)==null||Hr.removeEventListener("volumechange",mt),document.removeEventListener("keydown",Jr),(Cn=We.current)!=null&&Cn.playing&&(Je.push(_e,We.current.currentTime),ze&&xt())}},[We,Be]),(0,ne.useEffect)(()=>{if(We.current.onended=()=>{Ae(We)},We.current.oncontextmenu=()=>!1,(Be==null?void 0:Be.indexOf(".m3u8"))>-1){if(We.current.canPlayType("application/vnd.apple.mpegurl"))We.current.src=Be;else if(fe.ZP.isSupported()){var dn=new fe.ZP;dn.loadSource(Be),dn.attachMedia(We.current)}}},[Be]);const[Nt,rn]=(0,ne.useState)(1),It=()=>{We.current.paused||We.current.ended?We.current.play():We.current.pause(),ot()};function Qt(){We.current.muted=!We.current.muted,We.current.muted?(Xt.current.setAttribute("data-volume",volume.value),Xt.current.value=0):Xt.current.value=Xt.current.dataset.volume}return ne.createElement("div",{style:{position:"relative"},ref:ut},ne.createElement("div",{ref:lt,className:`${se.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${se.animate__loop}`},gt&&un?un.login:" "),ne.createElement("div",{className:se.container},ne.createElement("div",{className:se["video-container"],id:"video-container"},ne.createElement("div",{className:se["playback-animation"],id:"playback-animation"},ne.createElement("svg",{className:se["playback-icons"]},ne.createElement("use",{className:"hidden",href:"#play-icon"}),ne.createElement("use",{href:"#pause"}))),ne.createElement("video",{className:se.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:We,autoPlay:it}),ne.createElement("div",{className:`${se["video-controls"]} `,id:"video-controls"},ne.createElement("div",{className:se["bottom-controls"]},ne.createElement("div",{className:se["left-controls"]},ne.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:It},ne.createElement("svg",{className:se["playback-icons"]},ne.createElement("use",{ref:qe,href:"#play-icon"}),ne.createElement("use",{ref:St,style:{display:"none"},href:"#pause"}))),ne.createElement("div",{className:se.time},ne.createElement("time",{id:"time-elapsed",ref:Kt},"00:00"),ne.createElement("span",null," / "),ne.createElement("time",{id:"duration",ref:Wt},"00:00"))),ne.createElement("div",{className:se["right-controls"]},we&&ne.createElement(Me.Z,{placement:"top",overlayClassName:se.rateOverlay,getPopupContainer:dn=>dn.parentNode,menu:{items:[{key:"1",label:ne.createElement("span",{onClick:()=>{rn(1),We.current.playbackRate=1}},"1.0x")},{key:"2",label:ne.createElement("span",{onClick:()=>{rn(1.5),We.current.playbackRate=1.5}},"1.5x")},{key:"3",label:ne.createElement("span",{onClick:()=>{rn(2),We.current.playbackRate=2}},"2.0x")}]}},ne.createElement("div",{className:`${se.controlText} mr5`},"\u500D\u901F")),ne.createElement(ce.CopyToClipboard,{text:Be,onCopy:()=>xe.ZP.success("\u590D\u5236\u6210\u529F")},ne.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},ne.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),ne.createElement("div",{className:se["volume-controls"]},ne.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:se["volume-button"],id:"volume-button",onClick:Qt},ne.createElement("i",{ref:vt,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),ne.createElement("i",{ref:yn,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),ne.createElement("i",{ref:jt,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),ne.createElement("input",{className:se.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Xt,style:{display:"none"},onClick:mt})),ne.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:se["fullscreen-button"],onClick:()=>{(0,ae.vp)()?(0,ae.BU)():(0,ae.Dj)(ut.current)}},ne.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),ne.createElement("div",{className:se["video-progress"]},ne.createElement("progress",{ref:wt,value:"0",min:"0"}),ne.createElement("input",{className:se.seek,ref:Ze,value:"0",min:"0",type:"range",step:"1"}),ne.createElement("div",{className:se["seek-tooltip"],ref:_t,id:"seek-tooltip"},"00:00"))))),ne.createElement("svg",{style:{display:"none"}},ne.createElement("defs",null,ne.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},ne.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),ne.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},ne.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),ne.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},ne.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),ne.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},ne.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),ne.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},ne.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),ne.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},ne.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),ne.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},ne.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),ne.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},ne.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},94615:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Ce}});var ne=ee(59301),xe=ee(21798),Me=ee(11611),Ce=()=>{const[fe,he]=(0,ne.useState)(""),[ce,ae]=(0,ne.useState)(0);let[se,ve]=(0,ne.useState)(),[ue,pe]=(0,ne.useState)();const[oe,ge]=(0,ne.useState)(!1),ye=(0,ne.useRef)("");(0,ne.useEffect)(()=>xe.Z.subscribe("preview-image",it=>{he(it),console.log(Se.current),document.body.style.overflow="hidden"}),[]),(0,ne.useEffect)(()=>(document.addEventListener("keydown",we),()=>{document.removeEventListener("keydown",we)}),[]),(0,ne.useEffect)(()=>{ye.current=fe},[fe]);function we(Ae){Ae.keyCode==27&&ye.current&&Be()}function Be(){document.body.style.overflow="auto",ve(void 0),pe(void 0),ae(0),he("")}function ze(){ae(ce+90)}function $e(){se=Se.current.width*1.1,ue=Se.current.height*1.1,pe(ue),ve(se)}function Le(){se=Se.current.width/1.1,ue=Se.current.height/1.1,pe(ue),ve(se)}const Ne=(0,ne.useRef)(),Re=(0,ne.useRef)(),Se=(0,ne.useRef)(),Ie=Ae=>{(Ae.nativeEvent.target===Ne.current||Ae.nativeEvent.target===Re.current)&&Be()};return ne.createElement(ne.Fragment,null,fe?ne.createElement("div",null,ne.createElement("div",{className:"preview-wrp-group",ref:Re},ne.createElement(Me.Z,{className:"image-preview",src:fe,style:{display:"none"},preview:{visible:!0,src:fe,movable:!1,onVisibleChange:Ae=>{he("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},67831:function(gn,kt,ee){"use strict";ee.d(kt,{h:function(){return Ne}});var ne=ee(59301),xe=ee(57809),Me=ee(78241),Ce=ee(3113),fe=ee(89780),he=ee.n(fe),ce=ee(14618),ae=ee(66552),se=Object.defineProperty,ve=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,ye=(Re,Se,Ie)=>Se in Re?se(Re,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Re[Se]=Ie,we=(Re,Se)=>{for(var Ie in Se||(Se={}))oe.call(Se,Ie)&&ye(Re,Ie,Se[Ie]);if(pe)for(var Ie of pe(Se))ge.call(Se,Ie)&&ye(Re,Ie,Se[Ie]);return Re},Be=(Re,Se)=>ve(Re,ue(Se));const ze=xe.default.Option,$e={labelCol:{span:4},wrapperCol:{span:20}},Le={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"]};kt.Z=({callback:Re,onCancel:Se})=>{const[Ie,Ae]=(0,ne.useState)("python");function it(gt){Ae(Le[gt][1])}function Ue(gt){Re(gt)}return ne.createElement(Me.default,Be(we({},$e),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ue,style:{width:500}}),ne.createElement(Me.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ne.createElement(xe.default,{getPopupContainer:gt=>gt.parentNode,onChange:it},Object.keys(Le).map(gt=>ne.createElement(ze,{key:gt,value:gt},Le[gt][0])))),ne.createElement(Me.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ne.createElement(Ne,{mode:Ie})),ne.createElement("div",{className:"flex-container flex-end"},ne.createElement(Ce.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ne.createElement(Ce.ZP,{type:"ghost",onClick:Se},"\u53D6\u6D88")))};function Ne({value:Re,onChange:Se,mode:Ie,options:Ae={}}){const it=(0,ne.useRef)(),[Ue,gt]=(0,ne.useState)();return(0,ne.useEffect)(()=>{if(Ue){let Ve=function(Tt){const ct=Tt.getValue();Se&&Se(ct)};return Ue.on("change",Ve),()=>{Ue.off("change",Ve)}}},[Ue,Se]),(0,ne.useEffect)(()=>{Ue&&Ue.setOption("mode",Ie)},[Ue,Ie]),(0,ne.useEffect)(()=>{Ue&&(Re!==Ue.getValue()||Re==="")&&setTimeout(()=>{Ue.setValue(Re||"")},300)},[Ue,Re]),(0,ne.useEffect)(()=>{if(it.current&&!Ue){const Ve=he().fromTextArea(it.current,we({mode:Ie,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ae));gt(Ve)}},[it.current,Ue]),ne.createElement("div",{className:"my-codemirror-container"},ne.createElement("textarea",{ref:it}))}},40973:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ui}});var ne=ee(59301),xe=ee(89780),Me=ee.n(xe),Ce=ee(76374),fe=ee(14618),he=ee(6313),ce=ee(25717),ae=ee(99498),se=ee(25419),ve=ee(67549),ue=ee(39655),pe=({value:dr="",className:Hr,showTextOnly:Cn,showLines:Ee,style:je={}})=>{const Oe=(0,ne.useMemo)(()=>"",[dr]);return ne.createElement(ne.Fragment,null,ne.createElement("div",{dangerouslySetInnerHTML:{__html:Oe}}))},oe=ee(59301),ge=Object.defineProperty,ye=Object.defineProperties,we=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,Le=(dr,Hr,Cn)=>Hr in dr?ge(dr,Hr,{enumerable:!0,configurable:!0,writable:!0,value:Cn}):dr[Hr]=Cn,Ne=(dr,Hr)=>{for(var Cn in Hr||(Hr={}))ze.call(Hr,Cn)&&Le(dr,Cn,Hr[Cn]);if(Be)for(var Cn of Be(Hr))$e.call(Hr,Cn)&&Le(dr,Cn,Hr[Cn]);return dr},Re=(dr,Hr)=>ye(dr,we(Hr));let Se=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ie({onActionCallback:dr,title:Hr,icon:Cn,actionName:Ee,className:je="",children:Oe}){function De(){dr(Ee)}return oe.createElement("a",{title:Hr,className:je,onClick:De},oe.createElement("i",{className:`${Cn}`}),Oe)}var Ae=({watch:dr,showNullButton:Hr,showNullProgramButton:Cn,onActionCallback:Ee,fullScreen:je,insertTemp:Oe,hidetoolBar:De,extraUse:Ke})=>{const et=[...Se,{title:`${dr?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${dr?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return oe.createElement("ul",{className:"markdown-toolbar-container"},!De&&et.map((rt,Dt)=>oe.createElement("li",{key:Dt},rt.actionName?oe.createElement(Ie,Re(Ne({},rt),{onActionCallback:Ee})):oe.createElement("span",{className:"v-line"}))),Hr?oe.createElement("li",null,oe.createElement(Ie,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ee},oe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,Cn?oe.createElement(oe.Fragment,null,oe.createElement("li",null,oe.createElement(Ie,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ee},oe.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),oe.createElement("li",null,oe.createElement(Ie,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ee},oe.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Oe&&oe.createElement("li",null,oe.createElement(Ie,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Oe}`,onActionCallback:Ee},oe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ke&&oe.createElement("li",null,Ke),oe.createElement("li",{className:"btn-full-screen"},oe.createElement(Ie,{icon:`${je?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:je?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ee})))},it=ee(53531),Ue=ee(78241),gt=ee(92832),Ve=ee(3113),Tt=Object.defineProperty,ct=Object.defineProperties,Ot=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,St=(dr,Hr,Cn)=>Hr in dr?Tt(dr,Hr,{enumerable:!0,configurable:!0,writable:!0,value:Cn}):dr[Hr]=Cn,qe=(dr,Hr)=>{for(var Cn in Hr||(Hr={}))lt.call(Hr,Cn)&&St(dr,Cn,Hr[Cn]);if(We)for(var Cn of We(Hr))ut.call(Hr,Cn)&&St(dr,Cn,Hr[Cn]);return dr},Ze=(dr,Hr)=>ct(dr,Ot(Hr));const wt={labelCol:{span:4},wrapperCol:{span:20}};var Wt=({callback:dr,onCancel:Hr})=>{function Cn(Ee){dr(Ee)}return ne.createElement(Ue.default,Ze(qe({},wt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Cn,style:{width:500}}),ne.createElement(Ue.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ne.createElement(gt.default,null)),ne.createElement(Ue.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ne.createElement(gt.default,null)),ne.createElement("div",{className:"flex-container flex-end"},ne.createElement(Ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ne.createElement(Ve.ZP,{type:"ghost",onClick:Hr},"\u53D6\u6D88")))},Kt=ee(67831),_t=ee(58448),vt=ee(43418),jt=ee(95237),yn=ee(15868),Xt=ee(59301),Ln=({callback:dr,onCancel:Hr})=>{const Cn=document.createElement("canvas"),Ee=Cn.getContext("2d");Cn.width=1e3,Cn.height=800,Ee.fillStyle="#ffffff",Ee.fillRect(0,0,Cn.width,Cn.height);const je=Cn.toDataURL("image/png");return Xt.createElement(vt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Xt.createElement(jt.Z,{style:{height:"100vh"}},Xt.createElement(yn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:je,visible:!0,title:String(Date.now())},onOk:Oe=>{dr({src:Oe.url})},onClose:Hr})))},pn=ee(8591),hn=ee(43428),un=ee(43604),Xe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ke=ee(59301),Te=(0,ne.forwardRef)(({onCancel:dr,editImgId:Hr,callback:Cn},Ee)=>{let je=(0,ne.useRef)(),Oe=(0,ne.useRef)(),De=(0,ne.useRef)(),Ke=(0,ne.useRef)(!1);const et=(0,ne.useRef)(!1);console.log("ref:",Ee);const[rt,Dt]=(0,ne.useState)(0),[Ft,Bt]=(0,ne.useState)("100vh");(0,ne.useEffect)(()=>{Dt(1);try{indexedDB.databases().then(Ut=>{Ut.forEach(on=>indexedDB.deleteDatabase(on.name))})}catch(Ut){}},[]),(0,ne.useEffect)(()=>(window.addEventListener("message",Ht),()=>{window.removeEventListener("message",Ht)}),[]),(0,ne.useImperativeHandle)(Ee,()=>({setHeight:Bt}));const Ct=Ut=>{window.saveDrawData(on=>{if(on===null&&!Ut){pn.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}pn.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Cn({src:`/api/attachments/${on}`,id:on,disabledClose:!0})})},Ht=Ut=>{var on;((on=Ut==null?void 0:Ut.data)==null?void 0:on.type)==="closePop"&&Ct(!0)};return ke.createElement("div",{ref:et,className:"body-overflow-initial"},ke.createElement(hn.Z,{width:"100vw",height:Ft,footer:null,closable:!0,placement:"bottom",open:!!rt,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Xe.drawerWrap}`,onClose:()=>{window.saveDrawData(Ut=>{Cn({src:`/api/attachments/${Ut}`,id:Ut})})},title:ke.createElement(jt.Z,{align:"middle"},ke.createElement(un.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ke.createElement(un.Z,{onClick:()=>{Bt(Ft==="60px"?"100vh":"60px")}},ke.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ke.createElement(un.Z,{onClick:Ct},ke.createElement(Ve.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ke.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${Hr||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Oe})))}),Fe=ee(6521),me=ee(5112),at=ee(5871);const Pt=me.ZP.Group,Qe={margin:"0 8px"};var Je=({callback:dr,onCancel:Hr})=>{function Cn(Ee){dr(Ee)}return ne.createElement(Ue.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Cn},ne.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ne.createElement("span",{style:Qe},"\u5355\u5143\u683C\u6570\uFF1A"),ne.createElement("span",{style:Qe},"\u884C\u6570"),ne.createElement(Ue.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ne.createElement(at.Z,null)),ne.createElement("span",{style:Qe},"\u5217\u6570"),ne.createElement(Ue.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ne.createElement(at.Z,null))),ne.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ne.createElement("span",{style:Qe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ne.createElement(Ue.default.Item,{name:"align"},ne.createElement(Pt,null,ne.createElement(me.ZP,{value:"default"},ne.createElement("i",{className:"fa fa-align-justify"})),ne.createElement(me.ZP,{value:"left"},ne.createElement("i",{className:"fa fa-align-left"})),ne.createElement(me.ZP,{value:"center"},ne.createElement("i",{className:"fa fa-align-center"})),ne.createElement(me.ZP,{value:"right"},ne.createElement("i",{className:"fa fa-align-right"}))))),ne.createElement("div",{className:"flex-container flex-end"},ne.createElement(Ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ne.createElement(Ve.ZP,{type:"ghost",onClick:Hr},"\u53D6\u6D88")))},xt=ee(78673),ot=ee(3352),mt=ee.n(ot),rn=(0,ne.forwardRef)(({use3d:dr,width:Hr,height:Cn,callback:Ee,showSaveButton:je},Oe)=>{const De=(0,ne.useRef)(),Ke=(0,ne.useRef)(),[et,rt]=(0,ne.useState)(!1),Dt=(0,ne.useRef)({id:De,appName:"graphing",width:Hr||1e3,height:Cn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ne.useEffect)(()=>{Ke.current=new(mt())(Dt.current,!0),window.onload=function(){Ke.current.inject("applet_container")}},[]);const Ft=()=>{var Bt=window.ggbApplet.getPNGBase64(1,!0,72);return Ee&&Ee(Bt),Bt};return(0,ne.useEffect)(()=>{Dt.current.appName=et?"3D":"graphing",Ke.current.inject("applet_container")},[et]),(0,ne.useEffect)(()=>{rt(dr)},[dr]),(0,ne.useImperativeHandle)(Oe,()=>({getImgData:Ft})),ne.createElement(ne.Fragment,null,ne.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:De}),ne.createElement(jt.Z,{align:"middle"},ne.createElement(un.Z,{flex:1},ne.createElement(xt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:et,onChange:Bt=>rt(Bt)})),ne.createElement(un.Z,null,ne.createElement(Ve.ZP,{size:"large",onClick:Ft,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),It=ee(3315),Qt=ee(1012);const dn="link",At="upload-image",Lt="add-flowchart",qt="draw-image",Tn="add-flowchart",Jt="code-block",On="add-table",zn="------------",qn={default:zn,left:`:${zn}`,center:`:${zn}:`,right:`${zn}:`};var Xn=ee(57649),vr=(dr,Hr,Cn)=>new Promise((Ee,je)=>{var Oe=et=>{try{Ke(Cn.next(et))}catch(rt){je(rt)}},De=et=>{try{Ke(Cn.throw(et))}catch(rt){je(rt)}},Ke=et=>et.done?Ee(et.value):Promise.resolve(et.value).then(Oe,De);Ke((Cn=Cn.apply(dr,Hr)).next())});function _r(){}let Qn=0;const Cr=1e4,ni="\u2581",Jr="@\u2581\u2581@",Yn="@\u2581@",mr=`
**\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`,si=["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 or(dr){return/^\d+$/.test(dr)?`${dr}px`:dr}const ki=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",gi={[ki+"-B"]:"bold",[ki+"-I"]:"italic"},Li={[dn]:"\u6DFB\u52A0\u94FE\u63A5",[Jt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[At]:"\u6DFB\u52A0\u56FE\u7247",[qt]:"\u6DFB\u52A0\u753B\u56FE",[Lt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[On]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var ui=({defaultValue:dr="",onChange:Hr,width:Cn="100%",height:Ee=400,miniToolbar:je=!1,isFocus:Oe=!1,watch:De,insertTemp:Ke,mode:et="markdown",id:rt="markdown-editor-id",showResizeBar:Dt=!1,noStorage:Ft=!1,showNullButton:Bt=!1,showNullProgramButton:Ct=!1,hidetoolBar:Ht=!1,fullScreen:Ut=!1,onBlur:on,onCMBeforeChange:cn,onFullScreen:Rt,className:Vt="",disablePaste:In=!1,disabled:wn=!1,disabledFill:Nn=!1,placeholder:Rn="",values:Jn="",extraUse:Sn,onAddBlank:Un})=>{const[zt,fn]=(0,ne.useState)(null),[vn,An]=(0,ne.useState)(dr),[En,kn]=(0,ne.useState)(De),[Mn,Bn]=(0,ne.useState)(Ut),[Kn,Vn]=(0,ne.useState)(""),[cr,fr]=(0,ne.useState)(0),[$r,Mr]=(0,ne.useState)(Ee),[wr,ei]=(0,ne.useState)(!1),Xr=(0,ne.useRef)((0,Qt.Z)()),Zr=(0,ne.useRef)(!1),Lr=(0,ne.useRef)(),[Or,Wr]=(0,ne.useState)(0),[Pr,di]=(0,ne.useState)(0),Ri=(0,ne.useRef)(),Vr=(0,ne.useRef)(),er=(0,ne.useRef)(),Zn=(0,ne.useRef)(),Dr=(0,ne.useRef)(),Sr=(0,ne.useRef)(),ri=()=>vr(void 0,null,function*(){var Er;const Ar=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Xr.current}});(Er=Ar==null?void 0:Ar.attachments)!=null&&Er.length&&(console.log("cm:",zt,Ri),Ar.attachments.map(kr=>{kr.content_type.indexOf("image")>-1?zt.replaceSelection(`![,](/api/attachments/${kr.id}?type=${kr.content_type})`):kr.content_type.indexOf("video")>-1?zt.replaceSelection(`<video width="100%" controls src="${Fe.Z.API_SERVER}/api/attachments/${data.id}"></video>`):kr.content_type.indexOf("pdf")>-1?zt.replaceSelection(`<a href="${Fe.Z.API_SERVER}/api/attachments/${kr.id}?type=${kr.content_type}&disposition=inline" target="_blank">${kr.name}</a>`):zt.replaceSelection(`[${kr.name}](${Fe.Z.API_SERVER}/api/attachments/${kr.id}?type=${kr.content_type})`)}))});(0,ne.useEffect)(()=>{const Er=window.scrollY||window.pageYOffset;An(Jn),zt==null||zt.setValue(Jn),window.scrollTo(0,Er)},[Jn]),(0,ne.useEffect)(()=>{Rt==null||Rt(Mn)},[Mn]),(0,ne.useEffect)(()=>{if(Ri.current){let Er=function(kr,Kr){var Hi;if(In){Kr.preventDefault();return}const eo=Kr.clipboardData;if(eo){const io=eo.types.toString(),ao=eo.items;if(io==="Files"||eo.types.indexOf("Files")>-1){if(Kr.preventDefault(),et=="stex")return;try{let to=ao[1];((Hi=ao[0])==null?void 0:Hi.kind)==="file"&&(to=ao[0]);const Mo=to.getAsFile(),Yo=Mo.name.split(".").pop();(0,_t.I)(Mo,Ho=>{var La,ha,Ko;Ho.id?((La=Mo==null?void 0:Mo.type)==null?void 0:La.indexOf("image"))>-1?Ar.replaceSelection(`<img width="100%" src="/api/attachments/${Ho.id}?type=${Ho.content_type})" alt="" />`):((ha=Mo==null?void 0:Mo.type)==null?void 0:ha.indexOf("video"))>-1?Ar.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ho.id}"></video>`):((Ko=Mo==null?void 0:Mo.type)==null?void 0:Ko.indexOf("pdf"))>-1?Ar.replaceSelection(`<a href="/api/attachments/${Ho.id}?type=${Mo.type}&disposition=inline" target="_blank">${Mo.name}</a>`):si.includes(Yo)?Ar.replaceSelection(`<a href="/api/attachments/${Ho.id}?type=office&disposition=inline" target="_blank">${Mo.name}</a>`):Ar.replaceSelection(`[${Mo.name}](/api/attachments/${Ho.id}?type=${Ho.content_type})`):(Ho==null?void 0:Ho.status)===401&&(pn.ZP.warning((Ho==null?void 0:Ho.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(to){pn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ar=Me().fromTextArea(Ri.current,{mode:et,lineNumbers:!je,lineWrapping:!0,value:dr,autoCloseTags:!Ct,autoCloseBrackets:!0});return Ar.on("keyup",function(kr,Kr){Kr.keyCode===8&&(kr.getValue()==""?Ar.setOption("placeholder",Rn):Ar.setOption("placeholder",null))}),Ar.on("keydown",function(kr,Kr){if(Kr.keyCode===8){var Hi=jr(kr);Hi&&Kr.preventDefault()}}),Oe&&Ar.focus(),Ar.on("paste",Er),Ar.on("dragleave",function(kr,Kr){Vr.current.classList.remove("mouse-hover-md")}),wn&&Ar.on("beforeChange",function(kr,Kr){(Kr.origin==="paste"||Kr.origin==="+input")&&Kr.cancel()}),fn(Ar),()=>{Ar.off("paste",Er)}}},[]);const yi=(0,ne.useCallback)(()=>{if(Vr.current)try{}catch(Er){console.log(Er,"---- to set md editor body height")}},[$r,Vr,Mn]);(0,ne.useEffect)(()=>{function Er(){let Ar=new Ce.Z(kr=>{for(let Kr of kr)(Kr.target.offsetHeight>0||Kr.target.offsetWidth>0)&&(yi(),zt.setSize("100%","100%"),zt.refresh())});return Ar.observe(Ri.current.parentElement),Ar}if(zt){const Ar=Er();return()=>{var kr,Kr;(kr=Ri.current)!=null&&kr.parentElement&&Ar.unobserve((Kr=Ri.current)==null?void 0:Kr.parentElement)}}},[zt,yi]),(0,ne.useEffect)(()=>{if(zt){let Er=[];for(const[Ar,kr]of Object.entries(gi)){let Kr={[Ar]:()=>{Bi(kr)}};Er.push(Kr),zt.addKeyMap(Kr)}return Lr.current=setInterval(()=>{Zr.current&&ri()},4e3),()=>{clearInterval(Lr.current);for(let Ar of Er)zt.removeKeyMap(Ar)}}},[zt]),(0,ne.useEffect)(()=>{Ut!==Mn&&Bn(Ut)},[Ut]),(0,Xn.Z)(()=>{if(!Ft&&cr>0){let Er=new Date().getTime(),Ar=window.sessionStorage.getItem(rt);Er>=cr+Cr&&(!Ar||Ar!==vn)&&(window.sessionStorage.setItem(rt,vn),ei(!0))}},Cr),(0,ne.useEffect)(()=>{kn(De)},[zt,De]),(0,ne.useEffect)(()=>{zt&&Oe&&zt.focus()},[zt,Oe]),(0,ne.useEffect)(()=>{if(En&&zt){let Er=function(kr){let Kr=kr.target;if(Zn.current){let Hi=Kr.scrollTop/Kr.scrollHeight;Zn.current.scrollTop=Zn.current.scrollHeight*Hi}};const Ar=zt.getScrollerElement();return Ar.addEventListener("scroll",Er),()=>{Ar.removeEventListener("scroll",Er)}}},[zt,En]),(0,ne.useEffect)(()=>{if(zt&&cn){let Er=function(Ar,kr){cn(Ar,kr)};return zt.on("beforeChange",Er),()=>{zt.off("beforeChange",Er)}}},[zt,cn]),(0,ne.useEffect)(()=>{if(zt&&on){let Er=function(){on(zt.getValue())};return zt.on("blur",Er),()=>{zt.off("blur",Er)}}},[zt,on]);function jr(Er,Ar){var kr=Er.getDoc(),Kr=kr.getCursor(),Hi=kr.getLine(Kr.line),eo=Hi.charAt(Kr.ch-1),io=Hi.lastIndexOf("@\u2581@",Kr.ch),ao=Hi.lastIndexOf("@\u2581\u2581@",Kr.ch),to=io>ao?io:ao,Mo=io>ao?3:4;if(Jr.indexOf(eo)===-1)return null;if(console.log("change1:",Ar,Er,Hi,Kr,to,io,ao,eo),to>=0&&Kr.ch-to<5){var Yo=to+Mo;return kr.replaceRange("",{line:Kr.line,ch:to},{line:Kr.line,ch:Yo}),{line:Kr.line,ch:Yo}}return null}(0,ne.useEffect)(()=>{if(zt){let Er=function(Ar,kr){const Kr=Ar.getValue();An(Kr),fr(new Date().getTime()),Ar.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Hr&&(Ct?Hr(Kr,mo(Kr)):Hr(Kr))};return zt.on("change",Er),()=>{zt.off("change",Er)}}},[zt,Hr]),(0,ne.useEffect)(()=>{if(zt)if(dr==null)zt.setValue(""),An("");else{const Er=window.scrollY||window.pageYOffset;dr!==zt.getValue()&&(zt.setValue(dr),An(dr),zt.setCursor(wn?1:zt.lineCount(),0),window.scrollTo(0,Er))}},[zt,dr]);const Bi=(0,ne.useCallback)(Er=>{const Ar=zt.getCursor(),kr=zt.getSelection();let Kr=kr.split(`
`);switch(Er){case"bold":return zt.replaceSelection("**"+kr+"**"),kr===""&&zt.setCursor(Ar.line,Ar.ch+2),zt.focus();case"italic":return zt.replaceSelection("*"+kr+"*"),kr===""&&zt.setCursor(Ar.line,Ar.ch+1),zt.focus();case"code":return zt.replaceSelection("`"+kr+"`"),kr===""&&zt.setCursor(Ar.line,Ar.ch+1),zt.focus();case"inline-latex":return Vn("inline-latex"),zt.focus();case"latex":return zt.replaceSelection("```latex\n"+kr+"\n```"),zt.setCursor(Ar.line+1,kr.length+1),zt.focus();case"line-break":return zt.replaceSelection(`<br/>
`),zt.focus();case"list-ul":return kr===""?zt.replaceSelection("- "+kr):zt.replaceSelection(Kr.map(Hi=>Hi===""?"":`- ${Hi}`).join(`
`)),zt.focus();case"list-ol":return kr===""?zt.replaceSelection("1. "+kr):zt.replaceSelection(Kr.map((Hi,eo)=>Hi===""?"":`${eo+1}. ${Hi}`).join(`
`)),zt.focus();case"add-null-ch":Un==null||Un();return;case"add-signal":return kr===""&&zt.setCursor(Ar.line,Ar.ch),zt.replaceSelection(Yn),zt.focus();case"add-multiple":return kr===""&&zt.setCursor(Ar.line,Ar.ch),zt.replaceSelection(Jr),zt.focus();case"inster-template-1":return kr===""&&zt.setCursor(Ar.line,Ar.ch),zt.replaceSelection(mr),zt.focus();case"eraser":return zt.setValue(""),zt.focus();case"trigger-watch":return kn(!En),zt.focus();case"trigger-full-screen":return Bn(!Mn),zt.focus();case dn:Vn(dn);return;case Jt:Vn(Jt);return;case At:Vn(At);return;case qt:Vn(qt);return;case"maths-latex":Vn("maths-latex");return;case Lt:Dr.current="",sessionStorage.removeItem("file_id"),Vn(Lt);return;case On:Vn(On);return;default:throw new Error}},[zt,En,Mn]),_i=(0,ne.useCallback)((Er,Ar)=>{var kr,Kr,Hi,eo,io,ao;Vn("");const{src:to,alt:Mo,id:Yo}=Er||{};switch(Kn){case dn:const{title:Oo,link:Wi}=Er;return zt.replaceSelection(`[${Oo}](${Wi})`),zt.focus();case Jt:const{language:ta,content:Zo}=Er;return zt.replaceSelection(["```"+ta,Zo,"```"].join(`
`)),zt.focus();case"maths-latex":for(var Ho=atob(Er),La=new Uint8Array(Ho.length),ha=0;ha<Ho.length;ha++)La[ha]=Ho.charCodeAt(ha);var Ko=new Blob([La],{type:"image/png"});(0,_t.I)(Ko,qi=>{qi.id?zt.replaceSelection(`![,](/api/attachments/${qi.id}?type=${qi.content_type})`):(qi==null?void 0:qi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":zt.replaceSelection("`$$"+Er+"$$`");break;case Tn:if(!Yo)return;zt.focus(),zt.getValue().indexOf(to)===-1?zt.replaceSelection(`<center><img id="${Yo}" width="80%" src="${to}" class="draw-flowchart" alt="${Mo||""}" /></center>`):document.getElementById(Yo).src=Fe.Z.API_SERVER+to+"?t="+Date.now();try{setTimeout(()=>{on(zt.getValue())},100)}catch(qi){}break;case At:case qt:const no=Ar,ti=(Hi=(Kr=(kr=no==null?void 0:no.name)==null?void 0:kr.split("."))==null?void 0:Kr.pop)==null?void 0:Hi.call(Kr);return((eo=no==null?void 0:no.type)==null?void 0:eo.indexOf("image"))>-1||!(no!=null&&no.type)?no!=null&&no.align||no!=null&&no.width?zt.replaceSelection(`<p style="text-align:${no.align||"initial"}"><img width="${no.width?no.width+"%":"initial"}" src="${to}" alt="${Mo||""}" /></p>`):zt.replaceSelection(`<img width="100%" src="${to}" alt="${Mo||""}" />`):((io=no==null?void 0:no.type)==null?void 0:io.indexOf("video"))>-1?zt.replaceSelection(`<video width="100%" controls src="${to}"></video>`):((ao=no==null?void 0:no.type)==null?void 0:ao.indexOf("pdf"))>-1?zt.replaceSelection(`<a href="${to}?type=${no.type}&disposition=inline" target="_blank">${no.name}</a>`):si.includes(ti)?zt.replaceSelection(`<a href="${to}?type=office&disposition=inline" target="_blank">${no.name}</a>`):zt.replaceSelection(`[${no.name}](${to})`),zt.focus();case On:const{row:Fi,col:Ii,align:Ci}=Er;let ro=`
`;for(let qi=0;qi<Fi;qi++){let Bo=[],na=[];for(let ra=0;ra<Ii;ra++)qi===1&&na.push(qn[Ci]),Bo.push(" ");qi===1&&(ro+=`| ${na.join(" | ")} |
`),ro+=`| ${Bo.join(Ii===1?"":" | ")} |
`}return zt.replaceSelection(ro+`
`),zt.focus();default:throw new Error}},[zt,Kn]),oo=(0,ne.useMemo)(()=>{switch(Kn){case dn:return ne.createElement(Wt,{callback:_i,onCancel:Fr});case Jt:return ne.createElement(Kt.Z,{callback:_i,onCancel:Fr});case At:return ne.createElement(_t.Z,{callback:_i,onCancel:Fr});case Lt:return ne.createElement(Te,{editImgId:Dr.current,callback:_i,onCancel:Fr});case On:return ne.createElement(Je,{callback:_i,onCancel:Fr});case"maths-latex":return ne.createElement(rn,{showSaveButton:!0,callback:_i});case"inline-latex":return ne.createElement(It.Z,{showSaveButton:!0,callback:_i});default:return null}},[Kn]);function Fr(){Vn("")}(0,ne.useEffect)(()=>{if(er.current){let Er=function(io){Hi=!0,eo=io.pageY},Ar=function(){Hi=!1},kr=function(io){if(Hi){let ao=io.pageY-eo;ao<0&&(ao=0),ao>300&&(ao=300);let to=Ee+ao+"px";Mr(to)}},Kr=er.current,Hi=!1,eo=0;return Kr.addEventListener("mousedown",Er),document.addEventListener("mousemove",kr),document.addEventListener("mouseup",Ar),()=>{Kr.removeEventListener("mousedown",Er),document.removeEventListener("mousemove",kr),document.removeEventListener("mouseup",Ar)}}},[zt,er]),(0,ne.useEffect)(()=>{Mr(Ee)},[Ee]);const Nr=or(Cn),bi=or($r),hi={width:Nr,height:bi},Xi=(0,ne.useMemo)(()=>{if(cr){let Er=new Date(cr),Ar=Er.getHours(),kr=Er.getMinutes(),Kr=Er.getSeconds();return Ar=Ar<10?"0"+Ar:Ar,kr=kr<10?"0"+kr:kr,Kr=Kr<10?"0"+Kr:Kr,`${Ar}:${kr}:${Kr}`}return 0},[cr]),mo=Er=>{const Ar=[];if(Ct){let kr=-1;Er=Er.replace(/(@▁▁@|@▁@)/g,function(Kr,Hi,eo){Ar.push({multiLine:Kr!==Yn})})}return Ar};function Co(){window.sessionStorage.removeItem(rt),ei(!1),fr(0)}function ji(){ei(!1),fr(0),zt.setValue(window.sessionStorage.getItem(rt))}(0,ne.useEffect)(()=>{Li[Kn]&&Kn!==qt&&Kn!==Lt&&setTimeout(()=>{const Er=document.getElementsByClassName("markdown-popup-form")[0],Ar=window.innerWidth/2-Er.offsetWidth/2,kr=window.innerHeight/2-Er.offsetHeight/2;Wr(Ar),di(kr)},0)},[Kn]);const _o=Er=>{Er.preventDefault();const Ar=Er.clientX-Or,kr=Er.clientY-Pr;document.body.onmousemove=Kr=>{let Hi=Kr.clientX-Ar,eo=Kr.clientY-kr;const io=document.getElementsByClassName("markdown-popup-form")[0],ao=window.innerWidth-io.offsetWidth,to=window.innerHeight-io.offsetHeight;Hi=Math.max(0,Math.min(Hi,ao)),eo=Math.max(0,Math.min(eo,to)),vo(Kr.clientX,Kr.clientY,Ar,kr)&&(Wr(Hi),di(eo))},document.body.onmouseup=function(){document.body.onmousemove=null}},vo=(Er,Ar,kr,Kr)=>{const Hi=document.body.clientHeight,eo=document.body.clientWidth;return Er<20&&kr>Er||Er>eo-20&&kr<Er||Ar<20&&Kr>Ar||Ar>Hi-20&&Kr<Ar?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ne.createElement(ne.Fragment,null,ne.createElement("div",{className:"markdown-editor-wrapper",ref:Vr},ne.createElement("div",{className:`markdown-editor-container ${Vt} ${En?"on-preview":""} ${je?"mini":""} ${Mn?"full-screen":""}`,style:hi},ne.createElement(Ae,{insertTemp:Ke,watch:En,fullScreen:Mn,showNullButton:Bt,showNullProgramButton:Ct,onActionCallback:Bi,hidetoolBar:Ht,extraUse:Sn}),ne.createElement("div",{className:"markdown-editor-body"},ne.createElement("div",{className:"codemirror-container"},ne.createElement("textarea",{ref:Ri,placeholder:Rn})),En?ne.createElement("div",{ref:Zn,className:"preview-container"},et==="stex"&&ne.createElement(pe,{value:vn}),et!=="stex"&&ne.createElement(ue.Z,{edit:!0,disabledFill:Nn,showProgramFill:Ct,value:vn,openEditor:Er=>{var Ar;Dr.current=Er,(Ar=Sr.current)==null||Ar.setHeight("100vh"),setTimeout(()=>{Vn("add-flowchart")},150)}})):null))),Dt?ne.createElement("a",{ref:er,className:"editor-resize"}):null,Kn===qt&&ne.createElement(Ln,{callback:_i,onCancel:Fr}),Kn===Lt&&ne.createElement(Te,{ref:Sr,editImgId:Dr.current,callback:_i,onCancel:Fr}),ne.createElement(it.Z,null,Li[Kn]&&Kn!==qt&&Kn!==Lt?ne.createElement(vt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Or,top:Pr},title:ne.createElement("div",{style:{cursor:"move"},onMouseDown:_o},Li[Kn]),open:!0,onCancel:Fr,footer:null,destroyOnClose:!0,width:Kn===Lt?"1200px":null,height:Kn===Lt?"80vh":null,className:"markdown-popup-form"},oo):null))}},58448:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Ie},I:function(){return it}});var ne=ee(78241),xe=ee(8591),Me=ee(92832),Ce=ee(81327),fe=ee(5871),he=ee(5112),ce=ee(3113),ae=ee(79090),se=ee(59301),ve=ee(7544),ue=ee(59301),pe=Object.defineProperty,oe=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,ze=(Ue,gt,Ve)=>gt in Ue?pe(Ue,gt,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Ue[gt]=Ve,$e=(Ue,gt)=>{for(var Ve in gt||(gt={}))we.call(gt,Ve)&&ze(Ue,Ve,gt[Ve]);if(ye)for(var Ve of ye(gt))Be.call(gt,Ve)&&ze(Ue,Ve,gt[Ve]);return Ue},Le=(Ue,gt)=>oe(Ue,ge(gt));const{useForm:Ne}=ne.default,Re={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}};var Ie=({callback:Ue,onCancel:gt})=>{const[Ve]=Ne();let Tt=(0,se.useRef)();function ct(lt){Tt.current.width=Ve.getFieldValue("width"),Tt.current.align=Ve.getFieldValue("align"),Ue(lt,Tt.current)}function Ot(lt,ut){if(lt.status===-1){xe.ZP.error(lt.message);return}Ve.setFieldsValue({src:`/api/attachments/${lt.id}`,type:ut.type})}function We(lt){let ut=lt.target.files[0];Tt.current=ut,it(ut,Ot)}return ue.createElement(ne.default,Le($e({form:Ve},Se),{className:"upload-image-panel",onFinish:ct,style:{width:470,overflow:"hidden"}}),ue.createElement(ne.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ue.createElement("div",{className:"flex-container"},ue.createElement(ne.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},ue.createElement(Me.default,{style:Re})),ue.createElement(Ae,{onFileChange:We}))),ue.createElement(ne.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ue.createElement(Me.default,{style:{width:264}})),ue.createElement(ne.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ue.createElement(Ce.Z,null,ue.createElement(ne.default.Item,{name:"width",style:{margin:0}},ue.createElement(fe.Z,{style:{width:264}})),ue.createElement("span",{className:"ml8"},"%"))),ue.createElement(ne.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ue.createElement(he.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"}]})),ue.createElement("aside",null,ue.createElement(ne.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ue.createElement(ce.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ue.createElement(ce.ZP,{type:"default",onClick:gt},"\u53D6\u6D88"))))};function Ae({onFileChange:Ue}){return ue.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ue.createElement("input",{type:"file",onChange:Ue}))}function it(Ue,gt){if(!Ue)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,ve.bg)())throw xe.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let Ve=new FormData;Ve.append("editormd-image-file",Ue),Ve.append("file_param_name","editormd-image-file"),Ve.append("byxhr","true");var Tt=new window.XMLHttpRequest;Tt.withCredentials=!0,Tt.addEventListener("load",function(ct){gt(JSON.parse(ct.target.responseText),Ue)},!1),Tt.addEventListener("error",function(ct){console.error(ct)},!1),Tt.open("POST",`${ae.KI}/api/attachments.json`),Tt.send(Ve)}},53531:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Me}});var ne=ee(59301),xe=ee(4676);class Me extends ne.Component{constructor(fe){super(fe);const he=window.document;this.node=he.createElement("div"),he.body.appendChild(this.node)}render(){const{children:fe}=this.props;return(0,xe.createPortal)(fe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},24821:function(gn,kt,ee){"use strict";var ne=ee(4151),xe=ee(57809),Me=ee(78673),Ce=ee(59301);const fe=xe.default.Option;kt.Z=({isTheoretical:he,onFontSizeChange:ce,cmFontSize:ae,cmCodeMode:se,autoFormat:ve,onCodeModeChange:ue,onTabToSpace:pe,onAutoFormat:oe,formatDocument:ge,className:ye="",tabToSpace:we,children:Be,code_editor:ze,challenge:$e,shixun_environment_id:Le,shixun_environments:Ne})=>{var Re;const Se={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},Ie=(Re=Ne==null?void 0:Ne.find(Ae=>Ae.shixun_environment_id===Le))==null?void 0:Re.program_language;return Ce.createElement("div",{className:`tpi-code-setting ${ye}`},Ce.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Ce.createElement("section",null,Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Ce.createElement(xe.default,{bordered:!1,size:"small",value:se,onChange:ue},Ce.createElement(fe,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Ce.createElement(fe,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!he&&Ce.createElement(Ce.Fragment,null,Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Ce.createElement(xe.default,{bordered:!1,size:"small",value:ae,onChange:ce},Ce.createElement(fe,{value:12},"12px"),Ce.createElement(fe,{value:14},"14px"),Ce.createElement(fe,{value:16},"16px"),Ce.createElement(fe,{value:18},"18px"),Ce.createElement(fe,{value:20},"20px"),Ce.createElement(fe,{value:22},"22px"))),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"Tab\u8F6C\u6362"),Ce.createElement(Me.Z,{checked:we,onChange:pe})),Ce.createElement("div",{className:"file-item",onClick:ge},Ce.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!he&&Ce.createElement(Ce.Fragment,null,Ce.createElement("h3",null,"\u5FEB\u6377\u952E"),Ce.createElement("section",null,Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Ce.createElement("span",null,"Ctrl + S")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Ce.createElement("span",null,"F1 / Alt + F1")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Ce.createElement("span",null,"Ctrl + ]/[")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Ce.createElement("span",null,"Ctrl + Shift + \\")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Ce.createElement("span",null,"Home")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Ce.createElement("span",null,"End"))),Be),!he&&Ce.createElement(Ce.Fragment,null,Ce.createElement("h3",null,"\u5FEB\u6377\u952E"),Ce.createElement("section",null,Ie&&Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),Ce.createElement("span",null,Ie)),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Ce.createElement("span",null,Se[$e==null?void 0:$e.difficulty])),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Ce.createElement("span",null,ze==null?void 0:ze.name)),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Ce.createElement("span",null,ze!=null&&ze.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},57649:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return xe}});var ne=ee(59301);function xe(Me,Ce){const fe=(0,ne.useRef)();(0,ne.useEffect)(()=>{fe.current=Me}),(0,ne.useEffect)(()=>{function he(){fe.current()}if(Ce!==null){let ce=setInterval(he,Ce);return()=>clearInterval(ce)}},[Ce])}},17060:function(gn,kt,ee){"use strict";ee.d(kt,{Im:function(){return Ue},ZP:function(){return We},gZ:function(){return ct}});var ne=ee(59301),xe=ee(92832),Me=ee(3113),Ce=ee(84105),fe=ee(87395),he=ee(99509),ce=ee(24334),ae=ee(59955),se=ee(39655),ve=ee(25544),ue=ee(45366),pe=ee(34376),oe=ee(92310),ge=ee.n(oe),ye=ee(59301),we=Object.defineProperty,Be=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Re=(lt,ut,St)=>ut in lt?we(lt,ut,{enumerable:!0,configurable:!0,writable:!0,value:St}):lt[ut]=St,Se=(lt,ut)=>{for(var St in ut||(ut={}))Le.call(ut,St)&&Re(lt,St,ut[St]);if($e)for(var St of $e(ut))Ne.call(ut,St)&&Re(lt,St,ut[St]);return lt},Ie=(lt,ut)=>Be(lt,ze(ut));const{TextArea:Ae}=xe.default,it={visible:!1,tabIndex:"0"},Ue={[he.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[he.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[he.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var gt=(lt=>(lt[lt.SET_VISIBLE=0]="SET_VISIBLE",lt[lt.SET_TABINDEX=1]="SET_TABINDEX",lt))(gt||{});function Ve(lt,ut){switch(ut.type){case 0:return Ie(Se({},lt),{visible:ut.payload});case 1:return Ie(Se({},lt),{tabIndex:ut.payload});default:throw new Error}}function Tt({value:lt,className:ut}){const[St,qe]=(0,ne.useState)(!1),Ze=(0,ne.useRef)(),wt=(0,ne.useRef)();return(0,ne.useEffect)(()=>{St&&(wt.current.reset(),wt.current.write((0,ve.pp)(lt||"")))},[lt,St]),(0,ne.useEffect)(()=>{var Wt,Kt,_t,vt;if(Ze.current){wt.current=new pe.Terminal({fontSize:14,disableStdin:!0}),wt.current.open(Ze.current);const jt=Ze.current.offsetWidth-14,yn=((vt=(_t=(Kt=(Wt=wt.current)==null?void 0:Wt._core)==null?void 0:Kt._renderService)==null?void 0:_t.dimensions)==null?void 0:vt.actualCellWidth)||9.5,Xt=Math.ceil(jt/yn);wt.current.resize(Xt,8),qe(!0)}},[]),ye.createElement("div",{ref:Ze,className:ge()("XtermText-valueRef",ut)})}function ct(lt){const{status:ut,error_msg:St,output:qe,input:Ze,expected_output:wt,is_file:Wt,input_file_url:Kt,output_file_url:_t,expected_output_file_url:vt}=lt;let jt=null;const yn={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(ut){case he.h.NOMATCH:jt=ye.createElement(ye.Fragment,null,ye.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!Wt&&ye.createElement(Tt,{className:"mb10",value:Ze}),Wt&&ye.createElement("div",{style:yn},ye.createElement("a",{onClick:()=>(0,ve.LR)(Kt,Ze)},Ze)),ye.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!Wt&&ye.createElement(Tt,{className:"mb10",value:qe&&ce.Base64.decode(qe)||""}),Wt&&ye.createElement("div",{style:yn},ye.createElement("a",{onClick:()=>(0,ve.LR)(_t,qe)},qe)),ye.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!Wt&&ye.createElement(Tt,{className:"mb10",value:wt&&ce.Base64.decode(wt)||""}),Wt&&ye.createElement("div",{style:yn},ye.createElement("a",{onClick:()=>(0,ve.LR)(vt,wt)},wt)));break;case he.h.EXECUTEFAILURE:jt=ye.createElement(ye.Fragment,null,ye.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!Wt&&ye.createElement(se.Z,{value:Ze,style:yn}),Wt&&ye.createElement("div",{style:yn},ye.createElement("a",{onClick:()=>(0,ve.LR)(Kt,Ze)},Ze)),ye.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ye.createElement("pre",{className:"error"},ce.Base64.decode(St)));break;case he.h.COMPILEFAILURE:jt=ye.createElement(ye.Fragment,null,ye.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!Wt&&ye.createElement(se.Z,{value:Ze,style:yn}),Wt&&ye.createElement("div",{style:yn},ye.createElement("a",{onClick:()=>(0,ve.LR)(Kt,Ze)},Ze)),ye.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ye.createElement("pre",{className:"error"},ce.Base64.decode(St)));break;case he.h.PODFAILURE:jt=ye.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case he.h.TIMEOUT:jt=ye.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ye.createElement(ye.Fragment,null," ",jt," ")}function Ot(lt){const{status:ut,error_msg:St,execute_time:qe,output:Ze,input:wt,expected_output:Wt,is_file:Kt,input_file_url:_t,output_file_url:vt,expected_output_file_url:jt}=lt;let yn=null;switch(ut){case he.h.OK:yn=ye.createElement(ye.Fragment,null,ye.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",qe,"\u79D2"),ye.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),ye.createElement("pre",null,ce.Base64.decode(Ze)));break;case he.h.NOMATCH:yn=ye.createElement(ye.Fragment,null,ye.createElement("p",null,"\u8F93\u5165\uFF1A",ye.createElement("pre",null,wt)),ye.createElement("p",null,"\u8F93\u51FA\uFF1A",Ze&&ce.Base64.decode(Ze)),ye.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",Wt&&ce.Base64.decode(Wt)));break;case he.h.EXECUTEFAILURE:yn=ye.createElement(ye.Fragment,null,ye.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ye.createElement("pre",null,wt)),ye.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ye.createElement("pre",{className:"error"},ce.Base64.decode(St)));break;case he.h.COMPILEFAILURE:yn=ye.createElement(ye.Fragment,null,ye.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ye.createElement("pre",null,wt)),ye.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ye.createElement("pre",{className:"error"},ce.Base64.decode(St)));break;case he.h.PODFAILURE:yn=ye.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case he.h.TIMEOUT:yn=ye.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ye.createElement(ye.Fragment,null," ",yn," ")}var We=({id:lt,is_file:ut,input:St,debuging:qe,submitting:Ze,executingMessage:wt,debugResult:Wt,onChangeInput:Kt,onDebugCode:_t,onSubmitCode:vt})=>{const[jt,yn]=(0,ne.useReducer)(Ve,it),{visible:Xt,tabIndex:Ln}=jt;(0,ne.useEffect)(()=>{yn({type:0,payload:!1})},[lt]);function pn(ke){let _e=ke.target.id;yn({type:1,payload:_e})}function hn(){yn({type:0,payload:!Xt})}const un=(0,ne.useMemo)(()=>{if(Wt){const{status:ke}=Wt;return ye.createElement(ye.Fragment,null,Ot(Wt))}return null},[Wt]);function Xe(){yn({type:0,payload:!0}),yn({type:1,payload:"1"}),_t()}return ye.createElement("div",{className:"test-case-panel"},ye.createElement("div",{className:`test-case-panel-body ${Xt?"active":""}`},ye.createElement("ul",{className:"s-navs"},ye.createElement("li",null,ye.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),ye.createElement(ue.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:ye.createElement(Ae,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:ut?"":St,onChange:Kt}),rightNode:qe?ye.createElement(ae.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):Wt?un:ye.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),ye.createElement("a",{className:`btn-collapse ${Xt?"up":""}`,onClick:hn},Xt?ye.createElement(Ce.Z,null):ye.createElement(fe.Z,null)),ye.createElement("footer",{className:"footer"},ye.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),ye.createElement("div",{className:"flex-container"},ye.createElement(Me.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),ye.createElement(Me.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),ye.createElement(Me.ZP,{className:"btn-green",type:"ghost",loading:qe,onClick:Xe},"\u8C03\u8BD5\u4EE3\u7801"),ye.createElement(Me.ZP,{type:"primary",className:"custom-ant-disabled",loading:Ze,disabled:Ze,onClick:()=>{yn({type:0,payload:!1}),vt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},51046:function(gn,kt,ee){"use strict";ee.r(kt),ee.d(kt,{default:function(){return $t}});var ne=ee(59301),xe=ee(10906),Me=ee(76618),Ce=ee(91482),fe=ee(31797),he=ee(8591),ce=ee(43418),ae=ee(71418),se=ee(57809),ve=ee(44188),ue=ee(22854),pe=ee(6521),oe=ee(87169),ge=ee(43428),ye=ee(11488),we=ee(53531),Be=ee(13357),ze=ee(24821),$e=ee(59301),Le=Object.defineProperty,Ne=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,it=(Ge,st,ht)=>st in Ge?Le(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Ue=(Ge,st)=>{for(var ht in st||(st={}))Ie.call(st,ht)&&it(Ge,ht,st[ht]);if(Se)for(var ht of Se(st))Ae.call(st,ht)&&it(Ge,ht,st[ht]);return Ge},gt=(Ge,st)=>Ne(Ge,Re(st));const Ve={theme:(0,Be.G)("cmCodeMode","vs-dark"),fontSize:(0,Be.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,Be.G)("cmTabToSpace",!0)};var Tt=(Ge=>(Ge[Ge.set_font_size=0]="set_font_size",Ge[Ge.set_theme=1]="set_theme",Ge[Ge.on_tab_to_space=2]="on_tab_to_space",Ge[Ge.set_show_editor_setting=3]="set_show_editor_setting",Ge))(Tt||{});function ct(Ge,st){switch(st.type){case 3:return gt(Ue({},Ge),{showEditorSetting:st.payload});case 1:return gt(Ue({},Ge),{theme:st.payload});case 0:return gt(Ue({},Ge),{fontSize:st.payload});case 2:return gt(Ue({},Ge),{tabToSpace:st.payload});default:throw new Error}}var Ot=({isLoading:Ge,value:st,onChange:ht,language:Yt,onUpdateCode:en,ActionBarRender:nn=tn=>$e.createElement(We,{onShowCodeSetting:tn})})=>{const[tn,mn]=(0,ne.useReducer)(ct,Ve),{theme:_n,fontSize:Dn,showEditorSetting:tr,tabToSpace:Hn}=tn,nr=(0,ne.useRef)(),jn=(0,ne.useRef)(),lr={onFontSizeChange:Yr=>{mn({type:0,payload:Yr}),(0,Be.t)("cmFontSize",Yr)},tabToSpace:Hn,cmFontSize:Dn,className:"oj",cmCodeMode:_n,onTabToSpace:Yr=>{mn({type:2,payload:Yr}),(0,Be.t)("cmTabToSpace",Yr)},onCodeModeChange:Yr=>{mn({type:1,payload:Yr}),(0,Be.t)("cmCodeMode",Yr)}};function ur(){mn({type:3,payload:!1})}function qr(){mn({type:3,payload:!0})}const pr={value:st,language:Yt,theme:_n,height:"calc(100% - 56px)",options:{fontSize:Dn,insertSpaces:Hn},onChange:Yr=>{ht(Yr),jn.current=Yr,clearTimeout(nr.current),nr.current=setTimeout(()=>{en(jn.current)},1e4)},onEditBlur:Yr=>{jn.current&&en(jn.current)}};return $e.createElement(ne.Fragment,null,$e.createElement("div",{className:"code-panel-container"},nn(qr),!Ge&&$e.createElement(ye.ZP,Ue({},pr))),$e.createElement(we.Z,null,$e.createElement(ge.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:tr,onClose:ur},$e.createElement(ze.Z,Ue({},lr)))))};function We({onShowCodeSetting:Ge}){return $e.createElement("div",{className:"action-bar"},$e.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),$e.createElement("a",{onClick:Ge},$e.createElement("i",{className:"iconfont icon-shezhi"})))}var lt=ee(24334),ut=ee(33299),St=ee(17060),qe=ee(92832),Ze=ee(78241),wt=ee(3113);const{TextArea:Wt}=qe.default,Kt=5e3;var _t=({callback:Ge,onCancel:st,notes:ht})=>{function Yt(en){Ge(en)}return ne.createElement(Ze.default,{className:"note-form-panel",onFinish:Yt,initialValues:{notes:ht}},ne.createElement(Ze.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:Kt,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${Kt}`}]},ne.createElement(Wt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),ne.createElement(Ze.default.Item,{style:{textAlign:"right"}},ne.createElement(wt.ZP,{type:"ghost",onClick:st,style:{marginRight:10}}," \u53D6\u6D88 "),ne.createElement(wt.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},vt={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},jt={pagination:"pagination___npPu7",info:"info___aRH6C"},yn=ee(1710),Xt=ee(58421),Ln=ee(58617),pn=ee(81953),hn=ee(99509),un=ee(25544),Xe=ee(66649),ke=ee.n(Xe);const{Column:_e}=yn.default;var Te=({submitResult:Ge,submitting:st,submitRecords:ht,page:Yt,onPageChange:en,topicId:nn})=>{const{status:tn,id:mn,input:_n,output:Dn,expected_output:tr,is_file:Hn,input_file_url:nr,output_file_url:jn,expected_output_file_url:lr,error_msg:ur}=Ge||{},{records:qr,records_count:pr}=ht||{},Yr=(0,Ce.useParams)();function wi(){Hn?(0,un.vQ)(lt.Base64.decode(ur)).then(()=>{he.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):(0,un.vQ)(lt.Base64.decode(Dn)).then(()=>{he.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return ne.createElement(ae.Z,{spinning:st,tip:"\u8BC4\u6D4B\u4E2D...",indicator:ne.createElement(Ln.Z,{style:{fontSize:24},spin:!0})},mn?ne.createElement(ne.Fragment,null,ne.createElement("ul",{className:jt.info},ne.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",ne.createElement("span",{className:tn===hn.h.OK?"c-green":"c-red"},St.Im[tn])),ne.createElement("li",{className:jt.error},ne.createElement("a",{onClick:wi},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",ne.createElement(pn.Z,null)," ")),ne.createElement("li",null,ne.createElement(Ce.Link,{to:`/problems/${nn}/record-detail/${mn}?backId=${Yr==null?void 0:Yr.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),tn!==hn.h.OK?ne.createElement(ne.Fragment,null,ne.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),ne.createElement("pre",null,!Hn&&_n,Hn&&ne.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,un.LR)(nr,_n)},_n)),ne.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),ne.createElement("pre",null,(tn===4||tn===5)&&lt.Base64.decode(ur),tn!=4&&tn!=5&&(Hn?ne.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,un.LR)(jn,Dn)},Dn):lt.Base64.decode(Dn))),ne.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),ne.createElement("pre",null,!Hn&&lt.Base64.decode(tr),Hn&&ne.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,un.LR)(lr,tr)},tr))):null):null,(qr==null?void 0:qr.length)>0?ne.createElement(yn.default,{dataSource:qr,rowKey:"id",pagination:!1},ne.createElement(_e,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(ar,Br)=>ne.createElement("span",null," ",ke()(ar).format("YYYY-MM-DD HH:mm:ss"))}),ne.createElement(_e,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(ar,Br)=>{var $n;return ne.createElement(Ce.Link,{className:ar===0?"c-green":"c-red",to:`/problems/${nn}/record-detail/${Br.id}?backId=${Yr==null?void 0:Yr.save_identifier}`},($n=St.Im[ar])==null?void 0:$n.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),ne.createElement(_e,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),ne.createElement(_e,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),ne.createElement(_e,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,pr>15?ne.createElement(Xt.Z,{className:jt.pagination,current:Yt,pageSize:15,total:pr,onChange:en}):null)},Fe=ee(18540),me=ee(12563),at=ee(81327),Pt={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Qe=ee(39655),Je=ee(59301);const xt={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var ot=({hack:Ge,onTriggerPraise:st,toDiscuss:ht})=>{const{language:Yt,difficulty:en,time_limit:nn,username:tn,user_path:mn,user_praise:_n,comments_count:Dn,praises_count:tr,description:Hn,pass_count:nr,submit_count:jn}=Ge,lr=(0,Ce.useLocation)();console.log(Ge.language,"language");const ur=xt[en];return Je.createElement(Je.Fragment,null,Je.createElement("ul",{className:Pt.info},Je.createElement("li",null,"\u96BE\u5EA6\uFF1A",Je.createElement(me.Z,{color:ur==null?void 0:ur.color},ur==null?void 0:ur.name)),Je.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",Je.createElement("b",null,nn,"\u79D2"))),Je.createElement(Qe.Z,{value:Hn,className:Pt.desc}),Je.createElement("ul",{className:Pt["commit-info"]},Je.createElement("li",null,Je.createElement(at.Z,{size:4},Je.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",Je.createElement("b",null,nr))),Je.createElement("li",null,Je.createElement(at.Z,{size:4},Je.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",Je.createElement("b",null,jn))," "),Je.createElement("li",{style:{flex:"1 0 0"}}),Je.createElement("li",null,Je.createElement(at.Z,{size:4},Je.createElement("i",{className:"iconfont icon-huifu1",onClick:ht})," ",Je.createElement("b",null,Dn))," ")))},mt=ee(21798),Nt=Object.defineProperty,rn=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,dn=(Ge,st,ht)=>st in Ge?Nt(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,At=(Ge,st)=>{for(var ht in st||(st={}))It.call(st,ht)&&dn(Ge,ht,st[ht]);if(rn)for(var ht of rn(st))Qt.call(st,ht)&&dn(Ge,ht,st[ht]);return Ge};const Lt=Ge=>React.createElement("svg",At({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},Ge),React.createElement("title",null,"\u5C55\u5F00\u9898\u76EE"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"100%",id:"show_svg__a"},React.createElement("stop",{stopColor:"#EEF7FF",offset:"0%"}),React.createElement("stop",{stopColor:"#C1E2FF",offset:"100%"}))),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"url(#show_svg__a)",width:40,height:40,rx:8}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M16.057 20.784H8.238A1.22 1.22 0 0 0 7 21.974v6.811a1.22 1.22 0 0 0 1.238 1.19h7.819a1.213 1.213 0 0 0 1.238-1.19v-6.811a1.213 1.213 0 0 0-.376-.847 1.203 1.203 0 0 0-.862-.332v-.01Zm-1.25 6.769H9.423V23.12h5.384v4.433Z",fill:"#4CACFF"}),React.createElement("path",{d:"M16.057 10.005a1.22 1.22 0 0 1 1.238 1.189v6.812a1.213 1.213 0 0 1-.376.846c-.232.222-.542.34-.862.332H8.238A1.213 1.213 0 0 1 7 18.005v-6.811a1.22 1.22 0 0 1 1.238-1.19Zm-1.239 2.41H9.434v4.401h5.384v-4.4Z",fill:"#94CDFF"}),React.createElement("path",{d:"M20.418 12.632h11.189a1.213 1.213 0 0 0 1.238-1.179 1.224 1.224 0 0 0-.371-.857 1.214 1.214 0 0 0-.867-.343H20.418a1.203 1.203 0 0 0-.866.336c-.233.223-.367.53-.372.854.005.323.14.63.372.854.232.223.544.344.866.335ZM31.575 16.027h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 21.595h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 27.163h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557Z",fill:"#1890FF"}))));var qt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Tn=ee(79769);function Jt(Ge){return(0,Tn.U2)("comments.json",Ge)}function On(Ge){return(0,Tn.v_)(`/discusses/${Ge}/plus.json`,{container_type:"Discuss",type:1})}function zn(Ge){return(0,Tn.v_)("comments/reply.json",Ge)}function qn(Ge){return(0,Tn.v_)("comments.json",Ge)}function Xn(Ge){return(0,Tn.v_)(`comments/${Ge==null?void 0:Ge.id}/hidden.json`,Ge)}function vr(Ge){return(0,Tn.IV)(`comments/${Ge==null?void 0:Ge.id}.json`)}var _r=ee(66115),Qn=ee(7544);function Cr({author:Ge}){return ne.createElement("a",{href:`/users/${Ge.login}`,target:"_blank"},ne.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${pe.Z.IMG_SERVER}/images/${Ge.image_url}`,width:"50"}))}function ni({data:Ge,index:st,parentDiscussIndex:ht,user:Yt,onSetActionType:en}){const{author:nn,can_delete:tn,content:mn,id:_n,time:Dn}=Ge;function tr(){en({id:_n,index:st,type:"delete-discuss",parentDiscussIndex:ht,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Hn=Yt.admin||tn||nn.user_id===Yt.user_id;return ne.createElement("div",{className:"discuss-item-container second-discuss "},ne.createElement(Cr,{author:nn}),ne.createElement("section",null,ne.createElement("div",{className:"discuss-info"},ne.createElement("a",{href:`/users/${nn.login}`,target:"_blank"},nn.name),ne.createElement("span",{className:"grey"},Dn),ne.createElement("div",{className:"btn-group",style:{marginBottom:0}},Hn?ne.createElement("a",{onClick:tr,title:"\u5220\u9664"},ne.createElement("i",{className:"iconfont icon-shanchu"})):null)),ne.createElement(Qe.Z,{className:"discuss-content",value:mn})))}var Jr=({user:Ge,data:st,index:ht,onPlusDiscuss:Yt,onSetActionType:en,activeDiscussIndex:nn,onReplyDiscuss:tn,onSetActiveDiscussIndex:mn})=>{const{content:_n,children:Dn,hidden:tr,id:Hn,praise_count:nr,time:jn,user_praise:lr,can_delete:ur,author:qr}=st;console.log(ur&&(!Dn||Dn.length==0),"children22");function pr(){mn(Hn)}function Yr(){Yt(Hn,!lr,ht)}function wi(){en({id:Hn,index:ht,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function ar(){en({id:Hn,index:ht,params:{hidden:tr?"0":"1"},type:"hidden-discuss",message:tr?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Br=Ge.admin||Ge.user_id===qr.user_id;return ne.createElement("div",{className:"discuss-item-container",key:Hn},ne.createElement(Cr,{author:qr}),ne.createElement("section",null,ne.createElement("div",{className:"discuss-info"},ne.createElement("a",{href:`/users/${qr.login}`,target:"_blank"}," ",qr.name," "),ne.createElement("span",{className:"grey"},jn)),ne.createElement(Qe.Z,{className:"discuss-content",value:_n}),Dn&&Dn.length>0?ne.createElement("div",{className:"reply-discuss-container"},Dn.map(($n,rr)=>ne.createElement(ni,{key:$n.id,data:$n,index:rr,user:Ge,onSetActionType:en,parentDiscussIndex:ht}))):null,ne.createElement("div",{className:"btn-group"},(0,Qn.Ny)()?ne.createElement("a",{onClick:ar,title:tr?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},ne.createElement("i",{className:tr?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,ur&&(!Dn||Dn.length==0)?ne.createElement("a",{onClick:wi,title:"\u5220\u9664"},ne.createElement("i",{className:"iconfont icon-shanchu"})):null,ne.createElement("a",{onClick:pr,title:"\u56DE\u590D"}," ",ne.createElement("i",{className:"iconfont icon-huifu1"})," "),ne.createElement("a",{onClick:Yr,className:lr?"c-orange":""},ne.createElement("i",{className:lr?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),ne.createElement("span",null,nr||""))),ne.createElement(_r.Z,{id:Hn,activeDiscussIndex:nn,onReplyDiscuss:tn})))},Yn=ee(94615),mr=ee(40973),si=(Ge,st,ht)=>new Promise((Yt,en)=>{var nn=_n=>{try{mn(ht.next(_n))}catch(Dn){en(Dn)}},tn=_n=>{try{mn(ht.throw(_n))}catch(Dn){en(Dn)}},mn=_n=>_n.done?Yt(_n.value):Promise.resolve(_n.value).then(nn,tn);mn((ht=ht.apply(Ge,st)).next())}),or=({user_praise:Ge,praise_count:st,praisePlus:ht,onCreateDiscuss:Yt,discuss_count:en})=>{const[nn,tn]=(0,ne.useState)(!1),[mn,_n]=(0,ne.useState)("");function Dn(jn){_n(jn)}function tr(){tn(!0)}function Hn(){tn(!1)}function nr(){return si(this,null,function*(){Yt(mn),_n(""),tn(!1)})}return ne.createElement("div",{className:`dis-input-editor-container ${nn?"active":""} `},ne.createElement("div",{className:nn?"text-area hide":"text-area"},ne.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:tr}),ne.createElement("a",{style:{alignItems:"center"}}," ",ne.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",en," "),ne.createElement("a",{className:"c-light-black",onClick:ht,style:{alignItems:"center"},title:Ge?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},ne.createElement("i",{className:`mr3 ${Ge?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),st?ne.createElement("span",null,st):"")),nn?ne.createElement("div",{className:"input-mask",onClick:Hn}):null,ne.createElement("div",{className:nn?"md-container":"md-container hide"},ne.createElement(mr.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:mn,height:240,onChange:Dn}),ne.createElement("div",{className:"tip-container",onClick:Hn},ne.createElement("a",{className:"btn-send",onClick:nr}," \u53D1\u9001 "))))},ii=Object.defineProperty,ki=Object.defineProperties,gi=Object.getOwnPropertyDescriptors,Li=Object.getOwnPropertySymbols,ui=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,Hr=(Ge,st,ht)=>st in Ge?ii(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Cn=(Ge,st)=>{for(var ht in st||(st={}))ui.call(st,ht)&&Hr(Ge,ht,st[ht]);if(Li)for(var ht of Li(st))dr.call(st,ht)&&Hr(Ge,ht,st[ht]);return Ge},Ee=(Ge,st)=>ki(Ge,gi(st)),je=(Ge,st,ht)=>new Promise((Yt,en)=>{var nn=_n=>{try{mn(ht.next(_n))}catch(Dn){en(Dn)}},tn=_n=>{try{mn(ht.throw(_n))}catch(Dn){en(Dn)}},mn=_n=>_n.done?Yt(_n.value):Promise.resolve(_n.value).then(nn,tn);mn((ht=ht.apply(Ge,st)).next())});const Oe={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var De=(Ge=>(Ge[Ge.GET_DISCUSSES=0]="GET_DISCUSSES",Ge[Ge.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",Ge[Ge.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",Ge[Ge.PLUS_DISCUSS=3]="PLUS_DISCUSS",Ge[Ge.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",Ge[Ge.SET_PAGE=5]="SET_PAGE",Ge[Ge.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",Ge))(De||{});function Ke(Ge,st){switch(st.type){case 6:return Ee(Cn({},Ge),{loading:!0});case 0:return Cn(Cn({},Ge),st.payload);case 1:return Cn(Cn({},Ge),st.payload);case 4:return Cn(Cn({},Ge),st.payload);case 3:return Cn(Cn({},Ge),st.payload);case 5:return Cn(Cn({},Ge),st.payload);case 2:return Cn(Cn({},Ge),st.payload);default:throw new Error}}var et=({user:Ge,identifier:st,hack:ht,onTriggerPraise:Yt,setDiscussTotal:en})=>{const[nn,tn]=(0,ne.useReducer)(Ke,Oe),{loading:mn,page:_n,data:Dn,count:tr,actionType:Hn,activeDiscussIndex:nr}=nn;console.log("---",nn);const jn=(0,ne.useCallback)(()=>je(void 0,null,function*(){tn({type:6});const $n=yield Jt({container_type:"Practice",container_identifier:st,limit:10,page:_n}),{comments:rr,disscuss_count:br}=$n;tn({type:0,payload:{data:rr,count:br,loading:!1}}),en(br)}),[_n,st]);(0,ne.useEffect)(()=>{jn()},[st,_n]);function lr($n){tn({type:5,payload:{page:$n}})}function ur($n){tn({type:4,payload:{actionType:$n}})}function qr($n){tn(nr===$n?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:$n}})}function pr($n,rr,br){return je(this,null,function*(){try{const pi=yield On($n);Dn[br].user_praise=rr,Dn[br].praise_count=pi.praise_count,tn({type:3,payload:{data:[...Dn]}})}catch(pi){console.log(pi)}})}function Yr(){return je(this,null,function*(){const{id:$n,params:rr,type:br,index:pi,parentDiscussIndex:Ki}=Hn;br==="hidden-discuss"&&(console.log(rr,"params"),yield Xn(Cn({id:$n,container_type:"Practice",container_identifier:st},rr)),Ki?Dn[Ki].children[pi].hidden=rr.hidden==1:Dn[pi].hidden=rr.hidden==1,tn({type:4,payload:{actionType:null,data:[...Dn]}})),br==="delete-discuss"&&(yield vr({id:$n,container_type:"Practice",container_identifier:st}),tn({type:4,payload:{actionType:null}}),yield jn())})}function wi(){tn({type:4,payload:{actionType:null}})}function ar($n,rr){return je(this,null,function*(){try{yield zn({container_type:"Practice",container_identifier:st,comments:{content:rr,parent_id:$n}}),jn()}catch(br){console.log(br)}})}function Br($n){return je(this,null,function*(){tn({type:6}),yield qn({comments:{content:$n},container_type:"Practice",container_identifier:st}),jn()})}return ne.createElement(ne.Fragment,null,ne.createElement("div",{className:"discuss-panel"},Dn.length===0?ne.createElement(Fe.Z,null):ne.createElement(ae.Z,{spinning:mn},Dn.map(($n,rr)=>ne.createElement(Jr,{onReplyDiscuss:ar,onPlusDiscuss:pr,onSetActiveDiscussIndex:qr,onSetActionType:ur,data:$n,index:rr,user:Ge,activeDiscussIndex:nr}))),tr>10?ne.createElement("div",{className:"pagination-container mt10 mb10"},ne.createElement(Xt.Z,{showQuickJumper:!0,onChange:lr,current:_n,total:tr,showTotal:$n=>ne.createElement("span",{style:{color:"#656F87"}},"\u5171",ne.createElement("span",{className:"c-light-primary"},$n),"\u6761\u6570\u636E")})):null),ne.createElement(or,{user_praise:ht.user_praise,praise_count:ht.praises_count,praisePlus:Yt,discuss_count:ht.comments_count,onCreateDiscuss:Br}),ne.createElement(we.Z,null,ne.createElement(ce.default,{centered:!0,title:"\u63D0\u793A",open:!!Hn,onOk:Yr,onCancel:wi},ne.createElement("p",null,Hn?Hn.message:"")),ne.createElement(Yn.Z,null)))},rt={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},Dt={flex_box_center:"flex_box_center___EahWI",flex_space_between:"flex_space_between___zopS4",flex_box_vertical_center:"flex_box_vertical_center___w03mz",flex_box_center_end:"flex_box_center_end___lr0Fp",flex_box_column:"flex_box_column___KFHVi",active:"active___BczOO",line:"line___VC_Ry",list:"list___n9ABd",left:"left___LVHqw",mask:"mask___fP13z",right:"right___iLe52",name:"name___Oz_7h",title:"title___2Sess",a:"a___t7rIW",b:"b___Kb_45",des:"des___CjMBM",tag:"tag___V0PVb"},Ft=Object.defineProperty,Bt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,Ut=(Ge,st,ht)=>st in Ge?Ft(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,on=(Ge,st)=>{for(var ht in st||(st={}))Ct.call(st,ht)&&Ut(Ge,ht,st[ht]);if(Bt)for(var ht of Bt(st))Ht.call(st,ht)&&Ut(Ge,ht,st[ht]);return Ge};const cn=Ge=>React.createElement("svg",on({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},Ge),React.createElement("title",null,"\u89C2\u770B"),React.createElement("path",{d:"M11 0a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h10ZM4.4 2.4a.4.4 0 0 0-.4.4v4.4a.4.4 0 0 0 .64.32l2.72-2.04a.6.6 0 0 0 0-.96L4.64 2.48a.4.4 0 0 0-.24-.08Z",fill:"#FFF",fillRule:"evenodd"}));var Rt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",Vt=Object.defineProperty,In=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,Rn=(Ge,st,ht)=>st in Ge?Vt(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Jn=(Ge,st)=>{for(var ht in st||(st={}))wn.call(st,ht)&&Rn(Ge,ht,st[ht]);if(In)for(var ht of In(st))Nn.call(st,ht)&&Rn(Ge,ht,st[ht]);return Ge};const Sn=Ge=>React.createElement("svg",Jn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Ge),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var Un="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",zt=Object.defineProperty,fn=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,En=(Ge,st,ht)=>st in Ge?zt(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,kn=(Ge,st)=>{for(var ht in st||(st={}))vn.call(st,ht)&&En(Ge,ht,st[ht]);if(fn)for(var ht of fn(st))An.call(st,ht)&&En(Ge,ht,st[ht]);return Ge};const Mn=Ge=>React.createElement("svg",kn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Ge),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var Bn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",Kn=Object.defineProperty,Vn=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,$r=(Ge,st,ht)=>st in Ge?Kn(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Mr=(Ge,st)=>{for(var ht in st||(st={}))cr.call(st,ht)&&$r(Ge,ht,st[ht]);if(Vn)for(var ht of Vn(st))fr.call(st,ht)&&$r(Ge,ht,st[ht]);return Ge};const wr=Ge=>React.createElement("svg",Mr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Ge),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var ei="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Xr=Object.defineProperty,Zr=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,Wr=(Ge,st,ht)=>st in Ge?Xr(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Pr=(Ge,st)=>{for(var ht in st||(st={}))Lr.call(st,ht)&&Wr(Ge,ht,st[ht]);if(Zr)for(var ht of Zr(st))Or.call(st,ht)&&Wr(Ge,ht,st[ht]);return Ge};const di=Ge=>React.createElement("svg",Pr({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},Ge),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var Ri="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",er=({style:Ge={},onClick:st,onAssist:ht,onHide:Yt,data:en,active:nn,showLine:tn})=>ne.createElement(ne.Fragment,null,ne.createElement("div",{className:nn===(en==null?void 0:en.id)?`${Dt.list} ${Dt.active}`:Dt.list,style:Ge,onClick:()=>st(en)},(en==null?void 0:en.video)&&ne.createElement("div",{className:Dt.left},ne.createElement("img",{src:en==null?void 0:en.video_cover}),ne.createElement("div",null,ne.createElement("img",{src:Rt}),ne.createElement("span",null,en==null?void 0:en.video_duration)),ne.createElement("div",{className:Dt.mask})),ne.createElement("div",{className:Dt.right},ne.createElement("div",{className:Dt.name},ne.createElement("img",{src:pe.Z.IMG_SERVER+"/images/"+(en==null?void 0:en.image_url),width:30,height:30}),ne.createElement("div",{title:en==null?void 0:en.name,className:Dt.title},en==null?void 0:en.name),(en==null?void 0:en.is_authority)&&ne.createElement("div",{className:Dt.b},"\u5B98\u65B9"),(en==null?void 0:en.is_excellent)&&ne.createElement("div",{className:Dt.a},"\u7CBE\u9009")),ne.createElement("div",{className:Dt.des},ne.createElement(Qe.Z,{showLines:2,showTextOnly:!0,value:(en==null?void 0:en.content)||"\u6682\u65E0\u5185\u5BB9"})),ne.createElement("div",{className:Dt.tag},ne.createElement("span",{className:"current",onClick:mn=>{mn.stopPropagation(),ht(en)}},ne.createElement("img",{src:en!=null&&en.user_liker?Bn:Un}),ne.createElement("span",{style:{color:en!=null&&en.user_liker?"#0152d9":"#656f87"}},en==null?void 0:en.praises_count)),ne.createElement("span",null,ne.createElement("img",{src:ei}),ne.createElement("span",null,en==null?void 0:en.discusses_count)),ne.createElement("span",null,ne.createElement("img",{src:Ri}),ne.createElement("span",null,en==null?void 0:en.viewed_count)),(0,Qn.Ny)()&&ne.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:mn=>{mn.stopPropagation(),Yt(en)}},en!=null&&en.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),tn&&ne.createElement("div",{className:Dt.line})),Zn={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},Dr=ee(6848),Sr=Object.defineProperty,ri=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,jr=Object.prototype.propertyIsEnumerable,Bi=(Ge,st,ht)=>st in Ge?Sr(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,_i=(Ge,st)=>{for(var ht in st||(st={}))yi.call(st,ht)&&Bi(Ge,ht,st[ht]);if(ri)for(var ht of ri(st))jr.call(st,ht)&&Bi(Ge,ht,st[ht]);return Ge};const oo=Ge=>React.createElement("svg",_i({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},Ge),React.createElement("title",null,"\u4E0A\u4F20\u89C6\u9891"),React.createElement("path",{d:"M1.6 0C1.175 0 .768.17.468.474A1.63 1.63 0 0 0 0 1.622v3.243h3.237L7.378 0H1.6Zm7.876 0L5.338 4.865h5.9L15.371 0H9.476Zm7.998 0-4.137 4.865h5.896L23.372 0h-5.898Zm8 0-4.138 4.865h6.66V1.622a1.629 1.629 0 0 0-.467-1.148A1.585 1.585 0 0 0 26.397 0h-.924ZM0 6.487v17.837c0 .43.167.844.468 1.148.3.305.707.475 1.132.474h18.61a6.515 6.515 0 0 1 1.652-6.218 6.31 6.31 0 0 1 6.134-1.675V6.487H0Zm11.998 5.675 6.4 4.056-6.4 4.055v-8.11Zm14.399 6.487c-3.092.002-5.597 2.544-5.595 5.678.001 3.134 2.508 5.674 5.6 5.673C29.494 30 32 27.458 32 24.324c0-1.506-.59-2.95-1.641-4.014a5.561 5.561 0 0 0-3.962-1.661Zm0 2.027c.22.003.428.1.574.266.663.6 1.327 1.352 1.99 2.002a.8.8 0 0 1 0 1.14.788.788 0 0 1-1.125 0l-.638-.646v3.724a.814.814 0 0 1-.392.724.79.79 0 0 1-.815 0 .814.814 0 0 1-.392-.724v-3.724l-.637.646a.79.79 0 0 1-.773.215.803.803 0 0 1-.567-.575.816.816 0 0 1 .212-.783c.651-.664 1.333-1.388 1.99-2.002a.778.778 0 0 1 .575-.266l-.002.003Z",fill:"#0152d9",fillRule:"nonzero"}));var Fr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Nr=Object.defineProperty,bi=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,Xi=Object.prototype.propertyIsEnumerable,mo=(Ge,st,ht)=>st in Ge?Nr(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Co=(Ge,st)=>{for(var ht in st||(st={}))hi.call(st,ht)&&mo(Ge,ht,st[ht]);if(bi)for(var ht of bi(st))Xi.call(st,ht)&&mo(Ge,ht,st[ht]);return Ge};const ji=Ge=>React.createElement("svg",Co({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},Ge),React.createElement("title",null,"\u4E0A\u4F20\u6210\u529F"),React.createElement("path",{d:"M15 0c8.285 0 15 6.717 15 15 0 8.285-6.715 15-15 15-8.283 0-15-6.715-15-15C0 6.717 6.717 0 15 0Zm10.041 7.5v.01a47.934 47.934 0 0 0-11.232 9.386l-4.372-3.3v-.002L7.5 15.08l7.553 7.42A44.625 44.625 0 0 1 25.5 8.55l-.459-1.05Z",fill:"#44D7B6",fillRule:"nonzero"}));var _o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",vo=Object.defineProperty,Er=Object.getOwnPropertySymbols,Ar=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable,Kr=(Ge,st,ht)=>st in Ge?vo(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Hi=(Ge,st)=>{for(var ht in st||(st={}))Ar.call(st,ht)&&Kr(Ge,ht,st[ht]);if(Er)for(var ht of Er(st))kr.call(st,ht)&&Kr(Ge,ht,st[ht]);return Ge};const eo=Ge=>React.createElement("svg",Hi({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},Ge),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var io="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",ao=ee(61205),to=Object.defineProperty,Mo=Object.defineProperties,Yo=Object.getOwnPropertyDescriptors,Ho=Object.getOwnPropertySymbols,La=Object.prototype.hasOwnProperty,ha=Object.prototype.propertyIsEnumerable,Ko=(Ge,st,ht)=>st in Ge?to(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Oo=(Ge,st)=>{for(var ht in st||(st={}))La.call(st,ht)&&Ko(Ge,ht,st[ht]);if(Ho)for(var ht of Ho(st))ha.call(st,ht)&&Ko(Ge,ht,st[ht]);return Ge},Wi=(Ge,st)=>Mo(Ge,Yo(st)),ta=(Ge,st,ht)=>new Promise((Yt,en)=>{var nn=_n=>{try{mn(ht.next(_n))}catch(Dn){en(Dn)}},tn=_n=>{try{mn(ht.throw(_n))}catch(Dn){en(Dn)}},mn=_n=>_n.done?Yt(_n.value):Promise.resolve(_n.value).then(nn,tn);mn((ht=ht.apply(Ge,st)).next())}),no=({onClose:Ge,onOk:st,identifier:ht,active:Yt})=>{var en,nn;const[tn]=Ze.default.useForm(),[mn,_n]=(0,ne.useState)({}),[Dn,tr]=(0,ne.useState)(!1),[Hn,nr]=(0,ne.useState)(!1),[jn,lr]=(0,ne.useState)([]),ur=(0,Qn.eY)(),qr=(0,Ce.useParams)(),pr=(0,ne.useRef)();(0,ne.useEffect)(()=>{Yt&&Yr()},[Yt]);const Yr=()=>ta(void 0,null,function*(){var xr,mi,Di,zi,zo,Vi,Jo,co,Lo,Ro;const xi=yield(0,ve.M3)(ht,{active:Yt});if((xi==null?void 0:xi.status)===0){const li={name:(xr=xi==null?void 0:xi.data)==null?void 0:xr.name,content:(mi=xi==null?void 0:xi.data)==null?void 0:mi.content};tn.setFieldsValue(li),_n(li),(zi=(Di=xi==null?void 0:xi.data)==null?void 0:Di.videos)!=null&&zi[0]&&lr([{video_id:(Jo=(Vi=(zo=xi==null?void 0:xi.data)==null?void 0:zo.videos)==null?void 0:Vi[0])==null?void 0:Jo.video_id,name:(Ro=(Lo=(co=xi==null?void 0:xi.data)==null?void 0:co.videos)==null?void 0:Lo[0])==null?void 0:Ro.title,loaded:100}])}}),wi=(xr,mi)=>{_n(Oo({},mi))},ar=xr=>ta(void 0,null,function*(){const mi={videos:jn,articles:xr};nr(!0);let Di;Yt?(mi.active=Yt,Di=yield(0,ve.gu)(ht,mi)):Di=yield(0,ve.bx)(ht,mi),(Di==null?void 0:Di.status)===0&&(console.log(Yt||(Di==null?void 0:Di.id),44),st(Yt||(Di==null?void 0:Di.id))),nr(!1)}),Br=(xr,mi)=>{ce.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:ne.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",mi?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{mi?lr([]):(pr.current.cancel(),lr([]))}})},$n=()=>ne.createElement(ao.Z,Wi(Oo({},gr),{ref:pr}),ne.createElement("div",{className:Zn.main},ne.createElement("img",{src:Fr,alt:""}),ne.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891"))),rr=xr=>ne.createElement("div",{className:Zn.mainLoading},ne.createElement("div",{className:Zn.proWarp},ne.createElement("div",{className:Zn.pro},ne.createElement("div",{style:{width:xr}})),ne.createElement("span",null,xr||0,"%")),ne.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),ne.createElement("div",{className:Zn.tip},ne.createElement(Dr.Z,{getPopupContainer:mi=>mi.parentNode,title:ne.createElement("div",null,ne.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",ne.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),ne.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),ne.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},ne.createElement("img",{src:io,alt:""})))),br=xr=>ne.createElement("div",{className:Zn.mainSucceed},ne.createElement("img",{src:_o,alt:""}),ne.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),ne.createElement("div",{className:Zn.tip},ne.createElement(Dr.Z,{getPopupContainer:mi=>mi.parentNode,title:ne.createElement("div",null,ne.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",ne.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),ne.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),ne.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},ne.createElement("img",{src:io,alt:""}))),ne.createElement("div",{className:Zn.del,onClick:()=>Br(xr.name,xr.loaded==100)},ne.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),pi=()=>ne.createElement(ne.Fragment,null,jn==null?void 0:jn.map((xr,mi)=>ne.createElement(ne.Fragment,{key:mi},xr.loaded==100?br(xr):rr(xr.loaded)))),Ki=()=>{ce.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:Ge})},gr={accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*",onBefore:xr=>{const Di=xr.name.toLowerCase();return Di&&Di.indexOf(".avi")==-1&&Di.indexOf(".flv")==-1&&Di.indexOf(".f4v")==-1&&Di.indexOf(".m4v")==-1&&Di.indexOf(".mov")==-1&&Di.indexOf(".mp4")==-1&&Di.indexOf(".rmvb")==-1&&Di.indexOf(".swf")==-1&&Di.indexOf(".webm")==-1&&Di.indexOf(".wmv")==-1?(he.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),!0):xr.size>1024*1024*1024?(he.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71G"),!0):jn!=null&&jn.find(zi=>zi.name===xr.name)?(he.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),!0):!1},onBeginInitFile:xr=>{lr([{name:xr.filename,loaded:0}])},onComplete:xr=>{lr([{name:xr.filename,loaded:xr.percent,video_id:xr.id}])},onError:()=>{lr([])},onProgress:xr=>{lr([{name:xr.filename,loaded:xr.percent}])},chunkSize:1024*1024*2,options:{user_id:(en=ur==null?void 0:ur.userInfo)==null?void 0:en.user_id}},oi=jn==null?void 0:jn.length;return ne.createElement("div",{className:Zn.listForm},ne.createElement("header",null,Yt?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),ne.createElement("section",{className:Zn.scroll,id:"sss"},ne.createElement("div",{className:Zn.formWrap}," ",ne.createElement(Ze.default,{form:tn,scrollToFirstError:!0,layout:"vertical",onValuesChange:wi,onFinish:ar},ne.createElement(Ze.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},ne.createElement(qe.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((nn=mn.name)==null?void 0:nn.length)||0}/60`})),ne.createElement(Ze.default.Item,{name:"content",label:"\u5185\u5BB9:"},ne.createElement(mr.Z,{defaultValue:mn.content||"",watch:!0})))),ne.createElement("div",{className:Zn.upload},oi?pi():$n())),ne.createElement("div",{className:Zn.btns},ne.createElement(wt.ZP,{onClick:Ki,type:"primary",ghost:!0},"\u5173\u95ED"),ne.createElement(wt.ZP,{loading:Hn,disabled:Dn,onClick:()=>tn.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},ti={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},Fi=ee(61621),Ii=Object.defineProperty,Ci=Object.getOwnPropertySymbols,ro=Object.prototype.hasOwnProperty,qi=Object.prototype.propertyIsEnumerable,Bo=(Ge,st,ht)=>st in Ge?Ii(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,na=(Ge,st)=>{for(var ht in st||(st={}))ro.call(st,ht)&&Bo(Ge,ht,st[ht]);if(Ci)for(var ht of Ci(st))qi.call(st,ht)&&Bo(Ge,ht,st[ht]);return Ge};const ra=Ge=>React.createElement("svg",na({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},Ge),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var fa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",xo=Object.defineProperty,go=Object.getOwnPropertySymbols,ca=Object.prototype.hasOwnProperty,ua=Object.prototype.propertyIsEnumerable,ba=(Ge,st,ht)=>st in Ge?xo(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,da=(Ge,st)=>{for(var ht in st||(st={}))ca.call(st,ht)&&ba(Ge,ht,st[ht]);if(go)for(var ht of go(st))ua.call(st,ht)&&ba(Ge,ht,st[ht]);return Ge};const xl=Ge=>React.createElement("svg",da({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},Ge),React.createElement("defs",null,React.createElement("path",{id:"gf_svg__a",d:"m8 0 1.857 1.073h2.146l1.071 1.854L14.931 4v2.144L16 8l-1.069 1.857V12l-1.858 1.072-1.071 1.856H9.857L8 16l-1.855-1.073H4l-1.072-1.856L1.072 12V9.857L0 8l1.072-1.856V4l1.857-1.073 1.072-1.854h2.145L8 0Zm2.91 6.385H4.796V12h1.246v-.451h4.026v.435h1.247V9.196H6.043v-.515h4.866V6.385Zm-.84 3.681v.613H6.042v-.613h4.026ZM9.705 7.24v.588H6.043v-.588h3.663ZM8.615 4l-1.48.137c.055.133.12.284.192.453l.076.175H4v1.426h1.195v-.483h5.61v.483H12V4.765H8.883c-.078-.23-.148-.43-.21-.602L8.616 4Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"gf_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#gf_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#gf_svg__a"}),React.createElement("circle",{cx:.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"}),React.createElement("circle",{cx:-.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"})));var Cs="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",ws=Object.defineProperty,Ja=Object.getOwnPropertySymbols,Sl=Object.prototype.hasOwnProperty,Es=Object.prototype.propertyIsEnumerable,Pa=(Ge,st,ht)=>st in Ge?ws(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Da=(Ge,st)=>{for(var ht in st||(st={}))Sl.call(st,ht)&&Pa(Ge,ht,st[ht]);if(Ja)for(var ht of Ja(st))Es.call(st,ht)&&Pa(Ge,ht,st[ht]);return Ge};const Xs=Ge=>React.createElement("svg",Da({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},Ge),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var Zs="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Ps={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},ul=ee(95237),Ns=ee(43604),_a={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},qa=(Ge,st,ht)=>new Promise((Yt,en)=>{var nn=_n=>{try{mn(ht.next(_n))}catch(Dn){en(Dn)}},tn=_n=>{try{mn(ht.throw(_n))}catch(Dn){en(Dn)}},mn=_n=>_n.done?Yt(_n.value):Promise.resolve(_n.value).then(nn,tn);mn((ht=ht.apply(Ge,st)).next())});const Wo=({id:Ge,cb:st})=>{const[ht,Yt]=(0,ne.useState)("");return ne.createElement("aside",{className:"mt10"},ne.createElement(mr.Z,{defaultValue:ht,id:"writeForumsReviewId",onChange:en=>{Yt(en)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ne.createElement(ul.Z,null,ne.createElement(Ns.Z,{flex:"1"}),ne.createElement(Ns.Z,null,ne.createElement(wt.ZP,{type:"primary",size:"middle",onClick:()=>qa(void 0,null,function*(){ht===""?he.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):st(Ge,ht)})},"\u53D1\u9001"))))},Js=({data:Ge})=>{var st;return ne.createElement("div",{className:_a.thirdlyLevelDiscuss},ne.createElement("span",{className:"c-grey-333"},ne.createElement("span",{className:"font 14 c-light-primary"},(st=Ge==null?void 0:Ge.author)==null?void 0:st.name),"@",ne.createElement("span",{className:"font 14 c-light-primary"},Ge==null?void 0:Ge.parent_name),":"),ne.createElement(Qe.Z,{value:Ge==null?void 0:Ge.content}))},Cl=({data:Ge,onReplyDiscuss:st,thirdlyReply:ht,setThirdlyReply:Yt})=>{var en,nn,tn,mn;const _n=(0,Qn.eY)();return console.log(_n,"user"),ne.createElement("div",{className:_a.list},ne.createElement("img",{src:pe.Z.IMG_SERVER+"/images/"+((en=Ge==null?void 0:Ge.author)==null?void 0:en.image_url)}),ne.createElement("div",{className:_a.wrap},ne.createElement("div",{className:"font14",style:{marginBottom:6}},ne.createElement("span",{className:"c-grey-333"},(nn=Ge==null?void 0:Ge.author)==null?void 0:nn.name),(_n==null?void 0:_n.login)!==((tn=Ge==null?void 0:Ge.author)==null?void 0:tn.login)&&ne.createElement("span",{onClick:()=>Yt(Ge==null?void 0:Ge.id),className:"c-grey-999 current",style:{float:"right"}},ne.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),ne.createElement("span",null,"\u56DE\u590D"))),ne.createElement(Qe.Z,{value:Ge==null?void 0:Ge.content}),(mn=Ge==null?void 0:Ge.children)==null?void 0:mn.map(Dn=>ne.createElement(Js,{key:Dn.id,data:Dn})),ht===(Ge==null?void 0:Ge.id)&&ne.createElement("div",null,ne.createElement(Wo,{id:Ge==null?void 0:Ge.id,cb:st}),ne.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>Yt(null),className:"c-light-primary current"},ne.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),ne.createElement("div",{className:_a.line})))};var wo=({data:Ge,onReplyDiscuss:st,secondReply:ht,setSecondReply:Yt,thirdlyReply:en,setThirdlyReply:nn,onPlusDiscuss:tn})=>{var mn,_n,Dn,tr;const[Hn,nr]=(0,ne.useState)(!1);return console.log(Ge,"data"),ne.createElement("div",{className:_a.discussItem},ne.createElement("div",{className:_a.list},ne.createElement("img",{src:pe.Z.IMG_SERVER+"/images/"+((mn=Ge==null?void 0:Ge.author)==null?void 0:mn.image_url)}),ne.createElement("div",{className:_a.wrap},ne.createElement("div",{className:"font14",style:{marginBottom:6}},ne.createElement("span",{className:"c-grey-333 mr30"},(_n=Ge==null?void 0:Ge.author)==null?void 0:_n.name),ne.createElement("span",{className:"c-grey-999"},Ge==null?void 0:Ge.time)),ne.createElement(Qe.Z,{value:Ge==null?void 0:Ge.content}),ne.createElement("div",{className:_a.btns},ne.createElement("div",{onClick:()=>tn(Ge==null?void 0:Ge.id),className:Ge!=null&&Ge.user_praise?"c-light-primary":"c-grey-999"},ne.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),ne.createElement("span",null,Ge==null?void 0:Ge.praise_count)),ne.createElement("div",{onClick:()=>{var jn;((jn=Ge==null?void 0:Ge.children)==null?void 0:jn.length)!==0&&(Yt(null),nr(!Hn))},style:{color:Hn?"#0152d9":"#999999"}},ne.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),ne.createElement("span",null,Hn?"\u6536\u8D77\u8BC4\u8BBA":(Dn=Ge==null?void 0:Ge.children)==null?void 0:Dn.length)),ne.createElement("div",{onClick:()=>{nr(!1),Yt(ht===(Ge==null?void 0:Ge.id)?null:Ge==null?void 0:Ge.id)},style:{color:ht===(Ge==null?void 0:Ge.id)?"#0152d9":"#999999"}},ne.createElement("i",{className:"iconfont icon-huifu3 mr3"}),ne.createElement("span",null,ht===(Ge==null?void 0:Ge.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),ht===(Ge==null?void 0:Ge.id)&&ne.createElement(Wo,{id:Ge==null?void 0:Ge.id,cb:(jn,lr)=>{st(jn,lr),nr(!0)}}),Hn&&ne.createElement("div",{className:_a.secondLevelDiscuss},(tr=Ge==null?void 0:Ge.children)==null?void 0:tr.map(jn=>ne.createElement(Cl,{thirdlyReply:en,setThirdlyReply:nn,key:jn.id,data:jn,onReplyDiscuss:st}))))))},so=(Ge,st,ht)=>new Promise((Yt,en)=>{var nn=_n=>{try{mn(ht.next(_n))}catch(Dn){en(Dn)}},tn=_n=>{try{mn(ht.throw(_n))}catch(Dn){en(Dn)}},mn=_n=>_n.done?Yt(_n.value):Promise.resolve(_n.value).then(nn,tn);mn((ht=ht.apply(Ge,st)).next())}),va=({identifier:Ge,active:st,onOk:ht})=>{const[Yt,en]=(0,ne.useState)(""),[nn,tn]=(0,ne.useState)(1),[mn,_n]=(0,ne.useState)([]),[Dn,tr]=(0,ne.useState)(0),[Hn,nr]=(0,ne.useState)(null),[jn,lr]=(0,ne.useState)(null);(0,ne.useEffect)(()=>{ur(1),tn(1)},[st]);const ur=ar=>so(void 0,null,function*(){const Br=yield Jt({container_type:"QuestionSolutionArticle",container_identifier:st,limit:5,page:ar});Br!=null&&Br.comments&&(_n((Br==null?void 0:Br.comments)||[]),tn(ar),tr(Br==null?void 0:Br.disscuss_count))}),qr=()=>so(void 0,null,function*(){if(Yt===""){he.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const ar=yield qn({comments:{content:Yt},container_type:"QuestionSolutionArticle",container_identifier:st});ar!=null&&ar.discuss&&(en(""),ur(nn),ht())}),pr=(ar,Br,$n)=>so(void 0,null,function*(){const rr=yield zn({container_type:"QuestionSolutionArticle",container_identifier:st,comments:{content:Br,parent_id:ar}});nr(null),lr(null),ur(nn)}),Yr=ar=>so(void 0,null,function*(){const Br=yield On(ar);ur(nn)}),wi=ar=>{tn(ar),ur(ar)};return ne.createElement("div",{className:Ps.discuss},ne.createElement("aside",{className:Ps.reply,style:{borderWidth:Dn?1:0}},ne.createElement(mr.Z,{defaultValue:Yt,id:"writeForumsReviewId",onChange:ar=>{en(ar)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ne.createElement(ul.Z,null,ne.createElement(Ns.Z,{flex:"1"}),ne.createElement(Ns.Z,null,ne.createElement(wt.ZP,{type:"primary",size:"middle",onClick:()=>qr()},"\u53D1\u9001")))),mn==null?void 0:mn.map(ar=>ne.createElement(wo,{secondReply:Hn,setSecondReply:nr,thirdlyReply:jn,setThirdlyReply:lr,key:ar.id,data:ar,onReplyDiscuss:pr,onPlusDiscuss:Yr})),ne.createElement(Xt.Z,{className:Ps.pagination,showTotal:ar=>ne.createElement("span",{style:{color:"#656F87"}},"\u5171",ne.createElement("span",{className:"c-light-primary"},ar),"\u6761\u6570\u636E"),current:nn,onChange:wi,total:Dn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},oa=ee(20978),za=Object.defineProperty,$a=Object.getOwnPropertySymbols,hs=Object.prototype.hasOwnProperty,Wa=Object.prototype.propertyIsEnumerable,Ms=(Ge,st,ht)=>st in Ge?za(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,ks=(Ge,st)=>{for(var ht in st||(st={}))hs.call(st,ht)&&Ms(Ge,ht,st[ht]);if($a)for(var ht of $a(st))Wa.call(st,ht)&&Ms(Ge,ht,st[ht]);return Ge},Na=(Ge,st,ht)=>new Promise((Yt,en)=>{var nn=_n=>{try{mn(ht.next(_n))}catch(Dn){en(Dn)}},tn=_n=>{try{mn(ht.throw(_n))}catch(Dn){en(Dn)}},mn=_n=>_n.done?Yt(_n.value):Promise.resolve(_n.value).then(nn,tn);mn((ht=ht.apply(Ge,st)).next())}),dl=({active:Ge,identifier:st,onAssist:ht,onEdit:Yt,onArticlesSkip:en,onClose:nn,onOk:tn,onDelete:mn,detailsIndex:_n,btnShowStatus:Dn})=>{var tr,Hn,nr,jn,lr,ur,qr,pr,Yr,wi;const[ar,Br]=(0,ne.useState)(!0),[$n,rr]=(0,ne.useState)({});(0,ne.useEffect)(()=>{Ge&&br()},[Ge,_n]);const br=(oi=!0)=>Na(void 0,null,function*(){oi&&Br(!0);const xr=yield(0,ve.wO)(st,{active:Ge});(xr==null?void 0:xr.status)===0&&rr((xr==null?void 0:xr.data)||{}),Br(!1)}),pi=oi=>Na(void 0,null,function*(){const xr=yield(0,ve.qe)(st,ks({active:Ge},oi));(xr==null?void 0:xr.status)===0&&(br(!1),tn())}),Ki=oi=>Na(void 0,null,function*(){(yield(0,ve.Rg)(st,{active:oi==null?void 0:oi.id})).status===0&&(br(!1),tn())}),ir=oi=>{ce.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>mn(oi)})},gr=()=>{br(!1),tn()};return ne.createElement("div",{className:ti.listDetails},ne.createElement(Fi.Z,{className:"pt20 pl20 pr20",loading:ar,active:!0,paragraph:{rows:5}},ne.createElement("div",{className:ti.head},ne.createElement("div",{className:ti.name},ne.createElement("div",{title:$n==null?void 0:$n.name,className:ti.title},$n==null?void 0:$n.name),($n==null?void 0:$n.is_authority)&&ne.createElement("div",{className:ti.b},"\u5B98\u65B9"),($n==null?void 0:$n.is_excellent)&&ne.createElement("div",{className:ti.a},"\u7CBE\u9009")),ne.createElement("div",{className:ti.tag},ne.createElement("img",{src:pe.Z.IMG_SERVER+"/images/"+($n==null?void 0:$n.image_url)}),ne.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},$n==null?void 0:$n.username),ne.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",ke()($n==null?void 0:$n.created_at).format("YYYY-MM-DD")),ne.createElement("span",null,ne.createElement("img",{src:Un}),ne.createElement("span",null,$n==null?void 0:$n.praises_count)),ne.createElement("span",null,ne.createElement("img",{src:ei}),ne.createElement("span",null,$n==null?void 0:$n.discusses_count)),ne.createElement("span",null,ne.createElement("img",{src:Ri}),ne.createElement("span",null,$n==null?void 0:$n.viewed_count)),ne.createElement("div",{className:ti.btn},((0,Qn.Ny)()||($n==null?void 0:$n.is_self))&&ne.createElement(ne.Fragment,null,ne.createElement(wt.ZP,{onClick:()=>ir($n),type:"primary",ghost:!0},"\u5220\u9664"),ne.createElement(wt.ZP,{onClick:()=>Yt($n),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,Qn.Ny)()&&ne.createElement(wt.ZP,{onClick:()=>pi({is_authority:!($n!=null&&$n.is_authority)}),type:"primary"},ne.createElement("img",{src:Cs}),$n!=null&&$n.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,Qn.Ny)()&&ne.createElement(wt.ZP,{onClick:()=>pi({is_excellent:!($n!=null&&$n.is_excellent)}),type:"primary"},ne.createElement("img",{src:fa}),$n!=null&&$n.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),ne.createElement("div",{className:ti.scroll},((Hn=(tr=$n==null?void 0:$n.videos)==null?void 0:tr[0])==null?void 0:Hn.id)&&ne.createElement("div",{className:ti.video},ne.createElement(ae.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((jn=(nr=$n==null?void 0:$n.videos)==null?void 0:nr[0])!=null&&jn.transcoded)},ne.createElement(oa.Z,{poster:(ur=(lr=$n==null?void 0:$n.videos)==null?void 0:lr[0])==null?void 0:ur.cover_url,src:((pr=(qr=$n==null?void 0:$n.videos)==null?void 0:qr[0])==null?void 0:pr.play_url)||"",videoId:(wi=(Yr=$n==null?void 0:$n.videos)==null?void 0:Yr[0])==null?void 0:wi.id,logWatchHistory:()=>{}}))),ne.createElement(Qe.Z,{className:ti.html,value:($n==null?void 0:$n.content)||""}),ne.createElement("div",{onClick:()=>Ki($n),className:ti.g},ne.createElement("img",{className:"mr10",src:($n!=null&&$n.user_liker,Zs)}),ne.createElement("span",null,$n==null?void 0:$n.praises_count)),ne.createElement(va,{onOk:gr,active:Ge,identifier:st})),ne.createElement("div",{className:ti.btns},ne.createElement(wt.ZP,{onClick:()=>nn(),type:"primary",ghost:!0},"\u5173\u95ED"),Dn[0]&&ne.createElement(wt.ZP,{onClick:oi=>en(oi,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Dn[1]&&ne.createElement(wt.ZP,{onClick:oi=>en(oi,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},hl=Object.defineProperty,Ol=Object.getOwnPropertySymbols,Rl=Object.prototype.hasOwnProperty,wl=Object.prototype.propertyIsEnumerable,vc=(Ge,st,ht)=>st in Ge?hl(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,il=(Ge,st)=>{for(var ht in st||(st={}))Rl.call(st,ht)&&vc(Ge,ht,st[ht]);if(Ol)for(var ht of Ol(st))wl.call(st,ht)&&vc(Ge,ht,st[ht]);return Ge};const oc=Ge=>React.createElement("svg",il({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},Ge),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var ol="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",fl=ee(59477),To=ee(89489),Uo=Object.defineProperty,Xo=Object.defineProperties,fs=Object.getOwnPropertyDescriptors,ja=Object.getOwnPropertySymbols,Ws=Object.prototype.hasOwnProperty,is=Object.prototype.propertyIsEnumerable,Ba=(Ge,st,ht)=>st in Ge?Uo(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Aa=(Ge,st)=>{for(var ht in st||(st={}))Ws.call(st,ht)&&Ba(Ge,ht,st[ht]);if(ja)for(var ht of ja(st))is.call(st,ht)&&Ba(Ge,ht,st[ht]);return Ge},Qs=(Ge,st)=>Xo(Ge,fs(st)),ps=(Ge,st,ht)=>new Promise((Yt,en)=>{var nn=_n=>{try{mn(ht.next(_n))}catch(Dn){en(Dn)}},tn=_n=>{try{mn(ht.throw(_n))}catch(Dn){en(Dn)}},mn=_n=>_n.done?Yt(_n.value):Promise.resolve(_n.value).then(nn,tn);mn((ht=ht.apply(Ge,st)).next())}),Dc=({identifier:Ge,tabStatus:st,setFilterListTotal:ht,setListStatus:Yt})=>{const en={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[nn,tn]=(0,ne.useState)(Aa({},en));const[mn,_n]=(0,ne.useState)(!1),[Dn,tr]=(0,ne.useState)(0),[Hn,nr]=(0,ne.useState)(1),[jn,lr]=(0,ne.useState)(null),[ur,qr]=(0,ne.useState)([]),[pr,Yr]=(0,ne.useState)([!0,!0]),[wi,ar]=(0,ne.useState)(0),Br=(0,ne.useRef)(null);(0,ne.useEffect)(()=>{mi()},[st]),(0,ne.useEffect)(()=>{$n()},[jn]),(0,ne.useEffect)(()=>{br(Aa({},en)),mi()},[Ge]),(0,ne.useEffect)(()=>(window.addEventListener("resize",rr),Yt(wi),()=>{window.removeEventListener("resize",rr)}),[wi]);const $n=()=>ps(void 0,null,function*(){if(!jn){Yr([!0,!0]);return}const xi=[!0,!0],li=ur==null?void 0:ur.findIndex(Ei=>Ei.id===jn);li===0&&nn.page===1&&(xi[0]=!1),(nn.page-1)*nn.limit+(li+1)===nn.total&&(xi[1]=!1),Yr(xi)}),rr=()=>{var xi;if(wi){const li=window.innerWidth-((xi=Br.current)==null?void 0:xi.clientWidth);tr(li)}},br=xi=>ps(void 0,null,function*(){var li,Ei,Oi;_n(!0);const fi=yield(0,ve.WH)(Ge,xi);return(fi==null?void 0:fi.status)===0&&(qr(((li=fi==null?void 0:fi.data)==null?void 0:li.articles)||[]),tn(Qs(Aa({},xi),{total:(Ei=fi==null?void 0:fi.data)==null?void 0:Ei.articles_count})),ht((Oi=fi==null?void 0:fi.data)==null?void 0:Oi.articles_count)),_n(!1),fi}),pi=()=>{(nn==null?void 0:nn.sort_direction)===null?nn.sort_direction="asc":(nn==null?void 0:nn.sort_direction)==="asc"?nn.sort_direction="desc":(nn==null?void 0:nn.sort_direction)==="desc"&&(nn.sort_direction=null),nn.page=1,mi(),tn(Aa({},nn)),br(nn)},Ki=()=>{nn.page=1,nn.search=nn==null?void 0:nn.save_search,mi(),tn(Aa({},nn)),br(nn)},ir=()=>{var xi;const li=document.getElementsByClassName("btn-resize");li[0].style.visibility="hidden";const Ei=window.innerWidth-((xi=Br.current)==null?void 0:xi.clientWidth);tr(Ei)},gr=()=>{ir(),ar(1)},oi=xi=>{ir(),lr(xi==null?void 0:xi.id),ar(3)},xr=xi=>{ir(),lr(xi==null?void 0:xi.id),ar(2)},mi=()=>{const xi=document.getElementsByClassName("btn-resize");xi[0].style.visibility="visible",tr(0),ar(0),lr(null)},Di=xi=>{ar(3),lr(xi),nn.page=1,tn(Aa({},nn)),br(nn)},zi=xi=>{ar(3),lr(xi),tn(Aa({},nn)),br(nn)},zo=xi=>{tn(Aa({},nn)),br(nn)},Vi=xi=>ps(void 0,null,function*(){(yield(0,ve.Rg)(Ge,{active:xi==null?void 0:xi.id})).status===0&&(br(nn),nr(Hn+1))}),Jo=xi=>ps(void 0,null,function*(){(yield(0,ve.rL)(Ge,{active:xi==null?void 0:xi.id})).status===0&&(br(nn),nr(Hn+1))}),co=xi=>ps(void 0,null,function*(){(yield(0,ve.de)(Ge,{active:xi==null?void 0:xi.id})).status===0&&(mi(),br(nn))}),Lo=xi=>{nn.page=xi,tn(Aa({},nn)),br(nn)},Ro=(xi,li)=>ps(void 0,null,function*(){var Ei,Oi,fi,So;const Mi=ur==null?void 0:ur.findIndex(Ai=>Ai.id===jn);if(console.log(Mi,li,22),li==="prev"){if(Mi===void 0){he.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Mi===0){if(nn.page===1){he.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(nn.page!==1){nn.page=nn.page-1,tn(Aa({},nn));const Ai=yield br(nn);if((Ai==null?void 0:Ai.status)===0){const lo=(fi=Ai==null?void 0:Ai.data)==null?void 0:fi.articles[((Oi=(Ei=Ai==null?void 0:Ai.data)==null?void 0:Ei.articles)==null?void 0:Oi.length)-1];lr(lo==null?void 0:lo.id),console.log(xi.target,555)}}}else{const Ai=ur[Mi-1];lr(Ai==null?void 0:Ai.id)}}if(li==="next"){if(Mi===void 0){he.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((nn.page-1)*nn.limit+(Mi+1)===nn.total){he.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Mi+1===nn.limit){nn.page=nn.page+1,tn(Aa({},nn));const Ai=yield br(nn);if((Ai==null?void 0:Ai.status)===0){const lo=(So=Ai==null?void 0:Ai.data)==null?void 0:So.articles[0];lr(lo==null?void 0:lo.id)}}else{const Ai=ur[Mi+1];lr(Ai==null?void 0:Ai.id)}}});return ne.createElement("div",{className:rt.wrap,ref:Br},ne.createElement("div",{className:rt.head},ne.createElement("div",{className:rt.sort,onClick:pi},ne.createElement("span",null,"\u6700\u65B0"),ne.createElement("aside",null,ne.createElement(fl.Z,{style:{color:(nn==null?void 0:nn.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),ne.createElement(To.Z,{style:{color:(nn==null?void 0:nn.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),ne.createElement(qe.default.Search,{value:nn.save_search,className:rt["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:xi=>{nn.save_search=xi.target.value,tn(Aa({},nn))},onSearch:Ki}),ne.createElement("div",{onClick:gr,className:rt.btn},ne.createElement("img",{src:ol}),"\u5199\u9898\u89E3")),ne.createElement("div",{className:rt.listWarp},ne.createElement(ae.Z,{spinning:mn,className:"mt20"},ur==null?void 0:ur.map((xi,li)=>{let Ei=!0;return li+1===ur.length&&li!==0&&(Ei=!1),ne.createElement(er,{active:jn,key:xi.id,data:xi,showLine:Ei,onClick:oi,onAssist:Vi,onHide:Jo})}),(ur==null?void 0:ur.length)===0&&ne.createElement(Fe.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),ne.createElement(Xt.Z,{className:rt.pagination,showTotal:xi=>ne.createElement("span",{style:{color:"#656F87"}},"\u5171",ne.createElement("span",{className:"c-light-primary"},xi),"\u6761\u6570\u636E"),total:nn.total,showSizeChanger:!1,current:nn==null?void 0:nn.page,onChange:Lo,hideOnSinglePage:!0,showQuickJumper:!0}),wi>0&&ne.createElement("div",{className:rt.fixedRight,style:{width:Dn}},wi===1&&ne.createElement(no,{identifier:Ge,onClose:mi,onOk:Di}),wi===2&&ne.createElement(no,{active:jn,identifier:Ge,onClose:mi,onOk:zi}),wi===3&&ne.createElement(dl,{btnShowStatus:pr,onArticlesSkip:Ro,detailsIndex:Hn,active:jn,identifier:Ge,onClose:mi,onOk:zo,onEdit:xr,onAssist:Vi,onDelete:co})))},al={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},cu=Object.defineProperty,Qc=Object.defineProperties,gc=Object.getOwnPropertyDescriptors,uu=Object.getOwnPropertySymbols,Ac=Object.prototype.hasOwnProperty,yc=Object.prototype.propertyIsEnumerable,Ic=(Ge,st,ht)=>st in Ge?cu(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,pl=(Ge,st)=>{for(var ht in st||(st={}))Ac.call(st,ht)&&Ic(Ge,ht,st[ht]);if(uu)for(var ht of uu(st))yc.call(st,ht)&&Ic(Ge,ht,st[ht]);return Ge},El=(Ge,st)=>Qc(Ge,gc(st)),Nl=(Ge,st,ht)=>new Promise((Yt,en)=>{var nn=_n=>{try{mn(ht.next(_n))}catch(Dn){en(Dn)}},tn=_n=>{try{mn(ht.throw(_n))}catch(Dn){en(Dn)}},mn=_n=>_n.done?Yt(_n.value):Promise.resolve(_n.value).then(nn,tn);mn((ht=ht.apply(Ge,st)).next())}),Qa=({visible:Ge,onVisible:st,value:ht,onChange:Yt,setIndex:en})=>{var nn;const tn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[mn,_n]=(0,ne.useState)(tn);const[Dn,tr]=(0,ne.useState)([]),[Hn,nr]=(0,ne.useState)([]),[jn,lr]=(0,ne.useState)(!1),ur=(0,ne.useRef)([]),qr=(0,ne.useRef)(null),pr=(0,Ce.useParams)();(0,ne.useEffect)(()=>(pr!=null&&pr.id&&(qr.current=setInterval(()=>{Yr(30)},3e4)),()=>{clearInterval(qr.current)}),[]);const Yr=ir=>Nl(void 0,null,function*(){const gr=yield(0,ve.uc)(pr==null?void 0:pr.id,{practice_time:ir})});(0,ne.useEffect)(()=>{br(mn),$n()},[]),(0,ne.useEffect)(()=>(window.addEventListener("click",ar),()=>{window.removeEventListener("click",ar)}),[pr==null?void 0:pr.save_identifier,Ge]),(0,ne.useEffect)(()=>{const ir=ur.current.findIndex(Di=>Di.identifier===(pr==null?void 0:pr.save_identifier)),gr=ur.current[ir-1],oi=ur.current[ir+1],xr=document.getElementById("oj-prev"),mi=document.getElementById("oj-next");gr?xr.style.display="block":xr.style.display="none",oi?mi.style.display="block":mi.style.display="none"},[pr==null?void 0:pr.save_identifier,ur.current]);const wi=(ir,gr)=>{if(ir.id===gr)return ir;for(let oi=0,xr=ir;xr=xr.parentNode;oi++){if(xr.id===gr)return xr;if(xr==document.documentElement)return!1}},ar=ir=>Nl(void 0,null,function*(){!wi(ir.target,"oj-drawer")&&Ge&&st(!1);const gr=ur.current.findIndex(mi=>mi.identifier===(pr==null?void 0:pr.save_identifier)),oi=ur.current[gr-1],xr=ur.current[gr+1];if(ir.target.id==="oj-prev"){if(!oi||gr===-1){he.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}ir.target.style.pointerEvents="none",ir.target.style.cursor="not-allowed",yield pi(oi==null?void 0:oi.identifier),en("0"),setTimeout(()=>{ir.target.style.pointerEvents="auto",ir.target.style.cursor="pointer"},400)}if(ir.target.id==="oj-next"||ir.target.id==="oj-modal-next"){if(!xr||gr===-1){he.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}ir.target.style.pointerEvents="none",ir.target.style.cursor="not-allowed",yield pi(xr==null?void 0:xr.identifier),en("0"),setTimeout(()=>{ir.target.style.pointerEvents="auto",ir.target.style.cursor="pointer"},400)}});(0,ne.useEffect)(()=>{Yt(pr==null?void 0:pr.save_identifier);const ir=Hn.findIndex(gr=>gr.some(oi=>oi.identifier===(pr==null?void 0:pr.save_identifier)));_n(ir===-1?El(pl({},mn),{page:1}):El(pl({},mn),{page:ir+1}))},[pr==null?void 0:pr.save_identifier,Hn]);const Br=ir=>{mn.page=1,mn.tag_discipline_id=ir,_n(pl({},mn)),br(mn)},$n=()=>Nl(void 0,null,function*(){const ir=yield(0,Tn.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});tr(ir.tag_disciplines||[])}),rr=ir=>{mn.page=1,mn.difficulty=typeof ir=="number"?ir:null,_n(pl({},mn)),br(mn)},br=ir=>Nl(void 0,null,function*(){var gr,oi;lr(!0);const xr=yield(0,ve.KC)(ir);if(xr!=null&&xr.practices_list){for(var mi=(gr=xr==null?void 0:xr.practices_list)==null?void 0:gr.length,Di=[],zi=0;zi<mi;zi+=mn==null?void 0:mn.per_page)Di.push((oi=xr==null?void 0:xr.practices_list)==null?void 0:oi.slice(zi,zi+(mn==null?void 0:mn.per_page)));_n(El(pl({},mn),{total:xr==null?void 0:xr.practices_count})),ur.current=(xr==null?void 0:xr.practices_list)||[],nr(Di)}lr(!1)}),pi=(ir,gr)=>Nl(void 0,null,function*(){const oi=yield(0,Tn.ZP)(`/api/practices/${ir}/start`,{method:"get"});(oi==null?void 0:oi.status)===0&&Ce.history.push(`/problems/${oi==null?void 0:oi.identifier}/oj/${ir}`)}),Ki=ir=>{mn.page=ir,_n(pl({},mn))};return ne.createElement("div",{className:al.wrap,id:"oj-drawer",style:{left:Ge?0:-700}},ne.createElement("div",{className:al.head},ne.createElement("div",{className:al.title},"\u9898\u76EE\u5217\u8868"),ne.createElement(qe.default.Search,{value:mn==null?void 0:mn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:ir=>{mn.save_search=ir.target.value,_n(pl({},mn))},onSearch:()=>{mn.page=1,mn.search=mn.save_search,_n(pl({},mn)),br(mn)}}),ne.createElement(se.default,{value:mn==null?void 0:mn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:ir=>ir.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:Br},Dn.map(ir=>ne.createElement(se.default.Option,{key:ir.id,value:ir.id},ir.name))),ne.createElement(se.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:ir=>ir.parentNode,value:mn==null?void 0:mn.difficulty,onChange:rr},ne.createElement(se.default.Option,{value:1},"\u7B80\u5355"),ne.createElement(se.default.Option,{value:2},"\u9002\u4E2D"),ne.createElement(se.default.Option,{value:3},"\u56F0\u96BE"))),ne.createElement("div",{className:al.content},ne.createElement(ae.Z,{spinning:jn},(nn=Hn==null?void 0:Hn[mn.page-1])==null?void 0:nn.map(ir=>ne.createElement("div",{key:ir.identifier,className:al.list,onClick:gr=>pi(ir.identifier,gr)},ne.createElement("i",{style:{visibility:ht===ir.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),ne.createElement("span",{style:{fontWeight:ht===ir.identifier?"bold":400,color:ht===ir.identifier?"#ffffff":"#bac4cd"},title:ir==null?void 0:ir.name},ir.name),(ir==null?void 0:ir.difficulty)===1&&ne.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(ir==null?void 0:ir.difficulty)===2&&ne.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(ir==null?void 0:ir.difficulty)===3&&ne.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),ne.createElement("div",{className:al.footer},ne.createElement(Xt.Z,{showTotal:ir=>ne.createElement("span",{style:{color:"#656F87"}},"\u5171",ne.createElement("span",{className:"c-light-primary"},ir),"\u6761\u6570\u636E"),total:mn.total,pageSize:mn==null?void 0:mn.per_page,current:mn==null?void 0:mn.page,showSizeChanger:!1,onChange:Ki,showQuickJumper:!0,hideOnSinglePage:!0})))},Ml=({hack:Ge,onTriggerPraise:st,topicId:ht,page:Yt,onPageChange:en,user:nn,submitRecords:tn,submitting:mn,submitResult:_n})=>{const[Dn]=(0,Ce.useSearchParams)(),tr=(0,Ce.useLocation)(),[Hn,nr]=(0,ne.useState)(Dn.get("tab")||"0"),[jn,lr]=(0,ne.useState)(0),[ur,qr]=(0,ne.useState)(0),[pr,Yr]=(0,ne.useState)(0),[wi,ar]=(0,ne.useState)(),[Br,$n]=(0,ne.useState)(!1);function rr(pi){const Ki=pi.target.id;if(Hn==="3"&&Ki!==Hn&&(ur===1||ur===2)){ce.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{nr(Ki)}});return}nr(Ki)}(0,ne.useEffect)(()=>mt.Z.subscribe("to-commit-info",()=>{nr("1")}),[]);function br(){nr("2")}return ne.createElement("div",{className:vt["left-panel"]},ne.createElement("ul",{className:`${vt["s-navs"]} ${vt["bg-white"]} ${vt.b1}`},ne.createElement("li",{className:"mr40 current"},ne.createElement("img",{onClick:()=>$n(!0),src:qt})),ne.createElement("li",{className:vt["oj-mr"]},ne.createElement("a",{className:Hn==="0"?vt.active:"",id:"0",onClick:rr},"\u4EFB\u52A1\u63CF\u8FF0")),ne.createElement("li",{className:vt["oj-mr"]},ne.createElement("a",{className:Hn==="3"?vt.active:"",id:"3",onClick:rr},"\u9898\u89E3",pr?`(${pr})`:"")),ne.createElement("li",{className:vt["oj-mr"]},ne.createElement("a",{className:Hn==="2"?vt.active:"",id:"2",onClick:rr},"\u8BC4\u8BBA",jn?`(${jn})`:"")),ne.createElement("li",null,ne.createElement("a",{className:Hn==="1"?vt.active:"",id:"1",onClick:rr},"\u63D0\u4EA4\u8BB0\u5F55"))),ne.createElement("div",{className:`${vt["tab-panel-body"]} ${Hn==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},ne.createElement(ot,{hack:Ge,onTriggerPraise:st,toDiscuss:br})),ne.createElement("div",{className:`${vt["tab-panel-body"]} ${Hn==="1"?"":"hide"}`},tn!=null&&tn.records_count?ne.createElement(Te,{page:Yt,onPageChange:en,topicId:ht,submitting:mn,submitRecords:tn,submitResult:_n}):ne.createElement(Fe.Z,null)),ne.createElement("div",{className:`${vt["tab-panel-body"]} ${Hn==="2"?"":"hide"}`,style:{padding:0}},ne.createElement(et,{setDiscussTotal:lr,user:nn,identifier:Ge.identifier,hack:Ge,onTriggerPraise:st})),ne.createElement("div",{className:`${vt["tab-panel-body"]} ${Hn==="3"?"":"hide"}`,style:{padding:0}},ne.createElement(Dc,{setListStatus:qr,setFilterListTotal:Yr,tabStatus:Hn,identifier:Ge.identifier})),ne.createElement(Qa,{visible:Br,setIndex:nr,onVisible:pi=>$n(pi),value:wi,onChange:pi=>ar(pi)}))},Vl=ee(4769),hu=ee(62522),Tc=ee(37532),Oc=ee(75752),ac=ee(78267),Gl=ee.n(ac),Iu=ee(56102),Ui=ee(59301),fu=Object.defineProperty,Bl=Object.defineProperties,pu=Object.getOwnPropertyDescriptors,el=Object.getOwnPropertySymbols,Yl=Object.prototype.hasOwnProperty,ml=Object.prototype.propertyIsEnumerable,Ls=(Ge,st,ht)=>st in Ge?fu(Ge,st,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[st]=ht,Fo=(Ge,st)=>{for(var ht in st||(st={}))Yl.call(st,ht)&&Ls(Ge,ht,st[ht]);if(el)for(var ht of el(st))ml.call(st,ht)&&Ls(Ge,ht,st[ht]);return Ge},Ia=(Ge,st)=>Bl(Ge,pu(st)),eu=(Ge,st)=>{var ht={};for(var Yt in Ge)Yl.call(Ge,Yt)&&st.indexOf(Yt)<0&&(ht[Yt]=Ge[Yt]);if(Ge!=null&&el)for(var Yt of el(Ge))st.indexOf(Yt)<0&&ml.call(Ge,Yt)&&(ht[Yt]=Ge[Yt]);return ht},Ds=(Ge,st,ht)=>new Promise((Yt,en)=>{var nn=_n=>{try{mn(ht.next(_n))}catch(Dn){en(Dn)}},tn=_n=>{try{mn(ht.throw(_n))}catch(Dn){en(Dn)}},mn=_n=>_n.done?Yt(_n.value):Promise.resolve(_n.value).then(nn,tn);mn((ht=ht.apply(Ge,st)).next())});const{Countdown:Tu}=fe.default,bs={Java:"java",C:"c",Python:"py","C++":"c"};var kl=(Ge=>(Ge[Ge.SET_LOADING=0]="SET_LOADING",Ge[Ge.GET_DATA=1]="GET_DATA",Ge[Ge.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",Ge[Ge.SET_DATA=3]="SET_DATA",Ge[Ge.SET_DEBUGING=4]="SET_DEBUGING",Ge[Ge.SET_SUBMITING=5]="SET_SUBMITING",Ge[Ge.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",Ge[Ge.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",Ge[Ge.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",Ge[Ge.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",Ge[Ge.SET_PAGE=10]="SET_PAGE",Ge[Ge.GET_LANGUAGE=11]="GET_LANGUAGE",Ge[Ge.GET_DRAWER=12]="GET_DRAWER",Ge))(kl||{});function bc(){return new Date().getTime()}const pt={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function bt(Ge,st){switch(st.type){case 1:return Fo(Fo({},Ge),st.payload);case 3:return Ia(Fo({},Ge),{data:st.payload});case 0:return Ia(Fo({},Ge),{loading:st.payload});case 11:return Ia(Fo({},Ge),{languageList:st.payload});case 12:return Ia(Fo({},Ge),{drawerData:st.payload});case 9:return Ia(Fo({},Ge),{showNote:st.payload});case 4:return Ia(Fo({},Ge),{debuging:st.payload});case 5:return Ia(Fo({},Ge),{submitting:st.payload});case 2:return Ia(Fo({},Ge),{submitRecords:st.payload});case 10:return Ia(Fo({},Ge),{submitRecordPage:st.payload});case 6:return Ia(Fo({},Ge),{executingMessage:st.payload});case 7:return Fo(Fo({},Ge),st.payload);case 8:return Fo(Fo({},Ge),st.payload);default:throw new Error}}var $t=({children:Ge})=>{var st,ht,Yt,en;const[nn,tn]=(0,ne.useReducer)(bt,pt),{id:mn}=(0,Ce.useParams)(),_n=(0,Ce.useLocation)(),[Dn]=(0,Ce.useSearchParams)(),{languageValue:tr,languageList:Hn,loading:nr,data:jn,debugResult:lr,submitResult:ur,submitRecords:qr,submitRecordPage:pr,showNote:Yr,debuging:wi,submitting:ar,executingMessage:Br}=nn,[$n,rr]=(0,ne.useState)("#FFF"),[br,pi]=(0,ne.useState)(null),[Ki,ir]=(0,ne.useState)({}),[gr,oi]=(0,ne.useState)(!1),xr=(0,ne.useRef)(null),mi=(0,ne.useRef)(null),Di=jn==null?void 0:jn.user,zi=jn==null?void 0:jn.hack;(0,ne.useEffect)(()=>((0,Ce.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Ce.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Ce.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Ce.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,ne.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,ne.useEffect)(()=>{var Gi;if(gr){const uo=document.getElementById("oj-next"),pa=document.getElementById("oj-modal-next");((Gi=uo==null?void 0:uo.style)==null?void 0:Gi.display)==="none"?pa.style.display="none":pa.style.display="block"}},[gr]),(0,ne.useEffect)(()=>{function Gi(){return Ds(this,null,function*(){var uo,pa,Po;const bo=yield(0,ve.fu)(mn);if(bo.status===401)document.location.href="/user/login";else{bo.hack=bo.practice,bo.hack.code=lt.Base64.decode((uo=bo==null?void 0:bo.hack)==null?void 0:uo.code);const os=`${Di==null?void 0:Di.login}-language`;localStorage.getItem(os)&&(bo.hack.language=localStorage.getItem(os)),mi.current=Gl().cloneDeep(bo),mi.current.language=(pa=bo==null?void 0:bo.hack)==null?void 0:pa.language,tn({type:1,payload:{loading:!1,data:bo}}),tn({type:8,payload:{languageValue:(Po=bo==null?void 0:bo.hack)==null?void 0:Po.language}})}})}mn&&Gi()},[mn]),(0,ne.useEffect)(()=>{tn({type:8,payload:{debugResult:void 0}}),Jo(),oi(!1)},[mn]),(0,ne.useEffect)(()=>{clearTimeout(xr.current)},[mn]),(0,ne.useEffect)(()=>{Vi()},[mn,pr]);const zo=()=>{window.parent.postMessage("backExercise","*")};function Vi(){return Ds(this,null,function*(){try{const Gi=yield(0,ve.zO)(mn,{limit:15,page:pr});tn({type:2,payload:Gi})}catch(Gi){console.log(Gi)}})}function Jo(){return Ds(this,null,function*(){try{const Gi=yield(0,ve.dd)(mn);tn({type:11,payload:Gi==null?void 0:Gi.data})}catch(Gi){console.log(Gi)}})}function co(Gi){tn({type:10,payload:Gi})}function Lo(Gi){return Ds(this,null,function*(){var uo,pa,Po;const bo=((Po=(pa=(uo=window==null?void 0:window.location)==null?void 0:uo.pathname)==null?void 0:pa.split("/"))==null?void 0:Po[2])||mn;return yield(0,ve.n4)(bo,Gi||{code:lt.Base64.encode(zi.code),language:tr})})}function Ro(){return Ds(this,null,function*(){var Gi;if(!zi.code||((Gi=zi.code)==null?void 0:Gi.trim())===""){he.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}if(!ar){tn({type:5,payload:!0});try{if(mt.Z.publish("to-commit-info"),(yield Lo()).status===0){let Tr=function(){return Ds(this,null,function*(){const{status:Eo,data:aa}=yield(0,ve.rX)(mn,"submit"),Zi=bc()-fo>(bo*os+3)*1e3;if(Eo!==0&&!Zi&&setTimeout(Tr,1e3),Zi){ce.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),tn({type:5,payload:!1});return}if(Eo===0){aa.status===2&&ce.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const $o=yield(0,ve.zO)(mn,{limit:15,page:pr});tn({type:8,payload:Ia(Fo({},nn),{submitResult:aa,submitting:!1,submitRecords:$o})}),(aa==null?void 0:aa.status)===0&&oi(!0)}})},pa={};const Po=yield(0,ve.bM)(mn,pa);if(Po.status===-1&&Dn.get("exercisesId")){window.parent.location.href=`/classrooms/${Dn.get("coursesId")}/exercise/${Dn.get("exercisesId")}/detail`;return}const{time_limit:bo,test_case_size:os}=zi,fo=bc();(Po==null?void 0:Po.status)>-1?Tr():tn({type:4,payload:!1})}}catch(uo){tn({type:5,payload:!1})}}})}function xi(){return Ds(this,null,function*(){var Gi;if(!zi.code||((Gi=zi.code)==null?void 0:Gi.trim())===""){he.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}nn.debuging=!0,tn({type:4,payload:!0});try{if((yield Lo()).status===0){let fo=function(){return Ds(this,null,function*(){const{status:Tr,message:Eo,data:aa}=yield(0,ve.rX)(mn,"debug"),Zi=bc()-os>(pa+3)*1e3;if(Tr!==0&&!Zi&&(tn({type:6,payload:Eo}),setTimeout(fo,1e3)),Zi){ce.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),tn({type:4,payload:!1});return}Tr===0&&(tn({type:4,payload:!1}),aa.status===2&&ce.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),tn({type:7,payload:Ia(Fo({},nn),{debugResult:aa,debuging:!1})}))})};const{time_limit:pa}=zi;let Po={input:encodeURIComponent(jn.test_case.input)};const bo=yield(0,ve.MU)(mn,Po);if(bo.status===-1&&Dn.get("exercisesId")){window.parent.location.href=`/classrooms/${Dn.get("coursesId")}/exercise/${Dn.get("exercisesId")}/detail`;return}const os=bc();(bo==null?void 0:bo.status)>-1?fo():tn({type:4,payload:!1})}else tn({type:4,payload:!1})}catch(uo){console.log(uo)}finally{}})}function li(Gi){var uo;clearTimeout(xr.current),xr.current=setTimeout(()=>{var pa;Lo({code:lt.Base64.encode(Gi),language:(pa=mi==null?void 0:mi.current)==null?void 0:pa.language})},2e3),tn({type:3,payload:Ia(Fo({},mi==null?void 0:mi.current),{hack:Ia(Fo({},(uo=mi==null?void 0:mi.current)==null?void 0:uo.hack),{code:Gi})})})}function Ei(Gi){let uo=Gi.target.value;tn({type:3,payload:Ia(Fo({},jn),{test_case:{input:uo}})})}const Oi=Gi=>Ds(void 0,null,function*(){var uo;if(tn({type:0,payload:!0}),(yield Lo()).status===0){tn({type:8,payload:{languageValue:Gi}}),mi.current.language=Gi;const Po=`${Di==null?void 0:Di.login}-language`;localStorage.setItem(Po,Gi);const bo=yield(0,ve.dd)(mn);if(bo.status===0){const os=(uo=bo==null?void 0:bo.data)==null?void 0:uo.find(fo=>fo.language===Gi);li(lt.Base64.decode(os.code))}setTimeout(()=>{tn({type:0,payload:!1})},300)}});function fi(){return Ds(this,null,function*(){try{const Gi=yield(0,ve.H7)(mn,{language:tr});Gi.status===401?Ce.history.replace("/login",{from:_n.pathname}):(li(lt.Base64.decode(Gi.code)),Jo())}catch(Gi){console.log(Gi)}})}function So(){ce.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Ui.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",Ui.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return Ds(this,null,function*(){const Gi=yield(0,ve.fi)(mn,{language:tr});Gi.status===401?Ce.history.replace("/login",{from:_n.pathname}):li(lt.Base64.decode(Gi.code))})}})}function Mi(){tn({type:9,payload:!0})}function Ai(){tn({type:9,payload:!1})}function lo(Gi){return Ds(this,null,function*(){yield(0,ve.MK)(mn,Gi),tn({type:1,payload:{showNote:!1,data:Ia(Fo({},jn),{hack:Ia(Fo({},zi),{notes:Gi.notes})})}})})}const yo={input:(st=jn==null?void 0:jn.test_case)==null?void 0:st.input,is_file:(ht=jn==null?void 0:jn.test_case)==null?void 0:ht.is_file,language:((Yt=mi.current)==null?void 0:Yt.language)||(zi==null?void 0:zi.language),code:zi==null?void 0:zi.code,title:"main."+bs[zi==null?void 0:zi.language],modify_code:zi==null?void 0:zi.modify_code,notes:zi==null?void 0:zi.notes,debugResult:lr,debuging:wi,submitting:ar,executingMessage:Br,id:mn,languageValue:tr,languageList:Hn,onChangeLanguage:Oi,onCancelNote:Ai,onAddNote:lo,showNote:Yr,onShowNote:Mi,onSubmitCode:Ro,onChangeCode:li,onChangeInput:Ei,onDebugCode:xi,onResetCode:fi,onSyncCode:So,onUpdateCode:Lo};function Ua(){return Ds(this,null,function*(){const{praise_count:Gi}=yield(0,ve.vl)(zi.id,{container_type:"Hack",type:1});let uo=Ia(Fo({},jn),{hack:Ia(Fo({},zi),{praises_count:Gi,user_praise:!zi.user_praise})});tn({type:3,payload:uo})})}const Ta={topicId:mn,submitResult:ur,submitRecords:qr,submitting:ar,page:pr,onPageChange:co,hack:zi,user:jn==null?void 0:jn.user,onTriggerPraise:Ua};return console.log(jn,mi==null?void 0:mi.current,"data--------"),Ui.createElement(Ui.Fragment,null,Ui.createElement(ae.Z,{className:"oj-custom-large-spin",size:"large",spinning:nr},jn?Ui.createElement("div",{className:"oj-custom-warp"},Ui.createElement("header",{className:ut.Z.header,style:{minWidth:1200}},Ui.createElement("div",null,Ui.createElement("img",{src:`${pe.Z.IMG_SERVER}/images/${Di.image_url}`,alt:"user",width:30}),Ui.createElement("span",null,Di.name)),Ui.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},Ui.createElement("div",null,zi.name),Ui.createElement(Vl.Z,{onChange:Gi=>{},className:"font12 c-grey-999"})),Ui.createElement(Iu.CopyToClipboard,{text:`${(en=window.location)==null?void 0:en.origin}/problems/${zi.identifier}/share`,onCopy:()=>he.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},Ui.createElement("span",{className:ut.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",Ui.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),zi.edit_privilege?Ui.createElement(Ce.Link,{className:ut.Z.btn_back,to:`/problems/${zi.identifier}/ojedit`,style:{marginRight:10}}," ",Ui.createElement(xe.Z,null)," \u7F16\u8F91"):null,Ui.createElement(Ce.Link,{className:ut.Z.btn_back,onClick:()=>{},to:"/problems"}," ",Ui.createElement(Me.Z,null),"\u9000\u51FA")),Ui.createElement(ue.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:Ui.createElement(Ml,Fo({},Ta)),rightChild:Ui.createElement(ln,Fo({},yo))})):null),Ui.createElement(ce.default,{centered:!0,closable:!1,width:680,footer:null,open:gr,className:"oj-modal"},Ui.createElement("section",{className:"oj-modal-content"},Ui.createElement("div",{className:"oj-modal-head"},Ui.createElement("img",{src:hu,alt:""}),Ui.createElement("i",{onClick:()=>oi(!1),className:"iconfont icon-guanbi1"})),Ui.createElement("aside",null,Ui.createElement("img",{className:"mr30",src:Oc.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",Ui.createElement("span",{style:{color:"#75d6ba",marginRight:100}},ur==null?void 0:ur.execute_time,"s"),"\u4F18\u4E8E",Ui.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(ur==null?void 0:ur.time_better_than)||100,"%"),"\u7684\u7528\u6237"),Ui.createElement("aside",{className:"mb50"},Ui.createElement("img",{src:Tc.Z,className:"mr30"}),Ui.createElement("span",{className:"oj-modal-tt"},Ui.createElement("span",null,Ui.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),Ui.createElement("span",{className:"c-light-primary"},ur==null?void 0:ur.execute_memory,"mb")),Ui.createElement("span",null,Ui.createElement("span",null))),"\u4F18\u4E8E",Ui.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(ur==null?void 0:ur.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),Ui.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Gt({languageValue:Ge,languageList:st,onChangeLanguage:ht,title:Yt,modify_code:en,onSyncCode:nn,onShowCodeSetting:tn,onResetCode:mn}){const _n=(0,Ce.useLocation)(),Dn=()=>{ce.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:Ui.createElement(oe.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:mn})};return Ui.createElement("div",{className:"action-bar"},Ui.createElement(se.default,{className:"oj-select",value:Ge,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:ht},st==null?void 0:st.map(tr=>Ui.createElement(se.default.Option,{key:tr.language,value:tr.language},tr.language))),Ui.createElement("span",null),Ui.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Dn},Ui.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),Ui.createElement("a",{onClick:tn},Ui.createElement("i",{className:"iconfont icon-shezhi"})))}function ln(Ge){var st=Ge,{id:ht,input:Yt,is_file:en,showNote:nn,onShowNote:tn,notes:mn,onCancelNote:_n,onAddNote:Dn,debugResult:tr,language:Hn,debuging:nr,submitting:jn,executingMessage:lr,code:ur,onSubmitCode:qr,onDebugCode:pr,onChangeCode:Yr,onChangeInput:wi,onUpdateCode:ar}=st,Br=eu(st,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function $n(br){return Ui.createElement(Gt,Ia(Fo({},Br),{onShowCodeSetting:br}))}const rr={id:ht,input:Yt,debugResult:tr,debuging:nr,is_file:en,submitting:jn,executingMessage:lr,onDebugCode:pr,onChangeCode:Yr,onSubmitCode:qr,onChangeInput:wi};return Ui.createElement("div",{className:"right-panel"},Ui.createElement(Ot,{onUpdateCode:()=>{},language:Hn,value:ur,onChange:Yr,ActionBarRender:$n}),Ui.createElement("div",{className:`note-form-area ${nn?"active":""}`},Ui.createElement(_t,{onCancel:_n,notes:mn,callback:Dn})),Ui.createElement(St.ZP,Fo({},rr)))}},99509:function(gn,kt,ee){"use strict";ee.d(kt,{h:function(){return ne}});var ne=(xe=>(xe[xe.NOMATCH=-1]="NOMATCH",xe[xe.OK=0]="OK",xe[xe.TIMEOUT=2]="TIMEOUT",xe[xe.PODFAILURE=3]="PODFAILURE",xe[xe.COMPILEFAILURE=4]="COMPILEFAILURE",xe[xe.EXECUTEFAILURE=5]="EXECUTEFAILURE",xe[xe.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",xe))(ne||{})},44188:function(gn,kt,ee){"use strict";ee.d(kt,{H7:function(){return se},KC:function(){return ge},M3:function(){return ze},MK:function(){return ae},MU:function(){return Ce},Rg:function(){return Ne},WH:function(){return ye},X6:function(){return he},bM:function(){return Me},bx:function(){return we},dd:function(){return pe},de:function(){return Se},fi:function(){return ve},fu:function(){return xe},gu:function(){return Be},n4:function(){return ue},qe:function(){return Le},rL:function(){return Re},rX:function(){return ce},uc:function(){return Ie},vl:function(){return oe},wO:function(){return $e},zO:function(){return fe}});var ne=ee(79769);function xe(Ae){return(0,ne.U2)(`mypractices/${Ae}.json`,{hidePopLogin:!0})}function Me(Ae,it){return(0,ne.v_)(`mypractices/${Ae}/code_submit.json`,it)}function Ce(Ae,it){return(0,ne.v_)(`mypractices/${Ae}/code_debug.json`,it)}function fe(Ae,it){return it.language&&(it.language=encodeURIComponent(it.language)),(0,ne.U2)(`mypractices/${Ae}/submit_records.json`,it)}function he(Ae){return(0,ne.U2)("mypractices/record_detail.json",{id:Ae})}function ce(Ae,it){return(0,ne.U2)(`mypractices/${Ae}/result.json`,{mode:it})}function ae(Ae,it){return(0,ne.v_)(`mypractices/${Ae}/add_notes.json`,it)}function se(Ae,it){return(0,ne.v_)(`mypractices/${Ae}/restore_initial_code.json`,it)}function ve(Ae,it){return(0,ne.v_)(`mypractices/${Ae}/sync_code.json`,it)}function ue(Ae,it){return(0,ne.v_)(`mypractices/${Ae}/update_code.json`,it)}function pe(Ae){return(0,ne.v_)(`mypractices/${Ae}/initial_codes.json`)}function oe(Ae,it){return(0,ne.v_)(`discusses/${Ae}/plus.json`,it)}function ge(Ae){return(0,ne.U2)("practices/practices_list.json",Ae)}function ye(Ae,it){return(0,ne.U2)(`practices/${Ae}/question_solution_articles`,it)}function we(Ae,it){return(0,ne.v_)(`practices/${Ae}/question_solution_articles`,it)}function Be(Ae,it){return(0,ne.gz)(`practices/${Ae}/question_solution_articles/${it==null?void 0:it.active}`,it)}function ze(Ae,it){return(0,ne.U2)(`practices/${Ae}/question_solution_articles/${it==null?void 0:it.active}/edit`,it)}function $e(Ae,it){return(0,ne.U2)(`practices/${Ae}/question_solution_articles/${it==null?void 0:it.active}`,it)}function Le(Ae,it){return(0,ne.v_)(`practices/${Ae}/question_solution_articles/${it==null?void 0:it.active}/set_authority_or_excellent`,it)}function Ne(Ae,it){return(0,ne.v_)(`practices/${Ae}/question_solution_articles/${it==null?void 0:it.active}/praise_or_treads`,it)}function Re(Ae,it){return(0,ne.v_)(`practices/${Ae}/question_solution_articles/${it==null?void 0:it.active}/hide`)}function Se(Ae,it){return(0,ne.IV)(`practices/${Ae}/question_solution_articles/${it==null?void 0:it.active}`,it)}function Ie(Ae,it){return(0,ne.v_)(`mypractices/${Ae}/update_practice_time_sum`,it)}},66115:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return oe}});var ne=ee(59301),xe=ee(8591),Me=ee(6848),Ce=ee(71418),fe=ee(95237),he=ee(43604),ce=ee(58421),ae=ee(3113),se=ee(40973),ve=ee(79769),ue=ee(39655),pe=(ye,we,Be)=>new Promise((ze,$e)=>{var Le=Se=>{try{Re(Be.next(Se))}catch(Ie){$e(Ie)}},Ne=Se=>{try{Re(Be.throw(Se))}catch(Ie){$e(Ie)}},Re=Se=>Se.done?ze(Se.value):Promise.resolve(Se.value).then(Le,Ne);Re((Be=Be.apply(ye,we)).next())}),oe=({id:ye,activeDiscussIndex:we,onReplyDiscuss:Be,adminOrOperator:ze})=>{const[$e,Le]=(0,ne.useState)(""),[Ne,Re]=(0,ne.useState)(!1);function Se(Ae){Le(Ae)}function Ie(){if(!$e){xe.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}Be(ye,$e),Le("")}return(0,ne.useEffect)(()=>{we!=ye&&Re(!1)},[we]),ne.createElement("div",{key:ye,className:"discuss-item-editor",style:{display:we===ye?"block":"none",width:"100%"}},ne.createElement(se.Z,{miniToolbar:!0,startInit:we===ye,defaultValue:$e,id:ye,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:Se,extraUse:ze&&ne.createElement(Me.Z,{color:"#fff",open:Ne,destroyTooltipOnHide:!0,title:ge({id:ye,isOpen:Ne,activeDiscussIndex:we,onChange:Se,setIsOpen:Re}),overlayStyle:{maxWidth:600}},ne.createElement("a",{title:Ne?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>Re(!Ne)},ne.createElement("i",{className:"iconfont icon-dianzan11"})))}),ne.createElement("a",{onClick:Ie,className:"btn-send"},"\u53D1\u9001"))};const ge=ye=>{const[we,Be]=(0,ne.useState)(!1),[ze,$e]=(0,ne.useState)([]),[Le,Ne]=(0,ne.useState)(1);(0,ne.useEffect)(()=>{ye!=null&&ye.isOpen?Re():(Ne(1),$e([]))},[ye==null?void 0:ye.isOpen]);const Re=()=>pe(void 0,null,function*(){Be(!0);const Se=yield(0,ve.ZP)(`/api/discusses/${ye==null?void 0:ye.id}/recommend_answer.json`,{method:"get"});(Se==null?void 0:Se.status)==0&&$e(Se==null?void 0:Se.answer),Be(!1)});return ne.createElement(Ce.Z,{spinning:we},ne.createElement("div",{style:{color:"#000"}},ne.createElement(ue.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(ze==null?void 0:ze[Le-1])||""}),ne.createElement(fe.Z,{justify:"end",align:"middle"},ne.createElement(he.Z,null,ne.createElement(ce.Z,{simple:!0,current:Le,pageSize:1,total:(ze==null?void 0:ze.length)||0,onChange:Se=>{Ne(Se)}})),ne.createElement(he.Z,null,ne.createElement(ae.ZP,{onClick:()=>pe(void 0,null,function*(){ye==null||ye.onChange(ze==null?void 0:ze[Le-1]),ye==null||ye.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},1427:function(gn,kt,ee){"use strict";ee.d(kt,{BU:function(){return xe},Dj:function(){return ne},gH:function(){return Me},vp:function(){return Ce}});function ne(fe){try{fe.mozRequestFullScreen?fe.mozRequestFullScreen():fe.webkitRequestFullScreen&&fe.webkitRequestFullScreen()}catch(he){console.log(he,":e")}}function xe(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const Me=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function Ce(){var fe=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,he=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",fe),window.isFullScreen?window.isFullScreen:fe!=null}},13357:function(gn,kt,ee){"use strict";ee.d(kt,{G:function(){return fe},t:function(){return Ce}});var ne=ee(7062),xe=ee.n(ne);const Me=null;function Ce(he,ce){let ae=xe().get("__ec");ae||(ae={}),ae[he]=ce,xe().set("__ec",ae)}function fe(he,ce){let ae=xe().get("__ec");return ae?ae[he]===void 0?ce:ae[he]:ce}},9667:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Hr}});class ne{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(Ee,je){return Ee.__proto__=je,Ee},Object.assign=Object.assign||function(Ee){if(Ee==null)throw new TypeError("Cannot convert undefined or null to object");let je=Object(Ee);for(let Oe=1;Oe<arguments.length;Oe++){let De=arguments[Oe];if(De!=null)for(let Ke in De)De.hasOwnProperty(Ke)&&(je[Ke]=De[Ke])}return je},typeof self.Promise!="function"&&ee(3867).polyfill()}}ne.install();var xe=ne,Me=ee(86204),Ce=ee.n(Me);class fe{static e(Ee,je){(!Ee||fe.FORCE_GLOBAL_TAG)&&(Ee=fe.GLOBAL_TAG);let Oe=`[${Ee}] > ${je}`;fe.ENABLE_CALLBACK&&fe.emitter.emit("log","error",Oe),fe.ENABLE_ERROR&&(console.error?console.error(Oe):console.warn?console.warn(Oe):console.log(Oe))}static i(Ee,je){(!Ee||fe.FORCE_GLOBAL_TAG)&&(Ee=fe.GLOBAL_TAG);let Oe=`[${Ee}] > ${je}`;fe.ENABLE_CALLBACK&&fe.emitter.emit("log","info",Oe),fe.ENABLE_INFO&&(console.info?console.info(Oe):console.log(Oe))}static w(Ee,je){(!Ee||fe.FORCE_GLOBAL_TAG)&&(Ee=fe.GLOBAL_TAG);let Oe=`[${Ee}] > ${je}`;fe.ENABLE_CALLBACK&&fe.emitter.emit("log","warn",Oe),fe.ENABLE_WARN&&(console.warn?console.warn(Oe):console.log(Oe))}static d(Ee,je){(!Ee||fe.FORCE_GLOBAL_TAG)&&(Ee=fe.GLOBAL_TAG);let Oe=`[${Ee}] > ${je}`;fe.ENABLE_CALLBACK&&fe.emitter.emit("log","debug",Oe),fe.ENABLE_DEBUG&&(console.debug?console.debug(Oe):console.log(Oe))}static v(Ee,je){(!Ee||fe.FORCE_GLOBAL_TAG)&&(Ee=fe.GLOBAL_TAG);let Oe=`[${Ee}] > ${je}`;fe.ENABLE_CALLBACK&&fe.emitter.emit("log","verbose",Oe),fe.ENABLE_VERBOSE&&console.log(Oe)}}fe.GLOBAL_TAG="flv.js",fe.FORCE_GLOBAL_TAG=!1,fe.ENABLE_ERROR=!0,fe.ENABLE_INFO=!0,fe.ENABLE_WARN=!0,fe.ENABLE_DEBUG=!0,fe.ENABLE_VERBOSE=!0,fe.ENABLE_CALLBACK=!1,fe.emitter=new(Ce());var he=fe;class ce{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(Ee){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=Ee,this._totalBytes+=Ee):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=Ee,this._totalBytes+=Ee):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=Ee,this._totalBytes+=Ee,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let Ee=(this._now()-this._lastCheckpoint)/1e3;return Ee==0&&(Ee=1),this._intervalBytes/Ee/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let Ee=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/Ee/1024}}var ae=ce;class se{constructor(Ee){this._message=Ee}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class ve extends se{constructor(Ee){super(Ee)}get name(){return"IllegalStateException"}}class ue extends se{constructor(Ee){super(Ee)}get name(){return"InvalidArgumentException"}}class pe extends se{constructor(Ee){super(Ee)}get name(){return"NotImplementedException"}}const oe={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},ge={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class ye{constructor(Ee){this._type=Ee||"undefined",this._status=oe.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=oe.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===oe.kConnecting||this._status===oe.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(Ee){this._onContentLengthKnown=Ee}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(Ee){this._onURLRedirect=Ee}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ee){this._onDataArrival=Ee}get onError(){return this._onError}set onError(Ee){this._onError=Ee}get onComplete(){return this._onComplete}set onComplete(Ee){this._onComplete=Ee}open(Ee,je){throw new pe("Unimplemented abstract function!")}abort(){throw new pe("Unimplemented abstract function!")}}let we={};function Be(){let Cn=self.navigator.userAgent.toLowerCase(),Ee=/(edge)\/([\w.]+)/.exec(Cn)||/(opr)[\/]([\w.]+)/.exec(Cn)||/(chrome)[ \/]([\w.]+)/.exec(Cn)||/(iemobile)[\/]([\w.]+)/.exec(Cn)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Cn)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Cn)||/(webkit)[ \/]([\w.]+)/.exec(Cn)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Cn)||/(msie) ([\w.]+)/.exec(Cn)||Cn.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Cn)||Cn.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Cn)||[],je=/(ipad)/.exec(Cn)||/(ipod)/.exec(Cn)||/(windows phone)/.exec(Cn)||/(iphone)/.exec(Cn)||/(kindle)/.exec(Cn)||/(android)/.exec(Cn)||/(windows)/.exec(Cn)||/(mac)/.exec(Cn)||/(linux)/.exec(Cn)||/(cros)/.exec(Cn)||[],Oe={browser:Ee[5]||Ee[3]||Ee[1]||"",version:Ee[2]||Ee[4]||"0",majorVersion:Ee[4]||Ee[2]||"0",platform:je[0]||""},De={};if(Oe.browser){De[Oe.browser]=!0;let Ke=Oe.majorVersion.split(".");De.version={major:parseInt(Oe.majorVersion,10),string:Oe.version},Ke.length>1&&(De.version.minor=parseInt(Ke[1],10)),Ke.length>2&&(De.version.build=parseInt(Ke[2],10))}if(Oe.platform&&(De[Oe.platform]=!0),(De.chrome||De.opr||De.safari)&&(De.webkit=!0),De.rv||De.iemobile){De.rv&&delete De.rv;let Ke="msie";Oe.browser=Ke,De[Ke]=!0}if(De.edge){delete De.edge;let Ke="msedge";Oe.browser=Ke,De[Ke]=!0}if(De.opr){let Ke="opera";Oe.browser=Ke,De[Ke]=!0}if(De.safari&&De.android){let Ke="android";Oe.browser=Ke,De[Ke]=!0}De.name=Oe.browser,De.platform=Oe.platform;for(let Ke in we)we.hasOwnProperty(Ke)&&delete we[Ke];Object.assign(we,De)}Be();var ze=we;class $e extends ye{static isSupported(){try{let Ee=ze.msedge&&ze.version.minor>=15048,je=ze.msedge?Ee:!0;return self.fetch&&self.ReadableStream&&je}catch(Ee){return!1}}constructor(Ee,je){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=Ee,this._config=je,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(Ee,je){this._dataSource=Ee,this._range=je;let Oe=Ee.url;this._config.reuseRedirectedURL&&Ee.redirectedURL!=null&&(Oe=Ee.redirectedURL);let De=this._seekHandler.getConfig(Oe,je),Ke=new self.Headers;if(typeof De.headers=="object"){let rt=De.headers;for(let Dt in rt)rt.hasOwnProperty(Dt)&&Ke.append(Dt,rt[Dt])}let et={method:"GET",headers:Ke,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let rt in this._config.headers)Ke.append(rt,this._config.headers[rt]);Ee.cors===!1&&(et.mode="same-origin"),Ee.withCredentials&&(et.credentials="include"),Ee.referrerPolicy&&(et.referrerPolicy=Ee.referrerPolicy),this._status=oe.kConnecting,self.fetch(De.url,et).then(rt=>{if(this._requestAbort){this._requestAbort=!1,this._status=oe.kIdle;return}if(rt.ok&&rt.status>=200&&rt.status<=299){if(rt.url!==De.url&&this._onURLRedirect){let Ft=this._seekHandler.removeURLParameters(rt.url);this._onURLRedirect(Ft)}let Dt=rt.headers.get("Content-Length");return Dt!=null&&(this._contentLength=parseInt(Dt),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,rt.body.getReader())}else if(this._status=oe.kError,this._onError)this._onError(ge.HTTP_STATUS_CODE_INVALID,{code:rt.status,msg:rt.statusText});else throw new se("FetchStreamLoader: Http code invalid, "+rt.status+" "+rt.statusText)}).catch(rt=>{if(this._status=oe.kError,this._onError)this._onError(ge.EXCEPTION,{code:-1,msg:rt.message});else throw rt})}abort(){this._requestAbort=!0}_pump(Ee){return Ee.read().then(je=>{if(je.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=oe.kError;let Oe=ge.EARLY_EOF,De={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(Oe,De);else throw new se(De.msg)}else this._status=oe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1);else{if(this._requestAbort===!0)return this._requestAbort=!1,this._status=oe.kComplete,Ee.cancel();this._status=oe.kBuffering;let Oe=je.value.buffer,De=this._range.from+this._receivedLength;this._receivedLength+=Oe.byteLength,this._onDataArrival&&this._onDataArrival(Oe,De,this._receivedLength),this._pump(Ee)}}).catch(je=>{if(je.code===11&&ze.msedge)return;this._status=oe.kError;let Oe=0,De=null;if((je.code===19||je.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(Oe=ge.EARLY_EOF,De={code:je.code,msg:"Fetch stream meet Early-EOF"}):(Oe=ge.EXCEPTION,De={code:je.code,msg:je.message}),this._onError)this._onError(Oe,De);else throw new se(De.msg)})}}var Le=$e;class Ne extends ye{static isSupported(){try{let Ee=new XMLHttpRequest;return Ee.open("GET","https://example.com",!0),Ee.responseType="moz-chunked-arraybuffer",Ee.responseType==="moz-chunked-arraybuffer"}catch(Ee){return he.w("MozChunkedLoader",Ee.message),!1}}constructor(Ee,je){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=Ee,this._config=je,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(Ee,je){this._dataSource=Ee,this._range=je;let Oe=Ee.url;this._config.reuseRedirectedURL&&Ee.redirectedURL!=null&&(Oe=Ee.redirectedURL);let De=this._seekHandler.getConfig(Oe,je);this._requestURL=De.url;let Ke=this._xhr=new XMLHttpRequest;if(Ke.open("GET",De.url,!0),Ke.responseType="moz-chunked-arraybuffer",Ke.onreadystatechange=this._onReadyStateChange.bind(this),Ke.onprogress=this._onProgress.bind(this),Ke.onloadend=this._onLoadEnd.bind(this),Ke.onerror=this._onXhrError.bind(this),Ee.withCredentials&&(Ke.withCredentials=!0),typeof De.headers=="object"){let et=De.headers;for(let rt in et)et.hasOwnProperty(rt)&&Ke.setRequestHeader(rt,et[rt])}if(typeof this._config.headers=="object"){let et=this._config.headers;for(let rt in et)et.hasOwnProperty(rt)&&Ke.setRequestHeader(rt,et[rt])}this._status=oe.kConnecting,Ke.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=oe.kComplete}_onReadyStateChange(Ee){let je=Ee.target;if(je.readyState===2){if(je.responseURL!=null&&je.responseURL!==this._requestURL&&this._onURLRedirect){let Oe=this._seekHandler.removeURLParameters(je.responseURL);this._onURLRedirect(Oe)}if(je.status!==0&&(je.status<200||je.status>299))if(this._status=oe.kError,this._onError)this._onError(ge.HTTP_STATUS_CODE_INVALID,{code:je.status,msg:je.statusText});else throw new se("MozChunkedLoader: Http code invalid, "+je.status+" "+je.statusText);else this._status=oe.kBuffering}}_onProgress(Ee){if(this._status===oe.kError)return;this._contentLength===null&&Ee.total!==null&&Ee.total!==0&&(this._contentLength=Ee.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let je=Ee.target.response,Oe=this._range.from+this._receivedLength;this._receivedLength+=je.byteLength,this._onDataArrival&&this._onDataArrival(je,Oe,this._receivedLength)}_onLoadEnd(Ee){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===oe.kError)return;this._status=oe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(Ee){this._status=oe.kError;let je=0,Oe=null;if(this._contentLength&&Ee.loaded<this._contentLength?(je=ge.EARLY_EOF,Oe={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(je=ge.EXCEPTION,Oe={code:-1,msg:Ee.constructor.name+" "+Ee.type}),this._onError)this._onError(je,Oe);else throw new se(Oe.msg)}}var Re=Ne;class Se extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let Ee=new XMLHttpRequest;return Ee.open("GET","https://example.com",!0),Ee.responseType="ms-stream",Ee.responseType==="ms-stream"}catch(Ee){return Log.w("MSStreamLoader",Ee.message),!1}}constructor(Ee,je){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=Ee,this._config=je,this._needStash=!0,this._xhr=null,this._reader=null,this._totalRange=null,this._currentRange=null,this._currentRequestURL=null,this._currentRedirectedURL=null,this._contentLength=null,this._receivedLength=0,this._bufferLimit=16*1024*1024,this._lastTimeBufferSize=0,this._isReconnecting=!1}destroy(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),super.destroy()}open(Ee,je){this._internalOpen(Ee,je,!1)}_internalOpen(Ee,je,Oe){this._dataSource=Ee,Oe?this._currentRange=je:this._totalRange=je;let De=Ee.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?De=this._currentRedirectedURL:Ee.redirectedURL!=null&&(De=Ee.redirectedURL));let Ke=this._seekHandler.getConfig(De,je);this._currentRequestURL=Ke.url;let et=this._reader=new self.MSStreamReader;et.onprogress=this._msrOnProgress.bind(this),et.onload=this._msrOnLoad.bind(this),et.onerror=this._msrOnError.bind(this);let rt=this._xhr=new XMLHttpRequest;if(rt.open("GET",Ke.url,!0),rt.responseType="ms-stream",rt.onreadystatechange=this._xhrOnReadyStateChange.bind(this),rt.onerror=this._xhrOnError.bind(this),Ee.withCredentials&&(rt.withCredentials=!0),typeof Ke.headers=="object"){let Dt=Ke.headers;for(let Ft in Dt)Dt.hasOwnProperty(Ft)&&rt.setRequestHeader(Ft,Dt[Ft])}if(typeof this._config.headers=="object"){let Dt=this._config.headers;for(let Ft in Dt)Dt.hasOwnProperty(Ft)&&rt.setRequestHeader(Ft,Dt[Ft])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,rt.send()}abort(){this._internalAbort(),this._status=LoaderStatus.kComplete}_internalAbort(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}_xhrOnReadyStateChange(Ee){let je=Ee.target;if(je.readyState===2)if(je.status>=200&&je.status<=299){if(this._status=LoaderStatus.kBuffering,je.responseURL!=null){let De=this._seekHandler.removeURLParameters(je.responseURL);je.responseURL!==this._currentRequestURL&&De!==this._currentRedirectedURL&&(this._currentRedirectedURL=De,this._onURLRedirect&&this._onURLRedirect(De))}let Oe=je.getResponseHeader("Content-Length");if(Oe!=null&&this._contentLength==null){let De=parseInt(Oe);De>0&&(this._contentLength=De,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:je.status,msg:je.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+je.status+" "+je.statusText);else if(je.readyState===3&&je.status>=200&&je.status<=299){this._status=LoaderStatus.kBuffering;let Oe=je.response;this._reader.readAsArrayBuffer(Oe)}}_xhrOnError(Ee){this._status=LoaderStatus.kError;let je=LoaderErrors.EXCEPTION,Oe={code:-1,msg:Ee.constructor.name+" "+Ee.type};if(this._onError)this._onError(je,Oe);else throw new RuntimeException(Oe.msg)}_msrOnProgress(Ee){let Oe=Ee.target.result;if(Oe==null){this._doReconnectIfNeeded();return}let De=Oe.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Oe.byteLength;let Ke=this._totalRange.from+this._receivedLength;this._receivedLength+=De.byteLength,this._onDataArrival&&this._onDataArrival(De,Ke,this._receivedLength),Oe.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${Ke+De.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let Ee={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,Ee,!0)}}_msrOnLoad(Ee){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(Ee){this._status=LoaderStatus.kError;let je=0,Oe=null;if(this._contentLength&&this._receivedLength<this._contentLength?(je=LoaderErrors.EARLY_EOF,Oe={code:-1,msg:"MSStream meet Early-Eof"}):(je=LoaderErrors.EARLY_EOF,Oe={code:-1,msg:Ee.constructor.name+" "+Ee.type}),this._onError)this._onError(je,Oe);else throw new RuntimeException(Oe.msg)}}var Ie=null;class Ae extends ye{static isSupported(){try{let Ee=new XMLHttpRequest;return Ee.open("GET","https://example.com",!0),Ee.responseType="arraybuffer",Ee.responseType==="arraybuffer"}catch(Ee){return he.w("RangeLoader",Ee.message),!1}}constructor(Ee,je){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=Ee,this._config=je,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new ae,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(Ee,je){this._dataSource=Ee,this._range=je,this._status=oe.kConnecting;let Oe=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Oe=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Oe?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let Ee=this._currentChunkSizeKB*1024,je=this._range.from+this._receivedLength,Oe=je+Ee;this._contentLength!=null&&Oe-this._range.from>=this._contentLength&&(Oe=this._range.from+this._contentLength-1),this._currentRequestRange={from:je,to:Oe},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(Ee,je){this._lastTimeLoaded=0;let Oe=Ee.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Oe=this._currentRedirectedURL:Ee.redirectedURL!=null&&(Oe=Ee.redirectedURL));let De=this._seekHandler.getConfig(Oe,je);this._currentRequestURL=De.url;let Ke=this._xhr=new XMLHttpRequest;if(Ke.open("GET",De.url,!0),Ke.responseType="arraybuffer",Ke.onreadystatechange=this._onReadyStateChange.bind(this),Ke.onprogress=this._onProgress.bind(this),Ke.onload=this._onLoad.bind(this),Ke.onerror=this._onXhrError.bind(this),Ee.withCredentials&&(Ke.withCredentials=!0),typeof De.headers=="object"){let et=De.headers;for(let rt in et)et.hasOwnProperty(rt)&&Ke.setRequestHeader(rt,et[rt])}if(typeof this._config.headers=="object"){let et=this._config.headers;for(let rt in et)et.hasOwnProperty(rt)&&Ke.setRequestHeader(rt,et[rt])}Ke.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=oe.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(Ee){let je=Ee.target;if(je.readyState===2){if(je.responseURL!=null){let Oe=this._seekHandler.removeURLParameters(je.responseURL);je.responseURL!==this._currentRequestURL&&Oe!==this._currentRedirectedURL&&(this._currentRedirectedURL=Oe,this._onURLRedirect&&this._onURLRedirect(Oe))}if(je.status>=200&&je.status<=299){if(this._waitForTotalLength)return;this._status=oe.kBuffering}else if(this._status=oe.kError,this._onError)this._onError(ge.HTTP_STATUS_CODE_INVALID,{code:je.status,msg:je.statusText});else throw new se("RangeLoader: Http code invalid, "+je.status+" "+je.statusText)}}_onProgress(Ee){if(this._status===oe.kError)return;if(this._contentLength===null){let Oe=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,Oe=!0;let De=Ee.total;this._internalAbort(),De!=null&De!==0&&(this._totalLength=De)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,Oe){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let je=Ee.loaded-this._lastTimeLoaded;this._lastTimeLoaded=Ee.loaded,this._speedSampler.addBytes(je)}_normalizeSpeed(Ee){let je=this._chunkSizeKBList,Oe=je.length-1,De=0,Ke=0,et=Oe;if(Ee<je[0])return je[0];for(;Ke<=et;){if(De=Ke+Math.floor((et-Ke)/2),De===Oe||Ee>=je[De]&&Ee<je[De+1])return je[De];je[De]<Ee?Ke=De+1:et=De-1}}_onLoad(Ee){if(this._status===oe.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let je=this._speedSampler.lastSecondKBps;if(je===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(je=this._speedSampler.currentKBps)),je!==0){let et=this._normalizeSpeed(je);this._currentSpeedNormalized!==et&&(this._currentSpeedNormalized=et,this._currentChunkSizeKB=et)}let Oe=Ee.target.response,De=this._range.from+this._receivedLength;this._receivedLength+=Oe.byteLength;let Ke=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():Ke=!0,this._onDataArrival&&this._onDataArrival(Oe,De,this._receivedLength),Ke&&(this._status=oe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(Ee){this._status=oe.kError;let je=0,Oe=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(je=ge.EARLY_EOF,Oe={code:-1,msg:"RangeLoader meet Early-Eof"}):(je=ge.EXCEPTION,Oe={code:-1,msg:Ee.constructor.name+" "+Ee.type}),this._onError)this._onError(je,Oe);else throw new se(Oe.msg)}}var it=Ae;class Ue extends ye{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(Ee){return!1}}constructor(){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(Ee){try{let je=this._ws=new self.WebSocket(Ee.url);je.binaryType="arraybuffer",je.onopen=this._onWebSocketOpen.bind(this),je.onclose=this._onWebSocketClose.bind(this),je.onmessage=this._onWebSocketMessage.bind(this),je.onerror=this._onWebSocketError.bind(this),this._status=oe.kConnecting}catch(je){this._status=oe.kError;let Oe={code:je.code,msg:je.message};if(this._onError)this._onError(ge.EXCEPTION,Oe);else throw new se(Oe.msg)}}abort(){let Ee=this._ws;Ee&&(Ee.readyState===0||Ee.readyState===1)&&(this._requestAbort=!0,Ee.close()),this._ws=null,this._status=oe.kComplete}_onWebSocketOpen(Ee){this._status=oe.kBuffering}_onWebSocketClose(Ee){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=oe.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(Ee){if(Ee.data instanceof ArrayBuffer)this._dispatchArrayBuffer(Ee.data);else if(Ee.data instanceof Blob){let je=new FileReader;je.onload=()=>{this._dispatchArrayBuffer(je.result)},je.readAsArrayBuffer(Ee.data)}else{this._status=oe.kError;let je={code:-1,msg:"Unsupported WebSocket message type: "+Ee.data.constructor.name};if(this._onError)this._onError(ge.EXCEPTION,je);else throw new se(je.msg)}}_dispatchArrayBuffer(Ee){let je=Ee,Oe=this._receivedLength;this._receivedLength+=je.byteLength,this._onDataArrival&&this._onDataArrival(je,Oe,this._receivedLength)}_onWebSocketError(Ee){this._status=oe.kError;let je={code:Ee.code,msg:Ee.message};if(this._onError)this._onError(ge.EXCEPTION,je);else throw new se(je.msg)}}var gt=Ue;class Ve{constructor(Ee){this._zeroStart=Ee||!1}getConfig(Ee,je){let Oe={};if(je.from!==0||je.to!==-1){let De;je.to!==-1?De=`bytes=${je.from.toString()}-${je.to.toString()}`:De=`bytes=${je.from.toString()}-`,Oe.Range=De}else this._zeroStart&&(Oe.Range="bytes=0-");return{url:Ee,headers:Oe}}removeURLParameters(Ee){return Ee}}var Tt=Ve;class ct{constructor(Ee,je){this._startName=Ee,this._endName=je}getConfig(Ee,je){let Oe=Ee;if(je.from!==0||je.to!==-1){let De=!0;Oe.indexOf("?")===-1&&(Oe+="?",De=!1),De&&(Oe+="&"),Oe+=`${this._startName}=${je.from.toString()}`,je.to!==-1&&(Oe+=`&${this._endName}=${je.to.toString()}`)}return{url:Oe,headers:{}}}removeURLParameters(Ee){let je=Ee.split("?")[0],Oe,De=Ee.indexOf("?");De!==-1&&(Oe=Ee.substring(De+1));let Ke="";if(Oe!=null&&Oe.length>0){let et=Oe.split("&");for(let rt=0;rt<et.length;rt++){let Dt=et[rt].split("="),Ft=rt>0;Dt[0]!==this._startName&&Dt[0]!==this._endName&&(Ft&&(Ke+="&"),Ke+=et[rt])}}return Ke.length===0?je:je+"?"+Ke}}var Ot=ct;class We{constructor(Ee,je,Oe){this.TAG="IOController",this._config=je,this._extraData=Oe,this._stashInitialSize=1024*384,je.stashInitialSize!=null&&je.stashInitialSize>0&&(this._stashInitialSize=je.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,je.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=Ee,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(Ee.url),this._refTotalLength=Ee.filesize?Ee.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new ae,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(Ee){this._extraData=Ee}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ee){this._onDataArrival=Ee}get onSeeked(){return this._onSeeked}set onSeeked(Ee){this._onSeeked=Ee}get onError(){return this._onError}set onError(Ee){this._onError=Ee}get onComplete(){return this._onComplete}set onComplete(Ee){this._onComplete=Ee}get onRedirect(){return this._onRedirect}set onRedirect(Ee){this._onRedirect=Ee}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(Ee){this._onRecoveredEarlyEof=Ee}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===it?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let Ee=this._config;if(Ee.seekType==="range")this._seekHandler=new Tt(this._config.rangeLoadZeroStart);else if(Ee.seekType==="param"){let je=Ee.seekParamStart||"bstart",Oe=Ee.seekParamEnd||"bend";this._seekHandler=new Ot(je,Oe)}else if(Ee.seekType==="custom"){if(typeof Ee.customSeekHandler!="function")throw new ue("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new Ee.customSeekHandler}else throw new ue(`Invalid seekType in config: ${Ee.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=gt;else if(Le.isSupported())this._loaderClass=Le;else if(Re.isSupported())this._loaderClass=Re;else if(it.isSupported())this._loaderClass=it;else throw new se("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(Ee){this._currentRange={from:0,to:-1},Ee&&(this._currentRange.from=Ee),this._speedSampler.reset(),Ee||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let Ee=this._resumeFrom;this._resumeFrom=0,this._internalSeek(Ee,!0)}}seek(Ee){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(Ee,!0)}_internalSeek(Ee,je){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(je),this._loader.destroy(),this._loader=null;let Oe={from:Ee,to:-1};this._currentRange={from:Oe.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,Oe),this._onSeeked&&this._onSeeked()}updateUrl(Ee){if(!Ee||typeof Ee!="string"||Ee.length===0)throw new ue("Url must be a non-empty string!");this._dataSource.url=Ee}_expandBuffer(Ee){let je=this._stashSize;for(;je+1024*1024*1<Ee;)je*=2;if(je+=1024*1024*1,je===this._bufferSize)return;let Oe=new ArrayBuffer(je);if(this._stashUsed>0){let De=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(Oe,0,je).set(De,0)}this._stashBuffer=Oe,this._bufferSize=je}_normalizeSpeed(Ee){let je=this._speedNormalizeList,Oe=je.length-1,De=0,Ke=0,et=Oe;if(Ee<je[0])return je[0];for(;Ke<=et;){if(De=Ke+Math.floor((et-Ke)/2),De===Oe||Ee>=je[De]&&Ee<je[De+1])return je[De];je[De]<Ee?Ke=De+1:et=De-1}}_adjustStashSize(Ee){let je=0;this._config.isLive||Ee<512?je=Ee:Ee>=512&&Ee<=1024?je=Math.floor(Ee*1.5):je=Ee*2,je>8192&&(je=8192);let Oe=je*1024+1024*1024*1;this._bufferSize<Oe&&this._expandBuffer(Oe),this._stashSize=je*1024}_dispatchChunks(Ee,je){return this._currentRange.to=je+Ee.byteLength-1,this._onDataArrival(Ee,je)}_onURLRedirect(Ee){this._redirectedURL=Ee,this._onRedirect&&this._onRedirect(Ee)}_onContentLengthKnown(Ee){Ee&&this._fullRequestFlag&&(this._totalLength=Ee,this._fullRequestFlag=!1)}_onLoaderChunkArrival(Ee,je,Oe){if(!this._onDataArrival)throw new ve("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(Ee.byteLength);let De=this._speedSampler.lastSecondKBps;if(De!==0){let Ke=this._normalizeSpeed(De);this._speedNormalized!==Ke&&(this._speedNormalized=Ke,this._adjustStashSize(Ke))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=je),this._stashUsed+Ee.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(Ee),this._stashUsed),this._stashUsed+=Ee.byteLength;else{let Ke=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let et=this._stashBuffer.slice(0,this._stashUsed),rt=this._dispatchChunks(et,this._stashByteStart);if(rt<et.byteLength){if(rt>0){let Dt=new Uint8Array(et,rt);Ke.set(Dt,0),this._stashUsed=Dt.byteLength,this._stashByteStart+=rt}}else this._stashUsed=0,this._stashByteStart+=rt;this._stashUsed+Ee.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+Ee.byteLength),Ke=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Ke.set(new Uint8Array(Ee),this._stashUsed),this._stashUsed+=Ee.byteLength}else{let et=this._dispatchChunks(Ee,je);if(et<Ee.byteLength){let rt=Ee.byteLength-et;rt>this._bufferSize&&(this._expandBuffer(rt),Ke=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Ke.set(new Uint8Array(Ee,et),0),this._stashUsed+=rt,this._stashByteStart=je+et}}}else if(this._stashUsed===0){let Ke=this._dispatchChunks(Ee,je);if(Ke<Ee.byteLength){let et=Ee.byteLength-Ke;et>this._bufferSize&&this._expandBuffer(et),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(Ee,Ke),0),this._stashUsed+=et,this._stashByteStart=je+Ke}}else{this._stashUsed+Ee.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+Ee.byteLength);let Ke=new Uint8Array(this._stashBuffer,0,this._bufferSize);Ke.set(new Uint8Array(Ee),this._stashUsed),this._stashUsed+=Ee.byteLength;let et=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(et<this._stashUsed&&et>0){let rt=new Uint8Array(this._stashBuffer,et);Ke.set(rt,0)}this._stashUsed-=et,this._stashByteStart+=et}}_flushStashBuffer(Ee){if(this._stashUsed>0){let je=this._stashBuffer.slice(0,this._stashUsed),Oe=this._dispatchChunks(je,this._stashByteStart),De=je.byteLength-Oe;if(Oe<je.byteLength)if(Ee)he.w(this.TAG,`${De} bytes unconsumed data remain when flush buffer, dropped`);else{if(Oe>0){let Ke=new Uint8Array(this._stashBuffer,0,this._bufferSize),et=new Uint8Array(je,Oe);Ke.set(et,0),this._stashUsed=et.byteLength,this._stashByteStart+=Oe}return 0}return this._stashUsed=0,this._stashByteStart=0,De}return 0}_onLoaderComplete(Ee,je){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(Ee,je){switch(he.e(this.TAG,`Loader error, code = ${je.code}, msg = ${je.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,Ee=ge.UNRECOVERABLE_EARLY_EOF),Ee){case ge.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let Oe=this._currentRange.to+1;Oe<this._totalLength&&(he.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(Oe,!1));return}Ee=ge.UNRECOVERABLE_EARLY_EOF;break}case ge.UNRECOVERABLE_EARLY_EOF:case ge.CONNECTING_TIMEOUT:case ge.HTTP_STATUS_CODE_INVALID:case ge.EXCEPTION:break}if(this._onError)this._onError(Ee,je);else throw new se("IOException: "+je.msg)}}var lt=We;const ut={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function St(){return Object.assign({},ut)}class qe{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let Ee=new lt({},St()),je=Ee.loaderType;return Ee.destroy(),je=="fetch-stream-loader"||je=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let Ee=new lt({},St()),je=Ee.loaderType;return Ee.destroy(),je}static supportNativeMediaPlayback(Ee){qe.videoElement==null&&(qe.videoElement=window.document.createElement("video"));let je=qe.videoElement.canPlayType(Ee);return je==="probably"||je=="maybe"}static getFeatureList(){let Ee={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return Ee.mseFlvPlayback=qe.supportMSEH264Playback(),Ee.networkStreamIO=qe.supportNetworkStreamIO(),Ee.networkLoaderName=qe.getNetworkLoaderTypeName(),Ee.mseLiveFlvPlayback=Ee.mseFlvPlayback&&Ee.networkStreamIO,Ee.nativeMP4H264Playback=qe.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),Ee.nativeWebmVP8Playback=qe.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),Ee.nativeWebmVP9Playback=qe.supportNativeMediaPlayback('video/webm; codecs="vp9"'),Ee}}var Ze=qe,Wt={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};class Kt{static get forceGlobalTag(){return he.FORCE_GLOBAL_TAG}static set forceGlobalTag(Ee){he.FORCE_GLOBAL_TAG=Ee,Kt._notifyChange()}static get globalTag(){return he.GLOBAL_TAG}static set globalTag(Ee){he.GLOBAL_TAG=Ee,Kt._notifyChange()}static get enableAll(){return he.ENABLE_VERBOSE&&he.ENABLE_DEBUG&&he.ENABLE_INFO&&he.ENABLE_WARN&&he.ENABLE_ERROR}static set enableAll(Ee){he.ENABLE_VERBOSE=Ee,he.ENABLE_DEBUG=Ee,he.ENABLE_INFO=Ee,he.ENABLE_WARN=Ee,he.ENABLE_ERROR=Ee,Kt._notifyChange()}static get enableDebug(){return he.ENABLE_DEBUG}static set enableDebug(Ee){he.ENABLE_DEBUG=Ee,Kt._notifyChange()}static get enableVerbose(){return he.ENABLE_VERBOSE}static set enableVerbose(Ee){he.ENABLE_VERBOSE=Ee,Kt._notifyChange()}static get enableInfo(){return he.ENABLE_INFO}static set enableInfo(Ee){he.ENABLE_INFO=Ee,Kt._notifyChange()}static get enableWarn(){return he.ENABLE_WARN}static set enableWarn(Ee){he.ENABLE_WARN=Ee,Kt._notifyChange()}static get enableError(){return he.ENABLE_ERROR}static set enableError(Ee){he.ENABLE_ERROR=Ee,Kt._notifyChange()}static getConfig(){return{globalTag:he.GLOBAL_TAG,forceGlobalTag:he.FORCE_GLOBAL_TAG,enableVerbose:he.ENABLE_VERBOSE,enableDebug:he.ENABLE_DEBUG,enableInfo:he.ENABLE_INFO,enableWarn:he.ENABLE_WARN,enableError:he.ENABLE_ERROR,enableCallback:he.ENABLE_CALLBACK}}static applyConfig(Ee){he.GLOBAL_TAG=Ee.globalTag,he.FORCE_GLOBAL_TAG=Ee.forceGlobalTag,he.ENABLE_VERBOSE=Ee.enableVerbose,he.ENABLE_DEBUG=Ee.enableDebug,he.ENABLE_INFO=Ee.enableInfo,he.ENABLE_WARN=Ee.enableWarn,he.ENABLE_ERROR=Ee.enableError,he.ENABLE_CALLBACK=Ee.enableCallback}static _notifyChange(){let Ee=Kt.emitter;if(Ee.listenerCount("change")>0){let je=Kt.getConfig();Ee.emit("change",je)}}static registerListener(Ee){Kt.emitter.addListener("change",Ee)}static removeListener(Ee){Kt.emitter.removeListener("change",Ee)}static addLogListener(Ee){he.emitter.addListener("log",Ee),he.emitter.listenerCount("log")>0&&(he.ENABLE_CALLBACK=!0,Kt._notifyChange())}static removeLogListener(Ee){he.emitter.removeListener("log",Ee),he.emitter.listenerCount("log")===0&&(he.ENABLE_CALLBACK=!1,Kt._notifyChange())}}Kt.emitter=new(Ce());var _t=Kt;class vt{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let Ee=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,je=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&Ee&&je}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(Ee){if(this.keyframesIndex==null)return null;let je=this.keyframesIndex,Oe=this._search(je.times,Ee);return{index:Oe,milliseconds:je.times[Oe],fileposition:je.filepositions[Oe]}}_search(Ee,je){let Oe=0,De=Ee.length-1,Ke=0,et=0,rt=De;for(je<Ee[0]&&(Oe=0,et=rt+1);et<=rt;)if(Ke=et+Math.floor((rt-et)/2),Ke===De||je>=Ee[Ke]&&je<Ee[Ke+1]){Oe=Ke;break}else Ee[Ke]<je?et=Ke+1:rt=Ke-1;return Oe}}var jt=vt;function yn(Cn,Ee,je){let Oe=Cn;if(Ee+je<Oe.length){for(;je--;)if((Oe[++Ee]&192)!==128)return!1;return!0}else return!1}function Xt(Cn){let Ee=[],je=Cn,Oe=0,De=Cn.length;for(;Oe<De;){if(je[Oe]<128){Ee.push(String.fromCharCode(je[Oe])),++Oe;continue}else if(!(je[Oe]<192)){if(je[Oe]<224){if(yn(je,Oe,1)){let Ke=(je[Oe]&31)<<6|je[Oe+1]&63;if(Ke>=128){Ee.push(String.fromCharCode(Ke&65535)),Oe+=2;continue}}}else if(je[Oe]<240){if(yn(je,Oe,2)){let Ke=(je[Oe]&15)<<12|(je[Oe+1]&63)<<6|je[Oe+2]&63;if(Ke>=2048&&(Ke&63488)!==55296){Ee.push(String.fromCharCode(Ke&65535)),Oe+=3;continue}}}else if(je[Oe]<248&&yn(je,Oe,3)){let Ke=(je[Oe]&7)<<18|(je[Oe+1]&63)<<12|(je[Oe+2]&63)<<6|je[Oe+3]&63;if(Ke>65536&&Ke<1114112){Ke-=65536,Ee.push(String.fromCharCode(Ke>>>10|55296)),Ee.push(String.fromCharCode(Ke&1023|56320)),Oe+=4;continue}}}Ee.push("\uFFFD"),++Oe}return Ee.join("")}var Ln=Xt;let pn=function(){let Cn=new ArrayBuffer(2);return new DataView(Cn).setInt16(0,256,!0),new Int16Array(Cn)[0]===256}();class hn{static parseScriptData(Ee,je,Oe){let De={};try{let Ke=hn.parseValue(Ee,je,Oe),et=hn.parseValue(Ee,je+Ke.size,Oe-Ke.size);De[Ke.data]=et.data}catch(Ke){he.e("AMF",Ke.toString())}return De}static parseObject(Ee,je,Oe){if(Oe<3)throw new ve("Data not enough when parse ScriptDataObject");let De=hn.parseString(Ee,je,Oe),Ke=hn.parseValue(Ee,je+De.size,Oe-De.size),et=Ke.objectEnd;return{data:{name:De.data,value:Ke.data},size:De.size+Ke.size,objectEnd:et}}static parseVariable(Ee,je,Oe){return hn.parseObject(Ee,je,Oe)}static parseString(Ee,je,Oe){if(Oe<2)throw new ve("Data not enough when parse String");let Ke=new DataView(Ee,je,Oe).getUint16(0,!pn),et;return Ke>0?et=Ln(new Uint8Array(Ee,je+2,Ke)):et="",{data:et,size:2+Ke}}static parseLongString(Ee,je,Oe){if(Oe<4)throw new ve("Data not enough when parse LongString");let Ke=new DataView(Ee,je,Oe).getUint32(0,!pn),et;return Ke>0?et=Ln(new Uint8Array(Ee,je+4,Ke)):et="",{data:et,size:4+Ke}}static parseDate(Ee,je,Oe){if(Oe<10)throw new ve("Data size invalid when parse Date");let De=new DataView(Ee,je,Oe),Ke=De.getFloat64(0,!pn),et=De.getInt16(8,!pn);return Ke+=et*60*1e3,{data:new Date(Ke),size:10}}static parseValue(Ee,je,Oe){if(Oe<1)throw new ve("Data not enough when parse Value");let De=new DataView(Ee,je,Oe),Ke=1,et=De.getUint8(0),rt,Dt=!1;try{switch(et){case 0:rt=De.getFloat64(1,!pn),Ke+=8;break;case 1:{rt=!!De.getUint8(1),Ke+=1;break}case 2:{let Ft=hn.parseString(Ee,je+1,Oe-1);rt=Ft.data,Ke+=Ft.size;break}case 3:{rt={};let Ft=0;for((De.getUint32(Oe-4,!pn)&16777215)===9&&(Ft=3);Ke<Oe-4;){let Bt=hn.parseObject(Ee,je+Ke,Oe-Ke-Ft);if(Bt.objectEnd)break;rt[Bt.data.name]=Bt.data.value,Ke+=Bt.size}Ke<=Oe-3&&(De.getUint32(Ke-1,!pn)&16777215)===9&&(Ke+=3);break}case 8:{rt={},Ke+=4;let Ft=0;for((De.getUint32(Oe-4,!pn)&16777215)===9&&(Ft=3);Ke<Oe-8;){let Bt=hn.parseVariable(Ee,je+Ke,Oe-Ke-Ft);if(Bt.objectEnd)break;rt[Bt.data.name]=Bt.data.value,Ke+=Bt.size}Ke<=Oe-3&&(De.getUint32(Ke-1,!pn)&16777215)===9&&(Ke+=3);break}case 9:rt=void 0,Ke=1,Dt=!0;break;case 10:{rt=[];let Ft=De.getUint32(1,!pn);Ke+=4;for(let Bt=0;Bt<Ft;Bt++){let Ct=hn.parseValue(Ee,je+Ke,Oe-Ke);rt.push(Ct.data),Ke+=Ct.size}break}case 11:{let Ft=hn.parseDate(Ee,je+1,Oe-1);rt=Ft.data,Ke+=Ft.size;break}case 12:{let Ft=hn.parseString(Ee,je+1,Oe-1);rt=Ft.data,Ke+=Ft.size;break}default:Ke=Oe,he.w("AMF","Unsupported AMF value type "+et)}}catch(Ft){he.e("AMF",Ft.toString())}return{data:rt,size:Ke,objectEnd:Dt}}}var un=hn;class Xe{constructor(Ee){this.TAG="ExpGolomb",this._buffer=Ee,this._buffer_index=0,this._total_bytes=Ee.byteLength,this._total_bits=Ee.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let Ee=this._total_bytes-this._buffer_index;if(Ee<=0)throw new ve("ExpGolomb: _fillCurrentWord() but no bytes available");let je=Math.min(4,Ee),Oe=new Uint8Array(4);Oe.set(this._buffer.subarray(this._buffer_index,this._buffer_index+je)),this._current_word=new DataView(Oe.buffer).getUint32(0,!1),this._buffer_index+=je,this._current_word_bits_left=je*8}readBits(Ee){if(Ee>32)throw new ue("ExpGolomb: readBits() bits exceeded max 32bits!");if(Ee<=this._current_word_bits_left){let et=this._current_word>>>32-Ee;return this._current_word<<=Ee,this._current_word_bits_left-=Ee,et}let je=this._current_word_bits_left?this._current_word:0;je=je>>>32-this._current_word_bits_left;let Oe=Ee-this._current_word_bits_left;this._fillCurrentWord();let De=Math.min(Oe,this._current_word_bits_left),Ke=this._current_word>>>32-De;return this._current_word<<=De,this._current_word_bits_left-=De,je=je<<De|Ke,je}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let Ee;for(Ee=0;Ee<this._current_word_bits_left;Ee++)if(this._current_word&2147483648>>>Ee)return this._current_word<<=Ee,this._current_word_bits_left-=Ee,Ee;return this._fillCurrentWord(),Ee+this._skipLeadingZero()}readUEG(){let Ee=this._skipLeadingZero();return this.readBits(Ee+1)-1}readSEG(){let Ee=this.readUEG();return Ee&1?Ee+1>>>1:-1*(Ee>>>1)}}var ke=Xe;class _e{static _ebsp2rbsp(Ee){let je=Ee,Oe=je.byteLength,De=new Uint8Array(Oe),Ke=0;for(let et=0;et<Oe;et++)et>=2&&je[et]===3&&je[et-1]===0&&je[et-2]===0||(De[Ke]=je[et],Ke++);return new Uint8Array(De.buffer,0,Ke)}static parseSPS(Ee){let je=_e._ebsp2rbsp(Ee),Oe=new ke(je);Oe.readByte();let De=Oe.readByte();Oe.readByte();let Ke=Oe.readByte();Oe.readUEG();let et=_e.getProfileString(De),rt=_e.getLevelString(Ke),Dt=1,Ft=420,Bt=[0,420,422,444],Ct=8;if((De===100||De===110||De===122||De===244||De===44||De===83||De===86||De===118||De===128||De===138||De===144)&&(Dt=Oe.readUEG(),Dt===3&&Oe.readBits(1),Dt<=3&&(Ft=Bt[Dt]),Ct=Oe.readUEG()+8,Oe.readUEG(),Oe.readBits(1),Oe.readBool())){let cr=Dt!==3?8:12;for(let fr=0;fr<cr;fr++)Oe.readBool()&&(fr<6?_e._skipScalingList(Oe,16):_e._skipScalingList(Oe,64))}Oe.readUEG();let Ht=Oe.readUEG();if(Ht===0)Oe.readUEG();else if(Ht===1){Oe.readBits(1),Oe.readSEG(),Oe.readSEG();let cr=Oe.readUEG();for(let fr=0;fr<cr;fr++)Oe.readSEG()}let Ut=Oe.readUEG();Oe.readBits(1);let on=Oe.readUEG(),cn=Oe.readUEG(),Rt=Oe.readBits(1);Rt===0&&Oe.readBits(1),Oe.readBits(1);let Vt=0,In=0,wn=0,Nn=0;Oe.readBool()&&(Vt=Oe.readUEG(),In=Oe.readUEG(),wn=Oe.readUEG(),Nn=Oe.readUEG());let Jn=1,Sn=1,Un=0,zt=!0,fn=0,vn=0;if(Oe.readBool()){if(Oe.readBool()){let cr=Oe.readByte(),fr=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],$r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];cr>0&&cr<16?(Jn=fr[cr-1],Sn=$r[cr-1]):cr===255&&(Jn=Oe.readByte()<<8|Oe.readByte(),Sn=Oe.readByte()<<8|Oe.readByte())}if(Oe.readBool()&&Oe.readBool(),Oe.readBool()&&(Oe.readBits(4),Oe.readBool()&&Oe.readBits(24)),Oe.readBool()&&(Oe.readUEG(),Oe.readUEG()),Oe.readBool()){let cr=Oe.readBits(32),fr=Oe.readBits(32);zt=Oe.readBool(),fn=fr,vn=cr*2,Un=fn/vn}}let En=1;(Jn!==1||Sn!==1)&&(En=Jn/Sn);let kn=0,Mn=0;if(Dt===0)kn=1,Mn=2-Rt;else{let cr=Dt===3?1:2,fr=Dt===1?2:1;kn=cr,Mn=fr*(2-Rt)}let Bn=(on+1)*16,Kn=(2-Rt)*((cn+1)*16);Bn-=(Vt+In)*kn,Kn-=(wn+Nn)*Mn;let Vn=Math.ceil(Bn*En);return Oe.destroy(),Oe=null,{profile_string:et,level_string:rt,bit_depth:Ct,ref_frames:Ut,chroma_format:Ft,chroma_format_string:_e.getChromaFormatString(Ft),frame_rate:{fixed:zt,fps:Un,fps_den:vn,fps_num:fn},sar_ratio:{width:Jn,height:Sn},codec_size:{width:Bn,height:Kn},present_size:{width:Vn,height:Kn}}}static _skipScalingList(Ee,je){let Oe=8,De=8,Ke=0;for(let et=0;et<je;et++)De!==0&&(Ke=Ee.readSEG(),De=(Oe+Ke+256)%256),Oe=De===0?Oe:De}static getProfileString(Ee){switch(Ee){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(Ee){return(Ee/10).toFixed(1)}static getChromaFormatString(Ee){switch(Ee){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var Te=_e,me={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function at(Cn){return Cn>>>8&255|(Cn&255)<<8}function Pt(Cn){return(Cn&4278190080)>>>24|(Cn&16711680)>>>8|(Cn&65280)<<8|(Cn&255)<<24}function Qe(Cn,Ee){return Cn[Ee]<<24|Cn[Ee+1]<<16|Cn[Ee+2]<<8|Cn[Ee+3]}class Je{constructor(Ee,je){this.TAG="FLVDemuxer",this._config=je,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=Ee.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=Ee.hasAudioTrack,this._hasVideo=Ee.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new jt,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let Oe=new ArrayBuffer(2);return new DataView(Oe).setInt16(0,256,!0),new Int16Array(Oe)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(Ee){let je=new Uint8Array(Ee),Oe={match:!1};if(je[0]!==70||je[1]!==76||je[2]!==86||je[3]!==1)return Oe;let De=(je[4]&4)>>>2!==0,Ke=(je[4]&1)!==0,et=Qe(je,5);return et<9?Oe:{match:!0,consumed:et,dataOffset:et,hasAudioTrack:De,hasVideoTrack:Ke}}bindDataSource(Ee){return Ee.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(Ee){this._onTrackMetadata=Ee}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(Ee){this._onMediaInfo=Ee}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(Ee){this._onMetaDataArrived=Ee}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(Ee){this._onScriptDataArrived=Ee}get onError(){return this._onError}set onError(Ee){this._onError=Ee}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(Ee){this._onDataAvailable=Ee}get timestampBase(){return this._timestampBase}set timestampBase(Ee){this._timestampBase=Ee}get overridedDuration(){return this._duration}set overridedDuration(Ee){this._durationOverrided=!0,this._duration=Ee,this._mediaInfo.duration=Ee}set overridedHasAudio(Ee){this._hasAudioFlagOverrided=!0,this._hasAudio=Ee,this._mediaInfo.hasAudio=Ee}set overridedHasVideo(Ee){this._hasVideoFlagOverrided=!0,this._hasVideo=Ee,this._mediaInfo.hasVideo=Ee}resetMediaInfo(){this._mediaInfo=new jt}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(Ee,je){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new ve("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let Oe=0,De=this._littleEndian;if(je===0)if(Ee.byteLength>13)Oe=Je.probe(Ee).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,je+Oe!==this._dataOffset&&he.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(Ee,Oe).getUint32(0,!De)!==0&&he.w(this.TAG,"PrevTagSize0 !== 0 !!!"),Oe+=4);Oe<Ee.byteLength;){this._dispatch=!0;let Ke=new DataView(Ee,Oe);if(Oe+11+4>Ee.byteLength)break;let et=Ke.getUint8(0),rt=Ke.getUint32(0,!De)&16777215;if(Oe+11+rt+4>Ee.byteLength)break;if(et!==8&&et!==9&&et!==18){he.w(this.TAG,`Unsupported tag type ${et}, skipped`),Oe+=11+rt+4;continue}let Dt=Ke.getUint8(4),Ft=Ke.getUint8(5),Bt=Ke.getUint8(6),Ct=Ke.getUint8(7),Ht=Bt|Ft<<8|Dt<<16|Ct<<24;(Ke.getUint32(7,!De)&16777215)!==0&&he.w(this.TAG,"Meet tag which has StreamID != 0!");let on=Oe+11;switch(et){case 8:this._parseAudioData(Ee,on,rt,Ht);break;case 9:this._parseVideoData(Ee,on,rt,Ht,je+Oe);break;case 18:this._parseScriptData(Ee,on,rt);break}let cn=Ke.getUint32(11+rt,!De);cn!==11+rt&&he.w(this.TAG,`Invalid PrevTagSize ${cn}`),Oe+=11+rt+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),Oe}_parseScriptData(Ee,je,Oe){let De=un.parseScriptData(Ee,je,Oe);if(De.hasOwnProperty("onMetaData")){if(De.onMetaData==null||typeof De.onMetaData!="object"){he.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&he.w(this.TAG,"Found another onMetaData tag!"),this._metadata=De;let Ke=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Ke)),typeof Ke.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=Ke.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof Ke.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=Ke.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof Ke.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Ke.audiodatarate),typeof Ke.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Ke.videodatarate),typeof Ke.width=="number"&&(this._mediaInfo.width=Ke.width),typeof Ke.height=="number"&&(this._mediaInfo.height=Ke.height),typeof Ke.duration=="number"){if(!this._durationOverrided){let et=Math.floor(Ke.duration*this._timescale);this._duration=et,this._mediaInfo.duration=et}}else this._mediaInfo.duration=0;if(typeof Ke.framerate=="number"){let et=Math.floor(Ke.framerate*1e3);if(et>0){let rt=et/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=rt,this._referenceFrameRate.fps_num=et,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=rt}}if(typeof Ke.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let et=Ke.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(et),Ke.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Ke,he.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(De).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},De))}_parseKeyframesIndex(Ee){let je=[],Oe=[];for(let De=1;De<Ee.times.length;De++){let Ke=this._timestampBase+Math.floor(Ee.times[De]*1e3);je.push(Ke),Oe.push(Ee.filepositions[De])}return{times:je,filepositions:Oe}}_parseAudioData(Ee,je,Oe,De){if(Oe<=1){he.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let Ke=this._littleEndian,rt=new DataView(Ee,je,Oe).getUint8(0),Dt=rt>>>4;if(Dt!==2&&Dt!==10){this._onError(me.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Dt);return}let Ft=0,Bt=(rt&12)>>>2;if(Bt>=0&&Bt<=4)Ft=this._flvSoundRateTable[Bt];else{this._onError(me.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+Bt);return}let Ct=(rt&2)>>>1,Ht=rt&1,Ut=this._audioMetadata,on=this._audioTrack;if(Ut||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Ut=this._audioMetadata={},Ut.type="audio",Ut.id=on.id,Ut.timescale=this._timescale,Ut.duration=this._duration,Ut.audioSampleRate=Ft,Ut.channelCount=Ht===0?1:2),Dt===10){let cn=this._parseAACAudioData(Ee,je+1,Oe-1);if(cn==null)return;if(cn.packetType===0){Ut.config&&he.w(this.TAG,"Found another AudioSpecificConfig!");let Rt=cn.data;Ut.audioSampleRate=Rt.samplingRate,Ut.channelCount=Rt.channelCount,Ut.codec=Rt.codec,Ut.originalCodec=Rt.originalCodec,Ut.config=Rt.config,Ut.refSampleDuration=1024/Ut.audioSampleRate*Ut.timescale,he.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",Ut);let Vt=this._mediaInfo;Vt.audioCodec=Ut.originalCodec,Vt.audioSampleRate=Ut.audioSampleRate,Vt.audioChannelCount=Ut.channelCount,Vt.hasVideo?Vt.videoCodec!=null&&(Vt.mimeType='video/x-flv; codecs="'+Vt.videoCodec+","+Vt.audioCodec+'"'):Vt.mimeType='video/x-flv; codecs="'+Vt.audioCodec+'"',Vt.isComplete()&&this._onMediaInfo(Vt)}else if(cn.packetType===1){let Rt=this._timestampBase+De,Vt={unit:cn.data,length:cn.data.byteLength,dts:Rt,pts:Rt};on.samples.push(Vt),on.length+=cn.data.length}else he.e(this.TAG,`Flv: Unsupported AAC data type ${cn.packetType}`)}else if(Dt===2){if(!Ut.codec){let In=this._parseMP3AudioData(Ee,je+1,Oe-1,!0);if(In==null)return;Ut.audioSampleRate=In.samplingRate,Ut.channelCount=In.channelCount,Ut.codec=In.codec,Ut.originalCodec=In.originalCodec,Ut.refSampleDuration=1152/Ut.audioSampleRate*Ut.timescale,he.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Ut);let wn=this._mediaInfo;wn.audioCodec=Ut.codec,wn.audioSampleRate=Ut.audioSampleRate,wn.audioChannelCount=Ut.channelCount,wn.audioDataRate=In.bitRate,wn.hasVideo?wn.videoCodec!=null&&(wn.mimeType='video/x-flv; codecs="'+wn.videoCodec+","+wn.audioCodec+'"'):wn.mimeType='video/x-flv; codecs="'+wn.audioCodec+'"',wn.isComplete()&&this._onMediaInfo(wn)}let cn=this._parseMP3AudioData(Ee,je+1,Oe-1,!1);if(cn==null)return;let Rt=this._timestampBase+De,Vt={unit:cn,length:cn.byteLength,dts:Rt,pts:Rt};on.samples.push(Vt),on.length+=cn.length}}_parseAACAudioData(Ee,je,Oe){if(Oe<=1){he.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let De={},Ke=new Uint8Array(Ee,je,Oe);return De.packetType=Ke[0],Ke[0]===0?De.data=this._parseAACAudioSpecificConfig(Ee,je+1,Oe-1):De.data=Ke.subarray(1),De}_parseAACAudioSpecificConfig(Ee,je,Oe){let De=new Uint8Array(Ee,je,Oe),Ke=null,et=0,rt=0,Dt=null,Ft=0,Bt=null;if(et=rt=De[0]>>>3,Ft=(De[0]&7)<<1|De[1]>>>7,Ft<0||Ft>=this._mpegSamplingRates.length){this._onError(me.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Ct=this._mpegSamplingRates[Ft],Ht=(De[1]&120)>>>3;if(Ht<0||Ht>=8){this._onError(me.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}et===5&&(Bt=(De[1]&7)<<1|De[2]>>>7,Dt=(De[2]&124)>>>2);let Ut=self.navigator.userAgent.toLowerCase();return Ut.indexOf("firefox")!==-1?Ft>=6?(et=5,Ke=new Array(4),Bt=Ft-3):(et=2,Ke=new Array(2),Bt=Ft):Ut.indexOf("android")!==-1?(et=2,Ke=new Array(2),Bt=Ft):(et=5,Bt=Ft,Ke=new Array(4),Ft>=6?Bt=Ft-3:Ht===1&&(et=2,Ke=new Array(2),Bt=Ft)),Ke[0]=et<<3,Ke[0]|=(Ft&15)>>>1,Ke[1]=(Ft&15)<<7,Ke[1]|=(Ht&15)<<3,et===5&&(Ke[1]|=(Bt&15)>>>1,Ke[2]=(Bt&1)<<7,Ke[2]|=8,Ke[3]=0),{config:Ke,samplingRate:Ct,channelCount:Ht,codec:"mp4a.40."+et,originalCodec:"mp4a.40."+rt}}_parseMP3AudioData(Ee,je,Oe,De){if(Oe<4){he.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let Ke=this._littleEndian,et=new Uint8Array(Ee,je,Oe),rt=null;if(De){if(et[0]!==255)return;let Dt=et[1]>>>3&3,Ft=(et[1]&6)>>1,Bt=(et[2]&240)>>>4,Ct=(et[2]&12)>>>2,Ut=(et[3]>>>6&3)!==3?2:1,on=0,cn=0,Rt=34,Vt="mp3";switch(Dt){case 0:on=this._mpegAudioV25SampleRateTable[Ct];break;case 2:on=this._mpegAudioV20SampleRateTable[Ct];break;case 3:on=this._mpegAudioV10SampleRateTable[Ct];break}switch(Ft){case 1:Rt=34,Bt<this._mpegAudioL3BitRateTable.length&&(cn=this._mpegAudioL3BitRateTable[Bt]);break;case 2:Rt=33,Bt<this._mpegAudioL2BitRateTable.length&&(cn=this._mpegAudioL2BitRateTable[Bt]);break;case 3:Rt=32,Bt<this._mpegAudioL1BitRateTable.length&&(cn=this._mpegAudioL1BitRateTable[Bt]);break}rt={bitRate:cn,samplingRate:on,channelCount:Ut,codec:Vt,originalCodec:Vt}}else rt=et;return rt}_parseVideoData(Ee,je,Oe,De,Ke){if(Oe<=1){he.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let et=new Uint8Array(Ee,je,Oe)[0],rt=(et&240)>>>4,Dt=et&15;if(Dt!==7){this._onError(me.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${Dt}`);return}this._parseAVCVideoPacket(Ee,je+1,Oe-1,De,Ke,rt)}_parseAVCVideoPacket(Ee,je,Oe,De,Ke,et){if(Oe<4){he.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let rt=this._littleEndian,Dt=new DataView(Ee,je,Oe),Ft=Dt.getUint8(0),Ct=(Dt.getUint32(0,!rt)&16777215)<<8>>8;if(Ft===0)this._parseAVCDecoderConfigurationRecord(Ee,je+4,Oe-4);else if(Ft===1)this._parseAVCVideoData(Ee,je+4,Oe-4,De,Ke,et,Ct);else if(Ft!==2){this._onError(me.FORMAT_ERROR,`Flv: Invalid video packet type ${Ft}`);return}}_parseAVCDecoderConfigurationRecord(Ee,je,Oe){if(Oe<7){he.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let De=this._videoMetadata,Ke=this._videoTrack,et=this._littleEndian,rt=new DataView(Ee,je,Oe);De?typeof De.avcc!="undefined"&&he.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),De=this._videoMetadata={},De.type="video",De.id=Ke.id,De.timescale=this._timescale,De.duration=this._duration);let Dt=rt.getUint8(0),Ft=rt.getUint8(1),Bt=rt.getUint8(2),Ct=rt.getUint8(3);if(Dt!==1||Ft===0){this._onError(me.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(rt.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(me.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let Ht=rt.getUint8(5)&31;if(Ht===0){this._onError(me.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Ht>1&&he.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${Ht}`);let Ut=6;for(let cn=0;cn<Ht;cn++){let Rt=rt.getUint16(Ut,!et);if(Ut+=2,Rt===0)continue;let Vt=new Uint8Array(Ee,je+Ut,Rt);Ut+=Rt;let In=Te.parseSPS(Vt);if(cn!==0)continue;De.codecWidth=In.codec_size.width,De.codecHeight=In.codec_size.height,De.presentWidth=In.present_size.width,De.presentHeight=In.present_size.height,De.profile=In.profile_string,De.level=In.level_string,De.bitDepth=In.bit_depth,De.chromaFormat=In.chroma_format,De.sarRatio=In.sar_ratio,De.frameRate=In.frame_rate,(In.frame_rate.fixed===!1||In.frame_rate.fps_num===0||In.frame_rate.fps_den===0)&&(De.frameRate=this._referenceFrameRate);let wn=De.frameRate.fps_den,Nn=De.frameRate.fps_num;De.refSampleDuration=De.timescale*(wn/Nn);let Rn=Vt.subarray(1,4),Jn="avc1.";for(let Un=0;Un<3;Un++){let zt=Rn[Un].toString(16);zt.length<2&&(zt="0"+zt),Jn+=zt}De.codec=Jn;let Sn=this._mediaInfo;Sn.width=De.codecWidth,Sn.height=De.codecHeight,Sn.fps=De.frameRate.fps,Sn.profile=De.profile,Sn.level=De.level,Sn.refFrames=In.ref_frames,Sn.chromaFormat=In.chroma_format_string,Sn.sarNum=De.sarRatio.width,Sn.sarDen=De.sarRatio.height,Sn.videoCodec=Jn,Sn.hasAudio?Sn.audioCodec!=null&&(Sn.mimeType='video/x-flv; codecs="'+Sn.videoCodec+","+Sn.audioCodec+'"'):Sn.mimeType='video/x-flv; codecs="'+Sn.videoCodec+'"',Sn.isComplete()&&this._onMediaInfo(Sn)}let on=rt.getUint8(Ut);if(on===0){this._onError(me.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else on>1&&he.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${on}`);Ut++;for(let cn=0;cn<on;cn++){let Rt=rt.getUint16(Ut,!et);Ut+=2,Rt!==0&&(Ut+=Rt)}De.avcc=new Uint8Array(Oe),De.avcc.set(new Uint8Array(Ee,je,Oe),0),he.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",De)}_parseAVCVideoData(Ee,je,Oe,De,Ke,et,rt){let Dt=this._littleEndian,Ft=new DataView(Ee,je,Oe),Bt=[],Ct=0,Ht=0;const Ut=this._naluLengthSize;let on=this._timestampBase+De,cn=et===1;for(;Ht<Oe;){if(Ht+4>=Oe){he.w(this.TAG,`Malformed Nalu near timestamp ${on}, offset = ${Ht}, dataSize = ${Oe}`);break}let Rt=Ft.getUint32(Ht,!Dt);if(Ut===3&&(Rt>>>=8),Rt>Oe-Ut){he.w(this.TAG,`Malformed Nalus near timestamp ${on}, NaluSize > DataSize!`);return}let Vt=Ft.getUint8(Ht+Ut)&31;Vt===5&&(cn=!0);let In=new Uint8Array(Ee,je+Ht,Ut+Rt),wn={type:Vt,data:In};Bt.push(wn),Ct+=In.byteLength,Ht+=Ut+Rt}if(Bt.length){let Rt=this._videoTrack,Vt={units:Bt,length:Ct,isKeyframe:cn,dts:on,cts:rt,pts:on+rt};cn&&(Vt.fileposition=Ke),Rt.samples.push(Vt),Rt.length+=Ct}}}var xt=Je;class ot{static init(){ot.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let je in ot.types)ot.types.hasOwnProperty(je)&&(ot.types[je]=[je.charCodeAt(0),je.charCodeAt(1),je.charCodeAt(2),je.charCodeAt(3)]);let Ee=ot.constants={};Ee.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Ee.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Ee.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Ee.STSC=Ee.STCO=Ee.STTS,Ee.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ee.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Ee.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Ee.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ee.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ee.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(Ee){let je=8,Oe=null,De=Array.prototype.slice.call(arguments,1),Ke=De.length;for(let rt=0;rt<Ke;rt++)je+=De[rt].byteLength;Oe=new Uint8Array(je),Oe[0]=je>>>24&255,Oe[1]=je>>>16&255,Oe[2]=je>>>8&255,Oe[3]=je&255,Oe.set(Ee,4);let et=8;for(let rt=0;rt<Ke;rt++)Oe.set(De[rt],et),et+=De[rt].byteLength;return Oe}static generateInitSegment(Ee){let je=ot.box(ot.types.ftyp,ot.constants.FTYP),Oe=ot.moov(Ee),De=new Uint8Array(je.byteLength+Oe.byteLength);return De.set(je,0),De.set(Oe,je.byteLength),De}static moov(Ee){let je=ot.mvhd(Ee.timescale,Ee.duration),Oe=ot.trak(Ee),De=ot.mvex(Ee);return ot.box(ot.types.moov,je,Oe,De)}static mvhd(Ee,je){return ot.box(ot.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ee>>>24&255,Ee>>>16&255,Ee>>>8&255,Ee&255,je>>>24&255,je>>>16&255,je>>>8&255,je&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(Ee){return ot.box(ot.types.trak,ot.tkhd(Ee),ot.mdia(Ee))}static tkhd(Ee){let je=Ee.id,Oe=Ee.duration,De=Ee.presentWidth,Ke=Ee.presentHeight;return ot.box(ot.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,je>>>24&255,je>>>16&255,je>>>8&255,je&255,0,0,0,0,Oe>>>24&255,Oe>>>16&255,Oe>>>8&255,Oe&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,De>>>8&255,De&255,0,0,Ke>>>8&255,Ke&255,0,0]))}static mdia(Ee){return ot.box(ot.types.mdia,ot.mdhd(Ee),ot.hdlr(Ee),ot.minf(Ee))}static mdhd(Ee){let je=Ee.timescale,Oe=Ee.duration;return ot.box(ot.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,je>>>24&255,je>>>16&255,je>>>8&255,je&255,Oe>>>24&255,Oe>>>16&255,Oe>>>8&255,Oe&255,85,196,0,0]))}static hdlr(Ee){let je=null;return Ee.type==="audio"?je=ot.constants.HDLR_AUDIO:je=ot.constants.HDLR_VIDEO,ot.box(ot.types.hdlr,je)}static minf(Ee){let je=null;return Ee.type==="audio"?je=ot.box(ot.types.smhd,ot.constants.SMHD):je=ot.box(ot.types.vmhd,ot.constants.VMHD),ot.box(ot.types.minf,je,ot.dinf(),ot.stbl(Ee))}static dinf(){return ot.box(ot.types.dinf,ot.box(ot.types.dref,ot.constants.DREF))}static stbl(Ee){return ot.box(ot.types.stbl,ot.stsd(Ee),ot.box(ot.types.stts,ot.constants.STTS),ot.box(ot.types.stsc,ot.constants.STSC),ot.box(ot.types.stsz,ot.constants.STSZ),ot.box(ot.types.stco,ot.constants.STCO))}static stsd(Ee){return Ee.type==="audio"?Ee.codec==="mp3"?ot.box(ot.types.stsd,ot.constants.STSD_PREFIX,ot.mp3(Ee)):ot.box(ot.types.stsd,ot.constants.STSD_PREFIX,ot.mp4a(Ee)):ot.box(ot.types.stsd,ot.constants.STSD_PREFIX,ot.avc1(Ee))}static mp3(Ee){let je=Ee.channelCount,Oe=Ee.audioSampleRate,De=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,je,0,16,0,0,0,0,Oe>>>8&255,Oe&255,0,0]);return ot.box(ot.types[".mp3"],De)}static mp4a(Ee){let je=Ee.channelCount,Oe=Ee.audioSampleRate,De=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,je,0,16,0,0,0,0,Oe>>>8&255,Oe&255,0,0]);return ot.box(ot.types.mp4a,De,ot.esds(Ee))}static esds(Ee){let je=Ee.config||[],Oe=je.length,De=new Uint8Array([0,0,0,0,3,23+Oe,0,1,0,4,15+Oe,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([Oe]).concat(je).concat([6,1,2]));return ot.box(ot.types.esds,De)}static avc1(Ee){let je=Ee.avcc,Oe=Ee.codecWidth,De=Ee.codecHeight,Ke=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Oe>>>8&255,Oe&255,De>>>8&255,De&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return ot.box(ot.types.avc1,Ke,ot.box(ot.types.avcC,je))}static mvex(Ee){return ot.box(ot.types.mvex,ot.trex(Ee))}static trex(Ee){let je=Ee.id,Oe=new Uint8Array([0,0,0,0,je>>>24&255,je>>>16&255,je>>>8&255,je&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return ot.box(ot.types.trex,Oe)}static moof(Ee,je){return ot.box(ot.types.moof,ot.mfhd(Ee.sequenceNumber),ot.traf(Ee,je))}static mfhd(Ee){let je=new Uint8Array([0,0,0,0,Ee>>>24&255,Ee>>>16&255,Ee>>>8&255,Ee&255]);return ot.box(ot.types.mfhd,je)}static traf(Ee,je){let Oe=Ee.id,De=ot.box(ot.types.tfhd,new Uint8Array([0,0,0,0,Oe>>>24&255,Oe>>>16&255,Oe>>>8&255,Oe&255])),Ke=ot.box(ot.types.tfdt,new Uint8Array([0,0,0,0,je>>>24&255,je>>>16&255,je>>>8&255,je&255])),et=ot.sdtp(Ee),rt=ot.trun(Ee,et.byteLength+16+16+8+16+8+8);return ot.box(ot.types.traf,De,Ke,rt,et)}static sdtp(Ee){let je=Ee.samples||[],Oe=je.length,De=new Uint8Array(4+Oe);for(let Ke=0;Ke<Oe;Ke++){let et=je[Ke].flags;De[Ke+4]=et.isLeading<<6|et.dependsOn<<4|et.isDependedOn<<2|et.hasRedundancy}return ot.box(ot.types.sdtp,De)}static trun(Ee,je){let Oe=Ee.samples||[],De=Oe.length,Ke=12+16*De,et=new Uint8Array(Ke);je+=8+Ke,et.set([0,0,15,1,De>>>24&255,De>>>16&255,De>>>8&255,De&255,je>>>24&255,je>>>16&255,je>>>8&255,je&255],0);for(let rt=0;rt<De;rt++){let Dt=Oe[rt].duration,Ft=Oe[rt].size,Bt=Oe[rt].flags,Ct=Oe[rt].cts;et.set([Dt>>>24&255,Dt>>>16&255,Dt>>>8&255,Dt&255,Ft>>>24&255,Ft>>>16&255,Ft>>>8&255,Ft&255,Bt.isLeading<<2|Bt.dependsOn,Bt.isDependedOn<<6|Bt.hasRedundancy<<4|Bt.isNonSync,0,0,Ct>>>24&255,Ct>>>16&255,Ct>>>8&255,Ct&255],12+16*rt)}return ot.box(ot.types.trun,et)}static mdat(Ee){return ot.box(ot.types.mdat,Ee)}}ot.init();var mt=ot;class Nt{static getSilentFrame(Ee,je){if(Ee==="mp4a.40.2"){if(je===1)return new Uint8Array([0,200,0,128,35,128]);if(je===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(je===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(je===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(je===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(je===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(je===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(je===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(je===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var rn=Nt;class It{constructor(Ee,je,Oe,De,Ke){this.dts=Ee,this.pts=je,this.duration=Oe,this.originalDts=De,this.isSyncPoint=Ke,this.fileposition=null}}class Qt{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(Ee){Ee.isSyncPoint=!0,this.syncPoints.push(Ee)}}class dn{constructor(){this._list=[]}clear(){this._list=[]}appendArray(Ee){let je=this._list;Ee.length!==0&&(je.length>0&&Ee[0].originalDts<je[je.length-1].originalDts&&this.clear(),Array.prototype.push.apply(je,Ee))}getLastSyncPointBeforeDts(Ee){if(this._list.length==0)return null;let je=this._list,Oe=0,De=je.length-1,Ke=0,et=0,rt=De;for(Ee<je[0].dts&&(Oe=0,et=rt+1);et<=rt;)if(Ke=et+Math.floor((rt-et)/2),Ke===De||Ee>=je[Ke].dts&&Ee<je[Ke+1].dts){Oe=Ke;break}else je[Ke].dts<Ee?et=Ke+1:rt=Ke-1;return this._list[Oe]}}class At{constructor(Ee){this._type=Ee,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return this._list.length===0}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(Ee){let je=this._list;if(je.length===0)return-2;let Oe=je.length-1,De=0,Ke=0,et=Oe,rt=0;if(Ee<je[0].originalBeginDts)return rt=-1,rt;for(;Ke<=et;)if(De=Ke+Math.floor((et-Ke)/2),De===Oe||Ee>je[De].lastSample.originalDts&&Ee<je[De+1].originalBeginDts){rt=De;break}else je[De].originalBeginDts<Ee?Ke=De+1:et=De-1;return rt}_searchNearestSegmentAfter(Ee){return this._searchNearestSegmentBefore(Ee)+1}append(Ee){let je=this._list,Oe=Ee,De=this._lastAppendLocation,Ke=0;De!==-1&&De<je.length&&Oe.originalBeginDts>=je[De].lastSample.originalDts&&(De===je.length-1||De<je.length-1&&Oe.originalBeginDts<je[De+1].originalBeginDts)?Ke=De+1:je.length>0&&(Ke=this._searchNearestSegmentBefore(Oe.originalBeginDts)+1),this._lastAppendLocation=Ke,this._list.splice(Ke,0,Oe)}getLastSegmentBefore(Ee){let je=this._searchNearestSegmentBefore(Ee);return je>=0?this._list[je]:null}getLastSampleBefore(Ee){let je=this.getLastSegmentBefore(Ee);return je!=null?je.lastSample:null}getLastSyncPointBefore(Ee){let je=this._searchNearestSegmentBefore(Ee),Oe=this._list[je].syncPoints;for(;Oe.length===0&&je>0;)je--,Oe=this._list[je].syncPoints;return Oe.length>0?Oe[Oe.length-1]:null}}class Lt{constructor(Ee){this.TAG="MP4Remuxer",this._config=Ee,this._isLive=Ee.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new At("audio"),this._videoSegmentInfoList=new At("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(ze.chrome&&(ze.version.major<50||ze.version.major===50&&ze.version.build<2661)),this._fillSilentAfterSeek=ze.msedge||ze.msie,this._mp3UseMpegAudio=!ze.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(Ee){return Ee.onDataAvailable=this.remux.bind(this),Ee.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(Ee){this._onInitSegment=Ee}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(Ee){this._onMediaSegment=Ee}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(Ee){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(Ee,je){if(!this._onMediaSegment)throw new ve("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(Ee,je),this._remuxVideo(je),this._remuxAudio(Ee)}_onTrackMetadataReceived(Ee,je){let Oe=null,De="mp4",Ke=je.codec;if(Ee==="audio")this._audioMeta=je,je.codec==="mp3"&&this._mp3UseMpegAudio?(De="mpeg",Ke="",Oe=new Uint8Array):Oe=mt.generateInitSegment(je);else if(Ee==="video")this._videoMeta=je,Oe=mt.generateInitSegment(je);else return;if(!this._onInitSegment)throw new ve("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(Ee,{type:Ee,data:Oe.buffer,codec:Ke,container:`${Ee}/${De}`,mediaDuration:je.duration})}_calculateDtsBase(Ee,je){this._dtsBaseInited||(Ee.samples&&Ee.samples.length&&(this._audioDtsBase=Ee.samples[0].dts),je.samples&&je.samples.length&&(this._videoDtsBase=je.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let Ee=this._videoStashedLastSample,je=this._audioStashedLastSample,Oe={type:"video",id:1,sequenceNumber:0,samples:[],length:0};Ee!=null&&(Oe.samples.push(Ee),Oe.length=Ee.length);let De={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};je!=null&&(De.samples.push(je),De.length=je.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(Oe,!0),this._remuxAudio(De,!0)}_remuxAudio(Ee,je){if(this._audioMeta==null)return;let Oe=Ee,De=Oe.samples,Ke,et=-1,rt=-1,Dt=-1,Ft=this._audioMeta.refSampleDuration,Bt=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Ct=this._dtsBaseInited&&this._audioNextDts===void 0,Ht=!1;if(!De||De.length===0||De.length===1&&!je)return;let Ut=0,on=null,cn=0;Bt?(Ut=0,cn=Oe.length):(Ut=8,cn=8+Oe.length);let Rt=null;if(De.length>1&&(Rt=De.pop(),cn-=Rt.length),this._audioStashedLastSample!=null){let Sn=this._audioStashedLastSample;this._audioStashedLastSample=null,De.unshift(Sn),cn+=Sn.length}Rt!=null&&(this._audioStashedLastSample=Rt);let Vt=De[0].dts-this._dtsBase;if(this._audioNextDts)Ke=Vt-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Ke=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(Ht=!0);else{let Sn=this._audioSegmentInfoList.getLastSampleBefore(Vt);if(Sn!=null){let Un=Vt-(Sn.originalDts+Sn.duration);Un<=3&&(Un=0);let zt=Sn.dts+Sn.duration+Un;Ke=Vt-zt}else Ke=0}if(Ht){let Sn=Vt-Ke,Un=this._videoSegmentInfoList.getLastSegmentBefore(Vt);if(Un!=null&&Un.beginDts<Sn){let zt=rn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(zt){let fn=Un.beginDts,vn=Sn-Un.beginDts;he.v(this.TAG,`InsertPrefixSilentAudio: dts: ${fn}, duration: ${vn}`),De.unshift({unit:zt,dts:fn,pts:fn}),cn+=zt.byteLength}}else Ht=!1}let In=[];for(let Sn=0;Sn<De.length;Sn++){let Un=De[Sn],zt=Un.unit,fn=Un.dts-this._dtsBase,vn=fn-Ke;et===-1&&(et=vn);let An=0;Sn!==De.length-1?An=De[Sn+1].dts-this._dtsBase-Ke-vn:Rt!=null?An=Rt.dts-this._dtsBase-Ke-vn:In.length>=1?An=In[In.length-1].duration:An=Math.floor(Ft);let En=!1,kn=null;if(An>Ft*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ze.safari){En=!0;let Mn=Math.abs(An-Ft),Bn=Math.ceil(Mn/Ft),Kn=vn+Ft;he.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
dts: ${vn+An} ms, expected: ${vn+Math.round(Ft)} ms, delta: ${Math.round(Mn)} ms, generate: ${Bn} frames`);let Vn=rn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Vn==null&&(he.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),Vn=zt),kn=[];for(let fr=0;fr<Bn;fr++){let $r=Math.round(Kn);if(kn.length>0){let wr=kn[kn.length-1];wr.duration=$r-wr.dts}let Mr={dts:$r,pts:$r,cts:0,unit:Vn,size:Vn.byteLength,duration:0,originalDts:fn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};kn.push(Mr),cn+=Mr.size,Kn+=Ft}let cr=kn[kn.length-1];cr.duration=vn+An-cr.dts,An=Math.round(Ft)}In.push({dts:vn,pts:vn,cts:0,unit:Un.unit,size:Un.unit.byteLength,duration:An,originalDts:fn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),En&&In.push.apply(In,kn)}Bt?on=new Uint8Array(cn):(on=new Uint8Array(cn),on[0]=cn>>>24&255,on[1]=cn>>>16&255,on[2]=cn>>>8&255,on[3]=cn&255,on.set(mt.types.mdat,4));for(let Sn=0;Sn<In.length;Sn++){let Un=In[Sn].unit;on.set(Un,Ut),Ut+=Un.byteLength}let wn=In[In.length-1];rt=wn.dts+wn.duration,this._audioNextDts=rt;let Nn=new Qt;Nn.beginDts=et,Nn.endDts=rt,Nn.beginPts=et,Nn.endPts=rt,Nn.originalBeginDts=In[0].originalDts,Nn.originalEndDts=wn.originalDts+wn.duration,Nn.firstSample=new It(In[0].dts,In[0].pts,In[0].duration,In[0].originalDts,!1),Nn.lastSample=new It(wn.dts,wn.pts,wn.duration,wn.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(Nn),Oe.samples=In,Oe.sequenceNumber++;let Rn=null;Bt?Rn=new Uint8Array:Rn=mt.moof(Oe,et),Oe.samples=[],Oe.length=0;let Jn={type:"audio",data:this._mergeBoxes(Rn,on).buffer,sampleCount:In.length,info:Nn};Bt&&Ct&&(Jn.timestampOffset=et),this._onMediaSegment("audio",Jn)}_remuxVideo(Ee,je){if(this._videoMeta==null)return;let Oe=Ee,De=Oe.samples,Ke,et=-1,rt=-1,Dt=-1,Ft=-1;if(!De||De.length===0||De.length===1&&!je)return;let Bt=8,Ct=null,Ht=8+Ee.length,Ut=null;if(De.length>1&&(Ut=De.pop(),Ht-=Ut.length),this._videoStashedLastSample!=null){let wn=this._videoStashedLastSample;this._videoStashedLastSample=null,De.unshift(wn),Ht+=wn.length}Ut!=null&&(this._videoStashedLastSample=Ut);let on=De[0].dts-this._dtsBase;if(this._videoNextDts)Ke=on-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Ke=0;else{let wn=this._videoSegmentInfoList.getLastSampleBefore(on);if(wn!=null){let Nn=on-(wn.originalDts+wn.duration);Nn<=3&&(Nn=0);let Rn=wn.dts+wn.duration+Nn;Ke=on-Rn}else Ke=0}let cn=new Qt,Rt=[];for(let wn=0;wn<De.length;wn++){let Nn=De[wn],Rn=Nn.dts-this._dtsBase,Jn=Nn.isKeyframe,Sn=Rn-Ke,Un=Nn.cts,zt=Sn+Un;et===-1&&(et=Sn,Dt=zt);let fn=0;if(wn!==De.length-1?fn=De[wn+1].dts-this._dtsBase-Ke-Sn:Ut!=null?fn=Ut.dts-this._dtsBase-Ke-Sn:Rt.length>=1?fn=Rt[Rt.length-1].duration:fn=Math.floor(this._videoMeta.refSampleDuration),Jn){let vn=new It(Sn,zt,fn,Nn.dts,!0);vn.fileposition=Nn.fileposition,cn.appendSyncPoint(vn)}Rt.push({dts:Sn,pts:zt,cts:Un,units:Nn.units,size:Nn.length,isKeyframe:Jn,duration:fn,originalDts:Rn,flags:{isLeading:0,dependsOn:Jn?2:1,isDependedOn:Jn?1:0,hasRedundancy:0,isNonSync:Jn?0:1}})}Ct=new Uint8Array(Ht),Ct[0]=Ht>>>24&255,Ct[1]=Ht>>>16&255,Ct[2]=Ht>>>8&255,Ct[3]=Ht&255,Ct.set(mt.types.mdat,4);for(let wn=0;wn<Rt.length;wn++){let Nn=Rt[wn].units;for(;Nn.length;){let Jn=Nn.shift().data;Ct.set(Jn,Bt),Bt+=Jn.byteLength}}let Vt=Rt[Rt.length-1];if(rt=Vt.dts+Vt.duration,Ft=Vt.pts+Vt.duration,this._videoNextDts=rt,cn.beginDts=et,cn.endDts=rt,cn.beginPts=Dt,cn.endPts=Ft,cn.originalBeginDts=Rt[0].originalDts,cn.originalEndDts=Vt.originalDts+Vt.duration,cn.firstSample=new It(Rt[0].dts,Rt[0].pts,Rt[0].duration,Rt[0].originalDts,Rt[0].isKeyframe),cn.lastSample=new It(Vt.dts,Vt.pts,Vt.duration,Vt.originalDts,Vt.isKeyframe),this._isLive||this._videoSegmentInfoList.append(cn),Oe.samples=Rt,Oe.sequenceNumber++,this._forceFirstIDR){let wn=Rt[0].flags;wn.dependsOn=2,wn.isNonSync=0}let In=mt.moof(Oe,et);Oe.samples=[],Oe.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(In,Ct).buffer,sampleCount:Rt.length,info:cn})}_mergeBoxes(Ee,je){let Oe=new Uint8Array(Ee.byteLength+je.byteLength);return Oe.set(Ee,0),Oe.set(je,Ee.byteLength),Oe}}var qt=Lt,Jt={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};class On{constructor(Ee,je){this.TAG="TransmuxingController",this._emitter=new(Ce()),this._config=je,Ee.segments||(Ee.segments=[{duration:Ee.duration,filesize:Ee.filesize,url:Ee.url}]),typeof Ee.cors!="boolean"&&(Ee.cors=!0),typeof Ee.withCredentials!="boolean"&&(Ee.withCredentials=!1),this._mediaDataSource=Ee,this._currentSegmentIndex=0;let Oe=0;this._mediaDataSource.segments.forEach(De=>{De.timestampBase=Oe,Oe+=De.duration,De.cors=Ee.cors,De.withCredentials=Ee.withCredentials,je.referrerPolicy&&(De.referrerPolicy=je.referrerPolicy)}),!isNaN(Oe)&&this._mediaDataSource.duration!==Oe&&(this._mediaDataSource.duration=Oe),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ee,je){this._emitter.addListener(Ee,je)}off(Ee,je){this._emitter.removeListener(Ee,je)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(Ee,je){this._currentSegmentIndex=Ee;let Oe=this._mediaDataSource.segments[Ee],De=this._ioctl=new lt(Oe,this._config,Ee);De.onError=this._onIOException.bind(this),De.onSeeked=this._onIOSeeked.bind(this),De.onComplete=this._onIOComplete.bind(this),De.onRedirect=this._onIORedirect.bind(this),De.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),je?this._demuxer.bindDataSource(this._ioctl):De.onDataArrival=this._onInitChunkArrival.bind(this),De.open(je)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(Ee){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let je=this._searchSegmentIndexContains(Ee);if(je===this._currentSegmentIndex){let Oe=this._mediaInfo.segments[je];if(Oe==null)this._pendingSeekTime=Ee;else{let De=Oe.getNearestKeyframe(Ee);this._remuxer.seek(De.milliseconds),this._ioctl.seek(De.fileposition),this._pendingResolveSeekPoint=De.milliseconds}}else{let Oe=this._mediaInfo.segments[je];if(Oe==null)this._pendingSeekTime=Ee,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(je);else{let De=Oe.getNearestKeyframe(Ee);this._internalAbort(),this._remuxer.seek(Ee),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[je].timestampBase,this._loadSegment(je,De.fileposition),this._pendingResolveSeekPoint=De.milliseconds,this._reportSegmentMediaInfo(je)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(Ee){let je=this._mediaDataSource.segments,Oe=je.length-1;for(let De=0;De<je.length;De++)if(Ee<je[De].timestampBase){Oe=De-1;break}return Oe}_onInitChunkArrival(Ee,je){let Oe=null,De=0;if(je>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,De=this._demuxer.parseChunks(Ee,je);else if((Oe=xt.probe(Ee)).match){this._demuxer=new xt(Oe,this._config),this._remuxer||(this._remuxer=new qt(this._config));let Ke=this._mediaDataSource;Ke.duration!=null&&!isNaN(Ke.duration)&&(this._demuxer.overridedDuration=Ke.duration),typeof Ke.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Ke.hasAudio),typeof Ke.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Ke.hasVideo),this._demuxer.timestampBase=Ke.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),De=this._demuxer.parseChunks(Ee,je)}else Oe=null,he.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Jt.DEMUX_ERROR,me.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),De=0;return De}_onMediaInfo(Ee){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},Ee),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,jt.prototype));let je=Object.assign({},Ee);Object.setPrototypeOf(je,jt.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=je,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let Oe=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(Oe)})}_onMetaDataArrived(Ee){this._emitter.emit(Jt.METADATA_ARRIVED,Ee)}_onScriptDataArrived(Ee){this._emitter.emit(Jt.SCRIPTDATA_ARRIVED,Ee)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(Ee){let Oe=Ee+1;Oe<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(Oe)):(this._remuxer.flushStashedSamples(),this._emitter.emit(Jt.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(Ee){let je=this._ioctl.extraData;this._mediaDataSource.segments[je].redirectedURL=Ee}_onIORecoveredEarlyEof(){this._emitter.emit(Jt.RECOVERED_EARLY_EOF)}_onIOException(Ee,je){he.e(this.TAG,`IOException: type = ${Ee}, code = ${je.code}, msg = ${je.msg}`),this._emitter.emit(Jt.IO_ERROR,Ee,je),this._disableStatisticsReporter()}_onDemuxException(Ee,je){he.e(this.TAG,`DemuxException: type = ${Ee}, info = ${je}`),this._emitter.emit(Jt.DEMUX_ERROR,Ee,je)}_onRemuxerInitSegmentArrival(Ee,je){this._emitter.emit(Jt.INIT_SEGMENT,Ee,je)}_onRemuxerMediaSegmentArrival(Ee,je){if(this._pendingSeekTime==null&&(this._emitter.emit(Jt.MEDIA_SEGMENT,Ee,je),this._pendingResolveSeekPoint!=null&&Ee==="video")){let Oe=je.info.syncPoints,De=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,ze.safari&&Oe.length>0&&Oe[0].originalDts===De&&(De=Oe[0].pts),this._emitter.emit(Jt.RECOMMEND_SEEKPOINT,De)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(Ee){let je=this._mediaInfo.segments[Ee],Oe=Object.assign({},je);Oe.duration=this._mediaInfo.duration,Oe.segmentCount=this._mediaInfo.segmentCount,delete Oe.segments,delete Oe.keyframesIndex,this._emitter.emit(Jt.MEDIA_INFO,Oe)}_reportStatisticsInfo(){let Ee={};Ee.url=this._ioctl.currentURL,Ee.hasRedirect=this._ioctl.hasRedirect,Ee.hasRedirect&&(Ee.redirectedURL=this._ioctl.currentRedirectedURL),Ee.speed=this._ioctl.currentSpeed,Ee.loaderType=this._ioctl.loaderType,Ee.currentSegmentIndex=this._currentSegmentIndex,Ee.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Jt.STATISTICS_INFO,Ee)}}var zn=On,Xn=function(Cn){let Ee="TransmuxingWorker",je=null,Oe=cn.bind(this);xe.install(),Cn.addEventListener("message",function(Rt){switch(Rt.data.cmd){case"init":je=new zn(Rt.data.param[0],Rt.data.param[1]),je.on(Jt.IO_ERROR,Ht.bind(this)),je.on(Jt.DEMUX_ERROR,Ut.bind(this)),je.on(Jt.INIT_SEGMENT,De.bind(this)),je.on(Jt.MEDIA_SEGMENT,Ke.bind(this)),je.on(Jt.LOADING_COMPLETE,et.bind(this)),je.on(Jt.RECOVERED_EARLY_EOF,rt.bind(this)),je.on(Jt.MEDIA_INFO,Dt.bind(this)),je.on(Jt.METADATA_ARRIVED,Ft.bind(this)),je.on(Jt.SCRIPTDATA_ARRIVED,Bt.bind(this)),je.on(Jt.STATISTICS_INFO,Ct.bind(this)),je.on(Jt.RECOMMEND_SEEKPOINT,on.bind(this));break;case"destroy":je&&(je.destroy(),je=null),Cn.postMessage({msg:"destroyed"});break;case"start":je.start();break;case"stop":je.stop();break;case"seek":je.seek(Rt.data.param);break;case"pause":je.pause();break;case"resume":je.resume();break;case"logging_config":{let Vt=Rt.data.param;_t.applyConfig(Vt),Vt.enableCallback===!0?_t.addLogListener(Oe):_t.removeLogListener(Oe);break}}});function De(Rt,Vt){let In={msg:Jt.INIT_SEGMENT,data:{type:Rt,data:Vt}};Cn.postMessage(In,[Vt.data])}function Ke(Rt,Vt){let In={msg:Jt.MEDIA_SEGMENT,data:{type:Rt,data:Vt}};Cn.postMessage(In,[Vt.data])}function et(){let Rt={msg:Jt.LOADING_COMPLETE};Cn.postMessage(Rt)}function rt(){let Rt={msg:Jt.RECOVERED_EARLY_EOF};Cn.postMessage(Rt)}function Dt(Rt){let Vt={msg:Jt.MEDIA_INFO,data:Rt};Cn.postMessage(Vt)}function Ft(Rt){let Vt={msg:Jt.METADATA_ARRIVED,data:Rt};Cn.postMessage(Vt)}function Bt(Rt){let Vt={msg:Jt.SCRIPTDATA_ARRIVED,data:Rt};Cn.postMessage(Vt)}function Ct(Rt){let Vt={msg:Jt.STATISTICS_INFO,data:Rt};Cn.postMessage(Vt)}function Ht(Rt,Vt){Cn.postMessage({msg:Jt.IO_ERROR,data:{type:Rt,info:Vt}})}function Ut(Rt,Vt){Cn.postMessage({msg:Jt.DEMUX_ERROR,data:{type:Rt,info:Vt}})}function on(Rt){Cn.postMessage({msg:Jt.RECOMMEND_SEEKPOINT,data:Rt})}function cn(Rt,Vt){Cn.postMessage({msg:"logcat_callback",data:{type:Rt,logcat:Vt}})}};class vr{constructor(Ee,je){if(this.TAG="Transmuxer",this._emitter=new(Ce()),je.enableWorker&&typeof Worker!="undefined")try{let Oe=ee(82059);this._worker=Oe(Xn),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[Ee,je]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},_t.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:_t.getConfig()})}catch(Oe){he.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new zn(Ee,je)}else this._controller=new zn(Ee,je);if(this._controller){let Oe=this._controller;Oe.on(Jt.IO_ERROR,this._onIOError.bind(this)),Oe.on(Jt.DEMUX_ERROR,this._onDemuxError.bind(this)),Oe.on(Jt.INIT_SEGMENT,this._onInitSegment.bind(this)),Oe.on(Jt.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),Oe.on(Jt.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),Oe.on(Jt.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),Oe.on(Jt.MEDIA_INFO,this._onMediaInfo.bind(this)),Oe.on(Jt.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),Oe.on(Jt.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),Oe.on(Jt.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),Oe.on(Jt.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),_t.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ee,je){this._emitter.addListener(Ee,je)}off(Ee,je){this._emitter.removeListener(Ee,je)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(Ee){this._worker?this._worker.postMessage({cmd:"seek",param:Ee}):this._controller.seek(Ee)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(Ee,je){Promise.resolve().then(()=>{this._emitter.emit(Jt.INIT_SEGMENT,Ee,je)})}_onMediaSegment(Ee,je){Promise.resolve().then(()=>{this._emitter.emit(Jt.MEDIA_SEGMENT,Ee,je)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Jt.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Jt.RECOVERED_EARLY_EOF)})}_onMediaInfo(Ee){Promise.resolve().then(()=>{this._emitter.emit(Jt.MEDIA_INFO,Ee)})}_onMetaDataArrived(Ee){Promise.resolve().then(()=>{this._emitter.emit(Jt.METADATA_ARRIVED,Ee)})}_onScriptDataArrived(Ee){Promise.resolve().then(()=>{this._emitter.emit(Jt.SCRIPTDATA_ARRIVED,Ee)})}_onStatisticsInfo(Ee){Promise.resolve().then(()=>{this._emitter.emit(Jt.STATISTICS_INFO,Ee)})}_onIOError(Ee,je){Promise.resolve().then(()=>{this._emitter.emit(Jt.IO_ERROR,Ee,je)})}_onDemuxError(Ee,je){Promise.resolve().then(()=>{this._emitter.emit(Jt.DEMUX_ERROR,Ee,je)})}_onRecommendSeekpoint(Ee){Promise.resolve().then(()=>{this._emitter.emit(Jt.RECOMMEND_SEEKPOINT,Ee)})}_onLoggingConfigChanged(Ee){this._worker&&this._worker.postMessage({cmd:"logging_config",param:Ee})}_onWorkerMessage(Ee){let je=Ee.data,Oe=je.data;if(je.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(je.msg){case Jt.INIT_SEGMENT:case Jt.MEDIA_SEGMENT:this._emitter.emit(je.msg,Oe.type,Oe.data);break;case Jt.LOADING_COMPLETE:case Jt.RECOVERED_EARLY_EOF:this._emitter.emit(je.msg);break;case Jt.MEDIA_INFO:Object.setPrototypeOf(Oe,jt.prototype),this._emitter.emit(je.msg,Oe);break;case Jt.METADATA_ARRIVED:case Jt.SCRIPTDATA_ARRIVED:case Jt.STATISTICS_INFO:this._emitter.emit(je.msg,Oe);break;case Jt.IO_ERROR:case Jt.DEMUX_ERROR:this._emitter.emit(je.msg,Oe.type,Oe.info);break;case Jt.RECOMMEND_SEEKPOINT:this._emitter.emit(je.msg,Oe);break;case"logcat_callback":he.emitter.emit("log",Oe.type,Oe.logcat);break;default:break}}}var _r=vr,Cr={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class ni{constructor(Ee){this.TAG="MSEController",this._config=Ee,this._emitter=new(Ce()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new dn}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ee,je){this._emitter.addListener(Ee,je)}off(Ee,je){this._emitter.removeListener(Ee,je)}attachMediaElement(Ee){if(this._mediaSource)throw new ve("MediaSource has been attached to an HTMLMediaElement!");let je=this._mediaSource=new window.MediaSource;je.addEventListener("sourceopen",this.e.onSourceOpen),je.addEventListener("sourceended",this.e.onSourceEnded),je.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=Ee,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),Ee.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let Ee=this._mediaSource;for(let je in this._sourceBuffers){let Oe=this._pendingSegments[je];Oe.splice(0,Oe.length),this._pendingSegments[je]=null,this._pendingRemoveRanges[je]=null,this._lastInitSegments[je]=null;let De=this._sourceBuffers[je];if(De){if(Ee.readyState!=="closed"){try{Ee.removeSourceBuffer(De)}catch(Ke){he.e(this.TAG,Ke.message)}De.removeEventListener("error",this.e.onSourceBufferError),De.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[je]=null,this._sourceBuffers[je]=null}}if(Ee.readyState==="open")try{Ee.endOfStream()}catch(je){he.e(this.TAG,je.message)}Ee.removeEventListener("sourceopen",this.e.onSourceOpen),Ee.removeEventListener("sourceended",this.e.onSourceEnded),Ee.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(Ee,je){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(Ee),this._pendingSegments[Ee.type].push(Ee);return}let Oe=Ee,De=`${Oe.container}`;Oe.codec&&Oe.codec.length>0&&(De+=`;codecs=${Oe.codec}`);let Ke=!1;if(he.v(this.TAG,"Received Initialization Segment, mimeType: "+De),this._lastInitSegments[Oe.type]=Oe,De!==this._mimeTypes[Oe.type]){if(this._mimeTypes[Oe.type])he.v(this.TAG,`Notice: ${Oe.type} mimeType changed, origin: ${this._mimeTypes[Oe.type]}, target: ${De}`);else{Ke=!0;try{let et=this._sourceBuffers[Oe.type]=this._mediaSource.addSourceBuffer(De);et.addEventListener("error",this.e.onSourceBufferError),et.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(et){he.e(this.TAG,et.message),this._emitter.emit(Cr.ERROR,{code:et.code,msg:et.message});return}}this._mimeTypes[Oe.type]=De}je||this._pendingSegments[Oe.type].push(Oe),Ke||this._sourceBuffers[Oe.type]&&!this._sourceBuffers[Oe.type].updating&&this._doAppendSegments(),ze.safari&&Oe.container==="audio/mpeg"&&Oe.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=Oe.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(Ee){let je=Ee;this._pendingSegments[je.type].push(je),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let Oe=this._sourceBuffers[je.type];Oe&&!Oe.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(Ee){for(let je in this._sourceBuffers){if(!this._sourceBuffers[je])continue;let Oe=this._sourceBuffers[je];if(this._mediaSource.readyState==="open")try{Oe.abort()}catch(Ke){he.e(this.TAG,Ke.message)}this._idrList.clear();let De=this._pendingSegments[je];if(De.splice(0,De.length),this._mediaSource.readyState!=="closed"){for(let Ke=0;Ke<Oe.buffered.length;Ke++){let et=Oe.buffered.start(Ke),rt=Oe.buffered.end(Ke);this._pendingRemoveRanges[je].push({start:et,end:rt})}if(Oe.updating||this._doRemoveRanges(),ze.safari){let Ke=this._lastInitSegments[je];Ke&&(this._pendingSegments[je].push(Ke),Oe.updating||this._doAppendSegments())}}}}endOfStream(){let Ee=this._mediaSource,je=this._sourceBuffers;if(!Ee||Ee.readyState!=="open"){Ee&&Ee.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}je.video&&je.video.updating||je.audio&&je.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,Ee.endOfStream())}getNearestKeyframe(Ee){return this._idrList.getLastSyncPointBeforeDts(Ee)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let Ee=this._mediaElement.currentTime;for(let je in this._sourceBuffers){let Oe=this._sourceBuffers[je];if(Oe){let De=Oe.buffered;if(De.length>=1&&Ee-De.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let Ee=this._mediaElement.currentTime;for(let je in this._sourceBuffers){let Oe=this._sourceBuffers[je];if(Oe){let De=Oe.buffered,Ke=!1;for(let et=0;et<De.length;et++){let rt=De.start(et),Dt=De.end(et);if(rt<=Ee&&Ee<Dt+3){if(Ee-rt>=this._config.autoCleanupMaxBackwardDuration){Ke=!0;let Ft=Ee-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[je].push({start:rt,end:Ft})}}else Dt<Ee&&(Ke=!0,this._pendingRemoveRanges[je].push({start:rt,end:Dt}))}Ke&&!Oe.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let Ee=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||Ee.video&&Ee.video.updating||Ee.audio&&Ee.audio.updating)return;let je=this._mediaSource.duration,Oe=this._pendingMediaDuration;Oe>0&&(isNaN(je)||Oe>je)&&(he.v(this.TAG,`Update MediaSource duration from ${je} to ${Oe}`),this._mediaSource.duration=Oe),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let Ee in this._pendingRemoveRanges){if(!this._sourceBuffers[Ee]||this._sourceBuffers[Ee].updating)continue;let je=this._sourceBuffers[Ee],Oe=this._pendingRemoveRanges[Ee];for(;Oe.length&&!je.updating;){let De=Oe.shift();je.remove(De.start,De.end)}}}_doAppendSegments(){let Ee=this._pendingSegments;for(let je in Ee)if(!(!this._sourceBuffers[je]||this._sourceBuffers[je].updating)&&Ee[je].length>0){let Oe=Ee[je].shift();if(Oe.timestampOffset){let De=this._sourceBuffers[je].timestampOffset,Ke=Oe.timestampOffset/1e3;Math.abs(De-Ke)>.1&&(he.v(this.TAG,`Update MPEG audio timestampOffset from ${De} to ${Ke}`),this._sourceBuffers[je].timestampOffset=Ke),delete Oe.timestampOffset}if(!Oe.data||Oe.data.byteLength===0)continue;try{this._sourceBuffers[je].appendBuffer(Oe.data),this._isBufferFull=!1,je==="video"&&Oe.hasOwnProperty("info")&&this._idrList.appendArray(Oe.info.syncPoints)}catch(De){this._pendingSegments[je].unshift(Oe),De.code===22?(this._isBufferFull||this._emitter.emit(Cr.BUFFER_FULL),this._isBufferFull=!0):(he.e(this.TAG,De.message),this._emitter.emit(Cr.ERROR,{code:De.code,msg:De.message}))}}}_onSourceOpen(){if(he.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let Ee=this._pendingSourceBufferInit;for(;Ee.length;){let je=Ee.shift();this.appendInitSegment(je,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Cr.SOURCE_OPEN)}_onSourceEnded(){he.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){he.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let Ee=this._pendingSegments;return Ee.video.length>0||Ee.audio.length>0}_hasPendingRemoveRanges(){let Ee=this._pendingRemoveRanges;return Ee.video.length>0||Ee.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Cr.UPDATE_END)}_onSourceBufferError(Ee){he.e(this.TAG,`SourceBuffer Error: ${Ee}`)}}var Jr=ni;const Yn={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},mr={NETWORK_EXCEPTION:ge.EXCEPTION,NETWORK_STATUS_CODE_INVALID:ge.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:ge.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:ge.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:me.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:me.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:me.CODEC_UNSUPPORTED};class si{constructor(Ee,je){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(Ce()),this._config=St(),typeof je=="object"&&Object.assign(this._config,je),Ee.type.toLowerCase()!=="flv")throw new ue("FlvPlayer requires an flv MediaDataSource input!");Ee.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=Ee,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let Oe=ze.chrome&&(ze.version.major<50||ze.version.major===50&&ze.version.build<2661);this._alwaysSeekKeyframe=!!(Oe||ze.msedge||ze.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ee,je){Ee===Wt.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(Wt.MEDIA_INFO,this.mediaInfo)}):Ee===Wt.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(Wt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ee,je)}off(Ee,je){this._emitter.removeListener(Ee,je)}attachMediaElement(Ee){if(this._mediaElement=Ee,Ee.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),Ee.addEventListener("seeking",this.e.onvSeeking),Ee.addEventListener("canplay",this.e.onvCanPlay),Ee.addEventListener("stalled",this.e.onvStalled),Ee.addEventListener("progress",this.e.onvProgress),this._msectl=new Jr(this._config),this._msectl.on(Cr.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Cr.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Cr.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(Cr.ERROR,je=>{this._emitter.emit(Wt.ERROR,Yn.MEDIA_ERROR,mr.MEDIA_MSE_ERROR,je)}),this._msectl.attachMediaElement(Ee),this._pendingSeekTime!=null)try{Ee.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(je){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new ve("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new ve("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new _r(this._mediaDataSource,this._config),this._transmuxer.on(Jt.INIT_SEGMENT,(Ee,je)=>{this._msectl.appendInitSegment(je)}),this._transmuxer.on(Jt.MEDIA_SEGMENT,(Ee,je)=>{if(this._msectl.appendMediaSegment(je),this._config.lazyLoad&&!this._config.isLive){let Oe=this._mediaElement.currentTime;je.info.endDts>=(Oe+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(he.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(Jt.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(Wt.LOADING_COMPLETE)}),this._transmuxer.on(Jt.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(Wt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Jt.IO_ERROR,(Ee,je)=>{this._emitter.emit(Wt.ERROR,Yn.NETWORK_ERROR,Ee,je)}),this._transmuxer.on(Jt.DEMUX_ERROR,(Ee,je)=>{this._emitter.emit(Wt.ERROR,Yn.MEDIA_ERROR,Ee,{code:-1,msg:je})}),this._transmuxer.on(Jt.MEDIA_INFO,Ee=>{this._mediaInfo=Ee,this._emitter.emit(Wt.MEDIA_INFO,Object.assign({},Ee))}),this._transmuxer.on(Jt.METADATA_ARRIVED,Ee=>{this._emitter.emit(Wt.METADATA_ARRIVED,Ee)}),this._transmuxer.on(Jt.SCRIPTDATA_ARRIVED,Ee=>{this._emitter.emit(Wt.SCRIPTDATA_ARRIVED,Ee)}),this._transmuxer.on(Jt.STATISTICS_INFO,Ee=>{this._statisticsInfo=this._fillStatisticsInfo(Ee),this._emitter.emit(Wt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Jt.RECOMMEND_SEEKPOINT,Ee=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ee/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Ee){this._mediaElement.volume=Ee}get muted(){return this._mediaElement.muted}set muted(Ee){this._mediaElement.muted=Ee}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ee){this._mediaElement?this._internalSeek(Ee):this._pendingSeekTime=Ee}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(Ee){if(Ee.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return Ee;let je=!0,Oe=0,De=0;if(this._mediaElement.getVideoPlaybackQuality){let Ke=this._mediaElement.getVideoPlaybackQuality();Oe=Ke.totalVideoFrames,De=Ke.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Oe=this._mediaElement.webkitDecodedFrameCount,De=this._mediaElement.webkitDroppedFrameCount):je=!1;return je&&(Ee.decodedFrames=Oe,Ee.droppedFrames=De),Ee}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let Ee=this._mediaElement.buffered,je=this._mediaElement.currentTime,Oe=0,De=0;for(let Ke=0;Ke<Ee.length;Ke++){let et=Ee.start(Ke),rt=Ee.end(Ke);if(et<=je&&je<rt){Oe=et,De=rt;break}}De>=je+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(he.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){he.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let Ee=this._mediaElement.currentTime,je=this._mediaElement.buffered,Oe=!1;for(let De=0;De<je.length;De++){let Ke=je.start(De),et=je.end(De);if(Ee>=Ke&&Ee<et){Ee>=et-this._config.lazyLoadRecoverDuration&&(Oe=!0);break}}Oe&&(window.clearInterval(this._progressChecker),this._progressChecker=null,Oe&&(he.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(Ee){let je=this._mediaElement.buffered;for(let Oe=0;Oe<je.length;Oe++){let De=je.start(Oe),Ke=je.end(Oe);if(Ee>=De&&Ee<Ke)return!0}return!1}_internalSeek(Ee){let je=this._isTimepointBuffered(Ee),Oe=!1,De=0;if(Ee<1&&this._mediaElement.buffered.length>0){let Ke=this._mediaElement.buffered.start(0);(Ke<1&&Ee<Ke||ze.safari)&&(Oe=!0,De=ze.safari?.1:Ke)}if(Oe)this._requestSetTime=!0,this._mediaElement.currentTime=De;else if(je){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=Ee;else{let Ke=this._msectl.getNearestKeyframe(Math.floor(Ee*1e3));this._requestSetTime=!0,Ke!=null?this._mediaElement.currentTime=Ke.dts/1e3:this._mediaElement.currentTime=Ee}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ee),this._transmuxer.seek(Math.floor(Ee*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ee)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let Ee=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(Ee)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ee),this._transmuxer.seek(Math.floor(Ee*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ee))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(Ee){let je=this._mediaElement;if(Ee||!this._receivedCanPlay||je.readyState<2){let Oe=je.buffered;Oe.length>0&&je.currentTime<Oe.start(0)&&(he.w(this.TAG,`Playback seems stuck at ${je.currentTime}, seek to ${Oe.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=Oe.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(Ee){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(Ee){let je=this._mediaElement.currentTime,Oe=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(je<1&&Oe.length>0){let De=Oe.start(0);if(De<1&&je<De||ze.safari){this._requestSetTime=!0,this._mediaElement.currentTime=ze.safari?.1:De;return}}if(this._isTimepointBuffered(je)){if(this._alwaysSeekKeyframe){let De=this._msectl.getNearestKeyframe(Math.floor(je*1e3));De!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=De.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:je,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(Ee){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(Ee){this._checkAndResumeStuckPlayback(!0)}_onvProgress(Ee){this._checkAndResumeStuckPlayback()}}var or=si;class ii{constructor(Ee,je){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(Ce()),this._config=St(),typeof je=="object"&&Object.assign(this._config,je),Ee.type.toLowerCase()==="flv")throw new ue("NativePlayer does't support flv MediaDataSource input!");if(Ee.hasOwnProperty("segments"))throw new ue(`NativePlayer(${Ee.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=Ee,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ee,je){Ee===Wt.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(Wt.MEDIA_INFO,this.mediaInfo)}):Ee===Wt.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(Wt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ee,je)}off(Ee,je){this._emitter.removeListener(Ee,je)}attachMediaElement(Ee){if(this._mediaElement=Ee,Ee.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{Ee.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(je){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new ve("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Ee){this._mediaElement.volume=Ee}get muted(){return this._mediaElement.muted}set muted(Ee){this._mediaElement.muted=Ee}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ee){this._mediaElement?this._mediaElement.currentTime=Ee:this._pendingSeekTime=Ee}get mediaInfo(){let je={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(je.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(je.width=this._mediaElement.videoWidth,je.height=this._mediaElement.videoHeight)),je}get statisticsInfo(){let Ee={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return Ee;let je=!0,Oe=0,De=0;if(this._mediaElement.getVideoPlaybackQuality){let Ke=this._mediaElement.getVideoPlaybackQuality();Oe=Ke.totalVideoFrames,De=Ke.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Oe=this._mediaElement.webkitDecodedFrameCount,De=this._mediaElement.webkitDroppedFrameCount):je=!1;return je&&(Ee.decodedFrames=Oe,Ee.droppedFrames=De),Ee}_onvLoadedMetadata(Ee){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Wt.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(Wt.STATISTICS_INFO,this.statisticsInfo)}}var ki=ii;xe.install();function gi(Cn,Ee){let je=Cn;if(je==null||typeof je!="object")throw new ue("MediaDataSource must be an javascript object!");if(!je.hasOwnProperty("type"))throw new ue("MediaDataSource must has type field to indicate video file type!");switch(je.type){case"flv":return new or(je,Ee);default:return new ki(je,Ee)}}function Li(){return Ze.supportMSEH264Playback()}function ui(){return Ze.getFeatureList()}let dr={};dr.createPlayer=gi,dr.isSupported=Li,dr.getFeatureList=ui,dr.BaseLoader=ye,dr.LoaderStatus=oe,dr.LoaderErrors=ge,dr.Events=Wt,dr.ErrorTypes=Yn,dr.ErrorDetails=mr,dr.FlvPlayer=or,dr.NativePlayer=ki,dr.LoggingControl=_t,Object.defineProperty(dr,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Hr=dr},50371:function(gn,kt){"use strict";function ee(){const ne=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let xe=1;xe<arguments.length;xe++){const Me=xe<0||arguments.length<=xe?void 0:arguments[xe];Me&&Object.keys(Me).forEach(Ce=>{const fe=Me[Ce];fe!==void 0&&(ne[Ce]=fe)})}return ne}kt.Z=ee},13845:function(gn,kt,ee){"use strict";ee.d(kt,{F:function(){return ne},Z:function(){return xe}});function ne(Me){return Me!=null&&Me===Me.window}function xe(Me,Ce){var fe,he;if(typeof window=="undefined")return 0;const ce=Ce?"scrollTop":"scrollLeft";let ae=0;return ne(Me)?ae=Me[Ce?"pageYOffset":"pageXOffset"]:Me instanceof Document?ae=Me.documentElement[ce]:(Me instanceof HTMLElement||Me)&&(ae=Me[ce]),Me&&!ne(Me)&&typeof ae!="number"&&(ae=(he=((fe=Me.ownerDocument)!==null&&fe!==void 0?fe:Me).documentElement)===null||he===void 0?void 0:he[ce]),ae}},56762:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return xe}});var ne=ee(59301);function xe(){const[,Me]=ne.useReducer(Ce=>Ce+1,0);return Me}},68031:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Ce}});var ne=ee(16089);function xe(fe,he,ce,ae){const se=ce-he;return fe/=ae/2,fe<1?se/2*fe*fe*fe+he:se/2*((fe-=2)*fe*fe+2)+he}var Me=ee(13845);function Ce(fe){let he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:ce=()=>window,callback:ae,duration:se=450}=he,ve=ce(),ue=(0,Me.Z)(ve,!0),pe=Date.now(),oe=()=>{const ye=Date.now()-pe,we=xe(ye>se?se:ye,ue,fe,se);(0,Me.F)(ve)?ve.scrollTo(window.pageXOffset,we):ve instanceof Document||ve.constructor.name==="HTMLDocument"?ve.documentElement.scrollTop=we:ve.scrollTop=we,ye<se?(0,ne.Z)(oe):typeof ae=="function"&&ae()};(0,ne.Z)(oe)}},19080:function(gn,kt,ee){"use strict";ee.d(kt,{F:function(){return fe},Z:function(){return Ce}});var ne=ee(92310),xe=ee.n(ne);const Me=null;function Ce(he,ce,ae){return xe()({[`${he}-status-success`]:ce==="success",[`${he}-status-warning`]:ce==="warning",[`${he}-status-error`]:ce==="error",[`${he}-status-validating`]:ce==="validating",[`${he}-has-feedback`]:ae})}const fe=(he,ce)=>ce||he},24905:function(gn,kt,ee){"use strict";ee.d(kt,{default:function(){return Ie}});var ne=ee(92310),xe=ee.n(ne),Me=ee(5630),Ce=ee(59301),fe=ee(36355),he=ee(1684),ce=ee(32441),se=Ce.createContext(null),ve=ee(98447),ue=ee(14088),pe=ee(4572),oe=function(Ae,it){var Ue={};for(var gt in Ae)Object.prototype.hasOwnProperty.call(Ae,gt)&&it.indexOf(gt)<0&&(Ue[gt]=Ae[gt]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,gt=Object.getOwnPropertySymbols(Ae);Ve<gt.length;Ve++)it.indexOf(gt[Ve])<0&&Object.prototype.propertyIsEnumerable.call(Ae,gt[Ve])&&(Ue[gt[Ve]]=Ae[gt[Ve]]);return Ue};const ge=(Ae,it)=>{var Ue;const{prefixCls:gt,className:Ve,rootClassName:Tt,children:ct,indeterminate:Ot=!1,style:We,onMouseEnter:lt,onMouseLeave:ut,skipGroup:St=!1,disabled:qe}=Ae,Ze=oe(Ae,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:wt,direction:Wt,checkbox:Kt}=Ce.useContext(fe.E_),_t=Ce.useContext(se),{isFormItemInput:vt}=Ce.useContext(ce.aM),jt=Ce.useContext(he.Z),yn=(Ue=(_t==null?void 0:_t.disabled)||qe)!==null&&Ue!==void 0?Ue:jt,Xt=Ce.useRef(Ze.value);Ce.useEffect(()=>{_t==null||_t.registerValue(Ze.value)},[]),Ce.useEffect(()=>{if(!St)return Ze.value!==Xt.current&&(_t==null||_t.cancelValue(Xt.current),_t==null||_t.registerValue(Ze.value),Xt.current=Ze.value),()=>_t==null?void 0:_t.cancelValue(Ze.value)},[Ze.value]);const Ln=wt("checkbox",gt),[pn,hn]=(0,ve.ZP)(Ln),un=Object.assign({},Ze);_t&&!St&&(un.onChange=function(){Ze.onChange&&Ze.onChange.apply(Ze,arguments),_t.toggleOption&&_t.toggleOption({label:ct,value:Ze.value})},un.name=_t.name,un.checked=_t.value.includes(Ze.value));const Xe=xe()(`${Ln}-wrapper`,{[`${Ln}-rtl`]:Wt==="rtl",[`${Ln}-wrapper-checked`]:un.checked,[`${Ln}-wrapper-disabled`]:yn,[`${Ln}-wrapper-in-form-item`]:vt},Kt==null?void 0:Kt.className,Ve,Tt,hn),ke=xe()({[`${Ln}-indeterminate`]:Ot},pe.A,hn),_e=Ot?"mixed":void 0;return pn(Ce.createElement(ue.Z,{component:"Checkbox",disabled:yn},Ce.createElement("label",{className:Xe,style:Object.assign(Object.assign({},Kt==null?void 0:Kt.style),We),onMouseEnter:lt,onMouseLeave:ut},Ce.createElement(Me.Z,Object.assign({"aria-checked":_e},un,{prefixCls:Ln,className:ke,disabled:yn,ref:it})),ct!==void 0&&Ce.createElement("span",null,ct))))};var we=Ce.forwardRef(ge),Be=ee(77654),ze=ee(2738),$e=function(Ae,it){var Ue={};for(var gt in Ae)Object.prototype.hasOwnProperty.call(Ae,gt)&&it.indexOf(gt)<0&&(Ue[gt]=Ae[gt]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,gt=Object.getOwnPropertySymbols(Ae);Ve<gt.length;Ve++)it.indexOf(gt[Ve])<0&&Object.prototype.propertyIsEnumerable.call(Ae,gt[Ve])&&(Ue[gt[Ve]]=Ae[gt[Ve]]);return Ue};const Le=(Ae,it)=>{const{defaultValue:Ue,children:gt,options:Ve=[],prefixCls:Tt,className:ct,rootClassName:Ot,style:We,onChange:lt}=Ae,ut=$e(Ae,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:St,direction:qe}=Ce.useContext(fe.E_),[Ze,wt]=Ce.useState(ut.value||Ue||[]),[Wt,Kt]=Ce.useState([]);Ce.useEffect(()=>{"value"in ut&&wt(ut.value||[])},[ut.value]);const _t=Ce.useMemo(()=>Ve.map(Te=>typeof Te=="string"||typeof Te=="number"?{label:Te,value:Te}:Te),[Ve]),vt=Te=>{Kt(Fe=>Fe.filter(me=>me!==Te))},jt=Te=>{Kt(Fe=>[].concat((0,Be.Z)(Fe),[Te]))},yn=Te=>{const Fe=Ze.indexOf(Te.value),me=(0,Be.Z)(Ze);Fe===-1?me.push(Te.value):me.splice(Fe,1),"value"in ut||wt(me),lt==null||lt(me.filter(at=>Wt.includes(at)).sort((at,Pt)=>{const Qe=_t.findIndex(xt=>xt.value===at),Je=_t.findIndex(xt=>xt.value===Pt);return Qe-Je}))},Xt=St("checkbox",Tt),Ln=`${Xt}-group`,[pn,hn]=(0,ve.ZP)(Xt),un=(0,ze.Z)(ut,["value","disabled"]),Xe=Ve.length?_t.map(Te=>Ce.createElement(we,{prefixCls:Xt,key:Te.value.toString(),disabled:"disabled"in Te?Te.disabled:ut.disabled,value:Te.value,checked:Ze.includes(Te.value),onChange:Te.onChange,className:`${Ln}-item`,style:Te.style,title:Te.title},Te.label)):gt,ke={toggleOption:yn,value:Ze,disabled:ut.disabled,name:ut.name,registerValue:jt,cancelValue:vt},_e=xe()(Ln,{[`${Ln}-rtl`]:qe==="rtl"},ct,Ot,hn);return pn(Ce.createElement("div",Object.assign({className:_e,style:We},un,{ref:it}),Ce.createElement(se.Provider,{value:ke},Xe)))},Ne=Ce.forwardRef(Le);var Re=Ce.memo(Ne);const Se=we;Se.Group=Re,Se.__ANT_CHECKBOX=!0;var Ie=Se},98447:function(gn,kt,ee){"use strict";ee.d(kt,{C2:function(){return fe}});var ne=ee(17313),xe=ee(37613),Me=ee(83116);const Ce=he=>{const{checkboxCls:ce}=he,ae=`${ce}-wrapper`;return[{[`${ce}-group`]:Object.assign(Object.assign({},(0,ne.Wf)(he)),{display:"inline-flex",flexWrap:"wrap",columnGap:he.marginXS,[`> ${he.antCls}-row`]:{flex:1}}),[ae]:Object.assign(Object.assign({},(0,ne.Wf)(he)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${ae}`]:{marginInlineStart:0},[`&${ae}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[ce]:Object.assign(Object.assign({},(0,ne.Wf)(he)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:he.borderRadiusSM,alignSelf:"center",[`${ce}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${ce}-inner`]:Object.assign({},(0,ne.oN)(he))},[`${ce}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:he.checkboxSize,height:he.checkboxSize,direction:"ltr",backgroundColor:he.colorBgContainer,border:`${he.lineWidth}px ${he.lineType} ${he.colorBorder}`,borderRadius:he.borderRadiusSM,borderCollapse:"separate",transition:`all ${he.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:he.checkboxSize/14*5,height:he.checkboxSize/14*8,border:`${he.lineWidthBold}px solid ${he.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${he.motionDurationFast} ${he.motionEaseInBack}, opacity ${he.motionDurationFast}`}},"& + span":{paddingInlineStart:he.paddingXS,paddingInlineEnd:he.paddingXS}})},{[`
${ae}:not(${ae}-disabled),
${ce}:not(${ce}-disabled)
`]:{[`&:hover ${ce}-inner`]:{borderColor:he.colorPrimary}},[`${ae}:not(${ae}-disabled)`]:{[`&:hover ${ce}-checked:not(${ce}-disabled) ${ce}-inner`]:{backgroundColor:he.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${ce}-checked:not(${ce}-disabled):after`]:{borderColor:he.colorPrimaryHover}}},{[`${ce}-checked`]:{[`${ce}-inner`]:{backgroundColor:he.colorPrimary,borderColor:he.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${he.motionDurationMid} ${he.motionEaseOutBack} ${he.motionDurationFast}`}}},[`
${ae}-checked:not(${ae}-disabled),
${ce}-checked:not(${ce}-disabled)
`]:{[`&:hover ${ce}-inner`]:{backgroundColor:he.colorPrimaryHover,borderColor:"transparent"}}},{[ce]:{"&-indeterminate":{[`${ce}-inner`]:{backgroundColor:he.colorBgContainer,borderColor:he.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:he.fontSizeLG/2,height:he.fontSizeLG/2,backgroundColor:he.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${ae}-disabled`]:{cursor:"not-allowed"},[`${ce}-disabled`]:{[`&, ${ce}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${ce}-inner`]:{background:he.colorBgContainerDisabled,borderColor:he.colorBorder,"&:after":{borderColor:he.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:he.colorTextDisabled},[`&${ce}-indeterminate ${ce}-inner::after`]:{background:he.colorTextDisabled}}}]};function fe(he,ce){const ae=(0,xe.TS)(ce,{checkboxCls:`.${he}`,checkboxSize:ce.controlInteractiveSize});return[Ce(ae)]}kt.ZP=(0,Me.Z)("Checkbox",(he,ce)=>{let{prefixCls:ae}=ce;return[fe(ae,he)]})},93891:function(gn,kt,ee){"use strict";var ne=ee(59301),xe=ee(36355),Me=ee(64165);const Ce=fe=>{const{componentName:he}=fe,{getPrefixCls:ce}=(0,ne.useContext)(xe.E_),ae=ce("empty");switch(he){case"Table":case"List":return ne.createElement(Me.Z,{image:Me.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ne.createElement(Me.Z,{image:Me.Z.PRESENTED_IMAGE_SIMPLE,className:`${ae}-small`});default:return ne.createElement(Me.Z,null)}};kt.Z=Ce},43428:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return pn}});var ne=ee(92310),xe=ee.n(ne),Me=ee(85899),Ce=ee(72190),fe=ee(43403),he=ee(34280),ce=ee(59301),ae=ce.createContext(null),se=ce.createContext({}),ve=ae,ue=ee(18642),pe=ee(60499),oe=ee(77900),ge=ee(10228),ye=ee(26112),we=ee(70425),Be=function(un){var Xe=un.prefixCls,ke=un.className,_e=un.style,Te=un.children,Fe=un.containerRef,me=un.id,at=un.onMouseEnter,Pt=un.onMouseOver,Qe=un.onMouseLeave,Je=un.onClick,xt=un.onKeyDown,ot=un.onKeyUp,mt={onMouseEnter:at,onMouseOver:Pt,onMouseLeave:Qe,onClick:Je,onKeyDown:xt,onKeyUp:ot},Nt=ce.useContext(se),rn=Nt.panel,It=(0,we.useComposeRef)(rn,Fe);return ce.createElement(ce.Fragment,null,ce.createElement("div",(0,pe.Z)({id:me,className:xe()("".concat(Xe,"-content"),ke),style:(0,Me.Z)({},_e),"aria-modal":"true",role:"dialog",ref:It},mt),Te))},ze=Be,$e=ee(48736);function Le(hn){return typeof hn=="string"&&String(Number(hn))===hn?((0,$e.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(hn)):hn}function Ne(hn){warning(!("wrapperClassName"in hn),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!hn.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Re={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Se(hn,un){var Xe,ke,_e,Te,Fe=hn.prefixCls,me=hn.open,at=hn.placement,Pt=hn.inline,Qe=hn.push,Je=hn.forceRender,xt=hn.autoFocus,ot=hn.keyboard,mt=hn.rootClassName,Nt=hn.rootStyle,rn=hn.zIndex,It=hn.className,Qt=hn.id,dn=hn.style,At=hn.motion,Lt=hn.width,qt=hn.height,Tn=hn.children,Jt=hn.contentWrapperStyle,On=hn.mask,zn=hn.maskClosable,qn=hn.maskMotion,Xn=hn.maskClassName,vr=hn.maskStyle,_r=hn.afterOpenChange,Qn=hn.onClose,Cr=hn.onMouseEnter,ni=hn.onMouseOver,Jr=hn.onMouseLeave,Yn=hn.onClick,mr=hn.onKeyDown,si=hn.onKeyUp,or=ce.useRef(),ii=ce.useRef(),ki=ce.useRef();ce.useImperativeHandle(un,function(){return or.current});var gi=function(Ct){var Ht=Ct.keyCode,Ut=Ct.shiftKey;switch(Ht){case ge.Z.TAB:{if(Ht===ge.Z.TAB){if(!Ut&&document.activeElement===ki.current){var on;(on=ii.current)===null||on===void 0||on.focus({preventScroll:!0})}else if(Ut&&document.activeElement===ii.current){var cn;(cn=ki.current)===null||cn===void 0||cn.focus({preventScroll:!0})}}break}case ge.Z.ESC:{Qn&&ot&&(Ct.stopPropagation(),Qn(Ct));break}}};ce.useEffect(function(){if(me&&xt){var Bt;(Bt=or.current)===null||Bt===void 0||Bt.focus({preventScroll:!0})}},[me]);var Li=ce.useState(!1),ui=(0,Ce.Z)(Li,2),dr=ui[0],Hr=ui[1],Cn=ce.useContext(ve),Ee;Qe===!1?Ee={distance:0}:Qe===!0?Ee={}:Ee=Qe||{};var je=(Xe=(ke=(_e=Ee)===null||_e===void 0?void 0:_e.distance)!==null&&ke!==void 0?ke:Cn==null?void 0:Cn.pushDistance)!==null&&Xe!==void 0?Xe:180,Oe=ce.useMemo(function(){return{pushDistance:je,push:function(){Hr(!0)},pull:function(){Hr(!1)}}},[je]);ce.useEffect(function(){if(me){var Bt;Cn==null||(Bt=Cn.push)===null||Bt===void 0||Bt.call(Cn)}else{var Ct;Cn==null||(Ct=Cn.pull)===null||Ct===void 0||Ct.call(Cn)}},[me]),ce.useEffect(function(){return function(){var Bt;Cn==null||(Bt=Cn.pull)===null||Bt===void 0||Bt.call(Cn)}},[]);var De=On&&ce.createElement(oe.default,(0,pe.Z)({key:"mask"},qn,{visible:me}),function(Bt,Ct){var Ht=Bt.className,Ut=Bt.style;return ce.createElement("div",{className:xe()("".concat(Fe,"-mask"),Ht,Xn),style:(0,Me.Z)((0,Me.Z)({},Ut),vr),onClick:zn&&me?Qn:void 0,ref:Ct})}),Ke=typeof At=="function"?At(at):At,et={};if(dr&&je)switch(at){case"top":et.transform="translateY(".concat(je,"px)");break;case"bottom":et.transform="translateY(".concat(-je,"px)");break;case"left":et.transform="translateX(".concat(je,"px)");break;default:et.transform="translateX(".concat(-je,"px)");break}at==="left"||at==="right"?et.width=Le(Lt):et.height=Le(qt);var rt={onMouseEnter:Cr,onMouseOver:ni,onMouseLeave:Jr,onClick:Yn,onKeyDown:mr,onKeyUp:si},Dt=ce.createElement(oe.default,(0,pe.Z)({key:"panel"},Ke,{visible:me,forceRender:Je,onVisibleChanged:function(Ct){_r==null||_r(Ct)},removeOnLeave:!1,leavedClassName:"".concat(Fe,"-content-wrapper-hidden")}),function(Bt,Ct){var Ht=Bt.className,Ut=Bt.style;return ce.createElement("div",(0,pe.Z)({className:xe()("".concat(Fe,"-content-wrapper"),Ht),style:(0,Me.Z)((0,Me.Z)((0,Me.Z)({},et),Ut),Jt)},(0,ye.Z)(hn,{data:!0})),ce.createElement(ze,(0,pe.Z)({id:Qt,containerRef:Ct,prefixCls:Fe,className:It,style:dn},rt),Tn))}),Ft=(0,Me.Z)({},Nt);return rn&&(Ft.zIndex=rn),ce.createElement(ve.Provider,{value:Oe},ce.createElement("div",{className:xe()(Fe,"".concat(Fe,"-").concat(at),mt,(Te={},(0,ue.Z)(Te,"".concat(Fe,"-open"),me),(0,ue.Z)(Te,"".concat(Fe,"-inline"),Pt),Te)),style:Ft,tabIndex:-1,ref:or,onKeyDown:gi},De,ce.createElement("div",{tabIndex:0,ref:ii,style:Re,"aria-hidden":"true","data-sentinel":"start"}),Dt,ce.createElement("div",{tabIndex:0,ref:ki,style:Re,"aria-hidden":"true","data-sentinel":"end"})))}var Ie=ce.forwardRef(Se),Ae=Ie,it=function(un){var Xe=un.open,ke=Xe===void 0?!1:Xe,_e=un.prefixCls,Te=_e===void 0?"rc-drawer":_e,Fe=un.placement,me=Fe===void 0?"right":Fe,at=un.autoFocus,Pt=at===void 0?!0:at,Qe=un.keyboard,Je=Qe===void 0?!0:Qe,xt=un.width,ot=xt===void 0?378:xt,mt=un.mask,Nt=mt===void 0?!0:mt,rn=un.maskClosable,It=rn===void 0?!0:rn,Qt=un.getContainer,dn=un.forceRender,At=un.afterOpenChange,Lt=un.destroyOnClose,qt=un.onMouseEnter,Tn=un.onMouseOver,Jt=un.onMouseLeave,On=un.onClick,zn=un.onKeyDown,qn=un.onKeyUp,Xn=un.panelRef,vr=ce.useState(!1),_r=(0,Ce.Z)(vr,2),Qn=_r[0],Cr=_r[1],ni=ce.useState(!1),Jr=(0,Ce.Z)(ni,2),Yn=Jr[0],mr=Jr[1];(0,he.Z)(function(){mr(!0)},[]);var si=Yn?ke:!1,or=ce.useRef(),ii=ce.useRef();(0,he.Z)(function(){si&&(ii.current=document.activeElement)},[si]);var ki=function(Hr){var Cn;if(Cr(Hr),At==null||At(Hr),!Hr&&ii.current&&!((Cn=or.current)!==null&&Cn!==void 0&&Cn.contains(ii.current))){var Ee;(Ee=ii.current)===null||Ee===void 0||Ee.focus({preventScroll:!0})}},gi=ce.useMemo(function(){return{panel:Xn}},[Xn]);if(!dn&&!Qn&&!si&&Lt)return null;var Li={onMouseEnter:qt,onMouseOver:Tn,onMouseLeave:Jt,onClick:On,onKeyDown:zn,onKeyUp:qn},ui=(0,Me.Z)((0,Me.Z)({},un),{},{open:si,prefixCls:Te,placement:me,autoFocus:Pt,keyboard:Je,width:ot,mask:Nt,maskClosable:It,inline:Qt===!1,afterOpenChange:ki,ref:or},Li);return ce.createElement(se.Provider,{value:gi},ce.createElement(fe.Z,{open:si||dn||Qn,autoDestroy:!1,getContainer:Qt,autoLock:Nt&&(si||Qn)},ce.createElement(Ae,ui)))},Ue=it,gt=Ue,Ve=ee(62892),Tt=ee(36355),ct=ee(32441),Ot=ee(47729),lt=hn=>{const{prefixCls:un,title:Xe,footer:ke,extra:_e,closeIcon:Te,closable:Fe,onClose:me,headerStyle:at,drawerStyle:Pt,bodyStyle:Qe,footerStyle:Je,children:xt}=hn,ot=ce.useCallback(Qt=>ce.createElement("button",{type:"button",onClick:me,"aria-label":"Close",className:`${un}-close`},Qt),[me]),[mt,Nt]=(0,Ot.Z)(Fe,Te,ot,void 0,!0),rn=ce.useMemo(()=>!Xe&&!mt?null:ce.createElement("div",{style:at,className:xe()(`${un}-header`,{[`${un}-header-close-only`]:mt&&!Xe&&!_e})},ce.createElement("div",{className:`${un}-header-title`},Nt,Xe&&ce.createElement("div",{className:`${un}-title`},Xe)),_e&&ce.createElement("div",{className:`${un}-extra`},_e)),[mt,Nt,_e,at,un,Xe]),It=ce.useMemo(()=>{if(!ke)return null;const Qt=`${un}-footer`;return ce.createElement("div",{className:Qt,style:Je},ke)},[ke,Je,un]);return ce.createElement("div",{className:`${un}-wrapper-body`,style:Pt},rn,ce.createElement("div",{className:`${un}-body`,style:Qe},xt),It)},ut=ee(33234),St=ee(83116),qe=ee(37613),wt=hn=>{const{componentCls:un,motionDurationSlow:Xe}=hn,ke={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${Xe}`}}};return{[un]:{[`${un}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${Xe}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${un}-panel-motion`]:{"&-left":[ke,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[ke,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[ke,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[ke,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Wt=hn=>{const{componentCls:un,zIndexPopup:Xe,colorBgMask:ke,colorBgElevated:_e,motionDurationSlow:Te,motionDurationMid:Fe,padding:me,paddingLG:at,fontSizeLG:Pt,lineHeightLG:Qe,lineWidth:Je,lineType:xt,colorSplit:ot,marginSM:mt,colorIcon:Nt,colorIconHover:rn,colorText:It,fontWeightStrong:Qt,footerPaddingBlock:dn,footerPaddingInline:At}=hn,Lt=`${un}-content-wrapper`;return{[un]:{position:"fixed",inset:0,zIndex:Xe,pointerEvents:"none","&-pure":{position:"relative",background:_e,[`&${un}-left`]:{boxShadow:hn.boxShadowDrawerLeft},[`&${un}-right`]:{boxShadow:hn.boxShadowDrawerRight},[`&${un}-top`]:{boxShadow:hn.boxShadowDrawerUp},[`&${un}-bottom`]:{boxShadow:hn.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${un}-mask`]:{position:"absolute",inset:0,zIndex:Xe,background:ke,pointerEvents:"auto"},[Lt]:{position:"absolute",zIndex:Xe,maxWidth:"100vw",transition:`all ${Te}`,"&-hidden":{display:"none"}},[`&-left > ${Lt}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:hn.boxShadowDrawerLeft},[`&-right > ${Lt}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:hn.boxShadowDrawerRight},[`&-top > ${Lt}`]:{top:0,insetInline:0,boxShadow:hn.boxShadowDrawerUp},[`&-bottom > ${Lt}`]:{bottom:0,insetInline:0,boxShadow:hn.boxShadowDrawerDown},[`${un}-content`]:{width:"100%",height:"100%",overflow:"auto",background:_e,pointerEvents:"auto"},[`${un}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${un}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${me}px ${at}px`,fontSize:Pt,lineHeight:Qe,borderBottom:`${Je}px ${xt} ${ot}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${un}-extra`]:{flex:"none"},[`${un}-close`]:{display:"inline-block",marginInlineEnd:mt,color:Nt,fontWeight:Qt,fontSize:Pt,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${Fe}`,textRendering:"auto","&:focus, &:hover":{color:rn,textDecoration:"none"}},[`${un}-title`]:{flex:1,margin:0,color:It,fontWeight:hn.fontWeightStrong,fontSize:Pt,lineHeight:Qe},[`${un}-body`]:{flex:1,minWidth:0,minHeight:0,padding:at,overflow:"auto"},[`${un}-footer`]:{flexShrink:0,padding:`${dn}px ${At}px`,borderTop:`${Je}px ${xt} ${ot}`},"&-rtl":{direction:"rtl"}}}};var Kt=(0,St.Z)("Drawer",hn=>{const un=(0,qe.TS)(hn,{});return[Wt(un),wt(un)]},hn=>({zIndexPopup:hn.zIndexPopupBase,footerPaddingBlock:hn.paddingXS,footerPaddingInline:hn.padding})),_t=ee(11575),vt=function(hn,un){var Xe={};for(var ke in hn)Object.prototype.hasOwnProperty.call(hn,ke)&&un.indexOf(ke)<0&&(Xe[ke]=hn[ke]);if(hn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,ke=Object.getOwnPropertySymbols(hn);_e<ke.length;_e++)un.indexOf(ke[_e])<0&&Object.prototype.propertyIsEnumerable.call(hn,ke[_e])&&(Xe[ke[_e]]=hn[ke[_e]]);return Xe};const jt=null,yn={distance:180},Xt=hn=>{var un;const{rootClassName:Xe,width:ke,height:_e,size:Te="default",mask:Fe=!0,push:me=yn,open:at,afterOpenChange:Pt,onClose:Qe,prefixCls:Je,getContainer:xt,style:ot,className:mt,visible:Nt,afterVisibleChange:rn}=hn,It=vt(hn,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Qt,getPrefixCls:dn,direction:At,drawer:Lt}=ce.useContext(Tt.E_),qt=dn("drawer",Je),[Tn,Jt]=Kt(qt),On=xt===void 0&&Qt?()=>Qt(document.body):xt,zn=xe()({"no-mask":!Fe,[`${qt}-rtl`]:At==="rtl"},Xe,Jt),qn=ce.useMemo(()=>ke!=null?ke:Te==="large"?736:378,[ke,Te]),Xn=ce.useMemo(()=>_e!=null?_e:Te==="large"?736:378,[_e,Te]),vr={motionName:(0,Ve.m)(qt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},_r=Cr=>({motionName:(0,Ve.m)(qt,`panel-motion-${Cr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Qn=(0,_t.H)();return Tn(ce.createElement(ut.BR,null,ce.createElement(ct.Ux,{status:!0,override:!0},ce.createElement(gt,Object.assign({prefixCls:qt,onClose:Qe,maskMotion:vr,motion:_r},It,{open:at!=null?at:Nt,mask:Fe,push:me,width:qn,height:Xn,style:Object.assign(Object.assign({},Lt==null?void 0:Lt.style),ot),className:xe()(Lt==null?void 0:Lt.className,mt),rootClassName:zn,getContainer:On,afterOpenChange:Pt!=null?Pt:rn,panelRef:Qn}),ce.createElement(lt,Object.assign({prefixCls:qt},It,{onClose:Qe}))))))},Ln=hn=>{const{prefixCls:un,style:Xe,className:ke,placement:_e="right"}=hn,Te=vt(hn,["prefixCls","style","className","placement"]),{getPrefixCls:Fe}=ce.useContext(Tt.E_),me=Fe("drawer",un),[at,Pt]=Kt(me),Qe=xe()(me,`${me}-pure`,`${me}-${_e}`,Pt,ke);return at(ce.createElement("div",{className:Qe,style:Xe},ce.createElement(lt,Object.assign({prefixCls:me},Te))))};Xt._InternalPanelDoNotUseOrYouWillBeFired=Ln;var pn=Xt},91857:function(gn,kt,ee){"use strict";var ne=ee(59301),xe=ee(38819),Me=ee(92310),Ce=ee.n(Me),fe=ee(31561),he=ee(70425),ce=ee(18929),ae=ee(2738),se=ee(79676),ve=ee(53487),ue=ee(92343),pe=ee(36355),oe=ee(20834),ge=ee(40875),ye=ee(88088),we=ee(47211);const Be=null,ze=Re=>{const{menu:Se,arrow:Ie,prefixCls:Ae,children:it,trigger:Ue,disabled:gt,dropdownRender:Ve,getPopupContainer:Tt,overlayClassName:ct,rootClassName:Ot,open:We,onOpenChange:lt,visible:ut,onVisibleChange:St,mouseEnterDelay:qe=.15,mouseLeaveDelay:Ze=.1,autoAdjustOverflow:wt=!0,placement:Wt="",overlay:Kt,transitionName:_t}=Re,{getPopupContainer:vt,getPrefixCls:jt,direction:yn}=ne.useContext(pe.E_),Xt=ne.useMemo(()=>{const mt=jt();return _t!==void 0?_t:Wt.includes("top")?`${mt}-slide-down`:`${mt}-slide-up`},[jt,Wt,_t]),Ln=ne.useMemo(()=>Wt?Wt.includes("Center")?Wt.slice(0,Wt.indexOf("Center")):Wt:yn==="rtl"?"bottomRight":"bottomLeft",[Wt,yn]),pn=jt("dropdown",Ae),[hn,un]=(0,we.Z)(pn),[,Xe]=(0,ye.Z)(),ke=ne.Children.only(it),_e=(0,ue.Tm)(ke,{className:Ce()(`${pn}-trigger`,{[`${pn}-rtl`]:yn==="rtl"},ke.props.className),disabled:gt}),Te=gt?[]:Ue;let Fe;Te&&Te.includes("contextMenu")&&(Fe=!0);const[me,at]=(0,ce.Z)(!1,{value:We!=null?We:ut}),Pt=(0,he.useEvent)(mt=>{lt==null||lt(mt),St==null||St(mt),at(mt)}),Qe=Ce()(ct,Ot,un,{[`${pn}-rtl`]:yn==="rtl"}),Je=(0,se.Z)({arrowPointAtCenter:typeof Ie=="object"&&Ie.pointAtCenter,autoAdjustOverflow:wt,offset:Xe.marginXXS,arrowWidth:Ie?Xe.sizePopupArrow:0,borderRadius:Xe.borderRadius}),xt=ne.useCallback(()=>{at(!1)},[]),ot=()=>{let mt;return Se!=null&&Se.items?mt=ne.createElement(oe.default,Object.assign({},Se)):typeof Kt=="function"?mt=Kt():mt=Kt,Ve&&(mt=Ve(mt)),mt=ne.Children.only(typeof mt=="string"?ne.createElement("span",null,mt):mt),ne.createElement(ge.J,{prefixCls:`${pn}-menu`,expandIcon:ne.createElement("span",{className:`${pn}-menu-submenu-arrow`},ne.createElement(xe.Z,{className:`${pn}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:xt,validator:Nt=>{let{mode:rn}=Nt}},mt)};return hn(ne.createElement(fe.Z,Object.assign({alignPoint:Fe},(0,ae.Z)(Re,["rootClassName"]),{mouseEnterDelay:qe,mouseLeaveDelay:Ze,visible:me,builtinPlacements:Je,arrow:!!Ie,overlayClassName:Qe,prefixCls:pn,getPopupContainer:Tt||vt,transitionName:Xt,trigger:Te,overlay:ot,placement:Ln,onVisibleChange:Pt}),_e))};function $e(Re){return Object.assign(Object.assign({},Re),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const Le=(0,ve.Z)(ze,"dropdown",Re=>Re,$e),Ne=Re=>ne.createElement(Le,Object.assign({},Re),ne.createElement("span",null));ze._InternalPanelDoNotUseOrYouWillBeFired=Ne,kt.Z=ze},38854:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ye}});var ne=ee(91857),xe=ee(92310),Me=ee.n(xe),Ce=ee(59301),fe=ee(18785),he=ee(3113),ce=ee(36355),ae=ee(81327),se=ee(33234),ve=ee(47211),ue=function(we,Be){var ze={};for(var $e in we)Object.prototype.hasOwnProperty.call(we,$e)&&Be.indexOf($e)<0&&(ze[$e]=we[$e]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Le=0,$e=Object.getOwnPropertySymbols(we);Le<$e.length;Le++)Be.indexOf($e[Le])<0&&Object.prototype.propertyIsEnumerable.call(we,$e[Le])&&(ze[$e[Le]]=we[$e[Le]]);return ze};const pe=we=>{const{getPopupContainer:Be,getPrefixCls:ze,direction:$e}=Ce.useContext(ce.E_),{prefixCls:Le,type:Ne="default",danger:Re,disabled:Se,loading:Ie,onClick:Ae,htmlType:it,children:Ue,className:gt,menu:Ve,arrow:Tt,autoFocus:ct,overlay:Ot,trigger:We,align:lt,open:ut,onOpenChange:St,placement:qe,getPopupContainer:Ze,href:wt,icon:Wt=Ce.createElement(fe.Z,null),title:Kt,buttonsRender:_t=ot=>ot,mouseEnterDelay:vt,mouseLeaveDelay:jt,overlayClassName:yn,overlayStyle:Xt,destroyPopupOnHide:Ln,dropdownRender:pn}=we,hn=ue(we,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),un=ze("dropdown",Le),Xe=`${un}-button`,[ke,_e]=(0,ve.Z)(un),Te={menu:Ve,arrow:Tt,autoFocus:ct,align:lt,disabled:Se,trigger:Se?[]:We,onOpenChange:St,getPopupContainer:Ze||Be,mouseEnterDelay:vt,mouseLeaveDelay:jt,overlayClassName:yn,overlayStyle:Xt,destroyPopupOnHide:Ln,dropdownRender:pn},{compactSize:Fe,compactItemClassnames:me}=(0,se.ri)(un,$e),at=Me()(Xe,me,gt,_e);"overlay"in we&&(Te.overlay=Ot),"open"in we&&(Te.open=ut),"placement"in we?Te.placement=qe:Te.placement=$e==="rtl"?"bottomLeft":"bottomRight";const Pt=Ce.createElement(he.ZP,{type:Ne,danger:Re,disabled:Se,loading:Ie,onClick:Ae,htmlType:it,href:wt,title:Kt},Ue),Qe=Ce.createElement(he.ZP,{type:Ne,danger:Re,icon:Wt}),[Je,xt]=_t([Pt,Qe]);return ke(Ce.createElement(ae.Z.Compact,Object.assign({className:at,size:Fe,block:!0},hn),Je,Ce.createElement(ne.Z,Object.assign({},Te),xt)))};pe.__ANT_BUTTON=!0;var oe=pe;const ge=ne.Z;ge.Button=oe;var ye=ge},47211:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ue}});var ne=ee(17313),xe=ee(13826),Me=ee(92899),Ce=ee(29878),fe=ee(19447),he=ee(83116),ce=ee(37613),se=pe=>{const{componentCls:oe,menuCls:ge,colorError:ye,colorTextLightSolid:we}=pe,Be=`${ge}-item`;return{[`${oe}, ${oe}-menu-submenu`]:{[`${ge} ${Be}`]:{[`&${Be}-danger:not(${Be}-disabled)`]:{color:ye,"&:hover":{color:we,backgroundColor:ye}}}}}};const ve=pe=>{const{componentCls:oe,menuCls:ge,zIndexPopup:ye,dropdownArrowDistance:we,sizePopupArrow:Be,antCls:ze,iconCls:$e,motionDurationMid:Le,dropdownPaddingVertical:Ne,fontSize:Re,dropdownEdgeChildPadding:Se,colorTextDisabled:Ie,fontSizeIcon:Ae,controlPaddingHorizontal:it,colorBgElevated:Ue}=pe;return[{[oe]:Object.assign(Object.assign({},(0,ne.Wf)(pe)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:ye,display:"block","&::before":{position:"absolute",insetBlock:-we+Be/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${ze}-btn`]:{[`& > ${$e}-down, & > ${ze}-btn-icon > ${$e}-down`]:{fontSize:Ae}},[`${oe}-wrap`]:{position:"relative",[`${ze}-btn > ${$e}-down`]:{fontSize:Ae},[`${$e}-down::before`]:{transition:`transform ${Le}`}},[`${oe}-wrap-open`]:{[`${$e}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${ze}-slide-down-enter${ze}-slide-down-enter-active${oe}-placement-bottomLeft,
&${ze}-slide-down-appear${ze}-slide-down-appear-active${oe}-placement-bottomLeft,
&${ze}-slide-down-enter${ze}-slide-down-enter-active${oe}-placement-bottom,
&${ze}-slide-down-appear${ze}-slide-down-appear-active${oe}-placement-bottom,
&${ze}-slide-down-enter${ze}-slide-down-enter-active${oe}-placement-bottomRight,
&${ze}-slide-down-appear${ze}-slide-down-appear-active${oe}-placement-bottomRight`]:{animationName:xe.fJ},[`&${ze}-slide-up-enter${ze}-slide-up-enter-active${oe}-placement-topLeft,
&${ze}-slide-up-appear${ze}-slide-up-appear-active${oe}-placement-topLeft,
&${ze}-slide-up-enter${ze}-slide-up-enter-active${oe}-placement-top,
&${ze}-slide-up-appear${ze}-slide-up-appear-active${oe}-placement-top,
&${ze}-slide-up-enter${ze}-slide-up-enter-active${oe}-placement-topRight,
&${ze}-slide-up-appear${ze}-slide-up-appear-active${oe}-placement-topRight`]:{animationName:xe.Qt},[`&${ze}-slide-down-leave${ze}-slide-down-leave-active${oe}-placement-bottomLeft,
&${ze}-slide-down-leave${ze}-slide-down-leave-active${oe}-placement-bottom,
&${ze}-slide-down-leave${ze}-slide-down-leave-active${oe}-placement-bottomRight`]:{animationName:xe.Uw},[`&${ze}-slide-up-leave${ze}-slide-up-leave-active${oe}-placement-topLeft,
&${ze}-slide-up-leave${ze}-slide-up-leave-active${oe}-placement-top,
&${ze}-slide-up-leave${ze}-slide-up-leave-active${oe}-placement-topRight`]:{animationName:xe.ly}})},(0,fe.ZP)(pe,{colorBg:Ue,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${oe} ${ge}`]:{position:"relative",margin:0},[`${ge}-submenu-popup`]:{position:"absolute",zIndex:ye,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${oe}, ${oe}-menu-submenu`]:{[ge]:Object.assign(Object.assign({padding:Se,listStyleType:"none",backgroundColor:Ue,backgroundClip:"padding-box",borderRadius:pe.borderRadiusLG,outline:"none",boxShadow:pe.boxShadowSecondary},(0,ne.Qy)(pe)),{[`${ge}-item-group-title`]:{padding:`${Ne}px ${it}px`,color:pe.colorTextDescription,transition:`all ${Le}`},[`${ge}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ge}-item-icon`]:{minWidth:Re,marginInlineEnd:pe.marginXS,fontSize:pe.fontSizeSM},[`${ge}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Le}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ge}-item, ${ge}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Ne}px ${it}px`,color:pe.colorText,fontWeight:"normal",fontSize:Re,lineHeight:pe.lineHeight,cursor:"pointer",transition:`all ${Le}`,borderRadius:pe.borderRadiusSM,"&:hover, &-active":{backgroundColor:pe.controlItemBgHover}},(0,ne.Qy)(pe)),{"&-selected":{color:pe.colorPrimary,backgroundColor:pe.controlItemBgActive,"&:hover, &-active":{backgroundColor:pe.controlItemBgActiveHover}},"&-disabled":{color:Ie,cursor:"not-allowed","&:hover":{color:Ie,backgroundColor:Ue,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${pe.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:pe.colorSplit},[`${oe}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:pe.paddingXS,[`${oe}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:pe.colorTextDescription,fontSize:Ae,fontStyle:"normal"}}}),[`${ge}-item-group-list`]:{margin:`0 ${pe.marginXS}px`,padding:0,listStyle:"none"},[`${ge}-submenu-title`]:{paddingInlineEnd:it+pe.fontSizeSM},[`${ge}-submenu-vertical`]:{position:"relative"},[`${ge}-submenu${ge}-submenu-disabled ${oe}-menu-submenu-title`]:{[`&, ${oe}-menu-submenu-arrow-icon`]:{color:Ie,backgroundColor:Ue,cursor:"not-allowed"}},[`${ge}-submenu-selected ${oe}-menu-submenu-title`]:{color:pe.colorPrimary}})}},[(0,xe.oN)(pe,"slide-up"),(0,xe.oN)(pe,"slide-down"),(0,Me.Fm)(pe,"move-up"),(0,Me.Fm)(pe,"move-down"),(0,Ce._y)(pe,"zoom-big")]]};var ue=(0,he.Z)("Dropdown",(pe,oe)=>{let{rootPrefixCls:ge}=oe;const{marginXXS:ye,sizePopupArrow:we,controlHeight:Be,fontSize:ze,lineHeight:$e,paddingXXS:Le,componentCls:Ne,borderRadiusLG:Re}=pe,Se=(Be-ze*$e)/2,{dropdownArrowOffset:Ie}=(0,fe.fS)({contentRadius:Re}),Ae=(0,ce.TS)(pe,{menuCls:`${Ne}-menu`,rootPrefixCls:ge,dropdownArrowDistance:we/2+ye,dropdownArrowOffset:Ie,dropdownPaddingVertical:Se,dropdownEdgeChildPadding:Le});return[ve(Ae),se(Ae)]},pe=>({zIndexPopup:pe.zIndexPopupBase+50}))},64165:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Le}});var ne=ee(92310),xe=ee.n(ne),Me=ee(59301),Ce=ee(36355),fe=ee(9763),he=ee(64993),ce=ee(88088),se=()=>{const[,Ne]=(0,ce.Z)(),Se=new he.C(Ne.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Me.createElement("svg",{style:Se,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Me.createElement("g",{fill:"none",fillRule:"evenodd"},Me.createElement("g",{transform:"translate(24 31.67)"},Me.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Me.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"}),Me.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)"}),Me.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"}),Me.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"})),Me.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"}),Me.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Me.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Me.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ue=()=>{const[,Ne]=(0,ce.Z)(),{colorFill:Re,colorFillTertiary:Se,colorFillQuaternary:Ie,colorBgContainer:Ae}=Ne,{borderColor:it,shadowColor:Ue,contentColor:gt}=(0,Me.useMemo)(()=>({borderColor:new he.C(Re).onBackground(Ae).toHexShortString(),shadowColor:new he.C(Se).onBackground(Ae).toHexShortString(),contentColor:new he.C(Ie).onBackground(Ae).toHexShortString()}),[Re,Se,Ie,Ae]);return Me.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Me.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Me.createElement("ellipse",{fill:Ue,cx:"32",cy:"33",rx:"32",ry:"7"}),Me.createElement("g",{fillRule:"nonzero",stroke:it},Me.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"}),Me.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:gt}))))},pe=ee(83116),oe=ee(37613);const ge=Ne=>{const{componentCls:Re,margin:Se,marginXS:Ie,marginXL:Ae,fontSize:it,lineHeight:Ue}=Ne;return{[Re]:{marginInline:Ie,fontSize:it,lineHeight:Ue,textAlign:"center",[`${Re}-image`]:{height:Ne.emptyImgHeight,marginBottom:Ie,opacity:Ne.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Re}-description`]:{color:Ne.colorText},[`${Re}-footer`]:{marginTop:Se},"&-normal":{marginBlock:Ae,color:Ne.colorTextDisabled,[`${Re}-description`]:{color:Ne.colorTextDisabled},[`${Re}-image`]:{height:Ne.emptyImgHeightMD}},"&-small":{marginBlock:Ie,color:Ne.colorTextDisabled,[`${Re}-image`]:{height:Ne.emptyImgHeightSM}}}}};var ye=(0,pe.Z)("Empty",Ne=>{const{componentCls:Re,controlHeightLG:Se}=Ne,Ie=(0,oe.TS)(Ne,{emptyImgCls:`${Re}-img`,emptyImgHeight:Se*2.5,emptyImgHeightMD:Se,emptyImgHeightSM:Se*.875});return[ge(Ie)]}),we=function(Ne,Re){var Se={};for(var Ie in Ne)Object.prototype.hasOwnProperty.call(Ne,Ie)&&Re.indexOf(Ie)<0&&(Se[Ie]=Ne[Ie]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Ie=Object.getOwnPropertySymbols(Ne);Ae<Ie.length;Ae++)Re.indexOf(Ie[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Ie[Ae])&&(Se[Ie[Ae]]=Ne[Ie[Ae]]);return Se};const Be=Me.createElement(se,null),ze=Me.createElement(ue,null),$e=Ne=>{var{className:Re,rootClassName:Se,prefixCls:Ie,image:Ae=Be,description:it,children:Ue,imageStyle:gt,style:Ve}=Ne,Tt=we(Ne,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ct,direction:Ot,empty:We}=Me.useContext(Ce.E_),lt=ct("empty",Ie),[ut,St]=ye(lt),[qe]=(0,fe.Z)("Empty"),Ze=typeof it!="undefined"?it:qe==null?void 0:qe.description,wt=typeof Ze=="string"?Ze:"empty";let Wt=null;return typeof Ae=="string"?Wt=Me.createElement("img",{alt:wt,src:Ae}):Wt=Ae,ut(Me.createElement("div",Object.assign({className:xe()(St,lt,We==null?void 0:We.className,{[`${lt}-normal`]:Ae===ze,[`${lt}-rtl`]:Ot==="rtl"},Re,Se),style:Object.assign(Object.assign({},We==null?void 0:We.style),Ve)},Tt),Me.createElement("div",{className:`${lt}-image`,style:gt},Wt),Ze&&Me.createElement("div",{className:`${lt}-description`},Ze),Ue&&Me.createElement("div",{className:`${lt}-footer`},Ue)))};$e.PRESENTED_IMAGE_DEFAULT=Be,$e.PRESENTED_IMAGE_SIMPLE=ze;var Le=$e},78241:function(gn,kt,ee){"use strict";ee.d(kt,{default:function(){return je}});var ne=ee(77654),xe=ee(92310),Me=ee.n(xe),Ce=ee(77900),fe=ee(59301),he=ee(62892),ce=ee(32441);function ae(Oe){const[De,Ke]=fe.useState(Oe);return fe.useEffect(()=>{const et=setTimeout(()=>{Ke(Oe)},Oe.length?0:10);return()=>{clearTimeout(et)}},[Oe]),De}var se=ee(17313),ve=ee(29878),ue=ee(8378),pe=ee(37613),oe=ee(83116),ye=Oe=>{const{componentCls:De}=Oe,Ke=`${De}-show-help`,et=`${De}-show-help-item`;return{[Ke]:{transition:`opacity ${Oe.motionDurationSlow} ${Oe.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[et]:{overflow:"hidden",transition:`height ${Oe.motionDurationSlow} ${Oe.motionEaseInOut},
opacity ${Oe.motionDurationSlow} ${Oe.motionEaseInOut},
transform ${Oe.motionDurationSlow} ${Oe.motionEaseInOut} !important`,[`&${et}-appear, &${et}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${et}-leave-active`]:{transform:"translateY(-5px)"}}}}};const we=Oe=>({legend:{display:"block",width:"100%",marginBottom:Oe.marginLG,padding:0,color:Oe.colorTextDescription,fontSize:Oe.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Oe.lineWidth}px ${Oe.lineType} ${Oe.colorBorder}`},label:{fontSize:Oe.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 ${Oe.controlOutlineWidth}px ${Oe.controlOutline}`},output:{display:"block",paddingTop:15,color:Oe.colorText,fontSize:Oe.fontSize,lineHeight:Oe.lineHeight}}),Be=(Oe,De)=>{const{formItemCls:Ke}=Oe;return{[Ke]:{[`${Ke}-label > label`]:{height:De},[`${Ke}-control-input`]:{minHeight:De}}}},ze=Oe=>{const{componentCls:De}=Oe;return{[Oe.componentCls]:Object.assign(Object.assign(Object.assign({},(0,se.Wf)(Oe)),we(Oe)),{[`${De}-text`]:{display:"inline-block",paddingInlineEnd:Oe.paddingSM},"&-small":Object.assign({},Be(Oe,Oe.controlHeightSM)),"&-large":Object.assign({},Be(Oe,Oe.controlHeightLG))})}},$e=Oe=>{const{formItemCls:De,iconCls:Ke,componentCls:et,rootPrefixCls:rt,labelRequiredMarkColor:Dt,labelColor:Ft,labelFontSize:Bt,labelHeight:Ct,labelColonMarginInlineStart:Ht,labelColonMarginInlineEnd:Ut,itemMarginBottom:on}=Oe;return{[De]:Object.assign(Object.assign({},(0,se.Wf)(Oe)),{marginBottom:on,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${rt}-row`]:{display:"none"},"&-has-warning":{[`${De}-split`]:{color:Oe.colorError}},"&-has-error":{[`${De}-split`]:{color:Oe.colorWarning}},[`${De}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Oe.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Ct,color:Ft,fontSize:Bt,[`> ${Ke}`]:{fontSize:Oe.fontSize,verticalAlign:"top"},[`&${De}-required:not(${De}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Oe.marginXXS,color:Dt,fontSize:Oe.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${et}-hide-required-mark &`]:{display:"none"}},[`${De}-optional`]:{display:"inline-block",marginInlineStart:Oe.marginXXS,color:Oe.colorTextDescription,[`${et}-hide-required-mark &`]:{display:"none"}},[`${De}-tooltip`]:{color:Oe.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Oe.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Ht,marginInlineEnd:Ut},[`&${De}-no-colon::after`]:{content:'"\\a0"'}}},[`${De}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${rt}-col-'"]):not([class*="' ${rt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Oe.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[De]:{"&-explain, &-extra":{clear:"both",color:Oe.colorTextDescription,fontSize:Oe.fontSize,lineHeight:Oe.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Oe.controlHeightSM,transition:`color ${Oe.motionDurationMid} ${Oe.motionEaseOut}`},"&-explain":{"&-error":{color:Oe.colorError},"&-warning":{color:Oe.colorWarning}}},[`&-with-help ${De}-explain`]:{height:"auto",opacity:1},[`${De}-feedback-icon`]:{fontSize:Oe.fontSize,textAlign:"center",visibility:"visible",animationName:ve.kr,animationDuration:Oe.motionDurationMid,animationTimingFunction:Oe.motionEaseOutBack,pointerEvents:"none","&-success":{color:Oe.colorSuccess},"&-error":{color:Oe.colorError},"&-warning":{color:Oe.colorWarning},"&-validating":{color:Oe.colorPrimary}}})}},Le=Oe=>{const{componentCls:De,formItemCls:Ke}=Oe;return{[`${De}-horizontal`]:{[`${Ke}-label`]:{flexGrow:0},[`${Ke}-control`]:{flex:"1 1 0",minWidth:0},[`${Ke}-label[class$='-24'], ${Ke}-label[class*='-24 ']`]:{[`& + ${Ke}-control`]:{minWidth:"unset"}}}}},Ne=Oe=>{const{componentCls:De,formItemCls:Ke}=Oe;return{[`${De}-inline`]:{display:"flex",flexWrap:"wrap",[Ke]:{flex:"none",marginInlineEnd:Oe.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Ke}-label,
> ${Ke}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Ke}-label`]:{flex:"none"},[`${De}-text`]:{display:"inline-block"},[`${Ke}-has-feedback`]:{display:"inline-block"}}}}},Re=Oe=>({padding:Oe.verticalLabelPadding,margin:Oe.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Se=Oe=>{const{componentCls:De,formItemCls:Ke,rootPrefixCls:et}=Oe;return{[`${Ke} ${Ke}-label`]:Re(Oe),[De]:{[Ke]:{flexWrap:"wrap",[`${Ke}-label, ${Ke}-control`]:{[`&:not([class*=" ${et}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ie=Oe=>{const{componentCls:De,formItemCls:Ke,rootPrefixCls:et}=Oe;return{[`${De}-vertical`]:{[Ke]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${De}-item-control`]:{width:"100%"}}},[`${De}-vertical ${Ke}-label,
.${et}-col-24${Ke}-label,
.${et}-col-xl-24${Ke}-label`]:Re(Oe),[`@media (max-width: ${Oe.screenXSMax}px)`]:[Se(Oe),{[De]:{[`.${et}-col-xs-24${Ke}-label`]:Re(Oe)}}],[`@media (max-width: ${Oe.screenSMMax}px)`]:{[De]:{[`.${et}-col-sm-24${Ke}-label`]:Re(Oe)}},[`@media (max-width: ${Oe.screenMDMax}px)`]:{[De]:{[`.${et}-col-md-24${Ke}-label`]:Re(Oe)}},[`@media (max-width: ${Oe.screenLGMax}px)`]:{[De]:{[`.${et}-col-lg-24${Ke}-label`]:Re(Oe)}}}},Ae=(Oe,De)=>(0,pe.TS)(Oe,{formItemCls:`${Oe.componentCls}-item`,rootPrefixCls:De});var it=(0,oe.Z)("Form",(Oe,De)=>{let{rootPrefixCls:Ke}=De;const et=Ae(Oe,Ke);return[ze(et),$e(et),ye(et),Le(et),Ne(et),Ie(et),(0,ue.Z)(et),ve.kr]},Oe=>({labelRequiredMarkColor:Oe.colorError,labelColor:Oe.colorTextHeading,labelFontSize:Oe.fontSize,labelHeight:Oe.controlHeight,labelColonMarginInlineStart:Oe.marginXXS/2,labelColonMarginInlineEnd:Oe.marginXS,itemMarginBottom:Oe.marginLG,verticalLabelPadding:`0 0 ${Oe.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ue=[];function gt(Oe,De,Ke){let et=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Oe=="string"?Oe:`${De}-${et}`,error:Oe,errorStatus:Ke}}var Tt=Oe=>{let{help:De,helpStatus:Ke,errors:et=Ue,warnings:rt=Ue,className:Dt,fieldId:Ft,onVisibleChanged:Bt}=Oe;const{prefixCls:Ct}=fe.useContext(ce.Rk),Ht=`${Ct}-item-explain`,[,Ut]=it(Ct),on=(0,fe.useMemo)(()=>(0,he.Z)(Ct),[Ct]),cn=ae(et),Rt=ae(rt),Vt=fe.useMemo(()=>De!=null?[gt(De,"help",Ke)]:[].concat((0,ne.Z)(cn.map((wn,Nn)=>gt(wn,"error","error",Nn))),(0,ne.Z)(Rt.map((wn,Nn)=>gt(wn,"warning","warning",Nn)))),[De,Ke,cn,Rt]),In={};return Ft&&(In.id=`${Ft}_help`),fe.createElement(Ce.default,{motionDeadline:on.motionDeadline,motionName:`${Ct}-show-help`,visible:!!Vt.length,onVisibleChanged:Bt},wn=>{const{className:Nn,style:Rn}=wn;return fe.createElement("div",Object.assign({},In,{className:Me()(Ht,Nn,Dt,Ut),style:Rn,role:"alert"}),fe.createElement(Ce.CSSMotionList,Object.assign({keys:Vt},(0,he.Z)(Ct),{motionName:`${Ct}-show-help-item`,component:!1}),Jn=>{const{key:Sn,error:Un,errorStatus:zt,className:fn,style:vn}=Jn;return fe.createElement("div",{key:Sn,className:Me()(fn,{[`${Ht}-${zt}`]:zt}),style:vn},Un)}))})},ct=ee(95013),Ot=ee(36355),We=ee(1684),lt=ee(52946),ut=ee(19716),St=ee(16722);const qe=["parentNode"],Ze="form_item";function wt(Oe){return Oe===void 0||Oe===!1?[]:Array.isArray(Oe)?Oe:[Oe]}function Wt(Oe,De){if(!Oe.length)return;const Ke=Oe.join("_");return De?`${De}_${Ke}`:qe.includes(Ke)?`${Ze}_${Ke}`:Ke}function Kt(Oe,De,Ke,et,rt,Dt){let Ft=et;return Dt!==void 0?Ft=Dt:Ke.validating?Ft="validating":Oe.length?Ft="error":De.length?Ft="warning":(Ke.touched||rt&&Ke.validated)&&(Ft="success"),Ft}function _t(Oe){return wt(Oe).join("_")}function vt(Oe){const[De]=(0,ct.useForm)(),Ke=fe.useRef({}),et=fe.useMemo(()=>Oe!=null?Oe:Object.assign(Object.assign({},De),{__INTERNAL__:{itemRef:rt=>Dt=>{const Ft=_t(rt);Dt?Ke.current[Ft]=Dt:delete Ke.current[Ft]}},scrollToField:function(rt){let Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Ft=wt(rt),Bt=Wt(Ft,et.__INTERNAL__.name),Ct=Bt?document.getElementById(Bt):null;Ct&&(0,St.Z)(Ct,Object.assign({scrollMode:"if-needed",block:"nearest"},Dt))},getFieldInstance:rt=>{const Dt=_t(rt);return Ke.current[Dt]}}),[Oe,De]);return[et]}var jt=ee(28726),yn=function(Oe,De){var Ke={};for(var et in Oe)Object.prototype.hasOwnProperty.call(Oe,et)&&De.indexOf(et)<0&&(Ke[et]=Oe[et]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,et=Object.getOwnPropertySymbols(Oe);rt<et.length;rt++)De.indexOf(et[rt])<0&&Object.prototype.propertyIsEnumerable.call(Oe,et[rt])&&(Ke[et[rt]]=Oe[et[rt]]);return Ke};const Xt=(Oe,De)=>{const Ke=fe.useContext(We.Z),{getPrefixCls:et,direction:rt,form:Dt}=fe.useContext(Ot.E_),{prefixCls:Ft,className:Bt,rootClassName:Ct,size:Ht,disabled:Ut=Ke,form:on,colon:cn,labelAlign:Rt,labelWrap:Vt,labelCol:In,wrapperCol:wn,hideRequiredMark:Nn,layout:Rn="horizontal",scrollToFirstError:Jn,requiredMark:Sn,onFinishFailed:Un,name:zt,style:fn,feedbackIcons:vn}=Oe,An=yn(Oe,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),En=(0,ut.Z)(Ht),kn=fe.useContext(jt.Z),Mn=(0,fe.useMemo)(()=>Sn!==void 0?Sn:Dt&&Dt.requiredMark!==void 0?Dt.requiredMark:!Nn,[Nn,Sn,Dt]),Bn=cn!=null?cn:Dt==null?void 0:Dt.colon,Kn=et("form",Ft),[Vn,cr]=it(Kn),fr=Me()(Kn,`${Kn}-${Rn}`,{[`${Kn}-hide-required-mark`]:Mn===!1,[`${Kn}-rtl`]:rt==="rtl",[`${Kn}-${En}`]:En},cr,Dt==null?void 0:Dt.className,Bt,Ct),[$r]=vt(on),{__INTERNAL__:Mr}=$r;Mr.name=zt;const wr=(0,fe.useMemo)(()=>({name:zt,labelAlign:Rt,labelCol:In,labelWrap:Vt,wrapperCol:wn,vertical:Rn==="vertical",colon:Bn,requiredMark:Mn,itemRef:Mr.itemRef,form:$r,feedbackIcons:vn}),[zt,Rt,In,wn,Rn,Bn,Mn,$r,vn]);fe.useImperativeHandle(De,()=>$r);const ei=(Zr,Lr)=>{if(Zr){let Or={block:"nearest"};typeof Zr=="object"&&(Or=Zr),$r.scrollToField(Lr,Or)}},Xr=Zr=>{if(Un==null||Un(Zr),Zr.errorFields.length){const Lr=Zr.errorFields[0].name;if(Jn!==void 0){ei(Jn,Lr);return}Dt&&Dt.scrollToFirstError!==void 0&&ei(Dt.scrollToFirstError,Lr)}};return Vn(fe.createElement(We.n,{disabled:Ut},fe.createElement(lt.q,{size:En},fe.createElement(ce.RV,Object.assign({},{validateMessages:kn}),fe.createElement(ce.q3.Provider,{value:wr},fe.createElement(ct.default,Object.assign({id:zt},An,{name:zt,onFinishFailed:Xr,form:$r,style:Object.assign(Object.assign({},Dt==null?void 0:Dt.style),fn),className:fr})))))))};var pn=fe.forwardRef(Xt),hn=ee(41799),un=ee(8654),Xe=ee(92343),ke=ee(11592);function _e(Oe){if(typeof Oe=="function")return Oe;const De=(0,ke.Z)(Oe);return De.length<=1?De[0]:De}const Te=()=>{const{status:Oe,errors:De=[],warnings:Ke=[]}=(0,fe.useContext)(ce.aM);return{status:Oe,errors:De,warnings:Ke}};Te.Context=ce.aM;var Fe=Te,me=ee(16089);function at(Oe){const[De,Ke]=fe.useState(Oe),et=(0,fe.useRef)(null),rt=(0,fe.useRef)([]),Dt=(0,fe.useRef)(!1);fe.useEffect(()=>(Dt.current=!1,()=>{Dt.current=!0,me.Z.cancel(et.current),et.current=null}),[]);function Ft(Bt){Dt.current||(et.current===null&&(rt.current=[],et.current=(0,me.Z)(()=>{et.current=null,Ke(Ct=>{let Ht=Ct;return rt.current.forEach(Ut=>{Ht=Ut(Ht)}),Ht})})),rt.current.push(Bt))}return[De,Ft]}function Pt(){const{itemRef:Oe}=fe.useContext(ce.q3),De=fe.useRef({});function Ke(et,rt){const Dt=rt&&typeof rt=="object"&&rt.ref,Ft=et.join("_");return(De.current.name!==Ft||De.current.originRef!==Dt)&&(De.current.name=Ft,De.current.originRef=Dt,De.current.ref=(0,un.sQ)(Oe(et),Dt)),De.current.ref}return Ke}var Qe=ee(29194),Je=ee(34280),xt=ee(2738),ot=ee(27382),mt=ee(37028);const Nt=Oe=>{const{formItemCls:De}=Oe;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${De}-control`]:{display:"flex"}}}};var rn=(0,oe.b)(["Form","item-item"],(Oe,De)=>{let{rootPrefixCls:Ke}=De;const et=Ae(Oe,Ke);return[Nt(et)]}),Qt=Oe=>{const{prefixCls:De,status:Ke,wrapperCol:et,children:rt,errors:Dt,warnings:Ft,_internalItemRender:Bt,extra:Ct,help:Ht,fieldId:Ut,marginBottom:on,onErrorVisibleChanged:cn}=Oe,Rt=`${De}-item`,Vt=fe.useContext(ce.q3),In=et||Vt.wrapperCol||{},wn=Me()(`${Rt}-control`,In.className),Nn=fe.useMemo(()=>Object.assign({},Vt),[Vt]);delete Nn.labelCol,delete Nn.wrapperCol;const Rn=fe.createElement("div",{className:`${Rt}-control-input`},fe.createElement("div",{className:`${Rt}-control-input-content`},rt)),Jn=fe.useMemo(()=>({prefixCls:De,status:Ke}),[De,Ke]),Sn=on!==null||Dt.length||Ft.length?fe.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},fe.createElement(ce.Rk.Provider,{value:Jn},fe.createElement(Tt,{fieldId:Ut,errors:Dt,warnings:Ft,help:Ht,helpStatus:Ke,className:`${Rt}-explain-connected`,onVisibleChanged:cn})),!!on&&fe.createElement("div",{style:{width:0,height:on}})):null,Un={};Ut&&(Un.id=`${Ut}_extra`);const zt=Ct?fe.createElement("div",Object.assign({},Un,{className:`${Rt}-extra`}),Ct):null,fn=Bt&&Bt.mark==="pro_table_render"&&Bt.render?Bt.render(Oe,{input:Rn,errorList:Sn,extra:zt}):fe.createElement(fe.Fragment,null,Rn,Sn,zt);return fe.createElement(ce.q3.Provider,{value:Nn},fe.createElement(mt.Z,Object.assign({},In,{className:wn}),fn),fe.createElement(rn,{prefixCls:De}))},dn=ee(61485),At=ee(31724),Lt=ee(9763),qt=ee(6848),Tn=function(Oe,De){var Ke={};for(var et in Oe)Object.prototype.hasOwnProperty.call(Oe,et)&&De.indexOf(et)<0&&(Ke[et]=Oe[et]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,et=Object.getOwnPropertySymbols(Oe);rt<et.length;rt++)De.indexOf(et[rt])<0&&Object.prototype.propertyIsEnumerable.call(Oe,et[rt])&&(Ke[et[rt]]=Oe[et[rt]]);return Ke};function Jt(Oe){return Oe?typeof Oe=="object"&&!fe.isValidElement(Oe)?Oe:{title:Oe}:null}var zn=Oe=>{let{prefixCls:De,label:Ke,htmlFor:et,labelCol:rt,labelAlign:Dt,colon:Ft,required:Bt,requiredMark:Ct,tooltip:Ht}=Oe;var Ut;const[on]=(0,Lt.Z)("Form"),{vertical:cn,labelAlign:Rt,labelCol:Vt,labelWrap:In,colon:wn}=fe.useContext(ce.q3);if(!Ke)return null;const Nn=rt||Vt||{},Rn=Dt||Rt,Jn=`${De}-item-label`,Sn=Me()(Jn,Rn==="left"&&`${Jn}-left`,Nn.className,{[`${Jn}-wrap`]:!!In});let Un=Ke;const zt=Ft===!0||wn!==!1&&Ft!==!1;zt&&!cn&&typeof Ke=="string"&&Ke.trim()!==""&&(Un=Ke.replace(/[:|]\s*$/,""));const vn=Jt(Ht);if(vn){const{icon:Mn=fe.createElement(dn.Z,null)}=vn,Bn=Tn(vn,["icon"]),Kn=fe.createElement(qt.Z,Object.assign({},Bn),fe.cloneElement(Mn,{className:`${De}-item-tooltip`,title:""}));Un=fe.createElement(fe.Fragment,null,Un,Kn)}const An=Ct==="optional",En=typeof Ct=="function";En?Un=Ct(Un,{required:!!Bt}):An&&!Bt&&(Un=fe.createElement(fe.Fragment,null,Un,fe.createElement("span",{className:`${De}-item-optional`,title:""},(on==null?void 0:on.optional)||((Ut=At.Z.Form)===null||Ut===void 0?void 0:Ut.optional))));const kn=Me()({[`${De}-item-required`]:Bt,[`${De}-item-required-mark-optional`]:An||En,[`${De}-item-no-colon`]:!zt});return fe.createElement(mt.Z,Object.assign({},Nn,{className:Sn}),fe.createElement("label",{htmlFor:et,className:kn,title:typeof Ke=="string"?Ke:""},Un))},qn=ee(29679),Xn=ee(19248),vr=ee(96512),_r=ee(58617);const Qn={success:qn.Z,warning:vr.Z,error:Xn.Z,validating:_r.Z};function Cr(Oe){let{children:De,errors:Ke,warnings:et,hasFeedback:rt,validateStatus:Dt,prefixCls:Ft,meta:Bt,noStyle:Ct}=Oe;const Ht=`${Ft}-item`,{feedbackIcons:Ut}=fe.useContext(ce.q3),on=Kt(Ke,et,Bt,null,!!rt,Dt),{isFormItemInput:cn,status:Rt}=fe.useContext(ce.aM),Vt=fe.useMemo(()=>{var In;let wn;if(rt){const Jn=rt!==!0&&rt.icons||Ut,Sn=on&&((In=Jn==null?void 0:Jn({status:on,errors:Ke,warnings:et}))===null||In===void 0?void 0:In[on]),Un=on&&Qn[on];wn=Sn!==!1&&Un?fe.createElement("span",{className:Me()(`${Ht}-feedback-icon`,`${Ht}-feedback-icon-${on}`)},Sn||fe.createElement(Un,null)):null}let Nn=!0,Rn=on||"";return Ct&&(Nn=cn,Rn=(on!=null?on:Rt)||""),{status:Rn,errors:Ke,warnings:et,hasFeedback:!!rt,feedbackIcon:wn,isFormItemInput:Nn}},[on,rt,Ct,cn,Rt]);return fe.createElement(ce.aM.Provider,{value:Vt},De)}var ni=function(Oe,De){var Ke={};for(var et in Oe)Object.prototype.hasOwnProperty.call(Oe,et)&&De.indexOf(et)<0&&(Ke[et]=Oe[et]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,et=Object.getOwnPropertySymbols(Oe);rt<et.length;rt++)De.indexOf(et[rt])<0&&Object.prototype.propertyIsEnumerable.call(Oe,et[rt])&&(Ke[et[rt]]=Oe[et[rt]]);return Ke};function Jr(Oe){const{prefixCls:De,className:Ke,rootClassName:et,style:rt,help:Dt,errors:Ft,warnings:Bt,validateStatus:Ct,meta:Ht,hasFeedback:Ut,hidden:on,children:cn,fieldId:Rt,required:Vt,isRequired:In,onSubItemMetaChange:wn}=Oe,Nn=ni(Oe,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Rn=`${De}-item`,{requiredMark:Jn}=fe.useContext(ce.q3),Sn=fe.useRef(null),Un=ae(Ft),zt=ae(Bt),fn=Dt!=null,vn=!!(fn||Ft.length||Bt.length),An=!!Sn.current&&(0,Qe.Z)(Sn.current),[En,kn]=fe.useState(null);(0,Je.Z)(()=>{if(vn&&Sn.current){const cr=getComputedStyle(Sn.current);kn(parseInt(cr.marginBottom,10))}},[vn,An]);const Mn=cr=>{cr||kn(null)},Kn=function(){let cr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const fr=cr?Un:Ht.errors,$r=cr?zt:Ht.warnings;return Kt(fr,$r,Ht,"",!!Ut,Ct)}(),Vn=Me()(Rn,Ke,et,{[`${Rn}-with-help`]:fn||Un.length||zt.length,[`${Rn}-has-feedback`]:Kn&&Ut,[`${Rn}-has-success`]:Kn==="success",[`${Rn}-has-warning`]:Kn==="warning",[`${Rn}-has-error`]:Kn==="error",[`${Rn}-is-validating`]:Kn==="validating",[`${Rn}-hidden`]:on});return fe.createElement("div",{className:Vn,style:rt,ref:Sn},fe.createElement(ot.Z,Object.assign({className:`${Rn}-row`},(0,xt.Z)(Nn,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),fe.createElement(zn,Object.assign({htmlFor:Rt},Oe,{requiredMark:Jn,required:Vt!=null?Vt:In,prefixCls:De})),fe.createElement(Qt,Object.assign({},Oe,Ht,{errors:Un,warnings:zt,prefixCls:De,status:Kn,help:Dt,marginBottom:En,onErrorVisibleChanged:Mn}),fe.createElement(ce.qI.Provider,{value:wn},fe.createElement(Cr,{prefixCls:De,meta:Ht,errors:Ht.errors,warnings:Ht.warnings,hasFeedback:Ut,validateStatus:Kn},cn)))),!!En&&fe.createElement("div",{className:`${Rn}-margin-offset`,style:{marginBottom:-En}}))}const Yn="__SPLIT__",mr=null,si=fe.memo(Oe=>{let{children:De}=Oe;return De},(Oe,De)=>Oe.value===De.value&&Oe.update===De.update&&Oe.childProps.length===De.childProps.length&&Oe.childProps.every((Ke,et)=>Ke===De.childProps[et]));function or(Oe){return Oe!=null}function ii(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function ki(Oe){const{name:De,noStyle:Ke,className:et,dependencies:rt,prefixCls:Dt,shouldUpdate:Ft,rules:Bt,children:Ct,required:Ht,label:Ut,messageVariables:on,trigger:cn="onChange",validateTrigger:Rt,hidden:Vt,help:In}=Oe,{getPrefixCls:wn}=fe.useContext(Ot.E_),{name:Nn}=fe.useContext(ce.q3),Rn=_e(Ct),Jn=typeof Rn=="function",Sn=fe.useContext(ce.qI),{validateTrigger:Un}=fe.useContext(ct.FieldContext),zt=Rt!==void 0?Rt:Un,fn=or(De),vn=wn("form",Dt),[An,En]=it(vn),kn=fe.useContext(ct.ListContext),Mn=fe.useRef(),[Bn,Kn]=at({}),[Vn,cr]=(0,hn.Z)(()=>ii()),fr=Lr=>{const Or=kn==null?void 0:kn.getKey(Lr.name);if(cr(Lr.destroy?ii():Lr,!0),Ke&&In!==!1&&Sn){let Wr=Lr.name;if(Lr.destroy)Wr=Mn.current||Wr;else if(Or!==void 0){const[Pr,di]=Or;Wr=[Pr].concat((0,ne.Z)(di)),Mn.current=Wr}Sn(Lr,Wr)}},$r=(Lr,Or)=>{Kn(Wr=>{const Pr=Object.assign({},Wr),Ri=[].concat((0,ne.Z)(Lr.name.slice(0,-1)),(0,ne.Z)(Or)).join(Yn);return Lr.destroy?delete Pr[Ri]:Pr[Ri]=Lr,Pr})},[Mr,wr]=fe.useMemo(()=>{const Lr=(0,ne.Z)(Vn.errors),Or=(0,ne.Z)(Vn.warnings);return Object.values(Bn).forEach(Wr=>{Lr.push.apply(Lr,(0,ne.Z)(Wr.errors||[])),Or.push.apply(Or,(0,ne.Z)(Wr.warnings||[]))}),[Lr,Or]},[Bn,Vn.errors,Vn.warnings]),ei=Pt();function Xr(Lr,Or,Wr){return Ke&&!Vt?fe.createElement(Cr,{prefixCls:vn,hasFeedback:Oe.hasFeedback,validateStatus:Oe.validateStatus,meta:Vn,errors:Mr,warnings:wr,noStyle:!0},Lr):fe.createElement(Jr,Object.assign({key:"row"},Oe,{className:Me()(et,En),prefixCls:vn,fieldId:Or,isRequired:Wr,errors:Mr,warnings:wr,meta:Vn,onSubItemMetaChange:$r}),Lr)}if(!fn&&!Jn&&!rt)return An(Xr(Rn));let Zr={};return typeof Ut=="string"?Zr.label=Ut:De&&(Zr.label=String(De)),on&&(Zr=Object.assign(Object.assign({},Zr),on)),An(fe.createElement(ct.Field,Object.assign({},Oe,{messageVariables:Zr,trigger:cn,validateTrigger:zt,onMetaChange:fr}),(Lr,Or,Wr)=>{const Pr=wt(De).length&&Or?Or.name:[],di=Wt(Pr,Nn),Ri=Ht!==void 0?Ht:!!(Bt&&Bt.some(Zn=>{if(Zn&&typeof Zn=="object"&&Zn.required&&!Zn.warningOnly)return!0;if(typeof Zn=="function"){const Dr=Zn(Wr);return Dr&&Dr.required&&!Dr.warningOnly}return!1})),Vr=Object.assign({},Lr);let er=null;if(Array.isArray(Rn)&&fn)er=Rn;else if(!(Jn&&(!(Ft||rt)||fn))){if(!(rt&&!Jn&&!fn))if((0,Xe.l$)(Rn)){const Zn=Object.assign(Object.assign({},Rn.props),Vr);if(Zn.id||(Zn.id=di),In||Mr.length>0||wr.length>0||Oe.extra){const ri=[];(In||Mr.length>0)&&ri.push(`${di}_help`),Oe.extra&&ri.push(`${di}_extra`),Zn["aria-describedby"]=ri.join(" ")}Mr.length>0&&(Zn["aria-invalid"]="true"),Ri&&(Zn["aria-required"]="true"),(0,un.Yr)(Rn)&&(Zn.ref=ei(Pr,Rn)),new Set([].concat((0,ne.Z)(wt(cn)),(0,ne.Z)(wt(zt)))).forEach(ri=>{Zn[ri]=function(){for(var yi,jr,Bi,_i,oo,Fr=arguments.length,Nr=new Array(Fr),bi=0;bi<Fr;bi++)Nr[bi]=arguments[bi];(Bi=Vr[ri])===null||Bi===void 0||(yi=Bi).call.apply(yi,[Vr].concat(Nr)),(oo=(_i=Rn.props)[ri])===null||oo===void 0||(jr=oo).call.apply(jr,[_i].concat(Nr))}});const Sr=[Zn["aria-required"],Zn["aria-invalid"],Zn["aria-describedby"]];er=fe.createElement(si,{value:Vr[Oe.valuePropName||"value"],update:Rn,childProps:Sr},(0,Xe.Tm)(Rn,Zn))}else Jn&&(Ft||rt)&&!fn?er=Rn(Wr):er=Rn}return Xr(er,di,Ri)}))}const gi=ki;gi.useStatus=Fe;var Li=gi,ui=function(Oe,De){var Ke={};for(var et in Oe)Object.prototype.hasOwnProperty.call(Oe,et)&&De.indexOf(et)<0&&(Ke[et]=Oe[et]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,et=Object.getOwnPropertySymbols(Oe);rt<et.length;rt++)De.indexOf(et[rt])<0&&Object.prototype.propertyIsEnumerable.call(Oe,et[rt])&&(Ke[et[rt]]=Oe[et[rt]]);return Ke},Hr=Oe=>{var{prefixCls:De,children:Ke}=Oe,et=ui(Oe,["prefixCls","children"]);const{getPrefixCls:rt}=fe.useContext(Ot.E_),Dt=rt("form",De),Ft=fe.useMemo(()=>({prefixCls:Dt,status:"error"}),[Dt]);return fe.createElement(ct.List,Object.assign({},et),(Bt,Ct,Ht)=>fe.createElement(ce.Rk.Provider,{value:Ft},Ke(Bt.map(Ut=>Object.assign(Object.assign({},Ut),{fieldKey:Ut.key})),Ct,{errors:Ht.errors,warnings:Ht.warnings})))};function Cn(){const{form:Oe}=(0,fe.useContext)(ce.q3);return Oe}const Ee=pn;Ee.Item=Li,Ee.List=Hr,Ee.ErrorList=Tt,Ee.useForm=vt,Ee.useFormInstance=Cn,Ee.useWatch=ct.useWatch,Ee.Provider=ce.RV,Ee.create=()=>{};var je=Ee},8628:function(gn,kt,ee){"use strict";var ne=ee(59301),xe=ee(34280),Me=ee(56762),Ce=ee(69507);function fe(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const ce=(0,ne.useRef)({}),ae=(0,Me.Z)(),se=(0,Ce.ZP)();return(0,xe.Z)(()=>{const ve=se.subscribe(ue=>{ce.current=ue,he&&ae()});return()=>se.unsubscribe(ve)},[]),ce.current}kt.Z=fe},11611:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Ft}});var ne=ee(59301),xe=ee(15277),Me=ee(92310),Ce=ee.n(Me),fe=ee(60499),he=ee(85899),ce=ee(18642),ae=ee(72190),se=ee(43749),ve=ee(42244),ue=ee(55468),pe=ee(18929),oe=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],ge=ne.createContext(null),ye=0;function we(Bt,Ct){var Ht=ne.useState(function(){return ye+=1,String(ye)}),Ut=(0,ae.Z)(Ht,1),on=Ut[0],cn=ne.useContext(ge),Rt={data:Ct,canPreview:Bt};return ne.useEffect(function(){if(cn)return cn.register(on,Rt)},[]),ne.useEffect(function(){cn&&cn.register(on,Rt)},[Bt,Ct]),on}function Be(Bt){return new Promise(function(Ct){var Ht=document.createElement("img");Ht.onerror=function(){return Ct(!1)},Ht.onload=function(){return Ct(!0)},Ht.src=Bt})}function ze(Bt){var Ct=Bt.src,Ht=Bt.isCustomPlaceholder,Ut=Bt.fallback,on=(0,ne.useState)(Ht?"loading":"normal"),cn=(0,ae.Z)(on,2),Rt=cn[0],Vt=cn[1],In=(0,ne.useRef)(!1),wn=Rt==="error";(0,ne.useEffect)(function(){Be(Ct).then(function(Sn){Sn||Vt("error")})},[Ct]),(0,ne.useEffect)(function(){Ht&&!In.current?Vt("loading"):wn&&Vt("normal")},[Ct]);var Nn=function(){Vt("normal")},Rn=function(Un){In.current=!1,Rt==="loading"&&Un!=null&&Un.complete&&(Un.naturalWidth||Un.naturalHeight)&&(In.current=!0,Nn())},Jn=wn&&Ut?{src:Ut}:{onLoad:Nn,src:Ct};return[Rn,Jn,Rt]}var $e=ee(86923),Le=ee(8224),Ne=ee(10228),Re=ee(48736);function Se(Bt,Ct,Ht,Ut){var on=Ct+Ht,cn=(Ht-Ut)/2;if(Ht>Ut){if(Ct>0)return(0,ce.Z)({},Bt,cn);if(Ct<0&&on<Ut)return(0,ce.Z)({},Bt,-cn)}else if(Ct<0||on>Ut)return(0,ce.Z)({},Bt,Ct<0?cn:-cn);return{}}function Ie(Bt,Ct,Ht,Ut){var on=(0,ue.g1)(),cn=on.width,Rt=on.height,Vt=null;return Bt<=cn&&Ct<=Rt?Vt={x:0,y:0}:(Bt>cn||Ct>Rt)&&(Vt=(0,he.Z)((0,he.Z)({},Se("x",Ht,Bt,cn)),Se("y",Ut,Ct,Rt))),Vt}var Ae=ee(13697),it=ee(16089),Ue={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function gt(Bt,Ct,Ht,Ut){var on=(0,ne.useRef)(null),cn=(0,ne.useRef)([]),Rt=(0,ne.useState)(Ue),Vt=(0,ae.Z)(Rt,2),In=Vt[0],wn=Vt[1],Nn=function(Un){wn(Ue),Ut&&!(0,Ae.Z)(Ue,In)&&Ut({transform:Ue,action:Un})},Rn=function(Un,zt){on.current===null&&(cn.current=[],on.current=(0,it.Z)(function(){wn(function(fn){var vn=fn;return cn.current.forEach(function(An){vn=(0,he.Z)((0,he.Z)({},vn),An)}),on.current=null,Ut==null||Ut({transform:vn,action:zt}),vn})})),cn.current.push((0,he.Z)((0,he.Z)({},In),Un))},Jn=function(Un,zt,fn,vn){var An=Bt.current,En=An.width,kn=An.height,Mn=An.offsetWidth,Bn=An.offsetHeight,Kn=An.offsetLeft,Vn=An.offsetTop,cr=Un,fr=In.scale*Un;fr>Ht?(cr=Ht/In.scale,fr=Ht):fr<Ct&&(cr=Ct/In.scale,fr=Ct);var $r=fn!=null?fn:innerWidth/2,Mr=vn!=null?vn:innerHeight/2,wr=cr-1,ei=wr*En*.5,Xr=wr*kn*.5,Zr=wr*($r-In.x-Kn),Lr=wr*(Mr-In.y-Vn),Or=In.x-(Zr-ei),Wr=In.y-(Lr-Xr);if(Un<1&&fr===1){var Pr=Mn*fr,di=Bn*fr,Ri=(0,ue.g1)(),Vr=Ri.width,er=Ri.height;Pr<=Vr&&di<=er&&(Or=0,Wr=0)}Rn({x:Or,y:Wr,scale:fr},zt)};return{transform:In,resetTransform:Nn,updateTransform:Rn,dispatchZoomChange:Jn}}var Ve=ee(43403),Tt=ee(77900),ct=function(Ct){var Ht=Ct.visible,Ut=Ct.maskTransitionName,on=Ct.getContainer,cn=Ct.prefixCls,Rt=Ct.rootClassName,Vt=Ct.icons,In=Ct.countRender,wn=Ct.showSwitch,Nn=Ct.showProgress,Rn=Ct.current,Jn=Ct.transform,Sn=Ct.count,Un=Ct.scale,zt=Ct.minScale,fn=Ct.maxScale,vn=Ct.closeIcon,An=Ct.onSwitchLeft,En=Ct.onSwitchRight,kn=Ct.onClose,Mn=Ct.onZoomIn,Bn=Ct.onZoomOut,Kn=Ct.onRotateRight,Vn=Ct.onRotateLeft,cr=Ct.onFlipX,fr=Ct.onFlipY,$r=Ct.toolbarRender,Mr=(0,ne.useContext)(ge),wr=Vt.rotateLeft,ei=Vt.rotateRight,Xr=Vt.zoomIn,Zr=Vt.zoomOut,Lr=Vt.close,Or=Vt.left,Wr=Vt.right,Pr=Vt.flipX,di=Vt.flipY,Ri="".concat(cn,"-operations-operation");ne.useEffect(function(){var Dr=function(ri){ri.keyCode===Ne.Z.ESC&&kn()};return Ht&&window.addEventListener("keydown",Dr),function(){window.removeEventListener("keydown",Dr)}},[Ht]);var Vr=[{icon:di,onClick:fr,type:"flipY"},{icon:Pr,onClick:cr,type:"flipX"},{icon:wr,onClick:Vn,type:"rotateLeft"},{icon:ei,onClick:Kn,type:"rotateRight"},{icon:Zr,onClick:Bn,type:"zoomOut",disabled:Un===zt},{icon:Xr,onClick:Mn,type:"zoomIn",disabled:Un===fn}],er=Vr.map(function(Dr){var Sr,ri=Dr.icon,yi=Dr.onClick,jr=Dr.type,Bi=Dr.disabled;return ne.createElement("div",{className:Ce()(Ri,(Sr={},(0,ce.Z)(Sr,"".concat(cn,"-operations-operation-").concat(jr),!0),(0,ce.Z)(Sr,"".concat(cn,"-operations-operation-disabled"),!!Bi),Sr)),onClick:yi,key:jr},ri)}),Zn=ne.createElement("div",{className:"".concat(cn,"-operations")},er);return ne.createElement(Tt.default,{visible:Ht,motionName:Ut},function(Dr){var Sr=Dr.className,ri=Dr.style;return ne.createElement(Ve.Z,{open:!0,getContainer:on!=null?on:document.body},ne.createElement("div",{className:Ce()("".concat(cn,"-operations-wrapper"),Sr,Rt),style:ri},vn===null?null:ne.createElement("button",{className:"".concat(cn,"-close"),onClick:kn},vn||Lr),wn&&ne.createElement(ne.Fragment,null,ne.createElement("div",{className:Ce()("".concat(cn,"-switch-left"),(0,ce.Z)({},"".concat(cn,"-switch-left-disabled"),Rn===0)),onClick:An},Or),ne.createElement("div",{className:Ce()("".concat(cn,"-switch-right"),(0,ce.Z)({},"".concat(cn,"-switch-right-disabled"),Rn===Sn-1)),onClick:En},Wr)),ne.createElement("div",{className:"".concat(cn,"-footer")},Nn&&ne.createElement("div",{className:"".concat(cn,"-progress")},In?In(Rn+1,Sn):"".concat(Rn+1," / ").concat(Sn)),$r?$r(Zn,(0,he.Z)({icons:{flipYIcon:er[0],flipXIcon:er[1],rotateLeftIcon:er[2],rotateRightIcon:er[3],zoomOutIcon:er[4],zoomInIcon:er[5]},actions:{onFlipY:fr,onFlipX:cr,onRotateLeft:Vn,onRotateRight:Kn,onZoomOut:Bn,onZoomIn:Mn},transform:Jn},Mr?{current:Rn,total:Sn}:{})):Zn)))})},Ot=ct,We=1,lt=1,ut=["fallback","src","imgRef"],St=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],qe=function(Ct){var Ht=Ct.fallback,Ut=Ct.src,on=Ct.imgRef,cn=(0,ve.Z)(Ct,ut),Rt=ze({src:Ut,fallback:Ht}),Vt=(0,ae.Z)(Rt,2),In=Vt[0],wn=Vt[1];return ne.createElement("img",(0,fe.Z)({ref:function(Rn){on.current=Rn,In(Rn)}},cn,wn))},Ze=function(Ct){var Ht=Ct.prefixCls,Ut=Ct.src,on=Ct.alt,cn=Ct.fallback,Rt=Ct.movable,Vt=Rt===void 0?!0:Rt,In=Ct.onClose,wn=Ct.visible,Nn=Ct.icons,Rn=Nn===void 0?{}:Nn,Jn=Ct.rootClassName,Sn=Ct.closeIcon,Un=Ct.getContainer,zt=Ct.current,fn=zt===void 0?0:zt,vn=Ct.count,An=vn===void 0?1:vn,En=Ct.countRender,kn=Ct.scaleStep,Mn=kn===void 0?.5:kn,Bn=Ct.minScale,Kn=Bn===void 0?1:Bn,Vn=Ct.maxScale,cr=Vn===void 0?50:Vn,fr=Ct.transitionName,$r=fr===void 0?"zoom":fr,Mr=Ct.maskTransitionName,wr=Mr===void 0?"fade":Mr,ei=Ct.imageRender,Xr=Ct.imgCommonProps,Zr=Ct.toolbarRender,Lr=Ct.onTransform,Or=Ct.onChange,Wr=(0,ve.Z)(Ct,St),Pr=(0,ne.useRef)(),di=(0,ne.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),Ri=(0,ne.useState)(!1),Vr=(0,ae.Z)(Ri,2),er=Vr[0],Zn=Vr[1],Dr=(0,ne.useContext)(ge),Sr=Dr&&An>1,ri=Dr&&An>=1,yi=gt(Pr,Kn,cr,Lr),jr=yi.transform,Bi=yi.resetTransform,_i=yi.updateTransform,oo=yi.dispatchZoomChange,Fr=(0,ne.useState)(!0),Nr=(0,ae.Z)(Fr,2),bi=Nr[0],hi=Nr[1],Xi=jr.rotate,mo=jr.scale,Co=jr.x,ji=jr.y,_o=Ce()((0,ce.Z)({},"".concat(Ht,"-moving"),er));(0,ne.useEffect)(function(){bi||hi(!0)},[bi]);var vo=function(){Bi("close")},Er=function(){oo(We+Mn,"zoomIn")},Ar=function(){oo(We/(We+Mn),"zoomOut")},kr=function(){_i({rotate:Xi+90},"rotateRight")},Kr=function(){_i({rotate:Xi-90},"rotateLeft")},Hi=function(){_i({flipX:!jr.flipX},"flipX")},eo=function(){_i({flipY:!jr.flipY},"flipY")},io=function(Wi){Wi==null||Wi.preventDefault(),Wi==null||Wi.stopPropagation(),fn>0&&(hi(!1),Bi("prev"),Or==null||Or(fn-1,fn))},ao=function(Wi){Wi==null||Wi.preventDefault(),Wi==null||Wi.stopPropagation(),fn<An-1&&(hi(!1),Bi("next"),Or==null||Or(fn+1,fn))},to=function(){if(wn&&er){Zn(!1);var Wi=di.current,ta=Wi.transformX,Zo=Wi.transformY,no=Co!==ta&&ji!==Zo;if(!no)return;var ti=Pr.current.offsetWidth*mo,Fi=Pr.current.offsetHeight*mo,Ii=Pr.current.getBoundingClientRect(),Ci=Ii.left,ro=Ii.top,qi=Xi%180!==0,Bo=Ie(qi?Fi:ti,qi?ti:Fi,Ci,ro);Bo&&_i((0,he.Z)({},Bo),"dragRebound")}},Mo=function(Wi){!Vt||Wi.button!==0||(Wi.preventDefault(),Wi.stopPropagation(),di.current={deltaX:Wi.pageX-jr.x,deltaY:Wi.pageY-jr.y,transformX:jr.x,transformY:jr.y},Zn(!0))},Yo=function(Wi){wn&&er&&_i({x:Wi.pageX-di.current.deltaX,y:Wi.pageY-di.current.deltaY},"move")},Ho=function(Wi){if(!(!wn||Wi.deltaY==0)){var ta=Math.abs(Wi.deltaY/100),Zo=Math.min(ta,lt),no=We+Zo*Mn;Wi.deltaY>0&&(no=We/no),oo(no,"wheel",Wi.clientX,Wi.clientY)}},La=function(Wi){!wn||!Sr||(Wi.keyCode===Ne.Z.LEFT?io():Wi.keyCode===Ne.Z.RIGHT&&ao())},ha=function(Wi){wn&&(mo!==1?_i({x:0,y:0,scale:1},"doubleClick"):oo(We+Mn,"doubleClick",Wi.clientX,Wi.clientY))};(0,ne.useEffect)(function(){var Oo,Wi,ta,Zo;if(Vt){ta=(0,Le.Z)(window,"mouseup",to,!1),Zo=(0,Le.Z)(window,"mousemove",Yo,!1);try{window.top!==window.self&&(Oo=(0,Le.Z)(window.top,"mouseup",to,!1),Wi=(0,Le.Z)(window.top,"mousemove",Yo,!1))}catch(no){(0,Re.Kp)(!1,"[rc-image] ".concat(no))}}return function(){var no,ti,Fi,Ii;(no=ta)===null||no===void 0||no.remove(),(ti=Zo)===null||ti===void 0||ti.remove(),(Fi=Oo)===null||Fi===void 0||Fi.remove(),(Ii=Wi)===null||Ii===void 0||Ii.remove()}},[wn,er,Co,ji,Xi,Vt]),(0,ne.useEffect)(function(){var Oo=(0,Le.Z)(window,"keydown",La,!1);return function(){Oo.remove()}},[wn,Sr,fn]);var Ko=ne.createElement(qe,(0,fe.Z)({},Xr,{width:Ct.width,height:Ct.height,imgRef:Pr,className:"".concat(Ht,"-img"),alt:on,style:{transform:"translate3d(".concat(jr.x,"px, ").concat(jr.y,"px, 0) scale3d(").concat(jr.flipX?"-":"").concat(mo,", ").concat(jr.flipY?"-":"").concat(mo,", 1) rotate(").concat(Xi,"deg)"),transitionDuration:!bi&&"0s"},fallback:cn,src:Ut,onWheel:Ho,onMouseDown:Mo,onDoubleClick:ha}));return ne.createElement(ne.Fragment,null,ne.createElement($e.Z,(0,fe.Z)({transitionName:$r,maskTransitionName:wr,closable:!1,keyboard:!0,prefixCls:Ht,onClose:In,visible:wn,wrapClassName:_o,rootClassName:Jn,getContainer:Un},Wr,{afterClose:vo}),ne.createElement("div",{className:"".concat(Ht,"-img-wrapper")},ei?ei(Ko,(0,he.Z)({transform:jr},Dr?{current:fn}:{})):Ko)),ne.createElement(Ot,{visible:wn,transform:jr,maskTransitionName:wr,closeIcon:Sn,getContainer:Un,prefixCls:Ht,rootClassName:Jn,icons:Rn,countRender:En,showSwitch:Sr,showProgress:ri,current:fn,count:An,scale:mo,minScale:Kn,maxScale:cr,toolbarRender:Zr,onSwitchLeft:io,onSwitchRight:ao,onZoomIn:Er,onZoomOut:Ar,onRotateRight:kr,onRotateLeft:Kr,onFlipX:Hi,onFlipY:eo,onClose:In}))},wt=Ze,Wt=ee(77654);function Kt(Bt){var Ct=ne.useState({}),Ht=(0,ae.Z)(Ct,2),Ut=Ht[0],on=Ht[1],cn=ne.useCallback(function(Vt,In){return on(function(wn){return(0,he.Z)((0,he.Z)({},wn),{},(0,ce.Z)({},Vt,In))}),function(){on(function(wn){var Nn=(0,he.Z)({},wn);return delete Nn[Vt],Nn})}},[]),Rt=ne.useMemo(function(){return Bt?Bt.map(function(Vt){if(typeof Vt=="string")return{data:{src:Vt}};var In={};return Object.keys(Vt).forEach(function(wn){["src"].concat((0,Wt.Z)(oe)).includes(wn)&&(In[wn]=Vt[wn])}),{data:In}}):Object.keys(Ut).reduce(function(Vt,In){var wn=Ut[In],Nn=wn.canPreview,Rn=wn.data;return Nn&&Vt.push({data:Rn,id:In}),Vt},[])},[Bt,Ut]);return[Rt,cn]}var _t=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],vt=["src"],jt=function(Ct){var Ht,Ut=Ct.previewPrefixCls,on=Ut===void 0?"rc-image-preview":Ut,cn=Ct.children,Rt=Ct.icons,Vt=Rt===void 0?{}:Rt,In=Ct.items,wn=Ct.preview,Nn=Ct.fallback,Rn=(0,se.Z)(wn)==="object"?wn:{},Jn=Rn.visible,Sn=Rn.onVisibleChange,Un=Rn.getContainer,zt=Rn.current,fn=Rn.movable,vn=Rn.minScale,An=Rn.maxScale,En=Rn.countRender,kn=Rn.closeIcon,Mn=Rn.onChange,Bn=Rn.onTransform,Kn=Rn.toolbarRender,Vn=Rn.imageRender,cr=(0,ve.Z)(Rn,_t),fr=Kt(In),$r=(0,ae.Z)(fr,2),Mr=$r[0],wr=$r[1],ei=(0,pe.Z)(0,{value:zt}),Xr=(0,ae.Z)(ei,2),Zr=Xr[0],Lr=Xr[1],Or=(0,ne.useState)(!1),Wr=(0,ae.Z)(Or,2),Pr=Wr[0],di=Wr[1],Ri=((Ht=Mr[Zr])===null||Ht===void 0?void 0:Ht.data)||{},Vr=Ri.src,er=(0,ve.Z)(Ri,vt),Zn=(0,pe.Z)(!!Jn,{value:Jn,onChange:function(Xi,mo){Sn==null||Sn(Xi,mo,Zr)}}),Dr=(0,ae.Z)(Zn,2),Sr=Dr[0],ri=Dr[1],yi=(0,ne.useState)(null),jr=(0,ae.Z)(yi,2),Bi=jr[0],_i=jr[1],oo=ne.useCallback(function(hi,Xi,mo){var Co=Mr.findIndex(function(ji){return ji.id===hi});ri(!0),_i({x:Xi,y:mo}),Lr(Co<0?0:Co),di(!0)},[Mr]);ne.useEffect(function(){Sr?Pr||Lr(0):di(!1)},[Sr]);var Fr=function(Xi,mo){Lr(Xi),Mn==null||Mn(Xi,mo)},Nr=function(){ri(!1),_i(null)},bi=ne.useMemo(function(){return{register:wr,onPreview:oo}},[wr,oo]);return ne.createElement(ge.Provider,{value:bi},cn,ne.createElement(wt,(0,fe.Z)({"aria-hidden":!Sr,movable:fn,visible:Sr,prefixCls:on,closeIcon:kn,onClose:Nr,mousePosition:Bi,imgCommonProps:er,src:Vr,fallback:Nn,icons:Vt,minScale:vn,maxScale:An,getContainer:Un,current:Zr,count:Mr.length,countRender:En,onTransform:Bn,toolbarRender:Kn,imageRender:Vn,onChange:Fr},cr)))},yn=jt,Xt=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Ln=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],pn=function(Ct){var Ht=Ct.src,Ut=Ct.alt,on=Ct.onPreviewClose,cn=Ct.prefixCls,Rt=cn===void 0?"rc-image":cn,Vt=Ct.previewPrefixCls,In=Vt===void 0?"".concat(Rt,"-preview"):Vt,wn=Ct.placeholder,Nn=Ct.fallback,Rn=Ct.width,Jn=Ct.height,Sn=Ct.style,Un=Ct.preview,zt=Un===void 0?!0:Un,fn=Ct.className,vn=Ct.onClick,An=Ct.onError,En=Ct.wrapperClassName,kn=Ct.wrapperStyle,Mn=Ct.rootClassName,Bn=(0,ve.Z)(Ct,Xt),Kn=wn&&wn!==!0,Vn=(0,se.Z)(zt)==="object"?zt:{},cr=Vn.src,fr=Vn.visible,$r=fr===void 0?void 0:fr,Mr=Vn.onVisibleChange,wr=Mr===void 0?on:Mr,ei=Vn.getContainer,Xr=ei===void 0?void 0:ei,Zr=Vn.mask,Lr=Vn.maskClassName,Or=Vn.movable,Wr=Vn.icons,Pr=Vn.scaleStep,di=Vn.minScale,Ri=Vn.maxScale,Vr=Vn.imageRender,er=Vn.toolbarRender,Zn=(0,ve.Z)(Vn,Ln),Dr=cr!=null?cr:Ht,Sr=(0,pe.Z)(!!$r,{value:$r,onChange:wr}),ri=(0,ae.Z)(Sr,2),yi=ri[0],jr=ri[1],Bi=ze({src:Ht,isCustomPlaceholder:Kn,fallback:Nn}),_i=(0,ae.Z)(Bi,3),oo=_i[0],Fr=_i[1],Nr=_i[2],bi=(0,ne.useState)(null),hi=(0,ae.Z)(bi,2),Xi=hi[0],mo=hi[1],Co=(0,ne.useContext)(ge),ji=!!zt,_o=function(){jr(!1),mo(null)},vo=Ce()(Rt,En,Mn,(0,ce.Z)({},"".concat(Rt,"-error"),Nr==="error")),Er=(0,ne.useMemo)(function(){var Hi={};return oe.forEach(function(eo){Ct[eo]!==void 0&&(Hi[eo]=Ct[eo])}),Hi},oe.map(function(Hi){return Ct[Hi]})),Ar=(0,ne.useMemo)(function(){return(0,he.Z)((0,he.Z)({},Er),{},{src:Dr})},[Dr,Er]),kr=we(ji,Ar),Kr=function(eo){var io=(0,ue.os)(eo.target),ao=io.left,to=io.top;Co?Co.onPreview(kr,ao,to):(mo({x:ao,y:to}),jr(!0)),vn==null||vn(eo)};return ne.createElement(ne.Fragment,null,ne.createElement("div",(0,fe.Z)({},Bn,{className:vo,onClick:ji?Kr:vn,style:(0,he.Z)({width:Rn,height:Jn},kn)}),ne.createElement("img",(0,fe.Z)({},Er,{className:Ce()("".concat(Rt,"-img"),(0,ce.Z)({},"".concat(Rt,"-img-placeholder"),wn===!0),fn),style:(0,he.Z)({height:Jn},Sn),ref:oo},Fr,{width:Rn,height:Jn,onError:An})),Nr==="loading"&&ne.createElement("div",{"aria-hidden":"true",className:"".concat(Rt,"-placeholder")},wn),Zr&&ji&&ne.createElement("div",{className:Ce()("".concat(Rt,"-mask"),Lr),style:{display:(Sn==null?void 0:Sn.display)==="none"?"none":void 0}},Zr)),!Co&&ji&&ne.createElement(wt,(0,fe.Z)({"aria-hidden":!yi,visible:yi,prefixCls:In,onClose:_o,mousePosition:Xi,src:Dr,alt:Ut,fallback:Nn,getContainer:Xr,icons:Wr,movable:Or,scaleStep:Pr,minScale:di,maxScale:Ri,rootClassName:Mn,imageRender:Vr,imgCommonProps:Er,toolbarRender:er},Zn)))};pn.PreviewGroup=yn,pn.displayName="Image";var hn=pn,un=hn,Xe=ee(62892),ke=ee(36355),_e=ee(31724),Te=ee(99267),Fe=ee(33853),me=ee(38819),at={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},Pt=at,Qe=ee(7657),Je=function(Ct,Ht){return ne.createElement(Qe.Z,(0,fe.Z)({},Ct,{ref:Ht,icon:Pt}))},xt=ne.forwardRef(Je),ot=xt,mt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},Nt=mt,rn=function(Ct,Ht){return ne.createElement(Qe.Z,(0,fe.Z)({},Ct,{ref:Ht,icon:Nt}))},It=ne.forwardRef(rn),Qt=It,dn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},At=dn,Lt=function(Ct,Ht){return ne.createElement(Qe.Z,(0,fe.Z)({},Ct,{ref:Ht,icon:At}))},qt=ne.forwardRef(Lt),Tn=qt,Jt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},On=Jt,zn=function(Ct,Ht){return ne.createElement(Qe.Z,(0,fe.Z)({},Ct,{ref:Ht,icon:On}))},qn=ne.forwardRef(zn),Xn=qn,vr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},_r=vr,Qn=function(Ct,Ht){return ne.createElement(Qe.Z,(0,fe.Z)({},Ct,{ref:Ht,icon:_r}))},Cr=ne.forwardRef(Qn),ni=Cr,Jr=ee(64993),Yn=ee(73819),mr=ee(17313),si=ee(29878),or=ee(1950),ii=ee(83116),ki=ee(37613);const gi=Bt=>({position:Bt||"absolute",inset:0}),Li=Bt=>{const{iconCls:Ct,motionDurationSlow:Ht,paddingXXS:Ut,marginXXS:on,prefixCls:cn,colorTextLightSolid:Rt}=Bt;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:Rt,background:new Jr.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${Ht}`,[`.${cn}-mask-info`]:Object.assign(Object.assign({},mr.vS),{padding:`0 ${Ut}px`,[Ct]:{marginInlineEnd:on,svg:{verticalAlign:"baseline"}}})}},ui=Bt=>{const{previewCls:Ct,modalMaskBg:Ht,paddingSM:Ut,marginXL:on,margin:cn,paddingLG:Rt,previewOperationColorDisabled:Vt,previewOperationHoverColor:In,motionDurationSlow:wn,iconCls:Nn,colorTextLightSolid:Rn}=Bt,Jn=new Jr.C(Ht).setAlpha(.1),Sn=Jn.clone().setAlpha(.2);return{[`${Ct}-footer`]:{position:"fixed",bottom:on,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:Bt.previewOperationColor},[`${Ct}-progress`]:{marginBottom:cn},[`${Ct}-close`]:{position:"fixed",top:on,right:{_skip_check_:!0,value:on},display:"flex",color:Rn,backgroundColor:Jn.toRgbString(),borderRadius:"50%",padding:Ut,outline:0,border:0,cursor:"pointer",transition:`all ${wn}`,"&:hover":{backgroundColor:Sn.toRgbString()},[`& > ${Nn}`]:{fontSize:Bt.previewOperationSize}},[`${Ct}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${Rt}px`,backgroundColor:Jn.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:Ut,padding:Ut,cursor:"pointer",transition:`all ${wn}`,userSelect:"none",[`&:not(${Ct}-operations-operation-disabled):hover > ${Nn}`]:{color:In},"&-disabled":{color:Vt,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${Nn}`]:{fontSize:Bt.previewOperationSize}}}}},dr=Bt=>{const{modalMaskBg:Ct,iconCls:Ht,previewOperationColorDisabled:Ut,previewCls:on,zIndexPopup:cn,motionDurationSlow:Rt}=Bt,Vt=new Jr.C(Ct).setAlpha(.1),In=Vt.clone().setAlpha(.2);return{[`${on}-switch-left, ${on}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:cn+1,display:"flex",alignItems:"center",justifyContent:"center",width:Bt.imagePreviewSwitchSize,height:Bt.imagePreviewSwitchSize,marginTop:-Bt.imagePreviewSwitchSize/2,color:Bt.previewOperationColor,background:Vt.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${Rt}`,userSelect:"none","&:hover":{background:In.toRgbString()},"&-disabled":{"&, &:hover":{color:Ut,background:"transparent",cursor:"not-allowed",[`> ${Ht}`]:{cursor:"not-allowed"}}},[`> ${Ht}`]:{fontSize:Bt.previewOperationSize}},[`${on}-switch-left`]:{insetInlineStart:Bt.marginSM},[`${on}-switch-right`]:{insetInlineEnd:Bt.marginSM}}},Hr=Bt=>{const{motionEaseOut:Ct,previewCls:Ht,motionDurationSlow:Ut,componentCls:on}=Bt;return[{[`${on}-preview-root`]:{[Ht]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${Ht}-body`]:Object.assign(Object.assign({},gi()),{overflow:"hidden"}),[`${Ht}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${Ut} ${Ct} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},gi()),{transition:`transform ${Ut} ${Ct} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${Ht}-moving`]:{[`${Ht}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${on}-preview-root`]:{[`${Ht}-wrap`]:{zIndex:Bt.zIndexPopup}}},{[`${on}-preview-operations-wrapper`]:{position:"fixed",zIndex:Bt.zIndexPopup+1},"&":[ui(Bt),dr(Bt)]}]},Cn=Bt=>{const{componentCls:Ct}=Bt;return{[Ct]:{position:"relative",display:"inline-block",[`${Ct}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${Ct}-img-placeholder`]:{backgroundColor:Bt.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${Ct}-mask`]:Object.assign({},Li(Bt)),[`${Ct}-mask:hover`]:{opacity:1},[`${Ct}-placeholder`]:Object.assign({},gi())}}},Ee=Bt=>{const{previewCls:Ct}=Bt;return{[`${Ct}-root`]:(0,si._y)(Bt,"zoom"),"&":(0,or.J$)(Bt,!0)}};var je=(0,ii.Z)("Image",Bt=>{const Ct=`${Bt.componentCls}-preview`,Ht=(0,ki.TS)(Bt,{previewCls:Ct,modalMaskBg:new Jr.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:Bt.controlHeightLG});return[Cn(Ht),Hr(Ht),(0,Yn.QA)((0,ki.TS)(Ht,{componentCls:Ct})),Ee(Ht)]},Bt=>({zIndexPopup:Bt.zIndexPopupBase+80,previewOperationColor:new Jr.C(Bt.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new Jr.C(Bt.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new Jr.C(Bt.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:Bt.fontSizeIcon*1.5})),Oe=function(Bt,Ct){var Ht={};for(var Ut in Bt)Object.prototype.hasOwnProperty.call(Bt,Ut)&&Ct.indexOf(Ut)<0&&(Ht[Ut]=Bt[Ut]);if(Bt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,Ut=Object.getOwnPropertySymbols(Bt);on<Ut.length;on++)Ct.indexOf(Ut[on])<0&&Object.prototype.propertyIsEnumerable.call(Bt,Ut[on])&&(Ht[Ut[on]]=Bt[Ut[on]]);return Ht};const De={rotateLeft:ne.createElement(ot,null),rotateRight:ne.createElement(Qt,null),zoomIn:ne.createElement(Xn,null),zoomOut:ne.createElement(ni,null),close:ne.createElement(Te.Z,null),left:ne.createElement(Fe.Z,null),right:ne.createElement(me.Z,null),flipX:ne.createElement(Tn,null),flipY:ne.createElement(Tn,{rotate:90})};var et=Bt=>{var{previewPrefixCls:Ct,preview:Ht}=Bt,Ut=Oe(Bt,["previewPrefixCls","preview"]);const{getPrefixCls:on}=ne.useContext(ke.E_),cn=on("image",Ct),Rt=`${cn}-preview`,Vt=on(),[In,wn]=je(cn),Nn=ne.useMemo(()=>{var Rn;if(Ht===!1)return Ht;const Jn=typeof Ht=="object"?Ht:{},Sn=Ce()(wn,(Rn=Jn.rootClassName)!==null&&Rn!==void 0?Rn:"");return Object.assign(Object.assign({},Jn),{transitionName:(0,Xe.m)(Vt,"zoom",Jn.transitionName),maskTransitionName:(0,Xe.m)(Vt,"fade",Jn.maskTransitionName),rootClassName:Sn})},[Ht]);return In(ne.createElement(un.PreviewGroup,Object.assign({preview:Nn,previewPrefixCls:Rt,icons:De},Ut)))},rt=function(Bt,Ct){var Ht={};for(var Ut in Bt)Object.prototype.hasOwnProperty.call(Bt,Ut)&&Ct.indexOf(Ut)<0&&(Ht[Ut]=Bt[Ut]);if(Bt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,Ut=Object.getOwnPropertySymbols(Bt);on<Ut.length;on++)Ct.indexOf(Ut[on])<0&&Object.prototype.propertyIsEnumerable.call(Bt,Ut[on])&&(Ht[Ut[on]]=Bt[Ut[on]]);return Ht};const Dt=Bt=>{const{prefixCls:Ct,preview:Ht,className:Ut,rootClassName:on,style:cn}=Bt,Rt=rt(Bt,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:Vt,locale:In=_e.Z,getPopupContainer:wn,image:Nn}=ne.useContext(ke.E_),Rn=Vt("image",Ct),Jn=Vt(),Sn=In.Image||_e.Z.Image,[Un,zt]=je(Rn),fn=Ce()(on,zt),vn=Ce()(Ut,zt,Nn==null?void 0:Nn.className),An=ne.useMemo(()=>{if(Ht===!1)return Ht;const kn=typeof Ht=="object"?Ht:{},{getContainer:Mn}=kn,Bn=rt(kn,["getContainer"]);return Object.assign(Object.assign({mask:ne.createElement("div",{className:`${Rn}-mask-info`},ne.createElement(xe.Z,null),Sn==null?void 0:Sn.preview),icons:De},Bn),{getContainer:Mn||wn,transitionName:(0,Xe.m)(Jn,"zoom",kn.transitionName),maskTransitionName:(0,Xe.m)(Jn,"fade",kn.maskTransitionName)})},[Ht,Sn]),En=Object.assign(Object.assign({},Nn==null?void 0:Nn.style),cn);return Un(ne.createElement(un,Object.assign({prefixCls:Rn,preview:An,rootClassName:fn,className:vn,style:En},Rt)))};Dt.PreviewGroup=et;var Ft=Dt},5871:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return dn}});var ne=ee(84105),xe=ee(87395),Me=ee(92310),Ce=ee.n(Me),fe=ee(60499),he=ee(18642),ce=ee(43749),ae=ee(72190),se=ee(42244),ve=ee(38705),ue=ee(17212);function pe(){return typeof BigInt=="function"}function oe(At){return!At&&At!==0&&!Number.isNaN(At)||!String(At).trim()}function ge(At){var Lt=At.trim(),qt=Lt.startsWith("-");qt&&(Lt=Lt.slice(1)),Lt=Lt.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),Lt.startsWith(".")&&(Lt="0".concat(Lt));var Tn=Lt||"0",Jt=Tn.split("."),On=Jt[0]||"0",zn=Jt[1]||"0";On==="0"&&zn==="0"&&(qt=!1);var qn=qt?"-":"";return{negative:qt,negativeStr:qn,trimStr:Tn,integerStr:On,decimalStr:zn,fullStr:"".concat(qn).concat(Tn)}}function ye(At){var Lt=String(At);return!Number.isNaN(Number(Lt))&&Lt.includes("e")}function we(At){var Lt=String(At);if(ye(At)){var qt=Number(Lt.slice(Lt.indexOf("e-")+2)),Tn=Lt.match(/\.(\d+)/);return Tn!=null&&Tn[1]&&(qt+=Tn[1].length),qt}return Lt.includes(".")&&ze(Lt)?Lt.length-Lt.indexOf(".")-1:0}function Be(At){var Lt=String(At);if(ye(At)){if(At>Number.MAX_SAFE_INTEGER)return String(pe()?BigInt(At).toString():Number.MAX_SAFE_INTEGER);if(At<Number.MIN_SAFE_INTEGER)return String(pe()?BigInt(At).toString():Number.MIN_SAFE_INTEGER);Lt=At.toFixed(we(Lt))}return ge(Lt).fullStr}function ze(At){return typeof At=="number"?!Number.isNaN(At):At?/^\s*-?\d+(\.\d+)?\s*$/.test(At)||/^\s*-?\d+\.\s*$/.test(At)||/^\s*-?\.\d+\s*$/.test(At):!1}var $e=function(){function At(Lt){if((0,ve.Z)(this,At),(0,he.Z)(this,"origin",""),(0,he.Z)(this,"negative",void 0),(0,he.Z)(this,"integer",void 0),(0,he.Z)(this,"decimal",void 0),(0,he.Z)(this,"decimalLen",void 0),(0,he.Z)(this,"empty",void 0),(0,he.Z)(this,"nan",void 0),oe(Lt)){this.empty=!0;return}if(this.origin=String(Lt),Lt==="-"||Number.isNaN(Lt)){this.nan=!0;return}var qt=Lt;if(ye(qt)&&(qt=Number(qt)),qt=typeof qt=="string"?qt:Be(qt),ze(qt)){var Tn=ge(qt);this.negative=Tn.negative;var Jt=Tn.trimStr.split(".");this.integer=BigInt(Jt[0]);var On=Jt[1]||"0";this.decimal=BigInt(On),this.decimalLen=On.length}else this.nan=!0}return(0,ue.Z)(At,[{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(qt){var Tn="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(qt,"0"));return BigInt(Tn)}},{key:"negate",value:function(){var qt=new At(this.toString());return qt.negative=!qt.negative,qt}},{key:"cal",value:function(qt,Tn,Jt){var On=Math.max(this.getDecimalStr().length,qt.getDecimalStr().length),zn=this.alignDecimal(On),qn=qt.alignDecimal(On),Xn=Tn(zn,qn).toString(),vr=Jt(On),_r=ge(Xn),Qn=_r.negativeStr,Cr=_r.trimStr,ni="".concat(Qn).concat(Cr.padStart(vr+1,"0"));return new At("".concat(ni.slice(0,-vr),".").concat(ni.slice(-vr)))}},{key:"add",value:function(qt){if(this.isInvalidate())return new At(qt);var Tn=new At(qt);return Tn.isInvalidate()?this:this.cal(Tn,function(Jt,On){return Jt+On},function(Jt){return Jt})}},{key:"multi",value:function(qt){var Tn=new At(qt);return this.isInvalidate()||Tn.isInvalidate()?new At(NaN):this.cal(Tn,function(Jt,On){return Jt*On},function(Jt){return Jt*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(qt){return this.toString()===(qt==null?void 0:qt.toString())}},{key:"lessEquals",value:function(qt){return this.add(qt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var qt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return qt?this.isInvalidate()?"":ge("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),At}(),Le=function(){function At(Lt){if((0,ve.Z)(this,At),(0,he.Z)(this,"origin",""),(0,he.Z)(this,"number",void 0),(0,he.Z)(this,"empty",void 0),oe(Lt)){this.empty=!0;return}this.origin=String(Lt),this.number=Number(Lt)}return(0,ue.Z)(At,[{key:"negate",value:function(){return new At(-this.toNumber())}},{key:"add",value:function(qt){if(this.isInvalidate())return new At(qt);var Tn=Number(qt);if(Number.isNaN(Tn))return this;var Jt=this.number+Tn;if(Jt>Number.MAX_SAFE_INTEGER)return new At(Number.MAX_SAFE_INTEGER);if(Jt<Number.MIN_SAFE_INTEGER)return new At(Number.MIN_SAFE_INTEGER);var On=Math.max(we(this.number),we(Tn));return new At(Jt.toFixed(On))}},{key:"multi",value:function(qt){var Tn=Number(qt);if(this.isInvalidate()||Number.isNaN(Tn))return new At(NaN);var Jt=this.number*Tn;if(Jt>Number.MAX_SAFE_INTEGER)return new At(Number.MAX_SAFE_INTEGER);if(Jt<Number.MIN_SAFE_INTEGER)return new At(Number.MIN_SAFE_INTEGER);var On=Math.max(we(this.number),we(Tn));return new At(Jt.toFixed(On))}},{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(qt){return this.toNumber()===(qt==null?void 0:qt.toNumber())}},{key:"lessEquals",value:function(qt){return this.add(qt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var qt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return qt?this.isInvalidate()?"":Be(this.number):this.origin}}]),At}();function Ne(At){return pe()?new $e(At):new Le(At)}function Re(At,Lt,qt){var Tn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(At==="")return"";var Jt=ge(At),On=Jt.negativeStr,zn=Jt.integerStr,qn=Jt.decimalStr,Xn="".concat(Lt).concat(qn),vr="".concat(On).concat(zn);if(qt>=0){var _r=Number(qn[qt]);if(_r>=5&&!Tn){var Qn=Ne(At).add("".concat(On,"0.").concat("0".repeat(qt)).concat(10-_r));return Re(Qn.toString(),Lt,qt,Tn)}return qt===0?vr:"".concat(vr).concat(Lt).concat(qn.padEnd(qt,"0").slice(0,qt))}return Xn===".0"?vr:"".concat(vr).concat(Xn)}var Se=Ne,Ie=ee(93681),Ae=ee(34280),it=ee(8654),Ue=ee(59301),gt=ee(48736);function Ve(At,Lt){var qt=(0,Ue.useRef)(null);function Tn(){try{var On=At.selectionStart,zn=At.selectionEnd,qn=At.value,Xn=qn.substring(0,On),vr=qn.substring(zn);qt.current={start:On,end:zn,value:qn,beforeTxt:Xn,afterTxt:vr}}catch(_r){}}function Jt(){if(At&&qt.current&&Lt)try{var On=At.value,zn=qt.current,qn=zn.beforeTxt,Xn=zn.afterTxt,vr=zn.start,_r=On.length;if(On.endsWith(Xn))_r=On.length-qt.current.afterTxt.length;else if(On.startsWith(qn))_r=qn.length;else{var Qn=qn[vr-1],Cr=On.indexOf(Qn,vr-1);Cr!==-1&&(_r=Cr+1)}At.setSelectionRange(_r,_r)}catch(ni){(0,gt.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(ni.message))}}return[Tn,Jt]}var Tt=ee(49658),ct=function(){var Lt=(0,Ue.useState)(!1),qt=(0,ae.Z)(Lt,2),Tn=qt[0],Jt=qt[1];return(0,Ae.Z)(function(){Jt((0,Tt.Z)())},[]),Tn},Ot=ct,We=ee(16089),lt=200,ut=600;function St(At){var Lt=At.prefixCls,qt=At.upNode,Tn=At.downNode,Jt=At.upDisabled,On=At.downDisabled,zn=At.onStep,qn=Ue.useRef(),Xn=Ue.useRef([]),vr=Ue.useRef();vr.current=zn;var _r=function(){clearTimeout(qn.current)},Qn=function(ii,ki){ii.preventDefault(),_r(),vr.current(ki);function gi(){vr.current(ki),qn.current=setTimeout(gi,lt)}qn.current=setTimeout(gi,ut)};Ue.useEffect(function(){return function(){_r(),Xn.current.forEach(function(or){return We.Z.cancel(or)})}},[]);var Cr=Ot();if(Cr)return null;var ni="".concat(Lt,"-handler"),Jr=Ce()(ni,"".concat(ni,"-up"),(0,he.Z)({},"".concat(ni,"-up-disabled"),Jt)),Yn=Ce()(ni,"".concat(ni,"-down"),(0,he.Z)({},"".concat(ni,"-down-disabled"),On)),mr=function(){return Xn.current.push((0,We.Z)(_r))},si={unselectable:"on",role:"button",onMouseUp:mr,onMouseLeave:mr};return Ue.createElement("div",{className:"".concat(ni,"-wrap")},Ue.createElement("span",(0,fe.Z)({},si,{onMouseDown:function(ii){Qn(ii,!0)},"aria-label":"Increase Value","aria-disabled":Jt,className:Jr}),qt||Ue.createElement("span",{unselectable:"on",className:"".concat(Lt,"-handler-up-inner")})),Ue.createElement("span",(0,fe.Z)({},si,{onMouseDown:function(ii){Qn(ii,!1)},"aria-label":"Decrease Value","aria-disabled":On,className:Yn}),Tn||Ue.createElement("span",{unselectable:"on",className:"".concat(Lt,"-handler-down-inner")})))}function qe(At){var Lt=typeof At=="number"?Be(At):ge(At).fullStr,qt=Lt.includes(".");return qt?ge(Lt.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:At+"0"}var Ze=ee(5643),wt=function(){var At=(0,Ue.useRef)(0),Lt=function(){We.Z.cancel(At.current)};return(0,Ue.useEffect)(function(){return Lt},[]),function(qt){Lt(),At.current=(0,We.Z)(function(){qt()})}},Wt=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Kt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],_t=function(Lt,qt){return Lt||qt.isEmpty()?qt.toString():qt.toNumber()},vt=function(Lt){var qt=Se(Lt);return qt.isInvalidate()?null:qt},jt=Ue.forwardRef(function(At,Lt){var qt,Tn=At.prefixCls,Jt=Tn===void 0?"rc-input-number":Tn,On=At.className,zn=At.style,qn=At.min,Xn=At.max,vr=At.step,_r=vr===void 0?1:vr,Qn=At.defaultValue,Cr=At.value,ni=At.disabled,Jr=At.readOnly,Yn=At.upHandler,mr=At.downHandler,si=At.keyboard,or=At.controls,ii=or===void 0?!0:or,ki=At.classNames,gi=At.stringMode,Li=At.parser,ui=At.formatter,dr=At.precision,Hr=At.decimalSeparator,Cn=At.onChange,Ee=At.onInput,je=At.onPressEnter,Oe=At.onStep,De=(0,se.Z)(At,Wt),Ke="".concat(Jt,"-input"),et=Ue.useRef(null),rt=Ue.useState(!1),Dt=(0,ae.Z)(rt,2),Ft=Dt[0],Bt=Dt[1],Ct=Ue.useRef(!1),Ht=Ue.useRef(!1),Ut=Ue.useRef(!1),on=Ue.useState(function(){return Se(Cr!=null?Cr:Qn)}),cn=(0,ae.Z)(on,2),Rt=cn[0],Vt=cn[1];function In(er){Cr===void 0&&Vt(er)}var wn=Ue.useCallback(function(er,Zn){if(!Zn)return dr>=0?dr:Math.max(we(er),we(_r))},[dr,_r]),Nn=Ue.useCallback(function(er){var Zn=String(er);if(Li)return Li(Zn);var Dr=Zn;return Hr&&(Dr=Dr.replace(Hr,".")),Dr.replace(/[^\w.-]+/g,"")},[Li,Hr]),Rn=Ue.useRef(""),Jn=Ue.useCallback(function(er,Zn){if(ui)return ui(er,{userTyping:Zn,input:String(Rn.current)});var Dr=typeof er=="number"?Be(er):er;if(!Zn){var Sr=wn(Dr,Zn);if(ze(Dr)&&(Hr||Sr>=0)){var ri=Hr||".";Dr=Re(Dr,ri,Sr)}}return Dr},[ui,wn,Hr]),Sn=Ue.useState(function(){var er=Qn!=null?Qn:Cr;return Rt.isInvalidate()&&["string","number"].includes((0,ce.Z)(er))?Number.isNaN(er)?"":er:Jn(Rt.toString(),!1)}),Un=(0,ae.Z)(Sn,2),zt=Un[0],fn=Un[1];Rn.current=zt;function vn(er,Zn){fn(Jn(er.isInvalidate()?er.toString(!1):er.toString(!Zn),Zn))}var An=Ue.useMemo(function(){return vt(Xn)},[Xn,dr]),En=Ue.useMemo(function(){return vt(qn)},[qn,dr]),kn=Ue.useMemo(function(){return!An||!Rt||Rt.isInvalidate()?!1:An.lessEquals(Rt)},[An,Rt]),Mn=Ue.useMemo(function(){return!En||!Rt||Rt.isInvalidate()?!1:Rt.lessEquals(En)},[En,Rt]),Bn=Ve(et.current,Ft),Kn=(0,ae.Z)(Bn,2),Vn=Kn[0],cr=Kn[1],fr=function(Zn){return An&&!Zn.lessEquals(An)?An:En&&!En.lessEquals(Zn)?En:null},$r=function(Zn){return!fr(Zn)},Mr=function(Zn,Dr){var Sr=Zn,ri=$r(Sr)||Sr.isEmpty();if(!Sr.isEmpty()&&!Dr&&(Sr=fr(Sr)||Sr,ri=!0),!Jr&&!ni&&ri){var yi=Sr.toString(),jr=wn(yi,Dr);return jr>=0&&(Sr=Se(Re(yi,".",jr)),$r(Sr)||(Sr=Se(Re(yi,".",jr,!0)))),Sr.equals(Rt)||(In(Sr),Cn==null||Cn(Sr.isEmpty()?null:_t(gi,Sr)),Cr===void 0&&vn(Sr,Dr)),Sr}return Rt},wr=wt(),ei=function er(Zn){if(Vn(),Rn.current=Zn,fn(Zn),!Ht.current){var Dr=Nn(Zn),Sr=Se(Dr);Sr.isNaN()||Mr(Sr,!0)}Ee==null||Ee(Zn),wr(function(){var ri=Zn;Li||(ri=Zn.replace(/。/g,".")),ri!==Zn&&er(ri)})},Xr=function(){Ht.current=!0},Zr=function(){Ht.current=!1,ei(et.current.value)},Lr=function(Zn){ei(Zn.target.value)},Or=function(Zn){var Dr;if(!(Zn&&kn||!Zn&&Mn)){Ct.current=!1;var Sr=Se(Ut.current?qe(_r):_r);Zn||(Sr=Sr.negate());var ri=(Rt||Se(0)).add(Sr.toString()),yi=Mr(ri,!1);Oe==null||Oe(_t(gi,yi),{offset:Ut.current?qe(_r):_r,type:Zn?"up":"down"}),(Dr=et.current)===null||Dr===void 0||Dr.focus()}},Wr=function(Zn){var Dr=Se(Nn(zt)),Sr=Dr;Dr.isNaN()?Sr=Mr(Rt,Zn):Sr=Mr(Dr,Zn),Cr!==void 0?vn(Rt,!1):Sr.isNaN()||vn(Sr,!1)},Pr=function(){Ct.current=!0},di=function(Zn){var Dr=Zn.key,Sr=Zn.shiftKey;Ct.current=!0,Ut.current=Sr,Dr==="Enter"&&(Ht.current||(Ct.current=!1),Wr(!1),je==null||je(Zn)),si!==!1&&!Ht.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Dr)&&(Or(Dr==="Up"||Dr==="ArrowUp"),Zn.preventDefault())},Ri=function(){Ct.current=!1,Ut.current=!1},Vr=function(){Wr(!1),Bt(!1),Ct.current=!1};return(0,Ae.o)(function(){Rt.isInvalidate()||vn(Rt,!1)},[dr]),(0,Ae.o)(function(){var er=Se(Cr);Vt(er);var Zn=Se(Nn(zt));(!er.equals(Zn)||!Ct.current||ui)&&vn(er,Ct.current)},[Cr]),(0,Ae.o)(function(){ui&&cr()},[zt]),Ue.createElement("div",{className:Ce()(Jt,ki==null?void 0:ki.input,On,(qt={},(0,he.Z)(qt,"".concat(Jt,"-focused"),Ft),(0,he.Z)(qt,"".concat(Jt,"-disabled"),ni),(0,he.Z)(qt,"".concat(Jt,"-readonly"),Jr),(0,he.Z)(qt,"".concat(Jt,"-not-a-number"),Rt.isNaN()),(0,he.Z)(qt,"".concat(Jt,"-out-of-range"),!Rt.isInvalidate()&&!$r(Rt)),qt)),style:zn,onFocus:function(){Bt(!0)},onBlur:Vr,onKeyDown:di,onKeyUp:Ri,onCompositionStart:Xr,onCompositionEnd:Zr,onBeforeInput:Pr},ii&&Ue.createElement(St,{prefixCls:Jt,upNode:Yn,downNode:mr,upDisabled:kn,downDisabled:Mn,onStep:Or}),Ue.createElement("div",{className:"".concat(Ke,"-wrap")},Ue.createElement("input",(0,fe.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":qn,"aria-valuemax":Xn,"aria-valuenow":Rt.isInvalidate()?null:Rt.toString(),step:_r},De,{ref:(0,it.sQ)(et,Lt),className:Ke,value:zt,onChange:Lr,disabled:ni,readOnly:Jr}))))}),yn=Ue.forwardRef(function(At,Lt){var qt=At.disabled,Tn=At.style,Jt=At.prefixCls,On=At.value,zn=At.prefix,qn=At.suffix,Xn=At.addonBefore,vr=At.addonAfter,_r=At.classes,Qn=At.className,Cr=At.classNames,ni=(0,se.Z)(At,Kt),Jr=Ue.useRef(null),Yn=function(si){Jr.current&&(0,Ze.nH)(Jr.current,si)};return Ue.createElement(Ie.BaseInput,{inputElement:Ue.createElement(jt,(0,fe.Z)({prefixCls:Jt,disabled:qt,classNames:Cr,ref:(0,it.sQ)(Jr,Lt)},ni)),className:Qn,triggerFocus:Yn,prefixCls:Jt,value:On,disabled:qt,style:Tn,prefix:zn,suffix:qn,addonAfter:vr,addonBefore:Xn,classes:_r,classNames:Cr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});yn.displayName="InputNumber";var Xt=yn,Ln=Xt,pn=ee(19080),hn=ee(36355),un=ee(92736),Xe=ee(1684),ke=ee(19716),_e=ee(32441),Te=ee(33234),Fe=ee(9937),me=ee(17313),at=ee(74207),Pt=ee(83116),Qe=ee(37613);const Je=(At,Lt)=>{let{componentCls:qt,borderRadiusSM:Tn,borderRadiusLG:Jt}=At;const On=Lt==="lg"?Jt:Tn;return{[`&-${Lt}`]:{[`${qt}-handler-wrap`]:{borderStartEndRadius:On,borderEndEndRadius:On},[`${qt}-handler-up`]:{borderStartEndRadius:On},[`${qt}-handler-down`]:{borderEndEndRadius:On}}}},xt=At=>{const{componentCls:Lt,lineWidth:qt,lineType:Tn,colorBorder:Jt,borderRadius:On,fontSizeLG:zn,controlHeightLG:qn,controlHeightSM:Xn,colorError:vr,paddingInlineSM:_r,colorTextDescription:Qn,motionDurationMid:Cr,handleHoverColor:ni,paddingInline:Jr,paddingBlock:Yn,handleBg:mr,handleActiveBg:si,colorTextDisabled:or,borderRadiusSM:ii,borderRadiusLG:ki,controlWidth:gi,handleVisible:Li,handleBorderColor:ui}=At;return[{[Lt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,me.Wf)(At)),(0,Fe.ik)(At)),(0,Fe.bi)(At,Lt)),{display:"inline-block",width:gi,margin:0,padding:0,border:`${qt}px ${Tn} ${Jt}`,borderRadius:On,"&-rtl":{direction:"rtl",[`${Lt}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:zn,borderRadius:ki,[`input${Lt}-input`]:{height:qn-2*qt}},"&-sm":{padding:0,borderRadius:ii,[`input${Lt}-input`]:{height:Xn-2*qt,padding:`0 ${_r}px`}},"&:hover":Object.assign({},(0,Fe.pU)(At)),"&-focused":Object.assign({},(0,Fe.M1)(At)),"&-out-of-range":{[`${Lt}-input-wrap`]:{input:{color:vr}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,me.Wf)(At)),(0,Fe.s7)(At)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${Lt}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${Lt}-group-addon`]:{borderRadius:ki,fontSize:At.fontSizeLG}},"&-sm":{[`${Lt}-group-addon`]:{borderRadius:ii}},[`${Lt}-wrapper-disabled > ${Lt}-group-addon`]:Object.assign({},(0,Fe.Xy)(At))}}),[`&-disabled ${Lt}-input`]:{cursor:"not-allowed"},[Lt]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,me.Wf)(At)),{width:"100%",padding:`${Yn}px ${Jr}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:On,outline:0,transition:`all ${Cr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Fe.nz)(At.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[Lt]:Object.assign(Object.assign(Object.assign({[`&:hover ${Lt}-handler-wrap, &-focused ${Lt}-handler-wrap`]:{opacity:1},[`${Lt}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:At.handleWidth,height:"100%",background:mr,borderStartStartRadius:0,borderStartEndRadius:On,borderEndEndRadius:On,borderEndStartRadius:0,opacity:Li===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${Cr} linear ${Cr}`,[`${Lt}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
${Lt}-handler-up-inner,
${Lt}-handler-down-inner
`]:{marginInlineEnd:0,fontSize:At.handleFontSize}}},[`${Lt}-handler`]:{height:"50%",overflow:"hidden",color:Qn,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${qt}px ${Tn} ${ui}`,transition:`all ${Cr} linear`,"&:active":{background:si},"&:hover":{height:"60%",[`
${Lt}-handler-up-inner,
${Lt}-handler-down-inner
`]:{color:ni}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,me.Ro)()),{color:Qn,transition:`all ${Cr} linear`,userSelect:"none"})},[`${Lt}-handler-up`]:{borderStartEndRadius:On},[`${Lt}-handler-down`]:{borderBlockStart:`${qt}px ${Tn} ${ui}`,borderEndEndRadius:On}},Je(At,"lg")),Je(At,"sm")),{"&-disabled, &-readonly":{[`${Lt}-handler-wrap`]:{display:"none"},[`${Lt}-input`]:{color:"inherit"}},[`
${Lt}-handler-up-disabled,
${Lt}-handler-down-disabled
`]:{cursor:"not-allowed"},[`
${Lt}-handler-up-disabled:hover &-handler-up-inner,
${Lt}-handler-down-disabled:hover &-handler-down-inner
`]:{color:or}})},{[`${Lt}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${Lt}-handler-down`]:{borderBlockStartWidth:0}}}]},ot=At=>{const{componentCls:Lt,paddingBlock:qt,paddingInline:Tn,inputAffixPadding:Jt,controlWidth:On,borderRadiusLG:zn,borderRadiusSM:qn}=At;return{[`${Lt}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,Fe.ik)(At)),(0,Fe.bi)(At,`${Lt}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:On,padding:0,paddingInlineStart:Tn,"&-lg":{borderRadius:zn},"&-sm":{borderRadius:qn},[`&:not(${Lt}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,Fe.pU)(At)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${Lt}-disabled`]:{background:"transparent"},[`> div${Lt}`]:{width:"100%",border:"none",outline:"none",[`&${Lt}-focused`]:{boxShadow:"none !important"}},[`input${Lt}-input`]:{padding:`${qt}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Lt}-handler-wrap`]:{zIndex:2},[Lt]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Jt},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:Tn,marginInlineStart:Jt}}})}};var mt=(0,Pt.Z)("InputNumber",At=>{const Lt=(0,Qe.TS)(At,(0,Fe.e5)(At));return[xt(Lt),ot(Lt),(0,at.c)(Lt)]},At=>Object.assign(Object.assign({},(0,Fe.TM)(At)),{controlWidth:90,handleWidth:At.controlHeightSM-At.lineWidth*2,handleFontSize:At.fontSize/2,handleVisible:"auto",handleActiveBg:At.colorFillAlter,handleBg:At.colorBgContainer,handleHoverColor:At.colorPrimary,handleBorderColor:At.colorBorder})),Nt=function(At,Lt){var qt={};for(var Tn in At)Object.prototype.hasOwnProperty.call(At,Tn)&&Lt.indexOf(Tn)<0&&(qt[Tn]=At[Tn]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,Tn=Object.getOwnPropertySymbols(At);Jt<Tn.length;Jt++)Lt.indexOf(Tn[Jt])<0&&Object.prototype.propertyIsEnumerable.call(At,Tn[Jt])&&(qt[Tn[Jt]]=At[Tn[Jt]]);return qt};const rn=Ue.forwardRef((At,Lt)=>{const{getPrefixCls:qt,direction:Tn}=Ue.useContext(hn.E_),Jt=Ue.useRef(null);Ue.useImperativeHandle(Lt,()=>Jt.current);const{className:On,rootClassName:zn,size:qn,disabled:Xn,prefixCls:vr,addonBefore:_r,addonAfter:Qn,prefix:Cr,bordered:ni=!0,readOnly:Jr,status:Yn,controls:mr}=At,si=Nt(At,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),or=qt("input-number",vr),[ii,ki]=mt(or),{compactSize:gi,compactItemClassnames:Li}=(0,Te.ri)(or,Tn);let ui=Ue.createElement(xe.Z,{className:`${or}-handler-up-inner`}),dr=Ue.createElement(ne.Z,{className:`${or}-handler-down-inner`});const Hr=typeof mr=="boolean"?mr:void 0;typeof mr=="object"&&(ui=typeof mr.upIcon=="undefined"?ui:Ue.createElement("span",{className:`${or}-handler-up-inner`},mr.upIcon),dr=typeof mr.downIcon=="undefined"?dr:Ue.createElement("span",{className:`${or}-handler-down-inner`},mr.downIcon));const{hasFeedback:Cn,status:Ee,isFormItemInput:je,feedbackIcon:Oe}=Ue.useContext(_e.aM),De=(0,pn.F)(Ee,Yn),Ke=(0,ke.Z)(Ct=>{var Ht;return(Ht=qn!=null?qn:gi)!==null&&Ht!==void 0?Ht:Ct}),et=Ue.useContext(Xe.Z),rt=Xn!=null?Xn:et,Dt=Ce()({[`${or}-lg`]:Ke==="large",[`${or}-sm`]:Ke==="small",[`${or}-rtl`]:Tn==="rtl",[`${or}-borderless`]:!ni,[`${or}-in-form-item`]:je},(0,pn.Z)(or,De),Li,ki),Ft=`${or}-group`,Bt=Ue.createElement(Ln,Object.assign({ref:Jt,disabled:rt,className:Ce()(On,zn),upHandler:ui,downHandler:dr,prefixCls:or,readOnly:Jr,controls:Hr,prefix:Cr,suffix:Cn&&Oe,addonAfter:Qn&&Ue.createElement(Te.BR,null,Ue.createElement(_e.Ux,{override:!0,status:!0},Qn)),addonBefore:_r&&Ue.createElement(Te.BR,null,Ue.createElement(_e.Ux,{override:!0,status:!0},_r)),classNames:{input:Dt},classes:{affixWrapper:Ce()((0,pn.Z)(`${or}-affix-wrapper`,De,Cn),{[`${or}-affix-wrapper-sm`]:Ke==="small",[`${or}-affix-wrapper-lg`]:Ke==="large",[`${or}-affix-wrapper-rtl`]:Tn==="rtl",[`${or}-affix-wrapper-borderless`]:!ni},ki),wrapper:Ce()({[`${Ft}-rtl`]:Tn==="rtl",[`${or}-wrapper-disabled`]:rt},ki),group:Ce()({[`${or}-group-wrapper-sm`]:Ke==="small",[`${or}-group-wrapper-lg`]:Ke==="large",[`${or}-group-wrapper-rtl`]:Tn==="rtl"},(0,pn.Z)(`${or}-group-wrapper`,De,Cn),ki)}},si));return ii(Bt)}),It=rn,Qt=At=>Ue.createElement(un.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},Ue.createElement(rn,Object.assign({},At)));It._InternalPanelDoNotUseOrYouWillBeFired=Qt;var dn=It},9432:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return $e},n:function(){return Be}});var ne=ee(19248),xe=ee(92310),Me=ee.n(xe),Ce=ee(93681),fe=ee(8654),he=ee(59301),ce=ee(19080),ae=ee(36355),se=ee(1684),ve=ee(19716),ue=ee(32441),pe=ee(33234),oe=ee(59412),ge=ee(9937);function ye(Le){return!!(Le.prefix||Le.suffix||Le.allowClear)}var we=function(Le,Ne){var Re={};for(var Se in Le)Object.prototype.hasOwnProperty.call(Le,Se)&&Ne.indexOf(Se)<0&&(Re[Se]=Le[Se]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,Se=Object.getOwnPropertySymbols(Le);Ie<Se.length;Ie++)Ne.indexOf(Se[Ie])<0&&Object.prototype.propertyIsEnumerable.call(Le,Se[Ie])&&(Re[Se[Ie]]=Le[Se[Ie]]);return Re};function Be(Le,Ne){if(!Le)return;Le.focus(Ne);const{cursor:Re}=Ne||{};if(Re){const Se=Le.value.length;switch(Re){case"start":Le.setSelectionRange(0,0);break;case"end":Le.setSelectionRange(Se,Se);break;default:Le.setSelectionRange(0,Se);break}}}var $e=(0,he.forwardRef)((Le,Ne)=>{var Re;const{prefixCls:Se,bordered:Ie=!0,status:Ae,size:it,disabled:Ue,onBlur:gt,onFocus:Ve,suffix:Tt,allowClear:ct,addonAfter:Ot,addonBefore:We,className:lt,style:ut,styles:St,rootClassName:qe,onChange:Ze,classNames:wt}=Le,Wt=we(Le,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Kt,direction:_t,input:vt}=he.useContext(ae.E_),jt=Kt("input",Se),yn=(0,he.useRef)(null),[Xt,Ln]=(0,ge.ZP)(jt),{compactSize:pn,compactItemClassnames:hn}=(0,pe.ri)(jt,_t),un=(0,ve.Z)(rn=>{var It;return(It=it!=null?it:pn)!==null&&It!==void 0?It:rn}),Xe=he.useContext(se.Z),ke=Ue!=null?Ue:Xe,{status:_e,hasFeedback:Te,feedbackIcon:Fe}=(0,he.useContext)(ue.aM),me=(0,ce.F)(_e,Ae),at=ye(Le)||!!Te,Pt=(0,he.useRef)(at);(0,he.useEffect)(()=>{var rn;at&&Pt.current,Pt.current=at},[at]);const Qe=(0,oe.Z)(yn,!0),Je=rn=>{Qe(),gt==null||gt(rn)},xt=rn=>{Qe(),Ve==null||Ve(rn)},ot=rn=>{Qe(),Ze==null||Ze(rn)},mt=(Te||Tt)&&he.createElement(he.Fragment,null,Tt,Te&&Fe);let Nt;return typeof ct=="object"&&(ct!=null&&ct.clearIcon)?Nt=ct:ct&&(Nt={clearIcon:he.createElement(ne.Z,null)}),Xt(he.createElement(Ce.default,Object.assign({ref:(0,fe.sQ)(Ne,yn),prefixCls:jt,autoComplete:vt==null?void 0:vt.autoComplete},Wt,{disabled:ke,onBlur:Je,onFocus:xt,style:Object.assign(Object.assign({},vt==null?void 0:vt.style),ut),styles:Object.assign(Object.assign({},vt==null?void 0:vt.styles),St),suffix:mt,allowClear:Nt,className:Me()(lt,qe,hn,vt==null?void 0:vt.className),onChange:ot,addonAfter:Ot&&he.createElement(pe.BR,null,he.createElement(ue.Ux,{override:!0,status:!0},Ot)),addonBefore:We&&he.createElement(pe.BR,null,he.createElement(ue.Ux,{override:!0,status:!0},We)),classNames:Object.assign(Object.assign(Object.assign({},wt),vt==null?void 0:vt.classNames),{input:Me()({[`${jt}-sm`]:un==="small",[`${jt}-lg`]:un==="large",[`${jt}-rtl`]:_t==="rtl",[`${jt}-borderless`]:!Ie},!at&&(0,ce.Z)(jt,me),wt==null?void 0:wt.input,(Re=vt==null?void 0:vt.classNames)===null||Re===void 0?void 0:Re.input,Ln)}),classes:{affixWrapper:Me()({[`${jt}-affix-wrapper-sm`]:un==="small",[`${jt}-affix-wrapper-lg`]:un==="large",[`${jt}-affix-wrapper-rtl`]:_t==="rtl",[`${jt}-affix-wrapper-borderless`]:!Ie},(0,ce.Z)(`${jt}-affix-wrapper`,me,Te),Ln),wrapper:Me()({[`${jt}-group-rtl`]:_t==="rtl"},Ln),group:Me()({[`${jt}-group-wrapper-sm`]:un==="small",[`${jt}-group-wrapper-lg`]:un==="large",[`${jt}-group-wrapper-rtl`]:_t==="rtl",[`${jt}-group-wrapper-disabled`]:ke},(0,ce.Z)(`${jt}-group-wrapper`,me,Te),Ln)}})))})},1643:function(gn,kt,ee){"use strict";var ne=ee(19248),xe=ee(92310),Me=ee.n(xe),Ce=ee(9296),fe=ee(59301),he=ee(19080),ce=ee(36355),ae=ee(1684),se=ee(19716),ve=ee(32441),ue=ee(9432),pe=ee(9937),oe=function(ye,we){var Be={};for(var ze in ye)Object.prototype.hasOwnProperty.call(ye,ze)&&we.indexOf(ze)<0&&(Be[ze]=ye[ze]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,ze=Object.getOwnPropertySymbols(ye);$e<ze.length;$e++)we.indexOf(ze[$e])<0&&Object.prototype.propertyIsEnumerable.call(ye,ze[$e])&&(Be[ze[$e]]=ye[ze[$e]]);return Be};const ge=(0,fe.forwardRef)((ye,we)=>{const{prefixCls:Be,bordered:ze=!0,size:$e,disabled:Le,status:Ne,allowClear:Re,showCount:Se,classNames:Ie,rootClassName:Ae,className:it}=ye,Ue=oe(ye,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:gt,direction:Ve}=fe.useContext(ce.E_),Tt=(0,se.Z)($e),ct=fe.useContext(ae.Z),Ot=Le!=null?Le:ct,{status:We,hasFeedback:lt,feedbackIcon:ut}=fe.useContext(ve.aM),St=(0,he.F)(We,Ne),qe=fe.useRef(null);fe.useImperativeHandle(we,()=>{var _t;return{resizableTextArea:(_t=qe.current)===null||_t===void 0?void 0:_t.resizableTextArea,focus:vt=>{var jt,yn;(0,ue.n)((yn=(jt=qe.current)===null||jt===void 0?void 0:jt.resizableTextArea)===null||yn===void 0?void 0:yn.textArea,vt)},blur:()=>{var vt;return(vt=qe.current)===null||vt===void 0?void 0:vt.blur()}}});const Ze=gt("input",Be);let wt;typeof Re=="object"&&(Re!=null&&Re.clearIcon)?wt=Re:Re&&(wt={clearIcon:fe.createElement(ne.Z,null)});const[Wt,Kt]=(0,pe.ZP)(Ze);return Wt(fe.createElement(Ce.default,Object.assign({},Ue,{disabled:Ot,allowClear:wt,className:Me()(it,Ae),classes:{affixWrapper:Me()(`${Ze}-textarea-affix-wrapper`,{[`${Ze}-affix-wrapper-rtl`]:Ve==="rtl",[`${Ze}-affix-wrapper-borderless`]:!ze,[`${Ze}-affix-wrapper-sm`]:Tt==="small",[`${Ze}-affix-wrapper-lg`]:Tt==="large",[`${Ze}-textarea-show-count`]:Se},(0,he.Z)(`${Ze}-affix-wrapper`,St),Kt)},classNames:Object.assign(Object.assign({},Ie),{textarea:Me()({[`${Ze}-borderless`]:!ze,[`${Ze}-sm`]:Tt==="small",[`${Ze}-lg`]:Tt==="large"},(0,he.Z)(Ze,St),Kt,Ie==null?void 0:Ie.textarea)}),prefixCls:Ze,suffix:lt&&fe.createElement("span",{className:`${Ze}-textarea-suffix`},ut),showCount:Se,ref:qe})))});kt.Z=ge},59412:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return xe}});var ne=ee(59301);function xe(Me,Ce){const fe=(0,ne.useRef)([]),he=()=>{fe.current.push(setTimeout(()=>{var ce,ae,se,ve;!((ce=Me.current)===null||ce===void 0)&&ce.input&&((ae=Me.current)===null||ae===void 0?void 0:ae.input.getAttribute("type"))==="password"&&(!((se=Me.current)===null||se===void 0)&&se.input.hasAttribute("value"))&&((ve=Me.current)===null||ve===void 0||ve.input.removeAttribute("value"))}))};return(0,ne.useEffect)(()=>(Ce&&he(),()=>fe.current.forEach(ce=>{ce&&clearTimeout(ce)})),[]),he}},92832:function(gn,kt,ee){"use strict";ee.d(kt,{default:function(){return Tt}});var ne=ee(92310),xe=ee.n(ne),Me=ee(59301),Ce=ee(36355),fe=ee(32441),he=ee(9937),ae=ct=>{const{getPrefixCls:Ot,direction:We}=(0,Me.useContext)(Ce.E_),{prefixCls:lt,className:ut}=ct,St=Ot("input-group",lt),qe=Ot("input"),[Ze,wt]=(0,he.ZP)(qe),Wt=xe()(St,{[`${St}-lg`]:ct.size==="large",[`${St}-sm`]:ct.size==="small",[`${St}-compact`]:ct.compact,[`${St}-rtl`]:We==="rtl"},wt,ut),Kt=(0,Me.useContext)(fe.aM),_t=(0,Me.useMemo)(()=>Object.assign(Object.assign({},Kt),{isFormItemInput:!1}),[Kt]);return Ze(Me.createElement("span",{className:Wt,style:ct.style,onMouseEnter:ct.onMouseEnter,onMouseLeave:ct.onMouseLeave,onFocus:ct.onFocus,onBlur:ct.onBlur},Me.createElement(fe.aM.Provider,{value:_t},ct.children)))},se=ee(9432),ve=ee(73331),ue=ee(15277),pe=ee(2738),oe=ee(8654),ge=ee(59412),ye=function(ct,Ot){var We={};for(var lt in ct)Object.prototype.hasOwnProperty.call(ct,lt)&&Ot.indexOf(lt)<0&&(We[lt]=ct[lt]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,lt=Object.getOwnPropertySymbols(ct);ut<lt.length;ut++)Ot.indexOf(lt[ut])<0&&Object.prototype.propertyIsEnumerable.call(ct,lt[ut])&&(We[lt[ut]]=ct[lt[ut]]);return We};const we=ct=>ct?Me.createElement(ue.Z,null):Me.createElement(ve.Z,null),Be={click:"onClick",hover:"onMouseOver"};var $e=Me.forwardRef((ct,Ot)=>{const{visibilityToggle:We=!0}=ct,lt=typeof We=="object"&&We.visible!==void 0,[ut,St]=(0,Me.useState)(()=>lt?We.visible:!1),qe=(0,Me.useRef)(null);Me.useEffect(()=>{lt&&St(We.visible)},[lt,We]);const Ze=(0,ge.Z)(qe),wt=()=>{const{disabled:ke}=ct;ke||(ut&&Ze(),St(_e=>{var Te;const Fe=!_e;return typeof We=="object"&&((Te=We.onVisibleChange)===null||Te===void 0||Te.call(We,Fe)),Fe}))},Wt=ke=>{const{action:_e="click",iconRender:Te=we}=ct,Fe=Be[_e]||"",me=Te(ut),at={[Fe]:wt,className:`${ke}-icon`,key:"passwordIcon",onMouseDown:Pt=>{Pt.preventDefault()},onMouseUp:Pt=>{Pt.preventDefault()}};return Me.cloneElement(Me.isValidElement(me)?me:Me.createElement("span",null,me),at)},{className:Kt,prefixCls:_t,inputPrefixCls:vt,size:jt}=ct,yn=ye(ct,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Xt}=Me.useContext(Ce.E_),Ln=Xt("input",vt),pn=Xt("input-password",_t),hn=We&&Wt(pn),un=xe()(pn,Kt,{[`${pn}-${jt}`]:!!jt}),Xe=Object.assign(Object.assign({},(0,pe.Z)(yn,["suffix","iconRender","visibilityToggle"])),{type:ut?"text":"password",className:un,prefixCls:Ln,suffix:hn});return jt&&(Xe.size=jt),Me.createElement(se.Z,Object.assign({ref:(0,oe.sQ)(Ot,qe)},Xe))}),Le=ee(47472),Ne=ee(92343),Re=ee(3113),Se=ee(19716),Ie=ee(33234),Ae=function(ct,Ot){var We={};for(var lt in ct)Object.prototype.hasOwnProperty.call(ct,lt)&&Ot.indexOf(lt)<0&&(We[lt]=ct[lt]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,lt=Object.getOwnPropertySymbols(ct);ut<lt.length;ut++)Ot.indexOf(lt[ut])<0&&Object.prototype.propertyIsEnumerable.call(ct,lt[ut])&&(We[lt[ut]]=ct[lt[ut]]);return We},Ue=Me.forwardRef((ct,Ot)=>{const{prefixCls:We,inputPrefixCls:lt,className:ut,size:St,suffix:qe,enterButton:Ze=!1,addonAfter:wt,loading:Wt,disabled:Kt,onSearch:_t,onChange:vt,onCompositionStart:jt,onCompositionEnd:yn}=ct,Xt=Ae(ct,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Ln,direction:pn}=Me.useContext(Ce.E_),hn=Me.useRef(!1),un=Ln("input-search",We),Xe=Ln("input",lt),{compactSize:ke}=(0,Ie.ri)(un,pn),_e=(0,Se.Z)(Qt=>{var dn;return(dn=St!=null?St:ke)!==null&&dn!==void 0?dn:Qt}),Te=Me.useRef(null),Fe=Qt=>{Qt&&Qt.target&&Qt.type==="click"&&_t&&_t(Qt.target.value,Qt,{source:"clear"}),vt&&vt(Qt)},me=Qt=>{var dn;document.activeElement===((dn=Te.current)===null||dn===void 0?void 0:dn.input)&&Qt.preventDefault()},at=Qt=>{var dn,At;_t&&_t((At=(dn=Te.current)===null||dn===void 0?void 0:dn.input)===null||At===void 0?void 0:At.value,Qt,{source:"input"})},Pt=Qt=>{hn.current||Wt||at(Qt)},Qe=typeof Ze=="boolean"?Me.createElement(Le.Z,null):null,Je=`${un}-button`;let xt;const ot=Ze||{},mt=ot.type&&ot.type.__ANT_BUTTON===!0;mt||ot.type==="button"?xt=(0,Ne.Tm)(ot,Object.assign({onMouseDown:me,onClick:Qt=>{var dn,At;(At=(dn=ot==null?void 0:ot.props)===null||dn===void 0?void 0:dn.onClick)===null||At===void 0||At.call(dn,Qt),at(Qt)},key:"enterButton"},mt?{className:Je,size:_e}:{})):xt=Me.createElement(Re.ZP,{className:Je,type:Ze?"primary":void 0,size:_e,disabled:Kt,key:"enterButton",onMouseDown:me,onClick:at,loading:Wt,icon:Qe},Ze),wt&&(xt=[xt,(0,Ne.Tm)(wt,{key:"addonAfter"})]);const Nt=xe()(un,{[`${un}-rtl`]:pn==="rtl",[`${un}-${_e}`]:!!_e,[`${un}-with-button`]:!!Ze},ut),rn=Qt=>{hn.current=!0,jt==null||jt(Qt)},It=Qt=>{hn.current=!1,yn==null||yn(Qt)};return Me.createElement(se.Z,Object.assign({ref:(0,oe.sQ)(Te,Ot),onPressEnter:Pt},Xt,{size:_e,onCompositionStart:rn,onCompositionEnd:It,prefixCls:Xe,addonAfter:xt,suffix:qe,onChange:Fe,className:Nt,disabled:Kt}))}),gt=ee(1643);const Ve=se.Z;Ve.Group=ae,Ve.Search=Ue,Ve.TextArea=gt.Z,Ve.Password=$e;var Tt=Ve},9937:function(gn,kt,ee){"use strict";ee.d(kt,{M1:function(){return ce},TM:function(){return Ne},Xy:function(){return ae},bi:function(){return ue},e5:function(){return Le},ik:function(){return pe},nz:function(){return fe},pU:function(){return he},s7:function(){return oe},x0:function(){return ve}});var ne=ee(17313),xe=ee(74207),Me=ee(37613),Ce=ee(83116);const fe=Re=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:Re,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),he=Re=>({borderColor:Re.hoverBorderColor}),ce=Re=>({borderColor:Re.activeBorderColor,boxShadow:Re.activeShadow,outline:0}),ae=Re=>({color:Re.colorTextDisabled,backgroundColor:Re.colorBgContainerDisabled,borderColor:Re.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},he((0,Me.TS)(Re,{hoverBorderColor:Re.colorBorder})))}),se=Re=>{const{paddingBlockLG:Se,fontSizeLG:Ie,lineHeightLG:Ae,borderRadiusLG:it,paddingInlineLG:Ue}=Re;return{padding:`${Se}px ${Ue}px`,fontSize:Ie,lineHeight:Ae,borderRadius:it}},ve=Re=>({padding:`${Re.paddingBlockSM}px ${Re.paddingInlineSM}px`,borderRadius:Re.borderRadiusSM}),ue=(Re,Se)=>{const{componentCls:Ie,colorError:Ae,colorWarning:it,errorActiveShadow:Ue,warningActiveShadow:gt,colorErrorBorderHover:Ve,colorWarningBorderHover:Tt}=Re;return{[`&-status-error:not(${Se}-disabled):not(${Se}-borderless)${Se}`]:{borderColor:Ae,"&:hover":{borderColor:Ve},"&:focus, &-focused":Object.assign({},ce((0,Me.TS)(Re,{activeBorderColor:Ae,activeShadow:Ue}))),[`${Ie}-prefix, ${Ie}-suffix`]:{color:Ae}},[`&-status-warning:not(${Se}-disabled):not(${Se}-borderless)${Se}`]:{borderColor:it,"&:hover":{borderColor:Tt},"&:focus, &-focused":Object.assign({},ce((0,Me.TS)(Re,{activeBorderColor:it,activeShadow:gt}))),[`${Ie}-prefix, ${Ie}-suffix`]:{color:it}}}},pe=Re=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Re.paddingBlock}px ${Re.paddingInline}px`,color:Re.colorText,fontSize:Re.fontSize,lineHeight:Re.lineHeight,backgroundColor:Re.colorBgContainer,backgroundImage:"none",borderWidth:Re.lineWidth,borderStyle:Re.lineType,borderColor:Re.colorBorder,borderRadius:Re.borderRadius,transition:`all ${Re.motionDurationMid}`},fe(Re.colorTextPlaceholder)),{"&:hover":Object.assign({},he(Re)),"&:focus, &-focused":Object.assign({},ce(Re)),"&-disabled, &[disabled]":Object.assign({},ae(Re)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:Re.controlHeight,lineHeight:Re.lineHeight,verticalAlign:"bottom",transition:`all ${Re.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},se(Re)),"&-sm":Object.assign({},ve(Re)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),oe=Re=>{const{componentCls:Se,antCls:Ie}=Re;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:Re.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${Se}, &-lg > ${Se}-group-addon`]:Object.assign({},se(Re)),[`&-sm ${Se}, &-sm > ${Se}-group-addon`]:Object.assign({},ve(Re)),[`&-lg ${Ie}-select-single ${Ie}-select-selector`]:{height:Re.controlHeightLG},[`&-sm ${Ie}-select-single ${Ie}-select-selector`]:{height:Re.controlHeightSM},[`> ${Se}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${Se}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${Re.paddingInline}px`,color:Re.colorText,fontWeight:"normal",fontSize:Re.fontSize,textAlign:"center",backgroundColor:Re.colorFillAlter,border:`${Re.lineWidth}px ${Re.lineType} ${Re.colorBorder}`,borderRadius:Re.borderRadius,transition:`all ${Re.motionDurationSlow}`,lineHeight:1,[`${Ie}-select`]:{margin:`-${Re.paddingBlock+1}px -${Re.paddingInline}px`,[`&${Ie}-select-single:not(${Ie}-select-customize-input)`]:{[`${Ie}-select-selector`]:{backgroundColor:"inherit",border:`${Re.lineWidth}px ${Re.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Ie}-select-selector`]:{color:Re.colorPrimary}}},[`${Ie}-cascader-picker`]:{margin:`-9px -${Re.paddingInline}px`,backgroundColor:"transparent",[`${Ie}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${Se}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${Se}-search-with-button &`]:{zIndex:0}}},[`> ${Se}:first-child, ${Se}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Ie}-select ${Ie}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Se}-affix-wrapper`]:{[`&:not(:first-child) ${Se}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${Se}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Se}:last-child, ${Se}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Ie}-select ${Ie}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${Se}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${Se}-search &`]:{borderStartStartRadius:Re.borderRadius,borderEndStartRadius:Re.borderRadius}},[`&:not(:first-child), ${Se}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${Se}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,ne.dF)()),{[`${Se}-group-addon, ${Se}-group-wrap, > ${Se}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:Re.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${Se}-affix-wrapper,
& > ${Se}-number-affix-wrapper,
& > ${Ie}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-Re.lineWidth,borderInlineEndWidth:Re.lineWidth},[`${Se}`]:{float:"none"},[`& > ${Ie}-select > ${Ie}-select-selector,
& > ${Ie}-select-auto-complete ${Se},
& > ${Ie}-cascader-picker ${Se},
& > ${Se}-group-wrapper ${Se}`]:{borderInlineEndWidth:Re.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Ie}-select-focused`]:{zIndex:1},[`& > ${Ie}-select > ${Ie}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${Ie}-select:first-child > ${Ie}-select-selector,
& > ${Ie}-select-auto-complete:first-child ${Se},
& > ${Ie}-cascader-picker:first-child ${Se}`]:{borderStartStartRadius:Re.borderRadius,borderEndStartRadius:Re.borderRadius},[`& > *:last-child,
& > ${Ie}-select:last-child > ${Ie}-select-selector,
& > ${Ie}-cascader-picker:last-child ${Se},
& > ${Ie}-cascader-picker-focused:last-child ${Se}`]:{borderInlineEndWidth:Re.lineWidth,borderStartEndRadius:Re.borderRadius,borderEndEndRadius:Re.borderRadius},[`& > ${Ie}-select-auto-complete ${Se}`]:{verticalAlign:"top"},[`${Se}-group-wrapper + ${Se}-group-wrapper`]:{marginInlineStart:-Re.lineWidth,[`${Se}-affix-wrapper`]:{borderRadius:0}},[`${Se}-group-wrapper:not(:last-child)`]:{[`&${Se}-search > ${Se}-group`]:{[`& > ${Se}-group-addon > ${Se}-search-button`]:{borderRadius:0},[`& > ${Se}`]:{borderStartStartRadius:Re.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Re.borderRadius}}}})}},ge=Re=>{const{componentCls:Se,controlHeightSM:Ie,lineWidth:Ae}=Re,Ue=(Ie-Ae*2-16)/2;return{[Se]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ne.Wf)(Re)),pe(Re)),ue(Re,Se)),{'&[type="color"]':{height:Re.controlHeight,[`&${Se}-lg`]:{height:Re.controlHeightLG},[`&${Se}-sm`]:{height:Ie,paddingTop:Ue,paddingBottom:Ue}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},ye=Re=>{const{componentCls:Se}=Re;return{[`${Se}-clear-icon`]:{margin:0,color:Re.colorTextQuaternary,fontSize:Re.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${Re.motionDurationSlow}`,"&:hover":{color:Re.colorTextTertiary},"&:active":{color:Re.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Re.inputAffixPadding}px`}}}},we=Re=>{const{componentCls:Se,inputAffixPadding:Ie,colorTextDescription:Ae,motionDurationSlow:it,colorIcon:Ue,colorIconHover:gt,iconCls:Ve}=Re;return{[`${Se}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pe(Re)),{display:"inline-flex",[`&:not(${Se}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},he(Re)),{zIndex:1,[`${Se}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${Se}[disabled]`]:{background:"transparent"}},[`> input${Se}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Se}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:Re.paddingXS}},"&-show-count-suffix":{color:Ae},"&-show-count-has-suffix":{marginInlineEnd:Re.paddingXXS},"&-prefix":{marginInlineEnd:Ie},"&-suffix":{marginInlineStart:Ie}}}),ye(Re)),{[`${Ve}${Se}-password-icon`]:{color:Ue,cursor:"pointer",transition:`all ${it}`,"&:hover":{color:gt}}}),ue(Re,`${Se}-affix-wrapper`))}},Be=Re=>{const{componentCls:Se,colorError:Ie,colorWarning:Ae,borderRadiusLG:it,borderRadiusSM:Ue}=Re;return{[`${Se}-group`]:Object.assign(Object.assign(Object.assign({},(0,ne.Wf)(Re)),oe(Re)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${Se}-group-addon`]:{borderRadius:it,fontSize:Re.fontSizeLG}},"&-sm":{[`${Se}-group-addon`]:{borderRadius:Ue}},"&-status-error":{[`${Se}-group-addon`]:{color:Ie,borderColor:Ie}},"&-status-warning":{[`${Se}-group-addon`]:{color:Ae,borderColor:Ae}},"&-disabled":{[`${Se}-group-addon`]:Object.assign({},ae(Re))},[`&:not(${Se}-compact-first-item):not(${Se}-compact-last-item)${Se}-compact-item`]:{[`${Se}, ${Se}-group-addon`]:{borderRadius:0}},[`&:not(${Se}-compact-last-item)${Se}-compact-first-item`]:{[`${Se}, ${Se}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${Se}-compact-first-item)${Se}-compact-last-item`]:{[`${Se}, ${Se}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},ze=Re=>{const{componentCls:Se,antCls:Ie}=Re,Ae=`${Se}-search`;return{[Ae]:{[`${Se}`]:{"&:hover, &:focus":{borderColor:Re.colorPrimaryHover,[`+ ${Se}-group-addon ${Ae}-button:not(${Ie}-btn-primary)`]:{borderInlineStartColor:Re.colorPrimaryHover}}},[`${Se}-affix-wrapper`]:{borderRadius:0},[`${Se}-lg`]:{lineHeight:Re.lineHeightLG-2e-4},[`> ${Se}-group`]:{[`> ${Se}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Ae}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:Re.borderRadius,borderEndEndRadius:Re.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Ae}-button:not(${Ie}-btn-primary)`]:{color:Re.colorTextDescription,"&:hover":{color:Re.colorPrimaryHover},"&:active":{color:Re.colorPrimaryActive},[`&${Ie}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Ae}-button`]:{height:Re.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Ae}-button`]:{height:Re.controlHeightLG},[`&-small ${Ae}-button`]:{height:Re.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${Se}-compact-item`]:{[`&:not(${Se}-compact-last-item)`]:{[`${Se}-group-addon`]:{[`${Se}-search-button`]:{marginInlineEnd:-Re.lineWidth,borderRadius:0}}},[`&:not(${Se}-compact-first-item)`]:{[`${Se},${Se}-affix-wrapper`]:{borderRadius:0}},[`> ${Se}-group-addon ${Se}-search-button,
> ${Se},
${Se}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${Se}-affix-wrapper-focused`]:{zIndex:2}}}}},$e=Re=>{const{componentCls:Se,paddingLG:Ie}=Re,Ae=`${Se}-textarea`;return{[Ae]:{position:"relative","&-show-count":{[`> ${Se}`]:{height:"100%"},[`${Se}-data-count`]:{position:"absolute",bottom:-Re.fontSize*Re.lineHeight,insetInlineEnd:0,color:Re.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${Se}`]:{paddingInlineEnd:Ie}},[`&-affix-wrapper${Ae}-has-feedback`]:{[`${Se}`]:{paddingInlineEnd:Ie}},[`&-affix-wrapper${Se}-affix-wrapper`]:{padding:0,[`> textarea${Se}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${Se}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${Se}-clear-icon`]:{position:"absolute",insetInlineEnd:Re.paddingXS,insetBlockStart:Re.paddingXS},[`${Ae}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Re.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Le(Re){return(0,Me.TS)(Re,{inputAffixPadding:Re.paddingXXS})}const Ne=Re=>{const{controlHeight:Se,fontSize:Ie,lineHeight:Ae,lineWidth:it,controlHeightSM:Ue,controlHeightLG:gt,fontSizeLG:Ve,lineHeightLG:Tt,paddingSM:ct,controlPaddingHorizontalSM:Ot,controlPaddingHorizontal:We,colorFillAlter:lt,colorPrimaryHover:ut,controlOutlineWidth:St,controlOutline:qe,colorErrorOutline:Ze,colorWarningOutline:wt}=Re;return{paddingBlock:Math.max(Math.round((Se-Ie*Ae)/2*10)/10-it,3),paddingBlockSM:Math.max(Math.round((Ue-Ie*Ae)/2*10)/10-it,0),paddingBlockLG:Math.ceil((gt-Ve*Tt)/2*10)/10-it,paddingInline:ct-it,paddingInlineSM:Ot-it,paddingInlineLG:We-it,addonBg:lt,activeBorderColor:ut,hoverBorderColor:ut,activeShadow:`0 0 0 ${St}px ${qe}`,errorActiveShadow:`0 0 0 ${St}px ${Ze}`,warningActiveShadow:`0 0 0 ${St}px ${wt}`}};kt.ZP=(0,Ce.Z)("Input",Re=>{const Se=(0,Me.TS)(Re,Le(Re));return[ge(Se),$e(Se),we(Se),Be(Se),ze(Se),(0,xe.c)(Se)]},Ne)},45818:function(gn,kt,ee){"use strict";ee.d(kt,{D:function(){return Le},Z:function(){return Se}});var ne=ee(60499),xe=ee(59301),Me={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"},Ce=Me,fe=ee(7657),he=function(Ae,it){return xe.createElement(fe.Z,(0,ne.Z)({},Ae,{ref:it,icon:Ce}))},ce=xe.forwardRef(he),ae=ce,se=ee(33853),ve=ee(38819),ue=ee(92310),pe=ee.n(ue),oe=ee(2738),ye=Ie=>!isNaN(parseFloat(Ie))&&isFinite(Ie),we=ee(36355),Be=ee(84966),ze=function(Ie,Ae){var it={};for(var Ue in Ie)Object.prototype.hasOwnProperty.call(Ie,Ue)&&Ae.indexOf(Ue)<0&&(it[Ue]=Ie[Ue]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,Ue=Object.getOwnPropertySymbols(Ie);gt<Ue.length;gt++)Ae.indexOf(Ue[gt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Ue[gt])&&(it[Ue[gt]]=Ie[Ue[gt]]);return it};const $e={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Le=xe.createContext({}),Ne=(()=>{let Ie=0;return function(){let Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ie+=1,`${Ae}${Ie}`}})();var Se=xe.forwardRef((Ie,Ae)=>{const{prefixCls:it,className:Ue,trigger:gt,children:Ve,defaultCollapsed:Tt=!1,theme:ct="dark",style:Ot={},collapsible:We=!1,reverseArrow:lt=!1,width:ut=200,collapsedWidth:St=80,zeroWidthTriggerStyle:qe,breakpoint:Ze,onCollapse:wt,onBreakpoint:Wt}=Ie,Kt=ze(Ie,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:_t}=(0,xe.useContext)(Be.Gs),[vt,jt]=(0,xe.useState)("collapsed"in Ie?Ie.collapsed:Tt),[yn,Xt]=(0,xe.useState)(!1);(0,xe.useEffect)(()=>{"collapsed"in Ie&&jt(Ie.collapsed)},[Ie.collapsed]);const Ln=(_e,Te)=>{"collapsed"in Ie||jt(_e),wt==null||wt(_e,Te)},pn=(0,xe.useRef)();pn.current=_e=>{Xt(_e.matches),Wt==null||Wt(_e.matches),vt!==_e.matches&&Ln(_e.matches,"responsive")},(0,xe.useEffect)(()=>{function _e(Fe){return pn.current(Fe)}let Te;if(typeof window!="undefined"){const{matchMedia:Fe}=window;if(Fe&&Ze&&Ze in $e){Te=Fe(`(max-width: ${$e[Ze]})`);try{Te.addEventListener("change",_e)}catch(me){Te.addListener(_e)}_e(Te)}}return()=>{try{Te==null||Te.removeEventListener("change",_e)}catch(Fe){Te==null||Te.removeListener(_e)}}},[Ze]),(0,xe.useEffect)(()=>{const _e=Ne("ant-sider-");return _t.addSider(_e),()=>_t.removeSider(_e)},[]);const hn=()=>{Ln(!vt,"clickTrigger")},{getPrefixCls:un}=(0,xe.useContext)(we.E_),Xe=()=>{const _e=un("layout-sider",it),Te=(0,oe.Z)(Kt,["collapsed"]),Fe=vt?St:ut,me=ye(Fe)?`${Fe}px`:String(Fe),at=parseFloat(String(St||0))===0?xe.createElement("span",{onClick:hn,className:pe()(`${_e}-zero-width-trigger`,`${_e}-zero-width-trigger-${lt?"right":"left"}`),style:qe},gt||xe.createElement(ae,null)):null,Je={expanded:lt?xe.createElement(ve.Z,null):xe.createElement(se.Z,null),collapsed:lt?xe.createElement(se.Z,null):xe.createElement(ve.Z,null)}[vt?"collapsed":"expanded"],xt=gt!==null?at||xe.createElement("div",{className:`${_e}-trigger`,onClick:hn,style:{width:me}},gt||Je):null,ot=Object.assign(Object.assign({},Ot),{flex:`0 0 ${me}`,maxWidth:me,minWidth:me,width:me}),mt=pe()(_e,`${_e}-${ct}`,{[`${_e}-collapsed`]:!!vt,[`${_e}-has-trigger`]:We&&gt!==null&&!at,[`${_e}-below`]:!!yn,[`${_e}-zero-width`]:parseFloat(me)===0},Ue);return xe.createElement("aside",Object.assign({className:mt},Te,{style:ot,ref:Ae}),xe.createElement("div",{className:`${_e}-children`},Ve),We||yn&&at?xt:null)},ke=xe.useMemo(()=>({siderCollapsed:vt}),[vt]);return xe.createElement(Le.Provider,{value:ke},Xe())})},84966:function(gn,kt,ee){"use strict";ee.d(kt,{VY:function(){return Le},$_:function(){return $e},h4:function(){return ze},Gs:function(){return oe},ZP:function(){return Ne}});var ne=ee(77654),xe=ee(92310),Me=ee.n(xe),Ce=ee(2738),fe=ee(59301),he=ee(36355),ce=ee(83116),se=Re=>{const{componentCls:Se,bodyBg:Ie,lightSiderBg:Ae,lightTriggerBg:it,lightTriggerColor:Ue}=Re;return{[`${Se}-sider-light`]:{background:Ae,[`${Se}-sider-trigger`]:{color:Ue,background:it},[`${Se}-sider-zero-width-trigger`]:{color:Ue,background:it,border:`1px solid ${Ie}`,borderInlineStart:0}}}};const ve=Re=>{const{antCls:Se,componentCls:Ie,colorText:Ae,triggerColor:it,footerBg:Ue,triggerBg:gt,headerHeight:Ve,headerPadding:Tt,headerColor:ct,footerPadding:Ot,triggerHeight:We,zeroTriggerHeight:lt,zeroTriggerWidth:ut,motionDurationMid:St,motionDurationSlow:qe,fontSize:Ze,borderRadius:wt,bodyBg:Wt,headerBg:Kt,siderBg:_t}=Re;return{[Ie]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Wt,"&, *":{boxSizing:"border-box"},[`&${Ie}-has-sider`]:{flexDirection:"row",[`> ${Ie}, > ${Ie}-content`]:{width:0}},[`${Ie}-header, &${Ie}-footer`]:{flex:"0 0 auto"},[`${Ie}-sider`]:{position:"relative",minWidth:0,background:_t,transition:`all ${St}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Se}-menu${Se}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:We},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:We,color:it,lineHeight:`${We}px`,textAlign:"center",background:gt,cursor:"pointer",transition:`all ${St}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ve,insetInlineEnd:-ut,zIndex:1,width:ut,height:lt,color:it,fontSize:Re.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:_t,borderStartStartRadius:0,borderStartEndRadius:wt,borderEndEndRadius:wt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${qe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${qe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-ut,borderStartStartRadius:wt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:wt}}}}},se(Re)),{"&-rtl":{direction:"rtl"}}),[`${Ie}-header`]:{height:Ve,padding:Tt,color:ct,lineHeight:`${Ve}px`,background:Kt,[`${Se}-menu`]:{lineHeight:"inherit"}},[`${Ie}-footer`]:{padding:Ot,color:Ae,fontSize:Ze,background:Ue},[`${Ie}-content`]:{flex:"auto",minHeight:0}}};var ue=(0,ce.Z)("Layout",Re=>[ve(Re)],Re=>{const{colorBgLayout:Se,controlHeight:Ie,controlHeightLG:Ae,colorText:it,controlHeightSM:Ue,marginXXS:gt,colorTextLightSolid:Ve,colorBgContainer:Tt}=Re,ct=Ae*1.25;return{colorBgHeader:"#001529",colorBgBody:Se,colorBgTrigger:"#002140",bodyBg:Se,headerBg:"#001529",headerHeight:Ie*2,headerPadding:`0 ${ct}px`,headerColor:it,footerPadding:`${Ue}px ${ct}px`,footerBg:Se,siderBg:"#001529",triggerHeight:Ae+gt*2,triggerBg:"#002140",triggerColor:Ve,zeroTriggerWidth:Ae,zeroTriggerHeight:Ae,lightSiderBg:Tt,lightTriggerBg:Tt,lightTriggerColor:it}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),pe=function(Re,Se){var Ie={};for(var Ae in Re)Object.prototype.hasOwnProperty.call(Re,Ae)&&Se.indexOf(Ae)<0&&(Ie[Ae]=Re[Ae]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ae=Object.getOwnPropertySymbols(Re);it<Ae.length;it++)Se.indexOf(Ae[it])<0&&Object.prototype.propertyIsEnumerable.call(Re,Ae[it])&&(Ie[Ae[it]]=Re[Ae[it]]);return Ie};const oe=fe.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ge(Re){let{suffixCls:Se,tagName:Ie,displayName:Ae}=Re;return it=>fe.forwardRef((gt,Ve)=>fe.createElement(it,Object.assign({ref:Ve,suffixCls:Se,tagName:Ie},gt)))}const ye=fe.forwardRef((Re,Se)=>{const{prefixCls:Ie,suffixCls:Ae,className:it,tagName:Ue}=Re,gt=pe(Re,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ve}=fe.useContext(he.E_),Tt=Ve("layout",Ie),[ct,Ot]=ue(Tt),We=Ae?`${Tt}-${Ae}`:Tt;return ct(fe.createElement(Ue,Object.assign({className:Me()(Ie||We,it,Ot),ref:Se},gt)))}),we=fe.forwardRef((Re,Se)=>{const{direction:Ie}=fe.useContext(he.E_),[Ae,it]=fe.useState([]),{prefixCls:Ue,className:gt,rootClassName:Ve,children:Tt,hasSider:ct,tagName:Ot,style:We}=Re,lt=pe(Re,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),ut=(0,Ce.Z)(lt,["suffixCls"]),{getPrefixCls:St,layout:qe}=fe.useContext(he.E_),Ze=St("layout",Ue),[wt,Wt]=ue(Ze),Kt=Me()(Ze,{[`${Ze}-has-sider`]:typeof ct=="boolean"?ct:Ae.length>0,[`${Ze}-rtl`]:Ie==="rtl"},qe==null?void 0:qe.className,gt,Ve,Wt),_t=fe.useMemo(()=>({siderHook:{addSider:vt=>{it(jt=>[].concat((0,ne.Z)(jt),[vt]))},removeSider:vt=>{it(jt=>jt.filter(yn=>yn!==vt))}}}),[]);return wt(fe.createElement(oe.Provider,{value:_t},fe.createElement(Ot,Object.assign({ref:Se,className:Kt,style:Object.assign(Object.assign({},qe==null?void 0:qe.style),We)},ut),Tt)))}),Be=ge({tagName:"div",displayName:"Layout"})(we),ze=ge({suffixCls:"header",tagName:"header",displayName:"Header"})(ye),$e=ge({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(ye),Le=ge({suffixCls:"content",tagName:"main",displayName:"Content"})(ye);var Ne=Be},40875:function(gn,kt,ee){"use strict";ee.d(kt,{J:function(){return he}});var ne=ee(59301),xe=ee(33234),Me=ee(70425),Ce=function(ce,ae){var se={};for(var ve in ce)Object.prototype.hasOwnProperty.call(ce,ve)&&ae.indexOf(ve)<0&&(se[ve]=ce[ve]);if(ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,ve=Object.getOwnPropertySymbols(ce);ue<ve.length;ue++)ae.indexOf(ve[ue])<0&&Object.prototype.propertyIsEnumerable.call(ce,ve[ue])&&(se[ve[ue]]=ce[ve[ue]]);return se};const fe=ne.createContext(null),he=ne.forwardRef((ce,ae)=>{const{children:se}=ce,ve=Ce(ce,["children"]),ue=ne.useContext(fe),pe=ne.useMemo(()=>Object.assign(Object.assign({},ue),ve),[ue,ve.prefixCls,ve.mode,ve.selectable]);return ne.createElement(fe.Provider,{value:pe},ne.createElement(xe.BR,null,(0,Me.supportNodeRef)(se)?ne.cloneElement(se,{ref:ae}):se))});kt.Z=fe},20834:function(gn,kt,ee){"use strict";ee.d(kt,{default:function(){return ke}});var ne=ee(15285),xe=ee(59301),Me=ee(45818),Ce=ee(92310),fe=ee.n(Ce),he=ee(36355),ce=function(_e,Te){var Fe={};for(var me in _e)Object.prototype.hasOwnProperty.call(_e,me)&&Te.indexOf(me)<0&&(Fe[me]=_e[me]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,me=Object.getOwnPropertySymbols(_e);at<me.length;at++)Te.indexOf(me[at])<0&&Object.prototype.propertyIsEnumerable.call(_e,me[at])&&(Fe[me[at]]=_e[me[at]]);return Fe},se=_e=>{const{prefixCls:Te,className:Fe,dashed:me}=_e,at=ce(_e,["prefixCls","className","dashed"]),{getPrefixCls:Pt}=xe.useContext(he.E_),Qe=Pt("menu",Te),Je=fe()({[`${Qe}-item-divider-dashed`]:!!me},Fe);return xe.createElement(ne.iz,Object.assign({className:Je},at))},ve=ee(11592),ue=ee(2738),pe=ee(6848),oe=ee(92343),ye=(0,xe.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),Be=_e=>{var Te;const{className:Fe,children:me,icon:at,title:Pt,danger:Qe}=_e,{prefixCls:Je,firstLevel:xt,direction:ot,disableMenuItemTitleTooltip:mt,inlineCollapsed:Nt}=xe.useContext(ye),rn=qt=>{const Tn=xe.createElement("span",{className:`${Je}-title-content`},me);return(!at||(0,oe.l$)(me)&&me.type==="span")&&me&&qt&&xt&&typeof me=="string"?xe.createElement("div",{className:`${Je}-inline-collapsed-noicon`},me.charAt(0)):Tn},{siderCollapsed:It}=xe.useContext(Me.D);let Qt=Pt;typeof Pt=="undefined"?Qt=xt?me:"":Pt===!1&&(Qt="");const dn={title:Qt};!It&&!Nt&&(dn.title=null,dn.open=!1);const At=(0,ve.Z)(me).length;let Lt=xe.createElement(ne.ck,Object.assign({},(0,ue.Z)(_e,["title","icon","danger"]),{className:fe()({[`${Je}-item-danger`]:Qe,[`${Je}-item-only-child`]:(at?At+1:At)===1},Fe),title:typeof Pt=="string"?Pt:void 0}),(0,oe.Tm)(at,{className:fe()((0,oe.l$)(at)?(Te=at.props)===null||Te===void 0?void 0:Te.className:"",`${Je}-item-icon`)}),rn(Nt));return mt||(Lt=xe.createElement(pe.Z,Object.assign({},dn,{placement:ot==="rtl"?"left":"right",overlayClassName:`${Je}-inline-collapsed-tooltip`}),Lt)),Lt},$e=_e=>{var Te;const{popupClassName:Fe,icon:me,title:at,theme:Pt}=_e,Qe=xe.useContext(ye),{prefixCls:Je,inlineCollapsed:xt,theme:ot}=Qe,mt=(0,ne.Xl)();let Nt;if(!me)Nt=xt&&!mt.length&&at&&typeof at=="string"?xe.createElement("div",{className:`${Je}-inline-collapsed-noicon`},at.charAt(0)):xe.createElement("span",{className:`${Je}-title-content`},at);else{const It=(0,oe.l$)(at)&&at.type==="span";Nt=xe.createElement(xe.Fragment,null,(0,oe.Tm)(me,{className:fe()((0,oe.l$)(me)?(Te=me.props)===null||Te===void 0?void 0:Te.className:"",`${Je}-item-icon`)}),It?at:xe.createElement("span",{className:`${Je}-title-content`},at))}const rn=xe.useMemo(()=>Object.assign(Object.assign({},Qe),{firstLevel:!1}),[Qe]);return xe.createElement(ye.Provider,{value:rn},xe.createElement(ne.Wd,Object.assign({},(0,ue.Z)(_e,["icon"]),{title:Nt,popupClassName:fe()(Je,Fe,`${Je}-${Pt||ot}`)})))},Le=ee(18785),Ne=ee(70425),Re=ee(62892),Se=ee(40875),Ie=function(_e,Te){var Fe={};for(var me in _e)Object.prototype.hasOwnProperty.call(_e,me)&&Te.indexOf(me)<0&&(Fe[me]=_e[me]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,me=Object.getOwnPropertySymbols(_e);at<me.length;at++)Te.indexOf(me[at])<0&&Object.prototype.propertyIsEnumerable.call(_e,me[at])&&(Fe[me[at]]=_e[me[at]]);return Fe};function Ae(_e){return(_e||[]).map((Te,Fe)=>{if(Te&&typeof Te=="object"){const me=Te,{label:at,children:Pt,key:Qe,type:Je}=me,xt=Ie(me,["label","children","key","type"]),ot=Qe!=null?Qe:`tmp-${Fe}`;return Pt||Je==="group"?Je==="group"?xe.createElement(ne.BW,Object.assign({key:ot},xt,{title:at}),Ae(Pt)):xe.createElement($e,Object.assign({key:ot},xt,{title:at}),Ae(Pt)):Je==="divider"?xe.createElement(se,Object.assign({key:ot},xt)):xe.createElement(Be,Object.assign({key:ot},xt),at)}return null}).filter(Te=>Te)}function it(_e){return xe.useMemo(()=>_e&&Ae(_e),[_e])}var Ue=ee(64993),gt=ee(17313),Ve=ee(8378),Tt=ee(13826),ct=ee(29878),Ot=ee(83116),We=ee(37613),ut=_e=>{const{componentCls:Te,motionDurationSlow:Fe,horizontalLineHeight:me,colorSplit:at,lineWidth:Pt,lineType:Qe,itemPaddingInline:Je}=_e;return{[`${Te}-horizontal`]:{lineHeight:me,border:0,borderBottom:`${Pt}px ${Qe} ${at}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Te}-item, ${Te}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Je},[`> ${Te}-item:hover,
> ${Te}-item-active,
> ${Te}-submenu ${Te}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Te}-item, ${Te}-submenu-title`]:{transition:[`border-color ${Fe}`,`background ${Fe}`].join(",")},[`${Te}-submenu-arrow`]:{display:"none"}}}},qe=_e=>{let{componentCls:Te,menuArrowOffset:Fe}=_e;return{[`${Te}-rtl`]:{direction:"rtl"},[`${Te}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Te}-rtl${Te}-vertical,
${Te}-submenu-rtl ${Te}-vertical`]:{[`${Te}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Fe})`},"&::after":{transform:`rotate(45deg) translateY(${Fe})`}}}}};const Ze=_e=>Object.assign({},(0,gt.oN)(_e));var Wt=(_e,Te)=>{const{componentCls:Fe,itemColor:me,itemSelectedColor:at,groupTitleColor:Pt,itemBg:Qe,subMenuItemBg:Je,itemSelectedBg:xt,activeBarHeight:ot,activeBarWidth:mt,activeBarBorderWidth:Nt,motionDurationSlow:rn,motionEaseInOut:It,motionEaseOut:Qt,itemPaddingInline:dn,motionDurationMid:At,itemHoverColor:Lt,lineType:qt,colorSplit:Tn,itemDisabledColor:Jt,dangerItemColor:On,dangerItemHoverColor:zn,dangerItemSelectedColor:qn,dangerItemActiveBg:Xn,dangerItemSelectedBg:vr,itemHoverBg:_r,itemActiveBg:Qn,menuSubMenuBg:Cr,horizontalItemSelectedColor:ni,horizontalItemSelectedBg:Jr,horizontalItemBorderRadius:Yn,horizontalItemHoverBg:mr,popupBg:si}=_e;return{[`${Fe}-${Te}, ${Fe}-${Te} > ${Fe}`]:{color:me,background:Qe,[`&${Fe}-root:focus-visible`]:Object.assign({},Ze(_e)),[`${Fe}-item-group-title`]:{color:Pt},[`${Fe}-submenu-selected`]:{[`> ${Fe}-submenu-title`]:{color:at}},[`${Fe}-item-disabled, ${Fe}-submenu-disabled`]:{color:`${Jt} !important`},[`${Fe}-item:not(${Fe}-item-selected):not(${Fe}-submenu-selected)`]:{[`&:hover, > ${Fe}-submenu-title:hover`]:{color:Lt}},[`&:not(${Fe}-horizontal)`]:{[`${Fe}-item:not(${Fe}-item-selected)`]:{"&:hover":{backgroundColor:_r},"&:active":{backgroundColor:Qn}},[`${Fe}-submenu-title`]:{"&:hover":{backgroundColor:_r},"&:active":{backgroundColor:Qn}}},[`${Fe}-item-danger`]:{color:On,[`&${Fe}-item:hover`]:{[`&:not(${Fe}-item-selected):not(${Fe}-submenu-selected)`]:{color:zn}},[`&${Fe}-item:active`]:{background:Xn}},[`${Fe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Fe}-item-selected`]:{color:at,[`&${Fe}-item-danger`]:{color:qn},"a, a:hover":{color:"inherit"}},[`& ${Fe}-item-selected`]:{backgroundColor:xt,[`&${Fe}-item-danger`]:{backgroundColor:vr}},[`${Fe}-item, ${Fe}-submenu-title`]:{[`&:not(${Fe}-item-disabled):focus-visible`]:Object.assign({},Ze(_e))},[`&${Fe}-submenu > ${Fe}`]:{backgroundColor:Cr},[`&${Fe}-popup > ${Fe}`]:{backgroundColor:si},[`&${Fe}-horizontal`]:Object.assign(Object.assign({},Te==="dark"?{borderBottom:0}:{}),{[`> ${Fe}-item, > ${Fe}-submenu`]:{top:Nt,marginTop:-Nt,marginBottom:0,borderRadius:Yn,"&::after":{position:"absolute",insetInline:dn,bottom:0,borderBottom:`${ot}px solid transparent`,transition:`border-color ${rn} ${It}`,content:'""'},"&:hover, &-active, &-open":{background:mr,"&::after":{borderBottomWidth:ot,borderBottomColor:ni}},"&-selected":{color:ni,backgroundColor:Jr,"&:hover":{backgroundColor:Jr},"&::after":{borderBottomWidth:ot,borderBottomColor:ni}}}}),[`&${Fe}-root`]:{[`&${Fe}-inline, &${Fe}-vertical`]:{borderInlineEnd:`${Nt}px ${qt} ${Tn}`}},[`&${Fe}-inline`]:{[`${Fe}-sub${Fe}-inline`]:{background:Je},[`${Fe}-item, ${Fe}-submenu-title`]:Nt&&mt?{width:`calc(100% + ${Nt}px)`}:{},[`${Fe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${mt}px solid ${at}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${At} ${Qt}`,`opacity ${At} ${Qt}`].join(","),content:'""'},[`&${Fe}-item-danger`]:{"&::after":{borderInlineEndColor:qn}}},[`${Fe}-selected, ${Fe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${At} ${It}`,`opacity ${At} ${It}`].join(",")}}}}}};const Kt=_e=>{const{componentCls:Te,itemHeight:Fe,itemMarginInline:me,padding:at,menuArrowSize:Pt,marginXS:Qe,itemMarginBlock:Je}=_e,xt=at+Pt+Qe;return{[`${Te}-item`]:{position:"relative",overflow:"hidden"},[`${Te}-item, ${Te}-submenu-title`]:{height:Fe,lineHeight:`${Fe}px`,paddingInline:at,overflow:"hidden",textOverflow:"ellipsis",marginInline:me,marginBlock:Je,width:`calc(100% - ${me*2}px)`},[`> ${Te}-item,
> ${Te}-submenu > ${Te}-submenu-title`]:{height:Fe,lineHeight:`${Fe}px`},[`${Te}-item-group-list ${Te}-submenu-title,
${Te}-submenu-title`]:{paddingInlineEnd:xt}}};var vt=_e=>{const{componentCls:Te,iconCls:Fe,itemHeight:me,colorTextLightSolid:at,dropdownWidth:Pt,controlHeightLG:Qe,motionDurationMid:Je,motionEaseOut:xt,paddingXL:ot,itemMarginInline:mt,fontSizeLG:Nt,motionDurationSlow:rn,paddingXS:It,boxShadowSecondary:Qt,collapsedWidth:dn,collapsedIconSize:At}=_e,Lt={height:me,lineHeight:`${me}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Te]:{"&-inline, &-vertical":Object.assign({[`&${Te}-root`]:{boxShadow:"none"}},Kt(_e))},[`${Te}-submenu-popup`]:{[`${Te}-vertical`]:Object.assign(Object.assign({},Kt(_e)),{boxShadow:Qt})}},{[`${Te}-submenu-popup ${Te}-vertical${Te}-sub`]:{minWidth:Pt,maxHeight:`calc(100vh - ${Qe*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Te}-inline`]:{width:"100%",[`&${Te}-root`]:{[`${Te}-item, ${Te}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${rn}`,`background ${rn}`,`padding ${Je} ${xt}`].join(","),[`> ${Te}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Te}-sub${Te}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Te}-submenu > ${Te}-submenu-title`]:Lt,[`& ${Te}-item-group-title`]:{paddingInlineStart:ot}},[`${Te}-item`]:Lt}},{[`${Te}-inline-collapsed`]:{width:dn,[`&${Te}-root`]:{[`${Te}-item, ${Te}-submenu ${Te}-submenu-title`]:{[`> ${Te}-inline-collapsed-noicon`]:{fontSize:Nt,textAlign:"center"}}},[`> ${Te}-item,
> ${Te}-item-group > ${Te}-item-group-list > ${Te}-item,
> ${Te}-item-group > ${Te}-item-group-list > ${Te}-submenu > ${Te}-submenu-title,
> ${Te}-submenu > ${Te}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Nt/2}px - ${mt}px)`,textOverflow:"clip",[`
${Te}-submenu-arrow,
${Te}-submenu-expand-icon
`]:{opacity:0},[`${Te}-item-icon, ${Fe}`]:{margin:0,fontSize:At,lineHeight:`${me}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Te}-item-icon, ${Fe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Te}-item-icon, ${Fe}`]:{display:"none"},"a, a:hover":{color:at}},[`${Te}-item-group-title`]:Object.assign(Object.assign({},gt.vS),{paddingInline:It})}}]};const jt=_e=>{const{componentCls:Te,motionDurationSlow:Fe,motionDurationMid:me,motionEaseInOut:at,motionEaseOut:Pt,iconCls:Qe,iconSize:Je,iconMarginInlineEnd:xt}=_e;return{[`${Te}-item, ${Te}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Fe}`,`background ${Fe}`,`padding ${Fe} ${at}`].join(","),[`${Te}-item-icon, ${Qe}`]:{minWidth:Je,fontSize:Je,transition:[`font-size ${me} ${Pt}`,`margin ${Fe} ${at}`,`color ${Fe}`].join(","),"+ span":{marginInlineStart:xt,opacity:1,transition:[`opacity ${Fe} ${at}`,`margin ${Fe}`,`color ${Fe}`].join(",")}},[`${Te}-item-icon`]:Object.assign({},(0,gt.Ro)()),[`&${Te}-item-only-child`]:{[`> ${Qe}, > ${Te}-item-icon`]:{marginInlineEnd:0}}},[`${Te}-item-disabled, ${Te}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Te}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},yn=_e=>{const{componentCls:Te,motionDurationSlow:Fe,motionEaseInOut:me,borderRadius:at,menuArrowSize:Pt,menuArrowOffset:Qe}=_e;return{[`${Te}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:_e.margin,width:Pt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Fe} ${me}, opacity ${Fe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Pt*.6,height:Pt*.15,backgroundColor:"currentcolor",borderRadius:at,transition:[`background ${Fe} ${me}`,`transform ${Fe} ${me}`,`top ${Fe} ${me}`,`color ${Fe} ${me}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Qe})`},"&::after":{transform:`rotate(-45deg) translateY(${Qe})`}}}}},Xt=_e=>{const{antCls:Te,componentCls:Fe,fontSize:me,motionDurationSlow:at,motionDurationMid:Pt,motionEaseInOut:Qe,paddingXS:Je,padding:xt,colorSplit:ot,lineWidth:mt,zIndexPopup:Nt,borderRadiusLG:rn,subMenuItemBorderRadius:It,menuArrowSize:Qt,menuArrowOffset:dn,lineType:At,menuPanelMaskInset:Lt,groupTitleLineHeight:qt,groupTitleFontSize:Tn}=_e;return[{"":{[`${Fe}`]:Object.assign(Object.assign({},(0,gt.dF)()),{"&-hidden":{display:"none"}})},[`${Fe}-submenu-hidden`]:{display:"none"}},{[Fe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(_e)),(0,gt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:me,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${at} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Fe}-item`]:{flex:"none"}},[`${Fe}-item, ${Fe}-submenu, ${Fe}-submenu-title`]:{borderRadius:_e.itemBorderRadius},[`${Fe}-item-group-title`]:{padding:`${Je}px ${xt}px`,fontSize:Tn,lineHeight:qt,transition:`all ${at}`},[`&-horizontal ${Fe}-submenu`]:{transition:[`border-color ${at} ${Qe}`,`background ${at} ${Qe}`].join(",")},[`${Fe}-submenu, ${Fe}-submenu-inline`]:{transition:[`border-color ${at} ${Qe}`,`background ${at} ${Qe}`,`padding ${Pt} ${Qe}`].join(",")},[`${Fe}-submenu ${Fe}-sub`]:{cursor:"initial",transition:[`background ${at} ${Qe}`,`padding ${at} ${Qe}`].join(",")},[`${Fe}-title-content`]:{transition:`color ${at}`},[`${Fe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Fe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:ot,borderStyle:At,borderWidth:0,borderTopWidth:mt,marginBlock:mt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),jt(_e)),{[`${Fe}-item-group`]:{[`${Fe}-item-group-list`]:{margin:0,padding:0,[`${Fe}-item, ${Fe}-submenu-title`]:{paddingInline:`${me*2}px ${xt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Nt,borderRadius:rn,boxShadow:"none",transformOrigin:"0 0",[`&${Fe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Lt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:Lt},"\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:_e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:_e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:_e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:_e.paddingXS},[`> ${Fe}`]:Object.assign(Object.assign(Object.assign({borderRadius:rn},jt(_e)),yn(_e)),{[`${Fe}-item, ${Fe}-submenu > ${Fe}-submenu-title`]:{borderRadius:It},[`${Fe}-submenu-title::after`]:{transition:`transform ${at} ${Qe}`}})}}),yn(_e)),{[`&-inline-collapsed ${Fe}-submenu-arrow,
&-inline ${Fe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${dn})`},"&::after":{transform:`rotate(45deg) translateX(-${dn})`}},[`${Fe}-submenu-open${Fe}-submenu-inline > ${Fe}-submenu-title > ${Fe}-submenu-arrow`]:{transform:`translateY(-${Qt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${dn})`},"&::before":{transform:`rotate(45deg) translateX(${dn})`}}})},{[`${Te}-layout-header`]:{[Fe]:{lineHeight:"inherit"}}}]};var Ln=(_e,Te)=>(0,Ot.Z)("Menu",me=>{if(Te===!1)return[];const{colorBgElevated:at,colorPrimary:Pt,colorTextLightSolid:Qe,controlHeightLG:Je,fontSize:xt,darkItemColor:ot,darkDangerItemColor:mt,darkItemBg:Nt,darkSubMenuItemBg:rn,darkItemSelectedColor:It,darkItemSelectedBg:Qt,darkDangerItemSelectedBg:dn,darkItemHoverBg:At,darkGroupTitleColor:Lt,darkItemHoverColor:qt,darkItemDisabledColor:Tn,darkDangerItemHoverColor:Jt,darkDangerItemSelectedColor:On,darkDangerItemActiveBg:zn}=me,qn=xt/7*5,Xn=(0,We.TS)(me,{menuArrowSize:qn,menuHorizontalHeight:Je*1.15,menuArrowOffset:`${qn*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:at}),vr=(0,We.TS)(Xn,{itemColor:ot,itemHoverColor:qt,groupTitleColor:Lt,itemSelectedColor:It,itemBg:Nt,popupBg:Nt,subMenuItemBg:rn,itemActiveBg:"transparent",itemSelectedBg:Qt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:At,itemDisabledColor:Tn,dangerItemColor:mt,dangerItemHoverColor:Jt,dangerItemSelectedColor:On,dangerItemActiveBg:zn,dangerItemSelectedBg:dn,menuSubMenuBg:rn,horizontalItemSelectedColor:Qe,horizontalItemSelectedBg:Pt});return[Xt(Xn),ut(Xn),vt(Xn),Wt(Xn,"light"),Wt(vr,"dark"),qe(Xn),(0,Ve.Z)(Xn),(0,Tt.oN)(Xn,"slide-up"),(0,Tt.oN)(Xn,"slide-down"),(0,ct._y)(Xn,"zoom-big")]},me=>{const{colorPrimary:at,colorError:Pt,colorTextDisabled:Qe,colorErrorBg:Je,colorText:xt,colorTextDescription:ot,colorBgContainer:mt,colorFillAlter:Nt,colorFillContent:rn,lineWidth:It,lineWidthBold:Qt,controlItemBgActive:dn,colorBgTextHover:At,controlHeightLG:Lt,lineHeight:qt,colorBgElevated:Tn,marginXXS:Jt,padding:On,fontSize:zn,controlHeightSM:qn,fontSizeLG:Xn,colorTextLightSolid:vr,colorErrorHover:_r}=me,Qn=new Ue.C(vr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:me.zIndexPopupBase+50,radiusItem:me.borderRadiusLG,itemBorderRadius:me.borderRadiusLG,radiusSubMenuItem:me.borderRadiusSM,subMenuItemBorderRadius:me.borderRadiusSM,colorItemText:xt,itemColor:xt,colorItemTextHover:xt,itemHoverColor:xt,colorItemTextHoverHorizontal:at,horizontalItemHoverColor:at,colorGroupTitle:ot,groupTitleColor:ot,colorItemTextSelected:at,itemSelectedColor:at,colorItemTextSelectedHorizontal:at,horizontalItemSelectedColor:at,colorItemBg:mt,itemBg:mt,colorItemBgHover:At,itemHoverBg:At,colorItemBgActive:rn,itemActiveBg:dn,colorSubItemBg:Nt,subMenuItemBg:Nt,colorItemBgSelected:dn,itemSelectedBg:dn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Qt,activeBarHeight:Qt,colorActiveBarBorderSize:It,activeBarBorderWidth:It,colorItemTextDisabled:Qe,itemDisabledColor:Qe,colorDangerItemText:Pt,dangerItemColor:Pt,colorDangerItemTextHover:Pt,dangerItemHoverColor:Pt,colorDangerItemTextSelected:Pt,dangerItemSelectedColor:Pt,colorDangerItemBgActive:Je,dangerItemActiveBg:Je,colorDangerItemBgSelected:Je,dangerItemSelectedBg:Je,itemMarginInline:me.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Lt,groupTitleLineHeight:qt,collapsedWidth:Lt*2,popupBg:Tn,itemMarginBlock:Jt,itemPaddingInline:On,horizontalLineHeight:`${Lt*1.15}px`,iconSize:zn,iconMarginInlineEnd:qn-zn,collapsedIconSize:Xn,groupTitleFontSize:zn,darkItemDisabledColor:new Ue.C(vr).setAlpha(.25).toRgbString(),darkItemColor:Qn,darkDangerItemColor:Pt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:vr,darkItemSelectedBg:at,darkDangerItemSelectedBg:Pt,darkItemHoverBg:"transparent",darkGroupTitleColor:Qn,darkItemHoverColor:vr,darkDangerItemHoverColor:_r,darkDangerItemSelectedColor:vr,darkDangerItemActiveBg:Pt}},{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"]]})(_e),pn=function(_e,Te){var Fe={};for(var me in _e)Object.prototype.hasOwnProperty.call(_e,me)&&Te.indexOf(me)<0&&(Fe[me]=_e[me]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,me=Object.getOwnPropertySymbols(_e);at<me.length;at++)Te.indexOf(me[at])<0&&Object.prototype.propertyIsEnumerable.call(_e,me[at])&&(Fe[me[at]]=_e[me[at]]);return Fe},un=(0,xe.forwardRef)((_e,Te)=>{var Fe,me;const at=xe.useContext(Se.Z),Pt=at||{},{getPrefixCls:Qe,getPopupContainer:Je,direction:xt,menu:ot}=xe.useContext(he.E_),mt=Qe(),{prefixCls:Nt,className:rn,style:It,theme:Qt="light",expandIcon:dn,_internalDisableMenuItemTitleTooltip:At,inlineCollapsed:Lt,siderCollapsed:qt,items:Tn,children:Jt,rootClassName:On,mode:zn,selectable:qn,onClick:Xn,overflowedIndicatorPopupClassName:vr}=_e,_r=pn(_e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Qn=(0,ue.Z)(_r,["collapsedWidth"]),Cr=it(Tn)||Jt;(Fe=Pt.validator)===null||Fe===void 0||Fe.call(Pt,{mode:zn});const ni=(0,Ne.useEvent)(function(){var dr;Xn==null||Xn.apply(void 0,arguments),(dr=Pt.onClick)===null||dr===void 0||dr.call(Pt)}),Jr=Pt.mode||zn,Yn=qn!=null?qn:Pt.selectable,mr=xe.useMemo(()=>qt!==void 0?qt:Lt,[Lt,qt]),si={horizontal:{motionName:`${mt}-slide-up`},inline:(0,Re.Z)(mt),other:{motionName:`${mt}-zoom-big`}},or=Qe("menu",Nt||Pt.prefixCls),[ii,ki]=Ln(or,!at),gi=fe()(`${or}-${Qt}`,ot==null?void 0:ot.className,rn);let Li;if(typeof dn=="function")Li=dn;else if(dn===null||dn===!1)Li=null;else if(Pt.expandIcon===null||Pt.expandIcon===!1)Li=null;else{const dr=dn!=null?dn:Pt.expandIcon;Li=(0,oe.Tm)(dr,{className:fe()(`${or}-submenu-expand-icon`,(0,oe.l$)(dr)?(me=dr.props)===null||me===void 0?void 0:me.className:"")})}const ui=xe.useMemo(()=>({prefixCls:or,inlineCollapsed:mr||!1,direction:xt,firstLevel:!0,theme:Qt,mode:Jr,disableMenuItemTitleTooltip:At}),[or,mr,xt,At,Qt]);return ii(xe.createElement(Se.Z.Provider,{value:null},xe.createElement(ye.Provider,{value:ui},xe.createElement(ne.ZP,Object.assign({getPopupContainer:Je,overflowedIndicator:xe.createElement(Le.Z,null),overflowedIndicatorPopupClassName:fe()(or,`${or}-${Qt}`,vr),mode:Jr,selectable:Yn,onClick:ni},Qn,{inlineCollapsed:mr,style:Object.assign(Object.assign({},ot==null?void 0:ot.style),It),className:gi,prefixCls:or,direction:xt,defaultMotions:si,expandIcon:Li,ref:Te,rootClassName:fe()(On,ki)}),Cr))))});const Xe=(0,xe.forwardRef)((_e,Te)=>{const Fe=(0,xe.useRef)(null),me=xe.useContext(Me.D);return(0,xe.useImperativeHandle)(Te,()=>({menu:Fe.current,focus:at=>{var Pt;(Pt=Fe.current)===null||Pt===void 0||Pt.focus(at)}})),xe.createElement(un,Object.assign({ref:Fe},_e,me))});Xe.Item=Be,Xe.SubMenu=$e,Xe.Divider=se,Xe.ItemGroup=ne.BW;var ke=Xe},58421:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Pt}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Ce=Me,fe=ee(7657),he=function(Je,xt){return xe.createElement(fe.Z,(0,ne.Z)({},Je,{ref:xt,icon:Ce}))},ce=xe.forwardRef(he),ae=ce,se=ee(49198),ve=ee(33853),ue=ee(38819),pe=ee(92310),oe=ee.n(pe),ge=ee(18642),ye=ee(85899),we=ee(38705),Be=ee(17212),ze=ee(39153),$e=ee(55401),Le=ee(26112),Ne={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Re=Ne,Se=ee(91735),Ie=function(Qe){(0,ze.Z)(xt,Qe);var Je=(0,$e.Z)(xt);function xt(){var ot;(0,we.Z)(this,xt);for(var mt=arguments.length,Nt=new Array(mt),rn=0;rn<mt;rn++)Nt[rn]=arguments[rn];return ot=Je.call.apply(Je,[this].concat(Nt)),ot.state={goInputText:""},ot.getValidValue=function(){var It=ot.state.goInputText;return!It||Number.isNaN(It)?void 0:Number(It)},ot.buildOptionText=function(It){return"".concat(It," ").concat(ot.props.locale.items_per_page)},ot.changeSize=function(It){ot.props.changeSize(Number(It))},ot.handleChange=function(It){ot.setState({goInputText:It.target.value})},ot.handleBlur=function(It){var Qt=ot.props,dn=Qt.goButton,At=Qt.quickGo,Lt=Qt.rootPrefixCls,qt=ot.state.goInputText;dn||qt===""||(ot.setState({goInputText:""}),!(It.relatedTarget&&(It.relatedTarget.className.indexOf("".concat(Lt,"-item-link"))>=0||It.relatedTarget.className.indexOf("".concat(Lt,"-item"))>=0))&&At(ot.getValidValue()))},ot.go=function(It){var Qt=ot.state.goInputText;Qt!==""&&(It.keyCode===Re.ENTER||It.type==="click")&&(ot.setState({goInputText:""}),ot.props.quickGo(ot.getValidValue()))},ot}return(0,Be.Z)(xt,[{key:"getPageSizeOptions",value:function(){var mt=this.props,Nt=mt.pageSize,rn=mt.pageSizeOptions;return rn.some(function(It){return It.toString()===Nt.toString()})?rn:rn.concat([Nt.toString()]).sort(function(It,Qt){var dn=Number.isNaN(Number(It))?0:Number(It),At=Number.isNaN(Number(Qt))?0:Number(Qt);return dn-At})}},{key:"render",value:function(){var mt=this,Nt=this.props,rn=Nt.pageSize,It=Nt.locale,Qt=Nt.rootPrefixCls,dn=Nt.changeSize,At=Nt.quickGo,Lt=Nt.goButton,qt=Nt.selectComponentClass,Tn=Nt.buildOptionText,Jt=Nt.selectPrefixCls,On=Nt.disabled,zn=this.state.goInputText,qn="".concat(Qt,"-options"),Xn=qt,vr=null,_r=null,Qn=null;if(!dn&&!At)return null;var Cr=this.getPageSizeOptions();if(dn&&Xn){var ni=Cr.map(function(Jr,Yn){return xe.createElement(Xn.Option,{key:Yn,value:Jr.toString()},(Tn||mt.buildOptionText)(Jr))});vr=xe.createElement(Xn,{disabled:On,prefixCls:Jt,showSearch:!1,className:"".concat(qn,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(rn||Cr[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Yn){return Yn.parentNode},"aria-label":It.page_size,defaultOpen:!1},ni)}return At&&(Lt&&(Qn=typeof Lt=="boolean"?xe.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:On,className:"".concat(qn,"-quick-jumper-button")},It.jump_to_confirm):xe.createElement("span",{onClick:this.go,onKeyUp:this.go},Lt)),_r=xe.createElement("div",{className:"".concat(qn,"-quick-jumper")},It.jump_to,xe.createElement("input",{disabled:On,type:"text",value:zn,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":It.page}),It.page,Qn)),xe.createElement("li",{className:"".concat(qn)},vr,_r)}}]),xt}(xe.Component);Ie.defaultProps={pageSizeOptions:["10","20","50","100"]};var Ae=Ie,it=function(Je){var xt,ot=Je.rootPrefixCls,mt=Je.page,Nt=Je.active,rn=Je.className,It=Je.showTitle,Qt=Je.onClick,dn=Je.onKeyPress,At=Je.itemRender,Lt="".concat(ot,"-item"),qt=oe()(Lt,"".concat(Lt,"-").concat(mt),(xt={},(0,ge.Z)(xt,"".concat(Lt,"-active"),Nt),(0,ge.Z)(xt,"".concat(Lt,"-disabled"),!mt),(0,ge.Z)(xt,Je.className,rn),xt)),Tn=function(){Qt(mt)},Jt=function(qn){dn(qn,Qt,mt)},On=At(mt,"page",xe.createElement("a",{rel:"nofollow"},mt));return On?xe.createElement("li",{title:It?mt.toString():null,className:qt,onClick:Tn,onKeyPress:Jt,tabIndex:0},On):null},Ue=it;function gt(){}function Ve(Qe){var Je=Number(Qe);return typeof Je=="number"&&!Number.isNaN(Je)&&isFinite(Je)&&Math.floor(Je)===Je}var Tt=function(Je,xt,ot){return ot};function ct(Qe,Je,xt){var ot=typeof Qe=="undefined"?Je.pageSize:Qe;return Math.floor((xt.total-1)/ot)+1}var Ot=function(Qe){(0,ze.Z)(xt,Qe);var Je=(0,$e.Z)(xt);function xt(ot){var mt;(0,we.Z)(this,xt),mt=Je.call(this,ot),mt.paginationNode=xe.createRef(),mt.getJumpPrevPage=function(){return Math.max(1,mt.state.current-(mt.props.showLessItems?3:5))},mt.getJumpNextPage=function(){return Math.min(ct(void 0,mt.state,mt.props),mt.state.current+(mt.props.showLessItems?3:5))},mt.getItemIcon=function(dn,At){var Lt=mt.props.prefixCls,qt=dn||xe.createElement("button",{type:"button","aria-label":At,className:"".concat(Lt,"-item-link")});return typeof dn=="function"&&(qt=xe.createElement(dn,(0,ye.Z)({},mt.props))),qt},mt.isValid=function(dn){var At=mt.props.total;return Ve(dn)&&dn!==mt.state.current&&Ve(At)&&At>0},mt.shouldDisplayQuickJumper=function(){var dn=mt.props,At=dn.showQuickJumper,Lt=dn.total,qt=mt.state.pageSize;return Lt<=qt?!1:At},mt.handleKeyDown=function(dn){(dn.keyCode===Re.ARROW_UP||dn.keyCode===Re.ARROW_DOWN)&&dn.preventDefault()},mt.handleKeyUp=function(dn){var At=mt.getValidValue(dn),Lt=mt.state.currentInputValue;At!==Lt&&mt.setState({currentInputValue:At}),dn.keyCode===Re.ENTER?mt.handleChange(At):dn.keyCode===Re.ARROW_UP?mt.handleChange(At-1):dn.keyCode===Re.ARROW_DOWN&&mt.handleChange(At+1)},mt.handleBlur=function(dn){var At=mt.getValidValue(dn);mt.handleChange(At)},mt.changePageSize=function(dn){var At=mt.state.current,Lt=ct(dn,mt.state,mt.props);At=At>Lt?Lt:At,Lt===0&&(At=mt.state.current),typeof dn=="number"&&("pageSize"in mt.props||mt.setState({pageSize:dn}),"current"in mt.props||mt.setState({current:At,currentInputValue:At})),mt.props.onShowSizeChange(At,dn),"onChange"in mt.props&&mt.props.onChange&&mt.props.onChange(At,dn)},mt.handleChange=function(dn){var At=mt.props,Lt=At.disabled,qt=At.onChange,Tn=mt.state,Jt=Tn.pageSize,On=Tn.current,zn=Tn.currentInputValue;if(mt.isValid(dn)&&!Lt){var qn=ct(void 0,mt.state,mt.props),Xn=dn;return dn>qn?Xn=qn:dn<1&&(Xn=1),"current"in mt.props||mt.setState({current:Xn}),Xn!==zn&&mt.setState({currentInputValue:Xn}),qt(Xn,Jt),Xn}return On},mt.prev=function(){mt.hasPrev()&&mt.handleChange(mt.state.current-1)},mt.next=function(){mt.hasNext()&&mt.handleChange(mt.state.current+1)},mt.jumpPrev=function(){mt.handleChange(mt.getJumpPrevPage())},mt.jumpNext=function(){mt.handleChange(mt.getJumpNextPage())},mt.hasPrev=function(){return mt.state.current>1},mt.hasNext=function(){return mt.state.current<ct(void 0,mt.state,mt.props)},mt.runIfEnter=function(dn,At){if(dn.key==="Enter"||dn.charCode===13){for(var Lt=arguments.length,qt=new Array(Lt>2?Lt-2:0),Tn=2;Tn<Lt;Tn++)qt[Tn-2]=arguments[Tn];At.apply(void 0,qt)}},mt.runIfEnterPrev=function(dn){mt.runIfEnter(dn,mt.prev)},mt.runIfEnterNext=function(dn){mt.runIfEnter(dn,mt.next)},mt.runIfEnterJumpPrev=function(dn){mt.runIfEnter(dn,mt.jumpPrev)},mt.runIfEnterJumpNext=function(dn){mt.runIfEnter(dn,mt.jumpNext)},mt.handleGoTO=function(dn){(dn.keyCode===Re.ENTER||dn.type==="click")&&mt.handleChange(mt.state.currentInputValue)},mt.renderPrev=function(dn){var At=mt.props,Lt=At.prevIcon,qt=At.itemRender,Tn=qt(dn,"prev",mt.getItemIcon(Lt,"prev page")),Jt=!mt.hasPrev();return(0,xe.isValidElement)(Tn)?(0,xe.cloneElement)(Tn,{disabled:Jt}):Tn},mt.renderNext=function(dn){var At=mt.props,Lt=At.nextIcon,qt=At.itemRender,Tn=qt(dn,"next",mt.getItemIcon(Lt,"next page")),Jt=!mt.hasNext();return(0,xe.isValidElement)(Tn)?(0,xe.cloneElement)(Tn,{disabled:Jt}):Tn};var Nt=ot.onChange!==gt,rn="current"in ot;rn&&!Nt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var It=ot.defaultCurrent;"current"in ot&&(It=ot.current);var Qt=ot.defaultPageSize;return"pageSize"in ot&&(Qt=ot.pageSize),It=Math.min(It,ct(Qt,void 0,ot)),mt.state={current:It,currentInputValue:It,pageSize:Qt},mt}return(0,Be.Z)(xt,[{key:"componentDidUpdate",value:function(mt,Nt){var rn=this.props.prefixCls;if(Nt.current!==this.state.current&&this.paginationNode.current){var It=this.paginationNode.current.querySelector(".".concat(rn,"-item-").concat(Nt.current));if(It&&document.activeElement===It){var Qt;It==null||(Qt=It.blur)===null||Qt===void 0||Qt.call(It)}}}},{key:"getValidValue",value:function(mt){var Nt=mt.target.value,rn=ct(void 0,this.state,this.props),It=this.state.currentInputValue,Qt;return Nt===""?Qt=Nt:Number.isNaN(Number(Nt))?Qt=It:Nt>=rn?Qt=rn:Qt=Number(Nt),Qt}},{key:"getShowSizeChanger",value:function(){var mt=this.props,Nt=mt.showSizeChanger,rn=mt.total,It=mt.totalBoundaryShowSizeChanger;return typeof Nt!="undefined"?Nt:rn>It}},{key:"render",value:function(){var mt=this.props,Nt=mt.prefixCls,rn=mt.className,It=mt.style,Qt=mt.disabled,dn=mt.hideOnSinglePage,At=mt.total,Lt=mt.locale,qt=mt.showQuickJumper,Tn=mt.showLessItems,Jt=mt.showTitle,On=mt.showTotal,zn=mt.simple,qn=mt.itemRender,Xn=mt.showPrevNextJumpers,vr=mt.jumpPrevIcon,_r=mt.jumpNextIcon,Qn=mt.selectComponentClass,Cr=mt.selectPrefixCls,ni=mt.pageSizeOptions,Jr=this.state,Yn=Jr.current,mr=Jr.pageSize,si=Jr.currentInputValue;if(dn===!0&&At<=mr)return null;var or=ct(void 0,this.state,this.props),ii=[],ki=null,gi=null,Li=null,ui=null,dr=null,Hr=qt&&qt.goButton,Cn=Tn?1:2,Ee=Yn-1>0?Yn-1:0,je=Yn+1<or?Yn+1:or,Oe=(0,Le.Z)(this.props,{aria:!0,data:!0}),De=On&&xe.createElement("li",{className:"".concat(Nt,"-total-text")},On(At,[At===0?0:(Yn-1)*mr+1,Yn*mr>At?At:Yn*mr]));if(zn){Hr&&(typeof Hr=="boolean"?dr=xe.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Lt.jump_to_confirm):dr=xe.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Hr),dr=xe.createElement("li",{title:Jt?"".concat(Lt.jump_to).concat(Yn,"/").concat(or):null,className:"".concat(Nt,"-simple-pager")},dr));var Ke=this.renderPrev(Ee);return xe.createElement("ul",(0,ne.Z)({className:oe()(Nt,"".concat(Nt,"-simple"),(0,ge.Z)({},"".concat(Nt,"-disabled"),Qt),rn),style:It,ref:this.paginationNode},Oe),De,Ke?xe.createElement("li",{title:Jt?Lt.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:oe()("".concat(Nt,"-prev"),(0,ge.Z)({},"".concat(Nt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},Ke):null,xe.createElement("li",{title:Jt?"".concat(Yn,"/").concat(or):null,className:"".concat(Nt,"-simple-pager")},xe.createElement("input",{type:"text",value:si,disabled:Qt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),xe.createElement("span",{className:"".concat(Nt,"-slash")},"/"),or),xe.createElement("li",{title:Jt?Lt.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:oe()("".concat(Nt,"-next"),(0,ge.Z)({},"".concat(Nt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(je)),dr)}if(or<=3+Cn*2){var et={locale:Lt,rootPrefixCls:Nt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Jt,itemRender:qn};or||ii.push(xe.createElement(Ue,(0,ne.Z)({},et,{key:"noPager",page:1,className:"".concat(Nt,"-item-disabled")})));for(var rt=1;rt<=or;rt+=1){var Dt=Yn===rt;ii.push(xe.createElement(Ue,(0,ne.Z)({},et,{key:rt,page:rt,active:Dt})))}}else{var Ft=Tn?Lt.prev_3:Lt.prev_5,Bt=Tn?Lt.next_3:Lt.next_5,Ct=qn(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(vr,"prev page")),Ht=qn(this.getJumpNextPage(),"jump-next",this.getItemIcon(_r,"next page"));Xn&&(ki=Ct?xe.createElement("li",{title:Jt?Ft:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:oe()("".concat(Nt,"-jump-prev"),(0,ge.Z)({},"".concat(Nt,"-jump-prev-custom-icon"),!!vr))},Ct):null,gi=Ht?xe.createElement("li",{title:Jt?Bt:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:oe()("".concat(Nt,"-jump-next"),(0,ge.Z)({},"".concat(Nt,"-jump-next-custom-icon"),!!_r))},Ht):null),ui=xe.createElement(Ue,{locale:Lt,last:!0,rootPrefixCls:Nt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:or,page:or,active:!1,showTitle:Jt,itemRender:qn}),Li=xe.createElement(Ue,{locale:Lt,rootPrefixCls:Nt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Jt,itemRender:qn});var Ut=Math.max(1,Yn-Cn),on=Math.min(Yn+Cn,or);Yn-1<=Cn&&(on=1+Cn*2),or-Yn<=Cn&&(Ut=or-Cn*2);for(var cn=Ut;cn<=on;cn+=1){var Rt=Yn===cn;ii.push(xe.createElement(Ue,{locale:Lt,rootPrefixCls:Nt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:cn,page:cn,active:Rt,showTitle:Jt,itemRender:qn}))}Yn-1>=Cn*2&&Yn!==3&&(ii[0]=(0,xe.cloneElement)(ii[0],{className:"".concat(Nt,"-item-after-jump-prev")}),ii.unshift(ki)),or-Yn>=Cn*2&&Yn!==or-2&&(ii[ii.length-1]=(0,xe.cloneElement)(ii[ii.length-1],{className:"".concat(Nt,"-item-before-jump-next")}),ii.push(gi)),Ut!==1&&ii.unshift(Li),on!==or&&ii.push(ui)}var Vt=!this.hasPrev()||!or,In=!this.hasNext()||!or,wn=this.renderPrev(Ee),Nn=this.renderNext(je);return xe.createElement("ul",(0,ne.Z)({className:oe()(Nt,rn,(0,ge.Z)({},"".concat(Nt,"-disabled"),Qt)),style:It,ref:this.paginationNode},Oe),De,wn?xe.createElement("li",{title:Jt?Lt.prev_page:null,onClick:this.prev,tabIndex:Vt?null:0,onKeyPress:this.runIfEnterPrev,className:oe()("".concat(Nt,"-prev"),(0,ge.Z)({},"".concat(Nt,"-disabled"),Vt)),"aria-disabled":Vt},wn):null,ii,Nn?xe.createElement("li",{title:Jt?Lt.next_page:null,onClick:this.next,tabIndex:In?null:0,onKeyPress:this.runIfEnterNext,className:oe()("".concat(Nt,"-next"),(0,ge.Z)({},"".concat(Nt,"-disabled"),In)),"aria-disabled":In},Nn):null,xe.createElement(Ae,{disabled:Qt,locale:Lt,rootPrefixCls:Nt,selectComponentClass:Qn,selectPrefixCls:Cr,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Yn,pageSize:mr,pageSizeOptions:ni,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Hr}))}}],[{key:"getDerivedStateFromProps",value:function(mt,Nt){var rn={};if("current"in mt&&(rn.current=mt.current,mt.current!==Nt.current&&(rn.currentInputValue=rn.current)),"pageSize"in mt&&mt.pageSize!==Nt.pageSize){var It=Nt.current,Qt=ct(mt.pageSize,Nt,mt);It=It>Qt?Qt:It,"current"in mt||(rn.current=It,rn.currentInputValue=It),rn.pageSize=mt.pageSize}return rn}}]),xt}(xe.Component);Ot.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:gt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:gt,locale:Se.Z,style:{},itemRender:Tt,totalBoundaryShowSizeChanger:50};var We=Ot,lt=ee(22075),ut=ee(36355),St=ee(19716),qe=ee(8628),Ze=ee(9763),wt=ee(57809);const Wt=Qe=>xe.createElement(wt.default,Object.assign({},Qe,{showSearch:!0,size:"small"})),Kt=Qe=>xe.createElement(wt.default,Object.assign({},Qe,{showSearch:!0,size:"middle"}));Wt.Option=wt.default.Option,Kt.Option=wt.default.Option;var _t=ee(9937),vt=ee(17313),jt=ee(83116),yn=ee(37613);const Xt=Qe=>{const{componentCls:Je}=Qe;return{[`${Je}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Je}-item-link`]:{color:Qe.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Je}-item-link`]:{color:Qe.colorTextDisabled,cursor:"not-allowed"}}},[`&${Je}-disabled`]:{cursor:"not-allowed",[`${Je}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Qe.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Qe.colorBorder,backgroundColor:Qe.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Qe.itemActiveBgDisabled},a:{color:Qe.itemActiveColorDisabled}}},[`${Je}-item-link`]:{color:Qe.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Je}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Je}-simple-pager`]:{color:Qe.colorTextDisabled},[`${Je}-jump-prev, ${Je}-jump-next`]:{[`${Je}-item-link-icon`]:{opacity:0},[`${Je}-item-ellipsis`]:{opacity:1}}},[`&${Je}-simple`]:{[`${Je}-prev, ${Je}-next`]:{[`&${Je}-disabled ${Je}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Ln=Qe=>{const{componentCls:Je}=Qe;return{[`&${Je}-mini ${Je}-total-text, &${Je}-mini ${Je}-simple-pager`]:{height:Qe.itemSizeSM,lineHeight:`${Qe.itemSizeSM}px`},[`&${Je}-mini ${Je}-item`]:{minWidth:Qe.itemSizeSM,height:Qe.itemSizeSM,margin:0,lineHeight:`${Qe.itemSizeSM-2}px`},[`&${Je}-mini:not(${Je}-disabled) ${Je}-item:not(${Je}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Qe.colorBgTextHover},"&:active":{backgroundColor:Qe.colorBgTextActive}},[`&${Je}-mini ${Je}-prev, &${Je}-mini ${Je}-next`]:{minWidth:Qe.itemSizeSM,height:Qe.itemSizeSM,margin:0,lineHeight:`${Qe.itemSizeSM}px`},[`&${Je}-mini:not(${Je}-disabled)`]:{[`${Je}-prev, ${Je}-next`]:{[`&:hover ${Je}-item-link`]:{backgroundColor:Qe.colorBgTextHover},[`&:active ${Je}-item-link`]:{backgroundColor:Qe.colorBgTextActive},[`&${Je}-disabled:hover ${Je}-item-link`]:{backgroundColor:"transparent"}}},[`
&${Je}-mini ${Je}-prev ${Je}-item-link,
&${Je}-mini ${Je}-next ${Je}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Qe.itemSizeSM,lineHeight:`${Qe.itemSizeSM}px`}},[`&${Je}-mini ${Je}-jump-prev, &${Je}-mini ${Je}-jump-next`]:{height:Qe.itemSizeSM,marginInlineEnd:0,lineHeight:`${Qe.itemSizeSM}px`},[`&${Je}-mini ${Je}-options`]:{marginInlineStart:Qe.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Qe.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Qe.itemSizeSM,lineHeight:`${Qe.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,_t.x0)(Qe)),{width:Qe.paginationMiniQuickJumperInputWidth,height:Qe.controlHeightSM})}}}},pn=Qe=>{const{componentCls:Je}=Qe;return{[`
&${Je}-simple ${Je}-prev,
&${Je}-simple ${Je}-next
`]:{height:Qe.itemSizeSM,lineHeight:`${Qe.itemSizeSM}px`,verticalAlign:"top",[`${Je}-item-link`]:{height:Qe.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Qe.colorBgTextHover},"&:active":{backgroundColor:Qe.colorBgTextActive},"&::after":{height:Qe.itemSizeSM,lineHeight:`${Qe.itemSizeSM}px`}}},[`&${Je}-simple ${Je}-simple-pager`]:{display:"inline-block",height:Qe.itemSizeSM,marginInlineEnd:Qe.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Qe.marginXS,padding:`0 ${Qe.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Qe.itemInputBg,border:`${Qe.lineWidth}px ${Qe.lineType} ${Qe.colorBorder}`,borderRadius:Qe.borderRadius,outline:"none",transition:`border-color ${Qe.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Qe.colorPrimary},"&:focus":{borderColor:Qe.colorPrimaryHover,boxShadow:`${Qe.inputOutlineOffset}px 0 ${Qe.controlOutlineWidth}px ${Qe.controlOutline}`},"&[disabled]":{color:Qe.colorTextDisabled,backgroundColor:Qe.colorBgContainerDisabled,borderColor:Qe.colorBorder,cursor:"not-allowed"}}}}},hn=Qe=>{const{componentCls:Je}=Qe;return{[`${Je}-jump-prev, ${Je}-jump-next`]:{outline:0,[`${Je}-item-container`]:{position:"relative",[`${Je}-item-link-icon`]:{color:Qe.colorPrimary,fontSize:Qe.fontSizeSM,opacity:0,transition:`all ${Qe.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Je}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Qe.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Qe.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Qe.paginationEllipsisTextIndent,opacity:1,transition:`all ${Qe.motionDurationMid}`}},"&:hover":{[`${Je}-item-link-icon`]:{opacity:1},[`${Je}-item-ellipsis`]:{opacity:0}}},[`
${Je}-prev,
${Je}-jump-prev,
${Je}-jump-next
`]:{marginInlineEnd:Qe.marginXS},[`
${Je}-prev,
${Je}-next,
${Je}-jump-prev,
${Je}-jump-next
`]:{display:"inline-block",minWidth:Qe.itemSize,height:Qe.itemSize,color:Qe.colorText,fontFamily:Qe.fontFamily,lineHeight:`${Qe.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Qe.borderRadius,cursor:"pointer",transition:`all ${Qe.motionDurationMid}`},[`${Je}-prev, ${Je}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Qe.colorText,cursor:"pointer",userSelect:"none"},[`${Je}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Qe.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Qe.lineWidth}px ${Qe.lineType} transparent`,borderRadius:Qe.borderRadius,outline:"none",transition:`all ${Qe.motionDurationMid}`},[`&:hover ${Je}-item-link`]:{backgroundColor:Qe.colorBgTextHover},[`&:active ${Je}-item-link`]:{backgroundColor:Qe.colorBgTextActive},[`&${Je}-disabled:hover`]:{[`${Je}-item-link`]:{backgroundColor:"transparent"}}},[`${Je}-slash`]:{marginInlineEnd:Qe.paginationSlashMarginInlineEnd,marginInlineStart:Qe.paginationSlashMarginInlineStart},[`${Je}-options`]:{display:"inline-block",marginInlineStart:Qe.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Qe.controlHeight,marginInlineStart:Qe.marginXS,lineHeight:`${Qe.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,_t.ik)(Qe)),{width:Qe.controlHeightLG*1.25,height:Qe.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Qe.marginXS,marginInlineEnd:Qe.marginXS})}}}},un=Qe=>{const{componentCls:Je}=Qe;return{[`${Je}-item`]:{display:"inline-block",minWidth:Qe.itemSize,height:Qe.itemSize,marginInlineEnd:Qe.marginXS,fontFamily:Qe.fontFamily,lineHeight:`${Qe.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Qe.lineWidth}px ${Qe.lineType} transparent`,borderRadius:Qe.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Qe.paginationItemPaddingInline}px`,color:Qe.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Je}-item-active)`]:{"&:hover":{transition:`all ${Qe.motionDurationMid}`,backgroundColor:Qe.colorBgTextHover},"&:active":{backgroundColor:Qe.colorBgTextActive}},"&-active":{fontWeight:Qe.fontWeightStrong,backgroundColor:Qe.itemActiveBg,borderColor:Qe.colorPrimary,a:{color:Qe.colorPrimary},"&:hover":{borderColor:Qe.colorPrimaryHover},"&:hover a":{color:Qe.colorPrimaryHover}}}}},Xe=Qe=>{const{componentCls:Je}=Qe;return{[Je]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,vt.Wf)(Qe)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Je}-total-text`]:{display:"inline-block",height:Qe.itemSize,marginInlineEnd:Qe.marginXS,lineHeight:`${Qe.itemSize-2}px`,verticalAlign:"middle"}}),un(Qe)),hn(Qe)),pn(Qe)),Ln(Qe)),Xt(Qe)),{[`@media only screen and (max-width: ${Qe.screenLG}px)`]:{[`${Je}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Qe.screenSM}px)`]:{[`${Je}-options`]:{display:"none"}}}),[`&${Qe.componentCls}-rtl`]:{direction:"rtl"}}},ke=Qe=>{const{componentCls:Je}=Qe;return{[`${Je}${Je}-disabled:not(${Je}-mini)`]:{"&, &:hover":{[`${Je}-item-link`]:{borderColor:Qe.colorBorder}},"&:focus-visible":{[`${Je}-item-link`]:{borderColor:Qe.colorBorder}},[`${Je}-item, ${Je}-item-link`]:{backgroundColor:Qe.colorBgContainerDisabled,borderColor:Qe.colorBorder,[`&:hover:not(${Je}-item-active)`]:{backgroundColor:Qe.colorBgContainerDisabled,borderColor:Qe.colorBorder,a:{color:Qe.colorTextDisabled}},[`&${Je}-item-active`]:{backgroundColor:Qe.itemActiveBgDisabled}},[`${Je}-prev, ${Je}-next`]:{"&:hover button":{backgroundColor:Qe.colorBgContainerDisabled,borderColor:Qe.colorBorder,color:Qe.colorTextDisabled},[`${Je}-item-link`]:{backgroundColor:Qe.colorBgContainerDisabled,borderColor:Qe.colorBorder}}},[`${Je}:not(${Je}-mini)`]:{[`${Je}-prev, ${Je}-next`]:{"&:hover button":{borderColor:Qe.colorPrimaryHover,backgroundColor:Qe.itemBg},[`${Je}-item-link`]:{backgroundColor:Qe.itemLinkBg,borderColor:Qe.colorBorder},[`&:hover ${Je}-item-link`]:{borderColor:Qe.colorPrimary,backgroundColor:Qe.itemBg,color:Qe.colorPrimary},[`&${Je}-disabled`]:{[`${Je}-item-link`]:{borderColor:Qe.colorBorder,color:Qe.colorTextDisabled}}},[`${Je}-item`]:{backgroundColor:Qe.itemBg,border:`${Qe.lineWidth}px ${Qe.lineType} ${Qe.colorBorder}`,[`&:hover:not(${Je}-item-active)`]:{borderColor:Qe.colorPrimary,backgroundColor:Qe.itemBg,a:{color:Qe.colorPrimary}},"&-active":{borderColor:Qe.colorPrimary}}}}},_e=Qe=>{const{componentCls:Je}=Qe;return{[`${Je}:not(${Je}-disabled)`]:{[`${Je}-item`]:Object.assign({},(0,vt.Qy)(Qe)),[`${Je}-jump-prev, ${Je}-jump-next`]:{"&:focus-visible":Object.assign({[`${Je}-item-link-icon`]:{opacity:1},[`${Je}-item-ellipsis`]:{opacity:0}},(0,vt.oN)(Qe))},[`${Je}-prev, ${Je}-next`]:{[`&:focus-visible ${Je}-item-link`]:Object.assign({},(0,vt.oN)(Qe))}}}};var Te=(0,jt.Z)("Pagination",Qe=>{const Je=(0,yn.TS)(Qe,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Qe.marginXXS/2,paginationMiniQuickJumperInputWidth:Qe.controlHeightLG*1.1,paginationItemPaddingInline:Qe.marginXXS*1.5,paginationEllipsisLetterSpacing:Qe.marginXXS/2,paginationSlashMarginInlineStart:Qe.marginXXS,paginationSlashMarginInlineEnd:Qe.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,_t.e5)(Qe),(0,_t.TM)(Qe));return[Xe(Je),_e(Je),Qe.wireframe&&ke(Je)]},Qe=>({itemBg:Qe.colorBgContainer,itemSize:Qe.controlHeight,itemSizeSM:Qe.controlHeightSM,itemActiveBg:Qe.colorBgContainer,itemLinkBg:Qe.colorBgContainer,itemActiveColorDisabled:Qe.colorTextDisabled,itemActiveBgDisabled:Qe.controlItemBgActiveDisabled,itemInputBg:Qe.colorBgContainer,miniOptionsSizeChangerTop:0})),Fe=function(Qe,Je){var xt={};for(var ot in Qe)Object.prototype.hasOwnProperty.call(Qe,ot)&&Je.indexOf(ot)<0&&(xt[ot]=Qe[ot]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,ot=Object.getOwnPropertySymbols(Qe);mt<ot.length;mt++)Je.indexOf(ot[mt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,ot[mt])&&(xt[ot[mt]]=Qe[ot[mt]]);return xt},at=Qe=>{const{prefixCls:Je,selectPrefixCls:xt,className:ot,rootClassName:mt,style:Nt,size:rn,locale:It,selectComponentClass:Qt,responsive:dn,showSizeChanger:At}=Qe,Lt=Fe(Qe,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:qt}=(0,qe.Z)(dn),{getPrefixCls:Tn,direction:Jt,pagination:On={}}=xe.useContext(ut.E_),zn=Tn("pagination",Je),[qn,Xn]=Te(zn),vr=At!=null?At:On.showSizeChanger,_r=xe.useMemo(()=>{const or=xe.createElement("span",{className:`${zn}-item-ellipsis`},"\u2022\u2022\u2022"),ii=xe.createElement("button",{className:`${zn}-item-link`,type:"button",tabIndex:-1},Jt==="rtl"?xe.createElement(ue.Z,null):xe.createElement(ve.Z,null)),ki=xe.createElement("button",{className:`${zn}-item-link`,type:"button",tabIndex:-1},Jt==="rtl"?xe.createElement(ve.Z,null):xe.createElement(ue.Z,null)),gi=xe.createElement("a",{className:`${zn}-item-link`},xe.createElement("div",{className:`${zn}-item-container`},Jt==="rtl"?xe.createElement(se.Z,{className:`${zn}-item-link-icon`}):xe.createElement(ae,{className:`${zn}-item-link-icon`}),or)),Li=xe.createElement("a",{className:`${zn}-item-link`},xe.createElement("div",{className:`${zn}-item-container`},Jt==="rtl"?xe.createElement(ae,{className:`${zn}-item-link-icon`}):xe.createElement(se.Z,{className:`${zn}-item-link-icon`}),or));return{prevIcon:ii,nextIcon:ki,jumpPrevIcon:gi,jumpNextIcon:Li}},[Jt,zn]),[Qn]=(0,Ze.Z)("Pagination",lt.Z),Cr=Object.assign(Object.assign({},Qn),It),ni=(0,St.Z)(rn),Jr=ni==="small"||!!(qt&&!ni&&dn),Yn=Tn("select",xt),mr=oe()({[`${zn}-mini`]:Jr,[`${zn}-rtl`]:Jt==="rtl"},On==null?void 0:On.className,ot,mt,Xn),si=Object.assign(Object.assign({},On==null?void 0:On.style),Nt);return qn(xe.createElement(We,Object.assign({},_r,Lt,{style:si,prefixCls:zn,selectPrefixCls:Yn,className:mr,selectComponentClass:Qt||(Jr?Wt:Kt),locale:Cr,showSizeChanger:vr})))},Pt=at},5112:function(gn,kt,ee){"use strict";ee.d(kt,{ZP:function(){return qe}});var ne=ee(92310),xe=ee.n(ne),Me=ee(18929),Ce=ee(26112),fe=ee(59301),he=ee(36355),ce=ee(19716);const ae=fe.createContext(null),se=ae.Provider;var ve=ae;const ue=fe.createContext(null),pe=ue.Provider;var oe=ee(5630),ge=ee(8654),ye=ee(1684),we=ee(32441),Be=ee(17313),ze=ee(83116),$e=ee(37613);const Le=Ze=>{const{componentCls:wt,antCls:Wt}=Ze,Kt=`${wt}-group`;return{[Kt]:Object.assign(Object.assign({},(0,Be.Wf)(Ze)),{display:"inline-block",fontSize:0,[`&${Kt}-rtl`]:{direction:"rtl"},[`${Wt}-badge ${Wt}-badge-count`]:{zIndex:1},[`> ${Wt}-badge:not(:first-child) > ${Wt}-button-wrapper`]:{borderInlineStart:"none"}})}},Ne=Ze=>{const{componentCls:wt,wrapperMarginInlineEnd:Wt,colorPrimary:Kt,radioSize:_t,motionDurationSlow:vt,motionDurationMid:jt,motionEaseInOutCirc:yn,colorBgContainer:Xt,colorBorder:Ln,lineWidth:pn,dotSize:hn,colorBgContainerDisabled:un,colorTextDisabled:Xe,paddingXS:ke,dotColorDisabled:_e,lineType:Te,radioDotDisabledSize:Fe,wireframe:me,colorWhite:at}=Ze,Pt=`${wt}-inner`;return{[`${wt}-wrapper`]:Object.assign(Object.assign({},(0,Be.Wf)(Ze)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Wt,cursor:"pointer",[`&${wt}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Ze.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${wt}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${pn}px ${Te} ${Kt}`,borderRadius:"50%",visibility:"hidden",content:'""'},[wt]:Object.assign(Object.assign({},(0,Be.Wf)(Ze)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${wt}-wrapper:hover &,
&:hover ${Pt}`]:{borderColor:Kt},[`${wt}-input:focus-visible + ${Pt}`]:Object.assign({},(0,Be.oN)(Ze)),[`${wt}:hover::after, ${wt}-wrapper:hover &::after`]:{visibility:"visible"},[`${wt}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:_t,height:_t,marginBlockStart:_t/-2,marginInlineStart:_t/-2,backgroundColor:me?Kt:at,borderBlockStart:0,borderInlineStart:0,borderRadius:_t,transform:"scale(0)",opacity:0,transition:`all ${vt} ${yn}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:_t,height:_t,backgroundColor:Xt,borderColor:Ln,borderStyle:"solid",borderWidth:pn,borderRadius:"50%",transition:`all ${jt}`},[`${wt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${wt}-checked`]:{[Pt]:{borderColor:Kt,backgroundColor:me?Xt:Kt,"&::after":{transform:`scale(${hn/_t})`,opacity:1,transition:`all ${vt} ${yn}`}}},[`${wt}-disabled`]:{cursor:"not-allowed",[Pt]:{backgroundColor:un,borderColor:Ln,cursor:"not-allowed","&::after":{backgroundColor:_e}},[`${wt}-input`]:{cursor:"not-allowed"},[`${wt}-disabled + span`]:{color:Xe,cursor:"not-allowed"},[`&${wt}-checked`]:{[Pt]:{"&::after":{transform:`scale(${Fe/_t})`}}}},[`span${wt} + *`]:{paddingInlineStart:ke,paddingInlineEnd:ke}})}},Re=Ze=>{const{buttonColor:wt,controlHeight:Wt,componentCls:Kt,lineWidth:_t,lineType:vt,colorBorder:jt,motionDurationSlow:yn,motionDurationMid:Xt,buttonPaddingInline:Ln,fontSize:pn,buttonBg:hn,fontSizeLG:un,controlHeightLG:Xe,controlHeightSM:ke,paddingXS:_e,borderRadius:Te,borderRadiusSM:Fe,borderRadiusLG:me,buttonCheckedBg:at,buttonSolidCheckedColor:Pt,colorTextDisabled:Qe,colorBgContainerDisabled:Je,buttonCheckedBgDisabled:xt,buttonCheckedColorDisabled:ot,colorPrimary:mt,colorPrimaryHover:Nt,colorPrimaryActive:rn,buttonSolidCheckedBg:It,buttonSolidCheckedHoverBg:Qt,buttonSolidCheckedActiveBg:dn}=Ze;return{[`${Kt}-button-wrapper`]:{position:"relative",display:"inline-block",height:Wt,margin:0,paddingInline:Ln,paddingBlock:0,color:wt,fontSize:pn,lineHeight:`${Wt-_t*2}px`,background:hn,border:`${_t}px ${vt} ${jt}`,borderBlockStartWidth:_t+.02,borderInlineStartWidth:0,borderInlineEndWidth:_t,cursor:"pointer",transition:[`color ${Xt}`,`background ${Xt}`,`box-shadow ${Xt}`].join(","),a:{color:wt},[`> ${Kt}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-_t,insetInlineStart:-_t,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:_t,paddingInline:0,backgroundColor:jt,transition:`background-color ${yn}`,content:'""'}},"&:first-child":{borderInlineStart:`${_t}px ${vt} ${jt}`,borderStartStartRadius:Te,borderEndStartRadius:Te},"&:last-child":{borderStartEndRadius:Te,borderEndEndRadius:Te},"&:first-child:last-child":{borderRadius:Te},[`${Kt}-group-large &`]:{height:Xe,fontSize:un,lineHeight:`${Xe-_t*2}px`,"&:first-child":{borderStartStartRadius:me,borderEndStartRadius:me},"&:last-child":{borderStartEndRadius:me,borderEndEndRadius:me}},[`${Kt}-group-small &`]:{height:ke,paddingInline:_e-_t,paddingBlock:0,lineHeight:`${ke-_t*2}px`,"&:first-child":{borderStartStartRadius:Fe,borderEndStartRadius:Fe},"&:last-child":{borderStartEndRadius:Fe,borderEndEndRadius:Fe}},"&:hover":{position:"relative",color:mt},"&:has(:focus-visible)":Object.assign({},(0,Be.oN)(Ze)),[`${Kt}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Kt}-button-wrapper-disabled)`]:{zIndex:1,color:mt,background:at,borderColor:mt,"&::before":{backgroundColor:mt},"&:first-child":{borderColor:mt},"&:hover":{color:Nt,borderColor:Nt,"&::before":{backgroundColor:Nt}},"&:active":{color:rn,borderColor:rn,"&::before":{backgroundColor:rn}}},[`${Kt}-group-solid &-checked:not(${Kt}-button-wrapper-disabled)`]:{color:Pt,background:It,borderColor:It,"&:hover":{color:Pt,background:Qt,borderColor:Qt},"&:active":{color:Pt,background:dn,borderColor:dn}},"&-disabled":{color:Qe,backgroundColor:Je,borderColor:jt,cursor:"not-allowed","&:first-child, &:hover":{color:Qe,backgroundColor:Je,borderColor:jt}},[`&-disabled${Kt}-button-wrapper-checked`]:{color:ot,backgroundColor:xt,borderColor:jt,boxShadow:"none"}}}},Se=Ze=>Ze-4*2;var Ie=(0,ze.Z)("Radio",Ze=>{const{controlOutline:wt,controlOutlineWidth:Wt,radioSize:Kt}=Ze,_t=`0 0 0 ${Wt}px ${wt}`,vt=_t,jt=Se(Kt),yn=(0,$e.TS)(Ze,{radioDotDisabledSize:jt,radioFocusShadow:_t,radioButtonFocusShadow:vt});return[Le(yn),Ne(yn),Re(yn)]},Ze=>{const{wireframe:wt,padding:Wt,marginXS:Kt,lineWidth:_t,fontSizeLG:vt,colorText:jt,colorBgContainer:yn,colorTextDisabled:Xt,controlItemBgActiveDisabled:Ln,colorTextLightSolid:pn,colorPrimary:hn,colorPrimaryHover:un,colorPrimaryActive:Xe}=Ze,ke=4,_e=vt,Te=wt?Se(_e):_e-(ke+_t)*2;return{radioSize:_e,dotSize:Te,dotColorDisabled:Xt,buttonSolidCheckedColor:pn,buttonSolidCheckedBg:hn,buttonSolidCheckedHoverBg:un,buttonSolidCheckedActiveBg:Xe,buttonBg:yn,buttonCheckedBg:yn,buttonColor:jt,buttonCheckedBgDisabled:Ln,buttonCheckedColorDisabled:Xt,buttonPaddingInline:Wt-_t,wrapperMarginInlineEnd:Kt}}),Ae=ee(14088),it=ee(4572),Ue=function(Ze,wt){var Wt={};for(var Kt in Ze)Object.prototype.hasOwnProperty.call(Ze,Kt)&&wt.indexOf(Kt)<0&&(Wt[Kt]=Ze[Kt]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Kt=Object.getOwnPropertySymbols(Ze);_t<Kt.length;_t++)wt.indexOf(Kt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Kt[_t])&&(Wt[Kt[_t]]=Ze[Kt[_t]]);return Wt};const gt=(Ze,wt)=>{var Wt,Kt;const _t=fe.useContext(ve),vt=fe.useContext(ue),{getPrefixCls:jt,direction:yn,radio:Xt}=fe.useContext(he.E_),Ln=fe.useRef(null),pn=(0,ge.sQ)(wt,Ln),{isFormItemInput:hn}=fe.useContext(we.aM),un=rn=>{var It,Qt;(It=Ze.onChange)===null||It===void 0||It.call(Ze,rn),(Qt=_t==null?void 0:_t.onChange)===null||Qt===void 0||Qt.call(_t,rn)},{prefixCls:Xe,className:ke,rootClassName:_e,children:Te,style:Fe}=Ze,me=Ue(Ze,["prefixCls","className","rootClassName","children","style"]),at=jt("radio",Xe),Pt=((_t==null?void 0:_t.optionType)||vt)==="button",Qe=Pt?`${at}-button`:at,[Je,xt]=Ie(at),ot=Object.assign({},me),mt=fe.useContext(ye.Z);_t&&(ot.name=_t.name,ot.onChange=un,ot.checked=Ze.value===_t.value,ot.disabled=(Wt=ot.disabled)!==null&&Wt!==void 0?Wt:_t.disabled),ot.disabled=(Kt=ot.disabled)!==null&&Kt!==void 0?Kt:mt;const Nt=xe()(`${Qe}-wrapper`,{[`${Qe}-wrapper-checked`]:ot.checked,[`${Qe}-wrapper-disabled`]:ot.disabled,[`${Qe}-wrapper-rtl`]:yn==="rtl",[`${Qe}-wrapper-in-form-item`]:hn},Xt==null?void 0:Xt.className,ke,_e,xt);return Je(fe.createElement(Ae.Z,{component:"Radio",disabled:ot.disabled},fe.createElement("label",{className:Nt,style:Object.assign(Object.assign({},Xt==null?void 0:Xt.style),Fe),onMouseEnter:Ze.onMouseEnter,onMouseLeave:Ze.onMouseLeave},fe.createElement(oe.Z,Object.assign({},ot,{className:xe()(ot.className,!Pt&&it.A),type:"radio",prefixCls:Qe,ref:pn})),Te!==void 0?fe.createElement("span",null,Te):null)))};var Tt=fe.forwardRef(gt);const ct=fe.forwardRef((Ze,wt)=>{const{getPrefixCls:Wt,direction:Kt}=fe.useContext(he.E_),[_t,vt]=(0,Me.Z)(Ze.defaultValue,{value:Ze.value}),jt=It=>{const Qt=_t,dn=It.target.value;"value"in Ze||vt(dn);const{onChange:At}=Ze;At&&dn!==Qt&&At(It)},{prefixCls:yn,className:Xt,rootClassName:Ln,options:pn,buttonStyle:hn="outline",disabled:un,children:Xe,size:ke,style:_e,id:Te,onMouseEnter:Fe,onMouseLeave:me,onFocus:at,onBlur:Pt}=Ze,Qe=Wt("radio",yn),Je=`${Qe}-group`,[xt,ot]=Ie(Qe);let mt=Xe;pn&&pn.length>0&&(mt=pn.map(It=>typeof It=="string"||typeof It=="number"?fe.createElement(Tt,{key:It.toString(),prefixCls:Qe,disabled:un,value:It,checked:_t===It},It):fe.createElement(Tt,{key:`radio-group-value-options-${It.value}`,prefixCls:Qe,disabled:It.disabled||un,value:It.value,checked:_t===It.value,title:It.title,style:It.style},It.label)));const Nt=(0,ce.Z)(ke),rn=xe()(Je,`${Je}-${hn}`,{[`${Je}-${Nt}`]:Nt,[`${Je}-rtl`]:Kt==="rtl"},Xt,Ln,ot);return xt(fe.createElement("div",Object.assign({},(0,Ce.Z)(Ze,{aria:!0,data:!0}),{className:rn,style:_e,onMouseEnter:Fe,onMouseLeave:me,onFocus:at,onBlur:Pt,id:Te,ref:wt}),fe.createElement(se,{value:{onChange:jt,value:_t,disabled:Ze.disabled,name:Ze.name,optionType:Ze.optionType}},mt)))});var Ot=fe.memo(ct),We=function(Ze,wt){var Wt={};for(var Kt in Ze)Object.prototype.hasOwnProperty.call(Ze,Kt)&&wt.indexOf(Kt)<0&&(Wt[Kt]=Ze[Kt]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Kt=Object.getOwnPropertySymbols(Ze);_t<Kt.length;_t++)wt.indexOf(Kt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Kt[_t])&&(Wt[Kt[_t]]=Ze[Kt[_t]]);return Wt};const lt=(Ze,wt)=>{const{getPrefixCls:Wt}=fe.useContext(he.E_),{prefixCls:Kt}=Ze,_t=We(Ze,["prefixCls"]),vt=Wt("radio",Kt);return fe.createElement(pe,{value:"button"},fe.createElement(Tt,Object.assign({prefixCls:vt},_t,{type:"radio",ref:wt})))};var ut=fe.forwardRef(lt);const St=Tt;St.Button=ut,St.Group=Ot,St.__ANT_RADIO=!0;var qe=St},57809:function(gn,kt,ee){"use strict";var ne=ee(92310),xe=ee.n(ne),Me=ee(77861),Ce=ee(2738),fe=ee(59301),he=ee(53487),ce=ee(62892),ae=ee(19080),se=ee(36355),ve=ee(1684),ue=ee(93891),pe=ee(19716),oe=ee(32441),ge=ee(33234),ye=ee(14154),we=ee(58582),Be=ee(84443),ze=ee(66339),$e=function(Ie,Ae){var it={};for(var Ue in Ie)Object.prototype.hasOwnProperty.call(Ie,Ue)&&Ae.indexOf(Ue)<0&&(it[Ue]=Ie[Ue]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,Ue=Object.getOwnPropertySymbols(Ie);gt<Ue.length;gt++)Ae.indexOf(Ue[gt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Ue[gt])&&(it[Ue[gt]]=Ie[Ue[gt]]);return it};const Le="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ne=(Ie,Ae)=>{var it,{prefixCls:Ue,bordered:gt=!0,className:Ve,rootClassName:Tt,getPopupContainer:ct,popupClassName:Ot,dropdownClassName:We,listHeight:lt=256,placement:ut,listItemHeight:St=24,size:qe,disabled:Ze,notFoundContent:wt,status:Wt,builtinPlacements:Kt,dropdownMatchSelectWidth:_t,popupMatchSelectWidth:vt,direction:jt,style:yn,allowClear:Xt}=Ie,Ln=$e(Ie,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:pn,getPrefixCls:hn,renderEmpty:un,direction:Xe,virtual:ke,popupMatchSelectWidth:_e,popupOverflow:Te,select:Fe}=fe.useContext(se.E_),me=hn("select",Ue),at=hn(),Pt=jt!=null?jt:Xe,{compactSize:Qe,compactItemClassnames:Je}=(0,ge.ri)(me,Pt),[xt,ot]=(0,ye.Z)(me),mt=fe.useMemo(()=>{const{mode:si}=Ln;if(si!=="combobox")return si===Le?"combobox":si},[Ln.mode]),Nt=mt==="multiple"||mt==="tags",rn=(0,Be.Z)(Ln.suffixIcon,Ln.showArrow),It=(it=vt!=null?vt:_t)!==null&&it!==void 0?it:_e,{status:Qt,hasFeedback:dn,isFormItemInput:At,feedbackIcon:Lt}=fe.useContext(oe.aM),qt=(0,ae.F)(Qt,Wt);let Tn;wt!==void 0?Tn=wt:mt==="combobox"?Tn=null:Tn=(un==null?void 0:un("Select"))||fe.createElement(ue.Z,{componentName:"Select"});const{suffixIcon:Jt,itemIcon:On,removeIcon:zn,clearIcon:qn}=(0,ze.Z)(Object.assign(Object.assign({},Ln),{multiple:Nt,hasFeedback:dn,feedbackIcon:Lt,showSuffixIcon:rn,prefixCls:me,showArrow:Ln.showArrow,componentName:"Select"})),Xn=Xt===!0?{clearIcon:qn}:Xt,vr=(0,Ce.Z)(Ln,["suffixIcon","itemIcon"]),_r=xe()(Ot||We,{[`${me}-dropdown-${Pt}`]:Pt==="rtl"},Tt,ot),Qn=(0,pe.Z)(si=>{var or;return(or=qe!=null?qe:Qe)!==null&&or!==void 0?or:si}),Cr=fe.useContext(ve.Z),ni=Ze!=null?Ze:Cr,Jr=xe()({[`${me}-lg`]:Qn==="large",[`${me}-sm`]:Qn==="small",[`${me}-rtl`]:Pt==="rtl",[`${me}-borderless`]:!gt,[`${me}-in-form-item`]:At},(0,ae.Z)(me,qt,dn),Je,Fe==null?void 0:Fe.className,Ve,Tt,ot),Yn=fe.useMemo(()=>ut!==void 0?ut:Pt==="rtl"?"bottomRight":"bottomLeft",[ut,Pt]),mr=(0,we.Z)(Kt,Te);return xt(fe.createElement(Me.ZP,Object.assign({ref:Ae,virtual:ke,showSearch:Fe==null?void 0:Fe.showSearch},vr,{style:Object.assign(Object.assign({},Fe==null?void 0:Fe.style),yn),dropdownMatchSelectWidth:It,builtinPlacements:mr,transitionName:(0,ce.m)(at,"slide-up",Ln.transitionName),listHeight:lt,listItemHeight:St,mode:mt,prefixCls:me,placement:Yn,direction:Pt,suffixIcon:Jt,menuItemSelectedIcon:On,removeIcon:zn,allowClear:Xn,notFoundContent:Tn,className:Jr,getPopupContainer:ct||pn,dropdownClassName:_r,disabled:ni})))},Re=fe.forwardRef(Ne),Se=(0,he.Z)(Re);Re.SECRET_COMBOBOX_MODE_DO_NOT_USE=Le,Re.Option=Me.Wx,Re.OptGroup=Me.Xo,Re._InternalPanelDoNotUseOrYouWillBeFired=Se,kt.default=Re},14154:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Re}});var ne=ee(17313),xe=ee(74207),Me=ee(37613),Ce=ee(83116),fe=ee(13826),he=ee(92899);const ce=Se=>{const{optionHeight:Ie,optionFontSize:Ae,optionLineHeight:it,optionPadding:Ue}=Se;return{position:"relative",display:"block",minHeight:Ie,padding:Ue,color:Se.colorText,fontWeight:"normal",fontSize:Ae,lineHeight:it,boxSizing:"border-box"}};var se=Se=>{const{antCls:Ie,componentCls:Ae}=Se,it=`${Ae}-item`,Ue=`&${Ie}-slide-up-enter${Ie}-slide-up-enter-active`,gt=`&${Ie}-slide-up-appear${Ie}-slide-up-appear-active`,Ve=`&${Ie}-slide-up-leave${Ie}-slide-up-leave-active`,Tt=`${Ae}-dropdown-placement-`;return[{[`${Ae}-dropdown`]:Object.assign(Object.assign({},(0,ne.Wf)(Se)),{position:"absolute",top:-9999,zIndex:Se.zIndexPopup,boxSizing:"border-box",padding:Se.paddingXXS,overflow:"hidden",fontSize:Se.fontSize,fontVariant:"initial",backgroundColor:Se.colorBgElevated,borderRadius:Se.borderRadiusLG,outline:"none",boxShadow:Se.boxShadowSecondary,[`
${Ue}${Tt}bottomLeft,
${gt}${Tt}bottomLeft
`]:{animationName:fe.fJ},[`
${Ue}${Tt}topLeft,
${gt}${Tt}topLeft,
${Ue}${Tt}topRight,
${gt}${Tt}topRight
`]:{animationName:fe.Qt},[`${Ve}${Tt}bottomLeft`]:{animationName:fe.Uw},[`
${Ve}${Tt}topLeft,
${Ve}${Tt}topRight
`]:{animationName:fe.ly},"&-hidden":{display:"none"},[`${it}`]:Object.assign(Object.assign({},ce(Se)),{cursor:"pointer",transition:`background ${Se.motionDurationSlow} ease`,borderRadius:Se.borderRadiusSM,"&-group":{color:Se.colorTextDescription,fontSize:Se.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ne.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${it}-option-disabled)`]:{backgroundColor:Se.optionActiveBg},[`&-selected:not(${it}-option-disabled)`]:{color:Se.optionSelectedColor,fontWeight:Se.optionSelectedFontWeight,backgroundColor:Se.optionSelectedBg,[`${it}-option-state`]:{color:Se.colorPrimary}},"&-disabled":{[`&${it}-option-selected`]:{backgroundColor:Se.colorBgContainerDisabled},color:Se.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Se.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,fe.oN)(Se,"slide-up"),(0,fe.oN)(Se,"slide-down"),(0,he.Fm)(Se,"move-up"),(0,he.Fm)(Se,"move-down")]};const ve=2,ue=Se=>{let{controlHeightSM:Ie,controlHeight:Ae,lineWidth:it}=Se;const Ue=(Ae-Ie)/2-it,gt=Math.ceil(Ue/2);return[Ue,gt]};function pe(Se,Ie){const{componentCls:Ae,iconCls:it}=Se,Ue=`${Ae}-selection-overflow`,gt=Se.multipleSelectItemHeight,[Ve]=ue(Se),Tt=Ie?`${Ae}-${Ie}`:"";return{[`${Ae}-multiple${Tt}`]:{fontSize:Se.fontSize,[Ue]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ae}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ve-ve}px ${ve*2}px`,borderRadius:Se.borderRadius,[`${Ae}-show-search&`]:{cursor:"text"},[`${Ae}-disabled&`]:{background:Se.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ve}px 0`,lineHeight:`${gt}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${Ae}-show-arrow ${Ae}-selector,
&${Ae}-allow-clear ${Ae}-selector
`]:{paddingInlineEnd:Se.fontSizeIcon+Se.controlPaddingHorizontal},[`${Ae}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:gt,marginTop:ve,marginBottom:ve,lineHeight:`${gt-Se.lineWidth*2}px`,background:Se.multipleItemBg,border:`${Se.lineWidth}px ${Se.lineType} ${Se.multipleItemBorderColor}`,borderRadius:Se.borderRadiusSM,cursor:"default",transition:`font-size ${Se.motionDurationSlow}, line-height ${Se.motionDurationSlow}, height ${Se.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ve*2,paddingInlineStart:Se.paddingXS,paddingInlineEnd:Se.paddingXS/2,[`${Ae}-disabled&`]:{color:Se.multipleItemColorDisabled,borderColor:Se.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Se.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ne.Ro)()),{display:"inline-flex",alignItems:"center",color:Se.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${it}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Se.colorIconHover}})},[`${Ue}-item + ${Ue}-item`]:{[`${Ae}-selection-search`]:{marginInlineStart:0}},[`${Ae}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Se.inputPaddingHorizontalBase-Ve,"\n &-input,\n &-mirror\n ":{height:gt,fontFamily:Se.fontFamily,lineHeight:`${gt}px`,transition:`all ${Se.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ae}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Se.inputPaddingHorizontalBase,insetInlineEnd:Se.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Se.motionDurationSlow}`}}}}var ge=Se=>{const{componentCls:Ie}=Se,Ae=(0,Me.TS)(Se,{controlHeight:Se.controlHeightSM,multipleSelectItemHeight:Se.controlHeightXS,borderRadius:Se.borderRadiusSM,borderRadiusSM:Se.borderRadiusXS}),it=(0,Me.TS)(Se,{fontSize:Se.fontSizeLG,controlHeight:Se.controlHeightLG,multipleSelectItemHeight:Se.multipleItemHeightLG,borderRadius:Se.borderRadiusLG,borderRadiusSM:Se.borderRadius}),[,Ue]=ue(Se);return[pe(Se),pe(Ae,"sm"),{[`${Ie}-multiple${Ie}-sm`]:{[`${Ie}-selection-placeholder`]:{insetInline:Se.controlPaddingHorizontalSM-Se.lineWidth},[`${Ie}-selection-search`]:{marginInlineStart:Ue}}},pe(it,"lg")]};function ye(Se,Ie){const{componentCls:Ae,inputPaddingHorizontalBase:it,borderRadius:Ue}=Se,gt=Se.controlHeight-Se.lineWidth*2,Ve=Math.ceil(Se.fontSize*1.25),Tt=Ie?`${Ae}-${Ie}`:"";return{[`${Ae}-single${Tt}`]:{fontSize:Se.fontSize,[`${Ae}-selector`]:Object.assign(Object.assign({},(0,ne.Wf)(Se)),{display:"flex",borderRadius:Ue,[`${Ae}-selection-search`]:{position:"absolute",top:0,insetInlineStart:it,insetInlineEnd:it,bottom:0,"&-input":{width:"100%"}},[`
${Ae}-selection-item,
${Ae}-selection-placeholder
`]:{padding:0,lineHeight:`${gt}px`,transition:`all ${Se.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${gt}px`}},[`${Ae}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ae}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ae}-selection-item:after`,`${Ae}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${Ae}-show-arrow ${Ae}-selection-item,
&${Ae}-show-arrow ${Ae}-selection-placeholder
`]:{paddingInlineEnd:Ve},[`&${Ae}-open ${Ae}-selection-item`]:{color:Se.colorTextPlaceholder},[`&:not(${Ae}-customize-input)`]:{[`${Ae}-selector`]:{width:"100%",height:Se.controlHeight,padding:`0 ${it}px`,[`${Ae}-selection-search-input`]:{height:gt},"&:after":{lineHeight:`${gt}px`}}},[`&${Ae}-customize-input`]:{[`${Ae}-selector`]:{"&:after":{display:"none"},[`${Ae}-selection-search`]:{position:"static",width:"100%"},[`${Ae}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${it}px`,"&:after":{display:"none"}}}}}}}function we(Se){const{componentCls:Ie}=Se,Ae=Se.controlPaddingHorizontalSM-Se.lineWidth;return[ye(Se),ye((0,Me.TS)(Se,{controlHeight:Se.controlHeightSM,borderRadius:Se.borderRadiusSM}),"sm"),{[`${Ie}-single${Ie}-sm`]:{[`&:not(${Ie}-customize-input)`]:{[`${Ie}-selection-search`]:{insetInlineStart:Ae,insetInlineEnd:Ae},[`${Ie}-selector`]:{padding:`0 ${Ae}px`},[`&${Ie}-show-arrow ${Ie}-selection-search`]:{insetInlineEnd:Ae+Se.fontSize*1.5},[`
&${Ie}-show-arrow ${Ie}-selection-item,
&${Ie}-show-arrow ${Ie}-selection-placeholder
`]:{paddingInlineEnd:Se.fontSize*1.5}}}},ye((0,Me.TS)(Se,{controlHeight:Se.singleItemHeightLG,fontSize:Se.fontSizeLG,borderRadius:Se.borderRadiusLG}),"lg")]}const Be=Se=>{const{componentCls:Ie,selectorBg:Ae}=Se;return{position:"relative",backgroundColor:Ae,border:`${Se.lineWidth}px ${Se.lineType} ${Se.colorBorder}`,transition:`all ${Se.motionDurationMid} ${Se.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ie}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ie}-disabled&`]:{color:Se.colorTextDisabled,background:Se.colorBgContainerDisabled,cursor:"not-allowed",[`${Ie}-multiple&`]:{background:Se.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},ze=function(Se,Ie){let Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:it,borderHoverColor:Ue,outlineColor:gt,antCls:Ve}=Ie,Tt=Ae?{[`${it}-selector`]:{borderColor:Ue}}:{};return{[Se]:{[`&:not(${it}-disabled):not(${it}-customize-input):not(${Ve}-pagination-size-changer)`]:Object.assign(Object.assign({},Tt),{[`${it}-focused& ${it}-selector`]:{borderColor:Ue,boxShadow:`0 0 0 ${Ie.controlOutlineWidth}px ${gt}`,outline:0},[`&:hover ${it}-selector`]:{borderColor:Ue}})}}},$e=Se=>{const{componentCls:Ie}=Se;return{[`${Ie}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Le=Se=>{const{componentCls:Ie,inputPaddingHorizontalBase:Ae,iconCls:it}=Se;return{[Ie]:Object.assign(Object.assign({},(0,ne.Wf)(Se)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ie}-customize-input) ${Ie}-selector`]:Object.assign(Object.assign({},Be(Se)),$e(Se)),[`${Ie}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},ne.vS),[`${Ie}-selection-placeholder`]:Object.assign(Object.assign({},ne.vS),{flex:1,color:Se.colorTextPlaceholder,pointerEvents:"none"}),[`${Ie}-arrow`]:Object.assign(Object.assign({},(0,ne.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ae,height:Se.fontSizeIcon,marginTop:-Se.fontSizeIcon/2,color:Se.colorTextQuaternary,fontSize:Se.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[it]:{verticalAlign:"top",transition:`transform ${Se.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ie}-suffix)`]:{pointerEvents:"auto"}},[`${Ie}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ie}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ae,zIndex:1,display:"inline-block",width:Se.fontSizeIcon,height:Se.fontSizeIcon,marginTop:-Se.fontSizeIcon/2,color:Se.colorTextQuaternary,fontSize:Se.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Se.clearBg,cursor:"pointer",opacity:0,transition:`color ${Se.motionDurationMid} ease, opacity ${Se.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Se.colorTextTertiary}},"&:hover":{[`${Ie}-clear`]:{opacity:1}}}),[`${Ie}-has-feedback`]:{[`${Ie}-clear`]:{insetInlineEnd:Ae+Se.fontSize+Se.paddingXS}}}},Ne=Se=>{const{componentCls:Ie}=Se;return[{[Ie]:{[`&-borderless ${Ie}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ie}-in-form-item`]:{width:"100%"}}},Le(Se),we(Se),ge(Se),se(Se),{[`${Ie}-rtl`]:{direction:"rtl"}},ze(Ie,(0,Me.TS)(Se,{borderHoverColor:Se.colorPrimaryHover,outlineColor:Se.controlOutline})),ze(`${Ie}-status-error`,(0,Me.TS)(Se,{borderHoverColor:Se.colorErrorHover,outlineColor:Se.colorErrorOutline}),!0),ze(`${Ie}-status-warning`,(0,Me.TS)(Se,{borderHoverColor:Se.colorWarningHover,outlineColor:Se.colorWarningOutline}),!0),(0,xe.c)(Se,{borderElCls:`${Ie}-selector`,focusElCls:`${Ie}-focused`})]};var Re=(0,Ce.Z)("Select",(Se,Ie)=>{let{rootPrefixCls:Ae}=Ie;const it=(0,Me.TS)(Se,{rootPrefixCls:Ae,inputPaddingHorizontalBase:Se.paddingSM-1,multipleSelectItemHeight:Se.multipleItemHeight});return[Ne(it)]},Se=>{const{fontSize:Ie,lineHeight:Ae,controlHeight:it,controlPaddingHorizontal:Ue,zIndexPopupBase:gt,colorText:Ve,fontWeightStrong:Tt,controlItemBgActive:ct,controlItemBgHover:Ot,colorBgContainer:We,colorFillSecondary:lt,controlHeightLG:ut,controlHeightSM:St,colorBgContainerDisabled:qe,colorTextDisabled:Ze}=Se;return{zIndexPopup:gt+50,optionSelectedColor:Ve,optionSelectedFontWeight:Tt,optionSelectedBg:ct,optionActiveBg:Ot,optionPadding:`${(it-Ie*Ae)/2}px ${Ue}px`,optionFontSize:Ie,optionLineHeight:Ae,optionHeight:it,selectorBg:We,clearBg:We,singleItemHeightLG:ut,multipleItemBg:lt,multipleItemBorderColor:"transparent",multipleItemHeight:St,multipleItemHeightLG:it,multipleSelectorBgDisabled:qe,multipleItemColorDisabled:Ze,multipleItemBorderColorDisabled:"transparent"}})},58582:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return xe}});const ne=Me=>{const fe={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Me==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},fe),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},fe),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},fe),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},fe),{points:["br","tr"],offset:[0,-4]})}};function xe(Me,Ce){return Me||ne(Ce)}},84443:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ne}});function ne(xe,Me){return Me!==void 0?Me:xe!==null}},66339:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});var ne=ee(40001),xe=ee(19248),Me=ee(99267),Ce=ee(84105),fe=ee(58617),he=ee(47472),ce=ee(59301);function ae(se){let{suffixIcon:ve,clearIcon:ue,menuItemSelectedIcon:pe,removeIcon:oe,loading:ge,multiple:ye,hasFeedback:we,prefixCls:Be,showSuffixIcon:ze,feedbackIcon:$e,showArrow:Le,componentName:Ne}=se;const Re=ue!=null?ue:ce.createElement(xe.Z,null),Se=Ue=>ve===null&&!we&&!Le?null:ce.createElement(ce.Fragment,null,ze!==!1&&Ue,we&&$e);let Ie=null;if(ve!==void 0)Ie=Se(ve);else if(ge)Ie=Se(ce.createElement(fe.Z,{spin:!0}));else{const Ue=`${Be}-suffix`;Ie=gt=>{let{open:Ve,showSearch:Tt}=gt;return Se(Ve&&Tt?ce.createElement(he.Z,{className:Ue}):ce.createElement(Ce.Z,{className:Ue}))}}let Ae=null;pe!==void 0?Ae=pe:ye?Ae=ce.createElement(ne.Z,null):Ae=null;let it=null;return oe!==void 0?it=oe:it=ce.createElement(Me.Z,null),{clearIcon:Re,suffixIcon:Ie,itemIcon:Ae,removeIcon:it}}},61621:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Te}});var ne=ee(92310),xe=ee.n(ne),Me=ee(59301),Ce=ee(36355),fe=ee(2738),ce=Fe=>{const{prefixCls:me,className:at,style:Pt,size:Qe,shape:Je}=Fe,xt=xe()({[`${me}-lg`]:Qe==="large",[`${me}-sm`]:Qe==="small"}),ot=xe()({[`${me}-circle`]:Je==="circle",[`${me}-square`]:Je==="square",[`${me}-round`]:Je==="round"}),mt=Me.useMemo(()=>typeof Qe=="number"?{width:Qe,height:Qe,lineHeight:`${Qe}px`}:{},[Qe]);return Me.createElement("span",{className:xe()(me,xt,ot,at),style:Object.assign(Object.assign({},mt),Pt)})},ae=ee(36237),se=ee(83116),ve=ee(37613);const ue=new ae.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),pe=Fe=>({height:Fe,lineHeight:`${Fe}px`}),oe=Fe=>Object.assign({width:Fe},pe(Fe)),ge=Fe=>({background:Fe.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:ue,animationDuration:Fe.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),ye=Fe=>Object.assign({width:Fe*5,minWidth:Fe*5},pe(Fe)),we=Fe=>{const{skeletonAvatarCls:me,gradientFromColor:at,controlHeight:Pt,controlHeightLG:Qe,controlHeightSM:Je}=Fe;return{[`${me}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:at},oe(Pt)),[`${me}${me}-circle`]:{borderRadius:"50%"},[`${me}${me}-lg`]:Object.assign({},oe(Qe)),[`${me}${me}-sm`]:Object.assign({},oe(Je))}},Be=Fe=>{const{controlHeight:me,borderRadiusSM:at,skeletonInputCls:Pt,controlHeightLG:Qe,controlHeightSM:Je,gradientFromColor:xt}=Fe;return{[`${Pt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:xt,borderRadius:at},ye(me)),[`${Pt}-lg`]:Object.assign({},ye(Qe)),[`${Pt}-sm`]:Object.assign({},ye(Je))}},ze=Fe=>Object.assign({width:Fe},pe(Fe)),$e=Fe=>{const{skeletonImageCls:me,imageSizeBase:at,gradientFromColor:Pt,borderRadiusSM:Qe}=Fe;return{[`${me}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Pt,borderRadius:Qe},ze(at*2)),{[`${me}-path`]:{fill:"#bfbfbf"},[`${me}-svg`]:Object.assign(Object.assign({},ze(at)),{maxWidth:at*4,maxHeight:at*4}),[`${me}-svg${me}-svg-circle`]:{borderRadius:"50%"}}),[`${me}${me}-circle`]:{borderRadius:"50%"}}},Le=(Fe,me,at)=>{const{skeletonButtonCls:Pt}=Fe;return{[`${at}${Pt}-circle`]:{width:me,minWidth:me,borderRadius:"50%"},[`${at}${Pt}-round`]:{borderRadius:me}}},Ne=Fe=>Object.assign({width:Fe*2,minWidth:Fe*2},pe(Fe)),Re=Fe=>{const{borderRadiusSM:me,skeletonButtonCls:at,controlHeight:Pt,controlHeightLG:Qe,controlHeightSM:Je,gradientFromColor:xt}=Fe;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${at}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:xt,borderRadius:me,width:Pt*2,minWidth:Pt*2},Ne(Pt))},Le(Fe,Pt,at)),{[`${at}-lg`]:Object.assign({},Ne(Qe))}),Le(Fe,Qe,`${at}-lg`)),{[`${at}-sm`]:Object.assign({},Ne(Je))}),Le(Fe,Je,`${at}-sm`))},Se=Fe=>{const{componentCls:me,skeletonAvatarCls:at,skeletonTitleCls:Pt,skeletonParagraphCls:Qe,skeletonButtonCls:Je,skeletonInputCls:xt,skeletonImageCls:ot,controlHeight:mt,controlHeightLG:Nt,controlHeightSM:rn,gradientFromColor:It,padding:Qt,marginSM:dn,borderRadius:At,titleHeight:Lt,blockRadius:qt,paragraphLiHeight:Tn,controlHeightXS:Jt,paragraphMarginTop:On}=Fe;return{[`${me}`]:{display:"table",width:"100%",[`${me}-header`]:{display:"table-cell",paddingInlineEnd:Qt,verticalAlign:"top",[`${at}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:It},oe(mt)),[`${at}-circle`]:{borderRadius:"50%"},[`${at}-lg`]:Object.assign({},oe(Nt)),[`${at}-sm`]:Object.assign({},oe(rn))},[`${me}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Pt}`]:{width:"100%",height:Lt,background:It,borderRadius:qt,[`+ ${Qe}`]:{marginBlockStart:rn}},[`${Qe}`]:{padding:0,"> li":{width:"100%",height:Tn,listStyle:"none",background:It,borderRadius:qt,"+ li":{marginBlockStart:Jt}}},[`${Qe}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${me}-content`]:{[`${Pt}, ${Qe} > li`]:{borderRadius:At}}},[`${me}-with-avatar ${me}-content`]:{[`${Pt}`]:{marginBlockStart:dn,[`+ ${Qe}`]:{marginBlockStart:On}}},[`${me}${me}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Re(Fe)),we(Fe)),Be(Fe)),$e(Fe)),[`${me}${me}-block`]:{width:"100%",[`${Je}`]:{width:"100%"},[`${xt}`]:{width:"100%"}},[`${me}${me}-active`]:{[`
${Pt},
${Qe} > li,
${at},
${Je},
${xt},
${ot}
`]:Object.assign({},ge(Fe))}}};var Ie=(0,se.Z)("Skeleton",Fe=>{const{componentCls:me}=Fe,at=(0,ve.TS)(Fe,{skeletonAvatarCls:`${me}-avatar`,skeletonTitleCls:`${me}-title`,skeletonParagraphCls:`${me}-paragraph`,skeletonButtonCls:`${me}-button`,skeletonInputCls:`${me}-input`,skeletonImageCls:`${me}-image`,imageSizeBase:Fe.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Fe.gradientFromColor} 25%, ${Fe.gradientToColor} 37%, ${Fe.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Se(at)]},Fe=>{const{colorFillContent:me,colorFill:at}=Fe,Pt=me,Qe=at;return{color:Pt,colorGradientEnd:Qe,gradientFromColor:Pt,gradientToColor:Qe,titleHeight:Fe.controlHeight/2,blockRadius:Fe.borderRadiusSM,paragraphMarginTop:Fe.marginLG+Fe.marginXXS,paragraphLiHeight:Fe.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),it=Fe=>{const{prefixCls:me,className:at,rootClassName:Pt,active:Qe,shape:Je="circle",size:xt="default"}=Fe,{getPrefixCls:ot}=Me.useContext(Ce.E_),mt=ot("skeleton",me),[Nt,rn]=Ie(mt),It=(0,fe.Z)(Fe,["prefixCls","className"]),Qt=xe()(mt,`${mt}-element`,{[`${mt}-active`]:Qe},at,Pt,rn);return Nt(Me.createElement("div",{className:Qt},Me.createElement(ce,Object.assign({prefixCls:`${mt}-avatar`,shape:Je,size:xt},It))))},gt=Fe=>{const{prefixCls:me,className:at,rootClassName:Pt,active:Qe,block:Je=!1,size:xt="default"}=Fe,{getPrefixCls:ot}=Me.useContext(Ce.E_),mt=ot("skeleton",me),[Nt,rn]=Ie(mt),It=(0,fe.Z)(Fe,["prefixCls"]),Qt=xe()(mt,`${mt}-element`,{[`${mt}-active`]:Qe,[`${mt}-block`]:Je},at,Pt,rn);return Nt(Me.createElement("div",{className:Qt},Me.createElement(ce,Object.assign({prefixCls:`${mt}-button`,size:xt},It))))};const Ve="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var ct=Fe=>{const{prefixCls:me,className:at,rootClassName:Pt,style:Qe,active:Je}=Fe,{getPrefixCls:xt}=Me.useContext(Ce.E_),ot=xt("skeleton",me),[mt,Nt]=Ie(ot),rn=xe()(ot,`${ot}-element`,{[`${ot}-active`]:Je},at,Pt,Nt);return mt(Me.createElement("div",{className:rn},Me.createElement("div",{className:xe()(`${ot}-image`,at),style:Qe},Me.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${ot}-image-svg`},Me.createElement("path",{d:Ve,className:`${ot}-image-path`})))))},We=Fe=>{const{prefixCls:me,className:at,rootClassName:Pt,active:Qe,block:Je,size:xt="default"}=Fe,{getPrefixCls:ot}=Me.useContext(Ce.E_),mt=ot("skeleton",me),[Nt,rn]=Ie(mt),It=(0,fe.Z)(Fe,["prefixCls"]),Qt=xe()(mt,`${mt}-element`,{[`${mt}-active`]:Qe,[`${mt}-block`]:Je},at,Pt,rn);return Nt(Me.createElement("div",{className:Qt},Me.createElement(ce,Object.assign({prefixCls:`${mt}-input`,size:xt},It))))},lt=ee(60499),ut={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},St=ut,qe=ee(7657),Ze=function(me,at){return Me.createElement(qe.Z,(0,lt.Z)({},me,{ref:at,icon:St}))},wt=Me.forwardRef(Ze),Wt=wt,_t=Fe=>{const{prefixCls:me,className:at,rootClassName:Pt,style:Qe,active:Je,children:xt}=Fe,{getPrefixCls:ot}=Me.useContext(Ce.E_),mt=ot("skeleton",me),[Nt,rn]=Ie(mt),It=xe()(mt,`${mt}-element`,{[`${mt}-active`]:Je},rn,at,Pt),Qt=xt!=null?xt:Me.createElement(Wt,null);return Nt(Me.createElement("div",{className:It},Me.createElement("div",{className:xe()(`${mt}-image`,at),style:Qe},Qt)))},vt=ee(77654),yn=Fe=>{const me=ot=>{const{width:mt,rows:Nt=2}=Fe;if(Array.isArray(mt))return mt[ot];if(Nt-1===ot)return mt},{prefixCls:at,className:Pt,style:Qe,rows:Je}=Fe,xt=(0,vt.Z)(Array(Je)).map((ot,mt)=>Me.createElement("li",{key:mt,style:{width:me(mt)}}));return Me.createElement("ul",{className:xe()(at,Pt),style:Qe},xt)},Ln=Fe=>{let{prefixCls:me,className:at,width:Pt,style:Qe}=Fe;return Me.createElement("h3",{className:xe()(me,at),style:Object.assign({width:Pt},Qe)})};function pn(Fe){return Fe&&typeof Fe=="object"?Fe:{}}function hn(Fe,me){return Fe&&!me?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function un(Fe,me){return!Fe&&me?{width:"38%"}:Fe&&me?{width:"50%"}:{}}function Xe(Fe,me){const at={};return(!Fe||!me)&&(at.width="61%"),!Fe&&me?at.rows=3:at.rows=2,at}const ke=Fe=>{const{prefixCls:me,loading:at,className:Pt,rootClassName:Qe,style:Je,children:xt,avatar:ot=!1,title:mt=!0,paragraph:Nt=!0,active:rn,round:It}=Fe,{getPrefixCls:Qt,direction:dn,skeleton:At}=Me.useContext(Ce.E_),Lt=Qt("skeleton",me),[qt,Tn]=Ie(Lt);if(at||!("loading"in Fe)){const Jt=!!ot,On=!!mt,zn=!!Nt;let qn;if(Jt){const _r=Object.assign(Object.assign({prefixCls:`${Lt}-avatar`},hn(On,zn)),pn(ot));qn=Me.createElement("div",{className:`${Lt}-header`},Me.createElement(ce,Object.assign({},_r)))}let Xn;if(On||zn){let _r;if(On){const Cr=Object.assign(Object.assign({prefixCls:`${Lt}-title`},un(Jt,zn)),pn(mt));_r=Me.createElement(Ln,Object.assign({},Cr))}let Qn;if(zn){const Cr=Object.assign(Object.assign({prefixCls:`${Lt}-paragraph`},Xe(Jt,On)),pn(Nt));Qn=Me.createElement(yn,Object.assign({},Cr))}Xn=Me.createElement("div",{className:`${Lt}-content`},_r,Qn)}const vr=xe()(Lt,{[`${Lt}-with-avatar`]:Jt,[`${Lt}-active`]:rn,[`${Lt}-rtl`]:dn==="rtl",[`${Lt}-round`]:It},At==null?void 0:At.className,Pt,Qe,Tn);return qt(Me.createElement("div",{className:vr,style:Object.assign(Object.assign({},At==null?void 0:At.style),Je)},qn,Xn))}return typeof xt!="undefined"?xt:null};ke.Button=gt,ke.Avatar=it,ke.Input=We,ke.Image=ct,ke.Node=_t;var _e=ke,Te=_e},31797:function(gn,kt,ee){"use strict";ee.d(kt,{default:function(){return Ie}});var ne=ee(59301),xe=ee(56762),Me=ee(92343),Ce=ee(92310),fe=ee.n(Ce),he=ee(36355),ce=ee(61621),se=Ae=>{const{value:it,formatter:Ue,precision:gt,decimalSeparator:Ve,groupSeparator:Tt="",prefixCls:ct}=Ae;let Ot;if(typeof Ue=="function")Ot=Ue(it);else{const We=String(it),lt=We.match(/^(-?)(\d*)(\.(\d+))?$/);if(!lt||We==="-")Ot=We;else{const ut=lt[1];let St=lt[2]||"0",qe=lt[4]||"";St=St.replace(/\B(?=(\d{3})+(?!\d))/g,Tt),typeof gt=="number"&&(qe=qe.padEnd(gt,"0").slice(0,gt>0?gt:0)),qe&&(qe=`${Ve}${qe}`),Ot=[ne.createElement("span",{key:"int",className:`${ct}-content-value-int`},ut,St),qe&&ne.createElement("span",{key:"decimal",className:`${ct}-content-value-decimal`},qe)]}}return ne.createElement("span",{className:`${ct}-content-value`},Ot)},ve=ee(17313),ue=ee(83116),pe=ee(37613);const oe=Ae=>{const{componentCls:it,marginXXS:Ue,padding:gt,colorTextDescription:Ve,titleFontSize:Tt,colorTextHeading:ct,contentFontSize:Ot,fontFamily:We}=Ae;return{[`${it}`]:Object.assign(Object.assign({},(0,ve.Wf)(Ae)),{[`${it}-title`]:{marginBottom:Ue,color:Ve,fontSize:Tt},[`${it}-skeleton`]:{paddingTop:gt},[`${it}-content`]:{color:ct,fontSize:Ot,fontFamily:We,[`${it}-content-value`]:{display:"inline-block",direction:"ltr"},[`${it}-content-prefix, ${it}-content-suffix`]:{display:"inline-block"},[`${it}-content-prefix`]:{marginInlineEnd:Ue},[`${it}-content-suffix`]:{marginInlineStart:Ue}}})}};var ge=(0,ue.Z)("Statistic",Ae=>{const it=(0,pe.TS)(Ae,{});return[oe(it)]},Ae=>{const{fontSizeHeading3:it,fontSize:Ue}=Ae;return{titleFontSize:Ue,contentFontSize:it}}),we=Ae=>{const{prefixCls:it,className:Ue,rootClassName:gt,style:Ve,valueStyle:Tt,value:ct=0,title:Ot,valueRender:We,prefix:lt,suffix:ut,loading:St=!1,onMouseEnter:qe,onMouseLeave:Ze,decimalSeparator:wt=".",groupSeparator:Wt=","}=Ae,{getPrefixCls:Kt,direction:_t,statistic:vt}=ne.useContext(he.E_),jt=Kt("statistic",it),[yn,Xt]=ge(jt),Ln=ne.createElement(se,Object.assign({decimalSeparator:wt,groupSeparator:Wt,prefixCls:jt},Ae,{value:ct})),pn=fe()(jt,{[`${jt}-rtl`]:_t==="rtl"},vt==null?void 0:vt.className,Ue,gt,Xt);return yn(ne.createElement("div",{className:pn,style:Object.assign(Object.assign({},vt==null?void 0:vt.style),Ve),onMouseEnter:qe,onMouseLeave:Ze},Ot&&ne.createElement("div",{className:`${jt}-title`},Ot),ne.createElement(ce.Z,{paragraph:!1,loading:St,className:`${jt}-skeleton`},ne.createElement("div",{style:Tt,className:`${jt}-content`},lt&&ne.createElement("span",{className:`${jt}-content-prefix`},lt),We?We(Ln):Ln,ut&&ne.createElement("span",{className:`${jt}-content-suffix`},ut)))))};const Be=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function ze(Ae,it){let Ue=Ae;const gt=/\[[^\]]*]/g,Ve=(it.match(gt)||[]).map(We=>We.slice(1,-1)),Tt=it.replace(gt,"[]"),ct=Be.reduce((We,lt)=>{let[ut,St]=lt;if(We.includes(ut)){const qe=Math.floor(Ue/St);return Ue-=qe*St,We.replace(new RegExp(`${ut}+`,"g"),Ze=>{const wt=Ze.length;return qe.toString().padStart(wt,"0")})}return We},Tt);let Ot=0;return ct.replace(gt,()=>{const We=Ve[Ot];return Ot+=1,We})}function $e(Ae,it){const{format:Ue=""}=it,gt=new Date(Ae).getTime(),Ve=Date.now(),Tt=Math.max(gt-Ve,0);return ze(Tt,Ue)}const Le=1e3/30;function Ne(Ae){return new Date(Ae).getTime()}const Re=Ae=>{const{value:it,format:Ue="HH:mm:ss",onChange:gt,onFinish:Ve}=Ae,Tt=(0,xe.Z)(),ct=ne.useRef(null),Ot=()=>{Ve==null||Ve(),ct.current&&(clearInterval(ct.current),ct.current=null)},We=()=>{const St=Ne(it);St>=Date.now()&&(ct.current=setInterval(()=>{Tt(),gt==null||gt(St-Date.now()),St<Date.now()&&Ot()},Le))};ne.useEffect(()=>(We(),()=>{ct.current&&(clearInterval(ct.current),ct.current=null)}),[it]);const lt=(St,qe)=>$e(St,Object.assign(Object.assign({},qe),{format:Ue})),ut=St=>(0,Me.Tm)(St,{title:void 0});return ne.createElement(we,Object.assign({},Ae,{valueRender:ut,formatter:lt}))};var Se=ne.memo(Re);we.Countdown=Se;var Ie=we},8378:function(gn,kt){"use strict";const ee=ne=>({[ne.componentCls]:{[`${ne.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${ne.motionDurationMid} ${ne.motionEaseInOut},
opacity ${ne.motionDurationMid} ${ne.motionEaseInOut} !important`}},[`${ne.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${ne.motionDurationMid} ${ne.motionEaseInOut},
opacity ${ne.motionDurationMid} ${ne.motionEaseInOut} !important`}}});kt.Z=ee},92899:function(gn,kt,ee){"use strict";ee.d(kt,{Fm:function(){return pe}});var ne=ee(36237),xe=ee(95406);const Me=new ne.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ce=new ne.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),fe=new ne.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),he=new ne.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ce=new ne.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ae=new ne.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),se=new ne.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ve=new ne.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),ue={"move-up":{inKeyframes:se,outKeyframes:ve},"move-down":{inKeyframes:Me,outKeyframes:Ce},"move-left":{inKeyframes:fe,outKeyframes:he},"move-right":{inKeyframes:ce,outKeyframes:ae}},pe=(oe,ge)=>{const{antCls:ye}=oe,we=`${ye}-${ge}`,{inKeyframes:Be,outKeyframes:ze}=ue[ge];return[(0,xe.R)(we,Be,ze,oe.motionDurationMid),{[`
${we}-enter,
${we}-appear
`]:{opacity:0,animationTimingFunction:oe.motionEaseOutCirc},[`${we}-leave`]:{animationTimingFunction:oe.motionEaseInOutCirc}}]}},13826:function(gn,kt,ee){"use strict";ee.d(kt,{Qt:function(){return fe},Uw:function(){return Ce},fJ:function(){return Me},ly:function(){return he},oN:function(){return pe}});var ne=ee(36237),xe=ee(95406);const Me=new ne.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Ce=new ne.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),fe=new ne.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),he=new ne.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ce=new ne.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ae=new ne.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),se=new ne.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),ve=new ne.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ue={"slide-up":{inKeyframes:Me,outKeyframes:Ce},"slide-down":{inKeyframes:fe,outKeyframes:he},"slide-left":{inKeyframes:ce,outKeyframes:ae},"slide-right":{inKeyframes:se,outKeyframes:ve}},pe=(oe,ge)=>{const{antCls:ye}=oe,we=`${ye}-${ge}`,{inKeyframes:Be,outKeyframes:ze}=ue[ge];return[(0,xe.R)(we,Be,ze,oe.motionDurationMid),{[`
${we}-enter,
${we}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:oe.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${we}-leave`]:{animationTimingFunction:oe.motionEaseInQuint}}]}},15969:function(gn,kt,ee){"use strict";ee.d(kt,{N:function(){return ne}});const ne=xe=>({color:xe.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${xe.motionDurationSlow}`,"&:focus, &:hover":{color:xe.colorLinkHover},"&:active":{color:xe.colorLinkActive}})},78673:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Tt}});var ne=ee(58617),xe=ee(92310),Me=ee.n(xe),Ce=ee(60499),fe=ee(18642),he=ee(72190),ce=ee(42244),ae=ee(59301),se=ee(18929),ve=ee(10228),ue=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],pe=ae.forwardRef(function(ct,Ot){var We,lt=ct.prefixCls,ut=lt===void 0?"rc-switch":lt,St=ct.className,qe=ct.checked,Ze=ct.defaultChecked,wt=ct.disabled,Wt=ct.loadingIcon,Kt=ct.checkedChildren,_t=ct.unCheckedChildren,vt=ct.onClick,jt=ct.onChange,yn=ct.onKeyDown,Xt=(0,ce.Z)(ct,ue),Ln=(0,se.Z)(!1,{value:qe,defaultValue:Ze}),pn=(0,he.Z)(Ln,2),hn=pn[0],un=pn[1];function Xe(Fe,me){var at=hn;return wt||(at=Fe,un(at),jt==null||jt(at,me)),at}function ke(Fe){Fe.which===ve.Z.LEFT?Xe(!1,Fe):Fe.which===ve.Z.RIGHT&&Xe(!0,Fe),yn==null||yn(Fe)}function _e(Fe){var me=Xe(!hn,Fe);vt==null||vt(me,Fe)}var Te=Me()(ut,St,(We={},(0,fe.Z)(We,"".concat(ut,"-checked"),hn),(0,fe.Z)(We,"".concat(ut,"-disabled"),wt),We));return ae.createElement("button",(0,Ce.Z)({},Xt,{type:"button",role:"switch","aria-checked":hn,disabled:wt,className:Te,ref:Ot,onKeyDown:ke,onClick:_e}),Wt,ae.createElement("span",{className:"".concat(ut,"-inner")},ae.createElement("span",{className:"".concat(ut,"-inner-checked")},Kt),ae.createElement("span",{className:"".concat(ut,"-inner-unchecked")},_t)))});pe.displayName="Switch";var oe=pe,ge=ee(14088),ye=ee(36355),we=ee(1684),Be=ee(19716),ze=ee(64993),$e=ee(17313),Le=ee(83116),Ne=ee(37613);const Re=ct=>{const{componentCls:Ot,trackHeightSM:We,trackPadding:lt,trackMinWidthSM:ut,innerMinMarginSM:St,innerMaxMarginSM:qe,handleSizeSM:Ze}=ct,wt=`${Ot}-inner`;return{[Ot]:{[`&${Ot}-small`]:{minWidth:ut,height:We,lineHeight:`${We}px`,[`${Ot}-inner`]:{paddingInlineStart:qe,paddingInlineEnd:St,[`${wt}-checked`]:{marginInlineStart:`calc(-100% + ${Ze+lt*2}px - ${qe*2}px)`,marginInlineEnd:`calc(100% - ${Ze+lt*2}px + ${qe*2}px)`},[`${wt}-unchecked`]:{marginTop:-We,marginInlineStart:0,marginInlineEnd:0}},[`${Ot}-handle`]:{width:Ze,height:Ze},[`${Ot}-loading-icon`]:{top:(Ze-ct.switchLoadingIconSize)/2,fontSize:ct.switchLoadingIconSize},[`&${Ot}-checked`]:{[`${Ot}-inner`]:{paddingInlineStart:St,paddingInlineEnd:qe,[`${wt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${wt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ze+lt*2}px + ${qe*2}px)`,marginInlineEnd:`calc(-100% + ${Ze+lt*2}px - ${qe*2}px)`}},[`${Ot}-handle`]:{insetInlineStart:`calc(100% - ${Ze+lt}px)`}},[`&:not(${Ot}-disabled):active`]:{[`&:not(${Ot}-checked) ${wt}`]:{[`${wt}-unchecked`]:{marginInlineStart:ct.marginXXS/2,marginInlineEnd:-ct.marginXXS/2}},[`&${Ot}-checked ${wt}`]:{[`${wt}-checked`]:{marginInlineStart:-ct.marginXXS/2,marginInlineEnd:ct.marginXXS/2}}}}}}},Se=ct=>{const{componentCls:Ot,handleSize:We}=ct;return{[Ot]:{[`${Ot}-loading-icon${ct.iconCls}`]:{position:"relative",top:(We-ct.fontSize)/2,color:ct.switchLoadingIconColor,verticalAlign:"top"},[`&${Ot}-checked ${Ot}-loading-icon`]:{color:ct.switchColor}}}},Ie=ct=>{const{componentCls:Ot,motion:We,trackPadding:lt,handleBg:ut,handleShadow:St,handleSize:qe}=ct,Ze=`${Ot}-handle`;return{[Ot]:{[Ze]:{position:"absolute",top:lt,insetInlineStart:lt,width:qe,height:qe,transition:`all ${ct.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:ut,borderRadius:qe/2,boxShadow:St,transition:`all ${ct.switchDuration} ease-in-out`,content:'""'}},[`&${Ot}-checked ${Ze}`]:{insetInlineStart:`calc(100% - ${qe+lt}px)`},[`&:not(${Ot}-disabled):active`]:We?{[`${Ze}::before`]:{insetInlineEnd:ct.switchHandleActiveInset,insetInlineStart:0},[`&${Ot}-checked ${Ze}::before`]:{insetInlineEnd:0,insetInlineStart:ct.switchHandleActiveInset}}:{}}}},Ae=ct=>{const{componentCls:Ot,trackHeight:We,trackPadding:lt,innerMinMargin:ut,innerMaxMargin:St,handleSize:qe}=ct,Ze=`${Ot}-inner`;return{[Ot]:{[Ze]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:St,paddingInlineEnd:ut,transition:`padding-inline-start ${ct.switchDuration} ease-in-out, padding-inline-end ${ct.switchDuration} ease-in-out`,[`${Ze}-checked, ${Ze}-unchecked`]:{display:"block",color:ct.colorTextLightSolid,fontSize:ct.fontSizeSM,transition:`margin-inline-start ${ct.switchDuration} ease-in-out, margin-inline-end ${ct.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ze}-checked`]:{marginInlineStart:`calc(-100% + ${qe+lt*2}px - ${St*2}px)`,marginInlineEnd:`calc(100% - ${qe+lt*2}px + ${St*2}px)`},[`${Ze}-unchecked`]:{marginTop:-We,marginInlineStart:0,marginInlineEnd:0}},[`&${Ot}-checked ${Ze}`]:{paddingInlineStart:ut,paddingInlineEnd:St,[`${Ze}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ze}-unchecked`]:{marginInlineStart:`calc(100% - ${qe+lt*2}px + ${St*2}px)`,marginInlineEnd:`calc(-100% + ${qe+lt*2}px - ${St*2}px)`}},[`&:not(${Ot}-disabled):active`]:{[`&:not(${Ot}-checked) ${Ze}`]:{[`${Ze}-unchecked`]:{marginInlineStart:lt*2,marginInlineEnd:-lt*2}},[`&${Ot}-checked ${Ze}`]:{[`${Ze}-checked`]:{marginInlineStart:-lt*2,marginInlineEnd:lt*2}}}}}},it=ct=>{const{componentCls:Ot,trackHeight:We,trackMinWidth:lt}=ct;return{[Ot]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$e.Wf)(ct)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:lt,height:We,lineHeight:`${We}px`,verticalAlign:"middle",background:ct.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ct.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ot}-disabled)`]:{background:ct.colorTextTertiary}}),(0,$e.Qy)(ct)),{[`&${Ot}-checked`]:{background:ct.switchColor,[`&:hover:not(${Ot}-disabled)`]:{background:ct.colorPrimaryHover}},[`&${Ot}-loading, &${Ot}-disabled`]:{cursor:"not-allowed",opacity:ct.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ot}-rtl`]:{direction:"rtl"}})}};var Ue=(0,Le.Z)("Switch",ct=>{const Ot=(0,Ne.TS)(ct,{switchDuration:ct.motionDurationMid,switchColor:ct.colorPrimary,switchDisabledOpacity:ct.opacityLoading,switchLoadingIconSize:ct.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${ct.opacityLoading})`,switchHandleActiveInset:"-30%"});return[it(Ot),Ae(Ot),Ie(Ot),Se(Ot),Re(Ot)]},ct=>{const{fontSize:Ot,lineHeight:We,controlHeight:lt,colorWhite:ut}=ct,St=Ot*We,qe=lt/2,Ze=2,wt=St-Ze*2,Wt=qe-Ze*2;return{trackHeight:St,trackHeightSM:qe,trackMinWidth:wt*2+Ze*4,trackMinWidthSM:Wt*2+Ze*2,trackPadding:Ze,handleBg:ut,handleSize:wt,handleSizeSM:Wt,handleShadow:`0 2px 4px 0 ${new ze.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:wt/2,innerMaxMargin:wt+Ze+Ze*2,innerMinMarginSM:Wt/2,innerMaxMarginSM:Wt+Ze+Ze*2}}),gt=function(ct,Ot){var We={};for(var lt in ct)Object.prototype.hasOwnProperty.call(ct,lt)&&Ot.indexOf(lt)<0&&(We[lt]=ct[lt]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,lt=Object.getOwnPropertySymbols(ct);ut<lt.length;ut++)Ot.indexOf(lt[ut])<0&&Object.prototype.propertyIsEnumerable.call(ct,lt[ut])&&(We[lt[ut]]=ct[lt[ut]]);return We};const Ve=ae.forwardRef((ct,Ot)=>{const{prefixCls:We,size:lt,disabled:ut,loading:St,className:qe,rootClassName:Ze,style:wt}=ct,Wt=gt(ct,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Kt,direction:_t,switch:vt}=ae.useContext(ye.E_),jt=ae.useContext(we.Z),yn=(ut!=null?ut:jt)||St,Xt=Kt("switch",We),Ln=ae.createElement("div",{className:`${Xt}-handle`},St&&ae.createElement(ne.Z,{className:`${Xt}-loading-icon`})),[pn,hn]=Ue(Xt),un=(0,Be.Z)(lt),Xe=Me()(vt==null?void 0:vt.className,{[`${Xt}-small`]:un==="small",[`${Xt}-loading`]:St,[`${Xt}-rtl`]:_t==="rtl"},qe,Ze,hn),ke=Object.assign(Object.assign({},vt==null?void 0:vt.style),wt);return pn(ae.createElement(ge.Z,{component:"Switch"},ae.createElement(oe,Object.assign({},Wt,{prefixCls:Xt,className:Xe,style:ke,disabled:yn,ref:Ot,loadingIcon:Ln}))))});Ve.__ANT_SWITCH=!0;var Tt=Ve},1710:function(gn,kt,ee){"use strict";ee.d(kt,{default:function(){return bc}});var ne={},xe="rc-table-internal-hook",Me=ee(72190),Ce=ee(6089),fe=ee(34280),he=ee(13697),ce=ee(59301),ae=ee(4676);function se(pt){var bt=ce.createContext(void 0),$t=function(ln){var Ge=ln.value,st=ln.children,ht=ce.useRef(Ge);ht.current=Ge;var Yt=ce.useState(function(){return{getValue:function(){return ht.current},listeners:new Set}}),en=(0,Me.Z)(Yt,1),nn=en[0];return(0,fe.Z)(function(){(0,ae.unstable_batchedUpdates)(function(){nn.listeners.forEach(function(tn){tn(Ge)})})},[Ge]),ce.createElement(bt.Provider,{value:nn},st)};return{Context:bt,Provider:$t,defaultValue:pt}}function ve(pt,bt){var $t=(0,Ce.Z)(typeof bt=="function"?bt:function(tn){if(bt===void 0)return tn;if(!Array.isArray(bt))return tn[bt];var mn={};return bt.forEach(function(_n){mn[_n]=tn[_n]}),mn}),Gt=ce.useContext(pt==null?void 0:pt.Context),ln=Gt||{},Ge=ln.listeners,st=ln.getValue,ht=ce.useRef();ht.current=$t(Gt?st():pt==null?void 0:pt.defaultValue);var Yt=ce.useState({}),en=(0,Me.Z)(Yt,2),nn=en[1];return(0,fe.Z)(function(){if(!Gt)return;function tn(mn){var _n=$t(mn);(0,he.Z)(ht.current,_n,!0)||nn({})}return Ge.add(tn),function(){Ge.delete(tn)}},[Gt]),ht.current}var ue=ee(60499),pe=ee(8654);function oe(){var pt=ce.createContext(null);function bt(){return ce.useContext(pt)}function $t(ln,Ge){var st=(0,pe.Yr)(ln),ht=function(en,nn){var tn=st?{ref:nn}:{},mn=ce.useRef(0),_n=ce.useRef(en),Dn=bt();return Dn!==null?ce.createElement(ln,(0,ue.Z)({},en,tn)):((!Ge||Ge(_n.current,en))&&(mn.current+=1),_n.current=en,ce.createElement(pt.Provider,{value:mn.current},ce.createElement(ln,(0,ue.Z)({},en,tn))))};return st?ce.forwardRef(ht):ht}function Gt(ln,Ge){var st=(0,pe.Yr)(ln),ht=function(en,nn){var tn=st?{ref:nn}:{};return bt(),ce.createElement(ln,(0,ue.Z)({},en,tn))};return st?ce.memo(ce.forwardRef(ht),Ge):ce.memo(ht,Ge)}return{makeImmutable:$t,responseImmutable:Gt,useImmutableMark:bt}}var ge=oe(),ye=ge.makeImmutable,we=ge.responseImmutable,Be=ge.useImmutableMark,ze=oe(),$e=ze.makeImmutable,Le=ze.responseImmutable,Ne=ze.useImmutableMark,Re=se(),Se=Re;function Ie(pt,bt){var $t=ce.useRef(0);$t.current+=1;var Gt=ce.useRef(pt),ln=[];Object.keys(pt||{}).map(function(st){var ht;(pt==null?void 0:pt[st])!==((ht=Gt.current)===null||ht===void 0?void 0:ht[st])&&ln.push(st)}),Gt.current=pt;var Ge=ce.useRef([]);return ln.length&&(Ge.current=ln),ce.useDebugValue($t.current),ce.useDebugValue(Ge.current.join(", ")),bt&&console.log("".concat(bt,":"),$t.current,Ge.current),$t.current}var Ae=null,it=ce.memo(function(){var pt=Ie();return ce.createElement("h1",null,"Render Times: ",pt)});it.displayName="RenderBlock";var Ue=ee(43749),gt=ee(85899),Ve=ee(18642),Tt=ee(92310),ct=ee.n(Tt),Ot=ee(80547),We=ee(97938),lt=ee(48736),ut=ce.createContext({renderWithProps:!1}),St=ut,qe="RC_TABLE_KEY";function Ze(pt){return pt==null?[]:Array.isArray(pt)?pt:[pt]}function wt(pt){var bt=[],$t={};return pt.forEach(function(Gt){for(var ln=Gt||{},Ge=ln.key,st=ln.dataIndex,ht=Ge||Ze(st).join("-")||qe;$t[ht];)ht="".concat(ht,"_next");$t[ht]=!0,bt.push(ht)}),bt}function Wt(pt){return pt!=null}function Kt(pt){return pt&&(0,Ue.Z)(pt)==="object"&&!Array.isArray(pt)&&!ce.isValidElement(pt)}function _t(pt,bt,$t,Gt,ln,Ge){var st=ce.useContext(St),ht=Ne(),Yt=(0,Ot.Z)(function(){if(Wt(Gt))return[Gt];var en=bt==null||bt===""?[]:Array.isArray(bt)?bt:[bt],nn=(0,We.Z)(pt,en),tn=nn,mn=void 0;if(ln){var _n=ln(nn,pt,$t);Kt(_n)?(tn=_n.children,mn=_n.props,st.renderWithProps=!0):tn=_n}return[tn,mn]},[ht,pt,Gt,bt,ln,$t],function(en,nn){if(Ge){var tn=(0,Me.Z)(en,2),mn=tn[1],_n=(0,Me.Z)(nn,2),Dn=_n[1];return Ge(Dn,mn)}return st.renderWithProps?!0:!(0,he.Z)(en,nn,!0)});return Yt}function vt(pt,bt,$t,Gt){var ln=pt+bt-1;return pt<=Gt&&ln>=$t}function jt(pt,bt){return ve(Se,function($t){var Gt=vt(pt,bt||1,$t.hoverStartRow,$t.hoverEndRow);return[Gt,$t.onHover]})}var yn=function(bt){var $t=bt.ellipsis,Gt=bt.rowType,ln=bt.children,Ge,st=$t===!0?{showTitle:!0}:$t;return st&&(st.showTitle||Gt==="header")&&(typeof ln=="string"||typeof ln=="number"?Ge=ln.toString():ce.isValidElement(ln)&&typeof ln.props.children=="string"&&(Ge=ln.props.children)),Ge};function Xt(pt){var bt,$t,Gt,ln,Ge,st,ht,Yt,en=pt.component,nn=pt.children,tn=pt.ellipsis,mn=pt.scope,_n=pt.prefixCls,Dn=pt.className,tr=pt.align,Hn=pt.record,nr=pt.render,jn=pt.dataIndex,lr=pt.renderIndex,ur=pt.shouldCellUpdate,qr=pt.index,pr=pt.rowType,Yr=pt.colSpan,wi=pt.rowSpan,ar=pt.fixLeft,Br=pt.fixRight,$n=pt.firstFixLeft,rr=pt.lastFixLeft,br=pt.firstFixRight,pi=pt.lastFixRight,Ki=pt.appendNode,ir=pt.additionalProps,gr=ir===void 0?{}:ir,oi=pt.isSticky,xr="".concat(_n,"-cell"),mi=ve(Se,["supportSticky","allColumnsFixedLeft"]),Di=mi.supportSticky,zi=mi.allColumnsFixedLeft,zo=_t(Hn,jn,lr,nn,nr,ur),Vi=(0,Me.Z)(zo,2),Jo=Vi[0],co=Vi[1],Lo={},Ro=typeof ar=="number"&&Di,xi=typeof Br=="number"&&Di;Ro&&(Lo.position="sticky",Lo.left=ar),xi&&(Lo.position="sticky",Lo.right=Br);var li=(bt=($t=(Gt=co==null?void 0:co.colSpan)!==null&&Gt!==void 0?Gt:gr.colSpan)!==null&&$t!==void 0?$t:Yr)!==null&&bt!==void 0?bt:1,Ei=(ln=(Ge=(st=co==null?void 0:co.rowSpan)!==null&&st!==void 0?st:gr.rowSpan)!==null&&Ge!==void 0?Ge:wi)!==null&&ln!==void 0?ln:1,Oi=jt(qr,Ei),fi=(0,Me.Z)(Oi,2),So=fi[0],Mi=fi[1],Ai=function(Po){var bo;Hn&&Mi(qr,qr+Ei-1),gr==null||(bo=gr.onMouseEnter)===null||bo===void 0||bo.call(gr,Po)},lo=function(Po){var bo;Hn&&Mi(-1,-1),gr==null||(bo=gr.onMouseLeave)===null||bo===void 0||bo.call(gr,Po)};if(li===0||Ei===0)return null;var yo=(ht=gr.title)!==null&&ht!==void 0?ht:yn({rowType:pr,ellipsis:tn,children:Jo}),Ua=ct()(xr,Dn,(Yt={},(0,Ve.Z)(Yt,"".concat(xr,"-fix-left"),Ro&&Di),(0,Ve.Z)(Yt,"".concat(xr,"-fix-left-first"),$n&&Di),(0,Ve.Z)(Yt,"".concat(xr,"-fix-left-last"),rr&&Di),(0,Ve.Z)(Yt,"".concat(xr,"-fix-left-all"),rr&&zi&&Di),(0,Ve.Z)(Yt,"".concat(xr,"-fix-right"),xi&&Di),(0,Ve.Z)(Yt,"".concat(xr,"-fix-right-first"),br&&Di),(0,Ve.Z)(Yt,"".concat(xr,"-fix-right-last"),pi&&Di),(0,Ve.Z)(Yt,"".concat(xr,"-ellipsis"),tn),(0,Ve.Z)(Yt,"".concat(xr,"-with-append"),Ki),(0,Ve.Z)(Yt,"".concat(xr,"-fix-sticky"),(Ro||xi)&&oi&&Di),(0,Ve.Z)(Yt,"".concat(xr,"-row-hover"),!co&&So),Yt),gr.className,co==null?void 0:co.className),Ta={};tr&&(Ta.textAlign=tr);var Gi=(0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)({},Lo),gr.style),Ta),co==null?void 0:co.style),uo=Jo;return(0,Ue.Z)(uo)==="object"&&!Array.isArray(uo)&&!ce.isValidElement(uo)&&(uo=null),tn&&(rr||br)&&(uo=ce.createElement("span",{className:"".concat(xr,"-content")},uo)),ce.createElement(en,(0,ue.Z)({},co,gr,{className:Ua,style:Gi,title:yo,scope:mn,onMouseEnter:Ai,onMouseLeave:lo,colSpan:li!==1?li:null,rowSpan:Ei!==1?Ei:null}),Ki,uo)}var Ln=ce.memo(Xt);function pn(pt,bt,$t,Gt,ln,Ge){var st=$t[pt]||{},ht=$t[bt]||{},Yt,en;st.fixed==="left"?Yt=Gt.left[ln==="rtl"?bt:pt]:ht.fixed==="right"&&(en=Gt.right[ln==="rtl"?pt:bt]);var nn=!1,tn=!1,mn=!1,_n=!1,Dn=$t[bt+1],tr=$t[pt-1],Hn=!(Ge!=null&&Ge.children);if(ln==="rtl"){if(Yt!==void 0){var nr=tr&&tr.fixed==="left";_n=!nr&&Hn}else if(en!==void 0){var jn=Dn&&Dn.fixed==="right";mn=!jn&&Hn}}else if(Yt!==void 0){var lr=Dn&&Dn.fixed==="left";nn=!lr&&Hn}else if(en!==void 0){var ur=tr&&tr.fixed==="right";tn=!ur&&Hn}return{fixLeft:Yt,fixRight:en,lastFixLeft:nn,firstFixRight:tn,lastFixRight:mn,firstFixLeft:_n,isSticky:Gt.isSticky}}var hn=ce.createContext({}),un=hn;function Xe(pt){var bt=pt.className,$t=pt.index,Gt=pt.children,ln=pt.colSpan,Ge=ln===void 0?1:ln,st=pt.rowSpan,ht=pt.align,Yt=ve(Se,["prefixCls","direction"]),en=Yt.prefixCls,nn=Yt.direction,tn=ce.useContext(un),mn=tn.scrollColumnIndex,_n=tn.stickyOffsets,Dn=tn.flattenColumns,tr=tn.columns,Hn=$t+Ge-1,nr=Hn+1===mn?Ge+1:Ge,jn=pn($t,$t+nr-1,Dn,_n,nn,tr==null?void 0:tr[$t]);return ce.createElement(Ln,(0,ue.Z)({className:bt,index:$t,component:"td",prefixCls:en,record:null,dataIndex:null,align:ht,colSpan:nr,rowSpan:st,render:function(){return Gt}},jn))}var ke=ee(42244),_e=["children"];function Te(pt){var bt=pt.children,$t=(0,ke.Z)(pt,_e);return ce.createElement("tr",$t,bt)}function Fe(pt){var bt=pt.children;return bt}Fe.Row=Te,Fe.Cell=Xe;var me=Fe;function at(pt){var bt=pt.children,$t=pt.stickyOffsets,Gt=pt.flattenColumns,ln=pt.columns,Ge=ve(Se,"prefixCls"),st=Gt.length-1,ht=Gt[st],Yt=ce.useMemo(function(){return{stickyOffsets:$t,flattenColumns:Gt,scrollColumnIndex:ht!=null&&ht.scrollbar?st:null,columns:ln}},[ht,Gt,st,$t,ln]);return ce.createElement(un.Provider,{value:Yt},ce.createElement("tfoot",{className:"".concat(Ge,"-summary")},bt))}var Pt=Le(at),Qe=me,Je=ee(70425),xt=ee(29301),ot=ee(29194),mt=ee(24514),Nt=ee(75152),rn=ee(26112);function It(pt,bt,$t,Gt,ln,Ge,st){pt.push({record:bt,indent:$t,index:st});var ht=Ge(bt),Yt=ln==null?void 0:ln.has(ht);if(bt&&Array.isArray(bt[Gt])&&Yt)for(var en=0;en<bt[Gt].length;en+=1)It(pt,bt[Gt][en],$t+1,Gt,ln,Ge,en)}function Qt(pt,bt,$t,Gt){var ln=ce.useMemo(function(){if($t!=null&&$t.size){for(var Ge=[],st=0;st<(pt==null?void 0:pt.length);st+=1){var ht=pt[st];It(Ge,ht,0,bt,$t,Gt,st)}return Ge}return pt==null?void 0:pt.map(function(Yt,en){return{record:Yt,indent:0,index:en}})},[pt,bt,$t,Gt]);return ln}function dn(pt){var bt=pt.prefixCls,$t=pt.children,Gt=pt.component,ln=pt.cellComponent,Ge=pt.className,st=pt.expanded,ht=pt.colSpan,Yt=pt.isEmpty,en=ve(Se,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),nn=en.scrollbarSize,tn=en.fixHeader,mn=en.fixColumn,_n=en.componentWidth,Dn=en.horizonScroll,tr=$t;return(Yt?Dn&&_n:mn)&&(tr=ce.createElement("div",{style:{width:_n-(tn?nn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(bt,"-expanded-row-fixed")},tr)),ce.createElement(Gt,{className:Ge,style:{display:st?null:"none"}},ce.createElement(Ln,{component:ln,prefixCls:bt,colSpan:ht},tr))}var At=dn;function Lt(pt,bt,$t,Gt){var ln=ve(Se,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Ge=ln.flattenColumns,st=ln.expandableType,ht=ln.expandedKeys,Yt=ln.childrenColumnName,en=ln.onTriggerExpand,nn=ln.rowExpandable,tn=ln.onRow,mn=ln.expandRowByClick,_n=ln.rowClassName,Dn=st==="nest",tr=st==="row"&&(!nn||nn(pt)),Hn=tr||Dn,nr=ht&&ht.has(bt),jn=Yt&&pt&&pt[Yt],lr=(0,Je.useEvent)(en),ur=tn==null?void 0:tn(pt,$t),qr=ur==null?void 0:ur.onClick,pr=function(Br){mn&&Hn&&en(pt,Br);for(var $n=arguments.length,rr=new Array($n>1?$n-1:0),br=1;br<$n;br++)rr[br-1]=arguments[br];qr==null||qr.apply(void 0,[Br].concat(rr))},Yr;typeof _n=="string"?Yr=_n:typeof _n=="function"&&(Yr=_n(pt,$t,Gt));var wi=wt(Ge);return(0,gt.Z)((0,gt.Z)({},ln),{},{columnsKey:wi,nestExpandable:Dn,expanded:nr,hasNestChildren:jn,record:pt,onTriggerExpand:lr,rowSupportExpand:tr,expandable:Hn,rowProps:(0,gt.Z)((0,gt.Z)({},ur),{},{className:ct()(Yr,ur==null?void 0:ur.className),onClick:pr})})}function qt(pt,bt,$t,Gt,ln){var Ge=pt.record,st=pt.prefixCls,ht=pt.columnsKey,Yt=pt.fixedInfoList,en=pt.expandIconColumnIndex,nn=pt.nestExpandable,tn=pt.indentSize,mn=pt.expandIcon,_n=pt.expanded,Dn=pt.hasNestChildren,tr=pt.onTriggerExpand,Hn=ht[$t],nr=Yt[$t],jn;$t===(en||0)&&nn&&(jn=ce.createElement(ce.Fragment,null,ce.createElement("span",{style:{paddingLeft:"".concat(tn*Gt,"px")},className:"".concat(st,"-row-indent indent-level-").concat(Gt)}),mn({prefixCls:st,expanded:_n,expandable:Dn,record:Ge,onExpand:tr})));var lr;return bt.onCell&&(lr=bt.onCell(Ge,ln)),{key:Hn,fixedInfo:nr,appendCellNode:jn,additionalCellProps:lr||{}}}function Tn(pt){var bt=pt.className,$t=pt.style,Gt=pt.record,ln=pt.index,Ge=pt.renderIndex,st=pt.rowKey,ht=pt.indent,Yt=ht===void 0?0:ht,en=pt.rowComponent,nn=pt.cellComponent,tn=pt.scopeCellComponent,mn=Lt(Gt,st,ln,Yt),_n=mn.prefixCls,Dn=mn.flattenColumns,tr=mn.expandedRowClassName,Hn=mn.expandedRowRender,nr=mn.rowProps,jn=mn.expanded,lr=mn.rowSupportExpand,ur=ce.useState(!1),qr=(0,Me.Z)(ur,2),pr=qr[0],Yr=qr[1];ce.useEffect(function(){jn&&Yr(!0)},[jn]);var wi=ce.createElement(en,(0,ue.Z)({},nr,{"data-row-key":st,className:ct()(bt,"".concat(_n,"-row"),"".concat(_n,"-row-level-").concat(Yt),nr==null?void 0:nr.className),style:(0,gt.Z)((0,gt.Z)({},$t),nr==null?void 0:nr.style)}),Dn.map(function(rr,br){var pi=rr.render,Ki=rr.dataIndex,ir=rr.className,gr=qt(mn,rr,br,Yt,ln),oi=gr.key,xr=gr.fixedInfo,mi=gr.appendCellNode,Di=gr.additionalCellProps;return ce.createElement(Ln,(0,ue.Z)({className:ir,ellipsis:rr.ellipsis,align:rr.align,scope:rr.rowScope,component:rr.rowScope?tn:nn,prefixCls:_n,key:oi,record:Gt,index:ln,renderIndex:Ge,dataIndex:Ki,render:pi,shouldCellUpdate:rr.shouldCellUpdate},xr,{appendNode:mi,additionalProps:Di}))})),ar;if(lr&&(pr||jn)){var Br=Hn(Gt,ln,Yt+1,jn),$n=tr&&tr(Gt,ln,Yt);ar=ce.createElement(At,{expanded:jn,className:ct()("".concat(_n,"-expanded-row"),"".concat(_n,"-expanded-row-level-").concat(Yt+1),$n),prefixCls:_n,component:en,cellComponent:nn,colSpan:Dn.length,isEmpty:!1},Br)}return ce.createElement(ce.Fragment,null,wi,ar)}Tn.displayName="BodyRow";var Jt=Le(Tn);function On(pt){var bt=pt.columnKey,$t=pt.onColumnResize,Gt=ce.useRef();return ce.useEffect(function(){Gt.current&&$t(bt,Gt.current.offsetWidth)},[]),ce.createElement(xt.Z,{data:bt},ce.createElement("td",{ref:Gt,style:{padding:0,border:0,height:0}},ce.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function zn(pt){var bt=pt.prefixCls,$t=pt.columnsKey,Gt=pt.onColumnResize;return ce.createElement("tr",{"aria-hidden":"true",className:"".concat(bt,"-measure-row"),style:{height:0,fontSize:0}},ce.createElement(xt.Z.Collection,{onBatchResize:function(Ge){Ge.forEach(function(st){var ht=st.data,Yt=st.size;Gt(ht,Yt.offsetWidth)})}},$t.map(function(ln){return ce.createElement(On,{key:ln,columnKey:ln,onColumnResize:Gt})})))}function qn(pt){var bt=pt.data,$t=pt.measureColumnWidth,Gt=ve(Se,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),ln=Gt.prefixCls,Ge=Gt.getComponent,st=Gt.onColumnResize,ht=Gt.flattenColumns,Yt=Gt.getRowKey,en=Gt.expandedKeys,nn=Gt.childrenColumnName,tn=Gt.emptyNode,mn=Qt(bt,nn,en,Yt),_n=ce.useRef({renderWithProps:!1}),Dn=Ge(["body","wrapper"],"tbody"),tr=Ge(["body","row"],"tr"),Hn=Ge(["body","cell"],"td"),nr=Ge(["body","cell"],"th"),jn;bt.length?jn=mn.map(function(ur,qr){var pr=ur.record,Yr=ur.indent,wi=ur.index,ar=Yt(pr,qr);return ce.createElement(Jt,{key:ar,rowKey:ar,record:pr,index:qr,renderIndex:wi,rowComponent:tr,cellComponent:Hn,scopeCellComponent:nr,getRowKey:Yt,indent:Yr})}):jn=ce.createElement(At,{expanded:!0,className:"".concat(ln,"-placeholder"),prefixCls:ln,component:tr,cellComponent:Hn,colSpan:ht.length,isEmpty:!0},tn);var lr=wt(ht);return ce.createElement(St.Provider,{value:_n.current},ce.createElement(Dn,{className:"".concat(ln,"-tbody")},$t&&ce.createElement(zn,{prefixCls:ln,columnsKey:lr,onColumnResize:st}),jn))}qn.displayName="Body";var Xn=Le(qn),vr=["expandable"],_r="RC_TABLE_INTERNAL_COL_DEFINE";function Qn(pt){var bt=pt.expandable,$t=(0,ke.Z)(pt,vr),Gt;return"expandable"in pt?Gt=(0,gt.Z)((0,gt.Z)({},$t),bt):Gt=$t,Gt.showExpandColumn===!1&&(Gt.expandIconColumnIndex=-1),Gt}var Cr=["columnType"];function ni(pt){for(var bt=pt.colWidths,$t=pt.columns,Gt=pt.columCount,ln=[],Ge=Gt||$t.length,st=!1,ht=Ge-1;ht>=0;ht-=1){var Yt=bt[ht],en=$t&&$t[ht],nn=en&&en[_r];if(Yt||nn||st){var tn=nn||{},mn=tn.columnType,_n=(0,ke.Z)(tn,Cr);ln.unshift(ce.createElement("col",(0,ue.Z)({key:ht,style:{width:Yt}},_n))),st=!0}}return ce.createElement("colgroup",null,ln)}var Jr=ni,Yn=ee(77654),mr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function si(pt,bt){return(0,ce.useMemo)(function(){for(var $t=[],Gt=0;Gt<bt;Gt+=1){var ln=pt[Gt];if(ln!==void 0)$t[Gt]=ln;else return null}return $t},[pt.join("_"),bt])}var or=ce.forwardRef(function(pt,bt){var $t=pt.className,Gt=pt.noData,ln=pt.columns,Ge=pt.flattenColumns,st=pt.colWidths,ht=pt.columCount,Yt=pt.stickyOffsets,en=pt.direction,nn=pt.fixHeader,tn=pt.stickyTopOffset,mn=pt.stickyBottomOffset,_n=pt.stickyClassName,Dn=pt.onScroll,tr=pt.maxContentScroll,Hn=pt.children,nr=(0,ke.Z)(pt,mr),jn=ve(Se,["prefixCls","scrollbarSize","isSticky"]),lr=jn.prefixCls,ur=jn.scrollbarSize,qr=jn.isSticky,pr=qr&&!nn?0:ur,Yr=ce.useRef(null),wi=ce.useCallback(function(ir){(0,pe.mH)(bt,ir),(0,pe.mH)(Yr,ir)},[]);ce.useEffect(function(){var ir;function gr(oi){var xr=oi,mi=xr.currentTarget,Di=xr.deltaX;Di&&(Dn({currentTarget:mi,scrollLeft:mi.scrollLeft+Di}),oi.preventDefault())}return(ir=Yr.current)===null||ir===void 0||ir.addEventListener("wheel",gr),function(){var oi;(oi=Yr.current)===null||oi===void 0||oi.removeEventListener("wheel",gr)}},[]);var ar=ce.useMemo(function(){return Ge.every(function(ir){return ir.width})},[Ge]),Br=Ge[Ge.length-1],$n={fixed:Br?Br.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(lr,"-cell-scrollbar")}}},rr=(0,ce.useMemo)(function(){return pr?[].concat((0,Yn.Z)(ln),[$n]):ln},[pr,ln]),br=(0,ce.useMemo)(function(){return pr?[].concat((0,Yn.Z)(Ge),[$n]):Ge},[pr,Ge]),pi=(0,ce.useMemo)(function(){var ir=Yt.right,gr=Yt.left;return(0,gt.Z)((0,gt.Z)({},Yt),{},{left:en==="rtl"?[].concat((0,Yn.Z)(gr.map(function(oi){return oi+pr})),[0]):gr,right:en==="rtl"?ir:[].concat((0,Yn.Z)(ir.map(function(oi){return oi+pr})),[0]),isSticky:qr})},[pr,Yt,qr]),Ki=si(st,ht);return ce.createElement("div",{style:(0,gt.Z)({overflow:"hidden"},qr?{top:tn,bottom:mn}:{}),ref:wi,className:ct()($t,(0,Ve.Z)({},_n,!!_n))},ce.createElement("table",{style:{tableLayout:"fixed",visibility:Gt||Ki?null:"hidden"}},(!Gt||!tr||ar)&&ce.createElement(Jr,{colWidths:Ki?[].concat((0,Yn.Z)(Ki),[pr]):[],columCount:ht+1,columns:br}),Hn((0,gt.Z)((0,gt.Z)({},nr),{},{stickyOffsets:pi,columns:rr,flattenColumns:br}))))});or.displayName="FixedHolder";var ii=ce.memo(or);function ki(pt){var bt=pt.cells,$t=pt.stickyOffsets,Gt=pt.flattenColumns,ln=pt.rowComponent,Ge=pt.cellComponent,st=pt.tdCellComponent,ht=pt.onHeaderRow,Yt=pt.index,en=ve(Se,["prefixCls","direction"]),nn=en.prefixCls,tn=en.direction,mn;ht&&(mn=ht(bt.map(function(Dn){return Dn.column}),Yt));var _n=wt(bt.map(function(Dn){return Dn.column}));return ce.createElement(ln,mn,bt.map(function(Dn,tr){var Hn=Dn.column,nr=pn(Dn.colStart,Dn.colEnd,Gt,$t,tn,Hn),jn;return Hn&&Hn.onHeaderCell&&(jn=Dn.column.onHeaderCell(Hn)),ce.createElement(Ln,(0,ue.Z)({},Dn,{scope:Hn.title?Dn.colSpan>1?"colgroup":"col":null,ellipsis:Hn.ellipsis,align:Hn.align,component:Hn.title?Ge:st,prefixCls:nn,key:_n[tr]},nr,{additionalProps:jn,rowType:"header"}))}))}ki.displayName="HeaderRow";var gi=ki;function Li(pt){var bt=[];function $t(st,ht){var Yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;bt[Yt]=bt[Yt]||[];var en=ht,nn=st.filter(Boolean).map(function(tn){var mn={key:tn.key,className:tn.className||"",children:tn.title,column:tn,colStart:en},_n=1,Dn=tn.children;return Dn&&Dn.length>0&&(_n=$t(Dn,en,Yt+1).reduce(function(tr,Hn){return tr+Hn},0),mn.hasSubColumns=!0),"colSpan"in tn&&(_n=tn.colSpan),"rowSpan"in tn&&(mn.rowSpan=tn.rowSpan),mn.colSpan=_n,mn.colEnd=mn.colStart+_n-1,bt[Yt].push(mn),en+=_n,_n});return nn}$t(pt,0);for(var Gt=bt.length,ln=function(ht){bt[ht].forEach(function(Yt){!("rowSpan"in Yt)&&!Yt.hasSubColumns&&(Yt.rowSpan=Gt-ht)})},Ge=0;Ge<Gt;Ge+=1)ln(Ge);return bt}function ui(pt){var bt=pt.stickyOffsets,$t=pt.columns,Gt=pt.flattenColumns,ln=pt.onHeaderRow,Ge=ve(Se,["prefixCls","getComponent"]),st=Ge.prefixCls,ht=Ge.getComponent,Yt=ce.useMemo(function(){return Li($t)},[$t]),en=ht(["header","wrapper"],"thead"),nn=ht(["header","row"],"tr"),tn=ht(["header","cell"],"th"),mn=ht(["header","cell"],"td");return ce.createElement(en,{className:"".concat(st,"-thead")},Yt.map(function(_n,Dn){var tr=ce.createElement(gi,{key:Dn,flattenColumns:Gt,cells:_n,stickyOffsets:bt,rowComponent:nn,cellComponent:tn,tdCellComponent:mn,onHeaderRow:ln,index:Dn});return tr}))}var dr=Le(ui),Hr=ee(11592);function Cn(pt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof bt=="number"?bt:bt.endsWith("%")?pt*parseFloat(bt)/100:null}function Ee(pt,bt){return ce.useMemo(function(){if(bt&&bt>0){var $t=0,Gt=0;pt.forEach(function(en){var nn=Cn(bt,en.width);nn?$t+=nn:Gt+=1});var ln=bt-$t,Ge=Gt,st=ln/Gt,ht=0,Yt=pt.map(function(en){var nn=(0,gt.Z)({},en),tn=Cn(bt,nn.width);if(tn)nn.width=tn;else{var mn=Math.floor(st);nn.width=Ge===1?ln:mn,ln-=mn,Ge-=1}return ht+=nn.width,nn});return[Yt,ht]}return[pt,bt]},[pt,bt])}var je=["children"],Oe=["fixed"];function De(pt){return(0,Hr.Z)(pt).filter(function(bt){return ce.isValidElement(bt)}).map(function(bt){var $t=bt.key,Gt=bt.props,ln=Gt.children,Ge=(0,ke.Z)(Gt,je),st=(0,gt.Z)({key:$t},Ge);return ln&&(st.children=De(ln)),st})}function Ke(pt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return pt.filter(function($t){return $t&&(0,Ue.Z)($t)==="object"}).reduce(function($t,Gt,ln){var Ge=Gt.fixed,st=Ge===!0?"left":Ge,ht="".concat(bt,"-").concat(ln),Yt=Gt.children;return Yt&&Yt.length>0?[].concat((0,Yn.Z)($t),(0,Yn.Z)(Ke(Yt,ht).map(function(en){return(0,gt.Z)({fixed:st},en)}))):[].concat((0,Yn.Z)($t),[(0,gt.Z)((0,gt.Z)({key:ht},Gt),{},{fixed:st})])},[])}function et(pt){for(var bt=!0,$t=0;$t<pt.length;$t+=1){var Gt=pt[$t];if(bt&&Gt.fixed!=="left")bt=!1;else if(!bt&&Gt.fixed==="left"){warning(!1,"Index ".concat($t-1," of `columns` missing `fixed='left'` prop."));break}}for(var ln=!0,Ge=pt.length-1;Ge>=0;Ge-=1){var st=pt[Ge];if(ln&&st.fixed!=="right")ln=!1;else if(!ln&&st.fixed==="right"){warning(!1,"Index ".concat(Ge+1," of `columns` missing `fixed='right'` prop."));break}}}function rt(pt){return pt.map(function(bt){var $t=bt.fixed,Gt=(0,ke.Z)(bt,Oe),ln=$t;return $t==="left"?ln="right":$t==="right"&&(ln="left"),(0,gt.Z)({fixed:ln},Gt)})}function Dt(pt,bt){var $t=pt.prefixCls,Gt=pt.columns,ln=pt.children,Ge=pt.expandable,st=pt.expandedKeys,ht=pt.columnTitle,Yt=pt.getRowKey,en=pt.onTriggerExpand,nn=pt.expandIcon,tn=pt.rowExpandable,mn=pt.expandIconColumnIndex,_n=pt.direction,Dn=pt.expandRowByClick,tr=pt.columnWidth,Hn=pt.fixed,nr=pt.scrollWidth,jn=ce.useMemo(function(){return Gt||De(ln)},[Gt,ln]),lr=ce.useMemo(function(){if(Ge){var Br,$n=jn.slice();if(!$n.includes(ne)){var rr=mn||0;rr>=0&&$n.splice(rr,0,ne)}var br=$n.indexOf(ne);$n=$n.filter(function(gr,oi){return gr!==ne||oi===br});var pi=jn[br],Ki;(Hn==="left"||Hn)&&!mn?Ki="left":(Hn==="right"||Hn)&&mn===jn.length?Ki="right":Ki=pi?pi.fixed:null;var ir=(Br={},(0,Ve.Z)(Br,_r,{className:"".concat($t,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Ve.Z)(Br,"title",ht),(0,Ve.Z)(Br,"fixed",Ki),(0,Ve.Z)(Br,"className","".concat($t,"-row-expand-icon-cell")),(0,Ve.Z)(Br,"width",tr),(0,Ve.Z)(Br,"render",function(oi,xr,mi){var Di=Yt(xr,mi),zi=st.has(Di),zo=tn?tn(xr):!0,Vi=nn({prefixCls:$t,expanded:zi,expandable:zo,record:xr,onExpand:en});return Dn?ce.createElement("span",{onClick:function(co){return co.stopPropagation()}},Vi):Vi}),Br);return $n.map(function(gr){return gr===ne?ir:gr})}return jn.filter(function(gr){return gr!==ne})},[Ge,jn,Yt,st,nn,_n]),ur=ce.useMemo(function(){var Br=lr;return bt&&(Br=bt(Br)),Br.length||(Br=[{render:function(){return null}}]),Br},[bt,lr,_n]),qr=ce.useMemo(function(){return _n==="rtl"?rt(Ke(ur)):Ke(ur)},[ur,_n,nr]),pr=Ee(qr,nr),Yr=(0,Me.Z)(pr,2),wi=Yr[0],ar=Yr[1];return[ur,wi,ar]}var Ft=Dt;function Bt(pt){var bt,$t=pt.prefixCls,Gt=pt.record,ln=pt.onExpand,Ge=pt.expanded,st=pt.expandable,ht="".concat($t,"-row-expand-icon");if(!st)return ce.createElement("span",{className:ct()(ht,"".concat($t,"-row-spaced"))});var Yt=function(nn){ln(Gt,nn),nn.stopPropagation()};return ce.createElement("span",{className:ct()(ht,(bt={},(0,Ve.Z)(bt,"".concat($t,"-row-expanded"),Ge),(0,Ve.Z)(bt,"".concat($t,"-row-collapsed"),!Ge),bt)),onClick:Yt})}function Ct(pt,bt,$t){var Gt=[];function ln(Ge){(Ge||[]).forEach(function(st,ht){Gt.push(bt(st,ht)),ln(st[$t])})}return ln(pt),Gt}function Ht(pt,bt,$t){var Gt=Qn(pt),ln=Gt.expandIcon,Ge=Gt.expandedRowKeys,st=Gt.defaultExpandedRowKeys,ht=Gt.defaultExpandAllRows,Yt=Gt.expandedRowRender,en=Gt.onExpand,nn=Gt.onExpandedRowsChange,tn=Gt.childrenColumnName,mn=ln||Bt,_n=tn||"children",Dn=ce.useMemo(function(){return Yt?"row":pt.expandable&&pt.internalHooks===xe&&pt.expandable.__PARENT_RENDER_ICON__||bt.some(function(qr){return qr&&(0,Ue.Z)(qr)==="object"&&qr[_n]})?"nest":!1},[!!Yt,bt]),tr=ce.useState(function(){return st||(ht?Ct(bt,$t,_n):[])}),Hn=(0,Me.Z)(tr,2),nr=Hn[0],jn=Hn[1],lr=ce.useMemo(function(){return new Set(Ge||nr||[])},[Ge,nr]),ur=ce.useCallback(function(qr){var pr=$t(qr,bt.indexOf(qr)),Yr,wi=lr.has(pr);wi?(lr.delete(pr),Yr=(0,Yn.Z)(lr)):Yr=[].concat((0,Yn.Z)(lr),[pr]),jn(Yr),en&&en(!wi,qr),nn&&nn(Yr)},[$t,lr,bt,en,nn]);return[Gt,Dn,lr,mn,_n,ur]}function Ut(pt,bt,$t,Gt){var ln=pt.map(function(Ge,st){return pn(st,st,pt,bt,$t,Gt==null?void 0:Gt[st])});return(0,Ot.Z)(function(){return ln},[ln],function(Ge,st){return!(0,he.Z)(Ge,st)})}function on(pt){var bt=(0,ce.useRef)(pt),$t=(0,ce.useState)({}),Gt=(0,Me.Z)($t,2),ln=Gt[1],Ge=(0,ce.useRef)(null),st=(0,ce.useRef)([]);function ht(Yt){st.current.push(Yt);var en=Promise.resolve();Ge.current=en,en.then(function(){if(Ge.current===en){var nn=st.current,tn=bt.current;st.current=[],nn.forEach(function(mn){bt.current=mn(bt.current)}),Ge.current=null,tn!==bt.current&&ln({})}})}return(0,ce.useEffect)(function(){return function(){Ge.current=null}},[]),[bt.current,ht]}function cn(pt){var bt=(0,ce.useRef)(pt||null),$t=(0,ce.useRef)();function Gt(){window.clearTimeout($t.current)}function ln(st){bt.current=st,Gt(),$t.current=window.setTimeout(function(){bt.current=null,$t.current=void 0},100)}function Ge(){return bt.current}return(0,ce.useEffect)(function(){return Gt},[]),[ln,Ge]}function Rt(){var pt=ce.useState(-1),bt=(0,Me.Z)(pt,2),$t=bt[0],Gt=bt[1],ln=ce.useState(-1),Ge=(0,Me.Z)(ln,2),st=Ge[0],ht=Ge[1],Yt=ce.useCallback(function(en,nn){Gt(en),ht(nn)},[]);return[$t,st,Yt]}var Vt=ee(47273),In=(0,Vt.Z)()?window:null;function wn(pt,bt){var $t=(0,Ue.Z)(pt)==="object"?pt:{},Gt=$t.offsetHeader,ln=Gt===void 0?0:Gt,Ge=$t.offsetSummary,st=Ge===void 0?0:Ge,ht=$t.offsetScroll,Yt=ht===void 0?0:ht,en=$t.getContainer,nn=en===void 0?function(){return In}:en,tn=nn()||In;return ce.useMemo(function(){var mn=!!pt;return{isSticky:mn,stickyClassName:mn?"".concat(bt,"-sticky-holder"):"",offsetHeader:ln,offsetSummary:st,offsetScroll:Yt,container:tn}},[Yt,ln,st,bt,tn])}function Nn(pt,bt,$t){var Gt=(0,ce.useMemo)(function(){for(var ln=[],Ge=[],st=0,ht=0,Yt=0;Yt<bt;Yt+=1)if($t==="rtl"){Ge[Yt]=ht,ht+=pt[Yt]||0;var en=bt-Yt-1;ln[en]=st,st+=pt[en]||0}else{ln[Yt]=st,st+=pt[Yt]||0;var nn=bt-Yt-1;Ge[nn]=ht,ht+=pt[nn]||0}return{left:ln,right:Ge}},[pt,bt,$t]);return Gt}var Rn=Nn;function Jn(pt){var bt=pt.className,$t=pt.children;return ce.createElement("div",{className:bt},$t)}var Sn=Jn,Un=ee(8224),zt=ee(55468),fn=function(bt,$t){var Gt,ln,Ge=bt.scrollBodyRef,st=bt.onScroll,ht=bt.offsetScroll,Yt=bt.container,en=ve(Se,"prefixCls"),nn=((Gt=Ge.current)===null||Gt===void 0?void 0:Gt.scrollWidth)||0,tn=((ln=Ge.current)===null||ln===void 0?void 0:ln.clientWidth)||0,mn=nn&&tn*(tn/nn),_n=ce.useRef(),Dn=on({scrollLeft:0,isHiddenScrollBar:!1}),tr=(0,Me.Z)(Dn,2),Hn=tr[0],nr=tr[1],jn=ce.useRef({delta:0,x:0}),lr=ce.useState(!1),ur=(0,Me.Z)(lr,2),qr=ur[0],pr=ur[1],Yr=function(){pr(!1)},wi=function(br){br.persist(),jn.current.delta=br.pageX-Hn.scrollLeft,jn.current.x=0,pr(!0),br.preventDefault()},ar=function(br){var pi,Ki=br||((pi=window)===null||pi===void 0?void 0:pi.event),ir=Ki.buttons;if(!qr||ir===0){qr&&pr(!1);return}var gr=jn.current.x+br.pageX-jn.current.x-jn.current.delta;gr<=0&&(gr=0),gr+mn>=tn&&(gr=tn-mn),st({scrollLeft:gr/tn*(nn+2)}),jn.current.x=br.pageX},Br=function(){if(Ge.current){var br=(0,zt.os)(Ge.current).top,pi=br+Ge.current.offsetHeight,Ki=Yt===window?document.documentElement.scrollTop+window.innerHeight:(0,zt.os)(Yt).top+Yt.clientHeight;pi-(0,Nt.Z)()<=Ki||br>=Ki-ht?nr(function(ir){return(0,gt.Z)((0,gt.Z)({},ir),{},{isHiddenScrollBar:!0})}):nr(function(ir){return(0,gt.Z)((0,gt.Z)({},ir),{},{isHiddenScrollBar:!1})})}},$n=function(br){nr(function(pi){return(0,gt.Z)((0,gt.Z)({},pi),{},{scrollLeft:br/nn*tn||0})})};return ce.useImperativeHandle($t,function(){return{setScrollLeft:$n}}),ce.useEffect(function(){var rr=(0,Un.Z)(document.body,"mouseup",Yr,!1),br=(0,Un.Z)(document.body,"mousemove",ar,!1);return Br(),function(){rr.remove(),br.remove()}},[mn,qr]),ce.useEffect(function(){var rr=(0,Un.Z)(Yt,"scroll",Br,!1),br=(0,Un.Z)(window,"resize",Br,!1);return function(){rr.remove(),br.remove()}},[Yt]),ce.useEffect(function(){Hn.isHiddenScrollBar||nr(function(rr){var br=Ge.current;return br?(0,gt.Z)((0,gt.Z)({},rr),{},{scrollLeft:br.scrollLeft/br.scrollWidth*br.clientWidth}):rr})},[Hn.isHiddenScrollBar]),nn<=tn||!mn||Hn.isHiddenScrollBar?null:ce.createElement("div",{style:{height:(0,Nt.Z)(),width:tn,bottom:ht},className:"".concat(en,"-sticky-scroll")},ce.createElement("div",{onMouseDown:wi,ref:_n,className:ct()("".concat(en,"-sticky-scroll-bar"),(0,Ve.Z)({},"".concat(en,"-sticky-scroll-bar-active"),qr)),style:{width:"".concat(mn,"px"),transform:"translate3d(".concat(Hn.scrollLeft,"px, 0, 0)")}}))},vn=ce.forwardRef(fn);function An(pt){return null}var En=An;function kn(pt){return null}var Mn=kn,Bn="rc-table",Kn=[],Vn={};function cr(){return"No Data"}function fr(pt){var bt,$t=(0,gt.Z)({rowKey:"key",prefixCls:Bn,emptyText:cr},pt),Gt=$t.prefixCls,ln=$t.className,Ge=$t.rowClassName,st=$t.style,ht=$t.data,Yt=$t.rowKey,en=$t.scroll,nn=$t.tableLayout,tn=$t.direction,mn=$t.title,_n=$t.footer,Dn=$t.summary,tr=$t.caption,Hn=$t.id,nr=$t.showHeader,jn=$t.components,lr=$t.emptyText,ur=$t.onRow,qr=$t.onHeaderRow,pr=$t.internalHooks,Yr=$t.transformColumns,wi=$t.internalRefs,ar=$t.tailor,Br=$t.sticky,$n=ht||Kn,rr=!!$n.length,br=pr===xe,pi=ce.useCallback(function(Ao,Vo){return(0,We.Z)(jn,Ao)||Vo},[jn]),Ki=ce.useMemo(function(){return typeof Yt=="function"?Yt:function(Ao){var Vo=Ao&&Ao[Yt];return Vo}},[Yt]),ir=pi(["body"]),gr=Rt(),oi=(0,Me.Z)(gr,3),xr=oi[0],mi=oi[1],Di=oi[2],zi=Ht($t,$n,Ki),zo=(0,Me.Z)(zi,6),Vi=zo[0],Jo=zo[1],co=zo[2],Lo=zo[3],Ro=zo[4],xi=zo[5],li=en==null?void 0:en.x,Ei=ce.useState(0),Oi=(0,Me.Z)(Ei,2),fi=Oi[0],So=Oi[1],Mi=Ft((0,gt.Z)((0,gt.Z)((0,gt.Z)({},$t),Vi),{},{expandable:!!Vi.expandedRowRender,columnTitle:Vi.columnTitle,expandedKeys:co,getRowKey:Ki,onTriggerExpand:xi,expandIcon:Lo,expandIconColumnIndex:Vi.expandIconColumnIndex,direction:tn,scrollWidth:br&&ar&&typeof li=="number"?li:null}),br?Yr:null),Ai=(0,Me.Z)(Mi,3),lo=Ai[0],yo=Ai[1],Ua=Ai[2],Ta=Ua!=null?Ua:li,Gi=ce.useMemo(function(){return{columns:lo,flattenColumns:yo}},[lo,yo]),uo=ce.useRef(),pa=ce.useRef(),Po=ce.useRef(),bo=ce.useRef(),os=ce.useRef(),fo=ce.useState(!1),Tr=(0,Me.Z)(fo,2),Eo=Tr[0],aa=Tr[1],Oa=ce.useState(!1),Zi=(0,Me.Z)(Oa,2),$o=Zi[0],es=Zi[1],Us=on(new Map),Ll=(0,Me.Z)(Us,2),As=Ll[0],as=Ll[1],vl=wt(yo),ss=vl.map(function(Ao){return As.get(Ao)}),Is=ce.useMemo(function(){return ss},[ss.join("_")]),ms=Rn(Is,yo.length,tn),ga=en&&Wt(en.y),ya=en&&Wt(Ta)||!!Vi.fixed,_s=ya&&yo.some(function(Ao){var Vo=Ao.fixed;return Vo}),Fl=ce.useRef(),tl=wn(Br,Gt),Dl=tl.isSticky,Xl=tl.offsetHeader,mu=tl.offsetSummary,Do=tl.offsetScroll,qo=tl.stickyClassName,Va=tl.container,Qo=ce.useMemo(function(){return Dn==null?void 0:Dn($n)},[Dn,$n]),Ga=(ga||Dl)&&ce.isValidElement(Qo)&&Qo.type===me&&Qo.props.fixed,ls,Bs,zl;ga&&(Bs={overflowY:"scroll",maxHeight:en.y}),ya&&(ls={overflowX:"auto"},ga||(Bs={overflowY:"hidden"}),zl={width:Ta===!0?"auto":Ta,minWidth:"100%"});var Ou=ce.useCallback(function(Ao,Vo){(0,ot.Z)(uo.current)&&as(function(Os){if(Os.get(Ao)!==Vo){var Kl=new Map(Os);return Kl.set(Ao,Vo),Kl}return Os})},[]),sc=cn(null),$l=(0,Me.Z)(sc,2),ko=$l[0],xa=$l[1];function Al(Ao,Vo){Vo&&(typeof Vo=="function"?Vo(Ao):Vo.scrollLeft!==Ao&&(Vo.scrollLeft=Ao,Vo.scrollLeft!==Ao&&setTimeout(function(){Vo.scrollLeft=Ao},0)))}var _c=(0,Ce.Z)(function(Ao){var Vo=Ao.currentTarget,Os=Ao.scrollLeft,Kl=tn==="rtl",Zl=typeof Os=="number"?Os:Vo.scrollLeft,Nu=Vo||Vn;if(!xa()||xa()===Nu){var Ka;ko(Nu),Al(Zl,pa.current),Al(Zl,Po.current),Al(Zl,os.current),Al(Zl,(Ka=Fl.current)===null||Ka===void 0?void 0:Ka.setScrollLeft)}var yl=Vo||pa.current;if(yl){var Bu=yl.scrollWidth,cc=yl.clientWidth;if(Bu===cc){aa(!1),es(!1);return}Kl?(aa(-Zl<Bu-cc),es(-Zl>0)):(aa(Zl>0),es(Zl<Bu-cc))}}),nl=function(){ya&&Po.current?_c({currentTarget:Po.current}):(aa(!1),es(!1))},td=function(Vo){var Os=Vo.width;Os!==fi&&(nl(),So(uo.current?uo.current.offsetWidth:Os))},Ha=ce.useRef(!1);ce.useEffect(function(){Ha.current&&nl()},[ya,ht,lo.length]),ce.useEffect(function(){Ha.current=!0},[]);var Ru=ce.useState(0),nd=(0,Me.Z)(Ru,2),vu=nd[0],gu=nd[1],Rc=ce.useState(!0),xc=(0,Me.Z)(Rc,2),Ur=xc[0],Pu=xc[1];ce.useEffect(function(){(!ar||!br)&&(Po.current instanceof Element?gu((0,Nt.o)(Po.current).width):gu((0,Nt.o)(bo.current).width)),Pu((0,mt.G)("position","sticky"))},[]),ce.useEffect(function(){br&&wi&&(wi.body.current=Po.current)});var yu=ce.useCallback(function(Ao){return ce.createElement(ce.Fragment,null,ce.createElement(dr,Ao),Ga==="top"&&ce.createElement(Pt,Ao,Qo))},[Ga,Qo]),bu=ce.useCallback(function(Ao){return ce.createElement(Pt,Ao,Qo)},[Qo]),gl=pi(["table"],"table"),lc=ce.useMemo(function(){return nn||(_s?Ta==="max-content"?"auto":"fixed":ga||Dl||yo.some(function(Ao){var Vo=Ao.ellipsis;return Vo})?"fixed":"auto")},[ga,_s,yo,nn,Dl]),Pc,Sc={colWidths:Is,columCount:yo.length,stickyOffsets:ms,onHeaderRow:qr,fixHeader:ga,scroll:en},ma=ce.useMemo(function(){return rr?null:typeof lr=="function"?lr():lr},[rr,lr]),rd=ce.createElement(Xn,{data:$n,measureColumnWidth:ga||ya||Dl}),_u=ce.createElement(Jr,{colWidths:yo.map(function(Ao){var Vo=Ao.width;return Vo}),columns:yo}),jl=tr!=null?ce.createElement("caption",{className:"".concat(Gt,"-caption")},tr):void 0,tu=(0,rn.Z)($t,{data:!0}),Jl=(0,rn.Z)($t,{aria:!0});if(ga||Dl){var ql;typeof ir=="function"?(ql=ir($n,{scrollbarSize:vu,ref:Po,onScroll:_c}),Sc.colWidths=yo.map(function(Ao,Vo){var Os=Ao.width,Kl=Vo===yo.length-1?Os-vu:Os;return typeof Kl=="number"&&!Number.isNaN(Kl)?Kl:0})):ql=ce.createElement("div",{style:(0,gt.Z)((0,gt.Z)({},ls),Bs),onScroll:_c,ref:Po,className:ct()("".concat(Gt,"-body"))},ce.createElement(gl,(0,ue.Z)({style:(0,gt.Z)((0,gt.Z)({},zl),{},{tableLayout:lc})},Jl),jl,_u,rd,!Ga&&Qo&&ce.createElement(Pt,{stickyOffsets:ms,flattenColumns:yo,columns:lo},Qo)));var Ts=(0,gt.Z)((0,gt.Z)((0,gt.Z)({noData:!$n.length,maxContentScroll:ya&&Ta==="max-content"},Sc),Gi),{},{direction:tn,stickyClassName:qo,onScroll:_c});Pc=ce.createElement(ce.Fragment,null,nr!==!1&&ce.createElement(ii,(0,ue.Z)({},Ts,{stickyTopOffset:Xl,className:"".concat(Gt,"-header"),ref:pa}),yu),ql,Ga&&Ga!=="top"&&ce.createElement(ii,(0,ue.Z)({},Ts,{stickyBottomOffset:mu,className:"".concat(Gt,"-summary"),ref:os}),bu),Dl&&ce.createElement(vn,{ref:Fl,offsetScroll:Do,scrollBodyRef:Po,onScroll:_c,container:Va}))}else Pc=ce.createElement("div",{style:(0,gt.Z)((0,gt.Z)({},ls),Bs),className:ct()("".concat(Gt,"-content")),onScroll:_c,ref:Po},ce.createElement(gl,(0,ue.Z)({style:(0,gt.Z)((0,gt.Z)({},zl),{},{tableLayout:lc})},Jl),jl,_u,nr!==!1&&ce.createElement(dr,(0,ue.Z)({},Sc,Gi)),rd,Qo&&ce.createElement(Pt,{stickyOffsets:ms,flattenColumns:yo,columns:lo},Qo)));var rl=ce.createElement("div",(0,ue.Z)({className:ct()(Gt,ln,(bt={},(0,Ve.Z)(bt,"".concat(Gt,"-rtl"),tn==="rtl"),(0,Ve.Z)(bt,"".concat(Gt,"-ping-left"),Eo),(0,Ve.Z)(bt,"".concat(Gt,"-ping-right"),$o),(0,Ve.Z)(bt,"".concat(Gt,"-layout-fixed"),nn==="fixed"),(0,Ve.Z)(bt,"".concat(Gt,"-fixed-header"),ga),(0,Ve.Z)(bt,"".concat(Gt,"-fixed-column"),_s),(0,Ve.Z)(bt,"".concat(Gt,"-scroll-horizontal"),ya),(0,Ve.Z)(bt,"".concat(Gt,"-has-fix-left"),yo[0]&&yo[0].fixed),(0,Ve.Z)(bt,"".concat(Gt,"-has-fix-right"),yo[yo.length-1]&&yo[yo.length-1].fixed==="right"),bt)),style:st,id:Hn,ref:uo},tu),mn&&ce.createElement(Sn,{className:"".concat(Gt,"-title")},mn($n)),ce.createElement("div",{ref:bo,className:"".concat(Gt,"-container")},Pc),_n&&ce.createElement(Sn,{className:"".concat(Gt,"-footer")},_n($n)));ya&&(rl=ce.createElement(xt.Z,{onResize:td},rl));var vs=Ut(yo,ms,tn,lo),Hl=ce.useMemo(function(){return{scrollX:Ta,prefixCls:Gt,getComponent:pi,scrollbarSize:vu,direction:tn,fixedInfoList:vs,isSticky:Dl,supportSticky:Ur,componentWidth:fi,fixHeader:ga,fixColumn:_s,horizonScroll:ya,tableLayout:lc,rowClassName:Ge,expandedRowClassName:Vi.expandedRowClassName,expandIcon:Lo,expandableType:Jo,expandRowByClick:Vi.expandRowByClick,expandedRowRender:Vi.expandedRowRender,onTriggerExpand:xi,expandIconColumnIndex:Vi.expandIconColumnIndex,indentSize:Vi.indentSize,allColumnsFixedLeft:yo.every(function(Ao){return Ao.fixed==="left"}),emptyNode:ma,columns:lo,flattenColumns:yo,onColumnResize:Ou,hoverStartRow:xr,hoverEndRow:mi,onHover:Di,rowExpandable:Vi.rowExpandable,onRow:ur,getRowKey:Ki,expandedKeys:co,childrenColumnName:Ro}},[Ta,Gt,pi,vu,tn,vs,Dl,Ur,fi,ga,_s,ya,lc,Ge,Vi.expandedRowClassName,Lo,Jo,Vi.expandRowByClick,Vi.expandedRowRender,xi,Vi.expandIconColumnIndex,Vi.indentSize,ma,lo,yo,Ou,xr,mi,Di,Vi.rowExpandable,ur,Ki,co,Ro]);return ce.createElement(Se.Provider,{value:Hl},rl)}function $r(pt){return $e(fr,pt)}var Mr=$r();Mr.EXPAND_COLUMN=ne,Mr.INTERNAL_HOOKS=xe,Mr.Column=En,Mr.ColumnGroup=Mn,Mr.Summary=Qe;var wr=Mr,ei=ee(48911),Xr=se(null),Zr=se(null);function Lr(pt,bt,$t){var Gt=bt||1;return $t[pt+Gt]-($t[pt]||0)}function Or(pt){var bt=pt.rowInfo,$t=pt.column,Gt=pt.colIndex,ln=pt.indent,Ge=pt.index,st=pt.renderIndex,ht=pt.record,Yt=pt.style,en=pt.className,nn=pt.inverse,tn=pt.getHeight,mn=$t.render,_n=$t.dataIndex,Dn=$t.className,tr=$t.width,Hn=ve(Zr,["columnsOffset"]),nr=Hn.columnsOffset,jn=qt(bt,$t,Gt,ln,Ge),lr=jn.key,ur=jn.fixedInfo,qr=jn.appendCellNode,pr=jn.additionalCellProps,Yr=pr.style,wi=pr.colSpan,ar=wi===void 0?1:wi,Br=pr.rowSpan,$n=Br===void 0?1:Br,rr=Gt-1,br=Lr(rr,ar,nr),pi=ar>1?tr-br:0,Ki=(0,gt.Z)((0,gt.Z)((0,gt.Z)({},Yr),Yt),{},{flex:"0 0 ".concat(br,"px"),width:"".concat(br,"px"),marginRight:pi,pointerEvents:"auto"}),ir=ce.useMemo(function(){return nn?$n<=1:ar===0||$n===0||$n>1},[$n,ar,nn]);ir?Ki.visibility="hidden":nn&&(Ki.height=tn==null?void 0:tn($n));var gr=ir?function(){return null}:mn,oi={};return($n===0||ar===0)&&(oi.rowSpan=1,oi.colSpan=1),ce.createElement(Ln,(0,ue.Z)({className:ct()(Dn,en),ellipsis:$t.ellipsis,align:$t.align,scope:$t.rowScope,component:"div",prefixCls:bt.prefixCls,key:lr,record:ht,index:Ge,renderIndex:st,dataIndex:_n,render:gr,shouldCellUpdate:$t.shouldCellUpdate},ur,{appendNode:qr,additionalProps:(0,gt.Z)((0,gt.Z)({},pr),{},{style:Ki},oi)}))}var Wr=Or,Pr=["data","index","className","rowKey","style","extra","getHeight"],di=ce.forwardRef(function(pt,bt){var $t=pt.data,Gt=pt.index,ln=pt.className,Ge=pt.rowKey,st=pt.style,ht=pt.extra,Yt=pt.getHeight,en=(0,ke.Z)(pt,Pr),nn=$t.record,tn=$t.indent,mn=$t.index,_n=ve(Se,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Dn=_n.scrollX,tr=_n.flattenColumns,Hn=_n.prefixCls,nr=_n.fixColumn,jn=_n.componentWidth,lr=Lt(nn,Ge,Gt,tn),ur=lr.rowSupportExpand,qr=lr.expanded,pr=lr.rowProps,Yr=lr.expandedRowRender,wi=lr.expandedRowClassName,ar;if(ur&&qr){var Br=Yr(nn,Gt,tn+1,qr),$n=wi==null?void 0:wi(nn,Gt,tn),rr={};nr&&(rr={style:(0,Ve.Z)({},"--virtual-width","".concat(jn,"px"))});var br="".concat(Hn,"-expanded-row-cell");ar=ce.createElement("div",{className:ct()("".concat(Hn,"-expanded-row"),"".concat(Hn,"-expanded-row-level-").concat(tn+1),$n)},ce.createElement(Ln,{component:"div",prefixCls:Hn,className:ct()(br,(0,Ve.Z)({},"".concat(br,"-fixed"),nr)),additionalProps:rr},Br))}var pi=(0,gt.Z)((0,gt.Z)({},st),{},{width:Dn});ht&&(pi.position="absolute",pi.pointerEvents="none");var Ki=ce.createElement("div",(0,ue.Z)({},pr,en,{ref:ur?null:bt,className:ct()(ln,"".concat(Hn,"-row"),pr==null?void 0:pr.className,(0,Ve.Z)({},"".concat(Hn,"-row-extra"),ht)),style:(0,gt.Z)((0,gt.Z)({},pi),pr==null?void 0:pr.style)}),tr.map(function(ir,gr){return ce.createElement(Wr,{key:gr,rowInfo:lr,column:ir,colIndex:gr,indent:tn,index:Gt,renderIndex:mn,record:nn,inverse:ht,getHeight:Yt})}));return ur?ce.createElement("div",{ref:bt},Ki,ar):Ki}),Ri=Le(di),Vr=Ri,er=ce.forwardRef(function(pt,bt){var $t=pt.data,Gt=pt.onScroll,ln=ve(Se,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Ge=ln.flattenColumns,st=ln.onColumnResize,ht=ln.getRowKey,Yt=ln.expandedKeys,en=ln.prefixCls,nn=ln.childrenColumnName,tn=ln.emptyNode,mn=ln.scrollX,_n=ve(Xr),Dn=_n.scrollY,tr=_n.listItemHeight,Hn=ce.useRef(),nr=Qt($t,nn,Yt,ht),jn=ce.useMemo(function(){var ar=0;return Ge.map(function(Br){var $n=Br.width,rr=Br.key;return ar+=$n,[rr,$n,ar]})},[Ge]),lr=ce.useMemo(function(){return jn.map(function(ar){return ar[2]})},[jn]);ce.useEffect(function(){jn.forEach(function(ar){var Br=(0,Me.Z)(ar,2),$n=Br[0],rr=Br[1];st($n,rr)})},[jn]),ce.useImperativeHandle(bt,function(){var ar={};return Object.defineProperty(ar,"scrollLeft",{get:function(){var $n;return(($n=Hn.current)===null||$n===void 0?void 0:$n.getScrollInfo().x)||0},set:function($n){var rr;(rr=Hn.current)===null||rr===void 0||rr.scrollTo({left:$n})}}),ar});var ur=function(Br,$n){var rr,br=(rr=nr[$n])===null||rr===void 0?void 0:rr.record,pi=Br.onCell;if(pi){var Ki,ir=pi(br,$n);return(Ki=ir==null?void 0:ir.rowSpan)!==null&&Ki!==void 0?Ki:1}return 1},qr=function(Br){var $n=Br.start,rr=Br.end,br=Br.getSize,pi=Br.offsetY;if(rr<0)return null;for(var Ki=Ge.filter(function(li){return ur(li,$n)===0}),ir=$n,gr=function(Ei){if(Ki=Ki.filter(function(Oi){return ur(Oi,Ei)===0}),!Ki.length)return ir=Ei,"break"},oi=$n;oi>=0;oi-=1){var xr=gr(oi);if(xr==="break")break}for(var mi=Ge.filter(function(li){return ur(li,rr)!==1}),Di=rr,zi=function(Ei){if(mi=mi.filter(function(Oi){return ur(Oi,Ei)!==1}),!mi.length)return Di=Math.max(Ei-1,rr),"break"},zo=rr;zo<nr.length;zo+=1){var Vi=zi(zo);if(Vi==="break")break}for(var Jo=[],co=function(Ei){var Oi=nr[Ei];if(!Oi)return"continue";Ge.some(function(fi){return ur(fi,Ei)>1})&&Jo.push(Ei)},Lo=ir;Lo<=Di;Lo+=1)var Ro=co(Lo);var xi=Jo.map(function(li){var Ei=nr[li],Oi=ht(Ei.record,li),fi=function(Ai){var lo=li+Ai-1,yo=ht(nr[lo].record,lo),Ua=br(Oi,yo);return Ua.bottom-Ua.top},So=br(Oi);return ce.createElement(Vr,{key:li,data:Ei,rowKey:Oi,index:li,style:{top:-pi+So.top},extra:!0,getHeight:fi})});return xi},pr=ce.useMemo(function(){return{columnsOffset:lr}},[lr]),Yr="".concat(en,"-tbody"),wi;return nr.length?wi=ce.createElement(ei.Z,{fullHeight:!1,ref:Hn,className:ct()(Yr,"".concat(Yr,"-virtual")),height:Dn,itemHeight:tr||24,data:nr,itemKey:function(Br){return ht(Br.record)},scrollWidth:mn,onVirtualScroll:function(Br){var $n=Br.x;Gt({scrollLeft:$n})},extraRender:qr},function(ar,Br,$n){var rr=ht(ar.record,Br);return ce.createElement(Vr,(0,ue.Z)({data:ar,rowKey:rr,index:Br},$n))}):wi=ce.createElement("div",{className:ct()("".concat(en,"-placeholder"))},ce.createElement(Ln,{component:"div",prefixCls:en},tn)),ce.createElement(Zr.Provider,{value:pr},wi)}),Zn=Le(er),Dr=Zn,Sr=function(bt,$t){var Gt=$t.ref,ln=$t.onScroll;return ce.createElement(Dr,{ref:Gt,data:bt,onScroll:ln})},ri=100;function yi(pt){var bt=pt.columns,$t=pt.scroll,Gt=pt.prefixCls,ln=Gt===void 0?Bn:Gt,Ge=pt.className,st=pt.listItemHeight,ht=$t||{},Yt=ht.x,en=ht.y;typeof Yt!="number"&&(Yt=((bt||[]).length+1)*ri),typeof en!="number"&&(en=500);var nn=ce.useMemo(function(){return{scrollY:en,listItemHeight:st}},[en,st]);return ce.createElement(Xr.Provider,{value:nn},ce.createElement(wr,(0,ue.Z)({},pt,{className:ct()(Ge,"".concat(ln,"-virtual")),scroll:(0,gt.Z)((0,gt.Z)({},$t),{},{x:Yt}),components:{body:Sr},columns:bt,internalHooks:xe,tailor:!0})))}function jr(pt){return $e(yi,pt)}var Bi=jr(),_i=null;function oo(pt){return null}var Fr=oo;function Nr(pt){return null}var bi=Nr,hi=ee(2738),Xi=ee(68031),mo=ee(36355),Co=ee(93891),ji=ee(19716),_o=ee(8628),vo=ee(31724),Er=ee(58421),Ar=ee(71418),kr=ee(88088);function Kr(pt){return function($t){let{prefixCls:Gt,onExpand:ln,record:Ge,expanded:st,expandable:ht}=$t;const Yt=`${Gt}-row-expand-icon`;return ce.createElement("button",{type:"button",onClick:en=>{ln(Ge,en),en.stopPropagation()},className:ct()(Yt,{[`${Yt}-spaced`]:!ht,[`${Yt}-expanded`]:ht&&st,[`${Yt}-collapsed`]:ht&&!st}),"aria-label":st?pt.collapse:pt.expand,"aria-expanded":st})}}var Hi=Kr;function eo(pt,bt){return"key"in pt&&pt.key!==void 0&&pt.key!==null?pt.key:pt.dataIndex?Array.isArray(pt.dataIndex)?pt.dataIndex.join("."):pt.dataIndex:bt}function io(pt,bt){return bt?`${bt}-${pt}`:`${pt}`}function ao(pt,bt){return typeof pt=="function"?pt(bt):pt}function to(pt,bt){const $t=ao(pt,bt);return Object.prototype.toString.call($t)==="[object Object]"?"":$t}var Mo={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},Yo=Mo,Ho=ee(7657),La=function(bt,$t){return ce.createElement(Ho.Z,(0,ue.Z)({},bt,{ref:$t,icon:Yo}))},ha=ce.forwardRef(La),Ko=ha,Oo=ee(56762);function Wi(pt){const bt=ce.useRef(pt),$t=(0,Oo.Z)();return[()=>bt.current,Gt=>{bt.current=Gt,$t()}]}var ta=ee(3113),Zo=ee(24905),no=ee(38854),ti=ee(64165),Fi=ee(20834),Ii=ee(40875),Ci=ee(5112),ro=ee(17574),qi=ee(47472),Bo=ee(92832);function na(pt){let{value:bt,onChange:$t,filterSearch:Gt,tablePrefixCls:ln,locale:Ge}=pt;return Gt?ce.createElement("div",{className:`${ln}-filter-dropdown-search`},ce.createElement(Bo.default,{prefix:ce.createElement(qi.Z,null),placeholder:Ge.filterSearchPlaceholder,onChange:$t,value:bt,htmlSize:1,className:`${ln}-filter-dropdown-search-input`})):null}var ra=na,fa=ee(10228);const xo=pt=>{const{keyCode:bt}=pt;bt===fa.Z.ENTER&&pt.stopPropagation()};var ca=ce.forwardRef((pt,bt)=>ce.createElement("div",{className:pt.className,onClick:$t=>$t.stopPropagation(),onKeyDown:xo,ref:bt},pt.children));function ua(pt){let bt=[];return(pt||[]).forEach($t=>{let{value:Gt,children:ln}=$t;bt.push(Gt),ln&&(bt=[].concat((0,Yn.Z)(bt),(0,Yn.Z)(ua(ln))))}),bt}function ba(pt){return pt.some(bt=>{let{children:$t}=bt;return $t})}function da(pt,bt){return typeof bt=="string"||typeof bt=="number"?bt==null?void 0:bt.toString().toLowerCase().includes(pt.trim().toLowerCase()):!1}function xl(pt){let{filters:bt,prefixCls:$t,filteredKeys:Gt,filterMultiple:ln,searchValue:Ge,filterSearch:st}=pt;return bt.map((ht,Yt)=>{const en=String(ht.value);if(ht.children)return{key:en||Yt,label:ht.text,popupClassName:`${$t}-dropdown-submenu`,children:xl({filters:ht.children,prefixCls:$t,filteredKeys:Gt,filterMultiple:ln,searchValue:Ge,filterSearch:st})};const nn=ln?Zo.default:Ci.ZP,tn={key:ht.value!==void 0?en:Yt,label:ce.createElement(ce.Fragment,null,ce.createElement(nn,{checked:Gt.includes(en)}),ce.createElement("span",null,ht.text))};return Ge.trim()?typeof st=="function"?st(Ge,ht)?tn:null:da(Ge,ht.text)?tn:null:tn})}function Cs(pt){var bt,$t;const{tablePrefixCls:Gt,prefixCls:ln,column:Ge,dropdownPrefixCls:st,columnKey:ht,filterMultiple:Yt,filterMode:en="menu",filterSearch:nn=!1,filterState:tn,triggerFilter:mn,locale:_n,children:Dn,getPopupContainer:tr}=pt,{filterDropdownOpen:Hn,onFilterDropdownOpenChange:nr,filterResetToDefaultFilteredValue:jn,defaultFilteredValue:lr,filterDropdownVisible:ur,onFilterDropdownVisibleChange:qr}=Ge,[pr,Yr]=ce.useState(!1),wi=!!(tn&&(!((bt=tn.filteredKeys)===null||bt===void 0)&&bt.length||tn.forceFiltered)),ar=Mi=>{Yr(Mi),nr==null||nr(Mi),qr==null||qr(Mi)},Br=($t=Hn!=null?Hn:ur)!==null&&$t!==void 0?$t:pr,$n=tn==null?void 0:tn.filteredKeys,[rr,br]=Wi($n||[]),pi=Mi=>{let{selectedKeys:Ai}=Mi;br(Ai)},Ki=(Mi,Ai)=>{let{node:lo,checked:yo}=Ai;pi(Yt?{selectedKeys:Mi}:{selectedKeys:yo&&lo.key?[lo.key]:[]})};ce.useEffect(()=>{pr&&pi({selectedKeys:$n||[]})},[$n]);const[ir,gr]=ce.useState([]),oi=Mi=>{gr(Mi)},[xr,mi]=ce.useState(""),Di=Mi=>{const{value:Ai}=Mi.target;mi(Ai)};ce.useEffect(()=>{pr||mi("")},[pr]);const zi=Mi=>{const Ai=Mi&&Mi.length?Mi:null;if(Ai===null&&(!tn||!tn.filteredKeys)||(0,he.Z)(Ai,tn==null?void 0:tn.filteredKeys,!0))return null;mn({column:Ge,key:ht,filteredKeys:Ai})},zo=()=>{ar(!1),zi(rr())},Vi=function(){let{confirm:Mi,closeDropdown:Ai}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Mi&&zi([]),Ai&&ar(!1),mi(""),br(jn?(lr||[]).map(lo=>String(lo)):[])},Jo=function(){let{closeDropdown:Mi}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Mi&&ar(!1),zi(rr())},co=Mi=>{Mi&&$n!==void 0&&br($n||[]),ar(Mi),!Mi&&!Ge.filterDropdown&&zo()},Lo=ct()({[`${st}-menu-without-submenu`]:!ba(Ge.filters||[])}),Ro=Mi=>{if(Mi.target.checked){const Ai=ua(Ge==null?void 0:Ge.filters).map(lo=>String(lo));br(Ai)}else br([])},xi=Mi=>{let{filters:Ai}=Mi;return(Ai||[]).map((lo,yo)=>{const Ua=String(lo.value),Ta={title:lo.text,key:lo.value!==void 0?Ua:yo};return lo.children&&(Ta.children=xi({filters:lo.children})),Ta})},li=Mi=>{var Ai;return Object.assign(Object.assign({},Mi),{text:Mi.title,value:Mi.key,children:((Ai=Mi.children)===null||Ai===void 0?void 0:Ai.map(lo=>li(lo)))||[]})};let Ei;if(typeof Ge.filterDropdown=="function")Ei=Ge.filterDropdown({prefixCls:`${st}-custom`,setSelectedKeys:Mi=>pi({selectedKeys:Mi}),selectedKeys:rr(),confirm:Jo,clearFilters:Vi,filters:Ge.filters,visible:Br,close:()=>{ar(!1)}});else if(Ge.filterDropdown)Ei=Ge.filterDropdown;else{const Mi=rr()||[],Ai=()=>(Ge.filters||[]).length===0?ce.createElement(ti.Z,{image:ti.Z.PRESENTED_IMAGE_SIMPLE,description:_n.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):en==="tree"?ce.createElement(ce.Fragment,null,ce.createElement(ra,{filterSearch:nn,value:xr,onChange:Di,tablePrefixCls:Gt,locale:_n}),ce.createElement("div",{className:`${Gt}-filter-dropdown-tree`},Yt?ce.createElement(Zo.default,{checked:Mi.length===ua(Ge.filters).length,indeterminate:Mi.length>0&&Mi.length<ua(Ge.filters).length,className:`${Gt}-filter-dropdown-checkall`,onChange:Ro},_n.filterCheckall):null,ce.createElement(ro.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:Yt,checkStrictly:!Yt,className:`${st}-menu`,onCheck:Ki,checkedKeys:Mi,selectedKeys:Mi,showIcon:!1,treeData:xi({filters:Ge.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:xr.trim()?yo=>typeof nn=="function"?nn(xr,li(yo)):da(xr,yo.title):void 0}))):ce.createElement(ce.Fragment,null,ce.createElement(ra,{filterSearch:nn,value:xr,onChange:Di,tablePrefixCls:Gt,locale:_n}),ce.createElement(Fi.default,{selectable:!0,multiple:Yt,prefixCls:`${st}-menu`,className:Lo,onSelect:pi,onDeselect:pi,selectedKeys:Mi,getPopupContainer:tr,openKeys:ir,onOpenChange:oi,items:xl({filters:Ge.filters||[],filterSearch:nn,prefixCls:ln,filteredKeys:rr(),filterMultiple:Yt,searchValue:xr})})),lo=()=>jn?(0,he.Z)((lr||[]).map(yo=>String(yo)),Mi,!0):Mi.length===0;Ei=ce.createElement(ce.Fragment,null,Ai(),ce.createElement("div",{className:`${ln}-dropdown-btns`},ce.createElement(ta.ZP,{type:"link",size:"small",disabled:lo(),onClick:()=>Vi()},_n.filterReset),ce.createElement(ta.ZP,{type:"primary",size:"small",onClick:zo},_n.filterConfirm)))}Ge.filterDropdown&&(Ei=ce.createElement(Ii.J,{selectable:void 0},Ei));const Oi=()=>ce.createElement(ca,{className:`${ln}-dropdown`},Ei);let fi;typeof Ge.filterIcon=="function"?fi=Ge.filterIcon(wi):Ge.filterIcon?fi=Ge.filterIcon:fi=ce.createElement(Ko,null);const{direction:So}=ce.useContext(mo.E_);return ce.createElement("div",{className:`${ln}-column`},ce.createElement("span",{className:`${Gt}-column-title`},Dn),ce.createElement(no.Z,{dropdownRender:Oi,trigger:["click"],open:Br,onOpenChange:co,getPopupContainer:tr,placement:So==="rtl"?"bottomLeft":"bottomRight"},ce.createElement("span",{role:"button",tabIndex:-1,className:ct()(`${ln}-trigger`,{active:wi}),onClick:Mi=>{Mi.stopPropagation()}},fi)))}var ws=Cs;function Ja(pt,bt,$t){let Gt=[];return(pt||[]).forEach((ln,Ge)=>{var st;const ht=io(Ge,$t);if(ln.filters||"filterDropdown"in ln||"onFilter"in ln)if("filteredValue"in ln){let Yt=ln.filteredValue;"filterDropdown"in ln||(Yt=(st=Yt==null?void 0:Yt.map(String))!==null&&st!==void 0?st:Yt),Gt.push({column:ln,key:eo(ln,ht),filteredKeys:Yt,forceFiltered:ln.filtered})}else Gt.push({column:ln,key:eo(ln,ht),filteredKeys:bt&&ln.defaultFilteredValue?ln.defaultFilteredValue:void 0,forceFiltered:ln.filtered});"children"in ln&&(Gt=[].concat((0,Yn.Z)(Gt),(0,Yn.Z)(Ja(ln.children,bt,ht))))}),Gt}function Sl(pt,bt,$t,Gt,ln,Ge,st,ht){return $t.map((Yt,en)=>{const nn=io(en,ht),{filterMultiple:tn=!0,filterMode:mn,filterSearch:_n}=Yt;let Dn=Yt;if(Dn.filters||Dn.filterDropdown){const tr=eo(Dn,nn),Hn=Gt.find(nr=>{let{key:jn}=nr;return tr===jn});Dn=Object.assign(Object.assign({},Dn),{title:nr=>ce.createElement(ws,{tablePrefixCls:pt,prefixCls:`${pt}-filter`,dropdownPrefixCls:bt,column:Dn,columnKey:tr,filterState:Hn,filterMultiple:tn,filterMode:mn,filterSearch:_n,triggerFilter:Ge,locale:ln,getPopupContainer:st},ao(Yt.title,nr))})}return"children"in Dn&&(Dn=Object.assign(Object.assign({},Dn),{children:Sl(pt,bt,Dn.children,Gt,ln,Ge,st,nn)})),Dn})}function Es(pt){const bt={};return pt.forEach($t=>{let{key:Gt,filteredKeys:ln,column:Ge}=$t;const{filters:st,filterDropdown:ht}=Ge;if(ht)bt[Gt]=ln||null;else if(Array.isArray(ln)){const Yt=ua(st);bt[Gt]=Yt.filter(en=>ln.includes(String(en)))}else bt[Gt]=null}),bt}function Pa(pt,bt){return bt.reduce(($t,Gt)=>{const{column:{onFilter:ln,filters:Ge},filteredKeys:st}=Gt;return ln&&st&&st.length?$t.filter(ht=>st.some(Yt=>{const en=ua(Ge),nn=en.findIndex(mn=>String(mn)===String(Yt)),tn=nn!==-1?en[nn]:Yt;return ln(tn,ht)})):$t},pt)}const Da=pt=>pt.flatMap(bt=>"children"in bt?[bt].concat((0,Yn.Z)(Da(bt.children||[]))):[bt]);function Xs(pt){let{prefixCls:bt,dropdownPrefixCls:$t,mergedColumns:Gt,onFilterChange:ln,getPopupContainer:Ge,locale:st}=pt;const ht=ce.useMemo(()=>Da(Gt||[]),[Gt]),[Yt,en]=ce.useState(()=>Ja(ht,!0)),nn=ce.useMemo(()=>{const Dn=Ja(ht,!1);if(Dn.length===0)return Dn;let tr=!0,Hn=!0;if(Dn.forEach(nr=>{let{filteredKeys:jn}=nr;jn!==void 0?tr=!1:Hn=!1}),tr){const nr=(ht||[]).map((jn,lr)=>eo(jn,io(lr)));return Yt.filter(jn=>{let{key:lr}=jn;return nr.includes(lr)}).map(jn=>{const lr=ht[nr.findIndex(ur=>ur===jn.key)];return Object.assign(Object.assign({},jn),{column:Object.assign(Object.assign({},jn.column),lr),forceFiltered:lr.filtered})})}return Dn},[ht,Yt]),tn=ce.useMemo(()=>Es(nn),[nn]),mn=Dn=>{const tr=nn.filter(Hn=>{let{key:nr}=Hn;return nr!==Dn.key});tr.push(Dn),en(tr),ln(Es(tr),tr)};return[Dn=>Sl(bt,$t,Dn,nn,st,mn,Ge),nn,tn]}var Zs=Xs;function Ps(pt,bt,$t){const Gt=ce.useRef({});function ln(Ge){if(!Gt.current||Gt.current.data!==pt||Gt.current.childrenColumnName!==bt||Gt.current.getRowKey!==$t){let ht=function(Yt){Yt.forEach((en,nn)=>{const tn=$t(en,nn);st.set(tn,en),en&&typeof en=="object"&&bt in en&&ht(en[bt]||[])})};const st=new Map;ht(pt),Gt.current={data:pt,childrenColumnName:bt,kvMap:st,getRowKey:$t}}return Gt.current.kvMap.get(Ge)}return[ln]}var ul=ee(50371),Ns=function(pt,bt){var $t={};for(var Gt in pt)Object.prototype.hasOwnProperty.call(pt,Gt)&&bt.indexOf(Gt)<0&&($t[Gt]=pt[Gt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ln=0,Gt=Object.getOwnPropertySymbols(pt);ln<Gt.length;ln++)bt.indexOf(Gt[ln])<0&&Object.prototype.propertyIsEnumerable.call(pt,Gt[ln])&&($t[Gt[ln]]=pt[Gt[ln]]);return $t};const _a=10;function qa(pt,bt){const $t={current:pt.current,pageSize:pt.pageSize};return Object.keys(bt&&typeof bt=="object"?bt:{}).forEach(ln=>{const Ge=pt[ln];typeof Ge!="function"&&($t[ln]=Ge)}),$t}function Wo(pt,bt,$t){const Gt=$t&&typeof $t=="object"?$t:{},{total:ln=0}=Gt,Ge=Ns(Gt,["total"]),[st,ht]=(0,ce.useState)(()=>({current:"defaultCurrent"in Ge?Ge.defaultCurrent:1,pageSize:"defaultPageSize"in Ge?Ge.defaultPageSize:_a})),Yt=(0,ul.Z)(st,Ge,{total:ln>0?ln:pt}),en=Math.ceil((ln||pt)/Yt.pageSize);Yt.current>en&&(Yt.current=en||1);const nn=(mn,_n)=>{ht({current:mn!=null?mn:1,pageSize:_n||Yt.pageSize})},tn=(mn,_n)=>{var Dn;$t&&((Dn=$t.onChange)===null||Dn===void 0||Dn.call($t,mn,_n)),nn(mn,_n),bt(mn,_n||(Yt==null?void 0:Yt.pageSize))};return $t===!1?[{},()=>{}]:[Object.assign(Object.assign({},Yt),{onChange:tn}),nn]}var Js=Wo,Cl=ee(84105),qs=ee(35654),wo=ee(90782),so=ee(71430),ia=ee(18929);const va={},oa="SELECT_ALL",za="SELECT_INVERT",$a="SELECT_NONE",hs=[],Wa=(pt,bt)=>{let $t=[];return(bt||[]).forEach(Gt=>{$t.push(Gt),Gt&&typeof Gt=="object"&&pt in Gt&&($t=[].concat((0,Yn.Z)($t),(0,Yn.Z)(Wa(pt,Gt[pt]))))}),$t};var ks=(pt,bt)=>{const{preserveSelectedRowKeys:$t,selectedRowKeys:Gt,defaultSelectedRowKeys:ln,getCheckboxProps:Ge,onChange:st,onSelect:ht,onSelectAll:Yt,onSelectInvert:en,onSelectNone:nn,onSelectMultiple:tn,columnWidth:mn,type:_n,selections:Dn,fixed:tr,renderCell:Hn,hideSelectAll:nr,checkStrictly:jn=!0}=bt||{},{prefixCls:lr,data:ur,pageData:qr,getRecordByKey:pr,getRowKey:Yr,expandType:wi,childrenColumnName:ar,locale:Br,getPopupContainer:$n}=pt,[rr,br]=(0,ia.Z)(Gt||ln||hs,{value:Gt}),pi=ce.useRef(new Map),Ki=(0,ce.useCallback)(li=>{if($t){const Ei=new Map;li.forEach(Oi=>{let fi=pr(Oi);!fi&&pi.current.has(Oi)&&(fi=pi.current.get(Oi)),Ei.set(Oi,fi)}),pi.current=Ei}},[pr,$t]);ce.useEffect(()=>{Ki(rr)},[rr]);const{keyEntities:ir}=(0,ce.useMemo)(()=>{if(jn)return{keyEntities:null};let li=ur;if($t){const Ei=new Set(ur.map((fi,So)=>Yr(fi,So))),Oi=Array.from(pi.current).reduce((fi,So)=>{let[Mi,Ai]=So;return Ei.has(Mi)?fi:fi.concat(Ai)},[]);li=[].concat((0,Yn.Z)(li),(0,Yn.Z)(Oi))}return(0,so.I8)(li,{externalGetKey:Yr,childrenPropName:ar})},[ur,Yr,jn,ar,$t]),gr=(0,ce.useMemo)(()=>Wa(ar,qr),[ar,qr]),oi=(0,ce.useMemo)(()=>{const li=new Map;return gr.forEach((Ei,Oi)=>{const fi=Yr(Ei,Oi),So=(Ge?Ge(Ei):null)||{};li.set(fi,So)}),li},[gr,Yr,Ge]),xr=(0,ce.useCallback)(li=>{var Ei;return!!(!((Ei=oi.get(Yr(li)))===null||Ei===void 0)&&Ei.disabled)},[oi,Yr]),[mi,Di]=(0,ce.useMemo)(()=>{if(jn)return[rr||[],[]];const{checkedKeys:li,halfCheckedKeys:Ei}=(0,wo.S)(rr,!0,ir,xr);return[li||[],Ei]},[rr,jn,ir,xr]),zi=(0,ce.useMemo)(()=>{const li=_n==="radio"?mi.slice(0,1):mi;return new Set(li)},[mi,_n]),zo=(0,ce.useMemo)(()=>_n==="radio"?new Set:new Set(Di),[Di,_n]),[Vi,Jo]=(0,ce.useState)(null);ce.useEffect(()=>{bt||br(hs)},[!!bt]);const co=(0,ce.useCallback)((li,Ei)=>{let Oi,fi;Ki(li),$t?(Oi=li,fi=li.map(So=>pi.current.get(So))):(Oi=[],fi=[],li.forEach(So=>{const Mi=pr(So);Mi!==void 0&&(Oi.push(So),fi.push(Mi))})),br(Oi),st==null||st(Oi,fi,{type:Ei})},[br,pr,st,$t]),Lo=(0,ce.useCallback)((li,Ei,Oi,fi)=>{if(ht){const So=Oi.map(Mi=>pr(Mi));ht(pr(li),Ei,So,fi)}co(Oi,"single")},[ht,pr,co]),Ro=(0,ce.useMemo)(()=>!Dn||nr?null:(Dn===!0?[oa,za,$a]:Dn).map(Ei=>Ei===oa?{key:"all",text:Br.selectionAll,onSelect(){co(ur.map((Oi,fi)=>Yr(Oi,fi)).filter(Oi=>{const fi=oi.get(Oi);return!(fi!=null&&fi.disabled)||zi.has(Oi)}),"all")}}:Ei===za?{key:"invert",text:Br.selectInvert,onSelect(){const Oi=new Set(zi);qr.forEach((So,Mi)=>{const Ai=Yr(So,Mi),lo=oi.get(Ai);lo!=null&&lo.disabled||(Oi.has(Ai)?Oi.delete(Ai):Oi.add(Ai))});const fi=Array.from(Oi);en&&en(fi),co(fi,"invert")}}:Ei===$a?{key:"none",text:Br.selectNone,onSelect(){nn==null||nn(),co(Array.from(zi).filter(Oi=>{const fi=oi.get(Oi);return fi==null?void 0:fi.disabled}),"none")}}:Ei).map(Ei=>Object.assign(Object.assign({},Ei),{onSelect:function(){for(var Oi,fi,So=arguments.length,Mi=new Array(So),Ai=0;Ai<So;Ai++)Mi[Ai]=arguments[Ai];(fi=Ei.onSelect)===null||fi===void 0||(Oi=fi).call.apply(Oi,[Ei].concat(Mi)),Jo(null)}})),[Dn,zi,qr,Yr,en,co]);return[(0,ce.useCallback)(li=>{var Ei;if(!bt)return li.filter(fo=>fo!==va);let Oi=(0,Yn.Z)(li);const fi=new Set(zi),So=gr.map(Yr).filter(fo=>!oi.get(fo).disabled),Mi=So.every(fo=>fi.has(fo)),Ai=So.some(fo=>fi.has(fo)),lo=()=>{const fo=[];Mi?So.forEach(Eo=>{fi.delete(Eo),fo.push(Eo)}):So.forEach(Eo=>{fi.has(Eo)||(fi.add(Eo),fo.push(Eo))});const Tr=Array.from(fi);Yt==null||Yt(!Mi,Tr.map(Eo=>pr(Eo)),fo.map(Eo=>pr(Eo))),co(Tr,"all"),Jo(null)};let yo;if(_n!=="radio"){let fo;if(Ro){const Zi={getPopupContainer:$n,items:Ro.map(($o,es)=>{const{key:Us,text:Ll,onSelect:As}=$o;return{key:Us!=null?Us:es,onClick:()=>{As==null||As(So)},label:Ll}})};fo=ce.createElement("div",{className:`${lr}-selection-extra`},ce.createElement(no.Z,{menu:Zi,getPopupContainer:$n},ce.createElement("span",null,ce.createElement(Cl.Z,null))))}const Tr=gr.map((Zi,$o)=>{const es=Yr(Zi,$o),Us=oi.get(es)||{};return Object.assign({checked:fi.has(es)},Us)}).filter(Zi=>{let{disabled:$o}=Zi;return $o}),Eo=!!Tr.length&&Tr.length===gr.length,aa=Eo&&Tr.every(Zi=>{let{checked:$o}=Zi;return $o}),Oa=Eo&&Tr.some(Zi=>{let{checked:$o}=Zi;return $o});yo=!nr&&ce.createElement("div",{className:`${lr}-selection`},ce.createElement(Zo.default,{checked:Eo?aa:!!gr.length&&Mi,indeterminate:Eo?!aa&&Oa:!Mi&&Ai,onChange:lo,disabled:gr.length===0||Eo,"aria-label":fo?"Custom selection":"Select all",skipGroup:!0}),fo)}let Ua;_n==="radio"?Ua=(fo,Tr,Eo)=>{const aa=Yr(Tr,Eo),Oa=fi.has(aa);return{node:ce.createElement(Ci.ZP,Object.assign({},oi.get(aa),{checked:Oa,onClick:Zi=>Zi.stopPropagation(),onChange:Zi=>{fi.has(aa)||Lo(aa,!0,[aa],Zi.nativeEvent)}})),checked:Oa}}:Ua=(fo,Tr,Eo)=>{var aa;const Oa=Yr(Tr,Eo),Zi=fi.has(Oa),$o=zo.has(Oa),es=oi.get(Oa);let Us;return wi==="nest"?Us=$o:Us=(aa=es==null?void 0:es.indeterminate)!==null&&aa!==void 0?aa:$o,{node:ce.createElement(Zo.default,Object.assign({},es,{indeterminate:Us,checked:Zi,skipGroup:!0,onClick:Ll=>Ll.stopPropagation(),onChange:Ll=>{let{nativeEvent:As}=Ll;const{shiftKey:as}=As;let vl=-1,ss=-1;if(as&&jn){const Is=new Set([Vi,Oa]);So.some((ms,ga)=>{if(Is.has(ms))if(vl===-1)vl=ga;else return ss=ga,!0;return!1})}if(ss!==-1&&vl!==ss&&jn){const Is=So.slice(vl,ss+1),ms=[];Zi?Is.forEach(ya=>{fi.has(ya)&&(ms.push(ya),fi.delete(ya))}):Is.forEach(ya=>{fi.has(ya)||(ms.push(ya),fi.add(ya))});const ga=Array.from(fi);tn==null||tn(!Zi,ga.map(ya=>pr(ya)),ms.map(ya=>pr(ya))),co(ga,"multiple")}else{const Is=mi;if(jn){const ms=Zi?(0,qs._5)(Is,Oa):(0,qs.L0)(Is,Oa);Lo(Oa,!Zi,ms,As)}else{const ms=(0,wo.S)([].concat((0,Yn.Z)(Is),[Oa]),!0,ir,xr),{checkedKeys:ga,halfCheckedKeys:ya}=ms;let _s=ga;if(Zi){const Fl=new Set(ga);Fl.delete(Oa),_s=(0,wo.S)(Array.from(Fl),{checked:!1,halfCheckedKeys:ya},ir,xr).checkedKeys}Lo(Oa,!Zi,_s,As)}}Jo(Zi?null:Oa)}})),checked:Zi}};const Ta=(fo,Tr,Eo)=>{const{node:aa,checked:Oa}=Ua(fo,Tr,Eo);return Hn?Hn(Oa,Tr,Eo,aa):aa};if(!Oi.includes(va))if(Oi.findIndex(fo=>{var Tr;return((Tr=fo[_r])===null||Tr===void 0?void 0:Tr.columnType)==="EXPAND_COLUMN"})===0){const[fo,...Tr]=Oi;Oi=[fo,va].concat((0,Yn.Z)(Tr))}else Oi=[va].concat((0,Yn.Z)(Oi));const Gi=Oi.indexOf(va);Oi=Oi.filter((fo,Tr)=>fo!==va||Tr===Gi);const uo=Oi[Gi-1],pa=Oi[Gi+1];let Po=tr;Po===void 0&&((pa==null?void 0:pa.fixed)!==void 0?Po=pa.fixed:(uo==null?void 0:uo.fixed)!==void 0&&(Po=uo.fixed)),Po&&uo&&((Ei=uo[_r])===null||Ei===void 0?void 0:Ei.columnType)==="EXPAND_COLUMN"&&uo.fixed===void 0&&(uo.fixed=Po);const bo=ct()(`${lr}-selection-col`,{[`${lr}-selection-col-with-dropdown`]:Dn&&_n==="checkbox"}),os={fixed:Po,width:mn,className:`${lr}-selection-column`,title:bt.columnTitle||yo,render:Ta,onCell:bt.onCell,[_r]:{className:bo}};return Oi.map(fo=>fo===va?os:fo)},[Yr,gr,bt,mi,zi,zo,mn,Ro,wi,Vi,oi,tn,Lo,xr]),zi]},Na=ee(89489),mc=ee(59477),dl=ee(6848);const hl="ascend",Ol="descend";function Rl(pt){return typeof pt.sorter=="object"&&typeof pt.sorter.multiple=="number"?pt.sorter.multiple:!1}function wl(pt){return typeof pt=="function"?pt:pt&&typeof pt=="object"&&pt.compare?pt.compare:!1}function vc(pt,bt){return bt?pt[pt.indexOf(bt)+1]:pt[0]}function il(pt,bt,$t){let Gt=[];function ln(Ge,st){Gt.push({column:Ge,key:eo(Ge,st),multiplePriority:Rl(Ge),sortOrder:Ge.sortOrder})}return(pt||[]).forEach((Ge,st)=>{const ht=io(st,$t);Ge.children?("sortOrder"in Ge&&ln(Ge,ht),Gt=[].concat((0,Yn.Z)(Gt),(0,Yn.Z)(il(Ge.children,bt,ht)))):Ge.sorter&&("sortOrder"in Ge?ln(Ge,ht):bt&&Ge.defaultSortOrder&&Gt.push({column:Ge,key:eo(Ge,ht),multiplePriority:Rl(Ge),sortOrder:Ge.defaultSortOrder}))}),Gt}function oc(pt,bt,$t,Gt,ln,Ge,st,ht){return(bt||[]).map((Yt,en)=>{const nn=io(en,ht);let tn=Yt;if(tn.sorter){const mn=tn.sortDirections||ln,_n=tn.showSorterTooltip===void 0?st:tn.showSorterTooltip,Dn=eo(tn,nn),tr=$t.find(wi=>{let{key:ar}=wi;return ar===Dn}),Hn=tr?tr.sortOrder:null,nr=vc(mn,Hn);let jn;if(Yt.sortIcon)jn=Yt.sortIcon({sortOrder:Hn});else{const wi=mn.includes(hl)&&ce.createElement(mc.Z,{className:ct()(`${pt}-column-sorter-up`,{active:Hn===hl})}),ar=mn.includes(Ol)&&ce.createElement(Na.Z,{className:ct()(`${pt}-column-sorter-down`,{active:Hn===Ol})});jn=ce.createElement("span",{className:ct()(`${pt}-column-sorter`,{[`${pt}-column-sorter-full`]:!!(wi&&ar)})},ce.createElement("span",{className:`${pt}-column-sorter-inner`,"aria-hidden":"true"},wi,ar))}const{cancelSort:lr,triggerAsc:ur,triggerDesc:qr}=Ge||{};let pr=lr;nr===Ol?pr=qr:nr===hl&&(pr=ur);const Yr=typeof _n=="object"?_n:{title:pr};tn=Object.assign(Object.assign({},tn),{className:ct()(tn.className,{[`${pt}-column-sort`]:Hn}),title:wi=>{const ar=ce.createElement("div",{className:`${pt}-column-sorters`},ce.createElement("span",{className:`${pt}-column-title`},ao(Yt.title,wi)),jn);return _n?ce.createElement(dl.Z,Object.assign({},Yr),ar):ar},onHeaderCell:wi=>{const ar=Yt.onHeaderCell&&Yt.onHeaderCell(wi)||{},Br=ar.onClick,$n=ar.onKeyDown;ar.onClick=pi=>{Gt({column:Yt,key:Dn,sortOrder:nr,multiplePriority:Rl(Yt)}),Br==null||Br(pi)},ar.onKeyDown=pi=>{pi.keyCode===fa.Z.ENTER&&(Gt({column:Yt,key:Dn,sortOrder:nr,multiplePriority:Rl(Yt)}),$n==null||$n(pi))};const rr=to(Yt.title,{}),br=rr==null?void 0:rr.toString();return Hn?ar["aria-sort"]=Hn==="ascend"?"ascending":"descending":ar["aria-label"]=br||"",ar.className=ct()(ar.className,`${pt}-column-has-sorters`),ar.tabIndex=0,Yt.ellipsis&&(ar.title=(rr!=null?rr:"").toString()),ar}})}return"children"in tn&&(tn=Object.assign(Object.assign({},tn),{children:oc(pt,tn.children,$t,Gt,ln,Ge,st,nn)})),tn})}function ol(pt){const{column:bt,sortOrder:$t}=pt;return{column:bt,order:$t,field:bt.dataIndex,columnKey:bt.key}}function fl(pt){const bt=pt.filter($t=>{let{sortOrder:Gt}=$t;return Gt}).map(ol);return bt.length===0&&pt.length?Object.assign(Object.assign({},ol(pt[pt.length-1])),{column:void 0}):bt.length<=1?bt[0]||{}:bt}function To(pt,bt,$t){const Gt=bt.slice().sort((st,ht)=>ht.multiplePriority-st.multiplePriority),ln=pt.slice(),Ge=Gt.filter(st=>{let{column:{sorter:ht},sortOrder:Yt}=st;return wl(ht)&&Yt});return Ge.length?ln.sort((st,ht)=>{for(let Yt=0;Yt<Ge.length;Yt+=1){const en=Ge[Yt],{column:{sorter:nn},sortOrder:tn}=en,mn=wl(nn);if(mn&&tn){const _n=mn(st,ht,tn);if(_n!==0)return tn===hl?_n:-_n}}return 0}).map(st=>{const ht=st[$t];return ht?Object.assign(Object.assign({},st),{[$t]:To(ht,bt,$t)}):st}):ln}function Uo(pt){let{prefixCls:bt,mergedColumns:$t,onSorterChange:Gt,sortDirections:ln,tableLocale:Ge,showSorterTooltip:st}=pt;const[ht,Yt]=ce.useState(il($t,!0)),en=ce.useMemo(()=>{let Dn=!0;const tr=il($t,!1);if(!tr.length)return ht;const Hn=[];function nr(lr){Dn?Hn.push(lr):Hn.push(Object.assign(Object.assign({},lr),{sortOrder:null}))}let jn=null;return tr.forEach(lr=>{jn===null?(nr(lr),lr.sortOrder&&(lr.multiplePriority===!1?Dn=!1:jn=!0)):(jn&&lr.multiplePriority!==!1||(Dn=!1),nr(lr))}),Hn},[$t,ht]),nn=ce.useMemo(()=>{const Dn=en.map(tr=>{let{column:Hn,sortOrder:nr}=tr;return{column:Hn,order:nr}});return{sortColumns:Dn,sortColumn:Dn[0]&&Dn[0].column,sortOrder:Dn[0]&&Dn[0].order}},[en]);function tn(Dn){let tr;Dn.multiplePriority===!1||!en.length||en[0].multiplePriority===!1?tr=[Dn]:tr=[].concat((0,Yn.Z)(en.filter(Hn=>{let{key:nr}=Hn;return nr!==Dn.key})),[Dn]),Yt(tr),Gt(fl(tr),tr)}return[Dn=>oc(bt,Dn,en,tn,ln,Ge,st),en,nn,()=>fl(en)]}function Xo(pt,bt){return pt.map($t=>{const Gt=Object.assign({},$t);return Gt.title=ao($t.title,bt),"children"in Gt&&(Gt.children=Xo(Gt.children,bt)),Gt})}function fs(pt){return[ce.useCallback($t=>Xo($t,pt),[pt])]}var ja=$r((pt,bt)=>{const{_renderTimes:$t}=pt,{_renderTimes:Gt}=bt;return $t!==Gt}),Ws=jr((pt,bt)=>{const{_renderTimes:$t}=pt,{_renderTimes:Gt}=bt;return $t!==Gt}),is=ee(64993),Ba=ee(17313),Aa=ee(83116),Qs=ee(37613),Pl=pt=>{const{componentCls:bt}=pt,$t=`${pt.lineWidth}px ${pt.lineType} ${pt.tableBorderColor}`,Gt=(ln,Ge,st)=>({[`&${bt}-${ln}`]:{[`> ${bt}-container`]:{[`> ${bt}-content, > ${bt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${bt}-expanded-row-fixed`]:{margin:`-${Ge}px -${st+pt.lineWidth}px`}}}}}});return{[`${bt}-wrapper`]:{[`${bt}${bt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${bt}-title`]:{border:$t,borderBottom:0},[`> ${bt}-container`]:{borderInlineStart:$t,borderTop:$t,[`
> ${bt}-content,
> ${bt}-header,
> ${bt}-body,
> ${bt}-summary
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:$t},"> thead":{"> tr:not(:last-child) > th":{borderBottom:$t},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${bt}-cell-fix-right-first::after`]:{borderInlineEnd:$t}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${bt}-expanded-row-fixed`]:{margin:`-${pt.tablePaddingVertical}px -${pt.tablePaddingHorizontal+pt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:pt.lineWidth,bottom:0,borderInlineEnd:$t,content:'""'}}}}}},[`&${bt}-scroll-horizontal`]:{[`> ${bt}-container > ${bt}-body`]:{"> table > tbody":{[`
> tr${bt}-expanded-row,
> tr${bt}-placeholder
`]:{"> th, > td":{borderInlineEnd:0}}}}}},Gt("middle",pt.tablePaddingVerticalMiddle,pt.tablePaddingHorizontalMiddle)),Gt("small",pt.tablePaddingVerticalSmall,pt.tablePaddingHorizontalSmall)),{[`> ${bt}-footer`]:{border:$t,borderTop:0}}),[`${bt}-cell`]:{[`${bt}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${pt.lineWidth}px 0 ${pt.lineWidth}px ${pt.tableHeaderBg}`}},[`${bt}-bordered ${bt}-cell-scrollbar`]:{borderInlineEnd:$t}}}},al=pt=>{const{componentCls:bt}=pt;return{[`${bt}-wrapper`]:{[`${bt}-cell-ellipsis`]:Object.assign(Object.assign({},Ba.vS),{wordBreak:"keep-all",[`
&${bt}-cell-fix-left-last,
&${bt}-cell-fix-right-first
`]:{overflow:"visible",[`${bt}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${bt}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Qc=pt=>{const{componentCls:bt}=pt;return{[`${bt}-wrapper`]:{[`${bt}-tbody > tr${bt}-placeholder`]:{textAlign:"center",color:pt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:pt.colorBgContainer}}}}},gc=ee(15969),Ac=pt=>{const{componentCls:bt,antCls:$t,controlInteractiveSize:Gt,motionDurationSlow:ln,lineWidth:Ge,paddingXS:st,lineType:ht,tableBorderColor:Yt,tableExpandIconBg:en,tableExpandColumnWidth:nn,borderRadius:tn,fontSize:mn,fontSizeSM:_n,lineHeight:Dn,tablePaddingVertical:tr,tablePaddingHorizontal:Hn,tableExpandedRowBg:nr,paddingXXS:jn}=pt,lr=Gt/2-Ge,ur=lr*2+Ge*3,qr=`${Ge}px ${ht} ${Yt}`,pr=jn-Ge;return{[`${bt}-wrapper`]:{[`${bt}-expand-icon-col`]:{width:nn},[`${bt}-row-expand-icon-cell`]:{textAlign:"center",[`${bt}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${bt}-row-indent`]:{height:1,float:"left"},[`${bt}-row-expand-icon`]:Object.assign(Object.assign({},(0,gc.N)(pt)),{position:"relative",float:"left",boxSizing:"border-box",width:ur,height:ur,padding:0,color:"inherit",lineHeight:`${ur}px`,background:en,border:qr,borderRadius:tn,transform:`scale(${Gt/ur})`,transition:`all ${ln}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${ln} ease-out`,content:'""'},"&::before":{top:lr,insetInlineEnd:pr,insetInlineStart:pr,height:Ge},"&::after":{top:pr,bottom:pr,insetInlineStart:lr,width:Ge,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${bt}-row-indent + ${bt}-row-expand-icon`]:{marginTop:(mn*Dn-Ge*3)/2-Math.ceil((_n*1.4-Ge*3)/2),marginInlineEnd:st},[`tr${bt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:nr}},[`${$t}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${bt}-expanded-row-fixed`]:{position:"relative",margin:`-${tr}px -${Hn}px`,padding:`${tr}px ${Hn}px`}}}},Ic=pt=>{const{componentCls:bt,antCls:$t,iconCls:Gt,tableFilterDropdownWidth:ln,tableFilterDropdownSearchWidth:Ge,paddingXXS:st,paddingXS:ht,colorText:Yt,lineWidth:en,lineType:nn,tableBorderColor:tn,tableHeaderIconColor:mn,fontSizeSM:_n,tablePaddingHorizontal:Dn,borderRadius:tr,motionDurationSlow:Hn,colorTextDescription:nr,colorPrimary:jn,tableHeaderFilterActiveBg:lr,colorTextDisabled:ur,tableFilterDropdownBg:qr,tableFilterDropdownHeight:pr,controlItemBgHover:Yr,controlItemBgActive:wi,boxShadowSecondary:ar,filterDropdownMenuBg:Br}=pt,$n=`${$t}-dropdown`,rr=`${bt}-filter-dropdown`,br=`${$t}-tree`,pi=`${en}px ${nn} ${tn}`;return[{[`${bt}-wrapper`]:{[`${bt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${bt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-st,marginInline:`${st}px ${-Dn/2}px`,padding:`0 ${st}px`,color:mn,fontSize:_n,borderRadius:tr,cursor:"pointer",transition:`all ${Hn}`,"&:hover":{color:nr,background:lr},"&.active":{color:jn}}}},{[`${$t}-dropdown`]:{[rr]:Object.assign(Object.assign({},(0,Ba.Wf)(pt)),{minWidth:ln,backgroundColor:qr,borderRadius:tr,boxShadow:ar,overflow:"hidden",[`${$n}-menu`]:{maxHeight:pr,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Br,"&:empty::after":{display:"block",padding:`${ht}px 0`,color:ur,fontSize:_n,textAlign:"center",content:'"Not Found"'}},[`${rr}-tree`]:{paddingBlock:`${ht}px 0`,paddingInline:ht,[br]:{padding:0},[`${br}-treenode ${br}-node-content-wrapper:hover`]:{backgroundColor:Yr},[`${br}-treenode-checkbox-checked ${br}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:wi}}},[`${rr}-search`]:{padding:ht,borderBottom:pi,"&-input":{input:{minWidth:Ge},[Gt]:{color:ur}}},[`${rr}-checkall`]:{width:"100%",marginBottom:st,marginInlineStart:st},[`${rr}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${ht-en}px ${ht}px`,overflow:"hidden",borderTop:pi}})}},{[`${$t}-dropdown ${rr}, ${rr}-submenu`]:{[`${$t}-checkbox-wrapper + span`]:{paddingInlineStart:ht,color:Yt},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},El=pt=>{const{componentCls:bt,lineWidth:$t,colorSplit:Gt,motionDurationSlow:ln,zIndexTableFixed:Ge,tableBg:st,zIndexTableSticky:ht}=pt,Yt=Gt;return{[`${bt}-wrapper`]:{[`
${bt}-cell-fix-left,
${bt}-cell-fix-right
`]:{position:"sticky !important",zIndex:Ge,background:st},[`
${bt}-cell-fix-left-first::after,
${bt}-cell-fix-left-last::after
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-$t,width:30,transform:"translateX(100%)",transition:`box-shadow ${ln}`,content:'""',pointerEvents:"none"},[`${bt}-cell-fix-left-all::after`]:{display:"none"},[`
${bt}-cell-fix-right-first::after,
${bt}-cell-fix-right-last::after
`]:{position:"absolute",top:0,bottom:-$t,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${ln}`,content:'""',pointerEvents:"none"},[`${bt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:ht+1,width:30,transition:`box-shadow ${ln}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${bt}-ping-left`]:{[`&:not(${bt}-has-fix-left) ${bt}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${Yt}`}},[`
${bt}-cell-fix-left-first::after,
${bt}-cell-fix-left-last::after
`]:{boxShadow:`inset 10px 0 8px -8px ${Yt}`},[`${bt}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${bt}-ping-right`]:{[`&:not(${bt}-has-fix-right) ${bt}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${Yt}`}},[`
${bt}-cell-fix-right-first::after,
${bt}-cell-fix-right-last::after
`]:{boxShadow:`inset -10px 0 8px -8px ${Yt}`}}}}},du=pt=>{const{componentCls:bt,antCls:$t}=pt;return{[`${bt}-wrapper`]:{[`${bt}-pagination${$t}-pagination`]:{margin:`${pt.margin}px 0`},[`${bt}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:pt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Ml=pt=>{const{componentCls:bt,tableRadius:$t}=pt;return{[`${bt}-wrapper`]:{[bt]:{[`${bt}-title, ${bt}-header`]:{borderRadius:`${$t}px ${$t}px 0 0`},[`${bt}-title + ${bt}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${bt}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:$t,borderStartEndRadius:$t,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:$t},"> *:last-child":{borderStartEndRadius:$t}}},"&-footer":{borderRadius:`0 0 ${$t}px ${$t}px`}}}}},hu=pt=>{const{componentCls:bt}=pt;return{[`${bt}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${bt}-pagination-left`]:{justifyContent:"flex-end"},[`${bt}-pagination-right`]:{justifyContent:"flex-start"},[`${bt}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${bt}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${bt}-row-indent`]:{float:"right"}}}}},Oc=pt=>{const{componentCls:bt,antCls:$t,iconCls:Gt,fontSizeIcon:ln,padding:Ge,paddingXS:st,tableHeaderIconColor:ht,tableHeaderIconColorHover:Yt,tableSelectionColumnWidth:en}=pt;return{[`${bt}-wrapper`]:{[`${bt}-selection-col`]:{width:en,[`&${bt}-selection-col-with-dropdown`]:{width:en+ln+Ge/4}},[`${bt}-bordered ${bt}-selection-col`]:{width:en+st*2,[`&${bt}-selection-col-with-dropdown`]:{width:en+ln+Ge/4+st*2}},[`
table tr th${bt}-selection-column,
table tr td${bt}-selection-column
`]:{paddingInlineEnd:pt.paddingXS,paddingInlineStart:pt.paddingXS,textAlign:"center",[`${$t}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${bt}-selection-column${bt}-cell-fix-left`]:{zIndex:pt.zIndexTableFixed+1},[`table tr th${bt}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${bt}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${bt}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${pt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${pt.tablePaddingHorizontal/4}px`,[Gt]:{color:ht,fontSize:ln,verticalAlign:"baseline","&:hover":{color:Yt}}}}}},Gl=pt=>{const{componentCls:bt}=pt,$t=(Gt,ln,Ge,st)=>({[`${bt}${bt}-${Gt}`]:{fontSize:st,[`
${bt}-title,
${bt}-footer,
${bt}-cell,
${bt}-thead > tr > th,
${bt}-tbody > tr > th,
${bt}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{padding:`${ln}px ${Ge}px`},[`${bt}-filter-trigger`]:{marginInlineEnd:`-${Ge/2}px`},[`${bt}-expanded-row-fixed`]:{margin:`-${ln}px -${Ge}px`},[`${bt}-tbody`]:{[`${bt}-wrapper:only-child ${bt}`]:{marginBlock:`-${ln}px`,marginInline:`${pt.tableExpandColumnWidth-Ge}px -${Ge}px`}},[`${bt}-selection-column`]:{paddingInlineStart:`${Ge/4}px`}}});return{[`${bt}-wrapper`]:Object.assign(Object.assign({},$t("middle",pt.tablePaddingVerticalMiddle,pt.tablePaddingHorizontalMiddle,pt.tableFontSizeMiddle)),$t("small",pt.tablePaddingVerticalSmall,pt.tablePaddingHorizontalSmall,pt.tableFontSizeSmall))}},Ui=pt=>{const{componentCls:bt,marginXXS:$t,fontSizeIcon:Gt,tableHeaderIconColor:ln,tableHeaderIconColorHover:Ge}=pt;return{[`${bt}-wrapper`]:{[`${bt}-thead th${bt}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${pt.motionDurationSlow}`,"&:hover":{background:pt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:pt.colorPrimary},[`
&${bt}-cell-fix-left:hover,
&${bt}-cell-fix-right:hover
`]:{background:pt.tableFixedHeaderSortActiveBg}},[`${bt}-thead th${bt}-column-sort`]:{background:pt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${bt}-column-sort`]:{background:pt.tableBodySortBg},[`${bt}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${bt}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${bt}-column-sorter`]:{marginInlineStart:$t,color:ln,fontSize:0,transition:`color ${pt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:Gt,"&.active":{color:pt.colorPrimary}},[`${bt}-column-sorter-up + ${bt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${bt}-column-sorters:hover ${bt}-column-sorter`]:{color:Ge}}}},Bl=pt=>{const{componentCls:bt,opacityLoading:$t,tableScrollThumbBg:Gt,tableScrollThumbBgHover:ln,tableScrollThumbSize:Ge,tableScrollBg:st,zIndexTableSticky:ht,stickyScrollBarBorderRadius:Yt}=pt,en=`${pt.lineWidth}px ${pt.lineType} ${pt.tableBorderColor}`;return{[`${bt}-wrapper`]:{[`${bt}-sticky`]:{"&-holder":{position:"sticky",zIndex:ht,background:pt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Ge}px !important`,zIndex:ht,display:"flex",alignItems:"center",background:st,borderTop:en,opacity:$t,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Ge,backgroundColor:Gt,borderRadius:Yt,transition:`all ${pt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:ln}}}}}}},el=pt=>{const{componentCls:bt,lineWidth:$t,tableBorderColor:Gt}=pt,ln=`${$t}px ${pt.lineType} ${Gt}`;return{[`${bt}-wrapper`]:{[`${bt}-summary`]:{position:"relative",zIndex:pt.zIndexTableFixed,background:pt.tableBg,"> tr":{"> th, > td":{borderBottom:ln}}},[`div${bt}-summary`]:{boxShadow:`0 -${$t}px 0 ${Gt}`}}}},ml=pt=>{const{componentCls:bt}=pt,$t=`${pt.lineWidth}px ${pt.lineType} ${pt.tableBorderColor}`,Gt=`${bt}-expanded-row-cell`;return{[`${bt}-wrapper`]:{[`${bt}-tbody-virtual`]:{[`${bt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${bt}-cell`]:{borderBottom:$t},[`${bt}-expanded-row`]:{[`${Gt}${Gt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${pt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${bt}-bordered`]:{[`${bt}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:$t,position:"absolute"},[`${bt}-cell`]:{borderInlineEnd:$t,[`&${bt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-pt.lineWidth,borderInlineStart:$t}}}}}}};const Ls=pt=>{const{componentCls:bt,fontWeightStrong:$t,tablePaddingVertical:Gt,tablePaddingHorizontal:ln,lineWidth:Ge,lineType:st,tableBorderColor:ht,tableFontSize:Yt,tableBg:en,tableRadius:nn,tableHeaderTextColor:tn,motionDurationMid:mn,tableHeaderBg:_n,tableHeaderCellSplitColor:Dn,tableRowHoverBg:tr,tableSelectedRowBg:Hn,tableSelectedRowHoverBg:nr,tableFooterTextColor:jn,tableFooterBg:lr,paddingContentVerticalLG:ur}=pt,qr=`${Ge}px ${st} ${ht}`;return{[`${bt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ba.dF)()),{[bt]:Object.assign(Object.assign({},(0,Ba.Wf)(pt)),{fontSize:Yt,background:en,borderRadius:`${nn}px ${nn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${nn}px ${nn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
${bt}-cell,
${bt}-thead > tr > th,
${bt}-tbody > tr > th,
${bt}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{position:"relative",padding:`${ur}px ${ln}px`,overflowWrap:"break-word"},[`${bt}-title`]:{padding:`${Gt}px ${ln}px`},[`${bt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:tn,fontWeight:$t,textAlign:"start",background:_n,borderBottom:qr,transition:`background ${mn} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${bt}-selection-column):not(${bt}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Dn,transform:"translateY(-50%)",transition:`background-color ${mn}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${bt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${mn}, border-color ${mn}`,borderBottom:qr,[`
> ${bt}-wrapper:only-child,
> ${bt}-expanded-row-fixed > ${bt}-wrapper:only-child
`]:{[bt]:{marginBlock:`-${Gt}px`,marginInline:`${pt.tableExpandColumnWidth-ln}px -${ln}px`,[`${bt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:tn,fontWeight:$t,textAlign:"start",background:_n,borderBottom:qr,transition:`background ${mn} ease`},[`
&${bt}-row:hover > th,
&${bt}-row:hover > td,
> th${bt}-cell-row-hover,
> td${bt}-cell-row-hover
`]:{background:tr},[`&${bt}-row-selected`]:{"> th, > td":{background:Hn},"&:hover > th, &:hover > td":{background:nr}}}},[`${bt}-footer`]:{padding:`${Gt}px ${ln}px`,color:jn,background:lr}})}};var Fo=(0,Aa.Z)("Table",pt=>{const{colorTextHeading:bt,colorSplit:$t,colorIcon:Gt,colorIconHover:ln,opacityLoading:Ge,colorBgContainer:st,controlInteractiveSize:ht,headerBg:Yt,headerColor:en,headerSortActiveBg:nn,headerSortHoverBg:tn,bodySortBg:mn,rowHoverBg:_n,rowSelectedBg:Dn,rowSelectedHoverBg:tr,rowExpandedBg:Hn,cellPaddingBlock:nr,cellPaddingInline:jn,cellPaddingBlockMD:lr,cellPaddingInlineMD:ur,cellPaddingBlockSM:qr,cellPaddingInlineSM:pr,borderColor:Yr,footerBg:wi,footerColor:ar,headerBorderRadius:Br,cellFontSize:$n,cellFontSizeMD:rr,cellFontSizeSM:br,headerSplitColor:pi,fixedHeaderSortActiveBg:Ki,headerFilterHoverBg:ir,filterDropdownBg:gr,expandIconBg:oi,selectionColumnWidth:xr,stickyScrollBarBg:mi}=pt,Di=new is.C(Gt),zi=new is.C(ln),zo=2,Vi=(0,Qs.TS)(pt,{tableFontSize:$n,tableBg:st,tableRadius:Br,tablePaddingVertical:nr,tablePaddingHorizontal:jn,tablePaddingVerticalMiddle:lr,tablePaddingHorizontalMiddle:ur,tablePaddingVerticalSmall:qr,tablePaddingHorizontalSmall:pr,tableBorderColor:Yr,tableHeaderTextColor:en,tableHeaderBg:Yt,tableFooterTextColor:ar,tableFooterBg:wi,tableHeaderCellSplitColor:pi,tableHeaderSortBg:nn,tableHeaderSortHoverBg:tn,tableHeaderIconColor:Di.clone().setAlpha(Di.getAlpha()*Ge).toRgbString(),tableHeaderIconColorHover:zi.clone().setAlpha(zi.getAlpha()*Ge).toRgbString(),tableBodySortBg:mn,tableFixedHeaderSortActiveBg:Ki,tableHeaderFilterActiveBg:ir,tableFilterDropdownBg:gr,tableRowHoverBg:_n,tableSelectedRowBg:Dn,tableSelectedRowHoverBg:tr,zIndexTableFixed:zo,zIndexTableSticky:zo+1,tableFontSizeMiddle:rr,tableFontSizeSmall:br,tableSelectionColumnWidth:xr,tableExpandIconBg:oi,tableExpandColumnWidth:ht+2*pt.padding,tableExpandedRowBg:Hn,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:mi,tableScrollThumbBgHover:bt,tableScrollBg:$t});return[Ls(Vi),du(Vi),el(Vi),Ui(Vi),Ic(Vi),Pl(Vi),Ml(Vi),Ac(Vi),el(Vi),Qc(Vi),Oc(Vi),El(Vi),Bl(Vi),al(Vi),Gl(Vi),hu(Vi),ml(Vi)]},pt=>{const{colorFillAlter:bt,colorBgContainer:$t,colorTextHeading:Gt,colorFillSecondary:ln,colorFillContent:Ge,controlItemBgActive:st,controlItemBgActiveHover:ht,padding:Yt,paddingSM:en,paddingXS:nn,colorBorderSecondary:tn,borderRadiusLG:mn,fontSize:_n,controlHeight:Dn,colorTextPlaceholder:tr}=pt,Hn=new is.C(ln).onBackground($t).toHexShortString(),nr=new is.C(Ge).onBackground($t).toHexShortString(),jn=new is.C(bt).onBackground($t).toHexShortString();return{headerBg:jn,headerColor:Gt,headerSortActiveBg:Hn,headerSortHoverBg:nr,bodySortBg:jn,rowHoverBg:jn,rowSelectedBg:st,rowSelectedHoverBg:ht,rowExpandedBg:bt,cellPaddingBlock:Yt,cellPaddingInline:Yt,cellPaddingBlockMD:en,cellPaddingInlineMD:nn,cellPaddingBlockSM:nn,cellPaddingInlineSM:nn,borderColor:tn,headerBorderRadius:mn,footerBg:jn,footerColor:Gt,cellFontSize:_n,cellFontSizeMD:_n,cellFontSizeSM:_n,headerSplitColor:tn,fixedHeaderSortActiveBg:Hn,headerFilterHoverBg:Ge,filterDropdownMenuBg:$t,filterDropdownBg:$t,expandIconBg:$t,selectionColumnWidth:Dn,stickyScrollBarBg:tr,stickyScrollBarBorderRadius:100}});const Ia=[],eu=(pt,bt)=>{const{prefixCls:$t,className:Gt,rootClassName:ln,style:Ge,size:st,bordered:ht,dropdownPrefixCls:Yt,dataSource:en,pagination:nn,rowSelection:tn,rowKey:mn="key",rowClassName:_n,columns:Dn,children:tr,childrenColumnName:Hn,onChange:nr,getPopupContainer:jn,loading:lr,expandIcon:ur,expandable:qr,expandedRowRender:pr,expandIconColumnIndex:Yr,indentSize:wi,scroll:ar,sortDirections:Br,locale:$n,showSorterTooltip:rr=!0,virtual:br}=pt,pi=ce.useMemo(()=>Dn||De(tr),[Dn,tr]),Ki=ce.useMemo(()=>pi.some(Do=>Do.responsive),[pi]),ir=(0,_o.Z)(Ki),gr=ce.useMemo(()=>{const Do=new Set(Object.keys(ir).filter(qo=>ir[qo]));return pi.filter(qo=>!qo.responsive||qo.responsive.some(Va=>Do.has(Va)))},[pi,ir]),oi=(0,hi.Z)(pt,["className","style","columns"]),{locale:xr=vo.Z,direction:mi,table:Di,renderEmpty:zi,getPrefixCls:zo,getPopupContainer:Vi}=ce.useContext(mo.E_),Jo=(0,ji.Z)(st),co=Object.assign(Object.assign({},xr.Table),$n),Lo=en||Ia,Ro=zo("table",$t),xi=zo("dropdown",Yt),li=Object.assign({childrenColumnName:Hn,expandIconColumnIndex:Yr},qr),{childrenColumnName:Ei="children"}=li,Oi=ce.useMemo(()=>Lo.some(Do=>Do==null?void 0:Do[Ei])?"nest":pr||qr&&qr.expandedRowRender?"row":null,[Lo]),fi={body:ce.useRef()},So=ce.useMemo(()=>typeof mn=="function"?mn:Do=>Do==null?void 0:Do[mn],[mn]),[Mi]=Ps(Lo,Ei,So),Ai={},lo=function(Do,qo){let Va=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Qo,Ga,ls;const Bs=Object.assign(Object.assign({},Ai),Do);Va&&((Qo=Ai.resetPagination)===null||Qo===void 0||Qo.call(Ai),!((Ga=Bs.pagination)===null||Ga===void 0)&&Ga.current&&(Bs.pagination.current=1),nn&&nn.onChange&&nn.onChange(1,(ls=Bs.pagination)===null||ls===void 0?void 0:ls.pageSize)),ar&&ar.scrollToFirstRowOnChange!==!1&&fi.body.current&&(0,Xi.Z)(0,{getContainer:()=>fi.body.current}),nr==null||nr(Bs.pagination,Bs.filters,Bs.sorter,{currentDataSource:Pa(To(Lo,Bs.sorterStates,Ei),Bs.filterStates),action:qo})},yo=(Do,qo)=>{lo({sorter:Do,sorterStates:qo},"sort",!1)},[Ua,Ta,Gi,uo]=Uo({prefixCls:Ro,mergedColumns:gr,onSorterChange:yo,sortDirections:Br||["ascend","descend"],tableLocale:co,showSorterTooltip:rr}),pa=ce.useMemo(()=>To(Lo,Ta,Ei),[Lo,Ta]);Ai.sorter=uo(),Ai.sorterStates=Ta;const Po=(Do,qo)=>{lo({filters:Do,filterStates:qo},"filter",!0)},[bo,os,fo]=Zs({prefixCls:Ro,locale:co,dropdownPrefixCls:xi,mergedColumns:gr,onFilterChange:Po,getPopupContainer:jn||Vi}),Tr=Pa(pa,os);Ai.filters=fo,Ai.filterStates=os;const Eo=ce.useMemo(()=>{const Do={};return Object.keys(fo).forEach(qo=>{fo[qo]!==null&&(Do[qo]=fo[qo])}),Object.assign(Object.assign({},Gi),{filters:Do})},[Gi,fo]),[aa]=fs(Eo),Oa=(Do,qo)=>{lo({pagination:Object.assign(Object.assign({},Ai.pagination),{current:Do,pageSize:qo})},"paginate")},[Zi,$o]=Js(Tr.length,Oa,nn);Ai.pagination=nn===!1?{}:qa(Zi,nn),Ai.resetPagination=$o;const es=ce.useMemo(()=>{if(nn===!1||!Zi.pageSize)return Tr;const{current:Do=1,total:qo,pageSize:Va=_a}=Zi;return Tr.length<qo?Tr.length>Va?Tr.slice((Do-1)*Va,Do*Va):Tr:Tr.slice((Do-1)*Va,Do*Va)},[!!nn,Tr,Zi&&Zi.current,Zi&&Zi.pageSize,Zi&&Zi.total]),[Us,Ll]=ks({prefixCls:Ro,data:Tr,pageData:es,getRowKey:So,getRecordByKey:Mi,expandType:Oi,childrenColumnName:Ei,locale:co,getPopupContainer:jn||Vi},tn),As=(Do,qo,Va)=>{let Qo;return typeof _n=="function"?Qo=ct()(_n(Do,qo,Va)):Qo=ct()(_n),ct()({[`${Ro}-row-selected`]:Ll.has(So(Do,qo))},Qo)};li.__PARENT_RENDER_ICON__=li.expandIcon,li.expandIcon=li.expandIcon||ur||Hi(co),Oi==="nest"&&li.expandIconColumnIndex===void 0?li.expandIconColumnIndex=tn?1:0:li.expandIconColumnIndex>0&&tn&&(li.expandIconColumnIndex-=1),typeof li.indentSize!="number"&&(li.indentSize=typeof wi=="number"?wi:15);const as=ce.useCallback(Do=>aa(Us(bo(Ua(Do)))),[Ua,bo,Us]);let vl,ss;if(nn!==!1&&(Zi!=null&&Zi.total)){let Do;Zi.size?Do=Zi.size:Do=Jo==="small"||Jo==="middle"?"small":void 0;const qo=Ga=>ce.createElement(Er.Z,Object.assign({},Zi,{className:ct()(`${Ro}-pagination ${Ro}-pagination-${Ga}`,Zi.className),size:Do})),Va=mi==="rtl"?"left":"right",{position:Qo}=Zi;if(Qo!==null&&Array.isArray(Qo)){const Ga=Qo.find(zl=>zl.includes("top")),ls=Qo.find(zl=>zl.includes("bottom")),Bs=Qo.every(zl=>`${zl}`=="none");!Ga&&!ls&&!Bs&&(ss=qo(Va)),Ga&&(vl=qo(Ga.toLowerCase().replace("top",""))),ls&&(ss=qo(ls.toLowerCase().replace("bottom","")))}else ss=qo(Va)}let Is;typeof lr=="boolean"?Is={spinning:lr}:typeof lr=="object"&&(Is=Object.assign({spinning:!0},lr));const[ms,ga]=Fo(Ro),[,ya]=(0,kr.Z)(),_s=ct()(`${Ro}-wrapper`,Di==null?void 0:Di.className,{[`${Ro}-wrapper-rtl`]:mi==="rtl"},Gt,ln,ga),Fl=Object.assign(Object.assign({},Di==null?void 0:Di.style),Ge),tl=$n&&$n.emptyText||(zi==null?void 0:zi("Table"))||ce.createElement(Co.Z,{componentName:"Table"}),Dl=br?Ws:ja,Xl={},mu=ce.useMemo(()=>{const{fontSize:Do,lineHeight:qo,padding:Va,paddingXS:Qo,paddingSM:Ga}=ya,ls=Math.floor(Do*qo);switch(Jo){case"large":return Va*2+ls;case"small":return Qo*2+ls;default:return Ga*2+ls}},[ya,Jo]);return br&&(Xl.listItemHeight=mu),ms(ce.createElement("div",{ref:bt,className:_s,style:Fl},ce.createElement(Ar.Z,Object.assign({spinning:!1},Is),vl,ce.createElement(Dl,Object.assign({},Xl,oi,{columns:gr,direction:mi,expandable:li,prefixCls:Ro,className:ct()({[`${Ro}-middle`]:Jo==="middle",[`${Ro}-small`]:Jo==="small",[`${Ro}-bordered`]:ht,[`${Ro}-empty`]:Lo.length===0}),data:es,rowKey:So,rowClassName:As,emptyText:tl,internalHooks:xe,internalRefs:fi,transformColumns:as})),ss)))};var Ds=ce.forwardRef(eu);const Tu=(pt,bt)=>{const $t=ce.useRef(0);return $t.current+=1,ce.createElement(Ds,Object.assign({},pt,{ref:bt,_renderTimes:$t.current}))},bs=ce.forwardRef(Tu);bs.SELECTION_COLUMN=va,bs.EXPAND_COLUMN=ne,bs.SELECTION_ALL=oa,bs.SELECTION_INVERT=za,bs.SELECTION_NONE=$a,bs.Column=Fr,bs.ColumnGroup=bi,bs.Summary=Qe;var kl=bs,bc=kl},99313:function(gn,kt,ee){"use strict";ee.d(kt,{default:function(){return Oe}});var ne=ee(99267),xe=ee(18785),Me=ee(62772),Ce=ee(92310),fe=ee.n(Ce),he=ee(60499),ce=ee(18642),ae=ee(85899),se=ee(72190),ve=ee(43749),ue=ee(42244),pe=ee(59301),oe=ee(49658),ge=ee(18929),ye=ee(77900),we=(0,pe.createContext)(null),Be=pe.forwardRef(function(De,Ke){var et=De.prefixCls,rt=De.className,Dt=De.style,Ft=De.id,Bt=De.active,Ct=De.tabKey,Ht=De.children;return pe.createElement("div",{id:Ft&&"".concat(Ft,"-panel-").concat(Ct),role:"tabpanel",tabIndex:Bt?0:-1,"aria-labelledby":Ft&&"".concat(Ft,"-tab-").concat(Ct),"aria-hidden":!Bt,style:Dt,className:fe()(et,Bt&&"".concat(et,"-active"),rt),ref:Ke},Ht)}),ze=Be,$e=["key","forceRender","style","className"];function Le(De){var Ke=De.id,et=De.activeKey,rt=De.animated,Dt=De.tabPosition,Ft=De.destroyInactiveTabPane,Bt=pe.useContext(we),Ct=Bt.prefixCls,Ht=Bt.tabs,Ut=rt.tabPane,on="".concat(Ct,"-tabpane");return pe.createElement("div",{className:fe()("".concat(Ct,"-content-holder"))},pe.createElement("div",{className:fe()("".concat(Ct,"-content"),"".concat(Ct,"-content-").concat(Dt),(0,ce.Z)({},"".concat(Ct,"-content-animated"),Ut))},Ht.map(function(cn){var Rt=cn.key,Vt=cn.forceRender,In=cn.style,wn=cn.className,Nn=(0,ue.Z)(cn,$e),Rn=Rt===et;return pe.createElement(ye.default,(0,he.Z)({key:Rt,visible:Rn,forceRender:Vt,removeOnLeave:!!Ft,leavedClassName:"".concat(on,"-hidden")},rt.tabPaneMotion),function(Jn,Sn){var Un=Jn.style,zt=Jn.className;return pe.createElement(ze,(0,he.Z)({},Nn,{prefixCls:on,id:Ke,tabKey:Rt,animated:Ut,active:Rn,style:(0,ae.Z)((0,ae.Z)({},In),Un),className:fe()(wn,zt),ref:Sn}))})})))}var Ne=ee(77654),Re=ee(29301),Se=ee(6089),Ie=ee(8654),Ae={width:0,height:0,left:0,top:0};function it(De,Ke,et){return(0,pe.useMemo)(function(){for(var rt,Dt=new Map,Ft=Ke.get((rt=De[0])===null||rt===void 0?void 0:rt.key)||Ae,Bt=Ft.left+Ft.width,Ct=0;Ct<De.length;Ct+=1){var Ht=De[Ct].key,Ut=Ke.get(Ht);if(!Ut){var on;Ut=Ke.get((on=De[Ct-1])===null||on===void 0?void 0:on.key)||Ae}var cn=Dt.get(Ht)||(0,ae.Z)({},Ut);cn.right=Bt-cn.left-cn.width,Dt.set(Ht,cn)}return Dt},[De.map(function(rt){return rt.key}).join("_"),Ke,et])}function Ue(De,Ke){var et=pe.useRef(De),rt=pe.useState({}),Dt=(0,se.Z)(rt,2),Ft=Dt[1];function Bt(Ct){var Ht=typeof Ct=="function"?Ct(et.current):Ct;Ht!==et.current&&Ke(Ht,et.current),et.current=Ht,Ft({})}return[et.current,Bt]}var gt=.1,Ve=.01,Tt=20,ct=Math.pow(.995,Tt);function Ot(De,Ke){var et=(0,pe.useState)(),rt=(0,se.Z)(et,2),Dt=rt[0],Ft=rt[1],Bt=(0,pe.useState)(0),Ct=(0,se.Z)(Bt,2),Ht=Ct[0],Ut=Ct[1],on=(0,pe.useState)(0),cn=(0,se.Z)(on,2),Rt=cn[0],Vt=cn[1],In=(0,pe.useState)(),wn=(0,se.Z)(In,2),Nn=wn[0],Rn=wn[1],Jn=(0,pe.useRef)();function Sn(En){var kn=En.touches[0],Mn=kn.screenX,Bn=kn.screenY;Ft({x:Mn,y:Bn}),window.clearInterval(Jn.current)}function Un(En){if(Dt){En.preventDefault();var kn=En.touches[0],Mn=kn.screenX,Bn=kn.screenY;Ft({x:Mn,y:Bn});var Kn=Mn-Dt.x,Vn=Bn-Dt.y;Ke(Kn,Vn);var cr=Date.now();Ut(cr),Vt(cr-Ht),Rn({x:Kn,y:Vn})}}function zt(){if(Dt&&(Ft(null),Rn(null),Nn)){var En=Nn.x/Rt,kn=Nn.y/Rt,Mn=Math.abs(En),Bn=Math.abs(kn);if(Math.max(Mn,Bn)<gt)return;var Kn=En,Vn=kn;Jn.current=window.setInterval(function(){if(Math.abs(Kn)<Ve&&Math.abs(Vn)<Ve){window.clearInterval(Jn.current);return}Kn*=ct,Vn*=ct,Ke(Kn*Tt,Vn*Tt)},Tt)}}var fn=(0,pe.useRef)();function vn(En){var kn=En.deltaX,Mn=En.deltaY,Bn=0,Kn=Math.abs(kn),Vn=Math.abs(Mn);Kn===Vn?Bn=fn.current==="x"?kn:Mn:Kn>Vn?(Bn=kn,fn.current="x"):(Bn=Mn,fn.current="y"),Ke(-Bn,-Bn)&&En.preventDefault()}var An=(0,pe.useRef)(null);An.current={onTouchStart:Sn,onTouchMove:Un,onTouchEnd:zt,onWheel:vn},pe.useEffect(function(){function En(Kn){An.current.onTouchStart(Kn)}function kn(Kn){An.current.onTouchMove(Kn)}function Mn(Kn){An.current.onTouchEnd(Kn)}function Bn(Kn){An.current.onWheel(Kn)}return document.addEventListener("touchmove",kn,{passive:!1}),document.addEventListener("touchend",Mn,{passive:!1}),De.current.addEventListener("touchstart",En,{passive:!1}),De.current.addEventListener("wheel",Bn),function(){document.removeEventListener("touchmove",kn),document.removeEventListener("touchend",Mn)}},[])}var We=ee(34280);function lt(De){var Ke=(0,pe.useState)(0),et=(0,se.Z)(Ke,2),rt=et[0],Dt=et[1],Ft=(0,pe.useRef)(0),Bt=(0,pe.useRef)();return Bt.current=De,(0,We.o)(function(){var Ct;(Ct=Bt.current)===null||Ct===void 0||Ct.call(Bt)},[rt]),function(){Ft.current===rt&&(Ft.current+=1,Dt(Ft.current))}}function ut(De){var Ke=(0,pe.useRef)([]),et=(0,pe.useState)({}),rt=(0,se.Z)(et,2),Dt=rt[1],Ft=(0,pe.useRef)(typeof De=="function"?De():De),Bt=lt(function(){var Ht=Ft.current;Ke.current.forEach(function(Ut){Ht=Ut(Ht)}),Ke.current=[],Ft.current=Ht,Dt({})});function Ct(Ht){Ke.current.push(Ht),Bt()}return[Ft.current,Ct]}var St={width:0,height:0,left:0,top:0,right:0};function qe(De,Ke,et,rt,Dt,Ft,Bt){var Ct=Bt.tabs,Ht=Bt.tabPosition,Ut=Bt.rtl,on,cn,Rt;return["top","bottom"].includes(Ht)?(on="width",cn=Ut?"right":"left",Rt=Math.abs(et)):(on="height",cn="top",Rt=-et),(0,pe.useMemo)(function(){if(!Ct.length)return[0,0];for(var Vt=Ct.length,In=Vt,wn=0;wn<Vt;wn+=1){var Nn=De.get(Ct[wn].key)||St;if(Nn[cn]+Nn[on]>Rt+Ke){In=wn-1;break}}for(var Rn=0,Jn=Vt-1;Jn>=0;Jn-=1){var Sn=De.get(Ct[Jn].key)||St;if(Sn[cn]<Rt){Rn=Jn+1;break}}return Rn>=In?[0,0]:[Rn,In]},[De,Ke,rt,Dt,Ft,Rt,Ht,Ct.map(function(Vt){return Vt.key}).join("_"),Ut])}function Ze(De){var Ke;return De instanceof Map?(Ke={},De.forEach(function(et,rt){Ke[rt]=et})):Ke=De,JSON.stringify(Ke)}var wt="TABS_DQ";function Wt(De){return String(De).replace(/"/g,wt)}function Kt(De,Ke,et,rt){return!(!et||rt||De===!1||De===void 0&&(Ke===!1||Ke===null))}function _t(De,Ke){var et=De.prefixCls,rt=De.editable,Dt=De.locale,Ft=De.style;return!rt||rt.showAdd===!1?null:pe.createElement("button",{ref:Ke,type:"button",className:"".concat(et,"-nav-add"),style:Ft,"aria-label":(Dt==null?void 0:Dt.addAriaLabel)||"Add tab",onClick:function(Ct){rt.onEdit("add",{event:Ct})}},rt.addIcon||"+")}var vt=pe.forwardRef(_t),jt=pe.forwardRef(function(De,Ke){var et=De.position,rt=De.prefixCls,Dt=De.extra;if(!Dt)return null;var Ft,Bt={};return(0,ve.Z)(Dt)==="object"&&!pe.isValidElement(Dt)?Bt=Dt:Bt.right=Dt,et==="right"&&(Ft=Bt.right),et==="left"&&(Ft=Bt.left),Ft?pe.createElement("div",{className:"".concat(rt,"-extra-content"),ref:Ke},Ft):null}),yn=jt,Xt=ee(31561),Ln=ee(15285),pn=ee(10228);function hn(De,Ke){var et=De.prefixCls,rt=De.id,Dt=De.tabs,Ft=De.locale,Bt=De.mobile,Ct=De.moreIcon,Ht=Ct===void 0?"More":Ct,Ut=De.moreTransitionName,on=De.style,cn=De.className,Rt=De.editable,Vt=De.tabBarGutter,In=De.rtl,wn=De.removeAriaLabel,Nn=De.onTabClick,Rn=De.getPopupContainer,Jn=De.popupClassName,Sn=(0,pe.useState)(!1),Un=(0,se.Z)(Sn,2),zt=Un[0],fn=Un[1],vn=(0,pe.useState)(null),An=(0,se.Z)(vn,2),En=An[0],kn=An[1],Mn="".concat(rt,"-more-popup"),Bn="".concat(et,"-dropdown"),Kn=En!==null?"".concat(Mn,"-").concat(En):null,Vn=Ft==null?void 0:Ft.dropdownAriaLabel;function cr(Zr,Lr){Zr.preventDefault(),Zr.stopPropagation(),Rt.onEdit("remove",{key:Lr,event:Zr})}var fr=pe.createElement(Ln.ZP,{onClick:function(Lr){var Or=Lr.key,Wr=Lr.domEvent;Nn(Or,Wr),fn(!1)},prefixCls:"".concat(Bn,"-menu"),id:Mn,tabIndex:-1,role:"listbox","aria-activedescendant":Kn,selectedKeys:[En],"aria-label":Vn!==void 0?Vn:"expanded dropdown"},Dt.map(function(Zr){var Lr=Zr.closable,Or=Zr.disabled,Wr=Zr.closeIcon,Pr=Zr.key,di=Zr.label,Ri=Kt(Lr,Wr,Rt,Or);return pe.createElement(Ln.sN,{key:Pr,id:"".concat(Mn,"-").concat(Pr),role:"option","aria-controls":rt&&"".concat(rt,"-panel-").concat(Pr),disabled:Or},pe.createElement("span",null,di),Ri&&pe.createElement("button",{type:"button","aria-label":wn||"remove",tabIndex:0,className:"".concat(Bn,"-menu-item-remove"),onClick:function(er){er.stopPropagation(),cr(er,Pr)}},Wr||Rt.removeIcon||"\xD7"))}));function $r(Zr){for(var Lr=Dt.filter(function(Ri){return!Ri.disabled}),Or=Lr.findIndex(function(Ri){return Ri.key===En})||0,Wr=Lr.length,Pr=0;Pr<Wr;Pr+=1){Or=(Or+Zr+Wr)%Wr;var di=Lr[Or];if(!di.disabled){kn(di.key);return}}}function Mr(Zr){var Lr=Zr.which;if(!zt){[pn.Z.DOWN,pn.Z.SPACE,pn.Z.ENTER].includes(Lr)&&(fn(!0),Zr.preventDefault());return}switch(Lr){case pn.Z.UP:$r(-1),Zr.preventDefault();break;case pn.Z.DOWN:$r(1),Zr.preventDefault();break;case pn.Z.ESC:fn(!1);break;case pn.Z.SPACE:case pn.Z.ENTER:En!==null&&Nn(En,Zr);break}}(0,pe.useEffect)(function(){var Zr=document.getElementById(Kn);Zr&&Zr.scrollIntoView&&Zr.scrollIntoView(!1)},[En]),(0,pe.useEffect)(function(){zt||kn(null)},[zt]);var wr=(0,ce.Z)({},In?"marginRight":"marginLeft",Vt);Dt.length||(wr.visibility="hidden",wr.order=1);var ei=fe()((0,ce.Z)({},"".concat(Bn,"-rtl"),In)),Xr=Bt?null:pe.createElement(Xt.Z,{prefixCls:Bn,overlay:fr,trigger:["hover"],visible:Dt.length?zt:!1,transitionName:Ut,onVisibleChange:fn,overlayClassName:fe()(ei,Jn),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Rn},pe.createElement("button",{type:"button",className:"".concat(et,"-nav-more"),style:wr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Mn,id:"".concat(rt,"-more"),"aria-expanded":zt,onKeyDown:Mr},Ht));return pe.createElement("div",{className:fe()("".concat(et,"-nav-operations"),cn),style:on,ref:Ke},Xr,pe.createElement(vt,{prefixCls:et,locale:Ft,editable:Rt}))}var un=pe.memo(pe.forwardRef(hn),function(De,Ke){return Ke.tabMoving});function Xe(De){var Ke,et=De.prefixCls,rt=De.id,Dt=De.active,Ft=De.tab,Bt=Ft.key,Ct=Ft.label,Ht=Ft.disabled,Ut=Ft.closeIcon,on=De.closable,cn=De.renderWrapper,Rt=De.removeAriaLabel,Vt=De.editable,In=De.onClick,wn=De.onFocus,Nn=De.style,Rn="".concat(et,"-tab"),Jn=Kt(on,Ut,Vt,Ht);function Sn(fn){Ht||In(fn)}function Un(fn){fn.preventDefault(),fn.stopPropagation(),Vt.onEdit("remove",{key:Bt,event:fn})}var zt=pe.createElement("div",{key:Bt,"data-node-key":Wt(Bt),className:fe()(Rn,(Ke={},(0,ce.Z)(Ke,"".concat(Rn,"-with-remove"),Jn),(0,ce.Z)(Ke,"".concat(Rn,"-active"),Dt),(0,ce.Z)(Ke,"".concat(Rn,"-disabled"),Ht),Ke)),style:Nn,onClick:Sn},pe.createElement("div",{role:"tab","aria-selected":Dt,id:rt&&"".concat(rt,"-tab-").concat(Bt),className:"".concat(Rn,"-btn"),"aria-controls":rt&&"".concat(rt,"-panel-").concat(Bt),"aria-disabled":Ht,tabIndex:Ht?null:0,onClick:function(vn){vn.stopPropagation(),Sn(vn)},onKeyDown:function(vn){[pn.Z.SPACE,pn.Z.ENTER].includes(vn.which)&&(vn.preventDefault(),Sn(vn))},onFocus:wn},Ct),Jn&&pe.createElement("button",{type:"button","aria-label":Rt||"remove",tabIndex:0,className:"".concat(Rn,"-remove"),onClick:function(vn){vn.stopPropagation(),Un(vn)}},Ut||Vt.removeIcon||"\xD7"));return cn?cn(zt):zt}var ke=Xe,_e=ee(16089),Te=function(Ke){var et=Ke.activeTabOffset,rt=Ke.horizontal,Dt=Ke.rtl,Ft=Ke.indicatorSize,Bt=(0,pe.useState)(),Ct=(0,se.Z)(Bt,2),Ht=Ct[0],Ut=Ct[1],on=(0,pe.useRef)(),cn=function(In){return typeof Ft=="function"?Ft(In):typeof Ft=="number"?Ft:In};function Rt(){_e.Z.cancel(on.current)}return(0,pe.useEffect)(function(){var Vt={};return et&&(rt?(Dt?(Vt.right=et.right+et.width/2,Vt.transform="translateX(50%)"):(Vt.left=et.left+et.width/2,Vt.transform="translateX(-50%)"),Vt.width=cn(et.width)):(Vt.top=et.top+et.height/2,Vt.transform="translateY(-50%)",Vt.height=cn(et.height))),Rt(),on.current=(0,_e.Z)(function(){Ut(Vt)}),Rt},[et,rt,Dt,Ft]),{style:Ht}},Fe=Te,me=function(Ke){var et=Ke.current||{},rt=et.offsetWidth,Dt=rt===void 0?0:rt,Ft=et.offsetHeight,Bt=Ft===void 0?0:Ft;return[Dt,Bt]},at=function(Ke,et){return Ke[et?0:1]};function Pt(De,Ke){var et,rt=pe.useContext(we),Dt=rt.prefixCls,Ft=rt.tabs,Bt=De.className,Ct=De.style,Ht=De.id,Ut=De.animated,on=De.activeKey,cn=De.rtl,Rt=De.extra,Vt=De.editable,In=De.locale,wn=De.tabPosition,Nn=De.tabBarGutter,Rn=De.children,Jn=De.onTabClick,Sn=De.onTabScroll,Un=De.indicatorSize,zt=(0,pe.useRef)(),fn=(0,pe.useRef)(),vn=(0,pe.useRef)(),An=(0,pe.useRef)(),En=(0,pe.useRef)(),kn=(0,pe.useRef)(),Mn=(0,pe.useRef)(),Bn=wn==="top"||wn==="bottom",Kn=Ue(0,function(xo,go){Bn&&Sn&&Sn({direction:xo>go?"left":"right"})}),Vn=(0,se.Z)(Kn,2),cr=Vn[0],fr=Vn[1],$r=Ue(0,function(xo,go){!Bn&&Sn&&Sn({direction:xo>go?"top":"bottom"})}),Mr=(0,se.Z)($r,2),wr=Mr[0],ei=Mr[1],Xr=(0,pe.useState)([0,0]),Zr=(0,se.Z)(Xr,2),Lr=Zr[0],Or=Zr[1],Wr=(0,pe.useState)([0,0]),Pr=(0,se.Z)(Wr,2),di=Pr[0],Ri=Pr[1],Vr=(0,pe.useState)([0,0]),er=(0,se.Z)(Vr,2),Zn=er[0],Dr=er[1],Sr=(0,pe.useState)([0,0]),ri=(0,se.Z)(Sr,2),yi=ri[0],jr=ri[1],Bi=ut(new Map),_i=(0,se.Z)(Bi,2),oo=_i[0],Fr=_i[1],Nr=it(Ft,oo,di[0]),bi=at(Lr,Bn),hi=at(di,Bn),Xi=at(Zn,Bn),mo=at(yi,Bn),Co=bi<hi+Xi,ji=Co?bi-mo:bi-Xi,_o="".concat(Dt,"-nav-operations-hidden"),vo=0,Er=0;Bn&&cn?(vo=0,Er=Math.max(0,hi-ji)):(vo=Math.min(0,ji-hi),Er=0);function Ar(xo){return xo<vo?vo:xo>Er?Er:xo}var kr=(0,pe.useRef)(),Kr=(0,pe.useState)(),Hi=(0,se.Z)(Kr,2),eo=Hi[0],io=Hi[1];function ao(){io(Date.now())}function to(){window.clearTimeout(kr.current)}Ot(An,function(xo,go){function ca(ua,ba){ua(function(da){var xl=Ar(da+ba);return xl})}return Co?(Bn?ca(fr,xo):ca(ei,go),to(),ao(),!0):!1}),(0,pe.useEffect)(function(){return to(),eo&&(kr.current=window.setTimeout(function(){io(0)},100)),to},[eo]);var Mo=qe(Nr,ji,Bn?cr:wr,hi,Xi,mo,(0,ae.Z)((0,ae.Z)({},De),{},{tabs:Ft})),Yo=(0,se.Z)(Mo,2),Ho=Yo[0],La=Yo[1],ha=(0,Se.Z)(function(){var xo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:on,go=Nr.get(xo)||{width:0,height:0,left:0,right:0,top:0};if(Bn){var ca=cr;cn?go.right<cr?ca=go.right:go.right+go.width>cr+ji&&(ca=go.right+go.width-ji):go.left<-cr?ca=-go.left:go.left+go.width>-cr+ji&&(ca=-(go.left+go.width-ji)),ei(0),fr(Ar(ca))}else{var ua=wr;go.top<-wr?ua=-go.top:go.top+go.height>-wr+ji&&(ua=-(go.top+go.height-ji)),fr(0),ei(Ar(ua))}}),Ko={};wn==="top"||wn==="bottom"?Ko[cn?"marginRight":"marginLeft"]=Nn:Ko.marginTop=Nn;var Oo=Ft.map(function(xo,go){var ca=xo.key;return pe.createElement(ke,{id:Ht,prefixCls:Dt,key:ca,tab:xo,style:go===0?void 0:Ko,closable:xo.closable,editable:Vt,active:ca===on,renderWrapper:Rn,removeAriaLabel:In==null?void 0:In.removeAriaLabel,onClick:function(ba){Jn(ca,ba)},onFocus:function(){ha(ca),ao(),An.current&&(cn||(An.current.scrollLeft=0),An.current.scrollTop=0)}})}),Wi=function(){return Fr(function(){var go=new Map;return Ft.forEach(function(ca){var ua,ba=ca.key,da=(ua=En.current)===null||ua===void 0?void 0:ua.querySelector('[data-node-key="'.concat(Wt(ba),'"]'));da&&go.set(ba,{width:da.offsetWidth,height:da.offsetHeight,left:da.offsetLeft,top:da.offsetTop})}),go})};(0,pe.useEffect)(function(){Wi()},[Ft.map(function(xo){return xo.key}).join("_")]);var ta=lt(function(){var xo=me(zt),go=me(fn),ca=me(vn);Or([xo[0]-go[0]-ca[0],xo[1]-go[1]-ca[1]]);var ua=me(Mn);Dr(ua);var ba=me(kn);jr(ba);var da=me(En);Ri([da[0]-ua[0],da[1]-ua[1]]),Wi()}),Zo=Ft.slice(0,Ho),no=Ft.slice(La+1),ti=[].concat((0,Ne.Z)(Zo),(0,Ne.Z)(no)),Fi=Nr.get(on),Ii=Fe({activeTabOffset:Fi,horizontal:Bn,rtl:cn,indicatorSize:Un}),Ci=Ii.style;(0,pe.useEffect)(function(){ha()},[on,vo,Er,Ze(Fi),Ze(Nr),Bn]),(0,pe.useEffect)(function(){ta()},[cn]);var ro=!!ti.length,qi="".concat(Dt,"-nav-wrap"),Bo,na,ra,fa;return Bn?cn?(na=cr>0,Bo=cr!==Er):(Bo=cr<0,na=cr!==vo):(ra=wr<0,fa=wr!==vo),pe.createElement(Re.Z,{onResize:ta},pe.createElement("div",{ref:(0,Ie.x1)(Ke,zt),role:"tablist",className:fe()("".concat(Dt,"-nav"),Bt),style:Ct,onKeyDown:function(){ao()}},pe.createElement(yn,{ref:fn,position:"left",extra:Rt,prefixCls:Dt}),pe.createElement(Re.Z,{onResize:ta},pe.createElement("div",{className:fe()(qi,(et={},(0,ce.Z)(et,"".concat(qi,"-ping-left"),Bo),(0,ce.Z)(et,"".concat(qi,"-ping-right"),na),(0,ce.Z)(et,"".concat(qi,"-ping-top"),ra),(0,ce.Z)(et,"".concat(qi,"-ping-bottom"),fa),et)),ref:An},pe.createElement(Re.Z,{onResize:ta},pe.createElement("div",{ref:En,className:"".concat(Dt,"-nav-list"),style:{transform:"translate(".concat(cr,"px, ").concat(wr,"px)"),transition:eo?"none":void 0}},Oo,pe.createElement(vt,{ref:Mn,prefixCls:Dt,locale:In,editable:Vt,style:(0,ae.Z)((0,ae.Z)({},Oo.length===0?void 0:Ko),{},{visibility:ro?"hidden":null})}),pe.createElement("div",{className:fe()("".concat(Dt,"-ink-bar"),(0,ce.Z)({},"".concat(Dt,"-ink-bar-animated"),Ut.inkBar)),style:Ci}))))),pe.createElement(un,(0,he.Z)({},De,{removeAriaLabel:In==null?void 0:In.removeAriaLabel,ref:kn,prefixCls:Dt,tabs:ti,className:!ro&&_o,tabMoving:!!eo})),pe.createElement(yn,{ref:vn,position:"right",extra:Rt,prefixCls:Dt})))}var Qe=pe.forwardRef(Pt),Je=["renderTabBar"],xt=["label","key"];function ot(De){var Ke=De.renderTabBar,et=(0,ue.Z)(De,Je),rt=pe.useContext(we),Dt=rt.tabs;if(Ke){var Ft=(0,ae.Z)((0,ae.Z)({},et),{},{panes:Dt.map(function(Bt){var Ct=Bt.label,Ht=Bt.key,Ut=(0,ue.Z)(Bt,xt);return pe.createElement(ze,(0,he.Z)({tab:Ct,key:Ht,tabKey:Ht},Ut))})});return Ke(Ft,Qe)}return pe.createElement(Qe,et)}var mt=ee(48736);function Nt(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Ke;return De===!1?Ke={inkBar:!1,tabPane:!1}:De===!0?Ke={inkBar:!0,tabPane:!1}:Ke=(0,ae.Z)({inkBar:!0},(0,ve.Z)(De)==="object"?De:{}),Ke.tabPaneMotion&&Ke.tabPane===void 0&&(Ke.tabPane=!0),!Ke.tabPaneMotion&&Ke.tabPane&&(Ke.tabPane=!1),Ke}var rn=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],It=0;function Qt(De,Ke){var et,rt=De.id,Dt=De.prefixCls,Ft=Dt===void 0?"rc-tabs":Dt,Bt=De.className,Ct=De.items,Ht=De.direction,Ut=De.activeKey,on=De.defaultActiveKey,cn=De.editable,Rt=De.animated,Vt=De.tabPosition,In=Vt===void 0?"top":Vt,wn=De.tabBarGutter,Nn=De.tabBarStyle,Rn=De.tabBarExtraContent,Jn=De.locale,Sn=De.moreIcon,Un=De.moreTransitionName,zt=De.destroyInactiveTabPane,fn=De.renderTabBar,vn=De.onChange,An=De.onTabClick,En=De.onTabScroll,kn=De.getPopupContainer,Mn=De.popupClassName,Bn=De.indicatorSize,Kn=(0,ue.Z)(De,rn),Vn=pe.useMemo(function(){return(Ct||[]).filter(function(jr){return jr&&(0,ve.Z)(jr)==="object"&&"key"in jr})},[Ct]),cr=Ht==="rtl",fr=Nt(Rt),$r=(0,pe.useState)(!1),Mr=(0,se.Z)($r,2),wr=Mr[0],ei=Mr[1];(0,pe.useEffect)(function(){ei((0,oe.Z)())},[]);var Xr=(0,ge.Z)(function(){var jr;return(jr=Vn[0])===null||jr===void 0?void 0:jr.key},{value:Ut,defaultValue:on}),Zr=(0,se.Z)(Xr,2),Lr=Zr[0],Or=Zr[1],Wr=(0,pe.useState)(function(){return Vn.findIndex(function(jr){return jr.key===Lr})}),Pr=(0,se.Z)(Wr,2),di=Pr[0],Ri=Pr[1];(0,pe.useEffect)(function(){var jr=Vn.findIndex(function(_i){return _i.key===Lr});if(jr===-1){var Bi;jr=Math.max(0,Math.min(di,Vn.length-1)),Or((Bi=Vn[jr])===null||Bi===void 0?void 0:Bi.key)}Ri(jr)},[Vn.map(function(jr){return jr.key}).join("_"),Lr,di]);var Vr=(0,ge.Z)(null,{value:rt}),er=(0,se.Z)(Vr,2),Zn=er[0],Dr=er[1];(0,pe.useEffect)(function(){rt||(Dr("rc-tabs-".concat(It)),It+=1)},[]);function Sr(jr,Bi){An==null||An(jr,Bi);var _i=jr!==Lr;Or(jr),_i&&(vn==null||vn(jr))}var ri={id:Zn,activeKey:Lr,animated:fr,tabPosition:In,rtl:cr,mobile:wr},yi=(0,ae.Z)((0,ae.Z)({},ri),{},{editable:cn,locale:Jn,moreIcon:Sn,moreTransitionName:Un,tabBarGutter:wn,onTabClick:Sr,onTabScroll:En,extra:Rn,style:Nn,panes:null,getPopupContainer:kn,popupClassName:Mn,indicatorSize:Bn});return pe.createElement(we.Provider,{value:{tabs:Vn,prefixCls:Ft}},pe.createElement("div",(0,he.Z)({ref:Ke,id:rt,className:fe()(Ft,"".concat(Ft,"-").concat(In),(et={},(0,ce.Z)(et,"".concat(Ft,"-mobile"),wr),(0,ce.Z)(et,"".concat(Ft,"-editable"),cn),(0,ce.Z)(et,"".concat(Ft,"-rtl"),cr),et),Bt)},Kn),pe.createElement(ot,(0,he.Z)({},yi,{renderTabBar:fn})),pe.createElement(Le,(0,he.Z)({destroyInactiveTabPane:zt},ri,{animated:fr}))))}var dn=pe.forwardRef(Qt),At=dn,Lt=At,qt=ee(36355),Tn=ee(19716),On=()=>null,zn=ee(62892);const qn={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Xn(De){let Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},et;return Ke===!1?et={inkBar:!1,tabPane:!1}:Ke===!0?et={inkBar:!0,tabPane:!0}:et=Object.assign({inkBar:!0},typeof Ke=="object"?Ke:{}),et.tabPane&&(et.tabPaneMotion=Object.assign(Object.assign({},qn),{motionName:(0,zn.m)(De,"switch")})),et}var vr=ee(11592),_r=function(De,Ke){var et={};for(var rt in De)Object.prototype.hasOwnProperty.call(De,rt)&&Ke.indexOf(rt)<0&&(et[rt]=De[rt]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,rt=Object.getOwnPropertySymbols(De);Dt<rt.length;Dt++)Ke.indexOf(rt[Dt])<0&&Object.prototype.propertyIsEnumerable.call(De,rt[Dt])&&(et[rt[Dt]]=De[rt[Dt]]);return et};function Qn(De){return De.filter(Ke=>Ke)}function Cr(De,Ke){if(De)return De;const et=(0,vr.Z)(Ke).map(rt=>{if(pe.isValidElement(rt)){const{key:Dt,props:Ft}=rt,Bt=Ft||{},{tab:Ct}=Bt,Ht=_r(Bt,["tab"]);return Object.assign(Object.assign({key:String(Dt)},Ht),{label:Ct})}return null});return Qn(et)}var ni=ee(17313),Jr=ee(83116),Yn=ee(37613),mr=ee(13826),or=De=>{const{componentCls:Ke,motionDurationSlow:et}=De;return[{[Ke]:{[`${Ke}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${et}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${et}`}}}}},[(0,mr.oN)(De,"slide-up"),(0,mr.oN)(De,"slide-down")]]};const ii=De=>{const{componentCls:Ke,tabsCardPadding:et,cardBg:rt,cardGutter:Dt,colorBorderSecondary:Ft,itemSelectedColor:Bt}=De;return{[`${Ke}-card`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-tab`]:{margin:0,padding:et,background:rt,border:`${De.lineWidth}px ${De.lineType} ${Ft}`,transition:`all ${De.motionDurationSlow} ${De.motionEaseInOut}`},[`${Ke}-tab-active`]:{color:Bt,background:De.colorBgContainer},[`${Ke}-ink-bar`]:{visibility:"hidden"}},[`&${Ke}-top, &${Ke}-bottom`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-tab + ${Ke}-tab`]:{marginLeft:{_skip_check_:!0,value:`${Dt}px`}}}},[`&${Ke}-top`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-tab`]:{borderRadius:`${De.borderRadiusLG}px ${De.borderRadiusLG}px 0 0`},[`${Ke}-tab-active`]:{borderBottomColor:De.colorBgContainer}}},[`&${Ke}-bottom`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-tab`]:{borderRadius:`0 0 ${De.borderRadiusLG}px ${De.borderRadiusLG}px`},[`${Ke}-tab-active`]:{borderTopColor:De.colorBgContainer}}},[`&${Ke}-left, &${Ke}-right`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-tab + ${Ke}-tab`]:{marginTop:`${Dt}px`}}},[`&${Ke}-left`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-tab`]:{borderRadius:{_skip_check_:!0,value:`${De.borderRadiusLG}px 0 0 ${De.borderRadiusLG}px`}},[`${Ke}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:De.colorBgContainer}}}},[`&${Ke}-right`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${De.borderRadiusLG}px ${De.borderRadiusLG}px 0`}},[`${Ke}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:De.colorBgContainer}}}}}}},ki=De=>{const{componentCls:Ke,itemHoverColor:et,dropdownEdgeChildVerticalPadding:rt}=De;return{[`${Ke}-dropdown`]:Object.assign(Object.assign({},(0,ni.Wf)(De)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:De.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Ke}-dropdown-menu`]:{maxHeight:De.tabsDropdownHeight,margin:0,padding:`${rt}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:De.colorBgContainer,backgroundClip:"padding-box",borderRadius:De.borderRadiusLG,outline:"none",boxShadow:De.boxShadowSecondary,"&-item":Object.assign(Object.assign({},ni.vS),{display:"flex",alignItems:"center",minWidth:De.tabsDropdownWidth,margin:0,padding:`${De.paddingXXS}px ${De.paddingSM}px`,color:De.colorText,fontWeight:"normal",fontSize:De.fontSize,lineHeight:De.lineHeight,cursor:"pointer",transition:`all ${De.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:De.marginSM},color:De.colorTextDescription,fontSize:De.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:et}},"&:hover":{background:De.controlItemBgHover},"&-disabled":{"&, &:hover":{color:De.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},gi=De=>{const{componentCls:Ke,margin:et,colorBorderSecondary:rt,horizontalMargin:Dt,verticalItemPadding:Ft,verticalItemMargin:Bt}=De;return{[`${Ke}-top, ${Ke}-bottom`]:{flexDirection:"column",[`> ${Ke}-nav, > div > ${Ke}-nav`]:{margin:Dt,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${De.lineWidth}px ${De.lineType} ${rt}`,content:"''"},[`${Ke}-ink-bar`]:{height:De.lineWidthBold,"&-animated":{transition:`width ${De.motionDurationSlow}, left ${De.motionDurationSlow},
right ${De.motionDurationSlow}`}},[`${Ke}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:De.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:De.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:De.boxShadowTabsOverflowRight},[`&${Ke}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Ke}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Ke}-top`]:{[`> ${Ke}-nav,
> div > ${Ke}-nav`]:{"&::before":{bottom:0},[`${Ke}-ink-bar`]:{bottom:0}}},[`${Ke}-bottom`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{order:1,marginTop:`${et}px`,marginBottom:0,"&::before":{top:0},[`${Ke}-ink-bar`]:{top:0}},[`> ${Ke}-content-holder, > div > ${Ke}-content-holder`]:{order:0}},[`${Ke}-left, ${Ke}-right`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{flexDirection:"column",minWidth:De.controlHeight*1.25,[`${Ke}-tab`]:{padding:Ft,textAlign:"center"},[`${Ke}-tab + ${Ke}-tab`]:{margin:Bt},[`${Ke}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:De.controlHeight},"&::before":{top:0,boxShadow:De.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:De.boxShadowTabsOverflowBottom},[`&${Ke}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Ke}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Ke}-ink-bar`]:{width:De.lineWidthBold,"&-animated":{transition:`height ${De.motionDurationSlow}, top ${De.motionDurationSlow}`}},[`${Ke}-nav-list, ${Ke}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Ke}-left`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Ke}-content-holder, > div > ${Ke}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${De.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${De.lineWidth}px ${De.lineType} ${De.colorBorder}`},[`> ${Ke}-content > ${Ke}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:De.paddingLG}}}},[`${Ke}-right`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{order:1,[`${Ke}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Ke}-content-holder, > div > ${Ke}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-De.lineWidth},borderRight:{_skip_check_:!0,value:`${De.lineWidth}px ${De.lineType} ${De.colorBorder}`},[`> ${Ke}-content > ${Ke}-tabpane`]:{paddingRight:{_skip_check_:!0,value:De.paddingLG}}}}}},Li=De=>{const{componentCls:Ke,cardPaddingSM:et,cardPaddingLG:rt,horizontalItemPaddingSM:Dt,horizontalItemPaddingLG:Ft}=De;return{[Ke]:{"&-small":{[`> ${Ke}-nav`]:{[`${Ke}-tab`]:{padding:Dt,fontSize:De.titleFontSizeSM}}},"&-large":{[`> ${Ke}-nav`]:{[`${Ke}-tab`]:{padding:Ft,fontSize:De.titleFontSizeLG}}}},[`${Ke}-card`]:{[`&${Ke}-small`]:{[`> ${Ke}-nav`]:{[`${Ke}-tab`]:{padding:et}},[`&${Ke}-bottom`]:{[`> ${Ke}-nav ${Ke}-tab`]:{borderRadius:`0 0 ${De.borderRadius}px ${De.borderRadius}px`}},[`&${Ke}-top`]:{[`> ${Ke}-nav ${Ke}-tab`]:{borderRadius:`${De.borderRadius}px ${De.borderRadius}px 0 0`}},[`&${Ke}-right`]:{[`> ${Ke}-nav ${Ke}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${De.borderRadius}px ${De.borderRadius}px 0`}}},[`&${Ke}-left`]:{[`> ${Ke}-nav ${Ke}-tab`]:{borderRadius:{_skip_check_:!0,value:`${De.borderRadius}px 0 0 ${De.borderRadius}px`}}}},[`&${Ke}-large`]:{[`> ${Ke}-nav`]:{[`${Ke}-tab`]:{padding:rt}}}}}},ui=De=>{const{componentCls:Ke,itemActiveColor:et,itemHoverColor:rt,iconCls:Dt,tabsHorizontalItemMargin:Ft,horizontalItemPadding:Bt,itemSelectedColor:Ct,itemColor:Ht}=De,Ut=`${Ke}-tab`;return{[Ut]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:Bt,fontSize:De.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:Ht,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:et}},(0,ni.Qy)(De)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-De.marginXXS},marginLeft:{_skip_check_:!0,value:De.marginXS},color:De.colorTextDescription,fontSize:De.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${De.motionDurationSlow}`,"&:hover":{color:De.colorTextHeading}},"&:hover":{color:rt},[`&${Ut}-active ${Ut}-btn`]:{color:Ct,textShadow:De.tabsActiveTextShadow},[`&${Ut}-disabled`]:{color:De.colorTextDisabled,cursor:"not-allowed"},[`&${Ut}-disabled ${Ut}-btn, &${Ut}-disabled ${Ke}-remove`]:{"&:focus, &:active":{color:De.colorTextDisabled}},[`& ${Ut}-remove ${Dt}`]:{margin:0},[Dt]:{marginRight:{_skip_check_:!0,value:De.marginSM}}},[`${Ut} + ${Ut}`]:{margin:{_skip_check_:!0,value:Ft}}}},dr=De=>{const{componentCls:Ke,tabsHorizontalItemMarginRTL:et,iconCls:rt,cardGutter:Dt}=De;return{[`${Ke}-rtl`]:{direction:"rtl",[`${Ke}-nav`]:{[`${Ke}-tab`]:{margin:{_skip_check_:!0,value:et},[`${Ke}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[rt]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${De.marginSM}px`}},[`${Ke}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${De.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${De.marginXXS}px`},[rt]:{margin:0}}}},[`&${Ke}-left`]:{[`> ${Ke}-nav`]:{order:1},[`> ${Ke}-content-holder`]:{order:0}},[`&${Ke}-right`]:{[`> ${Ke}-nav`]:{order:0},[`> ${Ke}-content-holder`]:{order:1}},[`&${Ke}-card${Ke}-top, &${Ke}-card${Ke}-bottom`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-tab + ${Ke}-tab`]:{marginRight:{_skip_check_:!0,value:Dt},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Ke}-dropdown-rtl`]:{direction:"rtl"},[`${Ke}-menu-item`]:{[`${Ke}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Hr=De=>{const{componentCls:Ke,tabsCardPadding:et,cardHeight:rt,cardGutter:Dt,itemHoverColor:Ft,itemActiveColor:Bt,colorBorderSecondary:Ct}=De;return{[Ke]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ni.Wf)(De)),{display:"flex",[`> ${Ke}-nav, > div > ${Ke}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Ke}-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 ${De.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${Ke}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${De.motionDurationSlow}`},[`${Ke}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Ke}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Ke}-nav-more`]:{position:"relative",padding:et,background:"transparent",border:0,color:De.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:De.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${Ke}-nav-add`]:Object.assign({minWidth:rt,marginLeft:{_skip_check_:!0,value:Dt},padding:`0 ${De.paddingXS}px`,background:"transparent",border:`${De.lineWidth}px ${De.lineType} ${Ct}`,borderRadius:`${De.borderRadiusLG}px ${De.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:De.colorText,transition:`all ${De.motionDurationSlow} ${De.motionEaseInOut}`,"&:hover":{color:Ft},"&:active, &:focus:not(:focus-visible)":{color:Bt}},(0,ni.Qy)(De))},[`${Ke}-extra-content`]:{flex:"none"},[`${Ke}-ink-bar`]:{position:"absolute",background:De.inkBarColor,pointerEvents:"none"}}),ui(De)),{[`${Ke}-content`]:{position:"relative",width:"100%"},[`${Ke}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Ke}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Ke}-centered`]:{[`> ${Ke}-nav, > div > ${Ke}-nav`]:{[`${Ke}-nav-wrap`]:{[`&:not([class*='${Ke}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Cn=(0,Jr.Z)("Tabs",De=>{const Ke=(0,Yn.TS)(De,{tabsCardPadding:De.cardPadding||`${(De.cardHeight-Math.round(De.fontSize*De.lineHeight))/2-De.lineWidth}px ${De.padding}px`,dropdownEdgeChildVerticalPadding:De.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${De.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${De.horizontalItemGutter}px`});return[Li(Ke),dr(Ke),gi(Ke),ki(Ke),ii(Ke),Hr(Ke),or(Ke)]},De=>{const Ke=De.controlHeightLG;return{zIndexPopup:De.zIndexPopupBase+50,cardBg:De.colorFillAlter,cardHeight:Ke,cardPadding:"",cardPaddingSM:`${De.paddingXXS*1.5}px ${De.padding}px`,cardPaddingLG:`${De.paddingXS}px ${De.padding}px ${De.paddingXXS*1.5}px`,titleFontSize:De.fontSize,titleFontSizeLG:De.fontSizeLG,titleFontSizeSM:De.fontSize,inkBarColor:De.colorPrimary,horizontalMargin:`0 0 ${De.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${De.paddingSM}px 0`,horizontalItemPaddingSM:`${De.paddingXS}px 0`,horizontalItemPaddingLG:`${De.padding}px 0`,verticalItemPadding:`${De.paddingXS}px ${De.paddingLG}px`,verticalItemMargin:`${De.margin}px 0 0 0`,itemColor:De.colorText,itemSelectedColor:De.colorPrimary,itemHoverColor:De.colorPrimaryHover,itemActiveColor:De.colorPrimaryActive,cardGutter:De.marginXXS/2}}),Ee=function(De,Ke){var et={};for(var rt in De)Object.prototype.hasOwnProperty.call(De,rt)&&Ke.indexOf(rt)<0&&(et[rt]=De[rt]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,rt=Object.getOwnPropertySymbols(De);Dt<rt.length;Dt++)Ke.indexOf(rt[Dt])<0&&Object.prototype.propertyIsEnumerable.call(De,rt[Dt])&&(et[rt[Dt]]=De[rt[Dt]]);return et};const je=De=>{const{type:Ke,className:et,rootClassName:rt,size:Dt,onEdit:Ft,hideAdd:Bt,centered:Ct,addIcon:Ht,popupClassName:Ut,children:on,items:cn,animated:Rt,style:Vt,indicatorSize:In}=De,wn=Ee(De,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:Nn,moreIcon:Rn=pe.createElement(xe.Z,null)}=wn,{direction:Jn,tabs:Sn,getPrefixCls:Un,getPopupContainer:zt}=pe.useContext(qt.E_),fn=Un("tabs",Nn),[vn,An]=Cn(fn);let En;Ke==="editable-card"&&(En={onEdit:(cr,fr)=>{let{key:$r,event:Mr}=fr;Ft==null||Ft(cr==="add"?Mr:$r,cr)},removeIcon:pe.createElement(ne.Z,null),addIcon:Ht||pe.createElement(Me.Z,null),showAdd:Bt!==!0});const kn=Un(),Mn=Cr(cn,on),Bn=Xn(fn,Rt),Kn=(0,Tn.Z)(Dt),Vn=Object.assign(Object.assign({},Sn==null?void 0:Sn.style),Vt);return vn(pe.createElement(Lt,Object.assign({direction:Jn,getPopupContainer:zt,moreTransitionName:`${kn}-slide-up`},wn,{items:Mn,className:fe()({[`${fn}-${Kn}`]:Kn,[`${fn}-card`]:["card","editable-card"].includes(Ke),[`${fn}-editable-card`]:Ke==="editable-card",[`${fn}-centered`]:Ct},Sn==null?void 0:Sn.className,et,rt,An),popupClassName:fe()(Ut,An),style:Vn,editable:En,moreIcon:Rn,prefixCls:fn,animated:Bn,indicatorSize:In!=null?In:Sn==null?void 0:Sn.indicatorSize})))};je.TabPane=On;var Oe=je},12563:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return gt}});var ne=ee(59301),xe=ee(99267),Me=ee(92310),Ce=ee.n(Me),fe=ee(36785),he=ee(47729),ce=ee(14088),ae=ee(36355),se=ee(17313),ve=ee(37613),ue=ee(83116);const pe=Ve=>{const{paddingXXS:Tt,lineWidth:ct,tagPaddingHorizontal:Ot,componentCls:We}=Ve,lt=Ot-ct,ut=Tt-ct;return{[We]:Object.assign(Object.assign({},(0,se.Wf)(Ve)),{display:"inline-block",height:"auto",marginInlineEnd:Ve.marginXS,paddingInline:lt,fontSize:Ve.tagFontSize,lineHeight:Ve.tagLineHeight,whiteSpace:"nowrap",background:Ve.defaultBg,border:`${Ve.lineWidth}px ${Ve.lineType} ${Ve.colorBorder}`,borderRadius:Ve.borderRadiusSM,opacity:1,transition:`all ${Ve.motionDurationMid}`,textAlign:"start",position:"relative",[`&${We}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ve.defaultColor},[`${We}-close-icon`]:{marginInlineStart:ut,color:Ve.colorTextDescription,fontSize:Ve.tagIconSize,cursor:"pointer",transition:`all ${Ve.motionDurationMid}`,"&:hover":{color:Ve.colorTextHeading}},[`&${We}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Ve.iconCls}-close, ${Ve.iconCls}-close:hover`]:{color:Ve.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${We}-checkable-checked):hover`]:{color:Ve.colorPrimary,backgroundColor:Ve.colorFillSecondary},"&:active, &-checked":{color:Ve.colorTextLightSolid},"&-checked":{backgroundColor:Ve.colorPrimary,"&:hover":{backgroundColor:Ve.colorPrimaryHover}},"&:active":{backgroundColor:Ve.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Ve.iconCls} + span, > span + ${Ve.iconCls}`]:{marginInlineStart:lt}}),[`${We}-borderless`]:{borderColor:"transparent",background:Ve.tagBorderlessBg}}},oe=Ve=>{const{lineWidth:Tt,fontSizeIcon:ct}=Ve,Ot=Ve.fontSizeSM,We=`${Ve.lineHeightSM*Ot}px`;return(0,ve.TS)(Ve,{tagFontSize:Ot,tagLineHeight:We,tagIconSize:ct-2*Tt,tagPaddingHorizontal:8,tagBorderlessBg:Ve.colorFillTertiary})},ge=Ve=>({defaultBg:Ve.colorFillQuaternary,defaultColor:Ve.colorText});var ye=(0,ue.Z)("Tag",Ve=>{const Tt=oe(Ve);return pe(Tt)},ge),we=function(Ve,Tt){var ct={};for(var Ot in Ve)Object.prototype.hasOwnProperty.call(Ve,Ot)&&Tt.indexOf(Ot)<0&&(ct[Ot]=Ve[Ot]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,Ot=Object.getOwnPropertySymbols(Ve);We<Ot.length;We++)Tt.indexOf(Ot[We])<0&&Object.prototype.propertyIsEnumerable.call(Ve,Ot[We])&&(ct[Ot[We]]=Ve[Ot[We]]);return ct},ze=Ve=>{const{prefixCls:Tt,style:ct,className:Ot,checked:We,onChange:lt,onClick:ut}=Ve,St=we(Ve,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:qe,tag:Ze}=ne.useContext(ae.E_),wt=jt=>{lt==null||lt(!We),ut==null||ut(jt)},Wt=qe("tag",Tt),[Kt,_t]=ye(Wt),vt=Ce()(Wt,`${Wt}-checkable`,{[`${Wt}-checkable-checked`]:We},Ze==null?void 0:Ze.className,Ot,_t);return Kt(ne.createElement("span",Object.assign({},St,{style:Object.assign(Object.assign({},ct),Ze==null?void 0:Ze.style),className:vt,onClick:wt})))},$e=ee(45157);const Le=Ve=>(0,$e.Z)(Ve,(Tt,ct)=>{let{textColor:Ot,lightBorderColor:We,lightColor:lt,darkColor:ut}=ct;return{[`${Ve.componentCls}-${Tt}`]:{color:Ot,background:lt,borderColor:We,"&-inverse":{color:Ve.colorTextLightSolid,background:ut,borderColor:ut},[`&${Ve.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Ne=(0,ue.b)(["Tag","preset"],Ve=>{const Tt=oe(Ve);return Le(Tt)},ge);function Re(Ve){return typeof Ve!="string"?Ve:Ve.charAt(0).toUpperCase()+Ve.slice(1)}const Se=(Ve,Tt,ct)=>{const Ot=Re(ct);return{[`${Ve.componentCls}-${Tt}`]:{color:Ve[`color${ct}`],background:Ve[`color${Ot}Bg`],borderColor:Ve[`color${Ot}Border`],[`&${Ve.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ie=(0,ue.b)(["Tag","status"],Ve=>{const Tt=oe(Ve);return[Se(Tt,"success","Success"),Se(Tt,"processing","Info"),Se(Tt,"error","Error"),Se(Tt,"warning","Warning")]},ge),Ae=function(Ve,Tt){var ct={};for(var Ot in Ve)Object.prototype.hasOwnProperty.call(Ve,Ot)&&Tt.indexOf(Ot)<0&&(ct[Ot]=Ve[Ot]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,Ot=Object.getOwnPropertySymbols(Ve);We<Ot.length;We++)Tt.indexOf(Ot[We])<0&&Object.prototype.propertyIsEnumerable.call(Ve,Ot[We])&&(ct[Ot[We]]=Ve[Ot[We]]);return ct};const it=(Ve,Tt)=>{const{prefixCls:ct,className:Ot,rootClassName:We,style:lt,children:ut,icon:St,color:qe,onClose:Ze,closeIcon:wt,closable:Wt,bordered:Kt=!0}=Ve,_t=Ae(Ve,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:vt,direction:jt,tag:yn}=ne.useContext(ae.E_),[Xt,Ln]=ne.useState(!0);ne.useEffect(()=>{"visible"in _t&&Ln(_t.visible)},[_t.visible]);const pn=(0,fe.o2)(qe),hn=(0,fe.yT)(qe),un=pn||hn,Xe=Object.assign(Object.assign({backgroundColor:qe&&!un?qe:void 0},yn==null?void 0:yn.style),lt),ke=vt("tag",ct),[_e,Te]=ye(ke),Fe=Ce()(ke,yn==null?void 0:yn.className,{[`${ke}-${qe}`]:un,[`${ke}-has-color`]:qe&&!un,[`${ke}-hidden`]:!Xt,[`${ke}-rtl`]:jt==="rtl",[`${ke}-borderless`]:!Kt},Ot,We,Te),me=ot=>{ot.stopPropagation(),Ze==null||Ze(ot),!ot.defaultPrevented&&Ln(!1)},[,at]=(0,he.Z)(Wt,wt,ot=>ot===null?ne.createElement(xe.Z,{className:`${ke}-close-icon`,onClick:me}):ne.createElement("span",{className:`${ke}-close-icon`,onClick:me},ot),null,!1),Pt=typeof _t.onClick=="function"||ut&&ut.type==="a",Qe=St||null,Je=Qe?ne.createElement(ne.Fragment,null,Qe,ut&&ne.createElement("span",null,ut)):ut,xt=ne.createElement("span",Object.assign({},_t,{ref:Tt,className:Fe,style:Xe}),Je,at,pn&&ne.createElement(Ne,{key:"preset",prefixCls:ke}),hn&&ne.createElement(Ie,{key:"status",prefixCls:ke}));return _e(Pt?ne.createElement(ce.Z,{component:"Tag"},xt):xt)},Ue=ne.forwardRef(it);Ue.CheckableTag=ze;var gt=Ue},17574:function(gn,kt,ee){"use strict";ee.d(kt,{default:function(){return qe}});var ne=ee(38028),xe=ee(77654),Me=ee(52671),Ce=ee(8657),fe=ee(60499),he=ee(59301),ce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},ae=ce,se=ee(7657),ve=function(wt,Wt){return he.createElement(se.Z,(0,fe.Z)({},wt,{ref:Wt,icon:ae}))},ue=he.forwardRef(ve),pe=ue,oe=ee(92310),ge=ee.n(oe),ye=ee(35654),we=ee(71430),Be=ee(36355),ze=ee(56082),$e=ee(62892),Le=ee(20648);const Ne=4;function Re(Ze){const{dropPosition:wt,dropLevelOffset:Wt,prefixCls:Kt,indent:_t,direction:vt="ltr"}=Ze,jt=vt==="ltr"?"left":"right",yn=vt==="ltr"?"right":"left",Xt={[jt]:-Wt*_t+Ne,[yn]:0};switch(wt){case-1:Xt.top=-3;break;case 1:Xt.bottom=-3;break;default:Xt.bottom=-3,Xt[jt]=_t+Ne;break}return he.createElement("div",{style:Xt,className:`${Kt}-drop-indicator`})}var Se=ee(71997),Ae=he.forwardRef((Ze,wt)=>{const{getPrefixCls:Wt,direction:Kt,virtual:_t,tree:vt}=he.useContext(Be.E_),{prefixCls:jt,className:yn,showIcon:Xt=!1,showLine:Ln,switcherIcon:pn,blockNode:hn=!1,children:un,checkable:Xe=!1,selectable:ke=!0,draggable:_e,motion:Te,style:Fe}=Ze,me=Wt("tree",jt),at=Wt(),Pt=Te!=null?Te:Object.assign(Object.assign({},(0,$e.Z)(at)),{motionAppear:!1}),Qe=Object.assign(Object.assign({},Ze),{checkable:Xe,selectable:ke,showIcon:Xt,motion:Pt,blockNode:hn,showLine:!!Ln,dropIndicatorRender:Re}),[Je,xt]=(0,Le.ZP)(me),ot=he.useMemo(()=>{if(!_e)return!1;let Nt={};switch(typeof _e){case"function":Nt.nodeDraggable=_e;break;case"object":Nt=Object.assign({},_e);break;default:break}return Nt.icon!==!1&&(Nt.icon=Nt.icon||he.createElement(ze.Z,null)),Nt},[_e]),mt=Nt=>he.createElement(Se.Z,{prefixCls:me,switcherIcon:pn,treeNodeProps:Nt,showLine:Ln});return Je(he.createElement(ne.Z,Object.assign({itemHeight:20,ref:wt,virtual:_t},Qe,{style:Object.assign(Object.assign({},vt==null?void 0:vt.style),Fe),prefixCls:me,className:ge()({[`${me}-icon-hide`]:!Xt,[`${me}-block-node`]:hn,[`${me}-unselectable`]:!ke,[`${me}-rtl`]:Kt==="rtl"},vt==null?void 0:vt.className,yn,xt),direction:Kt,checkable:Xe&&he.createElement("span",{className:`${me}-checkbox-inner`}),selectable:ke,switcherIcon:mt,draggable:ot}),un))}),it;(function(Ze){Ze[Ze.None=0]="None",Ze[Ze.Start=1]="Start",Ze[Ze.End=2]="End"})(it||(it={}));function Ue(Ze,wt){function Wt(Kt){const{key:_t,children:vt}=Kt;wt(_t,Kt)!==!1&&Ue(vt||[],wt)}Ze.forEach(Wt)}function gt(Ze){let{treeData:wt,expandedKeys:Wt,startKey:Kt,endKey:_t}=Ze;const vt=[];let jt=it.None;if(Kt&&Kt===_t)return[Kt];if(!Kt||!_t)return[];function yn(Xt){return Xt===Kt||Xt===_t}return Ue(wt,Xt=>{if(jt===it.End)return!1;if(yn(Xt)){if(vt.push(Xt),jt===it.None)jt=it.Start;else if(jt===it.Start)return jt=it.End,!1}else jt===it.Start&&vt.push(Xt);return Wt.includes(Xt)}),vt}function Ve(Ze,wt){const Wt=(0,xe.Z)(wt),Kt=[];return Ue(Ze,(_t,vt)=>{const jt=Wt.indexOf(_t);return jt!==-1&&(Kt.push(vt),Wt.splice(jt,1)),!!Wt.length}),Kt}var Tt=function(Ze,wt){var Wt={};for(var Kt in Ze)Object.prototype.hasOwnProperty.call(Ze,Kt)&&wt.indexOf(Kt)<0&&(Wt[Kt]=Ze[Kt]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Kt=Object.getOwnPropertySymbols(Ze);_t<Kt.length;_t++)wt.indexOf(Kt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Kt[_t])&&(Wt[Kt[_t]]=Ze[Kt[_t]]);return Wt};function ct(Ze){const{isLeaf:wt,expanded:Wt}=Ze;return wt?he.createElement(Me.Z,null):Wt?he.createElement(Ce.Z,null):he.createElement(pe,null)}function Ot(Ze){let{treeData:wt,children:Wt}=Ze;return wt||(0,we.zn)(Wt)}const We=(Ze,wt)=>{var{defaultExpandAll:Wt,defaultExpandParent:Kt,defaultExpandedKeys:_t}=Ze,vt=Tt(Ze,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const jt=he.useRef(),yn=he.useRef(),Xt=()=>{const{keyEntities:ot}=(0,we.I8)(Ot(vt));let mt;return Wt?mt=Object.keys(ot):Kt?mt=(0,ye.r7)(vt.expandedKeys||_t||[],ot):mt=vt.expandedKeys||_t,mt},[Ln,pn]=he.useState(vt.selectedKeys||vt.defaultSelectedKeys||[]),[hn,un]=he.useState(()=>Xt());he.useEffect(()=>{"selectedKeys"in vt&&pn(vt.selectedKeys)},[vt.selectedKeys]),he.useEffect(()=>{"expandedKeys"in vt&&un(vt.expandedKeys)},[vt.expandedKeys]);const Xe=(ot,mt)=>{var Nt;return"expandedKeys"in vt||un(ot),(Nt=vt.onExpand)===null||Nt===void 0?void 0:Nt.call(vt,ot,mt)},ke=(ot,mt)=>{var Nt;const{multiple:rn}=vt,{node:It,nativeEvent:Qt}=mt,{key:dn=""}=It,At=Ot(vt),Lt=Object.assign(Object.assign({},mt),{selected:!0}),qt=(Qt==null?void 0:Qt.ctrlKey)||(Qt==null?void 0:Qt.metaKey),Tn=Qt==null?void 0:Qt.shiftKey;let Jt;rn&&qt?(Jt=ot,jt.current=dn,yn.current=Jt,Lt.selectedNodes=Ve(At,Jt)):rn&&Tn?(Jt=Array.from(new Set([].concat((0,xe.Z)(yn.current||[]),(0,xe.Z)(gt({treeData:At,expandedKeys:hn,startKey:dn,endKey:jt.current}))))),Lt.selectedNodes=Ve(At,Jt)):(Jt=[dn],jt.current=dn,yn.current=Jt,Lt.selectedNodes=Ve(At,Jt)),(Nt=vt.onSelect)===null||Nt===void 0||Nt.call(vt,Jt,Lt),"selectedKeys"in vt||pn(Jt)},{getPrefixCls:_e,direction:Te}=he.useContext(Be.E_),{prefixCls:Fe,className:me,showIcon:at=!0,expandAction:Pt="click"}=vt,Qe=Tt(vt,["prefixCls","className","showIcon","expandAction"]),Je=_e("tree",Fe),xt=ge()(`${Je}-directory`,{[`${Je}-directory-rtl`]:Te==="rtl"},me);return he.createElement(Ae,Object.assign({icon:ct,ref:wt,blockNode:!0},Qe,{showIcon:at,expandAction:Pt,prefixCls:Je,className:xt,expandedKeys:hn,selectedKeys:Ln,onSelect:ke,onExpand:Xe}))};var ut=he.forwardRef(We);const St=Ae;St.DirectoryTree=ut,St.TreeNode=ne.O;var qe=St},20648:function(gn,kt,ee){"use strict";ee.d(kt,{TM:function(){return oe},Yk:function(){return pe}});var ne=ee(36237),xe=ee(98447),Me=ee(17313),Ce=ee(8378),fe=ee(37613),he=ee(83116);const ce=new ne.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),ae=(ge,ye)=>({[`.${ge}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${ye.motionDurationSlow}`}}}),se=(ge,ye)=>({[`.${ge}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:ye.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${ye.lineWidthBold}px solid ${ye.colorPrimary}`,borderRadius:"50%",content:'""'}}}),ve=(ge,ye)=>{const{treeCls:we,treeNodeCls:Be,treeNodePadding:ze,titleHeight:$e,nodeSelectedBg:Le,nodeHoverBg:Ne}=ye,Re=ye.paddingXS;return{[we]:Object.assign(Object.assign({},(0,Me.Wf)(ye)),{background:ye.colorBgContainer,borderRadius:ye.borderRadius,transition:`background-color ${ye.motionDurationSlow}`,[`&${we}-rtl`]:{[`${we}-switcher`]:{"&_close":{[`${we}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${we}-active-focused)`]:Object.assign({},(0,Me.oN)(ye)),[`${we}-list-holder-inner`]:{alignItems:"flex-start"},[`&${we}-block-node`]:{[`${we}-list-holder-inner`]:{alignItems:"stretch",[`${we}-node-content-wrapper`]:{flex:"auto"},[`${Be}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:ze,insetInlineStart:0,border:`1px solid ${ye.colorPrimary}`,opacity:0,animationName:ce,animationDuration:ye.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${Be}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${ze}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${we}-node-content-wrapper`]:{color:ye.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${we}-node-content-wrapper`]:Object.assign({},(0,Me.oN)(ye)),[`&:not(${Be}-disabled).filter-node ${we}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${we}-draggable-icon`]:{flexShrink:0,width:$e,lineHeight:`${$e}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${ye.motionDurationSlow}`,[`${Be}:hover &`]:{opacity:.45}},[`&${Be}-disabled`]:{[`${we}-draggable-icon`]:{visibility:"hidden"}}}},[`${we}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:$e}},[`${we}-draggable-icon`]:{visibility:"hidden"},[`${we}-switcher`]:Object.assign(Object.assign({},ae(ge,ye)),{position:"relative",flex:"none",alignSelf:"stretch",width:$e,margin:0,lineHeight:`${$e}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${we}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:ye.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:$e/2,bottom:-ze,marginInlineStart:-1,borderInlineEnd:`1px solid ${ye.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:$e/2*.8,height:$e/2,borderBottom:`1px solid ${ye.colorBorder}`,content:'""'}}}),[`${we}-checkbox`]:{top:"initial",marginInlineEnd:Re},[`${we}-node-content-wrapper, ${we}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:$e,margin:0,padding:`0 ${ye.paddingXS/2}px`,color:"inherit",lineHeight:`${$e}px`,background:"transparent",borderRadius:ye.borderRadius,cursor:"pointer",transition:`all ${ye.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:Ne},[`&${we}-node-selected`]:{backgroundColor:Le},[`${we}-iconEle`]:{display:"inline-block",width:$e,height:$e,lineHeight:`${$e}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${we}-unselectable ${we}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${we}-node-content-wrapper`]:Object.assign({lineHeight:`${$e}px`,userSelect:"none"},se(ge,ye)),[`${Be}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${ye.colorPrimary}`}},"&-show-line":{[`${we}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:$e/2,bottom:-ze,borderInlineEnd:`1px solid ${ye.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${we}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${Be}-leaf-last`]:{[`${we}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${$e/2}px !important`}}}}})}},ue=ge=>{const{treeCls:ye,treeNodeCls:we,treeNodePadding:Be,directoryNodeSelectedBg:ze,directoryNodeSelectedColor:$e}=ge;return{[`${ye}${ye}-directory`]:{[we]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:Be,insetInlineStart:0,transition:`background-color ${ge.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:ge.controlItemBgHover}},"> *":{zIndex:1},[`${ye}-switcher`]:{transition:`color ${ge.motionDurationMid}`},[`${ye}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${ye}-node-selected`]:{color:$e,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:ze},[`${ye}-switcher`]:{color:$e},[`${ye}-node-content-wrapper`]:{color:$e,background:"transparent"}}}}}},pe=(ge,ye)=>{const we=`.${ge}`,Be=`${we}-treenode`,ze=ye.paddingXS/2,$e=(0,fe.TS)(ye,{treeCls:we,treeNodeCls:Be,treeNodePadding:ze});return[ve(ge,$e),ue($e)]},oe=ge=>{const{controlHeightSM:ye}=ge;return{titleHeight:ye,nodeHoverBg:ge.controlItemBgHover,nodeSelectedBg:ge.controlItemBgActive}};kt.ZP=(0,he.Z)("Tree",(ge,ye)=>{let{prefixCls:we}=ye;return[{[ge.componentCls]:(0,xe.C2)(`${we}-checkbox`,ge)},pe(we,ge),(0,Ce.Z)(ge)]},ge=>{const{colorTextLightSolid:ye,colorPrimary:we}=ge;return Object.assign(Object.assign({},oe(ge)),{directoryNodeSelectedColor:ye,directoryNodeSelectedBg:we})})},71997:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Be}});var ne=ee(60499),xe=ee(59301),Me={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},Ce=Me,fe=ee(7657),he=function($e,Le){return xe.createElement(fe.Z,(0,ne.Z)({},$e,{ref:Le,icon:Ce}))},ce=xe.forwardRef(he),ae=ce,se=ee(52671),ve=ee(58617),ue=ee(15075),pe=ee(43531),oe=ee(92310),ge=ee.n(oe),ye=ee(92343),Be=ze=>{const{prefixCls:$e,switcherIcon:Le,treeNodeProps:Ne,showLine:Re}=ze,{isLeaf:Se,expanded:Ie,loading:Ae}=Ne;if(Ae)return xe.createElement(ve.Z,{className:`${$e}-switcher-loading-icon`});let it;if(Re&&typeof Re=="object"&&(it=Re.showLeafIcon),Se){if(!Re)return null;if(typeof it!="boolean"&&it){const Ve=typeof it=="function"?it(Ne):it,Tt=`${$e}-switcher-line-custom-icon`;return(0,ye.l$)(Ve)?(0,ye.Tm)(Ve,{className:ge()(Ve.props.className||"",Tt)}):Ve}return it?xe.createElement(se.Z,{className:`${$e}-switcher-line-icon`}):xe.createElement("span",{className:`${$e}-switcher-leaf-line`})}const Ue=`${$e}-switcher-icon`,gt=typeof Le=="function"?Le(Ne):Le;return(0,ye.l$)(gt)?(0,ye.Tm)(gt,{className:ge()(gt.props.className||"",Ue)}):gt!==void 0?gt:Re?Ie?xe.createElement(ue.Z,{className:`${$e}-switcher-line-icon`}):xe.createElement(pe.Z,{className:`${$e}-switcher-line-icon`}):xe.createElement(ae,{className:Ue})}},99498:function(gn,kt,ee){(function(ne){ne(ee(89780))})(function(ne){ne.defineOption("placeholder","",function(ae,se,ve){var ue=ve&&ve!=ne.Init;if(se&&!ue)ae.on("blur",fe),ae.on("change",he),ae.on("swapDoc",he),ne.on(ae.getInputField(),"compositionupdate",ae.state.placeholderCompose=function(){Ce(ae)}),he(ae);else if(!se&&ue){ae.off("blur",fe),ae.off("change",he),ae.off("swapDoc",he),ne.off(ae.getInputField(),"compositionupdate",ae.state.placeholderCompose),xe(ae);var pe=ae.getWrapperElement();pe.className=pe.className.replace(" CodeMirror-empty","")}se&&!ae.hasFocus()&&fe(ae)});function xe(ae){ae.state.placeholder&&(ae.state.placeholder.parentNode.removeChild(ae.state.placeholder),ae.state.placeholder=null)}function Me(ae){xe(ae);var se=ae.state.placeholder=document.createElement("pre");se.style.cssText="height: 0; overflow: visible",se.style.direction=ae.getOption("direction"),se.className="CodeMirror-placeholder CodeMirror-line-like";var ve=ae.getOption("placeholder");typeof ve=="string"&&(ve=document.createTextNode(ve)),se.appendChild(ve),ae.display.lineSpace.insertBefore(se,ae.display.lineSpace.firstChild)}function Ce(ae){setTimeout(function(){var se=!1,ve=ae.getInputField();ve.nodeName=="TEXTAREA"?se=!ve.value:ae.lineCount()==1&&(se=!/[^\u200b]/.test(ve.querySelector(".CodeMirror-line").textContent)),se?Me(ae):xe(ae)},20)}function fe(ae){ce(ae)&&Me(ae)}function he(ae){var se=ae.getWrapperElement(),ve=ce(ae);se.className=se.className.replace(" CodeMirror-empty","")+(ve?" CodeMirror-empty":""),ve?Me(ae):xe(ae)}function ce(ae){return ae.lineCount()===1&&ae.getLine(0)===""}})},25717:function(gn,kt,ee){(function(ne){ne(ee(89780))})(function(ne){var xe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Me=ne.Pos;ne.defineOption("autoCloseBrackets",!1,function(ye,we,Be){Be&&Be!=ne.Init&&(ye.removeKeyMap(fe),ye.state.closeBrackets=null),we&&(he(Ce(we,"pairs")),ye.state.closeBrackets=we,ye.addKeyMap(fe))});function Ce(ye,we){return we=="pairs"&&typeof ye=="string"?ye:typeof ye=="object"&&ye[we]!=null?ye[we]:xe[we]}var fe={Backspace:se,Enter:ve};function he(ye){for(var we=0;we<ye.length;we++){var Be=ye.charAt(we),ze="'"+Be+"'";fe[ze]||(fe[ze]=ce(Be))}}he(xe.pairs+"`");function ce(ye){return function(we){return pe(we,ye)}}function ae(ye){var we=ye.state.closeBrackets;if(!we||we.override)return we;var Be=ye.getModeAt(ye.getCursor());return Be.closeBrackets||we}function se(ye){var we=ae(ye);if(!we||ye.getOption("disableInput"))return ne.Pass;for(var Be=Ce(we,"pairs"),ze=ye.listSelections(),$e=0;$e<ze.length;$e++){if(!ze[$e].empty())return ne.Pass;var Le=oe(ye,ze[$e].head);if(!Le||Be.indexOf(Le)%2!=0)return ne.Pass}for(var $e=ze.length-1;$e>=0;$e--){var Ne=ze[$e].head;ye.replaceRange("",Me(Ne.line,Ne.ch-1),Me(Ne.line,Ne.ch+1),"+delete")}}function ve(ye){var we=ae(ye),Be=we&&Ce(we,"explode");if(!Be||ye.getOption("disableInput"))return ne.Pass;for(var ze=ye.listSelections(),$e=0;$e<ze.length;$e++){if(!ze[$e].empty())return ne.Pass;var Le=oe(ye,ze[$e].head);if(!Le||Be.indexOf(Le)%2!=0)return ne.Pass}ye.operation(function(){var Ne=ye.lineSeparator()||`
`;ye.replaceSelection(Ne+Ne,null),ye.execCommand("goCharLeft"),ze=ye.listSelections();for(var Re=0;Re<ze.length;Re++){var Se=ze[Re].head.line;ye.indentLine(Se,null,!0),ye.indentLine(Se+1,null,!0)}})}function ue(ye){var we=ne.cmpPos(ye.anchor,ye.head)>0;return{anchor:new Me(ye.anchor.line,ye.anchor.ch+(we?-1:1)),head:new Me(ye.head.line,ye.head.ch+(we?1:-1))}}function pe(ye,we){var Be=ae(ye);if(!Be||ye.getOption("disableInput"))return ne.Pass;var ze=Ce(Be,"pairs"),$e=ze.indexOf(we);if($e==-1)return ne.Pass;for(var Le=Ce(Be,"closeBefore"),Ne=Ce(Be,"triples"),Re=ze.charAt($e+1)==we,Se=ye.listSelections(),Ie=$e%2==0,Ae,it=0;it<Se.length;it++){var Ue=Se[it],gt=Ue.head,Ve,Tt=ye.getRange(gt,Me(gt.line,gt.ch+1));if(Ie&&!Ue.empty())Ve="surround";else if((Re||!Ie)&&Tt==we)Re&&ge(ye,gt)?Ve="both":Ne.indexOf(we)>=0&&ye.getRange(gt,Me(gt.line,gt.ch+3))==we+we+we?Ve="skipThree":Ve="skip";else if(Re&&gt.ch>1&&Ne.indexOf(we)>=0&&ye.getRange(Me(gt.line,gt.ch-2),gt)==we+we){if(gt.ch>2&&/\bstring/.test(ye.getTokenTypeAt(Me(gt.line,gt.ch-2))))return ne.Pass;Ve="addFour"}else if(Re){var ct=gt.ch==0?" ":ye.getRange(Me(gt.line,gt.ch-1),gt);if(!ne.isWordChar(Tt)&&ct!=we&&!ne.isWordChar(ct))Ve="both";else return ne.Pass}else if(Ie&&(Tt.length===0||/\s/.test(Tt)||Le.indexOf(Tt)>-1))Ve="both";else return ne.Pass;if(!Ae)Ae=Ve;else if(Ae!=Ve)return ne.Pass}var Ot=$e%2?ze.charAt($e-1):we,We=$e%2?we:ze.charAt($e+1);ye.operation(function(){if(Ae=="skip")ye.execCommand("goCharRight");else if(Ae=="skipThree")for(var lt=0;lt<3;lt++)ye.execCommand("goCharRight");else if(Ae=="surround"){for(var ut=ye.getSelections(),lt=0;lt<ut.length;lt++)ut[lt]=Ot+ut[lt]+We;ye.replaceSelections(ut,"around"),ut=ye.listSelections().slice();for(var lt=0;lt<ut.length;lt++)ut[lt]=ue(ut[lt]);ye.setSelections(ut)}else Ae=="both"?(ye.replaceSelection(Ot+We,null),ye.triggerElectric(Ot+We),ye.execCommand("goCharLeft")):Ae=="addFour"&&(ye.replaceSelection(Ot+Ot+Ot+Ot,"before"),ye.execCommand("goCharRight"))})}function oe(ye,we){var Be=ye.getRange(Me(we.line,we.ch-1),Me(we.line,we.ch+1));return Be.length==2?Be:null}function ge(ye,we){var Be=ye.getTokenAt(Me(we.line,we.ch+1));return/\bstring/.test(Be.type)&&Be.start==we.ch&&(we.ch==0||!/\bstring/.test(ye.getTokenTypeAt(we)))}})},6313:function(gn,kt,ee){(function(ne){ne(ee(89780),ee(32855))})(function(ne){ne.defineOption("autoCloseTags",!1,function(se,ve,ue){if(ue!=ne.Init&&ue&&se.removeKeyMap("autoCloseTags"),!!ve){var pe={name:"autoCloseTags"};(typeof ve!="object"||ve.whenClosing!==!1)&&(pe["'/'"]=function(oe){return he(oe)}),(typeof ve!="object"||ve.whenOpening!==!1)&&(pe["'>'"]=function(oe){return Ce(oe)}),se.addKeyMap(pe)}});var xe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Me=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Ce(se){if(se.getOption("disableInput"))return ne.Pass;for(var ve=se.listSelections(),ue=[],pe=se.getOption("autoCloseTags"),oe=0;oe<ve.length;oe++){if(!ve[oe].empty())return ne.Pass;var ge=ve[oe].head,ye=se.getTokenAt(ge),we=ne.innerMode(se.getMode(),ye.state),Be=we.state,ze=we.mode.xmlCurrentTag&&we.mode.xmlCurrentTag(Be),$e=ze&&ze.name;if(!$e)return ne.Pass;var Le=we.mode.configuration=="html",Ne=typeof pe=="object"&&pe.dontCloseTags||Le&&xe,Re=typeof pe=="object"&&pe.indentTags||Le&&Me;ye.end>ge.ch&&($e=$e.slice(0,$e.length-ye.end+ge.ch));var Se=$e.toLowerCase();if(!$e||ye.type=="string"&&(ye.end!=ge.ch||!/[\"\']/.test(ye.string.charAt(ye.string.length-1))||ye.string.length==1)||ye.type=="tag"&&ze.close||ye.string.indexOf("/")==ge.ch-ye.start-1||Ne&&ce(Ne,Se)>-1||ae(se,we.mode.xmlCurrentContext&&we.mode.xmlCurrentContext(Be)||[],$e,ge,!0))return ne.Pass;var Ie=typeof pe=="object"&&pe.emptyTags;if(Ie&&ce(Ie,$e)>-1){ue[oe]={text:"/>",newPos:ne.Pos(ge.line,ge.ch+2)};continue}var Ae=Re&&ce(Re,Se)>-1;ue[oe]={indent:Ae,text:">"+(Ae?`
`:"")+"</"+$e+">",newPos:Ae?ne.Pos(ge.line+1,0):ne.Pos(ge.line,ge.ch+1)}}for(var it=typeof pe=="object"&&pe.dontIndentOnAutoClose,oe=ve.length-1;oe>=0;oe--){var Ue=ue[oe];se.replaceRange(Ue.text,ve[oe].head,ve[oe].anchor,"+insert");var gt=se.listSelections().slice(0);gt[oe]={head:Ue.newPos,anchor:Ue.newPos},se.setSelections(gt),!it&&Ue.indent&&(se.indentLine(Ue.newPos.line,null,!0),se.indentLine(Ue.newPos.line+1,null,!0))}}function fe(se,ve){for(var ue=se.listSelections(),pe=[],oe=ve?"/":"</",ge=se.getOption("autoCloseTags"),ye=typeof ge=="object"&&ge.dontIndentOnSlash,we=0;we<ue.length;we++){if(!ue[we].empty())return ne.Pass;var Be=ue[we].head,ze=se.getTokenAt(Be),$e=ne.innerMode(se.getMode(),ze.state),Le=$e.state;if(ve&&(ze.type=="string"||ze.string.charAt(0)!="<"||ze.start!=Be.ch-1))return ne.Pass;var Ne,Re=$e.mode.name!="xml"&&se.getMode().name=="htmlmixed";if(Re&&$e.mode.name=="javascript")Ne=oe+"script";else if(Re&&$e.mode.name=="css")Ne=oe+"style";else{var Se=$e.mode.xmlCurrentContext&&$e.mode.xmlCurrentContext(Le);if(!Se||Se.length&&ae(se,Se,Se[Se.length-1],Be))return ne.Pass;Ne=oe+Se[Se.length-1]}se.getLine(Be.line).charAt(ze.end)!=">"&&(Ne+=">"),pe[we]=Ne}if(se.replaceSelections(pe),ue=se.listSelections(),!ye)for(var we=0;we<ue.length;we++)(we==ue.length-1||ue[we].head.line<ue[we+1].head.line)&&se.indentLine(ue[we].head.line)}function he(se){return se.getOption("disableInput")?ne.Pass:fe(se,!0)}ne.commands.closeTag=function(se){return fe(se)};function ce(se,ve){if(se.indexOf)return se.indexOf(ve);for(var ue=0,pe=se.length;ue<pe;++ue)if(se[ue]==ve)return ue;return-1}function ae(se,ve,ue,pe,oe){if(!ne.scanForClosingTag)return!1;var ge=Math.min(se.lastLine()+1,pe.line+500),ye=ne.scanForClosingTag(se,pe,null,ge);if(!ye||ye.tag!=ue)return!1;for(var we=oe?1:0,Be=ve.length-1;Be>=0&&ve[Be]==ue;Be--)++we;pe=ye.to;for(var Be=1;Be<we;Be++){var ze=ne.scanForClosingTag(se,pe,null,ge);if(!ze||ze.tag!=ue)return!1;pe=ze.to}return!0}})},32855:function(gn,kt,ee){(function(ne){ne(ee(89780))})(function(ne){"use strict";var xe=ne.Pos;function Me(Be,ze){return Be.line-ze.line||Be.ch-ze.ch}var Ce="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",fe=Ce+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",he=new RegExp("<(/?)(["+Ce+"]["+fe+"]*)","g");function ce(Be,ze,$e,Le){this.line=ze,this.ch=$e,this.cm=Be,this.text=Be.getLine(ze),this.min=Le?Math.max(Le.from,Be.firstLine()):Be.firstLine(),this.max=Le?Math.min(Le.to-1,Be.lastLine()):Be.lastLine()}function ae(Be,ze){var $e=Be.cm.getTokenTypeAt(xe(Be.line,ze));return $e&&/\btag\b/.test($e)}function se(Be){if(!(Be.line>=Be.max))return Be.ch=0,Be.text=Be.cm.getLine(++Be.line),!0}function ve(Be){if(!(Be.line<=Be.min))return Be.text=Be.cm.getLine(--Be.line),Be.ch=Be.text.length,!0}function ue(Be){for(;;){var ze=Be.text.indexOf(">",Be.ch);if(ze==-1){if(se(Be))continue;return}if(!ae(Be,ze+1)){Be.ch=ze+1;continue}var $e=Be.text.lastIndexOf("/",ze),Le=$e>-1&&!/\S/.test(Be.text.slice($e+1,ze));return Be.ch=ze+1,Le?"selfClose":"regular"}}function pe(Be){for(;;){var ze=Be.ch?Be.text.lastIndexOf("<",Be.ch-1):-1;if(ze==-1){if(ve(Be))continue;return}if(!ae(Be,ze+1)){Be.ch=ze;continue}he.lastIndex=ze,Be.ch=ze;var $e=he.exec(Be.text);if($e&&$e.index==ze)return $e}}function oe(Be){for(;;){he.lastIndex=Be.ch;var ze=he.exec(Be.text);if(!ze){if(se(Be))continue;return}if(!ae(Be,ze.index+1)){Be.ch=ze.index+1;continue}return Be.ch=ze.index+ze[0].length,ze}}function ge(Be){for(;;){var ze=Be.ch?Be.text.lastIndexOf(">",Be.ch-1):-1;if(ze==-1){if(ve(Be))continue;return}if(!ae(Be,ze+1)){Be.ch=ze;continue}var $e=Be.text.lastIndexOf("/",ze),Le=$e>-1&&!/\S/.test(Be.text.slice($e+1,ze));return Be.ch=ze+1,Le?"selfClose":"regular"}}function ye(Be,ze){for(var $e=[];;){var Le=oe(Be),Ne,Re=Be.line,Se=Be.ch-(Le?Le[0].length:0);if(!Le||!(Ne=ue(Be)))return;if(Ne!="selfClose")if(Le[1]){for(var Ie=$e.length-1;Ie>=0;--Ie)if($e[Ie]==Le[2]){$e.length=Ie;break}if(Ie<0&&(!ze||ze==Le[2]))return{tag:Le[2],from:xe(Re,Se),to:xe(Be.line,Be.ch)}}else $e.push(Le[2])}}function we(Be,ze){for(var $e=[];;){var Le=ge(Be);if(!Le)return;if(Le=="selfClose"){pe(Be);continue}var Ne=Be.line,Re=Be.ch,Se=pe(Be);if(!Se)return;if(Se[1])$e.push(Se[2]);else{for(var Ie=$e.length-1;Ie>=0;--Ie)if($e[Ie]==Se[2]){$e.length=Ie;break}if(Ie<0&&(!ze||ze==Se[2]))return{tag:Se[2],from:xe(Be.line,Be.ch),to:xe(Ne,Re)}}}}ne.registerHelper("fold","xml",function(Be,ze){for(var $e=new ce(Be,ze.line,0);;){var Le=oe($e);if(!Le||$e.line!=ze.line)return;var Ne=ue($e);if(!Ne)return;if(!Le[1]&&Ne!="selfClose"){var Re=xe($e.line,$e.ch),Se=ye($e,Le[2]);return Se&&Me(Se.from,Re)>0?{from:Re,to:Se.from}:null}}}),ne.findMatchingTag=function(Be,ze,$e){var Le=new ce(Be,ze.line,ze.ch,$e);if(!(Le.text.indexOf(">")==-1&&Le.text.indexOf("<")==-1)){var Ne=ue(Le),Re=Ne&&xe(Le.line,Le.ch),Se=Ne&&pe(Le);if(!(!Ne||!Se||Me(Le,ze)>0)){var Ie={from:xe(Le.line,Le.ch),to:Re,tag:Se[2]};return Ne=="selfClose"?{open:Ie,close:null,at:"open"}:Se[1]?{open:we(Le,Se[2]),close:Ie,at:"close"}:(Le=new ce(Be,Re.line,Re.ch,$e),{open:Ie,close:ye(Le,Se[2]),at:"open"})}}},ne.findEnclosingTag=function(Be,ze,$e,Le){for(var Ne=new ce(Be,ze.line,ze.ch,$e);;){var Re=we(Ne,Le);if(!Re)break;var Se=new ce(Be,ze.line,ze.ch,$e),Ie=ye(Se,Re.tag);if(Ie)return{open:Re,close:Ie}}},ne.scanForClosingTag=function(Be,ze,$e,Le){var Ne=new ce(Be,ze.line,ze.ch,Le?{from:0,to:Le}:null);return ye(Ne,$e)}})},89780:function(gn){(function(kt,ee){gn.exports=ee()})(this,function(){"use strict";var kt=navigator.userAgent,ee=navigator.platform,ne=/gecko\/\d/i.test(kt),xe=/MSIE \d/.test(kt),Me=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(kt),Ce=/Edge\/(\d+)/.exec(kt),fe=xe||Me||Ce,he=fe&&(xe?document.documentMode||6:+(Ce||Me)[1]),ce=!Ce&&/WebKit\//.test(kt),ae=ce&&/Qt\/\d+\.\d+/.test(kt),se=!Ce&&/Chrome\//.test(kt),ve=/Opera\//.test(kt),ue=/Apple Computer/.test(navigator.vendor),pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(kt),oe=/PhantomJS/.test(kt),ge=!Ce&&/AppleWebKit/.test(kt)&&/Mobile\/\w+/.test(kt),ye=/Android/.test(kt),we=ge||ye||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(kt),Be=ge||/Mac/.test(ee),ze=/\bCrOS\b/.test(kt),$e=/win/i.test(ee),Le=ve&&kt.match(/Version\/(\d*\.\d*)/);Le&&(Le=Number(Le[1])),Le&&Le>=15&&(ve=!1,ce=!0);var Ne=Be&&(ae||ve&&(Le==null||Le<12.11)),Re=ne||fe&&he>=9;function Se(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var Ie=function(x,z){var ie=x.className,re=Se(z).exec(ie);if(re){var de=ie.slice(re.index+re[0].length);x.className=ie.slice(0,re.index)+(de?re[1]+de:"")}};function Ae(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function it(x,z){return Ae(x).appendChild(z)}function Ue(x,z,ie,re){var de=document.createElement(x);if(ie&&(de.className=ie),re&&(de.style.cssText=re),typeof z=="string")de.appendChild(document.createTextNode(z));else if(z)for(var Pe=0;Pe<z.length;++Pe)de.appendChild(z[Pe]);return de}function gt(x,z,ie,re){var de=Ue(x,z,ie,re);return de.setAttribute("role","presentation"),de}var Ve;document.createRange?Ve=function(x,z,ie,re){var de=document.createRange();return de.setEnd(re||x,ie),de.setStart(x,z),de}:Ve=function(x,z,ie){var re=document.body.createTextRange();try{re.moveToElementText(x.parentNode)}catch(de){return re}return re.collapse(!0),re.moveEnd("character",ie),re.moveStart("character",z),re};function Tt(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 ct(){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 Ot(x,z){var ie=x.className;Se(z).test(ie)||(x.className+=(ie?" ":"")+z)}function We(x,z){for(var ie=x.split(" "),re=0;re<ie.length;re++)ie[re]&&!Se(ie[re]).test(z)&&(z+=" "+ie[re]);return z}var lt=function(x){x.select()};ge?lt=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:fe&&(lt=function(x){try{x.select()}catch(z){}});function ut(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function St(x,z,ie){z||(z={});for(var re in x)x.hasOwnProperty(re)&&(ie!==!1||!z.hasOwnProperty(re))&&(z[re]=x[re]);return z}function qe(x,z,ie,re,de){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var Pe=re||0,tt=de||0;;){var ft=x.indexOf(" ",Pe);if(ft<0||ft>=z)return tt+(z-Pe);tt+=ft-Pe,tt+=ie-tt%ie,Pe=ft+1}}var Ze=function(){this.id=null,this.f=null,this.time=0,this.handler=ut(this.onTimeout,this)};Ze.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},Ze.prototype.set=function(x,z){this.f=z;var ie=+new Date+x;(!this.id||ie<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,x),this.time=ie)};function wt(x,z){for(var ie=0;ie<x.length;++ie)if(x[ie]==z)return ie;return-1}var Wt=50,Kt={toString:function(){return"CodeMirror.Pass"}},_t={scroll:!1},vt={origin:"*mouse"},jt={origin:"+move"};function yn(x,z,ie){for(var re=0,de=0;;){var Pe=x.indexOf(" ",re);Pe==-1&&(Pe=x.length);var tt=Pe-re;if(Pe==x.length||de+tt>=z)return re+Math.min(tt,z-de);if(de+=Pe-re,de+=ie-de%ie,re=Pe+1,de>=z)return re}}var Xt=[""];function Ln(x){for(;Xt.length<=x;)Xt.push(pn(Xt)+" ");return Xt[x]}function pn(x){return x[x.length-1]}function hn(x,z){for(var ie=[],re=0;re<x.length;re++)ie[re]=z(x[re],re);return ie}function un(x,z,ie){for(var re=0,de=ie(z);re<x.length&&ie(x[re])<=de;)re++;x.splice(re,0,z)}function Xe(){}function ke(x,z){var ie;return Object.create?ie=Object.create(x):(Xe.prototype=x,ie=new Xe),z&&St(z,ie),ie}var _e=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Te(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||_e.test(x))}function Fe(x,z){return z?z.source.indexOf("\\w")>-1&&Te(x)?!0:z.test(x):Te(x)}function me(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var at=/[\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 Pt(x){return x.charCodeAt(0)>=768&&at.test(x)}function Qe(x,z,ie){for(;(ie<0?z>0:z<x.length)&&Pt(x.charAt(z));)z+=ie;return z}function Je(x,z,ie){for(var re=z>ie?-1:1;;){if(z==ie)return z;var de=(z+ie)/2,Pe=re<0?Math.ceil(de):Math.floor(de);if(Pe==z)return x(Pe)?z:ie;x(Pe)?ie=Pe:z=Pe+re}}function xt(x,z,ie,re){if(!x)return re(z,ie,"ltr",0);for(var de=!1,Pe=0;Pe<x.length;++Pe){var tt=x[Pe];(tt.from<ie&&tt.to>z||z==ie&&tt.to==z)&&(re(Math.max(tt.from,z),Math.min(tt.to,ie),tt.level==1?"rtl":"ltr",Pe),de=!0)}de||re(z,ie,"ltr")}var ot=null;function mt(x,z,ie){var re;ot=null;for(var de=0;de<x.length;++de){var Pe=x[de];if(Pe.from<z&&Pe.to>z)return de;Pe.to==z&&(Pe.from!=Pe.to&&ie=="before"?re=de:ot=de),Pe.from==z&&(Pe.from!=Pe.to&&ie!="before"?re=de:ot=de)}return re!=null?re:ot}var Nt=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ie(Et){return Et<=247?x.charAt(Et):1424<=Et&&Et<=1524?"R":1536<=Et&&Et<=1785?z.charAt(Et-1536):1774<=Et&&Et<=2220?"r":8192<=Et&&Et<=8203?"w":Et==8204?"b":"L"}var re=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,de=/[stwN]/,Pe=/[LRr]/,tt=/[Lb1n]/,ft=/[1n]/;function yt(Et,an,xn){this.level=Et,this.from=an,this.to=xn}return function(Et,an){var xn=an=="ltr"?"L":"R";if(Et.length==0||an=="ltr"&&!re.test(Et))return!1;for(var Fn=Et.length,Pn=[],hr=0;hr<Fn;++hr)Pn.push(ie(Et.charCodeAt(hr)));for(var Rr=0,ai=xn;Rr<Fn;++Rr){var Si=Pn[Rr];Si=="m"?Pn[Rr]=ai:ai=Si}for(var Ti=0,vi=xn;Ti<Fn;++Ti){var Pi=Pn[Ti];Pi=="1"&&vi=="r"?Pn[Ti]="n":Pe.test(Pi)&&(vi=Pi,Pi=="r"&&(Pn[Ti]="R"))}for(var Ji=1,Qi=Pn[0];Ji<Fn-1;++Ji){var Io=Pn[Ji];Io=="+"&&Qi=="1"&&Pn[Ji+1]=="1"?Pn[Ji]="1":Io==","&&Qi==Pn[Ji+1]&&(Qi=="1"||Qi=="n")&&(Pn[Ji]=Qi),Qi=Io}for(var Ea=0;Ea<Fn;++Ea){var Rs=Pn[Ea];if(Rs==",")Pn[Ea]="N";else if(Rs=="%"){var Ya=void 0;for(Ya=Ea+1;Ya<Fn&&Pn[Ya]=="%";++Ya);for(var sl=Ea&&Pn[Ea-1]=="!"||Ya<Fn&&Pn[Ya]=="1"?"1":"N",ll=Ea;ll<Ya;++ll)Pn[ll]=sl;Ea=Ya-1}}for(var gs=0,cl=xn;gs<Fn;++gs){var po=Pn[gs];cl=="L"&&po=="1"?Pn[gs]="L":Pe.test(po)&&(cl=po)}for(var ts=0;ts<Fn;++ts)if(de.test(Pn[ts])){var Xa=void 0;for(Xa=ts+1;Xa<Fn&&de.test(Pn[Xa]);++Xa);for(var ns=(ts?Pn[ts-1]:xn)=="L",cs=(Xa<Fn?Pn[Xa]:xn)=="L",ru=ns==cs?ns?"L":"R":xn,bl=ts;bl<Xa;++bl)Pn[bl]=ru;ts=Xa-1}for(var zs=[],sa,xs=0;xs<Fn;)if(tt.test(Pn[xs])){var ud=xs;for(++xs;xs<Fn&&tt.test(Pn[xs]);++xs);zs.push(new yt(0,ud,xs))}else{var Mc=xs,$c=zs.length,uc=an=="rtl"?1:0;for(++xs;xs<Fn&&Pn[xs]!="L";++xs);for(var ys=Mc;ys<xs;)if(ft.test(Pn[ys])){Mc<ys&&(zs.splice($c,0,new yt(1,Mc,ys)),$c+=uc);var iu=ys;for(++ys;ys<xs&&ft.test(Pn[ys]);++ys);zs.splice($c,0,new yt(2,iu,ys)),$c+=uc,Mc=ys}else++ys;Mc<xs&&zs.splice($c,0,new yt(1,Mc,xs))}return an=="ltr"&&(zs[0].level==1&&(sa=Et.match(/^\s+/))&&(zs[0].from=sa[0].length,zs.unshift(new yt(0,0,sa[0].length))),pn(zs).level==1&&(sa=Et.match(/\s+$/))&&(pn(zs).to-=sa[0].length,zs.push(new yt(0,Fn-sa[0].length,Fn)))),an=="rtl"?zs.reverse():zs}}();function rn(x,z){var ie=x.order;return ie==null&&(ie=x.order=Nt(x.text,z)),ie}var It=[],Qt=function(x,z,ie){if(x.addEventListener)x.addEventListener(z,ie,!1);else if(x.attachEvent)x.attachEvent("on"+z,ie);else{var re=x._handlers||(x._handlers={});re[z]=(re[z]||It).concat(ie)}};function dn(x,z){return x._handlers&&x._handlers[z]||It}function At(x,z,ie){if(x.removeEventListener)x.removeEventListener(z,ie,!1);else if(x.detachEvent)x.detachEvent("on"+z,ie);else{var re=x._handlers,de=re&&re[z];if(de){var Pe=wt(de,ie);Pe>-1&&(re[z]=de.slice(0,Pe).concat(de.slice(Pe+1)))}}}function Lt(x,z){var ie=dn(x,z);if(ie.length)for(var re=Array.prototype.slice.call(arguments,2),de=0;de<ie.length;++de)ie[de].apply(null,re)}function qt(x,z,ie){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),Lt(x,ie||z.type,x,z),Xn(z)||z.codemirrorIgnore}function Tn(x){var z=x._handlers&&x._handlers.cursorActivity;if(z)for(var ie=x.curOp.cursorActivityHandlers||(x.curOp.cursorActivityHandlers=[]),re=0;re<z.length;++re)wt(ie,z[re])==-1&&ie.push(z[re])}function Jt(x,z){return dn(x,z).length>0}function On(x){x.prototype.on=function(z,ie){Qt(this,z,ie)},x.prototype.off=function(z,ie){At(this,z,ie)}}function zn(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function qn(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function Xn(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function vr(x){zn(x),qn(x)}function _r(x){return x.target||x.srcElement}function Qn(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),Be&&x.ctrlKey&&z==1&&(z=3),z}var Cr=function(){if(fe&&he<9)return!1;var x=Ue("div");return"draggable"in x||"dragDrop"in x}(),ni;function Jr(x){if(ni==null){var z=Ue("span","\u200B");it(x,Ue("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(ni=z.offsetWidth<=1&&z.offsetHeight>2&&!(fe&&he<8))}var ie=ni?Ue("span","\u200B"):Ue("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ie.setAttribute("cm-text",""),ie}var Yn;function mr(x){if(Yn!=null)return Yn;var z=it(x,document.createTextNode("A\u062EA")),ie=Ve(z,0,1).getBoundingClientRect(),re=Ve(z,1,2).getBoundingClientRect();return Ae(x),!ie||ie.left==ie.right?!1:Yn=re.right-ie.right<3}var si=`
b`.split(/\n/).length!=3?function(x){for(var z=0,ie=[],re=x.length;z<=re;){var de=x.indexOf(`
`,z);de==-1&&(de=x.length);var Pe=x.slice(z,x.charAt(de-1)=="\r"?de-1:de),tt=Pe.indexOf("\r");tt!=-1?(ie.push(Pe.slice(0,tt)),z+=tt+1):(ie.push(Pe),z=de+1)}return ie}:function(x){return x.split(/\r\n?|\n/)},or=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(ie){}return!z||z.parentElement()!=x?!1:z.compareEndPoints("StartToEnd",z)!=0},ii=function(){var x=Ue("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),ki=null;function gi(x){if(ki!=null)return ki;var z=it(x,Ue("span","x")),ie=z.getBoundingClientRect(),re=Ve(z,0,1).getBoundingClientRect();return ki=Math.abs(ie.left-re.left)>1}var Li={},ui={};function dr(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),Li[x]=z}function Hr(x,z){ui[x]=z}function Cn(x){if(typeof x=="string"&&ui.hasOwnProperty(x))x=ui[x];else if(x&&typeof x.name=="string"&&ui.hasOwnProperty(x.name)){var z=ui[x.name];typeof z=="string"&&(z={name:z}),x=ke(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return Cn("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return Cn("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function Ee(x,z){z=Cn(z);var ie=Li[z.name];if(!ie)return Ee(x,"text/plain");var re=ie(x,z);if(je.hasOwnProperty(z.name)){var de=je[z.name];for(var Pe in de)de.hasOwnProperty(Pe)&&(re.hasOwnProperty(Pe)&&(re["_"+Pe]=re[Pe]),re[Pe]=de[Pe])}if(re.name=z.name,z.helperType&&(re.helperType=z.helperType),z.modeProps)for(var tt in z.modeProps)re[tt]=z.modeProps[tt];return re}var je={};function Oe(x,z){var ie=je.hasOwnProperty(x)?je[x]:je[x]={};St(z,ie)}function De(x,z){if(z===!0)return z;if(x.copyState)return x.copyState(z);var ie={};for(var re in z){var de=z[re];de instanceof Array&&(de=de.concat([])),ie[re]=de}return ie}function Ke(x,z){for(var ie;x.innerMode&&(ie=x.innerMode(z),!(!ie||ie.mode==x));)z=ie.state,x=ie.mode;return ie||{mode:x,state:z}}function et(x,z,ie){return x.startState?x.startState(z,ie):!0}var rt=function(x,z,ie){this.pos=this.start=0,this.string=x,this.tabSize=z||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ie};rt.prototype.eol=function(){return this.pos>=this.string.length},rt.prototype.sol=function(){return this.pos==this.lineStart},rt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},rt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},rt.prototype.eat=function(x){var z=this.string.charAt(this.pos),ie;if(typeof x=="string"?ie=z==x:ie=z&&(x.test?x.test(z):x(z)),ie)return++this.pos,z},rt.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},rt.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},rt.prototype.skipToEnd=function(){this.pos=this.string.length},rt.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},rt.prototype.backUp=function(x){this.pos-=x},rt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},rt.prototype.indentation=function(){return qe(this.string,null,this.tabSize)-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},rt.prototype.match=function(x,z,ie){if(typeof x=="string"){var re=function(tt){return ie?tt.toLowerCase():tt},de=this.string.substr(this.pos,x.length);if(re(de)==re(x))return z!==!1&&(this.pos+=x.length),!0}else{var Pe=this.string.slice(this.pos).match(x);return Pe&&Pe.index>0?null:(Pe&&z!==!1&&(this.pos+=Pe[0].length),Pe)}},rt.prototype.current=function(){return this.string.slice(this.start,this.pos)},rt.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},rt.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},rt.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function Dt(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 ie=x;!ie.lines;)for(var re=0;;++re){var de=ie.children[re],Pe=de.chunkSize();if(z<Pe){ie=de;break}z-=Pe}return ie.lines[z]}function Ft(x,z,ie){var re=[],de=z.line;return x.iter(z.line,ie.line+1,function(Pe){var tt=Pe.text;de==ie.line&&(tt=tt.slice(0,ie.ch)),de==z.line&&(tt=tt.slice(z.ch)),re.push(tt),++de}),re}function Bt(x,z,ie){var re=[];return x.iter(z,ie,function(de){re.push(de.text)}),re}function Ct(x,z){var ie=z-x.height;if(ie)for(var re=x;re;re=re.parent)re.height+=ie}function Ht(x){if(x.parent==null)return null;for(var z=x.parent,ie=wt(z.lines,x),re=z.parent;re;z=re,re=re.parent)for(var de=0;re.children[de]!=z;++de)ie+=re.children[de].chunkSize();return ie+z.first}function Ut(x,z){var ie=x.first;e:do{for(var re=0;re<x.children.length;++re){var de=x.children[re],Pe=de.height;if(z<Pe){x=de;continue e}z-=Pe,ie+=de.chunkSize()}return ie}while(!x.lines);for(var tt=0;tt<x.lines.length;++tt){var ft=x.lines[tt],yt=ft.height;if(z<yt)break;z-=yt}return ie+tt}function on(x,z){return z>=x.first&&z<x.first+x.size}function cn(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function Rt(x,z,ie){if(ie===void 0&&(ie=null),!(this instanceof Rt))return new Rt(x,z,ie);this.line=x,this.ch=z,this.sticky=ie}function Vt(x,z){return x.line-z.line||x.ch-z.ch}function In(x,z){return x.sticky==z.sticky&&Vt(x,z)==0}function wn(x){return Rt(x.line,x.ch)}function Nn(x,z){return Vt(x,z)<0?z:x}function Rn(x,z){return Vt(x,z)<0?x:z}function Jn(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function Sn(x,z){if(z.line<x.first)return Rt(x.first,0);var ie=x.first+x.size-1;return z.line>ie?Rt(ie,Dt(x,ie).text.length):Un(z,Dt(x,z.line).text.length)}function Un(x,z){var ie=x.ch;return ie==null||ie>z?Rt(x.line,z):ie<0?Rt(x.line,0):x}function zt(x,z){for(var ie=[],re=0;re<z.length;re++)ie[re]=Sn(x,z[re]);return ie}var fn=function(x,z){this.state=x,this.lookAhead=z},vn=function(x,z,ie,re){this.state=z,this.doc=x,this.line=ie,this.maxLookAhead=re||0,this.baseTokens=null,this.baseTokenPos=1};vn.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},vn.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}},vn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vn.fromSaved=function(x,z,ie){return z instanceof fn?new vn(x,De(x.mode,z.state),ie,z.lookAhead):new vn(x,De(x.mode,z),ie)},vn.prototype.save=function(x){var z=x!==!1?De(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fn(z,this.maxLookAhead):z};function An(x,z,ie,re){var de=[x.state.modeGen],Pe={};$r(x,z.text,x.doc.mode,ie,function(Et,an){return de.push(Et,an)},Pe,re);for(var tt=ie.state,ft=function(Et){ie.baseTokens=de;var an=x.state.overlays[Et],xn=1,Fn=0;ie.state=!0,$r(x,z.text,an.mode,ie,function(Pn,hr){for(var Rr=xn;Fn<Pn;){var ai=de[xn];ai>Pn&&de.splice(xn,1,Pn,de[xn+1],ai),xn+=2,Fn=Math.min(Pn,ai)}if(hr)if(an.opaque)de.splice(Rr,xn-Rr,Pn,"overlay "+hr),xn=Rr+2;else for(;Rr<xn;Rr+=2){var Si=de[Rr+1];de[Rr+1]=(Si?Si+" ":"")+"overlay "+hr}},Pe),ie.state=tt,ie.baseTokens=null,ie.baseTokenPos=1},yt=0;yt<x.state.overlays.length;++yt)ft(yt);return{styles:de,classes:Pe.bgClass||Pe.textClass?Pe:null}}function En(x,z,ie){if(!z.styles||z.styles[0]!=x.state.modeGen){var re=kn(x,Ht(z)),de=z.text.length>x.options.maxHighlightLength&&De(x.doc.mode,re.state),Pe=An(x,z,re);de&&(re.state=de),z.stateAfter=re.save(!de),z.styles=Pe.styles,Pe.classes?z.styleClasses=Pe.classes:z.styleClasses&&(z.styleClasses=null),ie===x.doc.highlightFrontier&&(x.doc.modeFrontier=Math.max(x.doc.modeFrontier,++x.doc.highlightFrontier))}return z.styles}function kn(x,z,ie){var re=x.doc,de=x.display;if(!re.mode.startState)return new vn(re,!0,z);var Pe=Mr(x,z,ie),tt=Pe>re.first&&Dt(re,Pe-1).stateAfter,ft=tt?vn.fromSaved(re,tt,Pe):new vn(re,et(re.mode),Pe);return re.iter(Pe,z,function(yt){Mn(x,yt.text,ft);var Et=ft.line;yt.stateAfter=Et==z-1||Et%5==0||Et>=de.viewFrom&&Et<de.viewTo?ft.save():null,ft.nextLine()}),ie&&(re.modeFrontier=ft.line),ft}function Mn(x,z,ie,re){var de=x.doc.mode,Pe=new rt(z,x.options.tabSize,ie);for(Pe.start=Pe.pos=re||0,z==""&&Bn(de,ie.state);!Pe.eol();)Kn(de,Pe,ie.state),Pe.start=Pe.pos}function Bn(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ie=Ke(x,z);if(ie.mode.blankLine)return ie.mode.blankLine(ie.state)}}function Kn(x,z,ie,re){for(var de=0;de<10;de++){re&&(re[0]=Ke(x,ie).mode);var Pe=x.token(z,ie);if(z.pos>z.start)return Pe}throw new Error("Mode "+x.name+" failed to advance stream.")}var Vn=function(x,z,ie){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ie};function cr(x,z,ie,re){var de=x.doc,Pe=de.mode,tt;z=Sn(de,z);var ft=Dt(de,z.line),yt=kn(x,z.line,ie),Et=new rt(ft.text,x.options.tabSize,yt),an;for(re&&(an=[]);(re||Et.pos<z.ch)&&!Et.eol();)Et.start=Et.pos,tt=Kn(Pe,Et,yt.state),re&&an.push(new Vn(Et,tt,De(de.mode,yt.state)));return re?an:new Vn(Et,tt,yt.state)}function fr(x,z){if(x)for(;;){var ie=x.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ie)break;x=x.slice(0,ie.index)+x.slice(ie.index+ie[0].length);var re=ie[1]?"bgClass":"textClass";z[re]==null?z[re]=ie[2]:new RegExp("(?:^|\\s)"+ie[2]+"(?:$|\\s)").test(z[re])||(z[re]+=" "+ie[2])}return x}function $r(x,z,ie,re,de,Pe,tt){var ft=ie.flattenSpans;ft==null&&(ft=x.options.flattenSpans);var yt=0,Et=null,an=new rt(z,x.options.tabSize,re),xn,Fn=x.options.addModeClass&&[null];for(z==""&&fr(Bn(ie,re.state),Pe);!an.eol();){if(an.pos>x.options.maxHighlightLength?(ft=!1,tt&&Mn(x,z,re,an.pos),an.pos=z.length,xn=null):xn=fr(Kn(ie,an,re.state,Fn),Pe),Fn){var Pn=Fn[0].name;Pn&&(xn="m-"+(xn?Pn+" "+xn:Pn))}if(!ft||Et!=xn){for(;yt<an.start;)yt=Math.min(an.start,yt+5e3),de(yt,Et);Et=xn}an.start=an.pos}for(;yt<an.pos;){var hr=Math.min(an.pos,yt+5e3);de(hr,Et),yt=hr}}function Mr(x,z,ie){for(var re,de,Pe=x.doc,tt=ie?-1:z-(x.doc.mode.innerMode?1e3:100),ft=z;ft>tt;--ft){if(ft<=Pe.first)return Pe.first;var yt=Dt(Pe,ft-1),Et=yt.stateAfter;if(Et&&(!ie||ft+(Et instanceof fn?Et.lookAhead:0)<=Pe.modeFrontier))return ft;var an=qe(yt.text,null,x.options.tabSize);(de==null||re>an)&&(de=ft-1,re=an)}return de}function wr(x,z){if(x.modeFrontier=Math.min(x.modeFrontier,z),!(x.highlightFrontier<z-10)){for(var ie=x.first,re=z-1;re>ie;re--){var de=Dt(x,re).stateAfter;if(de&&(!(de instanceof fn)||re+de.lookAhead<z)){ie=re+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ie)}}var ei=!1,Xr=!1;function Zr(){ei=!0}function Lr(){Xr=!0}function Or(x,z,ie){this.marker=x,this.from=z,this.to=ie}function Wr(x,z){if(x)for(var ie=0;ie<x.length;++ie){var re=x[ie];if(re.marker==z)return re}}function Pr(x,z){for(var ie,re=0;re<x.length;++re)x[re]!=z&&(ie||(ie=[])).push(x[re]);return ie}function di(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function Ri(x,z,ie){var re;if(x)for(var de=0;de<x.length;++de){var Pe=x[de],tt=Pe.marker,ft=Pe.from==null||(tt.inclusiveLeft?Pe.from<=z:Pe.from<z);if(ft||Pe.from==z&&tt.type=="bookmark"&&(!ie||!Pe.marker.insertLeft)){var yt=Pe.to==null||(tt.inclusiveRight?Pe.to>=z:Pe.to>z);(re||(re=[])).push(new Or(tt,Pe.from,yt?null:Pe.to))}}return re}function Vr(x,z,ie){var re;if(x)for(var de=0;de<x.length;++de){var Pe=x[de],tt=Pe.marker,ft=Pe.to==null||(tt.inclusiveRight?Pe.to>=z:Pe.to>z);if(ft||Pe.from==z&&tt.type=="bookmark"&&(!ie||Pe.marker.insertLeft)){var yt=Pe.from==null||(tt.inclusiveLeft?Pe.from<=z:Pe.from<z);(re||(re=[])).push(new Or(tt,yt?null:Pe.from-z,Pe.to==null?null:Pe.to-z))}}return re}function er(x,z){if(z.full)return null;var ie=on(x,z.from.line)&&Dt(x,z.from.line).markedSpans,re=on(x,z.to.line)&&Dt(x,z.to.line).markedSpans;if(!ie&&!re)return null;var de=z.from.ch,Pe=z.to.ch,tt=Vt(z.from,z.to)==0,ft=Ri(ie,de,tt),yt=Vr(re,Pe,tt),Et=z.text.length==1,an=pn(z.text).length+(Et?de:0);if(ft)for(var xn=0;xn<ft.length;++xn){var Fn=ft[xn];if(Fn.to==null){var Pn=Wr(yt,Fn.marker);Pn?Et&&(Fn.to=Pn.to==null?null:Pn.to+an):Fn.to=de}}if(yt)for(var hr=0;hr<yt.length;++hr){var Rr=yt[hr];if(Rr.to!=null&&(Rr.to+=an),Rr.from==null){var ai=Wr(ft,Rr.marker);ai||(Rr.from=an,Et&&(ft||(ft=[])).push(Rr))}else Rr.from+=an,Et&&(ft||(ft=[])).push(Rr)}ft&&(ft=Zn(ft)),yt&&yt!=ft&&(yt=Zn(yt));var Si=[ft];if(!Et){var Ti=z.text.length-2,vi;if(Ti>0&&ft)for(var Pi=0;Pi<ft.length;++Pi)ft[Pi].to==null&&(vi||(vi=[])).push(new Or(ft[Pi].marker,null,null));for(var Ji=0;Ji<Ti;++Ji)Si.push(vi);Si.push(yt)}return Si}function Zn(x){for(var z=0;z<x.length;++z){var ie=x[z];ie.from!=null&&ie.from==ie.to&&ie.marker.clearWhenEmpty!==!1&&x.splice(z--,1)}return x.length?x:null}function Dr(x,z,ie){var re=null;if(x.iter(z.line,ie.line+1,function(Pn){if(Pn.markedSpans)for(var hr=0;hr<Pn.markedSpans.length;++hr){var Rr=Pn.markedSpans[hr].marker;Rr.readOnly&&(!re||wt(re,Rr)==-1)&&(re||(re=[])).push(Rr)}}),!re)return null;for(var de=[{from:z,to:ie}],Pe=0;Pe<re.length;++Pe)for(var tt=re[Pe],ft=tt.find(0),yt=0;yt<de.length;++yt){var Et=de[yt];if(!(Vt(Et.to,ft.from)<0||Vt(Et.from,ft.to)>0)){var an=[yt,1],xn=Vt(Et.from,ft.from),Fn=Vt(Et.to,ft.to);(xn<0||!tt.inclusiveLeft&&!xn)&&an.push({from:Et.from,to:ft.from}),(Fn>0||!tt.inclusiveRight&&!Fn)&&an.push({from:ft.to,to:Et.to}),de.splice.apply(de,an),yt+=an.length-3}}return de}function Sr(x){var z=x.markedSpans;if(z){for(var ie=0;ie<z.length;++ie)z[ie].marker.detachLine(x);x.markedSpans=null}}function ri(x,z){if(z){for(var ie=0;ie<z.length;++ie)z[ie].marker.attachLine(x);x.markedSpans=z}}function yi(x){return x.inclusiveLeft?-1:0}function jr(x){return x.inclusiveRight?1:0}function Bi(x,z){var ie=x.lines.length-z.lines.length;if(ie!=0)return ie;var re=x.find(),de=z.find(),Pe=Vt(re.from,de.from)||yi(x)-yi(z);if(Pe)return-Pe;var tt=Vt(re.to,de.to)||jr(x)-jr(z);return tt||z.id-x.id}function _i(x,z){var ie=Xr&&x.markedSpans,re;if(ie)for(var de=void 0,Pe=0;Pe<ie.length;++Pe)de=ie[Pe],de.marker.collapsed&&(z?de.from:de.to)==null&&(!re||Bi(re,de.marker)<0)&&(re=de.marker);return re}function oo(x){return _i(x,!0)}function Fr(x){return _i(x,!1)}function Nr(x,z){var ie=Xr&&x.markedSpans,re;if(ie)for(var de=0;de<ie.length;++de){var Pe=ie[de];Pe.marker.collapsed&&(Pe.from==null||Pe.from<z)&&(Pe.to==null||Pe.to>z)&&(!re||Bi(re,Pe.marker)<0)&&(re=Pe.marker)}return re}function bi(x,z,ie,re,de){var Pe=Dt(x,z),tt=Xr&&Pe.markedSpans;if(tt)for(var ft=0;ft<tt.length;++ft){var yt=tt[ft];if(yt.marker.collapsed){var Et=yt.marker.find(0),an=Vt(Et.from,ie)||yi(yt.marker)-yi(de),xn=Vt(Et.to,re)||jr(yt.marker)-jr(de);if(!(an>=0&&xn<=0||an<=0&&xn>=0)&&(an<=0&&(yt.marker.inclusiveRight&&de.inclusiveLeft?Vt(Et.to,ie)>=0:Vt(Et.to,ie)>0)||an>=0&&(yt.marker.inclusiveRight&&de.inclusiveLeft?Vt(Et.from,re)<=0:Vt(Et.from,re)<0)))return!0}}}function hi(x){for(var z;z=oo(x);)x=z.find(-1,!0).line;return x}function Xi(x){for(var z;z=Fr(x);)x=z.find(1,!0).line;return x}function mo(x){for(var z,ie;z=Fr(x);)x=z.find(1,!0).line,(ie||(ie=[])).push(x);return ie}function Co(x,z){var ie=Dt(x,z),re=hi(ie);return ie==re?z:Ht(re)}function ji(x,z){if(z>x.lastLine())return z;var ie=Dt(x,z),re;if(!_o(x,ie))return z;for(;re=Fr(ie);)ie=re.find(1,!0).line;return Ht(ie)+1}function _o(x,z){var ie=Xr&&z.markedSpans;if(ie){for(var re=void 0,de=0;de<ie.length;++de)if(re=ie[de],!!re.marker.collapsed){if(re.from==null)return!0;if(!re.marker.widgetNode&&re.from==0&&re.marker.inclusiveLeft&&vo(x,z,re))return!0}}}function vo(x,z,ie){if(ie.to==null){var re=ie.marker.find(1,!0);return vo(x,re.line,Wr(re.line.markedSpans,ie.marker))}if(ie.marker.inclusiveRight&&ie.to==z.text.length)return!0;for(var de=void 0,Pe=0;Pe<z.markedSpans.length;++Pe)if(de=z.markedSpans[Pe],de.marker.collapsed&&!de.marker.widgetNode&&de.from==ie.to&&(de.to==null||de.to!=ie.from)&&(de.marker.inclusiveLeft||ie.marker.inclusiveRight)&&vo(x,z,de))return!0}function Er(x){x=hi(x);for(var z=0,ie=x.parent,re=0;re<ie.lines.length;++re){var de=ie.lines[re];if(de==x)break;z+=de.height}for(var Pe=ie.parent;Pe;ie=Pe,Pe=ie.parent)for(var tt=0;tt<Pe.children.length;++tt){var ft=Pe.children[tt];if(ft==ie)break;z+=ft.height}return z}function Ar(x){if(x.height==0)return 0;for(var z=x.text.length,ie,re=x;ie=oo(re);){var de=ie.find(0,!0);re=de.from.line,z+=de.from.ch-de.to.ch}for(re=x;ie=Fr(re);){var Pe=ie.find(0,!0);z-=re.text.length-Pe.from.ch,re=Pe.to.line,z+=re.text.length-Pe.to.ch}return z}function kr(x){var z=x.display,ie=x.doc;z.maxLine=Dt(ie,ie.first),z.maxLineLength=Ar(z.maxLine),z.maxLineChanged=!0,ie.iter(function(re){var de=Ar(re);de>z.maxLineLength&&(z.maxLineLength=de,z.maxLine=re)})}var Kr=function(x,z,ie){this.text=x,ri(this,z),this.height=ie?ie(this):1};Kr.prototype.lineNo=function(){return Ht(this)},On(Kr);function Hi(x,z,ie,re){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),Sr(x),ri(x,ie);var de=re?re(x):1;de!=x.height&&Ct(x,de)}function eo(x){x.parent=null,Sr(x)}var io={},ao={};function to(x,z){if(!x||/^\s*$/.test(x))return null;var ie=z.addModeClass?ao:io;return ie[x]||(ie[x]=x.replace(/\S+/g,"cm-$&"))}function Mo(x,z){var ie=gt("span",null,null,ce?"padding-right: .1px":null),re={pre:gt("pre",[ie],"CodeMirror-line"),content:ie,col:0,pos:0,cm:x,trailingSpace:!1,splitSpaces:x.getOption("lineWrapping")};z.measure={};for(var de=0;de<=(z.rest?z.rest.length:0);de++){var Pe=de?z.rest[de-1]:z.line,tt=void 0;re.pos=0,re.addToken=Ho,mr(x.display.measure)&&(tt=rn(Pe,x.doc.direction))&&(re.addToken=ha(re.addToken,tt)),re.map=[];var ft=z!=x.display.externalMeasured&&Ht(Pe);Oo(Pe,re,En(x,Pe,ft)),Pe.styleClasses&&(Pe.styleClasses.bgClass&&(re.bgClass=We(Pe.styleClasses.bgClass,re.bgClass||"")),Pe.styleClasses.textClass&&(re.textClass=We(Pe.styleClasses.textClass,re.textClass||""))),re.map.length==0&&re.map.push(0,0,re.content.appendChild(Jr(x.display.measure))),de==0?(z.measure.map=re.map,z.measure.cache={}):((z.measure.maps||(z.measure.maps=[])).push(re.map),(z.measure.caches||(z.measure.caches=[])).push({}))}if(ce){var yt=re.content.lastChild;(/\bcm-tab\b/.test(yt.className)||yt.querySelector&&yt.querySelector(".cm-tab"))&&(re.content.className="cm-tab-wrap-hack")}return Lt(x,"renderLine",x,z.line,re.pre),re.pre.className&&(re.textClass=We(re.pre.className,re.textClass||"")),re}function Yo(x){var z=Ue("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function Ho(x,z,ie,re,de,Pe,tt){if(z){var ft=x.splitSpaces?La(z,x.trailingSpace):z,yt=x.cm.state.specialChars,Et=!1,an;if(!yt.test(z))x.col+=z.length,an=document.createTextNode(ft),x.map.push(x.pos,x.pos+z.length,an),fe&&he<9&&(Et=!0),x.pos+=z.length;else{an=document.createDocumentFragment();for(var xn=0;;){yt.lastIndex=xn;var Fn=yt.exec(z),Pn=Fn?Fn.index-xn:z.length-xn;if(Pn){var hr=document.createTextNode(ft.slice(xn,xn+Pn));fe&&he<9?an.appendChild(Ue("span",[hr])):an.appendChild(hr),x.map.push(x.pos,x.pos+Pn,hr),x.col+=Pn,x.pos+=Pn}if(!Fn)break;xn+=Pn+1;var Rr=void 0;if(Fn[0]==" "){var ai=x.cm.options.tabSize,Si=ai-x.col%ai;Rr=an.appendChild(Ue("span",Ln(Si),"cm-tab")),Rr.setAttribute("role","presentation"),Rr.setAttribute("cm-text"," "),x.col+=Si}else Fn[0]=="\r"||Fn[0]==`
`?(Rr=an.appendChild(Ue("span",Fn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Rr.setAttribute("cm-text",Fn[0]),x.col+=1):(Rr=x.cm.options.specialCharPlaceholder(Fn[0]),Rr.setAttribute("cm-text",Fn[0]),fe&&he<9?an.appendChild(Ue("span",[Rr])):an.appendChild(Rr),x.col+=1);x.map.push(x.pos,x.pos+1,Rr),x.pos++}}if(x.trailingSpace=ft.charCodeAt(z.length-1)==32,ie||re||de||Et||Pe||tt){var Ti=ie||"";re&&(Ti+=re),de&&(Ti+=de);var vi=Ue("span",[an],Ti,Pe);if(tt)for(var Pi in tt)tt.hasOwnProperty(Pi)&&Pi!="style"&&Pi!="class"&&vi.setAttribute(Pi,tt[Pi]);return x.content.appendChild(vi)}x.content.appendChild(an)}}function La(x,z){if(x.length>1&&!/ /.test(x))return x;for(var ie=z,re="",de=0;de<x.length;de++){var Pe=x.charAt(de);Pe==" "&&ie&&(de==x.length-1||x.charCodeAt(de+1)==32)&&(Pe="\xA0"),re+=Pe,ie=Pe==" "}return re}function ha(x,z){return function(ie,re,de,Pe,tt,ft,yt){de=de?de+" cm-force-border":"cm-force-border";for(var Et=ie.pos,an=Et+re.length;;){for(var xn=void 0,Fn=0;Fn<z.length&&(xn=z[Fn],!(xn.to>Et&&xn.from<=Et));Fn++);if(xn.to>=an)return x(ie,re,de,Pe,tt,ft,yt);x(ie,re.slice(0,xn.to-Et),de,Pe,null,ft,yt),Pe=null,re=re.slice(xn.to-Et),Et=xn.to}}}function Ko(x,z,ie,re){var de=!re&&ie.widgetNode;de&&x.map.push(x.pos,x.pos+z,de),!re&&x.cm.display.input.needsContentAttribute&&(de||(de=x.content.appendChild(document.createElement("span"))),de.setAttribute("cm-marker",ie.id)),de&&(x.cm.display.input.setUneditable(de),x.content.appendChild(de)),x.pos+=z,x.trailingSpace=!1}function Oo(x,z,ie){var re=x.markedSpans,de=x.text,Pe=0;if(!re){for(var tt=1;tt<ie.length;tt+=2)z.addToken(z,de.slice(Pe,Pe=ie[tt]),to(ie[tt+1],z.cm.options));return}for(var ft=de.length,yt=0,Et=1,an="",xn,Fn,Pn=0,hr,Rr,ai,Si,Ti;;){if(Pn==yt){hr=Rr=ai=Fn="",Ti=null,Si=null,Pn=1/0;for(var vi=[],Pi=void 0,Ji=0;Ji<re.length;++Ji){var Qi=re[Ji],Io=Qi.marker;if(Io.type=="bookmark"&&Qi.from==yt&&Io.widgetNode)vi.push(Io);else if(Qi.from<=yt&&(Qi.to==null||Qi.to>yt||Io.collapsed&&Qi.to==yt&&Qi.from==yt)){if(Qi.to!=null&&Qi.to!=yt&&Pn>Qi.to&&(Pn=Qi.to,Rr=""),Io.className&&(hr+=" "+Io.className),Io.css&&(Fn=(Fn?Fn+";":"")+Io.css),Io.startStyle&&Qi.from==yt&&(ai+=" "+Io.startStyle),Io.endStyle&&Qi.to==Pn&&(Pi||(Pi=[])).push(Io.endStyle,Qi.to),Io.title&&((Ti||(Ti={})).title=Io.title),Io.attributes)for(var Ea in Io.attributes)(Ti||(Ti={}))[Ea]=Io.attributes[Ea];Io.collapsed&&(!Si||Bi(Si.marker,Io)<0)&&(Si=Qi)}else Qi.from>yt&&Pn>Qi.from&&(Pn=Qi.from)}if(Pi)for(var Rs=0;Rs<Pi.length;Rs+=2)Pi[Rs+1]==Pn&&(Rr+=" "+Pi[Rs]);if(!Si||Si.from==yt)for(var Ya=0;Ya<vi.length;++Ya)Ko(z,0,vi[Ya]);if(Si&&(Si.from||0)==yt){if(Ko(z,(Si.to==null?ft+1:Si.to)-yt,Si.marker,Si.from==null),Si.to==null)return;Si.to==yt&&(Si=!1)}}if(yt>=ft)break;for(var sl=Math.min(ft,Pn);;){if(an){var ll=yt+an.length;if(!Si){var gs=ll>sl?an.slice(0,sl-yt):an;z.addToken(z,gs,xn?xn+hr:hr,ai,yt+gs.length==Pn?Rr:"",Fn,Ti)}if(ll>=sl){an=an.slice(sl-yt),yt=sl;break}yt=ll,ai=""}an=de.slice(Pe,Pe=ie[Et++]),xn=to(ie[Et++],z.cm.options)}}}function Wi(x,z,ie){this.line=z,this.rest=mo(z),this.size=this.rest?Ht(pn(this.rest))-ie+1:1,this.node=this.text=null,this.hidden=_o(x,z)}function ta(x,z,ie){for(var re=[],de,Pe=z;Pe<ie;Pe=de){var tt=new Wi(x.doc,Dt(x.doc,Pe),Pe);de=Pe+tt.size,re.push(tt)}return re}var Zo=null;function no(x){Zo?Zo.ops.push(x):x.ownsGroup=Zo={ops:[x],delayedCallbacks:[]}}function ti(x){var z=x.delayedCallbacks,ie=0;do{for(;ie<z.length;ie++)z[ie].call(null);for(var re=0;re<x.ops.length;re++){var de=x.ops[re];if(de.cursorActivityHandlers)for(;de.cursorActivityCalled<de.cursorActivityHandlers.length;)de.cursorActivityHandlers[de.cursorActivityCalled++].call(null,de.cm)}}while(ie<z.length)}function Fi(x,z){var ie=x.ownsGroup;if(ie)try{ti(ie)}finally{Zo=null,z(ie)}}var Ii=null;function Ci(x,z){var ie=dn(x,z);if(ie.length){var re=Array.prototype.slice.call(arguments,2),de;Zo?de=Zo.delayedCallbacks:Ii?de=Ii:(de=Ii=[],setTimeout(ro,0));for(var Pe=function(ft){de.push(function(){return ie[ft].apply(null,re)})},tt=0;tt<ie.length;++tt)Pe(tt)}}function ro(){var x=Ii;Ii=null;for(var z=0;z<x.length;++z)x[z]()}function qi(x,z,ie,re){for(var de=0;de<z.changes.length;de++){var Pe=z.changes[de];Pe=="text"?fa(x,z):Pe=="gutter"?go(x,z,ie,re):Pe=="class"?xo(x,z):Pe=="widget"&&ca(x,z,re)}z.changes=null}function Bo(x){return x.node==x.text&&(x.node=Ue("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),fe&&he<8&&(x.node.style.zIndex=2)),x.node}function na(x,z){var ie=z.bgClass?z.bgClass+" "+(z.line.bgClass||""):z.line.bgClass;if(ie&&(ie+=" CodeMirror-linebackground"),z.background)ie?z.background.className=ie:(z.background.parentNode.removeChild(z.background),z.background=null);else if(ie){var re=Bo(z);z.background=re.insertBefore(Ue("div",null,ie),re.firstChild),x.display.input.setUneditable(z.background)}}function ra(x,z){var ie=x.display.externalMeasured;return ie&&ie.line==z.line?(x.display.externalMeasured=null,z.measure=ie.measure,ie.built):Mo(x,z)}function fa(x,z){var ie=z.text.className,re=ra(x,z);z.text==z.node&&(z.node=re.pre),z.text.parentNode.replaceChild(re.pre,z.text),z.text=re.pre,re.bgClass!=z.bgClass||re.textClass!=z.textClass?(z.bgClass=re.bgClass,z.textClass=re.textClass,xo(x,z)):ie&&(z.text.className=ie)}function xo(x,z){na(x,z),z.line.wrapClass?Bo(z).className=z.line.wrapClass:z.node!=z.text&&(z.node.className="");var ie=z.textClass?z.textClass+" "+(z.line.textClass||""):z.line.textClass;z.text.className=ie||""}function go(x,z,ie,re){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 de=Bo(z);z.gutterBackground=Ue("div",null,"CodeMirror-gutter-background "+z.line.gutterClass,"left: "+(x.options.fixedGutter?re.fixedPos:-re.gutterTotalWidth)+"px; width: "+re.gutterTotalWidth+"px"),x.display.input.setUneditable(z.gutterBackground),de.insertBefore(z.gutterBackground,z.text)}var Pe=z.line.gutterMarkers;if(x.options.lineNumbers||Pe){var tt=Bo(z),ft=z.gutter=Ue("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?re.fixedPos:-re.gutterTotalWidth)+"px");if(x.display.input.setUneditable(ft),tt.insertBefore(ft,z.text),z.line.gutterClass&&(ft.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!Pe||!Pe["CodeMirror-linenumbers"])&&(z.lineNumber=ft.appendChild(Ue("div",cn(x.options,ie),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+re.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),Pe)for(var yt=0;yt<x.display.gutterSpecs.length;++yt){var Et=x.display.gutterSpecs[yt].className,an=Pe.hasOwnProperty(Et)&&Pe[Et];an&&ft.appendChild(Ue("div",[an],"CodeMirror-gutter-elt","left: "+re.gutterLeft[Et]+"px; width: "+re.gutterWidth[Et]+"px"))}}}function ca(x,z,ie){z.alignable&&(z.alignable=null);for(var re=Se("CodeMirror-linewidget"),de=z.node.firstChild,Pe=void 0;de;de=Pe)Pe=de.nextSibling,re.test(de.className)&&z.node.removeChild(de);ba(x,z,ie)}function ua(x,z,ie,re){var de=ra(x,z);return z.text=z.node=de.pre,de.bgClass&&(z.bgClass=de.bgClass),de.textClass&&(z.textClass=de.textClass),xo(x,z),go(x,z,ie,re),ba(x,z,re),z.node}function ba(x,z,ie){if(da(x,z.line,z,ie,!0),z.rest)for(var re=0;re<z.rest.length;re++)da(x,z.rest[re],z,ie,!1)}function da(x,z,ie,re,de){if(z.widgets)for(var Pe=Bo(ie),tt=0,ft=z.widgets;tt<ft.length;++tt){var yt=ft[tt],Et=Ue("div",[yt.node],"CodeMirror-linewidget"+(yt.className?" "+yt.className:""));yt.handleMouseEvents||Et.setAttribute("cm-ignore-events","true"),xl(yt,Et,ie,re),x.display.input.setUneditable(Et),de&&yt.above?Pe.insertBefore(Et,ie.gutter||ie.text):Pe.appendChild(Et),Ci(yt,"redraw")}}function xl(x,z,ie,re){if(x.noHScroll){(ie.alignable||(ie.alignable=[])).push(z);var de=re.wrapperWidth;z.style.left=re.fixedPos+"px",x.coverGutter||(de-=re.gutterTotalWidth,z.style.paddingLeft=re.gutterTotalWidth+"px"),z.style.width=de+"px"}x.coverGutter&&(z.style.zIndex=5,z.style.position="relative",x.noHScroll||(z.style.marginLeft=-re.gutterTotalWidth+"px"))}function Cs(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!Tt(document.body,x.node)){var ie="position: relative;";x.coverGutter&&(ie+="margin-left: -"+z.display.gutters.offsetWidth+"px;"),x.noHScroll&&(ie+="width: "+z.display.wrapper.clientWidth+"px;"),it(z.display.measure,Ue("div",[x.node],null,ie))}return x.height=x.node.parentNode.offsetHeight}function ws(x,z){for(var ie=_r(z);ie!=x.wrapper;ie=ie.parentNode)if(!ie||ie.nodeType==1&&ie.getAttribute("cm-ignore-events")=="true"||ie.parentNode==x.sizer&&ie!=x.mover)return!0}function Ja(x){return x.lineSpace.offsetTop}function Sl(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function Es(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=it(x.measure,Ue("pre","x","CodeMirror-line-like")),ie=window.getComputedStyle?window.getComputedStyle(z):z.currentStyle,re={left:parseInt(ie.paddingLeft),right:parseInt(ie.paddingRight)};return!isNaN(re.left)&&!isNaN(re.right)&&(x.cachedPaddingH=re),re}function Pa(x){return Wt-x.display.nativeBarWidth}function Da(x){return x.display.scroller.clientWidth-Pa(x)-x.display.barWidth}function Xs(x){return x.display.scroller.clientHeight-Pa(x)-x.display.barHeight}function Zs(x,z,ie){var re=x.options.lineWrapping,de=re&&Da(x);if(!z.measure.heights||re&&z.measure.width!=de){var Pe=z.measure.heights=[];if(re){z.measure.width=de;for(var tt=z.text.firstChild.getClientRects(),ft=0;ft<tt.length-1;ft++){var yt=tt[ft],Et=tt[ft+1];Math.abs(yt.bottom-Et.bottom)>2&&Pe.push((yt.bottom+Et.top)/2-ie.top)}}Pe.push(ie.bottom-ie.top)}}function Ps(x,z,ie){if(x.line==z)return{map:x.measure.map,cache:x.measure.cache};for(var re=0;re<x.rest.length;re++)if(x.rest[re]==z)return{map:x.measure.maps[re],cache:x.measure.caches[re]};for(var de=0;de<x.rest.length;de++)if(Ht(x.rest[de])>ie)return{map:x.measure.maps[de],cache:x.measure.caches[de],before:!0}}function ul(x,z){z=hi(z);var ie=Ht(z),re=x.display.externalMeasured=new Wi(x.doc,z,ie);re.lineN=ie;var de=re.built=Mo(x,re);return re.text=de.pre,it(x.display.lineMeasure,de.pre),re}function Ns(x,z,ie,re){return Wo(x,qa(x,z),ie,re)}function _a(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[is(x,z)];var ie=x.display.externalMeasured;if(ie&&z>=ie.lineN&&z<ie.lineN+ie.size)return ie}function qa(x,z){var ie=Ht(z),re=_a(x,ie);re&&!re.text?re=null:re&&re.changes&&(qi(x,re,ie,Uo(x)),x.curOp.forceUpdate=!0),re||(re=ul(x,z));var de=Ps(re,z,ie);return{line:z,view:re,rect:null,map:de.map,cache:de.cache,before:de.before,hasHeights:!1}}function Wo(x,z,ie,re,de){z.before&&(ie=-1);var Pe=ie+(re||""),tt;return z.cache.hasOwnProperty(Pe)?tt=z.cache[Pe]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(Zs(x,z.view,z.rect),z.hasHeights=!0),tt=wo(x,z,ie,re),tt.bogus||(z.cache[Pe]=tt)),{left:tt.left,right:tt.right,top:de?tt.rtop:tt.top,bottom:de?tt.rbottom:tt.bottom}}var Js={left:0,right:0,top:0,bottom:0};function Cl(x,z,ie){for(var re,de,Pe,tt,ft,yt,Et=0;Et<x.length;Et+=3)if(ft=x[Et],yt=x[Et+1],z<ft?(de=0,Pe=1,tt="left"):z<yt?(de=z-ft,Pe=de+1):(Et==x.length-3||z==yt&&x[Et+3]>z)&&(Pe=yt-ft,de=Pe-1,z>=yt&&(tt="right")),de!=null){if(re=x[Et+2],ft==yt&&ie==(re.insertLeft?"left":"right")&&(tt=ie),ie=="left"&&de==0)for(;Et&&x[Et-2]==x[Et-3]&&x[Et-1].insertLeft;)re=x[(Et-=3)+2],tt="left";if(ie=="right"&&de==yt-ft)for(;Et<x.length-3&&x[Et+3]==x[Et+4]&&!x[Et+5].insertLeft;)re=x[(Et+=3)+2],tt="right";break}return{node:re,start:de,end:Pe,collapse:tt,coverStart:ft,coverEnd:yt}}function qs(x,z){var ie=Js;if(z=="left")for(var re=0;re<x.length&&(ie=x[re]).left==ie.right;re++);else for(var de=x.length-1;de>=0&&(ie=x[de]).left==ie.right;de--);return ie}function wo(x,z,ie,re){var de=Cl(z.map,ie,re),Pe=de.node,tt=de.start,ft=de.end,yt=de.collapse,Et;if(Pe.nodeType==3){for(var an=0;an<4;an++){for(;tt&&Pt(z.line.text.charAt(de.coverStart+tt));)--tt;for(;de.coverStart+ft<de.coverEnd&&Pt(z.line.text.charAt(de.coverStart+ft));)++ft;if(fe&&he<9&&tt==0&&ft==de.coverEnd-de.coverStart?Et=Pe.parentNode.getBoundingClientRect():Et=qs(Ve(Pe,tt,ft).getClientRects(),re),Et.left||Et.right||tt==0)break;ft=tt,tt=tt-1,yt="right"}fe&&he<11&&(Et=so(x.display.measure,Et))}else{tt>0&&(yt=re="right");var xn;x.options.lineWrapping&&(xn=Pe.getClientRects()).length>1?Et=xn[re=="right"?xn.length-1:0]:Et=Pe.getBoundingClientRect()}if(fe&&he<9&&!tt&&(!Et||!Et.left&&!Et.right)){var Fn=Pe.parentNode.getClientRects()[0];Fn?Et={left:Fn.left,right:Fn.left+To(x.display),top:Fn.top,bottom:Fn.bottom}:Et=Js}for(var Pn=Et.top-z.rect.top,hr=Et.bottom-z.rect.top,Rr=(Pn+hr)/2,ai=z.view.measure.heights,Si=0;Si<ai.length-1&&!(Rr<ai[Si]);Si++);var Ti=Si?ai[Si-1]:0,vi=ai[Si],Pi={left:(yt=="right"?Et.right:Et.left)-z.rect.left,right:(yt=="left"?Et.left:Et.right)-z.rect.left,top:Ti,bottom:vi};return!Et.left&&!Et.right&&(Pi.bogus=!0),x.options.singleCursorHeightPerLine||(Pi.rtop=Pn,Pi.rbottom=hr),Pi}function so(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!gi(x))return z;var ie=screen.logicalXDPI/screen.deviceXDPI,re=screen.logicalYDPI/screen.deviceYDPI;return{left:z.left*ie,right:z.right*ie,top:z.top*re,bottom:z.bottom*re}}function ia(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 va(x){x.display.externalMeasure=null,Ae(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)ia(x.display.view[z])}function oa(x){va(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function za(){return se&&ye?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function $a(){return se&&ye?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function hs(x){var z=0;if(x.widgets)for(var ie=0;ie<x.widgets.length;++ie)x.widgets[ie].above&&(z+=Cs(x.widgets[ie]));return z}function Wa(x,z,ie,re,de){if(!de){var Pe=hs(z);ie.top+=Pe,ie.bottom+=Pe}if(re=="line")return ie;re||(re="local");var tt=Er(z);if(re=="local"?tt+=Ja(x.display):tt-=x.display.viewOffset,re=="page"||re=="window"){var ft=x.display.lineSpace.getBoundingClientRect();tt+=ft.top+(re=="window"?0:$a());var yt=ft.left+(re=="window"?0:za());ie.left+=yt,ie.right+=yt}return ie.top+=tt,ie.bottom+=tt,ie}function Ms(x,z,ie){if(ie=="div")return z;var re=z.left,de=z.top;if(ie=="page")re-=za(),de-=$a();else if(ie=="local"||!ie){var Pe=x.display.sizer.getBoundingClientRect();re+=Pe.left,de+=Pe.top}var tt=x.display.lineSpace.getBoundingClientRect();return{left:re-tt.left,top:de-tt.top}}function ks(x,z,ie,re,de){return re||(re=Dt(x.doc,z.line)),Wa(x,re,Ns(x,re,z.ch,de),ie)}function Na(x,z,ie,re,de,Pe){re=re||Dt(x.doc,z.line),de||(de=qa(x,re));function tt(hr,Rr){var ai=Wo(x,de,hr,Rr?"right":"left",Pe);return Rr?ai.left=ai.right:ai.right=ai.left,Wa(x,re,ai,ie)}var ft=rn(re,x.doc.direction),yt=z.ch,Et=z.sticky;if(yt>=re.text.length?(yt=re.text.length,Et="before"):yt<=0&&(yt=0,Et="after"),!ft)return tt(Et=="before"?yt-1:yt,Et=="before");function an(hr,Rr,ai){var Si=ft[Rr],Ti=Si.level==1;return tt(ai?hr-1:hr,Ti!=ai)}var xn=mt(ft,yt,Et),Fn=ot,Pn=an(yt,xn,Et=="before");return Fn!=null&&(Pn.other=an(yt,Fn,Et!="before")),Pn}function mc(x,z){var ie=0;z=Sn(x.doc,z),x.options.lineWrapping||(ie=To(x.display)*z.ch);var re=Dt(x.doc,z.line),de=Er(re)+Ja(x.display);return{left:ie,right:ie,top:de,bottom:de+re.height}}function dl(x,z,ie,re,de){var Pe=Rt(x,z,ie);return Pe.xRel=de,re&&(Pe.outside=re),Pe}function hl(x,z,ie){var re=x.doc;if(ie+=x.display.viewOffset,ie<0)return dl(re.first,0,null,-1,-1);var de=Ut(re,ie),Pe=re.first+re.size-1;if(de>Pe)return dl(re.first+re.size-1,Dt(re,Pe).text.length,null,1,1);z<0&&(z=0);for(var tt=Dt(re,de);;){var ft=vc(x,tt,de,z,ie),yt=Nr(tt,ft.ch+(ft.xRel>0||ft.outside>0?1:0));if(!yt)return ft;var Et=yt.find(1);if(Et.line==de)return Et;tt=Dt(re,de=Et.line)}}function Ol(x,z,ie,re){re-=hs(z);var de=z.text.length,Pe=Je(function(tt){return Wo(x,ie,tt-1).bottom<=re},de,0);return de=Je(function(tt){return Wo(x,ie,tt).top>re},Pe,de),{begin:Pe,end:de}}function Rl(x,z,ie,re){ie||(ie=qa(x,z));var de=Wa(x,z,Wo(x,ie,re),"line").top;return Ol(x,z,ie,de)}function wl(x,z,ie,re){return x.bottom<=ie?!1:x.top>ie?!0:(re?x.left:x.right)>z}function vc(x,z,ie,re,de){de-=Er(z);var Pe=qa(x,z),tt=hs(z),ft=0,yt=z.text.length,Et=!0,an=rn(z,x.doc.direction);if(an){var xn=(x.options.lineWrapping?oc:il)(x,z,ie,Pe,an,re,de);Et=xn.level!=1,ft=Et?xn.from:xn.to-1,yt=Et?xn.to:xn.from-1}var Fn=null,Pn=null,hr=Je(function(Ji){var Qi=Wo(x,Pe,Ji);return Qi.top+=tt,Qi.bottom+=tt,wl(Qi,re,de,!1)?(Qi.top<=de&&Qi.left<=re&&(Fn=Ji,Pn=Qi),!0):!1},ft,yt),Rr,ai,Si=!1;if(Pn){var Ti=re-Pn.left<Pn.right-re,vi=Ti==Et;hr=Fn+(vi?0:1),ai=vi?"after":"before",Rr=Ti?Pn.left:Pn.right}else{!Et&&(hr==yt||hr==ft)&&hr++,ai=hr==0?"after":hr==z.text.length?"before":Wo(x,Pe,hr-(Et?1:0)).bottom+tt<=de==Et?"after":"before";var Pi=Na(x,Rt(ie,hr,ai),"line",z,Pe);Rr=Pi.left,Si=de<Pi.top?-1:de>=Pi.bottom?1:0}return hr=Qe(z.text,hr,1),dl(ie,hr,ai,Si,re-Rr)}function il(x,z,ie,re,de,Pe,tt){var ft=Je(function(xn){var Fn=de[xn],Pn=Fn.level!=1;return wl(Na(x,Rt(ie,Pn?Fn.to:Fn.from,Pn?"before":"after"),"line",z,re),Pe,tt,!0)},0,de.length-1),yt=de[ft];if(ft>0){var Et=yt.level!=1,an=Na(x,Rt(ie,Et?yt.from:yt.to,Et?"after":"before"),"line",z,re);wl(an,Pe,tt,!0)&&an.top>tt&&(yt=de[ft-1])}return yt}function oc(x,z,ie,re,de,Pe,tt){var ft=Ol(x,z,re,tt),yt=ft.begin,Et=ft.end;/\s/.test(z.text.charAt(Et-1))&&Et--;for(var an=null,xn=null,Fn=0;Fn<de.length;Fn++){var Pn=de[Fn];if(!(Pn.from>=Et||Pn.to<=yt)){var hr=Pn.level!=1,Rr=Wo(x,re,hr?Math.min(Et,Pn.to)-1:Math.max(yt,Pn.from)).right,ai=Rr<Pe?Pe-Rr+1e9:Rr-Pe;(!an||xn>ai)&&(an=Pn,xn=ai)}}return an||(an=de[de.length-1]),an.from<yt&&(an={from:yt,to:an.to,level:an.level}),an.to>Et&&(an={from:an.from,to:Et,level:an.level}),an}var ol;function fl(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(ol==null){ol=Ue("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)ol.appendChild(document.createTextNode("x")),ol.appendChild(Ue("br"));ol.appendChild(document.createTextNode("x"))}it(x.measure,ol);var ie=ol.offsetHeight/50;return ie>3&&(x.cachedTextHeight=ie),Ae(x.measure),ie||1}function To(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=Ue("span","xxxxxxxxxx"),ie=Ue("pre",[z],"CodeMirror-line-like");it(x.measure,ie);var re=z.getBoundingClientRect(),de=(re.right-re.left)/10;return de>2&&(x.cachedCharWidth=de),de||10}function Uo(x){for(var z=x.display,ie={},re={},de=z.gutters.clientLeft,Pe=z.gutters.firstChild,tt=0;Pe;Pe=Pe.nextSibling,++tt){var ft=x.display.gutterSpecs[tt].className;ie[ft]=Pe.offsetLeft+Pe.clientLeft+de,re[ft]=Pe.clientWidth}return{fixedPos:Xo(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ie,gutterWidth:re,wrapperWidth:z.wrapper.clientWidth}}function Xo(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function fs(x){var z=fl(x.display),ie=x.options.lineWrapping,re=ie&&Math.max(5,x.display.scroller.clientWidth/To(x.display)-3);return function(de){if(_o(x.doc,de))return 0;var Pe=0;if(de.widgets)for(var tt=0;tt<de.widgets.length;tt++)de.widgets[tt].height&&(Pe+=de.widgets[tt].height);return ie?Pe+(Math.ceil(de.text.length/re)||1)*z:Pe+z}}function ja(x){var z=x.doc,ie=fs(x);z.iter(function(re){var de=ie(re);de!=re.height&&Ct(re,de)})}function Ws(x,z,ie,re){var de=x.display;if(!ie&&_r(z).getAttribute("cm-not-content")=="true")return null;var Pe,tt,ft=de.lineSpace.getBoundingClientRect();try{Pe=z.clientX-ft.left,tt=z.clientY-ft.top}catch(xn){return null}var yt=hl(x,Pe,tt),Et;if(re&&yt.xRel>0&&(Et=Dt(x.doc,yt.line).text).length==yt.ch){var an=qe(Et,Et.length,x.options.tabSize)-Et.length;yt=Rt(yt.line,Math.max(0,Math.round((Pe-Es(x.display).left)/To(x.display))-an))}return yt}function is(x,z){if(z>=x.display.viewTo||(z-=x.display.viewFrom,z<0))return null;for(var ie=x.display.view,re=0;re<ie.length;re++)if(z-=ie[re].size,z<0)return re}function Ba(x,z,ie,re){z==null&&(z=x.doc.first),ie==null&&(ie=x.doc.first+x.doc.size),re||(re=0);var de=x.display;if(re&&ie<de.viewTo&&(de.updateLineNumbers==null||de.updateLineNumbers>z)&&(de.updateLineNumbers=z),x.curOp.viewChanged=!0,z>=de.viewTo)Xr&&Co(x.doc,z)<de.viewTo&&Qs(x);else if(ie<=de.viewFrom)Xr&&ji(x.doc,ie+re)>de.viewFrom?Qs(x):(de.viewFrom+=re,de.viewTo+=re);else if(z<=de.viewFrom&&ie>=de.viewTo)Qs(x);else if(z<=de.viewFrom){var Pe=ps(x,ie,ie+re,1);Pe?(de.view=de.view.slice(Pe.index),de.viewFrom=Pe.lineN,de.viewTo+=re):Qs(x)}else if(ie>=de.viewTo){var tt=ps(x,z,z,-1);tt?(de.view=de.view.slice(0,tt.index),de.viewTo=tt.lineN):Qs(x)}else{var ft=ps(x,z,z,-1),yt=ps(x,ie,ie+re,1);ft&&yt?(de.view=de.view.slice(0,ft.index).concat(ta(x,ft.lineN,yt.lineN)).concat(de.view.slice(yt.index)),de.viewTo+=re):Qs(x)}var Et=de.externalMeasured;Et&&(ie<Et.lineN?Et.lineN+=re:z<Et.lineN+Et.size&&(de.externalMeasured=null))}function Aa(x,z,ie){x.curOp.viewChanged=!0;var re=x.display,de=x.display.externalMeasured;if(de&&z>=de.lineN&&z<de.lineN+de.size&&(re.externalMeasured=null),!(z<re.viewFrom||z>=re.viewTo)){var Pe=re.view[is(x,z)];if(Pe.node!=null){var tt=Pe.changes||(Pe.changes=[]);wt(tt,ie)==-1&&tt.push(ie)}}}function Qs(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function ps(x,z,ie,re){var de=is(x,z),Pe,tt=x.display.view;if(!Xr||ie==x.doc.first+x.doc.size)return{index:de,lineN:ie};for(var ft=x.display.viewFrom,yt=0;yt<de;yt++)ft+=tt[yt].size;if(ft!=z){if(re>0){if(de==tt.length-1)return null;Pe=ft+tt[de].size-z,de++}else Pe=ft-z;z+=Pe,ie+=Pe}for(;Co(x.doc,ie)!=ie;){if(de==(re<0?0:tt.length-1))return null;ie+=re*tt[de-(re<0?1:0)].size,de+=re}return{index:de,lineN:ie}}function Pl(x,z,ie){var re=x.display,de=re.view;de.length==0||z>=re.viewTo||ie<=re.viewFrom?(re.view=ta(x,z,ie),re.viewFrom=z):(re.viewFrom>z?re.view=ta(x,z,re.viewFrom).concat(re.view):re.viewFrom<z&&(re.view=re.view.slice(is(x,z))),re.viewFrom=z,re.viewTo<ie?re.view=re.view.concat(ta(x,re.viewTo,ie)):re.viewTo>ie&&(re.view=re.view.slice(0,is(x,ie)))),re.viewTo=ie}function Dc(x){for(var z=x.display.view,ie=0,re=0;re<z.length;re++){var de=z[re];!de.hidden&&(!de.node||de.changes)&&++ie}return ie}function al(x){x.display.input.showSelection(x.display.input.prepareSelection())}function cu(x,z){z===void 0&&(z=!0);for(var ie=x.doc,re={},de=re.cursors=document.createDocumentFragment(),Pe=re.selection=document.createDocumentFragment(),tt=0;tt<ie.sel.ranges.length;tt++)if(!(!z&&tt==ie.sel.primIndex)){var ft=ie.sel.ranges[tt];if(!(ft.from().line>=x.display.viewTo||ft.to().line<x.display.viewFrom)){var yt=ft.empty();(yt||x.options.showCursorWhenSelecting)&&Qc(x,ft.head,de),yt||uu(x,ft,Pe)}}return re}function Qc(x,z,ie){var re=Na(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),de=ie.appendChild(Ue("div","\xA0","CodeMirror-cursor"));if(de.style.left=re.left+"px",de.style.top=re.top+"px",de.style.height=Math.max(0,re.bottom-re.top)*x.options.cursorHeight+"px",re.other){var Pe=ie.appendChild(Ue("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Pe.style.display="",Pe.style.left=re.other.left+"px",Pe.style.top=re.other.top+"px",Pe.style.height=(re.other.bottom-re.other.top)*.85+"px"}}function gc(x,z){return x.top-z.top||x.left-z.left}function uu(x,z,ie){var re=x.display,de=x.doc,Pe=document.createDocumentFragment(),tt=Es(x.display),ft=tt.left,yt=Math.max(re.sizerWidth,Da(x)-re.sizer.offsetLeft)-tt.right,Et=de.direction=="ltr";function an(vi,Pi,Ji,Qi){Pi<0&&(Pi=0),Pi=Math.round(Pi),Qi=Math.round(Qi),Pe.appendChild(Ue("div",null,"CodeMirror-selected","position: absolute; left: "+vi+`px;
top: `+Pi+"px; width: "+(Ji==null?yt-vi:Ji)+`px;
height: `+(Qi-Pi)+"px"))}function xn(vi,Pi,Ji){var Qi=Dt(de,vi),Io=Qi.text.length,Ea,Rs;function Ya(gs,cl){return ks(x,Rt(vi,gs),"div",Qi,cl)}function sl(gs,cl,po){var ts=Rl(x,Qi,null,gs),Xa=cl=="ltr"==(po=="after")?"left":"right",ns=po=="after"?ts.begin:ts.end-(/\s/.test(Qi.text.charAt(ts.end-1))?2:1);return Ya(ns,Xa)[Xa]}var ll=rn(Qi,de.direction);return xt(ll,Pi||0,Ji==null?Io:Ji,function(gs,cl,po,ts){var Xa=po=="ltr",ns=Ya(gs,Xa?"left":"right"),cs=Ya(cl-1,Xa?"right":"left"),ru=Pi==null&&gs==0,bl=Ji==null&&cl==Io,zs=ts==0,sa=!ll||ts==ll.length-1;if(cs.top-ns.top<=3){var xs=(Et?ru:bl)&&zs,ud=(Et?bl:ru)&&sa,Mc=xs?ft:(Xa?ns:cs).left,$c=ud?yt:(Xa?cs:ns).right;an(Mc,ns.top,$c-Mc,ns.bottom)}else{var uc,ys,iu,$s;Xa?(uc=Et&&ru&&zs?ft:ns.left,ys=Et?yt:sl(gs,po,"before"),iu=Et?ft:sl(cl,po,"after"),$s=Et&&bl&&sa?yt:cs.right):(uc=Et?sl(gs,po,"before"):ft,ys=!Et&&ru&&zs?yt:ns.right,iu=!Et&&bl&&sa?ft:cs.left,$s=Et?sl(cl,po,"after"):yt),an(uc,ns.top,ys-uc,ns.bottom),ns.bottom<cs.top&&an(ft,ns.bottom,null,cs.top),an(iu,cs.top,$s-iu,cs.bottom)}(!Ea||gc(ns,Ea)<0)&&(Ea=ns),gc(cs,Ea)<0&&(Ea=cs),(!Rs||gc(ns,Rs)<0)&&(Rs=ns),gc(cs,Rs)<0&&(Rs=cs)}),{start:Ea,end:Rs}}var Fn=z.from(),Pn=z.to();if(Fn.line==Pn.line)xn(Fn.line,Fn.ch,Pn.ch);else{var hr=Dt(de,Fn.line),Rr=Dt(de,Pn.line),ai=hi(hr)==hi(Rr),Si=xn(Fn.line,Fn.ch,ai?hr.text.length+1:null).end,Ti=xn(Pn.line,ai?0:null,Pn.ch).start;ai&&(Si.top<Ti.top-2?(an(Si.right,Si.top,null,Si.bottom),an(ft,Ti.top,Ti.left,Ti.bottom)):an(Si.right,Si.top,Ti.left-Si.right,Si.bottom)),Si.bottom<Ti.top&&an(ft,Si.bottom,null,Ti.top)}ie.appendChild(Pe)}function Ac(x){if(x.state.focused){var z=x.display;clearInterval(z.blinker);var ie=!0;z.cursorDiv.style.visibility="",x.options.cursorBlinkRate>0?z.blinker=setInterval(function(){x.hasFocus()||El(x),z.cursorDiv.style.visibility=(ie=!ie)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function yc(x){x.state.focused||(x.display.input.focus(),pl(x))}function Ic(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,El(x))},100)}function pl(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(Lt(x,"focus",x,z),x.state.focused=!0,Ot(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),ce&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),Ac(x))}function El(x,z){x.state.delayingBlurEvent||(x.state.focused&&(Lt(x,"blur",x,z),x.state.focused=!1,Ie(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function Nl(x){for(var z=x.display,ie=z.lineDiv.offsetTop,re=0;re<z.view.length;re++){var de=z.view[re],Pe=x.options.lineWrapping,tt=void 0,ft=0;if(!de.hidden){if(fe&&he<8){var yt=de.node.offsetTop+de.node.offsetHeight;tt=yt-ie,ie=yt}else{var Et=de.node.getBoundingClientRect();tt=Et.bottom-Et.top,!Pe&&de.text.firstChild&&(ft=de.text.firstChild.getBoundingClientRect().right-Et.left-1)}var an=de.line.height-tt;if((an>.005||an<-.005)&&(Ct(de.line,tt),du(de.line),de.rest))for(var xn=0;xn<de.rest.length;xn++)du(de.rest[xn]);if(ft>x.display.sizerWidth){var Fn=Math.ceil(ft/To(x.display));Fn>x.display.maxLineLength&&(x.display.maxLineLength=Fn,x.display.maxLine=de.line,x.display.maxLineChanged=!0)}}}}function du(x){if(x.widgets)for(var z=0;z<x.widgets.length;++z){var ie=x.widgets[z],re=ie.node.parentNode;re&&(ie.height=re.offsetHeight)}}function Qa(x,z,ie){var re=ie&&ie.top!=null?Math.max(0,ie.top):x.scroller.scrollTop;re=Math.floor(re-Ja(x));var de=ie&&ie.bottom!=null?ie.bottom:re+x.wrapper.clientHeight,Pe=Ut(z,re),tt=Ut(z,de);if(ie&&ie.ensure){var ft=ie.ensure.from.line,yt=ie.ensure.to.line;ft<Pe?(Pe=ft,tt=Ut(z,Er(Dt(z,ft))+x.wrapper.clientHeight)):Math.min(yt,z.lastLine())>=tt&&(Pe=Ut(z,Er(Dt(z,yt))-x.wrapper.clientHeight),tt=yt)}return{from:Pe,to:Math.max(tt,Pe+1)}}function Ml(x,z){if(!qt(x,"scrollCursorIntoView")){var ie=x.display,re=ie.sizer.getBoundingClientRect(),de=null;if(z.top+re.top<0?de=!0:z.bottom+re.top>(window.innerHeight||document.documentElement.clientHeight)&&(de=!1),de!=null&&!oe){var Pe=Ue("div","\u200B",null,`position: absolute;
top: `+(z.top-ie.viewOffset-Ja(x.display))+`px;
height: `+(z.bottom-z.top+Pa(x)+ie.barHeight)+`px;
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(Pe),Pe.scrollIntoView(de),x.display.lineSpace.removeChild(Pe)}}}function Vl(x,z,ie,re){re==null&&(re=0);var de;!x.options.lineWrapping&&z==ie&&(z=z.ch?Rt(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ie=z.sticky=="before"?Rt(z.line,z.ch+1,"before"):z);for(var Pe=0;Pe<5;Pe++){var tt=!1,ft=Na(x,z),yt=!ie||ie==z?ft:Na(x,ie);de={left:Math.min(ft.left,yt.left),top:Math.min(ft.top,yt.top)-re,right:Math.max(ft.left,yt.left),bottom:Math.max(ft.bottom,yt.bottom)+re};var Et=Tc(x,de),an=x.doc.scrollTop,xn=x.doc.scrollLeft;if(Et.scrollTop!=null&&(Bl(x,Et.scrollTop),Math.abs(x.doc.scrollTop-an)>1&&(tt=!0)),Et.scrollLeft!=null&&(el(x,Et.scrollLeft),Math.abs(x.doc.scrollLeft-xn)>1&&(tt=!0)),!tt)break}return de}function hu(x,z){var ie=Tc(x,z);ie.scrollTop!=null&&Bl(x,ie.scrollTop),ie.scrollLeft!=null&&el(x,ie.scrollLeft)}function Tc(x,z){var ie=x.display,re=fl(x.display);z.top<0&&(z.top=0);var de=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ie.scroller.scrollTop,Pe=Xs(x),tt={};z.bottom-z.top>Pe&&(z.bottom=z.top+Pe);var ft=x.doc.height+Sl(ie),yt=z.top<re,Et=z.bottom>ft-re;if(z.top<de)tt.scrollTop=yt?0:z.top;else if(z.bottom>de+Pe){var an=Math.min(z.top,(Et?ft:z.bottom)-Pe);an!=de&&(tt.scrollTop=an)}var xn=x.options.fixedGutter?0:ie.gutters.offsetWidth,Fn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ie.scroller.scrollLeft-xn,Pn=Da(x)-ie.gutters.offsetWidth,hr=z.right-z.left>Pn;return hr&&(z.right=z.left+Pn),z.left<10?tt.scrollLeft=0:z.left<Fn?tt.scrollLeft=Math.max(0,z.left+xn-(hr?0:10)):z.right>Pn+Fn-3&&(tt.scrollLeft=z.right+(hr?0:10)-Pn),tt}function Oc(x,z){z!=null&&(Ui(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function ac(x){Ui(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function Gl(x,z,ie){(z!=null||ie!=null)&&Ui(x),z!=null&&(x.curOp.scrollLeft=z),ie!=null&&(x.curOp.scrollTop=ie)}function Iu(x,z){Ui(x),x.curOp.scrollToPos=z}function Ui(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ie=mc(x,z.from),re=mc(x,z.to);fu(x,ie,re,z.margin)}}function fu(x,z,ie,re){var de=Tc(x,{left:Math.min(z.left,ie.left),top:Math.min(z.top,ie.top)-re,right:Math.max(z.right,ie.right),bottom:Math.max(z.bottom,ie.bottom)+re});Gl(x,de.scrollLeft,de.scrollTop)}function Bl(x,z){Math.abs(x.doc.scrollTop-z)<2||(ne||nr(x,{top:z}),pu(x,z,!0),ne&&nr(x),en(x,100))}function pu(x,z,ie){z=Math.max(0,Math.min(x.display.scroller.scrollHeight-x.display.scroller.clientHeight,z)),!(x.display.scroller.scrollTop==z&&!ie)&&(x.doc.scrollTop=z,x.display.scrollbars.setScrollTop(z),x.display.scroller.scrollTop!=z&&(x.display.scroller.scrollTop=z))}function el(x,z,ie,re){z=Math.max(0,Math.min(z,x.display.scroller.scrollWidth-x.display.scroller.clientWidth)),!((ie?z==x.doc.scrollLeft:Math.abs(x.doc.scrollLeft-z)<2)&&!re)&&(x.doc.scrollLeft=z,qr(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function Yl(x){var z=x.display,ie=z.gutters.offsetWidth,re=Math.round(x.doc.height+Sl(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?ie:0,docHeight:re,scrollHeight:re+Pa(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ie}}var ml=function(x,z,ie){this.cm=ie;var re=this.vert=Ue("div",[Ue("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),de=this.horiz=Ue("div",[Ue("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");re.tabIndex=de.tabIndex=-1,x(re),x(de),Qt(re,"scroll",function(){re.clientHeight&&z(re.scrollTop,"vertical")}),Qt(de,"scroll",function(){de.clientWidth&&z(de.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,fe&&he<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ml.prototype.update=function(x){var z=x.scrollWidth>x.clientWidth+1,ie=x.scrollHeight>x.clientHeight+1,re=x.nativeBarWidth;if(ie){this.vert.style.display="block",this.vert.style.bottom=z?re+"px":"0";var de=x.viewHeight-(z?re:0);this.vert.firstChild.style.height=Math.max(0,x.scrollHeight-x.clientHeight+de)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(z){this.horiz.style.display="block",this.horiz.style.right=ie?re+"px":"0",this.horiz.style.left=x.barLeft+"px";var Pe=x.viewWidth-x.barLeft-(ie?re:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+Pe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&x.clientHeight>0&&(re==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ie?re:0,bottom:z?re:0}},ml.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ml.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ml.prototype.zeroWidthHack=function(){var x=Be&&!pe?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ze,this.disableVert=new Ze},ml.prototype.enableZeroWidthBar=function(x,z,ie){x.style.pointerEvents="auto";function re(){var de=x.getBoundingClientRect(),Pe=ie=="vert"?document.elementFromPoint(de.right-1,(de.top+de.bottom)/2):document.elementFromPoint((de.right+de.left)/2,de.bottom-1);Pe!=x?x.style.pointerEvents="none":z.set(1e3,re)}z.set(1e3,re)},ml.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var Ls=function(){};Ls.prototype.update=function(){return{bottom:0,right:0}},Ls.prototype.setScrollLeft=function(){},Ls.prototype.setScrollTop=function(){},Ls.prototype.clear=function(){};function Fo(x,z){z||(z=Yl(x));var ie=x.display.barWidth,re=x.display.barHeight;Ia(x,z);for(var de=0;de<4&&ie!=x.display.barWidth||re!=x.display.barHeight;de++)ie!=x.display.barWidth&&x.options.lineWrapping&&Nl(x),Ia(x,Yl(x)),ie=x.display.barWidth,re=x.display.barHeight}function Ia(x,z){var ie=x.display,re=ie.scrollbars.update(z);ie.sizer.style.paddingRight=(ie.barWidth=re.right)+"px",ie.sizer.style.paddingBottom=(ie.barHeight=re.bottom)+"px",ie.heightForcer.style.borderBottom=re.bottom+"px solid transparent",re.right&&re.bottom?(ie.scrollbarFiller.style.display="block",ie.scrollbarFiller.style.height=re.bottom+"px",ie.scrollbarFiller.style.width=re.right+"px"):ie.scrollbarFiller.style.display="",re.bottom&&x.options.coverGutterNextToScrollbar&&x.options.fixedGutter?(ie.gutterFiller.style.display="block",ie.gutterFiller.style.height=re.bottom+"px",ie.gutterFiller.style.width=z.gutterWidth+"px"):ie.gutterFiller.style.display=""}var eu={native:ml,null:Ls};function Ds(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&Ie(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new eu[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),Qt(z,"mousedown",function(){x.state.focused&&setTimeout(function(){return x.display.input.focus()},0)}),z.setAttribute("cm-not-content","true")},function(z,ie){ie=="horizontal"?el(x,z):Bl(x,z)},x),x.display.scrollbars.addClass&&Ot(x.display.wrapper,x.display.scrollbars.addClass)}var Tu=0;function bs(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:++Tu},no(x.curOp)}function kl(x){var z=x.curOp;z&&Fi(z,function(ie){for(var re=0;re<ie.ops.length;re++)ie.ops[re].cm.curOp=null;bc(ie)})}function bc(x){for(var z=x.ops,ie=0;ie<z.length;ie++)pt(z[ie]);for(var re=0;re<z.length;re++)bt(z[re]);for(var de=0;de<z.length;de++)$t(z[de]);for(var Pe=0;Pe<z.length;Pe++)Gt(z[Pe]);for(var tt=0;tt<z.length;tt++)ln(z[tt])}function pt(x){var z=x.cm,ie=z.display;mn(z),x.updateMaxLine&&kr(z),x.mustUpdate=x.viewChanged||x.forceUpdate||x.scrollTop!=null||x.scrollToPos&&(x.scrollToPos.from.line<ie.viewFrom||x.scrollToPos.to.line>=ie.viewTo)||ie.maxLineChanged&&z.options.lineWrapping,x.update=x.mustUpdate&&new tn(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function bt(x){x.updatedDisplay=x.mustUpdate&&tr(x.cm,x.update)}function $t(x){var z=x.cm,ie=z.display;x.updatedDisplay&&Nl(z),x.barMeasure=Yl(z),ie.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=Ns(z,ie.maxLine,ie.maxLine.text.length).left+3,z.display.sizerWidth=x.adjustWidthTo,x.barMeasure.scrollWidth=Math.max(ie.scroller.clientWidth,ie.sizer.offsetLeft+x.adjustWidthTo+Pa(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ie.sizer.offsetLeft+x.adjustWidthTo-Da(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ie.input.prepareSelection())}function Gt(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&el(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ie=x.focus&&x.focus==ct();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ie),(x.updatedDisplay||x.startHeight!=z.doc.height)&&Fo(z,x.barMeasure),x.updatedDisplay&&ur(z,x.barMeasure),x.selectionChanged&&Ac(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ie&&yc(x.cm)}function ln(x){var z=x.cm,ie=z.display,re=z.doc;if(x.updatedDisplay&&Hn(z,x.update),ie.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ie.wheelStartX=ie.wheelStartY=null),x.scrollTop!=null&&pu(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&el(z,x.scrollLeft,!0,!0),x.scrollToPos){var de=Vl(z,Sn(re,x.scrollToPos.from),Sn(re,x.scrollToPos.to),x.scrollToPos.margin);Ml(z,de)}var Pe=x.maybeHiddenMarkers,tt=x.maybeUnhiddenMarkers;if(Pe)for(var ft=0;ft<Pe.length;++ft)Pe[ft].lines.length||Lt(Pe[ft],"hide");if(tt)for(var yt=0;yt<tt.length;++yt)tt[yt].lines.length&&Lt(tt[yt],"unhide");ie.wrapper.offsetHeight&&(re.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&Lt(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function Ge(x,z){if(x.curOp)return z();bs(x);try{return z()}finally{kl(x)}}function st(x,z){return function(){if(x.curOp)return z.apply(x,arguments);bs(x);try{return z.apply(x,arguments)}finally{kl(x)}}}function ht(x){return function(){if(this.curOp)return x.apply(this,arguments);bs(this);try{return x.apply(this,arguments)}finally{kl(this)}}}function Yt(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);bs(z);try{return x.apply(this,arguments)}finally{kl(z)}}}function en(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,ut(nn,x))}function nn(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ie=+new Date+x.options.workTime,re=kn(x,z.highlightFrontier),de=[];z.iter(re.line,Math.min(z.first+z.size,x.display.viewTo+500),function(Pe){if(re.line>=x.display.viewFrom){var tt=Pe.styles,ft=Pe.text.length>x.options.maxHighlightLength?De(z.mode,re.state):null,yt=An(x,Pe,re,!0);ft&&(re.state=ft),Pe.styles=yt.styles;var Et=Pe.styleClasses,an=yt.classes;an?Pe.styleClasses=an:Et&&(Pe.styleClasses=null);for(var xn=!tt||tt.length!=Pe.styles.length||Et!=an&&(!Et||!an||Et.bgClass!=an.bgClass||Et.textClass!=an.textClass),Fn=0;!xn&&Fn<tt.length;++Fn)xn=tt[Fn]!=Pe.styles[Fn];xn&&de.push(re.line),Pe.stateAfter=re.save(),re.nextLine()}else Pe.text.length<=x.options.maxHighlightLength&&Mn(x,Pe.text,re),Pe.stateAfter=re.line%5==0?re.save():null,re.nextLine();if(+new Date>ie)return en(x,x.options.workDelay),!0}),z.highlightFrontier=re.line,z.modeFrontier=Math.max(z.modeFrontier,re.line),de.length&&Ge(x,function(){for(var Pe=0;Pe<de.length;Pe++)Aa(x,de[Pe],"text")})}}var tn=function(x,z,ie){var re=x.display;this.viewport=z,this.visible=Qa(re,x.doc,z),this.editorIsHidden=!re.wrapper.offsetWidth,this.wrapperHeight=re.wrapper.clientHeight,this.wrapperWidth=re.wrapper.clientWidth,this.oldDisplayWidth=Da(x),this.force=ie,this.dims=Uo(x),this.events=[]};tn.prototype.signal=function(x,z){Jt(x,z)&&this.events.push(arguments)},tn.prototype.finish=function(){for(var x=0;x<this.events.length;x++)Lt.apply(null,this.events[x])};function mn(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=Pa(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=Pa(x)+"px",z.scrollbarsClipped=!0)}function _n(x){if(x.hasFocus())return null;var z=ct();if(!z||!Tt(x.display.lineDiv,z))return null;var ie={activeElt:z};if(window.getSelection){var re=window.getSelection();re.anchorNode&&re.extend&&Tt(x.display.lineDiv,re.anchorNode)&&(ie.anchorNode=re.anchorNode,ie.anchorOffset=re.anchorOffset,ie.focusNode=re.focusNode,ie.focusOffset=re.focusOffset)}return ie}function Dn(x){if(!(!x||!x.activeElt||x.activeElt==ct())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&Tt(document.body,x.anchorNode)&&Tt(document.body,x.focusNode))){var z=window.getSelection(),ie=document.createRange();ie.setEnd(x.anchorNode,x.anchorOffset),ie.collapse(!1),z.removeAllRanges(),z.addRange(ie),z.extend(x.focusNode,x.focusOffset)}}function tr(x,z){var ie=x.display,re=x.doc;if(z.editorIsHidden)return Qs(x),!1;if(!z.force&&z.visible.from>=ie.viewFrom&&z.visible.to<=ie.viewTo&&(ie.updateLineNumbers==null||ie.updateLineNumbers>=ie.viewTo)&&ie.renderedView==ie.view&&Dc(x)==0)return!1;pr(x)&&(Qs(x),z.dims=Uo(x));var de=re.first+re.size,Pe=Math.max(z.visible.from-x.options.viewportMargin,re.first),tt=Math.min(de,z.visible.to+x.options.viewportMargin);ie.viewFrom<Pe&&Pe-ie.viewFrom<20&&(Pe=Math.max(re.first,ie.viewFrom)),ie.viewTo>tt&&ie.viewTo-tt<20&&(tt=Math.min(de,ie.viewTo)),Xr&&(Pe=Co(x.doc,Pe),tt=ji(x.doc,tt));var ft=Pe!=ie.viewFrom||tt!=ie.viewTo||ie.lastWrapHeight!=z.wrapperHeight||ie.lastWrapWidth!=z.wrapperWidth;Pl(x,Pe,tt),ie.viewOffset=Er(Dt(x.doc,ie.viewFrom)),x.display.mover.style.top=ie.viewOffset+"px";var yt=Dc(x);if(!ft&&yt==0&&!z.force&&ie.renderedView==ie.view&&(ie.updateLineNumbers==null||ie.updateLineNumbers>=ie.viewTo))return!1;var Et=_n(x);return yt>4&&(ie.lineDiv.style.display="none"),jn(x,ie.updateLineNumbers,z.dims),yt>4&&(ie.lineDiv.style.display=""),ie.renderedView=ie.view,Dn(Et),Ae(ie.cursorDiv),Ae(ie.selectionDiv),ie.gutters.style.height=ie.sizer.style.minHeight=0,ft&&(ie.lastWrapHeight=z.wrapperHeight,ie.lastWrapWidth=z.wrapperWidth,en(x,400)),ie.updateLineNumbers=null,!0}function Hn(x,z){for(var ie=z.viewport,re=!0;;re=!1){if(!re||!x.options.lineWrapping||z.oldDisplayWidth==Da(x)){if(ie&&ie.top!=null&&(ie={top:Math.min(x.doc.height+Sl(x.display)-Xs(x),ie.top)}),z.visible=Qa(x.display,x.doc,ie),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else re&&(z.visible=Qa(x.display,x.doc,ie));if(!tr(x,z))break;Nl(x);var de=Yl(x);al(x),Fo(x,de),ur(x,de),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 nr(x,z){var ie=new tn(x,z);if(tr(x,ie)){Nl(x),Hn(x,ie);var re=Yl(x);al(x),Fo(x,re),ur(x,re),ie.finish()}}function jn(x,z,ie){var re=x.display,de=x.options.lineNumbers,Pe=re.lineDiv,tt=Pe.firstChild;function ft(hr){var Rr=hr.nextSibling;return ce&&Be&&x.display.currentWheelTarget==hr?hr.style.display="none":hr.parentNode.removeChild(hr),Rr}for(var yt=re.view,Et=re.viewFrom,an=0;an<yt.length;an++){var xn=yt[an];if(!xn.hidden)if(!xn.node||xn.node.parentNode!=Pe){var Fn=ua(x,xn,Et,ie);Pe.insertBefore(Fn,tt)}else{for(;tt!=xn.node;)tt=ft(tt);var Pn=de&&z!=null&&z<=Et&&xn.lineNumber;xn.changes&&(wt(xn.changes,"gutter")>-1&&(Pn=!1),qi(x,xn,Et,ie)),Pn&&(Ae(xn.lineNumber),xn.lineNumber.appendChild(document.createTextNode(cn(x.options,Et)))),tt=xn.node.nextSibling}Et+=xn.size}for(;tt;)tt=ft(tt)}function lr(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function ur(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+Pa(x)+"px"}function qr(x){var z=x.display,ie=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var re=Xo(z)-z.scroller.scrollLeft+x.doc.scrollLeft,de=z.gutters.offsetWidth,Pe=re+"px",tt=0;tt<ie.length;tt++)if(!ie[tt].hidden){x.options.fixedGutter&&(ie[tt].gutter&&(ie[tt].gutter.style.left=Pe),ie[tt].gutterBackground&&(ie[tt].gutterBackground.style.left=Pe));var ft=ie[tt].alignable;if(ft)for(var yt=0;yt<ft.length;yt++)ft[yt].style.left=Pe}x.options.fixedGutter&&(z.gutters.style.left=re+de+"px")}}function pr(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ie=cn(x.options,z.first+z.size-1),re=x.display;if(ie.length!=re.lineNumChars){var de=re.measure.appendChild(Ue("div",[Ue("div",ie)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Pe=de.firstChild.offsetWidth,tt=de.offsetWidth-Pe;return re.lineGutter.style.width="",re.lineNumInnerWidth=Math.max(Pe,re.lineGutter.offsetWidth-tt)+1,re.lineNumWidth=re.lineNumInnerWidth+tt,re.lineNumChars=re.lineNumInnerWidth?ie.length:-1,re.lineGutter.style.width=re.lineNumWidth+"px",lr(x.display),!0}return!1}function Yr(x,z){for(var ie=[],re=!1,de=0;de<x.length;de++){var Pe=x[de],tt=null;if(typeof Pe!="string"&&(tt=Pe.style,Pe=Pe.className),Pe=="CodeMirror-linenumbers")if(z)re=!0;else continue;ie.push({className:Pe,style:tt})}return z&&!re&&ie.push({className:"CodeMirror-linenumbers",style:null}),ie}function wi(x){var z=x.gutters,ie=x.gutterSpecs;Ae(z),x.lineGutter=null;for(var re=0;re<ie.length;++re){var de=ie[re],Pe=de.className,tt=de.style,ft=z.appendChild(Ue("div",null,"CodeMirror-gutter "+Pe));tt&&(ft.style.cssText=tt),Pe=="CodeMirror-linenumbers"&&(x.lineGutter=ft,ft.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ie.length?"":"none",lr(x)}function ar(x){wi(x.display),Ba(x),qr(x)}function Br(x,z,ie,re){var de=this;this.input=ie,de.scrollbarFiller=Ue("div",null,"CodeMirror-scrollbar-filler"),de.scrollbarFiller.setAttribute("cm-not-content","true"),de.gutterFiller=Ue("div",null,"CodeMirror-gutter-filler"),de.gutterFiller.setAttribute("cm-not-content","true"),de.lineDiv=gt("div",null,"CodeMirror-code"),de.selectionDiv=Ue("div",null,null,"position: relative; z-index: 1"),de.cursorDiv=Ue("div",null,"CodeMirror-cursors"),de.measure=Ue("div",null,"CodeMirror-measure"),de.lineMeasure=Ue("div",null,"CodeMirror-measure"),de.lineSpace=gt("div",[de.measure,de.lineMeasure,de.selectionDiv,de.cursorDiv,de.lineDiv],null,"position: relative; outline: none");var Pe=gt("div",[de.lineSpace],"CodeMirror-lines");de.mover=Ue("div",[Pe],null,"position: relative"),de.sizer=Ue("div",[de.mover],"CodeMirror-sizer"),de.sizerWidth=null,de.heightForcer=Ue("div",null,null,"position: absolute; height: "+Wt+"px; width: 1px;"),de.gutters=Ue("div",null,"CodeMirror-gutters"),de.lineGutter=null,de.scroller=Ue("div",[de.sizer,de.heightForcer,de.gutters],"CodeMirror-scroll"),de.scroller.setAttribute("tabIndex","-1"),de.wrapper=Ue("div",[de.scrollbarFiller,de.gutterFiller,de.scroller],"CodeMirror"),fe&&he<8&&(de.gutters.style.zIndex=-1,de.scroller.style.paddingRight=0),!ce&&!(ne&&we)&&(de.scroller.draggable=!0),x&&(x.appendChild?x.appendChild(de.wrapper):x(de.wrapper)),de.viewFrom=de.viewTo=z.first,de.reportedViewFrom=de.reportedViewTo=z.first,de.view=[],de.renderedView=null,de.externalMeasured=null,de.viewOffset=0,de.lastWrapHeight=de.lastWrapWidth=0,de.updateLineNumbers=null,de.nativeBarWidth=de.barHeight=de.barWidth=0,de.scrollbarsClipped=!1,de.lineNumWidth=de.lineNumInnerWidth=de.lineNumChars=null,de.alignWidgets=!1,de.cachedCharWidth=de.cachedTextHeight=de.cachedPaddingH=null,de.maxLine=null,de.maxLineLength=0,de.maxLineChanged=!1,de.wheelDX=de.wheelDY=de.wheelStartX=de.wheelStartY=null,de.shift=!1,de.selForContextMenu=null,de.activeTouch=null,de.gutterSpecs=Yr(re.gutters,re.lineNumbers),wi(de),ie.init(de)}var $n=0,rr=null;fe?rr=-.53:ne?rr=15:se?rr=-.7:ue&&(rr=-1/3);function br(x){var z=x.wheelDeltaX,ie=x.wheelDeltaY;return z==null&&x.detail&&x.axis==x.HORIZONTAL_AXIS&&(z=x.detail),ie==null&&x.detail&&x.axis==x.VERTICAL_AXIS?ie=x.detail:ie==null&&(ie=x.wheelDelta),{x:z,y:ie}}function pi(x){var z=br(x);return z.x*=rr,z.y*=rr,z}function Ki(x,z){var ie=br(z),re=ie.x,de=ie.y,Pe=x.display,tt=Pe.scroller,ft=tt.scrollWidth>tt.clientWidth,yt=tt.scrollHeight>tt.clientHeight;if(re&&ft||de&&yt){if(de&&Be&&ce){e:for(var Et=z.target,an=Pe.view;Et!=tt;Et=Et.parentNode)for(var xn=0;xn<an.length;xn++)if(an[xn].node==Et){x.display.currentWheelTarget=Et;break e}}if(re&&!ne&&!ve&&rr!=null){de&&yt&&Bl(x,Math.max(0,tt.scrollTop+de*rr)),el(x,Math.max(0,tt.scrollLeft+re*rr)),(!de||de&&yt)&&zn(z),Pe.wheelStartX=null;return}if(de&&rr!=null){var Fn=de*rr,Pn=x.doc.scrollTop,hr=Pn+Pe.wrapper.clientHeight;Fn<0?Pn=Math.max(0,Pn+Fn-50):hr=Math.min(x.doc.height,hr+Fn+50),nr(x,{top:Pn,bottom:hr})}$n<20&&(Pe.wheelStartX==null?(Pe.wheelStartX=tt.scrollLeft,Pe.wheelStartY=tt.scrollTop,Pe.wheelDX=re,Pe.wheelDY=de,setTimeout(function(){if(Pe.wheelStartX!=null){var Rr=tt.scrollLeft-Pe.wheelStartX,ai=tt.scrollTop-Pe.wheelStartY,Si=ai&&Pe.wheelDY&&ai/Pe.wheelDY||Rr&&Pe.wheelDX&&Rr/Pe.wheelDX;Pe.wheelStartX=Pe.wheelStartY=null,Si&&(rr=(rr*$n+Si)/($n+1),++$n)}},200)):(Pe.wheelDX+=re,Pe.wheelDY+=de))}}var ir=function(x,z){this.ranges=x,this.primIndex=z};ir.prototype.primary=function(){return this.ranges[this.primIndex]},ir.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 ie=this.ranges[z],re=x.ranges[z];if(!In(ie.anchor,re.anchor)||!In(ie.head,re.head))return!1}return!0},ir.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new gr(wn(this.ranges[z].anchor),wn(this.ranges[z].head));return new ir(x,this.primIndex)},ir.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},ir.prototype.contains=function(x,z){z||(z=x);for(var ie=0;ie<this.ranges.length;ie++){var re=this.ranges[ie];if(Vt(z,re.from())>=0&&Vt(x,re.to())<=0)return ie}return-1};var gr=function(x,z){this.anchor=x,this.head=z};gr.prototype.from=function(){return Rn(this.anchor,this.head)},gr.prototype.to=function(){return Nn(this.anchor,this.head)},gr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function oi(x,z,ie){var re=x&&x.options.selectionsMayTouch,de=z[ie];z.sort(function(Fn,Pn){return Vt(Fn.from(),Pn.from())}),ie=wt(z,de);for(var Pe=1;Pe<z.length;Pe++){var tt=z[Pe],ft=z[Pe-1],yt=Vt(ft.to(),tt.from());if(re&&!tt.empty()?yt>0:yt>=0){var Et=Rn(ft.from(),tt.from()),an=Nn(ft.to(),tt.to()),xn=ft.empty()?tt.from()==tt.head:ft.from()==ft.head;Pe<=ie&&--ie,z.splice(--Pe,2,new gr(xn?an:Et,xn?Et:an))}}return new ir(z,ie)}function xr(x,z){return new ir([new gr(x,z||x)],0)}function mi(x){return x.text?Rt(x.from.line+x.text.length-1,pn(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function Di(x,z){if(Vt(x,z.from)<0)return x;if(Vt(x,z.to)<=0)return mi(z);var ie=x.line+z.text.length-(z.to.line-z.from.line)-1,re=x.ch;return x.line==z.to.line&&(re+=mi(z).ch-z.to.ch),Rt(ie,re)}function zi(x,z){for(var ie=[],re=0;re<x.sel.ranges.length;re++){var de=x.sel.ranges[re];ie.push(new gr(Di(de.anchor,z),Di(de.head,z)))}return oi(x.cm,ie,x.sel.primIndex)}function zo(x,z,ie){return x.line==z.line?Rt(ie.line,x.ch-z.ch+ie.ch):Rt(ie.line+(x.line-z.line),x.ch)}function Vi(x,z,ie){for(var re=[],de=Rt(x.first,0),Pe=de,tt=0;tt<z.length;tt++){var ft=z[tt],yt=zo(ft.from,de,Pe),Et=zo(mi(ft),de,Pe);if(de=ft.to,Pe=Et,ie=="around"){var an=x.sel.ranges[tt],xn=Vt(an.head,an.anchor)<0;re[tt]=new gr(xn?Et:yt,xn?yt:Et)}else re[tt]=new gr(yt,yt)}return new ir(re,x.sel.primIndex)}function Jo(x){x.doc.mode=Ee(x.options,x.doc.modeOption),co(x)}function co(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,en(x,100),x.state.modeGen++,x.curOp&&Ba(x)}function Lo(x,z){return z.from.ch==0&&z.to.ch==0&&pn(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function Ro(x,z,ie,re){function de(Ti){return ie?ie[Ti]:null}function Pe(Ti,vi,Pi){Hi(Ti,vi,Pi,re),Ci(Ti,"change",Ti,z)}function tt(Ti,vi){for(var Pi=[],Ji=Ti;Ji<vi;++Ji)Pi.push(new Kr(Et[Ji],de(Ji),re));return Pi}var ft=z.from,yt=z.to,Et=z.text,an=Dt(x,ft.line),xn=Dt(x,yt.line),Fn=pn(Et),Pn=de(Et.length-1),hr=yt.line-ft.line;if(z.full)x.insert(0,tt(0,Et.length)),x.remove(Et.length,x.size-Et.length);else if(Lo(x,z)){var Rr=tt(0,Et.length-1);Pe(xn,xn.text,Pn),hr&&x.remove(ft.line,hr),Rr.length&&x.insert(ft.line,Rr)}else if(an==xn)if(Et.length==1)Pe(an,an.text.slice(0,ft.ch)+Fn+an.text.slice(yt.ch),Pn);else{var ai=tt(1,Et.length-1);ai.push(new Kr(Fn+an.text.slice(yt.ch),Pn,re)),Pe(an,an.text.slice(0,ft.ch)+Et[0],de(0)),x.insert(ft.line+1,ai)}else if(Et.length==1)Pe(an,an.text.slice(0,ft.ch)+Et[0]+xn.text.slice(yt.ch),de(0)),x.remove(ft.line+1,hr);else{Pe(an,an.text.slice(0,ft.ch)+Et[0],de(0)),Pe(xn,Fn+xn.text.slice(yt.ch),Pn);var Si=tt(1,Et.length-1);hr>1&&x.remove(ft.line+1,hr-1),x.insert(ft.line+1,Si)}Ci(x,"change",x,z)}function xi(x,z,ie){function re(de,Pe,tt){if(de.linked)for(var ft=0;ft<de.linked.length;++ft){var yt=de.linked[ft];if(yt.doc!=Pe){var Et=tt&&yt.sharedHist;ie&&!Et||(z(yt.doc,Et),re(yt.doc,de,Et))}}}re(x,null,!0)}function li(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,ja(x),Jo(x),Ei(x),x.options.lineWrapping||kr(x),x.options.mode=z.modeOption,Ba(x)}function Ei(x){(x.doc.direction=="rtl"?Ot:Ie)(x.display.lineDiv,"CodeMirror-rtl")}function Oi(x){Ge(x,function(){Ei(x),Ba(x)})}function fi(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 So(x,z){var ie={from:wn(z.from),to:mi(z),text:Ft(x,z.from,z.to)};return Gi(x,ie,z.from.line,z.to.line+1),xi(x,function(re){return Gi(re,ie,z.from.line,z.to.line+1)},!0),ie}function Mi(x){for(;x.length;){var z=pn(x);if(z.ranges)x.pop();else break}}function Ai(x,z){if(z)return Mi(x.done),pn(x.done);if(x.done.length&&!pn(x.done).ranges)return pn(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),pn(x.done)}function lo(x,z,ie,re){var de=x.history;de.undone.length=0;var Pe=+new Date,tt,ft;if((de.lastOp==re||de.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&de.lastModTime>Pe-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(tt=Ai(de,de.lastOp==re)))ft=pn(tt.changes),Vt(z.from,z.to)==0&&Vt(z.from,ft.to)==0?ft.to=mi(z):tt.changes.push(So(x,z));else{var yt=pn(de.done);for((!yt||!yt.ranges)&&Ta(x.sel,de.done),tt={changes:[So(x,z)],generation:de.generation},de.done.push(tt);de.done.length>de.undoDepth;)de.done.shift(),de.done[0].ranges||de.done.shift()}de.done.push(ie),de.generation=++de.maxGeneration,de.lastModTime=de.lastSelTime=Pe,de.lastOp=de.lastSelOp=re,de.lastOrigin=de.lastSelOrigin=z.origin,ft||Lt(x,"historyAdded")}function yo(x,z,ie,re){var de=z.charAt(0);return de=="*"||de=="+"&&ie.ranges.length==re.ranges.length&&ie.somethingSelected()==re.somethingSelected()&&new Date-x.history.lastSelTime<=(x.cm?x.cm.options.historyEventDelay:500)}function Ua(x,z,ie,re){var de=x.history,Pe=re&&re.origin;ie==de.lastSelOp||Pe&&de.lastSelOrigin==Pe&&(de.lastModTime==de.lastSelTime&&de.lastOrigin==Pe||yo(x,Pe,pn(de.done),z))?de.done[de.done.length-1]=z:Ta(z,de.done),de.lastSelTime=+new Date,de.lastSelOrigin=Pe,de.lastSelOp=ie,re&&re.clearRedo!==!1&&Mi(de.undone)}function Ta(x,z){var ie=pn(z);ie&&ie.ranges&&ie.equals(x)||z.push(x)}function Gi(x,z,ie,re){var de=z["spans_"+x.id],Pe=0;x.iter(Math.max(x.first,ie),Math.min(x.first+x.size,re),function(tt){tt.markedSpans&&((de||(de=z["spans_"+x.id]={}))[Pe]=tt.markedSpans),++Pe})}function uo(x){if(!x)return null;for(var z,ie=0;ie<x.length;++ie)x[ie].marker.explicitlyCleared?z||(z=x.slice(0,ie)):z&&z.push(x[ie]);return z?z.length?z:null:x}function pa(x,z){var ie=z["spans_"+x.id];if(!ie)return null;for(var re=[],de=0;de<z.text.length;++de)re.push(uo(ie[de]));return re}function Po(x,z){var ie=pa(x,z),re=er(x,z);if(!ie)return re;if(!re)return ie;for(var de=0;de<ie.length;++de){var Pe=ie[de],tt=re[de];if(Pe&&tt)e:for(var ft=0;ft<tt.length;++ft){for(var yt=tt[ft],Et=0;Et<Pe.length;++Et)if(Pe[Et].marker==yt.marker)continue e;Pe.push(yt)}else tt&&(ie[de]=tt)}return ie}function bo(x,z,ie){for(var re=[],de=0;de<x.length;++de){var Pe=x[de];if(Pe.ranges){re.push(ie?ir.prototype.deepCopy.call(Pe):Pe);continue}var tt=Pe.changes,ft=[];re.push({changes:ft});for(var yt=0;yt<tt.length;++yt){var Et=tt[yt],an=void 0;if(ft.push({from:Et.from,to:Et.to,text:Et.text}),z)for(var xn in Et)(an=xn.match(/^spans_(\d+)$/))&&wt(z,Number(an[1]))>-1&&(pn(ft)[xn]=Et[xn],delete Et[xn])}}return re}function os(x,z,ie,re){if(re){var de=x.anchor;if(ie){var Pe=Vt(z,de)<0;Pe!=Vt(ie,de)<0?(de=z,z=ie):Pe!=Vt(z,ie)<0&&(z=ie)}return new gr(de,z)}else return new gr(ie||z,z)}function fo(x,z,ie,re,de){de==null&&(de=x.cm&&(x.cm.display.shift||x.extend)),$o(x,new ir([os(x.sel.primary(),z,ie,de)],0),re)}function Tr(x,z,ie){for(var re=[],de=x.cm&&(x.cm.display.shift||x.extend),Pe=0;Pe<x.sel.ranges.length;Pe++)re[Pe]=os(x.sel.ranges[Pe],z[Pe],null,de);var tt=oi(x.cm,re,x.sel.primIndex);$o(x,tt,ie)}function Eo(x,z,ie,re){var de=x.sel.ranges.slice(0);de[z]=ie,$o(x,oi(x.cm,de,x.sel.primIndex),re)}function aa(x,z,ie,re){$o(x,xr(z,ie),re)}function Oa(x,z,ie){var re={ranges:z.ranges,update:function(de){this.ranges=[];for(var Pe=0;Pe<de.length;Pe++)this.ranges[Pe]=new gr(Sn(x,de[Pe].anchor),Sn(x,de[Pe].head))},origin:ie&&ie.origin};return Lt(x,"beforeSelectionChange",x,re),x.cm&&Lt(x.cm,"beforeSelectionChange",x.cm,re),re.ranges!=z.ranges?oi(x.cm,re.ranges,re.ranges.length-1):z}function Zi(x,z,ie){var re=x.history.done,de=pn(re);de&&de.ranges?(re[re.length-1]=z,es(x,z,ie)):$o(x,z,ie)}function $o(x,z,ie){es(x,z,ie),Ua(x,x.sel,x.cm?x.cm.curOp.id:NaN,ie)}function es(x,z,ie){(Jt(x,"beforeSelectionChange")||x.cm&&Jt(x.cm,"beforeSelectionChange"))&&(z=Oa(x,z,ie));var re=ie&&ie.bias||(Vt(z.primary().head,x.sel.primary().head)<0?-1:1);Us(x,As(x,z,re,!0)),!(ie&&ie.scroll===!1)&&x.cm&&ac(x.cm)}function Us(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,Tn(x.cm)),Ci(x,"cursorActivity",x))}function Ll(x){Us(x,As(x,x.sel,null,!1))}function As(x,z,ie,re){for(var de,Pe=0;Pe<z.ranges.length;Pe++){var tt=z.ranges[Pe],ft=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[Pe],yt=vl(x,tt.anchor,ft&&ft.anchor,ie,re),Et=vl(x,tt.head,ft&&ft.head,ie,re);(de||yt!=tt.anchor||Et!=tt.head)&&(de||(de=z.ranges.slice(0,Pe)),de[Pe]=new gr(yt,Et))}return de?oi(x.cm,de,z.primIndex):z}function as(x,z,ie,re,de){var Pe=Dt(x,z.line);if(Pe.markedSpans)for(var tt=0;tt<Pe.markedSpans.length;++tt){var ft=Pe.markedSpans[tt],yt=ft.marker,Et="selectLeft"in yt?!yt.selectLeft:yt.inclusiveLeft,an="selectRight"in yt?!yt.selectRight:yt.inclusiveRight;if((ft.from==null||(Et?ft.from<=z.ch:ft.from<z.ch))&&(ft.to==null||(an?ft.to>=z.ch:ft.to>z.ch))){if(de&&(Lt(yt,"beforeCursorEnter"),yt.explicitlyCleared))if(Pe.markedSpans){--tt;continue}else break;if(!yt.atomic)continue;if(ie){var xn=yt.find(re<0?1:-1),Fn=void 0;if((re<0?an:Et)&&(xn=ss(x,xn,-re,xn&&xn.line==z.line?Pe:null)),xn&&xn.line==z.line&&(Fn=Vt(xn,ie))&&(re<0?Fn<0:Fn>0))return as(x,xn,z,re,de)}var Pn=yt.find(re<0?-1:1);return(re<0?Et:an)&&(Pn=ss(x,Pn,re,Pn.line==z.line?Pe:null)),Pn?as(x,Pn,z,re,de):null}}return z}function vl(x,z,ie,re,de){var Pe=re||1,tt=as(x,z,ie,Pe,de)||!de&&as(x,z,ie,Pe,!0)||as(x,z,ie,-Pe,de)||!de&&as(x,z,ie,-Pe,!0);return tt||(x.cantEdit=!0,Rt(x.first,0))}function ss(x,z,ie,re){return ie<0&&z.ch==0?z.line>x.first?Sn(x,Rt(z.line-1)):null:ie>0&&z.ch==(re||Dt(x,z.line)).text.length?z.line<x.first+x.size-1?Rt(z.line+1,0):null:new Rt(z.line,z.ch+ie)}function Is(x){x.setSelection(Rt(x.firstLine(),0),Rt(x.lastLine()),_t)}function ms(x,z,ie){var re={canceled:!1,from:z.from,to:z.to,text:z.text,origin:z.origin,cancel:function(){return re.canceled=!0}};return ie&&(re.update=function(de,Pe,tt,ft){de&&(re.from=Sn(x,de)),Pe&&(re.to=Sn(x,Pe)),tt&&(re.text=tt),ft!==void 0&&(re.origin=ft)}),Lt(x,"beforeChange",x,re),x.cm&&Lt(x.cm,"beforeChange",x.cm,re),re.canceled?(x.cm&&(x.cm.curOp.updateInput=2),null):{from:re.from,to:re.to,text:re.text,origin:re.origin}}function ga(x,z,ie){if(x.cm){if(!x.cm.curOp)return st(x.cm,ga)(x,z,ie);if(x.cm.state.suppressEdits)return}if(!((Jt(x,"beforeChange")||x.cm&&Jt(x.cm,"beforeChange"))&&(z=ms(x,z,!0),!z))){var re=ei&&!ie&&Dr(x,z.from,z.to);if(re)for(var de=re.length-1;de>=0;--de)ya(x,{from:re[de].from,to:re[de].to,text:de?[""]:z.text,origin:z.origin});else ya(x,z)}}function ya(x,z){if(!(z.text.length==1&&z.text[0]==""&&Vt(z.from,z.to)==0)){var ie=zi(x,z);lo(x,z,ie,x.cm?x.cm.curOp.id:NaN),tl(x,z,ie,er(x,z));var re=[];xi(x,function(de,Pe){!Pe&&wt(re,de.history)==-1&&(qo(de.history,z),re.push(de.history)),tl(de,z,null,er(de,z))})}}function _s(x,z,ie){var re=x.cm&&x.cm.state.suppressEdits;if(!(re&&!ie)){for(var de=x.history,Pe,tt=x.sel,ft=z=="undo"?de.done:de.undone,yt=z=="undo"?de.undone:de.done,Et=0;Et<ft.length&&(Pe=ft[Et],!(ie?Pe.ranges&&!Pe.equals(x.sel):!Pe.ranges));Et++);if(Et!=ft.length){for(de.lastOrigin=de.lastSelOrigin=null;;)if(Pe=ft.pop(),Pe.ranges){if(Ta(Pe,yt),ie&&!Pe.equals(x.sel)){$o(x,Pe,{clearRedo:!1});return}tt=Pe}else if(re){ft.push(Pe);return}else break;var an=[];Ta(tt,yt),yt.push({changes:an,generation:de.generation}),de.generation=Pe.generation||++de.maxGeneration;for(var xn=Jt(x,"beforeChange")||x.cm&&Jt(x.cm,"beforeChange"),Fn=function(Rr){var ai=Pe.changes[Rr];if(ai.origin=z,xn&&!ms(x,ai,!1))return ft.length=0,{};an.push(So(x,ai));var Si=Rr?zi(x,ai):pn(ft);tl(x,ai,Si,Po(x,ai)),!Rr&&x.cm&&x.cm.scrollIntoView({from:ai.from,to:mi(ai)});var Ti=[];xi(x,function(vi,Pi){!Pi&&wt(Ti,vi.history)==-1&&(qo(vi.history,ai),Ti.push(vi.history)),tl(vi,ai,null,Po(vi,ai))})},Pn=Pe.changes.length-1;Pn>=0;--Pn){var hr=Fn(Pn);if(hr)return hr.v}}}}function Fl(x,z){if(z!=0&&(x.first+=z,x.sel=new ir(hn(x.sel.ranges,function(de){return new gr(Rt(de.anchor.line+z,de.anchor.ch),Rt(de.head.line+z,de.head.ch))}),x.sel.primIndex),x.cm)){Ba(x.cm,x.first,x.first-z,z);for(var ie=x.cm.display,re=ie.viewFrom;re<ie.viewTo;re++)Aa(x.cm,re,"gutter")}}function tl(x,z,ie,re){if(x.cm&&!x.cm.curOp)return st(x.cm,tl)(x,z,ie,re);if(z.to.line<x.first){Fl(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 de=z.text.length-1-(x.first-z.from.line);Fl(x,de),z={from:Rt(x.first,0),to:Rt(z.to.line+de,z.to.ch),text:[pn(z.text)],origin:z.origin}}var Pe=x.lastLine();z.to.line>Pe&&(z={from:z.from,to:Rt(Pe,Dt(x,Pe).text.length),text:[z.text[0]],origin:z.origin}),z.removed=Ft(x,z.from,z.to),ie||(ie=zi(x,z)),x.cm?Dl(x.cm,z,re):Ro(x,z,re),es(x,ie,_t),x.cantEdit&&vl(x,Rt(x.firstLine(),0))&&(x.cantEdit=!1)}}function Dl(x,z,ie){var re=x.doc,de=x.display,Pe=z.from,tt=z.to,ft=!1,yt=Pe.line;x.options.lineWrapping||(yt=Ht(hi(Dt(re,Pe.line))),re.iter(yt,tt.line+1,function(Pn){if(Pn==de.maxLine)return ft=!0,!0})),re.sel.contains(z.from,z.to)>-1&&Tn(x),Ro(re,z,ie,fs(x)),x.options.lineWrapping||(re.iter(yt,Pe.line+z.text.length,function(Pn){var hr=Ar(Pn);hr>de.maxLineLength&&(de.maxLine=Pn,de.maxLineLength=hr,de.maxLineChanged=!0,ft=!1)}),ft&&(x.curOp.updateMaxLine=!0)),wr(re,Pe.line),en(x,400);var Et=z.text.length-(tt.line-Pe.line)-1;z.full?Ba(x):Pe.line==tt.line&&z.text.length==1&&!Lo(x.doc,z)?Aa(x,Pe.line,"text"):Ba(x,Pe.line,tt.line+1,Et);var an=Jt(x,"changes"),xn=Jt(x,"change");if(xn||an){var Fn={from:Pe,to:tt,text:z.text,removed:z.removed,origin:z.origin};xn&&Ci(x,"change",x,Fn),an&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(Fn)}x.display.selForContextMenu=null}function Xl(x,z,ie,re,de){var Pe;re||(re=ie),Vt(re,ie)<0&&(Pe=[re,ie],ie=Pe[0],re=Pe[1]),typeof z=="string"&&(z=x.splitLines(z)),ga(x,{from:ie,to:re,text:z,origin:de})}function mu(x,z,ie,re){ie<x.line?x.line+=re:z<x.line&&(x.line=z,x.ch=0)}function Do(x,z,ie,re){for(var de=0;de<x.length;++de){var Pe=x[de],tt=!0;if(Pe.ranges){Pe.copied||(Pe=x[de]=Pe.deepCopy(),Pe.copied=!0);for(var ft=0;ft<Pe.ranges.length;ft++)mu(Pe.ranges[ft].anchor,z,ie,re),mu(Pe.ranges[ft].head,z,ie,re);continue}for(var yt=0;yt<Pe.changes.length;++yt){var Et=Pe.changes[yt];if(ie<Et.from.line)Et.from=Rt(Et.from.line+re,Et.from.ch),Et.to=Rt(Et.to.line+re,Et.to.ch);else if(z<=Et.to.line){tt=!1;break}}tt||(x.splice(0,de+1),de=0)}}function qo(x,z){var ie=z.from.line,re=z.to.line,de=z.text.length-(re-ie)-1;Do(x.done,ie,re,de),Do(x.undone,ie,re,de)}function Va(x,z,ie,re){var de=z,Pe=z;return typeof z=="number"?Pe=Dt(x,Jn(x,z)):de=Ht(z),de==null?null:(re(Pe,de)&&x.cm&&Aa(x.cm,de,ie),Pe)}function Qo(x){this.lines=x,this.parent=null;for(var z=0,ie=0;ie<x.length;++ie)x[ie].parent=this,z+=x[ie].height;this.height=z}Qo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(x,z){for(var ie=x,re=x+z;ie<re;++ie){var de=this.lines[ie];this.height-=de.height,eo(de),Ci(de,"delete")}this.lines.splice(x,z)},collapse:function(x){x.push.apply(x,this.lines)},insertInner:function(x,z,ie){this.height+=ie,this.lines=this.lines.slice(0,x).concat(z).concat(this.lines.slice(x));for(var re=0;re<z.length;++re)z[re].parent=this},iterN:function(x,z,ie){for(var re=x+z;x<re;++x)if(ie(this.lines[x]))return!0}};function Ga(x){this.children=x;for(var z=0,ie=0,re=0;re<x.length;++re){var de=x[re];z+=de.chunkSize(),ie+=de.height,de.parent=this}this.size=z,this.height=ie,this.parent=null}Ga.prototype={chunkSize:function(){return this.size},removeInner:function(x,z){this.size-=z;for(var ie=0;ie<this.children.length;++ie){var re=this.children[ie],de=re.chunkSize();if(x<de){var Pe=Math.min(z,de-x),tt=re.height;if(re.removeInner(x,Pe),this.height-=tt-re.height,de==Pe&&(this.children.splice(ie--,1),re.parent=null),(z-=Pe)==0)break;x=0}else x-=de}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof Qo))){var ft=[];this.collapse(ft),this.children=[new Qo(ft)],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,ie){this.size+=z.length,this.height+=ie;for(var re=0;re<this.children.length;++re){var de=this.children[re],Pe=de.chunkSize();if(x<=Pe){if(de.insertInner(x,z,ie),de.lines&&de.lines.length>50){for(var tt=de.lines.length%25+25,ft=tt;ft<de.lines.length;){var yt=new Qo(de.lines.slice(ft,ft+=25));de.height-=yt.height,this.children.splice(++re,0,yt),yt.parent=this}de.lines=de.lines.slice(0,tt),this.maybeSpill()}break}x-=Pe}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ie=new Ga(z);if(x.parent){x.size-=ie.size,x.height-=ie.height;var de=wt(x.parent.children,x);x.parent.children.splice(de+1,0,ie)}else{var re=new Ga(x.children);re.parent=x,x.children=[re,ie],x=re}ie.parent=x.parent}while(x.children.length>10);x.parent.maybeSpill()}},iterN:function(x,z,ie){for(var re=0;re<this.children.length;++re){var de=this.children[re],Pe=de.chunkSize();if(x<Pe){var tt=Math.min(z,Pe-x);if(de.iterN(x,tt,ie))return!0;if((z-=tt)==0)break;x=0}else x-=Pe}}};var ls=function(x,z,ie){if(ie)for(var re in ie)ie.hasOwnProperty(re)&&(this[re]=ie[re]);this.doc=x,this.node=z};ls.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ie=this.line,re=Ht(ie);if(!(re==null||!z)){for(var de=0;de<z.length;++de)z[de]==this&&z.splice(de--,1);z.length||(ie.widgets=null);var Pe=Cs(this);Ct(ie,Math.max(0,ie.height-Pe)),x&&(Ge(x,function(){Bs(x,ie,-Pe),Aa(x,re,"widget")}),Ci(x,"lineWidgetCleared",x,this,re))}},ls.prototype.changed=function(){var x=this,z=this.height,ie=this.doc.cm,re=this.line;this.height=null;var de=Cs(this)-z;de&&(_o(this.doc,re)||Ct(re,re.height+de),ie&&Ge(ie,function(){ie.curOp.forceUpdate=!0,Bs(ie,re,de),Ci(ie,"lineWidgetChanged",ie,x,Ht(re))}))},On(ls);function Bs(x,z,ie){Er(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&Oc(x,ie)}function zl(x,z,ie,re){var de=new ls(x,ie,re),Pe=x.cm;return Pe&&de.noHScroll&&(Pe.display.alignWidgets=!0),Va(x,z,"widget",function(tt){var ft=tt.widgets||(tt.widgets=[]);if(de.insertAt==null?ft.push(de):ft.splice(Math.min(ft.length-1,Math.max(0,de.insertAt)),0,de),de.line=tt,Pe&&!_o(x,tt)){var yt=Er(tt)<x.scrollTop;Ct(tt,tt.height+Cs(de)),yt&&Oc(Pe,de.height),Pe.curOp.forceUpdate=!0}return!0}),Pe&&Ci(Pe,"lineWidgetAdded",Pe,de,typeof z=="number"?z:Ht(z)),de}var Ou=0,sc=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++Ou};sc.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&bs(x),Jt(this,"clear")){var ie=this.find();ie&&Ci(this,"clear",ie.from,ie.to)}for(var re=null,de=null,Pe=0;Pe<this.lines.length;++Pe){var tt=this.lines[Pe],ft=Wr(tt.markedSpans,this);x&&!this.collapsed?Aa(x,Ht(tt),"text"):x&&(ft.to!=null&&(de=Ht(tt)),ft.from!=null&&(re=Ht(tt))),tt.markedSpans=Pr(tt.markedSpans,ft),ft.from==null&&this.collapsed&&!_o(this.doc,tt)&&x&&Ct(tt,fl(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var yt=0;yt<this.lines.length;++yt){var Et=hi(this.lines[yt]),an=Ar(Et);an>x.display.maxLineLength&&(x.display.maxLine=Et,x.display.maxLineLength=an,x.display.maxLineChanged=!0)}re!=null&&x&&this.collapsed&&Ba(x,re,de+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&Ll(x.doc)),x&&Ci(x,"markerCleared",x,this,re,de),z&&kl(x),this.parent&&this.parent.clear()}},sc.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ie,re,de=0;de<this.lines.length;++de){var Pe=this.lines[de],tt=Wr(Pe.markedSpans,this);if(tt.from!=null&&(ie=Rt(z?Pe:Ht(Pe),tt.from),x==-1))return ie;if(tt.to!=null&&(re=Rt(z?Pe:Ht(Pe),tt.to),x==1))return re}return ie&&{from:ie,to:re}},sc.prototype.changed=function(){var x=this,z=this.find(-1,!0),ie=this,re=this.doc.cm;!z||!re||Ge(re,function(){var de=z.line,Pe=Ht(z.line),tt=_a(re,Pe);if(tt&&(ia(tt),re.curOp.selectionChanged=re.curOp.forceUpdate=!0),re.curOp.updateMaxLine=!0,!_o(ie.doc,de)&&ie.height!=null){var ft=ie.height;ie.height=null;var yt=Cs(ie)-ft;yt&&Ct(de,de.height+yt)}Ci(re,"markerChanged",re,x)})},sc.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||wt(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},sc.prototype.detachLine=function(x){if(this.lines.splice(wt(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},On(sc);function $l(x,z,ie,re,de){if(re&&re.shared)return xa(x,z,ie,re,de);if(x.cm&&!x.cm.curOp)return st(x.cm,$l)(x,z,ie,re,de);var Pe=new sc(x,de),tt=Vt(z,ie);if(re&&St(re,Pe,!1),tt>0||tt==0&&Pe.clearWhenEmpty!==!1)return Pe;if(Pe.replacedWith&&(Pe.collapsed=!0,Pe.widgetNode=gt("span",[Pe.replacedWith],"CodeMirror-widget"),re.handleMouseEvents||Pe.widgetNode.setAttribute("cm-ignore-events","true"),re.insertLeft&&(Pe.widgetNode.insertLeft=!0)),Pe.collapsed){if(bi(x,z.line,z,ie,Pe)||z.line!=ie.line&&bi(x,ie.line,z,ie,Pe))throw new Error("Inserting collapsed marker partially overlapping an existing one");Lr()}Pe.addToHistory&&lo(x,{from:z,to:ie,origin:"markText"},x.sel,NaN);var ft=z.line,yt=x.cm,Et;if(x.iter(ft,ie.line+1,function(xn){yt&&Pe.collapsed&&!yt.options.lineWrapping&&hi(xn)==yt.display.maxLine&&(Et=!0),Pe.collapsed&&ft!=z.line&&Ct(xn,0),di(xn,new Or(Pe,ft==z.line?z.ch:null,ft==ie.line?ie.ch:null)),++ft}),Pe.collapsed&&x.iter(z.line,ie.line+1,function(xn){_o(x,xn)&&Ct(xn,0)}),Pe.clearOnEnter&&Qt(Pe,"beforeCursorEnter",function(){return Pe.clear()}),Pe.readOnly&&(Zr(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),Pe.collapsed&&(Pe.id=++Ou,Pe.atomic=!0),yt){if(Et&&(yt.curOp.updateMaxLine=!0),Pe.collapsed)Ba(yt,z.line,ie.line+1);else if(Pe.className||Pe.startStyle||Pe.endStyle||Pe.css||Pe.attributes||Pe.title)for(var an=z.line;an<=ie.line;an++)Aa(yt,an,"text");Pe.atomic&&Ll(yt.doc),Ci(yt,"markerAdded",yt,Pe)}return Pe}var ko=function(x,z){this.markers=x,this.primary=z;for(var ie=0;ie<x.length;++ie)x[ie].parent=this};ko.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();Ci(this,"clear")}},ko.prototype.find=function(x,z){return this.primary.find(x,z)},On(ko);function xa(x,z,ie,re,de){re=St(re),re.shared=!1;var Pe=[$l(x,z,ie,re,de)],tt=Pe[0],ft=re.widgetNode;return xi(x,function(yt){ft&&(re.widgetNode=ft.cloneNode(!0)),Pe.push($l(yt,Sn(yt,z),Sn(yt,ie),re,de));for(var Et=0;Et<yt.linked.length;++Et)if(yt.linked[Et].isParent)return;tt=pn(Pe)}),new ko(Pe,tt)}function Al(x){return x.findMarks(Rt(x.first,0),x.clipPos(Rt(x.lastLine())),function(z){return z.parent})}function _c(x,z){for(var ie=0;ie<z.length;ie++){var re=z[ie],de=re.find(),Pe=x.clipPos(de.from),tt=x.clipPos(de.to);if(Vt(Pe,tt)){var ft=$l(x,Pe,tt,re.primary,re.primary.type);re.markers.push(ft),ft.parent=re}}}function nl(x){for(var z=function(re){var de=x[re],Pe=[de.primary.doc];xi(de.primary.doc,function(yt){return Pe.push(yt)});for(var tt=0;tt<de.markers.length;tt++){var ft=de.markers[tt];wt(Pe,ft.doc)==-1&&(ft.parent=null,de.markers.splice(tt--,1))}},ie=0;ie<x.length;ie++)z(ie)}var td=0,Ha=function(x,z,ie,re,de){if(!(this instanceof Ha))return new Ha(x,z,ie,re,de);ie==null&&(ie=0),Ga.call(this,[new Qo([new Kr("",null)])]),this.first=ie,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ie;var Pe=Rt(ie,0);this.sel=xr(Pe),this.history=new fi(null),this.id=++td,this.modeOption=z,this.lineSep=re,this.direction=de=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),Ro(this,{from:Pe,to:Pe,text:x}),$o(this,xr(Pe),_t)};Ha.prototype=ke(Ga.prototype,{constructor:Ha,iter:function(x,z,ie){ie?this.iterN(x-this.first,z-x,ie):this.iterN(this.first,this.first+this.size,x)},insert:function(x,z){for(var ie=0,re=0;re<z.length;++re)ie+=z[re].height;this.insertInner(x-this.first,z,ie)},remove:function(x,z){this.removeInner(x-this.first,z)},getValue:function(x){var z=Bt(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:Yt(function(x){var z=Rt(this.first,0),ie=this.first+this.size-1;ga(this,{from:z,to:Rt(ie,Dt(this,ie).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&Gl(this.cm,0,0),$o(this,xr(z),_t)}),replaceRange:function(x,z,ie,re){z=Sn(this,z),ie=ie?Sn(this,ie):z,Xl(this,x,z,ie,re)},getRange:function(x,z,ie){var re=Ft(this,Sn(this,x),Sn(this,z));return ie===!1?re:re.join(ie||this.lineSeparator())},getLine:function(x){var z=this.getLineHandle(x);return z&&z.text},getLineHandle:function(x){if(on(this,x))return Dt(this,x)},getLineNumber:function(x){return Ht(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=Dt(this,x)),hi(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return Sn(this,x)},getCursor:function(x){var z=this.sel.primary(),ie;return x==null||x=="head"?ie=z.head:x=="anchor"?ie=z.anchor:x=="end"||x=="to"||x===!1?ie=z.to():ie=z.from(),ie},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yt(function(x,z,ie){aa(this,Sn(this,typeof x=="number"?Rt(x,z||0):x),null,ie)}),setSelection:Yt(function(x,z,ie){aa(this,Sn(this,x),Sn(this,z||x),ie)}),extendSelection:Yt(function(x,z,ie){fo(this,Sn(this,x),z&&Sn(this,z),ie)}),extendSelections:Yt(function(x,z){Tr(this,zt(this,x),z)}),extendSelectionsBy:Yt(function(x,z){var ie=hn(this.sel.ranges,x);Tr(this,zt(this,ie),z)}),setSelections:Yt(function(x,z,ie){if(x.length){for(var re=[],de=0;de<x.length;de++)re[de]=new gr(Sn(this,x[de].anchor),Sn(this,x[de].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),$o(this,oi(this.cm,re,z),ie)}}),addSelection:Yt(function(x,z,ie){var re=this.sel.ranges.slice(0);re.push(new gr(Sn(this,x),Sn(this,z||x))),$o(this,oi(this.cm,re,re.length-1),ie)}),getSelection:function(x){for(var z=this.sel.ranges,ie,re=0;re<z.length;re++){var de=Ft(this,z[re].from(),z[re].to());ie=ie?ie.concat(de):de}return x===!1?ie:ie.join(x||this.lineSeparator())},getSelections:function(x){for(var z=[],ie=this.sel.ranges,re=0;re<ie.length;re++){var de=Ft(this,ie[re].from(),ie[re].to());x!==!1&&(de=de.join(x||this.lineSeparator())),z[re]=de}return z},replaceSelection:function(x,z,ie){for(var re=[],de=0;de<this.sel.ranges.length;de++)re[de]=x;this.replaceSelections(re,z,ie||"+input")},replaceSelections:Yt(function(x,z,ie){for(var re=[],de=this.sel,Pe=0;Pe<de.ranges.length;Pe++){var tt=de.ranges[Pe];re[Pe]={from:tt.from(),to:tt.to(),text:this.splitLines(x[Pe]),origin:ie}}for(var ft=z&&z!="end"&&Vi(this,re,z),yt=re.length-1;yt>=0;yt--)ga(this,re[yt]);ft?Zi(this,ft):this.cm&&ac(this.cm)}),undo:Yt(function(){_s(this,"undo")}),redo:Yt(function(){_s(this,"redo")}),undoSelection:Yt(function(){_s(this,"undo",!0)}),redoSelection:Yt(function(){_s(this,"redo",!0)}),setExtending:function(x){this.extend=x},getExtending:function(){return this.extend},historySize:function(){for(var x=this.history,z=0,ie=0,re=0;re<x.done.length;re++)x.done[re].ranges||++z;for(var de=0;de<x.undone.length;de++)x.undone[de].ranges||++ie;return{undo:z,redo:ie}},clearHistory:function(){var x=this;this.history=new fi(this.history.maxGeneration),xi(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:bo(this.history.done),undone:bo(this.history.undone)}},setHistory:function(x){var z=this.history=new fi(this.history.maxGeneration);z.done=bo(x.done.slice(0),null,!0),z.undone=bo(x.undone.slice(0),null,!0)},setGutterMarker:Yt(function(x,z,ie){return Va(this,x,"gutter",function(re){var de=re.gutterMarkers||(re.gutterMarkers={});return de[z]=ie,!ie&&me(de)&&(re.gutterMarkers=null),!0})}),clearGutter:Yt(function(x){var z=this;this.iter(function(ie){ie.gutterMarkers&&ie.gutterMarkers[x]&&Va(z,ie,"gutter",function(){return ie.gutterMarkers[x]=null,me(ie.gutterMarkers)&&(ie.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!on(this,x)||(z=x,x=Dt(this,x),!x))return null}else if(z=Ht(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:Yt(function(x,z,ie){return Va(this,x,z=="gutter"?"gutter":"class",function(re){var de=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass";if(!re[de])re[de]=ie;else{if(Se(ie).test(re[de]))return!1;re[de]+=" "+ie}return!0})}),removeLineClass:Yt(function(x,z,ie){return Va(this,x,z=="gutter"?"gutter":"class",function(re){var de=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",Pe=re[de];if(Pe)if(ie==null)re[de]=null;else{var tt=Pe.match(Se(ie));if(!tt)return!1;var ft=tt.index+tt[0].length;re[de]=Pe.slice(0,tt.index)+(!tt.index||ft==Pe.length?"":" ")+Pe.slice(ft)||null}else return!1;return!0})}),addLineWidget:Yt(function(x,z,ie){return zl(this,x,z,ie)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ie){return $l(this,Sn(this,x),Sn(this,z),ie,ie&&ie.type||"range")},setBookmark:function(x,z){var ie={replacedWith:z&&(z.nodeType==null?z.widget:z),insertLeft:z&&z.insertLeft,clearWhenEmpty:!1,shared:z&&z.shared,handleMouseEvents:z&&z.handleMouseEvents};return x=Sn(this,x),$l(this,x,x,ie,"bookmark")},findMarksAt:function(x){x=Sn(this,x);var z=[],ie=Dt(this,x.line).markedSpans;if(ie)for(var re=0;re<ie.length;++re){var de=ie[re];(de.from==null||de.from<=x.ch)&&(de.to==null||de.to>=x.ch)&&z.push(de.marker.parent||de.marker)}return z},findMarks:function(x,z,ie){x=Sn(this,x),z=Sn(this,z);var re=[],de=x.line;return this.iter(x.line,z.line+1,function(Pe){var tt=Pe.markedSpans;if(tt)for(var ft=0;ft<tt.length;ft++){var yt=tt[ft];!(yt.to!=null&&de==x.line&&x.ch>=yt.to||yt.from==null&&de!=x.line||yt.from!=null&&de==z.line&&yt.from>=z.ch)&&(!ie||ie(yt.marker))&&re.push(yt.marker.parent||yt.marker)}++de}),re},getAllMarks:function(){var x=[];return this.iter(function(z){var ie=z.markedSpans;if(ie)for(var re=0;re<ie.length;++re)ie[re].from!=null&&x.push(ie[re].marker)}),x},posFromIndex:function(x){var z,ie=this.first,re=this.lineSeparator().length;return this.iter(function(de){var Pe=de.text.length+re;if(Pe>x)return z=x,!0;x-=Pe,++ie}),Sn(this,Rt(ie,z))},indexFromPos:function(x){x=Sn(this,x);var z=x.ch;if(x.line<this.first||x.ch<0)return 0;var ie=this.lineSeparator().length;return this.iter(this.first,x.line,function(re){z+=re.text.length+ie}),z},copy:function(x){var z=new Ha(Bt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return z.scrollTop=this.scrollTop,z.scrollLeft=this.scrollLeft,z.sel=this.sel,z.extend=!1,x&&(z.history.undoDepth=this.history.undoDepth,z.setHistory(this.getHistory())),z},linkedDoc:function(x){x||(x={});var z=this.first,ie=this.first+this.size;x.from!=null&&x.from>z&&(z=x.from),x.to!=null&&x.to<ie&&(ie=x.to);var re=new Ha(Bt(this,z,ie),x.mode||this.modeOption,z,this.lineSep,this.direction);return x.sharedHist&&(re.history=this.history),(this.linked||(this.linked=[])).push({doc:re,sharedHist:x.sharedHist}),re.linked=[{doc:this,isParent:!0,sharedHist:x.sharedHist}],_c(re,Al(this)),re},unlinkDoc:function(x){if(x instanceof ho&&(x=x.doc),this.linked)for(var z=0;z<this.linked.length;++z){var ie=this.linked[z];if(ie.doc==x){this.linked.splice(z,1),x.unlinkDoc(this),nl(Al(this));break}}if(x.history==this.history){var re=[x.id];xi(x,function(de){return re.push(de.id)},!0),x.history=new fi(null),x.history.done=bo(this.history.done,re),x.history.undone=bo(this.history.undone,re)}},iterLinkedDocs:function(x){xi(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):si(x)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Yt(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&Oi(this.cm))})}),Ha.prototype.eachLine=Ha.prototype.iter;var Ru=0;function nd(x){var z=this;if(Rc(z),!(qt(z,x)||ws(z.display,x))){zn(x),fe&&(Ru=+new Date);var ie=Ws(z,x,!0),re=x.dataTransfer.files;if(!(!ie||z.isReadOnly()))if(re&&re.length&&window.FileReader&&window.File)for(var de=re.length,Pe=Array(de),tt=0,ft=function(){++tt==de&&st(z,function(){ie=Sn(z.doc,ie);var Pn={from:ie,to:ie,text:z.doc.splitLines(Pe.filter(function(hr){return hr!=null}).join(z.doc.lineSeparator())),origin:"paste"};ga(z.doc,Pn),Zi(z.doc,xr(Sn(z.doc,ie),Sn(z.doc,mi(Pn))))})()},yt=function(Pn,hr){if(z.options.allowDropFileTypes&&wt(z.options.allowDropFileTypes,Pn.type)==-1){ft();return}var Rr=new FileReader;Rr.onerror=function(){return ft()},Rr.onload=function(){var ai=Rr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ai)){ft();return}Pe[hr]=ai,ft()},Rr.readAsText(Pn)},Et=0;Et<re.length;Et++)yt(re[Et],Et);else{if(z.state.draggingText&&z.doc.sel.contains(ie)>-1){z.state.draggingText(x),setTimeout(function(){return z.display.input.focus()},20);return}try{var an=x.dataTransfer.getData("Text");if(an){var xn;if(z.state.draggingText&&!z.state.draggingText.copy&&(xn=z.listSelections()),es(z.doc,xr(ie,ie)),xn)for(var Fn=0;Fn<xn.length;++Fn)Xl(z.doc,"",xn[Fn].anchor,xn[Fn].head,"drag");z.replaceSelection(an,"around","paste"),z.display.input.focus()}}catch(Pn){}}}}function vu(x,z){if(fe&&(!x.state.draggingText||+new Date-Ru<100)){vr(z);return}if(!(qt(x,z)||ws(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!ue)){var ie=Ue("img",null,null,"position: fixed; left: 0; top: 0;");ie.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ve&&(ie.width=ie.height=1,x.display.wrapper.appendChild(ie),ie._top=ie.offsetTop),z.dataTransfer.setDragImage(ie,0,0),ve&&ie.parentNode.removeChild(ie)}}function gu(x,z){var ie=Ws(x,z);if(ie){var re=document.createDocumentFragment();Qc(x,ie,re),x.display.dragCursor||(x.display.dragCursor=Ue("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),it(x.display.dragCursor,re)}}function Rc(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function xc(x){if(document.getElementsByClassName){for(var z=document.getElementsByClassName("CodeMirror"),ie=[],re=0;re<z.length;re++){var de=z[re].CodeMirror;de&&ie.push(de)}ie.length&&ie[0].operation(function(){for(var Pe=0;Pe<ie.length;Pe++)x(ie[Pe])})}}var Ur=!1;function Pu(){Ur||(yu(),Ur=!0)}function yu(){var x;Qt(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,xc(bu)},100))}),Qt(window,"blur",function(){return xc(El)})}function bu(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var gl={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"},lc=0;lc<10;lc++)gl[lc+48]=gl[lc+96]=String(lc);for(var Pc=65;Pc<=90;Pc++)gl[Pc]=String.fromCharCode(Pc);for(var Sc=1;Sc<=12;Sc++)gl[Sc+111]=gl[Sc+63235]="F"+Sc;var ma={};ma.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"},ma.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"},ma.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"},ma.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"]},ma.default=Be?ma.macDefault:ma.pcDefault;function rd(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ie,re,de,Pe,tt=0;tt<z.length-1;tt++){var ft=z[tt];if(/^(cmd|meta|m)$/i.test(ft))Pe=!0;else if(/^a(lt)?$/i.test(ft))ie=!0;else if(/^(c|ctrl|control)$/i.test(ft))re=!0;else if(/^s(hift)?$/i.test(ft))de=!0;else throw new Error("Unrecognized modifier name: "+ft)}return ie&&(x="Alt-"+x),re&&(x="Ctrl-"+x),Pe&&(x="Cmd-"+x),de&&(x="Shift-"+x),x}function _u(x){var z={};for(var ie in x)if(x.hasOwnProperty(ie)){var re=x[ie];if(/^(name|fallthrough|(de|at)tach)$/.test(ie))continue;if(re=="..."){delete x[ie];continue}for(var de=hn(ie.split(" "),rd),Pe=0;Pe<de.length;Pe++){var tt=void 0,ft=void 0;Pe==de.length-1?(ft=de.join(" "),tt=re):(ft=de.slice(0,Pe+1).join(" "),tt="...");var yt=z[ft];if(!yt)z[ft]=tt;else if(yt!=tt)throw new Error("Inconsistent bindings for "+ft)}delete x[ie]}for(var Et in z)x[Et]=z[Et];return x}function jl(x,z,ie,re){z=Ts(z);var de=z.call?z.call(x,re):z[x];if(de===!1)return"nothing";if(de==="...")return"multi";if(de!=null&&ie(de))return"handled";if(z.fallthrough){if(Object.prototype.toString.call(z.fallthrough)!="[object Array]")return jl(x,z.fallthrough,ie,re);for(var Pe=0;Pe<z.fallthrough.length;Pe++){var tt=jl(x,z.fallthrough[Pe],ie,re);if(tt)return tt}}}function tu(x){var z=typeof x=="string"?x:gl[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function Jl(x,z,ie){var re=x;return z.altKey&&re!="Alt"&&(x="Alt-"+x),(Ne?z.metaKey:z.ctrlKey)&&re!="Ctrl"&&(x="Ctrl-"+x),(Ne?z.ctrlKey:z.metaKey)&&re!="Mod"&&(x="Cmd-"+x),!ie&&z.shiftKey&&re!="Shift"&&(x="Shift-"+x),x}function ql(x,z){if(ve&&x.keyCode==34&&x.char)return!1;var ie=gl[x.keyCode];return ie==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ie=x.code),Jl(ie,x,z))}function Ts(x){return typeof x=="string"?ma[x]:x}function rl(x,z){for(var ie=x.doc.sel.ranges,re=[],de=0;de<ie.length;de++){for(var Pe=z(ie[de]);re.length&&Vt(Pe.from,pn(re).to)<=0;){var tt=re.pop();if(Vt(tt.from,Pe.from)<0){Pe.from=tt.from;break}}re.push(Pe)}Ge(x,function(){for(var ft=re.length-1;ft>=0;ft--)Xl(x.doc,"",re[ft].from,re[ft].to,"+delete");ac(x)})}function vs(x,z,ie){var re=Qe(x.text,z+ie,ie);return re<0||re>x.text.length?null:re}function Hl(x,z,ie){var re=vs(x,z.ch,ie);return re==null?null:new Rt(z.line,re,ie<0?"after":"before")}function Ao(x,z,ie,re,de){if(x){z.doc.direction=="rtl"&&(de=-de);var Pe=rn(ie,z.doc.direction);if(Pe){var tt=de<0?pn(Pe):Pe[0],ft=de<0==(tt.level==1),yt=ft?"after":"before",Et;if(tt.level>0||z.doc.direction=="rtl"){var an=qa(z,ie);Et=de<0?ie.text.length-1:0;var xn=Wo(z,an,Et).top;Et=Je(function(Fn){return Wo(z,an,Fn).top==xn},de<0==(tt.level==1)?tt.from:tt.to-1,Et),yt=="before"&&(Et=vs(ie,Et,1))}else Et=de<0?tt.to:tt.from;return new Rt(re,Et,yt)}}return new Rt(re,de<0?ie.text.length:0,de<0?"before":"after")}function Vo(x,z,ie,re){var de=rn(z,x.doc.direction);if(!de)return Hl(z,ie,re);ie.ch>=z.text.length?(ie.ch=z.text.length,ie.sticky="before"):ie.ch<=0&&(ie.ch=0,ie.sticky="after");var Pe=mt(de,ie.ch,ie.sticky),tt=de[Pe];if(x.doc.direction=="ltr"&&tt.level%2==0&&(re>0?tt.to>ie.ch:tt.from<ie.ch))return Hl(z,ie,re);var ft=function(Si,Ti){return vs(z,Si instanceof Rt?Si.ch:Si,Ti)},yt,Et=function(Si){return x.options.lineWrapping?(yt=yt||qa(x,z),Rl(x,z,yt,Si)):{begin:0,end:z.text.length}},an=Et(ie.sticky=="before"?ft(ie,-1):ie.ch);if(x.doc.direction=="rtl"||tt.level==1){var xn=tt.level==1==re<0,Fn=ft(ie,xn?1:-1);if(Fn!=null&&(xn?Fn<=tt.to&&Fn<=an.end:Fn>=tt.from&&Fn>=an.begin)){var Pn=xn?"before":"after";return new Rt(ie.line,Fn,Pn)}}var hr=function(Si,Ti,vi){for(var Pi=function(Ea,Rs){return Rs?new Rt(ie.line,ft(Ea,1),"before"):new Rt(ie.line,Ea,"after")};Si>=0&&Si<de.length;Si+=Ti){var Ji=de[Si],Qi=Ti>0==(Ji.level!=1),Io=Qi?vi.begin:ft(vi.end,-1);if(Ji.from<=Io&&Io<Ji.to||(Io=Qi?Ji.from:ft(Ji.to,-1),vi.begin<=Io&&Io<vi.end))return Pi(Io,Qi)}},Rr=hr(Pe+re,re,an);if(Rr)return Rr;var ai=re>0?an.end:ft(an.begin,-1);return ai!=null&&!(re>0&&ai==z.text.length)&&(Rr=hr(re>0?0:de.length-1,re,Et(ai)),Rr)?Rr:null}var Os={selectAll:Is,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),_t)},killLine:function(x){return rl(x,function(z){if(z.empty()){var ie=Dt(x.doc,z.head.line).text.length;return z.head.ch==ie&&z.head.line<x.lastLine()?{from:z.head,to:Rt(z.head.line+1,0)}:{from:z.head,to:Rt(z.head.line,ie)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return rl(x,function(z){return{from:Rt(z.from().line,0),to:Sn(x.doc,Rt(z.to().line+1,0))}})},delLineLeft:function(x){return rl(x,function(z){return{from:Rt(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return rl(x,function(z){var ie=x.charCoords(z.head,"div").top+5,re=x.coordsChar({left:0,top:ie},"div");return{from:re,to:z.from()}})},delWrappedLineRight:function(x){return rl(x,function(z){var ie=x.charCoords(z.head,"div").top+5,re=x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ie},"div");return{from:z.from(),to:re}})},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(Rt(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(Rt(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return Kl(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return Nu(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return Zl(x,z.head.line)},{origin:"+move",bias:-1})},goLineRight:function(x){return x.extendSelectionsBy(function(z){var ie=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ie},"div")},jt)},goLineLeft:function(x){return x.extendSelectionsBy(function(z){var ie=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:0,top:ie},"div")},jt)},goLineLeftSmart:function(x){return x.extendSelectionsBy(function(z){var ie=x.cursorCoords(z.head,"div").top+5,re=x.coordsChar({left:0,top:ie},"div");return re.ch<x.getLine(re.line).search(/\S/)?Nu(x,z.head):re},jt)},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=[],ie=x.listSelections(),re=x.options.tabSize,de=0;de<ie.length;de++){var Pe=ie[de].from(),tt=qe(x.getLine(Pe.line),Pe.ch,re);z.push(Ln(re-tt%re))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return Ge(x,function(){for(var z=x.listSelections(),ie=[],re=0;re<z.length;re++)if(z[re].empty()){var de=z[re].head,Pe=Dt(x.doc,de.line).text;if(Pe){if(de.ch==Pe.length&&(de=new Rt(de.line,de.ch-1)),de.ch>0)de=new Rt(de.line,de.ch+1),x.replaceRange(Pe.charAt(de.ch-1)+Pe.charAt(de.ch-2),Rt(de.line,de.ch-2),de,"+transpose");else if(de.line>x.doc.first){var tt=Dt(x.doc,de.line-1).text;tt&&(de=new Rt(de.line,1),x.replaceRange(Pe.charAt(0)+x.doc.lineSeparator()+tt.charAt(tt.length-1),Rt(de.line-1,tt.length-1),de,"+transpose"))}}ie.push(new gr(de,de))}x.setSelections(ie)})},newlineAndIndent:function(x){return Ge(x,function(){for(var z=x.listSelections(),ie=z.length-1;ie>=0;ie--)x.replaceRange(x.doc.lineSeparator(),z[ie].anchor,z[ie].head,"+input");z=x.listSelections();for(var re=0;re<z.length;re++)x.indentLine(z[re].from().line,null,!0);ac(x)})},openLine:function(x){return x.replaceSelection(`
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function Kl(x,z){var ie=Dt(x.doc,z),re=hi(ie);return re!=ie&&(z=Ht(re)),Ao(!0,x,re,z,1)}function Zl(x,z){var ie=Dt(x.doc,z),re=Xi(ie);return re!=ie&&(z=Ht(re)),Ao(!0,x,ie,z,-1)}function Nu(x,z){var ie=Kl(x,z.line),re=Dt(x.doc,ie.line),de=rn(re,x.doc.direction);if(!de||de[0].level==0){var Pe=Math.max(ie.ch,re.text.search(/\S/)),tt=z.line==ie.line&&z.ch<=Pe&&z.ch;return Rt(ie.line,tt?0:Pe,ie.sticky)}return ie}function Ka(x,z,ie){if(typeof z=="string"&&(z=Os[z],!z))return!1;x.display.input.ensurePolled();var re=x.display.shift,de=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),ie&&(x.display.shift=!1),de=z(x)!=Kt}finally{x.display.shift=re,x.state.suppressEdits=!1}return de}function yl(x,z,ie){for(var re=0;re<x.state.keyMaps.length;re++){var de=jl(z,x.state.keyMaps[re],ie,x);if(de)return de}return x.options.extraKeys&&jl(z,x.options.extraKeys,ie,x)||jl(z,x.options.keyMap,ie,x)}var Bu=new Ze;function cc(x,z,ie,re){var de=x.state.keySeq;if(de){if(tu(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:Bu.set(50,function(){x.state.keySeq==de&&(x.state.keySeq=null,x.display.input.reset())}),id(x,de+" "+z,ie,re))return!0}return id(x,z,ie,re)}function id(x,z,ie,re){var de=yl(x,z,re);return de=="multi"&&(x.state.keySeq=z),de=="handled"&&Ci(x,"keyHandled",x,z,ie),(de=="handled"||de=="multi")&&(zn(ie),Ac(x)),!!de}function jo(x,z){var ie=ql(z,!0);return ie?z.shiftKey&&!x.state.keySeq?cc(x,"Shift-"+ie,z,function(re){return Ka(x,re,!0)})||cc(x,ie,z,function(re){if(typeof re=="string"?/^go[A-Z]/.test(re):re.motion)return Ka(x,re)}):cc(x,ie,z,function(re){return Ka(x,re)}):!1}function xu(x,z,ie){return cc(x,"'"+ie+"'",z,function(re){return Ka(x,re,!0)})}var Cc=null;function Fu(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=ct(),!qt(z,x))){fe&&he<11&&x.keyCode==27&&(x.returnValue=!1);var ie=x.keyCode;z.display.shift=ie==16||x.shiftKey;var re=jo(z,x);ve&&(Cc=re?ie:null,!re&&ie==88&&!ii&&(Be?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),ne&&!Be&&!re&&ie==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),ie==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&sr(z)}}function sr(x){var z=x.display.lineDiv;Ot(z,"CodeMirror-crosshair");function ie(re){(re.keyCode==18||!re.altKey)&&(Ie(z,"CodeMirror-crosshair"),At(document,"keyup",ie),At(document,"mouseover",ie))}Qt(document,"keyup",ie),Qt(document,"mouseover",ie)}function hh(x){x.keyCode==16&&(this.doc.sel.shift=!1),qt(this,x)}function fh(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(ws(z.display,x)||qt(z,x)||x.ctrlKey&&!x.altKey||Be&&x.metaKey)){var ie=x.keyCode,re=x.charCode;if(ve&&ie==Cc){Cc=null,zn(x);return}if(!(ve&&(!x.which||x.which<10)&&jo(z,x))){var de=String.fromCharCode(re==null?ie:re);de!="\b"&&(xu(z,x,de)||z.display.input.onKeyPress(x))}}}var Ad=400,Id=function(x,z,ie){this.time=x,this.pos=z,this.button=ie};Id.prototype.compare=function(x,z,ie){return this.time+Ad>x&&Vt(z,this.pos)==0&&ie==this.button};var wc,zu;function rf(x,z){var ie=+new Date;return zu&&zu.compare(ie,x,z)?(wc=zu=null,"triple"):wc&&wc.compare(ie,x,z)?(zu=new Id(ie,x,z),wc=null,"double"):(wc=new Id(ie,x,z),zu=null,"single")}function Fs(x){var z=this,ie=z.display;if(!(qt(z,x)||ie.activeTouch&&ie.input.supportsTouch())){if(ie.input.ensurePolled(),ie.shift=x.shiftKey,ws(ie,x)){ce||(ie.scroller.draggable=!1,setTimeout(function(){return ie.scroller.draggable=!0},100));return}if(!Vs(z,x)){var re=Ws(z,x),de=Qn(x),Pe=re?rf(re,de):"single";window.focus(),de==1&&z.state.selectingText&&z.state.selectingText(x),!(re&&Nc(z,de,re,Pe,x))&&(de==1?re?ad(z,re,Pe,x):_r(x)==ie.scroller&&zn(x):de==2?(re&&fo(z.doc,re),setTimeout(function(){return ie.input.focus()},20)):de==3&&(Re?z.display.input.onContextMenu(x):Ic(z)))}}}function Nc(x,z,ie,re,de){var Pe="Click";return re=="double"?Pe="Double"+Pe:re=="triple"&&(Pe="Triple"+Pe),Pe=(z==1?"Left":z==2?"Middle":"Right")+Pe,cc(x,Jl(Pe,de),de,function(tt){if(typeof tt=="string"&&(tt=Os[tt]),!tt)return!1;var ft=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),ft=tt(x,ie)!=Kt}finally{x.state.suppressEdits=!1}return ft})}function od(x,z,ie){var re=x.getOption("configureMouse"),de=re?re(x,z,ie):{};if(de.unit==null){var Pe=ze?ie.shiftKey&&ie.metaKey:ie.altKey;de.unit=Pe?"rectangle":z=="single"?"char":z=="double"?"word":"line"}return(de.extend==null||x.doc.extend)&&(de.extend=x.doc.extend||ie.shiftKey),de.addNew==null&&(de.addNew=Be?ie.metaKey:ie.ctrlKey),de.moveOnDrag==null&&(de.moveOnDrag=!(Be?ie.altKey:ie.ctrlKey)),de}function ad(x,z,ie,re){fe?setTimeout(ut(yc,x),0):x.curOp.focus=ct();var de=od(x,ie,re),Pe=x.doc.sel,tt;x.options.dragDrop&&Cr&&!x.isReadOnly()&&ie=="single"&&(tt=Pe.contains(z))>-1&&(Vt((tt=Pe.ranges[tt]).from(),z)<0||z.xRel>0)&&(Vt(tt.to(),z)>0||z.xRel<0)?of(x,re,z,de):Td(x,re,z,de)}function of(x,z,ie,re){var de=x.display,Pe=!1,tt=st(x,function(Et){ce&&(de.scroller.draggable=!1),x.state.draggingText=!1,At(de.wrapper.ownerDocument,"mouseup",tt),At(de.wrapper.ownerDocument,"mousemove",ft),At(de.scroller,"dragstart",yt),At(de.scroller,"drop",tt),Pe||(zn(Et),re.addNew||fo(x.doc,ie,null,null,re.extend),ce&&!ue||fe&&he==9?setTimeout(function(){de.wrapper.ownerDocument.body.focus({preventScroll:!0}),de.input.focus()},20):de.input.focus())}),ft=function(Et){Pe=Pe||Math.abs(z.clientX-Et.clientX)+Math.abs(z.clientY-Et.clientY)>=10},yt=function(){return Pe=!0};ce&&(de.scroller.draggable=!0),x.state.draggingText=tt,tt.copy=!re.moveOnDrag,de.scroller.dragDrop&&de.scroller.dragDrop(),Qt(de.wrapper.ownerDocument,"mouseup",tt),Qt(de.wrapper.ownerDocument,"mousemove",ft),Qt(de.scroller,"dragstart",yt),Qt(de.scroller,"drop",tt),Ic(x),setTimeout(function(){return de.input.focus()},20)}function ph(x,z,ie){if(ie=="char")return new gr(z,z);if(ie=="word")return x.findWordAt(z);if(ie=="line")return new gr(Rt(z.line,0),Sn(x.doc,Rt(z.line+1,0)));var re=ie(x,z);return new gr(re.from,re.to)}function Td(x,z,ie,re){var de=x.display,Pe=x.doc;zn(z);var tt,ft,yt=Pe.sel,Et=yt.ranges;if(re.addNew&&!re.extend?(ft=Pe.sel.contains(ie),ft>-1?tt=Et[ft]:tt=new gr(ie,ie)):(tt=Pe.sel.primary(),ft=Pe.sel.primIndex),re.unit=="rectangle")re.addNew||(tt=new gr(ie,ie)),ie=Ws(x,z,!0,!0),ft=-1;else{var an=ph(x,ie,re.unit);re.extend?tt=os(tt,an.anchor,an.head,re.extend):tt=an}re.addNew?ft==-1?(ft=Et.length,$o(Pe,oi(x,Et.concat([tt]),ft),{scroll:!1,origin:"*mouse"})):Et.length>1&&Et[ft].empty()&&re.unit=="char"&&!re.extend?($o(Pe,oi(x,Et.slice(0,ft).concat(Et.slice(ft+1)),0),{scroll:!1,origin:"*mouse"}),yt=Pe.sel):Eo(Pe,ft,tt,vt):(ft=0,$o(Pe,new ir([tt],0),vt),yt=Pe.sel);var xn=ie;function Fn(vi){if(Vt(xn,vi)!=0)if(xn=vi,re.unit=="rectangle"){for(var Pi=[],Ji=x.options.tabSize,Qi=qe(Dt(Pe,ie.line).text,ie.ch,Ji),Io=qe(Dt(Pe,vi.line).text,vi.ch,Ji),Ea=Math.min(Qi,Io),Rs=Math.max(Qi,Io),Ya=Math.min(ie.line,vi.line),sl=Math.min(x.lastLine(),Math.max(ie.line,vi.line));Ya<=sl;Ya++){var ll=Dt(Pe,Ya).text,gs=yn(ll,Ea,Ji);Ea==Rs?Pi.push(new gr(Rt(Ya,gs),Rt(Ya,gs))):ll.length>gs&&Pi.push(new gr(Rt(Ya,gs),Rt(Ya,yn(ll,Rs,Ji))))}Pi.length||Pi.push(new gr(ie,ie)),$o(Pe,oi(x,yt.ranges.slice(0,ft).concat(Pi),ft),{origin:"*mouse",scroll:!1}),x.scrollIntoView(vi)}else{var cl=tt,po=ph(x,vi,re.unit),ts=cl.anchor,Xa;Vt(po.anchor,ts)>0?(Xa=po.head,ts=Rn(cl.from(),po.anchor)):(Xa=po.anchor,ts=Nn(cl.to(),po.head));var ns=yt.ranges.slice(0);ns[ft]=mh(x,new gr(Sn(Pe,ts),Xa)),$o(Pe,oi(x,ns,ft),vt)}}var Pn=de.wrapper.getBoundingClientRect(),hr=0;function Rr(vi){var Pi=++hr,Ji=Ws(x,vi,!0,re.unit=="rectangle");if(Ji)if(Vt(Ji,xn)!=0){x.curOp.focus=ct(),Fn(Ji);var Qi=Qa(de,Pe);(Ji.line>=Qi.to||Ji.line<Qi.from)&&setTimeout(st(x,function(){hr==Pi&&Rr(vi)}),150)}else{var Io=vi.clientY<Pn.top?-20:vi.clientY>Pn.bottom?20:0;Io&&setTimeout(st(x,function(){hr==Pi&&(de.scroller.scrollTop+=Io,Rr(vi))}),50)}}function ai(vi){x.state.selectingText=!1,hr=1/0,vi&&(zn(vi),de.input.focus()),At(de.wrapper.ownerDocument,"mousemove",Si),At(de.wrapper.ownerDocument,"mouseup",Ti),Pe.history.lastSelOrigin=null}var Si=st(x,function(vi){vi.buttons===0||!Qn(vi)?ai(vi):Rr(vi)}),Ti=st(x,ai);x.state.selectingText=Ti,Qt(de.wrapper.ownerDocument,"mousemove",Si),Qt(de.wrapper.ownerDocument,"mouseup",Ti)}function mh(x,z){var ie=z.anchor,re=z.head,de=Dt(x.doc,ie.line);if(Vt(ie,re)==0&&ie.sticky==re.sticky)return z;var Pe=rn(de);if(!Pe)return z;var tt=mt(Pe,ie.ch,ie.sticky),ft=Pe[tt];if(ft.from!=ie.ch&&ft.to!=ie.ch)return z;var yt=tt+(ft.from==ie.ch==(ft.level!=1)?0:1);if(yt==0||yt==Pe.length)return z;var Et;if(re.line!=ie.line)Et=(re.line-ie.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var an=mt(Pe,re.ch,re.sticky),xn=an-tt||(re.ch-ie.ch)*(ft.level==1?-1:1);an==yt-1||an==yt?Et=xn<0:Et=xn>0}var Fn=Pe[yt+(Et?-1:0)],Pn=Et==(Fn.level==1),hr=Pn?Fn.from:Fn.to,Rr=Pn?"after":"before";return ie.ch==hr&&ie.sticky==Rr?z:new gr(new Rt(ie.line,hr,Rr),re)}function $u(x,z,ie,re){var de,Pe;if(z.touches)de=z.touches[0].clientX,Pe=z.touches[0].clientY;else try{de=z.clientX,Pe=z.clientY}catch(Fn){return!1}if(de>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;re&&zn(z);var tt=x.display,ft=tt.lineDiv.getBoundingClientRect();if(Pe>ft.bottom||!Jt(x,ie))return Xn(z);Pe-=ft.top-tt.viewOffset;for(var yt=0;yt<x.display.gutterSpecs.length;++yt){var Et=tt.gutters.childNodes[yt];if(Et&&Et.getBoundingClientRect().right>=de){var an=Ut(x.doc,Pe),xn=x.display.gutterSpecs[yt];return Lt(x,ie,x,an,xn.className,z),Xn(z)}}}function Vs(x,z){return $u(x,z,"gutterClick",!0)}function Bc(x,z){ws(x.display,z)||vh(x,z)||qt(x,z,"contextmenu")||Re||x.display.input.onContextMenu(z)}function vh(x,z){return Jt(x,"gutterContextMenu")?$u(x,z,"gutterContextMenu",!1):!1}function Od(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),oa(x)}var Fc={toString:function(){return"CodeMirror.Init"}},gh={},sd={};function af(x){var z=x.optionHandlers;function ie(re,de,Pe,tt){x.defaults[re]=de,Pe&&(z[re]=tt?function(ft,yt,Et){Et!=Fc&&Pe(ft,yt,Et)}:Pe)}x.defineOption=ie,x.Init=Fc,ie("value","",function(re,de){return re.setValue(de)},!0),ie("mode",null,function(re,de){re.doc.modeOption=de,Jo(re)},!0),ie("indentUnit",2,Jo,!0),ie("indentWithTabs",!1),ie("smartIndent",!0),ie("tabSize",4,function(re){co(re),oa(re),Ba(re)},!0),ie("lineSeparator",null,function(re,de){if(re.doc.lineSep=de,!!de){var Pe=[],tt=re.doc.first;re.doc.iter(function(yt){for(var Et=0;;){var an=yt.text.indexOf(de,Et);if(an==-1)break;Et=an+de.length,Pe.push(Rt(tt,an))}tt++});for(var ft=Pe.length-1;ft>=0;ft--)Xl(re.doc,de,Pe[ft],Rt(Pe[ft].line,Pe[ft].ch+de.length))}}),ie("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(re,de,Pe){re.state.specialChars=new RegExp(de.source+(de.test(" ")?"":"| "),"g"),Pe!=Fc&&re.refresh()}),ie("specialCharPlaceholder",Yo,function(re){return re.refresh()},!0),ie("electricChars",!0),ie("inputStyle",we?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ie("spellcheck",!1,function(re,de){return re.getInputField().spellcheck=de},!0),ie("autocorrect",!1,function(re,de){return re.getInputField().autocorrect=de},!0),ie("autocapitalize",!1,function(re,de){return re.getInputField().autocapitalize=de},!0),ie("rtlMoveVisually",!$e),ie("wholeLineUpdateBefore",!0),ie("theme","default",function(re){Od(re),ar(re)},!0),ie("keyMap","default",function(re,de,Pe){var tt=Ts(de),ft=Pe!=Fc&&Ts(Pe);ft&&ft.detach&&ft.detach(re,tt),tt.attach&&tt.attach(re,ft||null)}),ie("extraKeys",null),ie("configureMouse",null),ie("lineWrapping",!1,yh,!0),ie("gutters",[],function(re,de){re.display.gutterSpecs=Yr(de,re.options.lineNumbers),ar(re)},!0),ie("fixedGutter",!0,function(re,de){re.display.gutters.style.left=de?Xo(re.display)+"px":"0",re.refresh()},!0),ie("coverGutterNextToScrollbar",!1,function(re){return Fo(re)},!0),ie("scrollbarStyle","native",function(re){Ds(re),Fo(re),re.display.scrollbars.setScrollTop(re.doc.scrollTop),re.display.scrollbars.setScrollLeft(re.doc.scrollLeft)},!0),ie("lineNumbers",!1,function(re,de){re.display.gutterSpecs=Yr(re.options.gutters,de),ar(re)},!0),ie("firstLineNumber",1,ar,!0),ie("lineNumberFormatter",function(re){return re},ar,!0),ie("showCursorWhenSelecting",!1,al,!0),ie("resetSelectionOnContextMenu",!0),ie("lineWiseCopyCut",!0),ie("pasteLinesPerSelection",!0),ie("selectionsMayTouch",!1),ie("readOnly",!1,function(re,de){de=="nocursor"&&(El(re),re.display.input.blur()),re.display.input.readOnlyChanged(de)}),ie("screenReaderLabel",null,function(re,de){de=de===""?null:de,re.display.input.screenReaderLabelChanged(de)}),ie("disableInput",!1,function(re,de){de||re.display.input.reset()},!0),ie("dragDrop",!0,sf),ie("allowDropFileTypes",null),ie("cursorBlinkRate",530),ie("cursorScrollMargin",0),ie("cursorHeight",1,al,!0),ie("singleCursorHeightPerLine",!0,al,!0),ie("workTime",100),ie("workDelay",100),ie("flattenSpans",!0,co,!0),ie("addModeClass",!1,co,!0),ie("pollInterval",100),ie("undoDepth",200,function(re,de){return re.doc.history.undoDepth=de}),ie("historyEventDelay",1250),ie("viewportMargin",10,function(re){return re.refresh()},!0),ie("maxHighlightLength",1e4,co,!0),ie("moveInputWithCursor",!0,function(re,de){de||re.display.input.resetPosition()}),ie("tabindex",null,function(re,de){return re.display.input.getField().tabIndex=de||""}),ie("autofocus",null),ie("direction","ltr",function(re,de){return re.doc.setDirection(de)},!0),ie("phrases",null)}function sf(x,z,ie){var re=ie&&ie!=Fc;if(!z!=!re){var de=x.display.dragFunctions,Pe=z?Qt:At;Pe(x.display.scroller,"dragstart",de.start),Pe(x.display.scroller,"dragenter",de.enter),Pe(x.display.scroller,"dragover",de.over),Pe(x.display.scroller,"dragleave",de.leave),Pe(x.display.scroller,"drop",de.drop)}}function yh(x){x.options.lineWrapping?(Ot(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(Ie(x.display.wrapper,"CodeMirror-wrap"),kr(x)),ja(x),Ba(x),oa(x),setTimeout(function(){return Fo(x)},100)}function ho(x,z){var ie=this;if(!(this instanceof ho))return new ho(x,z);this.options=z=z?St(z):{},St(gh,z,!1);var re=z.value;typeof re=="string"?re=new Ha(re,z.mode,null,z.lineSeparator,z.direction):z.mode&&(re.modeOption=z.mode),this.doc=re;var de=new ho.inputStyles[z.inputStyle](this),Pe=this.display=new Br(x,re,de,z);Pe.wrapper.CodeMirror=this,Od(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ds(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 Ze,keySeq:null,specialChars:null},z.autofocus&&!we&&Pe.input.focus(),fe&&he<11&&setTimeout(function(){return ie.display.input.reset(!0)},20),lf(this),Pu(),bs(this),this.curOp.forceUpdate=!0,li(this,re),z.autofocus&&!we||this.hasFocus()?setTimeout(function(){ie.hasFocus()&&!ie.state.focused&&pl(ie)},20):El(this);for(var tt in sd)sd.hasOwnProperty(tt)&&sd[tt](this,z[tt],Fc);pr(this),z.finishInit&&z.finishInit(this);for(var ft=0;ft<Rd.length;++ft)Rd[ft](this);kl(this),ce&&z.lineWrapping&&getComputedStyle(Pe.lineDiv).textRendering=="optimizelegibility"&&(Pe.lineDiv.style.textRendering="auto")}ho.defaults=gh,ho.optionHandlers=sd;function lf(x){var z=x.display;Qt(z.scroller,"mousedown",st(x,Fs)),fe&&he<11?Qt(z.scroller,"dblclick",st(x,function(yt){if(!qt(x,yt)){var Et=Ws(x,yt);if(!(!Et||Vs(x,yt)||ws(x.display,yt))){zn(yt);var an=x.findWordAt(Et);fo(x.doc,an.anchor,an.head)}}})):Qt(z.scroller,"dblclick",function(yt){return qt(x,yt)||zn(yt)}),Qt(z.scroller,"contextmenu",function(yt){return Bc(x,yt)}),Qt(z.input.getField(),"contextmenu",function(yt){z.scroller.contains(yt.target)||Bc(x,yt)});var ie,re={end:0};function de(){z.activeTouch&&(ie=setTimeout(function(){return z.activeTouch=null},1e3),re=z.activeTouch,re.end=+new Date)}function Pe(yt){if(yt.touches.length!=1)return!1;var Et=yt.touches[0];return Et.radiusX<=1&&Et.radiusY<=1}function tt(yt,Et){if(Et.left==null)return!0;var an=Et.left-yt.left,xn=Et.top-yt.top;return an*an+xn*xn>20*20}Qt(z.scroller,"touchstart",function(yt){if(!qt(x,yt)&&!Pe(yt)&&!Vs(x,yt)){z.input.ensurePolled(),clearTimeout(ie);var Et=+new Date;z.activeTouch={start:Et,moved:!1,prev:Et-re.end<=300?re:null},yt.touches.length==1&&(z.activeTouch.left=yt.touches[0].pageX,z.activeTouch.top=yt.touches[0].pageY)}}),Qt(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),Qt(z.scroller,"touchend",function(yt){var Et=z.activeTouch;if(Et&&!ws(z,yt)&&Et.left!=null&&!Et.moved&&new Date-Et.start<300){var an=x.coordsChar(z.activeTouch,"page"),xn;!Et.prev||tt(Et,Et.prev)?xn=new gr(an,an):!Et.prev.prev||tt(Et,Et.prev.prev)?xn=x.findWordAt(an):xn=new gr(Rt(an.line,0),Sn(x.doc,Rt(an.line+1,0))),x.setSelection(xn.anchor,xn.head),x.focus(),zn(yt)}de()}),Qt(z.scroller,"touchcancel",de),Qt(z.scroller,"scroll",function(){z.scroller.clientHeight&&(Bl(x,z.scroller.scrollTop),el(x,z.scroller.scrollLeft,!0),Lt(x,"scroll",x))}),Qt(z.scroller,"mousewheel",function(yt){return Ki(x,yt)}),Qt(z.scroller,"DOMMouseScroll",function(yt){return Ki(x,yt)}),Qt(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(yt){qt(x,yt)||vr(yt)},over:function(yt){qt(x,yt)||(gu(x,yt),vr(yt))},start:function(yt){return vu(x,yt)},drop:st(x,nd),leave:function(yt){qt(x,yt)||Rc(x)}};var ft=z.input.getField();Qt(ft,"keyup",function(yt){return hh.call(x,yt)}),Qt(ft,"keydown",st(x,Fu)),Qt(ft,"keypress",st(x,fh)),Qt(ft,"focus",function(yt){return pl(x,yt)}),Qt(ft,"blur",function(yt){return El(x,yt)})}var Rd=[];ho.defineInitHook=function(x){return Rd.push(x)};function Ql(x,z,ie,re){var de=x.doc,Pe;ie==null&&(ie="add"),ie=="smart"&&(de.mode.indent?Pe=kn(x,z).state:ie="prev");var tt=x.options.tabSize,ft=Dt(de,z),yt=qe(ft.text,null,tt);ft.stateAfter&&(ft.stateAfter=null);var Et=ft.text.match(/^\s*/)[0],an;if(!re&&!/\S/.test(ft.text))an=0,ie="not";else if(ie=="smart"&&(an=de.mode.indent(Pe,ft.text.slice(Et.length),ft.text),an==Kt||an>150)){if(!re)return;ie="prev"}ie=="prev"?z>de.first?an=qe(Dt(de,z-1).text,null,tt):an=0:ie=="add"?an=yt+x.options.indentUnit:ie=="subtract"?an=yt-x.options.indentUnit:typeof ie=="number"&&(an=yt+ie),an=Math.max(0,an);var xn="",Fn=0;if(x.options.indentWithTabs)for(var Pn=Math.floor(an/tt);Pn;--Pn)Fn+=tt,xn+=" ";if(Fn<an&&(xn+=Ln(an-Fn)),xn!=Et)return Xl(de,xn,Rt(z,0),Rt(z,Et.length),"+input"),ft.stateAfter=null,!0;for(var hr=0;hr<de.sel.ranges.length;hr++){var Rr=de.sel.ranges[hr];if(Rr.head.line==z&&Rr.head.ch<Et.length){var ai=Rt(z,Et.length);Eo(de,hr,new gr(ai,ai));break}}}var ec=null;function zc(x){ec=x}function Pd(x,z,ie,re,de){var Pe=x.doc;x.display.shift=!1,re||(re=Pe.sel);var tt=+new Date-200,ft=de=="paste"||x.state.pasteIncoming>tt,yt=si(z),Et=null;if(ft&&re.ranges.length>1)if(ec&&ec.text.join(`
`)==z){if(re.ranges.length%ec.text.length==0){Et=[];for(var an=0;an<ec.text.length;an++)Et.push(Pe.splitLines(ec.text[an]))}}else yt.length==re.ranges.length&&x.options.pasteLinesPerSelection&&(Et=hn(yt,function(Si){return[Si]}));for(var xn=x.curOp.updateInput,Fn=re.ranges.length-1;Fn>=0;Fn--){var Pn=re.ranges[Fn],hr=Pn.from(),Rr=Pn.to();Pn.empty()&&(ie&&ie>0?hr=Rt(hr.line,hr.ch-ie):x.state.overwrite&&!ft?Rr=Rt(Rr.line,Math.min(Dt(Pe,Rr.line).text.length,Rr.ch+pn(yt).length)):ft&&ec&&ec.lineWise&&ec.text.join(`
`)==yt.join(`
`)&&(hr=Rr=Rt(hr.line,0)));var ai={from:hr,to:Rr,text:Et?Et[Fn%Et.length]:yt,origin:de||(ft?"paste":x.state.cutIncoming>tt?"cut":"+input")};ga(x.doc,ai),Ci(x,"inputRead",x,ai)}z&&!ft&&Bd(x,z),ac(x),x.curOp.updateInput<2&&(x.curOp.updateInput=xn),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function Nd(x,z){var ie=x.clipboardData&&x.clipboardData.getData("Text");if(ie)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&Ge(z,function(){return Pd(z,ie,0,null,"paste")}),!0}function Bd(x,z){if(!(!x.options.electricChars||!x.options.smartIndent))for(var ie=x.doc.sel,re=ie.ranges.length-1;re>=0;re--){var de=ie.ranges[re];if(!(de.head.ch>100||re&&ie.ranges[re-1].head.line==de.head.line)){var Pe=x.getModeAt(de.head),tt=!1;if(Pe.electricChars){for(var ft=0;ft<Pe.electricChars.length;ft++)if(z.indexOf(Pe.electricChars.charAt(ft))>-1){tt=Ql(x,de.head.line,"smart");break}}else Pe.electricInput&&Pe.electricInput.test(Dt(x.doc,de.head.line).text.slice(0,de.head.ch))&&(tt=Ql(x,de.head.line,"smart"));tt&&Ci(x,"electricInput",x,de.head.line)}}}function Su(x){for(var z=[],ie=[],re=0;re<x.doc.sel.ranges.length;re++){var de=x.doc.sel.ranges[re].head.line,Pe={anchor:Rt(de,0),head:Rt(de+1,0)};ie.push(Pe),z.push(x.getRange(Pe.anchor,Pe.head))}return{text:z,ranges:ie}}function bh(x,z,ie,re){x.setAttribute("autocorrect",ie?"":"off"),x.setAttribute("autocapitalize",re?"":"off"),x.setAttribute("spellcheck",!!z)}function Fd(){var x=Ue("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=Ue("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ce?x.style.width="1000px":x.setAttribute("wrap","off"),ge&&(x.style.border="1px solid black"),bh(x),z}function zd(x){var z=x.optionHandlers,ie=x.helpers={};x.prototype={constructor:x,focus:function(){window.focus(),this.display.input.focus()},setOption:function(re,de){var Pe=this.options,tt=Pe[re];Pe[re]==de&&re!="mode"||(Pe[re]=de,z.hasOwnProperty(re)&&st(this,z[re])(this,de,tt),Lt(this,"optionChange",this,re))},getOption:function(re){return this.options[re]},getDoc:function(){return this.doc},addKeyMap:function(re,de){this.state.keyMaps[de?"push":"unshift"](Ts(re))},removeKeyMap:function(re){for(var de=this.state.keyMaps,Pe=0;Pe<de.length;++Pe)if(de[Pe]==re||de[Pe].name==re)return de.splice(Pe,1),!0},addOverlay:ht(function(re,de){var Pe=re.token?re:x.getMode(this.options,re);if(Pe.startState)throw new Error("Overlays may not be stateful.");un(this.state.overlays,{mode:Pe,modeSpec:re,opaque:de&&de.opaque,priority:de&&de.priority||0},function(tt){return tt.priority}),this.state.modeGen++,Ba(this)}),removeOverlay:ht(function(re){for(var de=this.state.overlays,Pe=0;Pe<de.length;++Pe){var tt=de[Pe].modeSpec;if(tt==re||typeof re=="string"&&tt.name==re){de.splice(Pe,1),this.state.modeGen++,Ba(this);return}}}),indentLine:ht(function(re,de,Pe){typeof de!="string"&&typeof de!="number"&&(de==null?de=this.options.smartIndent?"smart":"prev":de=de?"add":"subtract"),on(this.doc,re)&&Ql(this,re,de,Pe)}),indentSelection:ht(function(re){for(var de=this.doc.sel.ranges,Pe=-1,tt=0;tt<de.length;tt++){var ft=de[tt];if(ft.empty())ft.head.line>Pe&&(Ql(this,ft.head.line,re,!0),Pe=ft.head.line,tt==this.doc.sel.primIndex&&ac(this));else{var yt=ft.from(),Et=ft.to(),an=Math.max(Pe,yt.line);Pe=Math.min(this.lastLine(),Et.line-(Et.ch?0:1))+1;for(var xn=an;xn<Pe;++xn)Ql(this,xn,re);var Fn=this.doc.sel.ranges;yt.ch==0&&de.length==Fn.length&&Fn[tt].from().ch>0&&Eo(this.doc,tt,new gr(yt,Fn[tt].to()),_t)}}}),getTokenAt:function(re,de){return cr(this,re,de)},getLineTokens:function(re,de){return cr(this,Rt(re),de,!0)},getTokenTypeAt:function(re){re=Sn(this.doc,re);var de=En(this,Dt(this.doc,re.line)),Pe=0,tt=(de.length-1)/2,ft=re.ch,yt;if(ft==0)yt=de[2];else for(;;){var Et=Pe+tt>>1;if((Et?de[Et*2-1]:0)>=ft)tt=Et;else if(de[Et*2+1]<ft)Pe=Et+1;else{yt=de[Et*2+2];break}}var an=yt?yt.indexOf("overlay "):-1;return an<0?yt:an==0?null:yt.slice(0,an-1)},getModeAt:function(re){var de=this.doc.mode;return de.innerMode?x.innerMode(de,this.getTokenAt(re).state).mode:de},getHelper:function(re,de){return this.getHelpers(re,de)[0]},getHelpers:function(re,de){var Pe=[];if(!ie.hasOwnProperty(de))return Pe;var tt=ie[de],ft=this.getModeAt(re);if(typeof ft[de]=="string")tt[ft[de]]&&Pe.push(tt[ft[de]]);else if(ft[de])for(var yt=0;yt<ft[de].length;yt++){var Et=tt[ft[de][yt]];Et&&Pe.push(Et)}else ft.helperType&&tt[ft.helperType]?Pe.push(tt[ft.helperType]):tt[ft.name]&&Pe.push(tt[ft.name]);for(var an=0;an<tt._global.length;an++){var xn=tt._global[an];xn.pred(ft,this)&&wt(Pe,xn.val)==-1&&Pe.push(xn.val)}return Pe},getStateAfter:function(re,de){var Pe=this.doc;return re=Jn(Pe,re==null?Pe.first+Pe.size-1:re),kn(this,re+1,de).state},cursorCoords:function(re,de){var Pe,tt=this.doc.sel.primary();return re==null?Pe=tt.head:typeof re=="object"?Pe=Sn(this.doc,re):Pe=re?tt.from():tt.to(),Na(this,Pe,de||"page")},charCoords:function(re,de){return ks(this,Sn(this.doc,re),de||"page")},coordsChar:function(re,de){return re=Ms(this,re,de||"page"),hl(this,re.left,re.top)},lineAtHeight:function(re,de){return re=Ms(this,{top:re,left:0},de||"page").top,Ut(this.doc,re+this.display.viewOffset)},heightAtLine:function(re,de,Pe){var tt=!1,ft;if(typeof re=="number"){var yt=this.doc.first+this.doc.size-1;re<this.doc.first?re=this.doc.first:re>yt&&(re=yt,tt=!0),ft=Dt(this.doc,re)}else ft=re;return Wa(this,ft,{top:0,left:0},de||"page",Pe||tt).top+(tt?this.doc.height-Er(ft):0)},defaultTextHeight:function(){return fl(this.display)},defaultCharWidth:function(){return To(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(re,de,Pe,tt,ft){var yt=this.display;re=Na(this,Sn(this.doc,re));var Et=re.bottom,an=re.left;if(de.style.position="absolute",de.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(de),yt.sizer.appendChild(de),tt=="over")Et=re.top;else if(tt=="above"||tt=="near"){var xn=Math.max(yt.wrapper.clientHeight,this.doc.height),Fn=Math.max(yt.sizer.clientWidth,yt.lineSpace.clientWidth);(tt=="above"||re.bottom+de.offsetHeight>xn)&&re.top>de.offsetHeight?Et=re.top-de.offsetHeight:re.bottom+de.offsetHeight<=xn&&(Et=re.bottom),an+de.offsetWidth>Fn&&(an=Fn-de.offsetWidth)}de.style.top=Et+"px",de.style.left=de.style.right="",ft=="right"?(an=yt.sizer.clientWidth-de.offsetWidth,de.style.right="0px"):(ft=="left"?an=0:ft=="middle"&&(an=(yt.sizer.clientWidth-de.offsetWidth)/2),de.style.left=an+"px"),Pe&&hu(this,{left:an,top:Et,right:an+de.offsetWidth,bottom:Et+de.offsetHeight})},triggerOnKeyDown:ht(Fu),triggerOnKeyPress:ht(fh),triggerOnKeyUp:hh,triggerOnMouseDown:ht(Fs),execCommand:function(re){if(Os.hasOwnProperty(re))return Os[re].call(null,this)},triggerElectric:ht(function(re){Bd(this,re)}),findPosH:function(re,de,Pe,tt){var ft=1;de<0&&(ft=-1,de=-de);for(var yt=Sn(this.doc,re),Et=0;Et<de&&(yt=ld(this.doc,yt,ft,Pe,tt),!yt.hitSide);++Et);return yt},moveH:ht(function(re,de){var Pe=this;this.extendSelectionsBy(function(tt){return Pe.display.shift||Pe.doc.extend||tt.empty()?ld(Pe.doc,tt.head,re,de,Pe.options.rtlMoveVisually):re<0?tt.from():tt.to()},jt)}),deleteH:ht(function(re,de){var Pe=this.doc.sel,tt=this.doc;Pe.somethingSelected()?tt.replaceSelection("",null,"+delete"):rl(this,function(ft){var yt=ld(tt,ft.head,re,de,!1);return re<0?{from:yt,to:ft.head}:{from:ft.head,to:yt}})}),findPosV:function(re,de,Pe,tt){var ft=1,yt=tt;de<0&&(ft=-1,de=-de);for(var Et=Sn(this.doc,re),an=0;an<de;++an){var xn=Na(this,Et,"div");if(yt==null?yt=xn.left:xn.left=yt,Et=_h(this,xn,ft,Pe),Et.hitSide)break}return Et},moveV:ht(function(re,de){var Pe=this,tt=this.doc,ft=[],yt=!this.display.shift&&!tt.extend&&tt.sel.somethingSelected();if(tt.extendSelectionsBy(function(an){if(yt)return re<0?an.from():an.to();var xn=Na(Pe,an.head,"div");an.goalColumn!=null&&(xn.left=an.goalColumn),ft.push(xn.left);var Fn=_h(Pe,xn,re,de);return de=="page"&&an==tt.sel.primary()&&Oc(Pe,ks(Pe,Fn,"div").top-xn.top),Fn},jt),ft.length)for(var Et=0;Et<tt.sel.ranges.length;Et++)tt.sel.ranges[Et].goalColumn=ft[Et]}),findWordAt:function(re){var de=this.doc,Pe=Dt(de,re.line).text,tt=re.ch,ft=re.ch;if(Pe){var yt=this.getHelper(re,"wordChars");(re.sticky=="before"||ft==Pe.length)&&tt?--tt:++ft;for(var Et=Pe.charAt(tt),an=Fe(Et,yt)?function(xn){return Fe(xn,yt)}:/\s/.test(Et)?function(xn){return/\s/.test(xn)}:function(xn){return!/\s/.test(xn)&&!Fe(xn)};tt>0&&an(Pe.charAt(tt-1));)--tt;for(;ft<Pe.length&&an(Pe.charAt(ft));)++ft}return new gr(Rt(re.line,tt),Rt(re.line,ft))},toggleOverwrite:function(re){re!=null&&re==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ot(this.display.cursorDiv,"CodeMirror-overwrite"):Ie(this.display.cursorDiv,"CodeMirror-overwrite"),Lt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ct()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ht(function(re,de){Gl(this,re,de)}),getScrollInfo:function(){var re=this.display.scroller;return{left:re.scrollLeft,top:re.scrollTop,height:re.scrollHeight-Pa(this)-this.display.barHeight,width:re.scrollWidth-Pa(this)-this.display.barWidth,clientHeight:Xs(this),clientWidth:Da(this)}},scrollIntoView:ht(function(re,de){re==null?(re={from:this.doc.sel.primary().head,to:null},de==null&&(de=this.options.cursorScrollMargin)):typeof re=="number"?re={from:Rt(re,0),to:null}:re.from==null&&(re={from:re,to:null}),re.to||(re.to=re.from),re.margin=de||0,re.from.line!=null?Iu(this,re):fu(this,re.from,re.to,re.margin)}),setSize:ht(function(re,de){var Pe=this,tt=function(yt){return typeof yt=="number"||/^\d+$/.test(String(yt))?yt+"px":yt};re!=null&&(this.display.wrapper.style.width=tt(re)),de!=null&&(this.display.wrapper.style.height=tt(de)),this.options.lineWrapping&&va(this);var ft=this.display.viewFrom;this.doc.iter(ft,this.display.viewTo,function(yt){if(yt.widgets){for(var Et=0;Et<yt.widgets.length;Et++)if(yt.widgets[Et].noHScroll){Aa(Pe,ft,"widget");break}}++ft}),this.curOp.forceUpdate=!0,Lt(this,"refresh",this)}),operation:function(re){return Ge(this,re)},startOperation:function(){return bs(this)},endOperation:function(){return kl(this)},refresh:ht(function(){var re=this.display.cachedTextHeight;Ba(this),this.curOp.forceUpdate=!0,oa(this),Gl(this,this.doc.scrollLeft,this.doc.scrollTop),lr(this.display),(re==null||Math.abs(re-fl(this.display))>.5||this.options.lineWrapping)&&ja(this),Lt(this,"refresh",this)}),swapDoc:ht(function(re){var de=this.doc;return de.cm=null,this.state.selectingText&&this.state.selectingText(),li(this,re),oa(this),this.display.input.reset(),Gl(this,re.scrollLeft,re.scrollTop),this.curOp.forceScroll=!0,Ci(this,"swapDoc",this,de),de}),phrase:function(re){var de=this.options.phrases;return de&&Object.prototype.hasOwnProperty.call(de,re)?de[re]:re},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}},On(x),x.registerHelper=function(re,de,Pe){ie.hasOwnProperty(re)||(ie[re]=x[re]={_global:[]}),ie[re][de]=Pe},x.registerGlobalHelper=function(re,de,Pe,tt){x.registerHelper(re,de,tt),ie[re]._global.push({pred:Pe,val:tt})}}function ld(x,z,ie,re,de){var Pe=z,tt=ie,ft=Dt(x,z.line),yt=de&&x.direction=="rtl"?-ie:ie;function Et(){var Ti=z.line+yt;return Ti<x.first||Ti>=x.first+x.size?!1:(z=new Rt(Ti,z.ch,z.sticky),ft=Dt(x,Ti))}function an(Ti){var vi;if(re=="codepoint"){var Pi=ft.text.charCodeAt(z.ch+(re>0?0:-1));isNaN(Pi)?vi=null:vi=new Rt(z.line,Math.max(0,Math.min(ft.text.length,z.ch+ie*(Pi>=55296&&Pi<56320?2:1))),-ie)}else de?vi=Vo(x.cm,ft,z,ie):vi=Hl(ft,z,ie);if(vi==null)if(!Ti&&Et())z=Ao(de,x.cm,ft,z.line,yt);else return!1;else z=vi;return!0}if(re=="char"||re=="codepoint")an();else if(re=="column")an(!0);else if(re=="word"||re=="group")for(var xn=null,Fn=re=="group",Pn=x.cm&&x.cm.getHelper(z,"wordChars"),hr=!0;!(ie<0&&!an(!hr));hr=!1){var Rr=ft.text.charAt(z.ch)||`
`,ai=Fe(Rr,Pn)?"w":Fn&&Rr==`
`?"n":!Fn||/\s/.test(Rr)?null:"p";if(Fn&&!hr&&!ai&&(ai="s"),xn&&xn!=ai){ie<0&&(ie=1,an(),z.sticky="after");break}if(ai&&(xn=ai),ie>0&&!an(!hr))break}var Si=vl(x,z,Pe,tt,!0);return In(Pe,Si)&&(Si.hitSide=!0),Si}function _h(x,z,ie,re){var de=x.doc,Pe=z.left,tt;if(re=="page"){var ft=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),yt=Math.max(ft-.5*fl(x.display),3);tt=(ie>0?z.bottom:z.top)+ie*yt}else re=="line"&&(tt=ie>0?z.bottom+3:z.top-3);for(var Et;Et=hl(x,Pe,tt),!!Et.outside;){if(ie<0?tt<=0:tt>=de.height){Et.hitSide=!0;break}tt+=ie*5}return Et}var Sa=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ze,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Sa.prototype.init=function(x){var z=this,ie=this,re=ie.cm,de=ie.div=x.lineDiv;bh(de,re.options.spellcheck,re.options.autocorrect,re.options.autocapitalize);function Pe(ft){for(var yt=ft.target;yt;yt=yt.parentNode){if(yt==de)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(yt.className))break}return!1}Qt(de,"paste",function(ft){!Pe(ft)||qt(re,ft)||Nd(ft,re)||he<=11&&setTimeout(st(re,function(){return z.updateFromDOM()}),20)}),Qt(de,"compositionstart",function(ft){z.composing={data:ft.data,done:!1}}),Qt(de,"compositionupdate",function(ft){z.composing||(z.composing={data:ft.data,done:!1})}),Qt(de,"compositionend",function(ft){z.composing&&(ft.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),Qt(de,"touchstart",function(){return ie.forceCompositionEnd()}),Qt(de,"input",function(){z.composing||z.readFromDOMSoon()});function tt(ft){if(!(!Pe(ft)||qt(re,ft))){if(re.somethingSelected())zc({lineWise:!1,text:re.getSelections()}),ft.type=="cut"&&re.replaceSelection("",null,"cut");else if(re.options.lineWiseCopyCut){var yt=Su(re);zc({lineWise:!0,text:yt.text}),ft.type=="cut"&&re.operation(function(){re.setSelections(yt.ranges,0,_t),re.replaceSelection("",null,"cut")})}else return;if(ft.clipboardData){ft.clipboardData.clearData();var Et=ec.text.join(`
`);if(ft.clipboardData.setData("Text",Et),ft.clipboardData.getData("Text")==Et){ft.preventDefault();return}}var an=Fd(),xn=an.firstChild;re.display.lineSpace.insertBefore(an,re.display.lineSpace.firstChild),xn.value=ec.text.join(`
`);var Fn=document.activeElement;lt(xn),setTimeout(function(){re.display.lineSpace.removeChild(an),Fn.focus(),Fn==de&&ie.showPrimarySelection()},50)}}Qt(de,"copy",tt),Qt(de,"cut",tt)},Sa.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},Sa.prototype.prepareSelection=function(){var x=cu(this.cm,!1);return x.focus=document.activeElement==this.div,x},Sa.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},Sa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Sa.prototype.showPrimarySelection=function(){var x=this.getSelection(),z=this.cm,ie=z.doc.sel.primary(),re=ie.from(),de=ie.to();if(z.display.viewTo==z.display.viewFrom||re.line>=z.display.viewTo||de.line<z.display.viewFrom){x.removeAllRanges();return}var Pe=cd(z,x.anchorNode,x.anchorOffset),tt=cd(z,x.focusNode,x.focusOffset);if(!(Pe&&!Pe.bad&&tt&&!tt.bad&&Vt(Rn(Pe,tt),re)==0&&Vt(Nn(Pe,tt),de)==0)){var ft=z.display.view,yt=re.line>=z.display.viewFrom&&xh(z,re)||{node:ft[0].measure.map[2],offset:0},Et=de.line<z.display.viewTo&&xh(z,de);if(!Et){var an=ft[ft.length-1].measure,xn=an.maps?an.maps[an.maps.length-1]:an.map;Et={node:xn[xn.length-1],offset:xn[xn.length-2]-xn[xn.length-3]}}if(!yt||!Et){x.removeAllRanges();return}var Fn=x.rangeCount&&x.getRangeAt(0),Pn;try{Pn=Ve(yt.node,yt.offset,Et.offset,Et.node)}catch(hr){}Pn&&(!ne&&z.state.focused?(x.collapse(yt.node,yt.offset),Pn.collapsed||(x.removeAllRanges(),x.addRange(Pn))):(x.removeAllRanges(),x.addRange(Pn)),Fn&&x.anchorNode==null?x.addRange(Fn):ne&&this.startGracePeriod()),this.rememberSelection()}},Sa.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)},Sa.prototype.showMultipleSelections=function(x){it(this.cm.display.cursorDiv,x.cursors),it(this.cm.display.selectionDiv,x.selection)},Sa.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},Sa.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return Tt(this.div,z)},Sa.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Sa.prototype.blur=function(){this.div.blur()},Sa.prototype.getField=function(){return this.div},Sa.prototype.supportsTouch=function(){return!0},Sa.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():Ge(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)},Sa.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},Sa.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(ye&&se&&this.cm.display.gutterSpecs.length&&cf(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ie=cd(z,x.anchorNode,x.anchorOffset),re=cd(z,x.focusNode,x.focusOffset);ie&&re&&Ge(z,function(){$o(z.doc,xr(ie,re),_t),(ie.bad||re.bad)&&(z.curOp.selectionChanged=!0)})}}},Sa.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var x=this.cm,z=x.display,ie=x.doc.sel.primary(),re=ie.from(),de=ie.to();if(re.ch==0&&re.line>x.firstLine()&&(re=Rt(re.line-1,Dt(x.doc,re.line-1).length)),de.ch==Dt(x.doc,de.line).text.length&&de.line<x.lastLine()&&(de=Rt(de.line+1,0)),re.line<z.viewFrom||de.line>z.viewTo-1)return!1;var Pe,tt,ft;re.line==z.viewFrom||(Pe=is(x,re.line))==0?(tt=Ht(z.view[0].line),ft=z.view[0].node):(tt=Ht(z.view[Pe].line),ft=z.view[Pe-1].node.nextSibling);var yt=is(x,de.line),Et,an;if(yt==z.view.length-1?(Et=z.viewTo-1,an=z.lineDiv.lastChild):(Et=Ht(z.view[yt+1].line)-1,an=z.view[yt+1].node.previousSibling),!ft)return!1;for(var xn=x.doc.splitLines(uf(x,ft,an,tt,Et)),Fn=Ft(x.doc,Rt(tt,0),Rt(Et,Dt(x.doc,Et).text.length));xn.length>1&&Fn.length>1;)if(pn(xn)==pn(Fn))xn.pop(),Fn.pop(),Et--;else if(xn[0]==Fn[0])xn.shift(),Fn.shift(),tt++;else break;for(var Pn=0,hr=0,Rr=xn[0],ai=Fn[0],Si=Math.min(Rr.length,ai.length);Pn<Si&&Rr.charCodeAt(Pn)==ai.charCodeAt(Pn);)++Pn;for(var Ti=pn(xn),vi=pn(Fn),Pi=Math.min(Ti.length-(xn.length==1?Pn:0),vi.length-(Fn.length==1?Pn:0));hr<Pi&&Ti.charCodeAt(Ti.length-hr-1)==vi.charCodeAt(vi.length-hr-1);)++hr;if(xn.length==1&&Fn.length==1&&tt==re.line)for(;Pn&&Pn>re.ch&&Ti.charCodeAt(Ti.length-hr-1)==vi.charCodeAt(vi.length-hr-1);)Pn--,hr++;xn[xn.length-1]=Ti.slice(0,Ti.length-hr).replace(/^\u200b+/,""),xn[0]=xn[0].slice(Pn).replace(/\u200b+$/,"");var Ji=Rt(tt,Pn),Qi=Rt(Et,Fn.length?pn(Fn).length-hr:0);if(xn.length>1||xn[0]||Vt(Ji,Qi))return Xl(x.doc,xn,Ji,Qi,"+input"),!0},Sa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Sa.prototype.reset=function(){this.forceCompositionEnd()},Sa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Sa.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))},Sa.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&Ge(this.cm,function(){return Ba(x.cm)})},Sa.prototype.setUneditable=function(x){x.contentEditable="false"},Sa.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||st(this.cm,Pd)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},Sa.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},Sa.prototype.onContextMenu=function(){},Sa.prototype.resetPosition=function(){},Sa.prototype.needsContentAttribute=!0;function xh(x,z){var ie=_a(x,z.line);if(!ie||ie.hidden)return null;var re=Dt(x.doc,z.line),de=Ps(ie,re,z.line),Pe=rn(re,x.doc.direction),tt="left";if(Pe){var ft=mt(Pe,z.ch);tt=ft%2?"right":"left"}var yt=Cl(de.map,z.ch,tt);return yt.offset=yt.collapse=="right"?yt.end:yt.start,yt}function cf(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function Cu(x,z){return z&&(x.bad=!0),x}function uf(x,z,ie,re,de){var Pe="",tt=!1,ft=x.doc.lineSeparator(),yt=!1;function Et(Pn){return function(hr){return hr.id==Pn}}function an(){tt&&(Pe+=ft,yt&&(Pe+=ft),tt=yt=!1)}function xn(Pn){Pn&&(an(),Pe+=Pn)}function Fn(Pn){if(Pn.nodeType==1){var hr=Pn.getAttribute("cm-text");if(hr){xn(hr);return}var Rr=Pn.getAttribute("cm-marker"),ai;if(Rr){var Si=x.findMarks(Rt(re,0),Rt(de+1,0),Et(+Rr));Si.length&&(ai=Si[0].find(0))&&xn(Ft(x.doc,ai.from,ai.to).join(ft));return}if(Pn.getAttribute("contenteditable")=="false")return;var Ti=/^(pre|div|p|li|table|br)$/i.test(Pn.nodeName);if(!/^br$/i.test(Pn.nodeName)&&Pn.textContent.length==0)return;Ti&&an();for(var vi=0;vi<Pn.childNodes.length;vi++)Fn(Pn.childNodes[vi]);/^(pre|p)$/i.test(Pn.nodeName)&&(yt=!0),Ti&&(tt=!0)}else Pn.nodeType==3&&xn(Pn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Fn(z),z!=ie;)z=z.nextSibling,yt=!1;return Pe}function cd(x,z,ie){var re;if(z==x.display.lineDiv){if(re=x.display.lineDiv.childNodes[ie],!re)return Cu(x.clipPos(Rt(x.display.viewTo-1)),!0);z=null,ie=0}else for(re=z;;re=re.parentNode){if(!re||re==x.display.lineDiv)return null;if(re.parentNode&&re.parentNode==x.display.lineDiv)break}for(var de=0;de<x.display.view.length;de++){var Pe=x.display.view[de];if(Pe.node==re)return df(Pe,z,ie)}}function df(x,z,ie){var re=x.text.firstChild,de=!1;if(!z||!Tt(re,z))return Cu(Rt(Ht(x.line),0),!0);if(z==re&&(de=!0,z=re.childNodes[ie],ie=0,!z)){var Pe=x.rest?pn(x.rest):x.line;return Cu(Rt(Ht(Pe),Pe.text.length),de)}var tt=z.nodeType==3?z:null,ft=z;for(!tt&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(tt=z.firstChild,ie&&(ie=tt.nodeValue.length));ft.parentNode!=re;)ft=ft.parentNode;var yt=x.measure,Et=yt.maps;function an(ai,Si,Ti){for(var vi=-1;vi<(Et?Et.length:0);vi++)for(var Pi=vi<0?yt.map:Et[vi],Ji=0;Ji<Pi.length;Ji+=3){var Qi=Pi[Ji+2];if(Qi==ai||Qi==Si){var Io=Ht(vi<0?x.line:x.rest[vi]),Ea=Pi[Ji]+Ti;return(Ti<0||Qi!=ai)&&(Ea=Pi[Ji+(Ti?1:0)]),Rt(Io,Ea)}}}var xn=an(tt,ft,ie);if(xn)return Cu(xn,de);for(var Fn=ft.nextSibling,Pn=tt?tt.nodeValue.length-ie:0;Fn;Fn=Fn.nextSibling){if(xn=an(Fn,Fn.firstChild,0),xn)return Cu(Rt(xn.line,xn.ch-Pn),de);Pn+=Fn.textContent.length}for(var hr=ft.previousSibling,Rr=ie;hr;hr=hr.previousSibling){if(xn=an(hr,hr.firstChild,-1),xn)return Cu(Rt(xn.line,xn.ch+Rr),de);Rr+=hr.textContent.length}}var wa=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new Ze,this.hasSelection=!1,this.composing=null};wa.prototype.init=function(x){var z=this,ie=this,re=this.cm;this.createField(x);var de=this.textarea;x.wrapper.insertBefore(this.wrapper,x.wrapper.firstChild),ge&&(de.style.width="0px"),Qt(de,"input",function(){fe&&he>=9&&z.hasSelection&&(z.hasSelection=null),ie.poll()}),Qt(de,"paste",function(tt){qt(re,tt)||Nd(tt,re)||(re.state.pasteIncoming=+new Date,ie.fastPoll())});function Pe(tt){if(!qt(re,tt)){if(re.somethingSelected())zc({lineWise:!1,text:re.getSelections()});else if(re.options.lineWiseCopyCut){var ft=Su(re);zc({lineWise:!0,text:ft.text}),tt.type=="cut"?re.setSelections(ft.ranges,null,_t):(ie.prevInput="",de.value=ft.text.join(`
`),lt(de))}else return;tt.type=="cut"&&(re.state.cutIncoming=+new Date)}}Qt(de,"cut",Pe),Qt(de,"copy",Pe),Qt(x.scroller,"paste",function(tt){if(!(ws(x,tt)||qt(re,tt))){if(!de.dispatchEvent){re.state.pasteIncoming=+new Date,ie.focus();return}var ft=new Event("paste");ft.clipboardData=tt.clipboardData,de.dispatchEvent(ft)}}),Qt(x.lineSpace,"selectstart",function(tt){ws(x,tt)||zn(tt)}),Qt(de,"compositionstart",function(){var tt=re.getCursor("from");ie.composing&&ie.composing.range.clear(),ie.composing={start:tt,range:re.markText(tt,re.getCursor("to"),{className:"CodeMirror-composing"})}}),Qt(de,"compositionend",function(){ie.composing&&(ie.poll(),ie.composing.range.clear(),ie.composing=null)})},wa.prototype.createField=function(x){this.wrapper=Fd(),this.textarea=this.wrapper.firstChild},wa.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},wa.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ie=x.doc,re=cu(x);if(x.options.moveInputWithCursor){var de=Na(x,ie.sel.primary().head,"div"),Pe=z.wrapper.getBoundingClientRect(),tt=z.lineDiv.getBoundingClientRect();re.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,de.top+tt.top-Pe.top)),re.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,de.left+tt.left-Pe.left))}return re},wa.prototype.showSelection=function(x){var z=this.cm,ie=z.display;it(ie.cursorDiv,x.cursors),it(ie.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},wa.prototype.reset=function(x){if(!(this.contextMenuPending||this.composing)){var z=this.cm;if(z.somethingSelected()){this.prevInput="";var ie=z.getSelection();this.textarea.value=ie,z.state.focused&&lt(this.textarea),fe&&he>=9&&(this.hasSelection=ie)}else x||(this.prevInput=this.textarea.value="",fe&&he>=9&&(this.hasSelection=null))}},wa.prototype.getField=function(){return this.textarea},wa.prototype.supportsTouch=function(){return!1},wa.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!we||ct()!=this.textarea))try{this.textarea.focus()}catch(x){}},wa.prototype.blur=function(){this.textarea.blur()},wa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},wa.prototype.receivedFocus=function(){this.slowPoll()},wa.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},wa.prototype.fastPoll=function(){var x=!1,z=this;z.pollingFast=!0;function ie(){var re=z.poll();!re&&!x?(x=!0,z.polling.set(60,ie)):(z.pollingFast=!1,z.slowPoll())}z.polling.set(20,ie)},wa.prototype.poll=function(){var x=this,z=this.cm,ie=this.textarea,re=this.prevInput;if(this.contextMenuPending||!z.state.focused||or(ie)&&!re&&!this.composing||z.isReadOnly()||z.options.disableInput||z.state.keySeq)return!1;var de=ie.value;if(de==re&&!z.somethingSelected())return!1;if(fe&&he>=9&&this.hasSelection===de||Be&&/[\uf700-\uf7ff]/.test(de))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var Pe=de.charCodeAt(0);if(Pe==8203&&!re&&(re="\u200B"),Pe==8666)return this.reset(),this.cm.execCommand("undo")}for(var tt=0,ft=Math.min(re.length,de.length);tt<ft&&re.charCodeAt(tt)==de.charCodeAt(tt);)++tt;return Ge(z,function(){Pd(z,de.slice(tt),re.length-tt,null,x.composing?"*compose":null),de.length>1e3||de.indexOf(`
`)>-1?ie.value=x.prevInput="":x.prevInput=de,x.composing&&(x.composing.range.clear(),x.composing.range=z.markText(x.composing.start,z.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},wa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},wa.prototype.onKeyPress=function(){fe&&he>=9&&(this.hasSelection=null),this.fastPoll()},wa.prototype.onContextMenu=function(x){var z=this,ie=z.cm,re=ie.display,de=z.textarea;z.contextMenuPending&&z.contextMenuPending();var Pe=Ws(ie,x),tt=re.scroller.scrollTop;if(!Pe||ve)return;var ft=ie.options.resetSelectionOnContextMenu;ft&&ie.doc.sel.contains(Pe)==-1&&st(ie,$o)(ie.doc,xr(Pe),_t);var yt=de.style.cssText,Et=z.wrapper.style.cssText,an=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",de.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(x.clientY-an.top-5)+"px; left: "+(x.clientX-an.left-5)+`px;
z-index: 1000; background: `+(fe?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var xn;ce&&(xn=window.scrollY),re.input.focus(),ce&&window.scrollTo(null,xn),re.input.reset(),ie.somethingSelected()||(de.value=z.prevInput=" "),z.contextMenuPending=Pn,re.selForContextMenu=ie.doc.sel,clearTimeout(re.detectingSelectAll);function Fn(){if(de.selectionStart!=null){var Rr=ie.somethingSelected(),ai="\u200B"+(Rr?de.value:"");de.value="\u21DA",de.value=ai,z.prevInput=Rr?"":"\u200B",de.selectionStart=1,de.selectionEnd=ai.length,re.selForContextMenu=ie.doc.sel}}function Pn(){if(z.contextMenuPending==Pn&&(z.contextMenuPending=!1,z.wrapper.style.cssText=Et,de.style.cssText=yt,fe&&he<9&&re.scrollbars.setScrollTop(re.scroller.scrollTop=tt),de.selectionStart!=null)){(!fe||fe&&he<9)&&Fn();var Rr=0,ai=function(){re.selForContextMenu==ie.doc.sel&&de.selectionStart==0&&de.selectionEnd>0&&z.prevInput=="\u200B"?st(ie,Is)(ie):Rr++<10?re.detectingSelectAll=setTimeout(ai,500):(re.selForContextMenu=null,re.input.reset())};re.detectingSelectAll=setTimeout(ai,200)}}if(fe&&he>=9&&Fn(),Re){vr(x);var hr=function(){At(window,"mouseup",hr),setTimeout(Pn,20)};Qt(window,"mouseup",hr)}else setTimeout(Pn,50)},wa.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},wa.prototype.setUneditable=function(){},wa.prototype.needsContentAttribute=!1;function nu(x,z){if(z=z?St(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 ie=ct();z.autofocus=ie==x||x.getAttribute("autofocus")!=null&&ie==document.body}function re(){x.value=ft.getValue()}var de;if(x.form&&(Qt(x.form,"submit",re),!z.leaveSubmitMethodAlone)){var Pe=x.form;de=Pe.submit;try{var tt=Pe.submit=function(){re(),Pe.submit=de,Pe.submit(),Pe.submit=tt}}catch(yt){}}z.finishInit=function(yt){yt.save=re,yt.getTextArea=function(){return x},yt.toTextArea=function(){yt.toTextArea=isNaN,re(),x.parentNode.removeChild(yt.getWrapperElement()),x.style.display="",x.form&&(At(x.form,"submit",re),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=de))}},x.style.display="none";var ft=ho(function(yt){return x.parentNode.insertBefore(yt,x.nextSibling)},z);return ft}function wu(x){x.off=At,x.on=Qt,x.wheelEventPixels=pi,x.Doc=Ha,x.splitLines=si,x.countColumn=qe,x.findColumn=yn,x.isWordChar=Te,x.Pass=Kt,x.signal=Lt,x.Line=Kr,x.changeEnd=mi,x.scrollbarModel=eu,x.Pos=Rt,x.cmpPos=Vt,x.modes=Li,x.mimeModes=ui,x.resolveMode=Cn,x.getMode=Ee,x.modeExtensions=je,x.extendMode=Oe,x.copyState=De,x.startState=et,x.innerMode=Ke,x.commands=Os,x.keyMap=ma,x.keyName=ql,x.isModifierKey=tu,x.lookupKey=jl,x.normalizeKeyMap=_u,x.StringStream=rt,x.SharedTextMarker=ko,x.TextMarker=sc,x.LineWidget=ls,x.e_preventDefault=zn,x.e_stopPropagation=qn,x.e_stop=vr,x.addClass=Ot,x.contains=Tt,x.rmClass=Ie,x.keyNames=gl}af(ho),zd(ho);var Ec="iter insert remove copy getEditor constructor".split(" ");for(var Wl in Ha.prototype)Ha.prototype.hasOwnProperty(Wl)&&wt(Ec,Wl)<0&&(ho.prototype[Wl]=function(x){return function(){return x.apply(this.doc,arguments)}}(Ha.prototype[Wl]));return On(Ha),ho.inputStyles={textarea:wa,contenteditable:Sa},ho.defineMode=function(x){!ho.defaults.mode&&x!="null"&&(ho.defaults.mode=x),dr.apply(this,arguments)},ho.defineMIME=Hr,ho.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),ho.defineMIME("text/plain","null"),ho.defineExtension=function(x,z){ho.prototype[x]=z},ho.defineDocExtension=function(x,z){Ha.prototype[x]=z},ho.fromTextArea=nu,wu(ho),ho.version="5.58.2",ho})},25419:function(gn,kt,ee){(function(ne){ne(ee(89780),ee(15525),ee(98101))})(function(ne){"use strict";ne.defineMode("markdown",function(xe,Me){var Ce=ne.getMode(xe,"text/html"),fe=Ce.name=="null";function he(qe){if(ne.findModeByName){var Ze=ne.findModeByName(qe);Ze&&(qe=Ze.mime||Ze.mimes[0])}var wt=ne.getMode(xe,qe);return wt.name=="null"?null:wt}Me.highlightFormatting===void 0&&(Me.highlightFormatting=!1),Me.maxBlockquoteDepth===void 0&&(Me.maxBlockquoteDepth=0),Me.taskLists===void 0&&(Me.taskLists=!1),Me.strikethrough===void 0&&(Me.strikethrough=!1),Me.emoji===void 0&&(Me.emoji=!1),Me.fencedCodeBlockHighlighting===void 0&&(Me.fencedCodeBlockHighlighting=!0),Me.fencedCodeBlockDefaultMode===void 0&&(Me.fencedCodeBlockDefaultMode="text/plain"),Me.xml===void 0&&(Me.xml=!0),Me.tokenTypeOverrides===void 0&&(Me.tokenTypeOverrides={});var ce={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 ae in ce)ce.hasOwnProperty(ae)&&Me.tokenTypeOverrides[ae]&&(ce[ae]=Me.tokenTypeOverrides[ae]);var se=/^([*\-_])(?:\s*\1){2,}\s*$/,ve=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ue=/^\[(x| )\](?=\s)/i,pe=Me.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,oe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ge=/^[^#!\[\]*_\\<>` "'(~:]+/,ye=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,we=/^\s*\[[^\]]+?\]:.*$/,Be=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ze=" ";function $e(qe,Ze,wt){return Ze.f=Ze.inline=wt,wt(qe,Ze)}function Le(qe,Ze,wt){return Ze.f=Ze.block=wt,wt(qe,Ze)}function Ne(qe){return!qe||!/\S/.test(qe.string)}function Re(qe){if(qe.linkTitle=!1,qe.linkHref=!1,qe.linkText=!1,qe.em=!1,qe.strong=!1,qe.strikethrough=!1,qe.quote=0,qe.indentedCode=!1,qe.f==Ie){var Ze=fe;if(!Ze){var wt=ne.innerMode(Ce,qe.htmlState);Ze=wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText}Ze&&(qe.f=gt,qe.block=Se,qe.htmlState=null)}return qe.trailingSpace=0,qe.trailingSpaceNewLine=!1,qe.prevLine=qe.thisLine,qe.thisLine={stream:null},null}function Se(qe,Ze){var wt=qe.column()===Ze.indentation,Wt=Ne(Ze.prevLine.stream),Kt=Ze.indentedCode,_t=Ze.prevLine.hr,vt=Ze.list!==!1,jt=(Ze.listStack[Ze.listStack.length-1]||0)+3;Ze.indentedCode=!1;var yn=Ze.indentation;if(Ze.indentationDiff===null&&(Ze.indentationDiff=Ze.indentation,vt)){for(Ze.list=null;yn<Ze.listStack[Ze.listStack.length-1];)Ze.listStack.pop(),Ze.listStack.length?Ze.indentation=Ze.listStack[Ze.listStack.length-1]:Ze.list=!1;Ze.list!==!1&&(Ze.indentationDiff=yn-Ze.listStack[Ze.listStack.length-1])}var Xt=!Wt&&!_t&&!Ze.prevLine.header&&(!vt||!Kt)&&!Ze.prevLine.fencedCodeEnd,Ln=(Ze.list===!1||_t||Wt)&&Ze.indentation<=jt&&qe.match(se),pn=null;if(Ze.indentationDiff>=4&&(Kt||Ze.prevLine.fencedCodeEnd||Ze.prevLine.header||Wt))return qe.skipToEnd(),Ze.indentedCode=!0,ce.code;if(qe.eatSpace())return null;if(wt&&Ze.indentation<=jt&&(pn=qe.match(pe))&&pn[1].length<=6)return Ze.quote=0,Ze.header=pn[1].length,Ze.thisLine.header=!0,Me.highlightFormatting&&(Ze.formatting="header"),Ze.f=Ze.inline,it(Ze);if(Ze.indentation<=jt&&qe.eat(">"))return Ze.quote=wt?1:Ze.quote+1,Me.highlightFormatting&&(Ze.formatting="quote"),qe.eatSpace(),it(Ze);if(!Ln&&!Ze.setext&&wt&&Ze.indentation<=jt&&(pn=qe.match(ve))){var hn=pn[1]?"ol":"ul";return Ze.indentation=yn+qe.current().length,Ze.list=!0,Ze.quote=0,Ze.listStack.push(Ze.indentation),Ze.em=!1,Ze.strong=!1,Ze.code=!1,Ze.strikethrough=!1,Me.taskLists&&qe.match(ue,!1)&&(Ze.taskList=!0),Ze.f=Ze.inline,Me.highlightFormatting&&(Ze.formatting=["list","list-"+hn]),it(Ze)}else{if(wt&&Ze.indentation<=jt&&(pn=qe.match(ye,!0)))return Ze.quote=0,Ze.fencedEndRE=new RegExp(pn[1]+"+ *$"),Ze.localMode=Me.fencedCodeBlockHighlighting&&he(pn[2]||Me.fencedCodeBlockDefaultMode),Ze.localMode&&(Ze.localState=ne.startState(Ze.localMode)),Ze.f=Ze.block=Ae,Me.highlightFormatting&&(Ze.formatting="code-block"),Ze.code=-1,it(Ze);if(Ze.setext||(!Xt||!vt)&&!Ze.quote&&Ze.list===!1&&!Ze.code&&!Ln&&!we.test(qe.string)&&(pn=qe.lookAhead(1))&&(pn=pn.match(oe)))return Ze.setext?(Ze.header=Ze.setext,Ze.setext=0,qe.skipToEnd(),Me.highlightFormatting&&(Ze.formatting="header")):(Ze.header=pn[0].charAt(0)=="="?1:2,Ze.setext=Ze.header),Ze.thisLine.header=!0,Ze.f=Ze.inline,it(Ze);if(Ln)return qe.skipToEnd(),Ze.hr=!0,Ze.thisLine.hr=!0,ce.hr;if(qe.peek()==="[")return $e(qe,Ze,We)}return $e(qe,Ze,Ze.inline)}function Ie(qe,Ze){var wt=Ce.token(qe,Ze.htmlState);if(!fe){var Wt=ne.innerMode(Ce,Ze.htmlState);(Wt.mode.name=="xml"&&Wt.state.tagStart===null&&!Wt.state.context&&Wt.state.tokenize.isInText||Ze.md_inside&&qe.current().indexOf(">")>-1)&&(Ze.f=gt,Ze.block=Se,Ze.htmlState=null)}return wt}function Ae(qe,Ze){var wt=Ze.listStack[Ze.listStack.length-1]||0,Wt=Ze.indentation<wt,Kt=wt+3;if(Ze.fencedEndRE&&Ze.indentation<=Kt&&(Wt||qe.match(Ze.fencedEndRE))){Me.highlightFormatting&&(Ze.formatting="code-block");var _t;return Wt||(_t=it(Ze)),Ze.localMode=Ze.localState=null,Ze.block=Se,Ze.f=gt,Ze.fencedEndRE=null,Ze.code=0,Ze.thisLine.fencedCodeEnd=!0,Wt?Le(qe,Ze,Ze.block):_t}else return Ze.localMode?Ze.localMode.token(qe,Ze.localState):(qe.skipToEnd(),ce.code)}function it(qe){var Ze=[];if(qe.formatting){Ze.push(ce.formatting),typeof qe.formatting=="string"&&(qe.formatting=[qe.formatting]);for(var wt=0;wt<qe.formatting.length;wt++)Ze.push(ce.formatting+"-"+qe.formatting[wt]),qe.formatting[wt]==="header"&&Ze.push(ce.formatting+"-"+qe.formatting[wt]+"-"+qe.header),qe.formatting[wt]==="quote"&&(!Me.maxBlockquoteDepth||Me.maxBlockquoteDepth>=qe.quote?Ze.push(ce.formatting+"-"+qe.formatting[wt]+"-"+qe.quote):Ze.push("error"))}if(qe.taskOpen)return Ze.push("meta"),Ze.length?Ze.join(" "):null;if(qe.taskClosed)return Ze.push("property"),Ze.length?Ze.join(" "):null;if(qe.linkHref?Ze.push(ce.linkHref,"url"):(qe.strong&&Ze.push(ce.strong),qe.em&&Ze.push(ce.em),qe.strikethrough&&Ze.push(ce.strikethrough),qe.emoji&&Ze.push(ce.emoji),qe.linkText&&Ze.push(ce.linkText),qe.code&&Ze.push(ce.code),qe.image&&Ze.push(ce.image),qe.imageAltText&&Ze.push(ce.imageAltText,"link"),qe.imageMarker&&Ze.push(ce.imageMarker)),qe.header&&Ze.push(ce.header,ce.header+"-"+qe.header),qe.quote&&(Ze.push(ce.quote),!Me.maxBlockquoteDepth||Me.maxBlockquoteDepth>=qe.quote?Ze.push(ce.quote+"-"+qe.quote):Ze.push(ce.quote+"-"+Me.maxBlockquoteDepth)),qe.list!==!1){var Wt=(qe.listStack.length-1)%3;Wt?Wt===1?Ze.push(ce.list2):Ze.push(ce.list3):Ze.push(ce.list1)}return qe.trailingSpaceNewLine?Ze.push("trailing-space-new-line"):qe.trailingSpace&&Ze.push("trailing-space-"+(qe.trailingSpace%2?"a":"b")),Ze.length?Ze.join(" "):null}function Ue(qe,Ze){if(qe.match(ge,!0))return it(Ze)}function gt(qe,Ze){var wt=Ze.text(qe,Ze);if(typeof wt!="undefined")return wt;if(Ze.list)return Ze.list=null,it(Ze);if(Ze.taskList){var Wt=qe.match(ue,!0)[1]===" ";return Wt?Ze.taskOpen=!0:Ze.taskClosed=!0,Me.highlightFormatting&&(Ze.formatting="task"),Ze.taskList=!1,it(Ze)}if(Ze.taskOpen=!1,Ze.taskClosed=!1,Ze.header&&qe.match(/^#+$/,!0))return Me.highlightFormatting&&(Ze.formatting="header"),it(Ze);var Kt=qe.next();if(Ze.linkTitle){Ze.linkTitle=!1;var _t=Kt;Kt==="("&&(_t=")"),_t=(_t+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var vt="^\\s*(?:[^"+_t+"\\\\]+|\\\\\\\\|\\\\.)"+_t;if(qe.match(new RegExp(vt),!0))return ce.linkHref}if(Kt==="`"){var jt=Ze.formatting;Me.highlightFormatting&&(Ze.formatting="code"),qe.eatWhile("`");var yn=qe.current().length;if(Ze.code==0&&(!Ze.quote||yn==1))return Ze.code=yn,it(Ze);if(yn==Ze.code){var Xt=it(Ze);return Ze.code=0,Xt}else return Ze.formatting=jt,it(Ze)}else if(Ze.code)return it(Ze);if(Kt==="\\"&&(qe.next(),Me.highlightFormatting)){var Ln=it(Ze),pn=ce.formatting+"-escape";return Ln?Ln+" "+pn:pn}if(Kt==="!"&&qe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ze.imageMarker=!0,Ze.image=!0,Me.highlightFormatting&&(Ze.formatting="image"),it(Ze);if(Kt==="["&&Ze.imageMarker&&qe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ze.imageMarker=!1,Ze.imageAltText=!0,Me.highlightFormatting&&(Ze.formatting="image"),it(Ze);if(Kt==="]"&&Ze.imageAltText){Me.highlightFormatting&&(Ze.formatting="image");var Ln=it(Ze);return Ze.imageAltText=!1,Ze.image=!1,Ze.inline=Ze.f=Tt,Ln}if(Kt==="["&&!Ze.image)return Ze.linkText&&qe.match(/^.*?\]/)||(Ze.linkText=!0,Me.highlightFormatting&&(Ze.formatting="link")),it(Ze);if(Kt==="]"&&Ze.linkText){Me.highlightFormatting&&(Ze.formatting="link");var Ln=it(Ze);return Ze.linkText=!1,Ze.inline=Ze.f=qe.match(/\(.*?\)| ?\[.*?\]/,!1)?Tt:gt,Ln}if(Kt==="<"&&qe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ze.f=Ze.inline=Ve,Me.highlightFormatting&&(Ze.formatting="link");var Ln=it(Ze);return Ln?Ln+=" ":Ln="",Ln+ce.linkInline}if(Kt==="<"&&qe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ze.f=Ze.inline=Ve,Me.highlightFormatting&&(Ze.formatting="link");var Ln=it(Ze);return Ln?Ln+=" ":Ln="",Ln+ce.linkEmail}if(Me.xml&&Kt==="<"&&qe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var hn=qe.string.indexOf(">",qe.pos);if(hn!=-1){var un=qe.string.substring(qe.start,hn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(un)&&(Ze.md_inside=!0)}return qe.backUp(1),Ze.htmlState=ne.startState(Ce),Le(qe,Ze,Ie)}if(Me.xml&&Kt==="<"&&qe.match(/^\/\w*?>/))return Ze.md_inside=!1,"tag";if(Kt==="*"||Kt==="_"){for(var Xe=1,ke=qe.pos==1?" ":qe.string.charAt(qe.pos-2);Xe<3&&qe.eat(Kt);)Xe++;var _e=qe.peek()||" ",Te=!/\s/.test(_e)&&(!Be.test(_e)||/\s/.test(ke)||Be.test(ke)),Fe=!/\s/.test(ke)&&(!Be.test(ke)||/\s/.test(_e)||Be.test(_e)),me=null,at=null;if(Xe%2&&(!Ze.em&&Te&&(Kt==="*"||!Fe||Be.test(ke))?me=!0:Ze.em==Kt&&Fe&&(Kt==="*"||!Te||Be.test(_e))&&(me=!1)),Xe>1&&(!Ze.strong&&Te&&(Kt==="*"||!Fe||Be.test(ke))?at=!0:Ze.strong==Kt&&Fe&&(Kt==="*"||!Te||Be.test(_e))&&(at=!1)),at!=null||me!=null){Me.highlightFormatting&&(Ze.formatting=me==null?"strong":at==null?"em":"strong em"),me===!0&&(Ze.em=Kt),at===!0&&(Ze.strong=Kt);var Xt=it(Ze);return me===!1&&(Ze.em=!1),at===!1&&(Ze.strong=!1),Xt}}else if(Kt===" "&&(qe.eat("*")||qe.eat("_"))){if(qe.peek()===" ")return it(Ze);qe.backUp(1)}if(Me.strikethrough){if(Kt==="~"&&qe.eatWhile(Kt)){if(Ze.strikethrough){Me.highlightFormatting&&(Ze.formatting="strikethrough");var Xt=it(Ze);return Ze.strikethrough=!1,Xt}else if(qe.match(/^[^\s]/,!1))return Ze.strikethrough=!0,Me.highlightFormatting&&(Ze.formatting="strikethrough"),it(Ze)}else if(Kt===" "&&qe.match(/^~~/,!0)){if(qe.peek()===" ")return it(Ze);qe.backUp(2)}}if(Me.emoji&&Kt===":"&&qe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ze.emoji=!0,Me.highlightFormatting&&(Ze.formatting="emoji");var Pt=it(Ze);return Ze.emoji=!1,Pt}return Kt===" "&&(qe.match(/^ +$/,!1)?Ze.trailingSpace++:Ze.trailingSpace&&(Ze.trailingSpaceNewLine=!0)),it(Ze)}function Ve(qe,Ze){var wt=qe.next();if(wt===">"){Ze.f=Ze.inline=gt,Me.highlightFormatting&&(Ze.formatting="link");var Wt=it(Ze);return Wt?Wt+=" ":Wt="",Wt+ce.linkInline}return qe.match(/^[^>]+/,!0),ce.linkInline}function Tt(qe,Ze){if(qe.eatSpace())return null;var wt=qe.next();return wt==="("||wt==="["?(Ze.f=Ze.inline=Ot(wt==="("?")":"]"),Me.highlightFormatting&&(Ze.formatting="link-string"),Ze.linkHref=!0,it(Ze)):"error"}var ct={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ot(qe){return function(Ze,wt){var Wt=Ze.next();if(Wt===qe){wt.f=wt.inline=gt,Me.highlightFormatting&&(wt.formatting="link-string");var Kt=it(wt);return wt.linkHref=!1,Kt}return Ze.match(ct[qe]),wt.linkHref=!0,it(wt)}}function We(qe,Ze){return qe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ze.f=lt,qe.next(),Me.highlightFormatting&&(Ze.formatting="link"),Ze.linkText=!0,it(Ze)):$e(qe,Ze,gt)}function lt(qe,Ze){if(qe.match(/^\]:/,!0)){Ze.f=Ze.inline=ut,Me.highlightFormatting&&(Ze.formatting="link");var wt=it(Ze);return Ze.linkText=!1,wt}return qe.match(/^([^\]\\]|\\.)+/,!0),ce.linkText}function ut(qe,Ze){return qe.eatSpace()?null:(qe.match(/^[^\s]+/,!0),qe.peek()===void 0?Ze.linkTitle=!0:qe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ze.f=Ze.inline=gt,ce.linkHref+" url")}var St={startState:function(){return{f:Se,prevLine:{stream:null},thisLine:{stream:null},block:Se,htmlState:null,indentation:0,inline:gt,text:Ue,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(qe){return{f:qe.f,prevLine:qe.prevLine,thisLine:qe.thisLine,block:qe.block,htmlState:qe.htmlState&&ne.copyState(Ce,qe.htmlState),indentation:qe.indentation,localMode:qe.localMode,localState:qe.localMode?ne.copyState(qe.localMode,qe.localState):null,inline:qe.inline,text:qe.text,formatting:!1,linkText:qe.linkText,linkTitle:qe.linkTitle,linkHref:qe.linkHref,code:qe.code,em:qe.em,strong:qe.strong,strikethrough:qe.strikethrough,emoji:qe.emoji,header:qe.header,setext:qe.setext,hr:qe.hr,taskList:qe.taskList,list:qe.list,listStack:qe.listStack.slice(0),quote:qe.quote,indentedCode:qe.indentedCode,trailingSpace:qe.trailingSpace,trailingSpaceNewLine:qe.trailingSpaceNewLine,md_inside:qe.md_inside,fencedEndRE:qe.fencedEndRE}},token:function(qe,Ze){if(Ze.formatting=!1,qe!=Ze.thisLine.stream){if(Ze.header=0,Ze.hr=!1,qe.match(/^\s*$/,!0))return Re(Ze),null;if(Ze.prevLine=Ze.thisLine,Ze.thisLine={stream:qe},Ze.taskList=!1,Ze.trailingSpace=0,Ze.trailingSpaceNewLine=!1,!Ze.localState&&(Ze.f=Ze.block,Ze.f!=Ie)){var wt=qe.match(/^\s*/,!0)[0].replace(/\t/g,ze).length;if(Ze.indentation=wt,Ze.indentationDiff=null,wt>0)return null}}return Ze.f(qe,Ze)},innerMode:function(qe){return qe.block==Ie?{state:qe.htmlState,mode:Ce}:qe.localState?{state:qe.localState,mode:qe.localMode}:{state:qe,mode:St}},indent:function(qe,Ze,wt){return qe.block==Ie&&Ce.indent?Ce.indent(qe.htmlState,Ze,wt):qe.localState&&qe.localMode.indent?qe.localMode.indent(qe.localState,Ze,wt):ne.Pass},blankLine:Re,getType:it,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return St},"xml"),ne.defineMIME("text/markdown","markdown"),ne.defineMIME("text/x-markdown","markdown")})},98101:function(gn,kt,ee){(function(ne){ne(ee(89780))})(function(ne){"use strict";ne.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 xe=0;xe<ne.modeInfo.length;xe++){var Me=ne.modeInfo[xe];Me.mimes&&(Me.mime=Me.mimes[0])}ne.findModeByMIME=function(Ce){Ce=Ce.toLowerCase();for(var fe=0;fe<ne.modeInfo.length;fe++){var he=ne.modeInfo[fe];if(he.mime==Ce)return he;if(he.mimes){for(var ce=0;ce<he.mimes.length;ce++)if(he.mimes[ce]==Ce)return he}}if(/\+xml$/.test(Ce))return ne.findModeByMIME("application/xml");if(/\+json$/.test(Ce))return ne.findModeByMIME("application/json")},ne.findModeByExtension=function(Ce){Ce=Ce.toLowerCase();for(var fe=0;fe<ne.modeInfo.length;fe++){var he=ne.modeInfo[fe];if(he.ext){for(var ce=0;ce<he.ext.length;ce++)if(he.ext[ce]==Ce)return he}}},ne.findModeByFileName=function(Ce){for(var fe=0;fe<ne.modeInfo.length;fe++){var he=ne.modeInfo[fe];if(he.file&&he.file.test(Ce))return he}var ce=Ce.lastIndexOf("."),ae=ce>-1&&Ce.substring(ce+1,Ce.length);if(ae)return ne.findModeByExtension(ae)},ne.findModeByName=function(Ce){Ce=Ce.toLowerCase();for(var fe=0;fe<ne.modeInfo.length;fe++){var he=ne.modeInfo[fe];if(he.name.toLowerCase()==Ce)return he;if(he.alias){for(var ce=0;ce<he.alias.length;ce++)if(he.alias[ce].toLowerCase()==Ce)return he}}}})},67549:function(gn,kt,ee){(function(ne){ne(ee(89780))})(function(ne){"use strict";ne.defineMode("stex",function(xe,Me){"use strict";function Ce(ge,ye){ge.cmdState.push(ye)}function fe(ge){return ge.cmdState.length>0?ge.cmdState[ge.cmdState.length-1]:null}function he(ge){var ye=ge.cmdState.pop();ye&&ye.closeBracket()}function ce(ge){for(var ye=ge.cmdState,we=ye.length-1;we>=0;we--){var Be=ye[we];if(Be.name!="DEFAULT")return Be}return{styleIdentifier:function(){return null}}}function ae(ge,ye,we){return function(){this.name=ge,this.bracketNo=0,this.style=ye,this.styles=we,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var se={};se.importmodule=ae("importmodule","tag",["string","builtin"]),se.documentclass=ae("documentclass","tag",["","atom"]),se.usepackage=ae("usepackage","tag",["atom"]),se.begin=ae("begin","tag",["atom"]),se.end=ae("end","tag",["atom"]),se.label=ae("label","tag",["atom"]),se.ref=ae("ref","tag",["atom"]),se.eqref=ae("eqref","tag",["atom"]),se.cite=ae("cite","tag",["atom"]),se.bibitem=ae("bibitem","tag",["atom"]),se.Bibitem=ae("Bibitem","tag",["atom"]),se.RBibitem=ae("RBibitem","tag",["atom"]),se.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ve(ge,ye){ge.f=ye}function ue(ge,ye){var we;if(ge.match(/^\\[a-zA-Z@]+/)){var Be=ge.current().slice(1);return we=se.hasOwnProperty(Be)?se[Be]:se.DEFAULT,we=new we,Ce(ye,we),ve(ye,oe),we.style}if(ge.match(/^\\[$&%#{}_]/)||ge.match(/^\\[,;!\/\\]/))return"tag";if(ge.match("\\["))return ve(ye,function($e,Le){return pe($e,Le,"\\]")}),"keyword";if(ge.match("\\("))return ve(ye,function($e,Le){return pe($e,Le,"\\)")}),"keyword";if(ge.match("$$"))return ve(ye,function($e,Le){return pe($e,Le,"$$")}),"keyword";if(ge.match("$"))return ve(ye,function($e,Le){return pe($e,Le,"$")}),"keyword";var ze=ge.next();if(ze=="%")return ge.skipToEnd(),"comment";if(ze=="}"||ze=="]"){if(we=fe(ye),we)we.closeBracket(ze),ve(ye,oe);else return"error";return"bracket"}else return ze=="{"||ze=="["?(we=se.DEFAULT,we=new we,Ce(ye,we),"bracket"):/\d/.test(ze)?(ge.eatWhile(/[\w.%]/),"atom"):(ge.eatWhile(/[\w\-_]/),we=ce(ye),we.name=="begin"&&(we.argument=ge.current()),we.styleIdentifier())}function pe(ge,ye,we){if(ge.eatSpace())return null;if(we&&ge.match(we))return ve(ye,ue),"keyword";if(ge.match(/^\\[a-zA-Z@]+/))return"tag";if(ge.match(/^[a-zA-Z]+/))return"variable-2";if(ge.match(/^\\[$&%#{}_]/)||ge.match(/^\\[,;!\/]/)||ge.match(/^[\^_&]/))return"tag";if(ge.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ge.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Be=ge.next();return Be=="{"||Be=="}"||Be=="["||Be=="]"||Be=="("||Be==")"?"bracket":Be=="%"?(ge.skipToEnd(),"comment"):"error"}function oe(ge,ye){var we=ge.peek(),Be;return we=="{"||we=="["?(Be=fe(ye),Be.openBracket(we),ge.eat(we),ve(ye,ue),"bracket"):/[ \t\r]/.test(we)?(ge.eat(we),null):(ve(ye,ue),he(ye),ue(ge,ye))}return{startState:function(){var ge=Me.inMathMode?function(ye,we){return pe(ye,we)}:ue;return{cmdState:[],f:ge}},copyState:function(ge){return{cmdState:ge.cmdState.slice(),f:ge.f}},token:function(ge,ye){return ye.f(ge,ye)},blankLine:function(ge){ge.f=ue,ge.cmdState.length=0},lineComment:"%"}}),ne.defineMIME("text/x-stex","stex"),ne.defineMIME("text/x-latex","stex")})},15525:function(gn,kt,ee){(function(ne){ne(ee(89780))})(function(ne){"use strict";var xe={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Me={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ne.defineMode("xml",function(Ce,fe){var he=Ce.indentUnit,ce={},ae=fe.htmlMode?xe:Me;for(var se in ae)ce[se]=ae[se];for(var se in fe)ce[se]=fe[se];var ve,ue;function pe(Ve,Tt){function ct(lt){return Tt.tokenize=lt,lt(Ve,Tt)}var Ot=Ve.next();if(Ot=="<")return Ve.eat("!")?Ve.eat("[")?Ve.match("CDATA[")?ct(ye("atom","]]>")):null:Ve.match("--")?ct(ye("comment","-->")):Ve.match("DOCTYPE",!0,!0)?(Ve.eatWhile(/[\w\._\-]/),ct(we(1))):null:Ve.eat("?")?(Ve.eatWhile(/[\w\._\-]/),Tt.tokenize=ye("meta","?>"),"meta"):(ve=Ve.eat("/")?"closeTag":"openTag",Tt.tokenize=oe,"tag bracket");if(Ot=="&"){var We;return Ve.eat("#")?Ve.eat("x")?We=Ve.eatWhile(/[a-fA-F\d]/)&&Ve.eat(";"):We=Ve.eatWhile(/[\d]/)&&Ve.eat(";"):We=Ve.eatWhile(/[\w\.\-:]/)&&Ve.eat(";"),We?"atom":"error"}else return Ve.eatWhile(/[^&<]/),null}pe.isInText=!0;function oe(Ve,Tt){var ct=Ve.next();if(ct==">"||ct=="/"&&Ve.eat(">"))return Tt.tokenize=pe,ve=ct==">"?"endTag":"selfcloseTag","tag bracket";if(ct=="=")return ve="equals",null;if(ct=="<"){Tt.tokenize=pe,Tt.state=Le,Tt.tagName=Tt.tagStart=null;var Ot=Tt.tokenize(Ve,Tt);return Ot?Ot+" tag error":"tag error"}else return/[\'\"]/.test(ct)?(Tt.tokenize=ge(ct),Tt.stringStartCol=Ve.column(),Tt.tokenize(Ve,Tt)):(Ve.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ge(Ve){var Tt=function(ct,Ot){for(;!ct.eol();)if(ct.next()==Ve){Ot.tokenize=oe;break}return"string"};return Tt.isInAttribute=!0,Tt}function ye(Ve,Tt){return function(ct,Ot){for(;!ct.eol();){if(ct.match(Tt)){Ot.tokenize=pe;break}ct.next()}return Ve}}function we(Ve){return function(Tt,ct){for(var Ot;(Ot=Tt.next())!=null;){if(Ot=="<")return ct.tokenize=we(Ve+1),ct.tokenize(Tt,ct);if(Ot==">")if(Ve==1){ct.tokenize=pe;break}else return ct.tokenize=we(Ve-1),ct.tokenize(Tt,ct)}return"meta"}}function Be(Ve,Tt,ct){this.prev=Ve.context,this.tagName=Tt,this.indent=Ve.indented,this.startOfLine=ct,(ce.doNotIndent.hasOwnProperty(Tt)||Ve.context&&Ve.context.noIndent)&&(this.noIndent=!0)}function ze(Ve){Ve.context&&(Ve.context=Ve.context.prev)}function $e(Ve,Tt){for(var ct;;){if(!Ve.context||(ct=Ve.context.tagName,!ce.contextGrabbers.hasOwnProperty(ct)||!ce.contextGrabbers[ct].hasOwnProperty(Tt)))return;ze(Ve)}}function Le(Ve,Tt,ct){return Ve=="openTag"?(ct.tagStart=Tt.column(),Ne):Ve=="closeTag"?Re:Le}function Ne(Ve,Tt,ct){return Ve=="word"?(ct.tagName=Tt.current(),ue="tag",Ae):ce.allowMissingTagName&&Ve=="endTag"?(ue="tag bracket",Ae(Ve,Tt,ct)):(ue="error",Ne)}function Re(Ve,Tt,ct){if(Ve=="word"){var Ot=Tt.current();return ct.context&&ct.context.tagName!=Ot&&ce.implicitlyClosed.hasOwnProperty(ct.context.tagName)&&ze(ct),ct.context&&ct.context.tagName==Ot||ce.matchClosing===!1?(ue="tag",Se):(ue="tag error",Ie)}else return ce.allowMissingTagName&&Ve=="endTag"?(ue="tag bracket",Se(Ve,Tt,ct)):(ue="error",Ie)}function Se(Ve,Tt,ct){return Ve!="endTag"?(ue="error",Se):(ze(ct),Le)}function Ie(Ve,Tt,ct){return ue="error",Se(Ve,Tt,ct)}function Ae(Ve,Tt,ct){if(Ve=="word")return ue="attribute",it;if(Ve=="endTag"||Ve=="selfcloseTag"){var Ot=ct.tagName,We=ct.tagStart;return ct.tagName=ct.tagStart=null,Ve=="selfcloseTag"||ce.autoSelfClosers.hasOwnProperty(Ot)?$e(ct,Ot):($e(ct,Ot),ct.context=new Be(ct,Ot,We==ct.indented)),Le}return ue="error",Ae}function it(Ve,Tt,ct){return Ve=="equals"?Ue:(ce.allowMissing||(ue="error"),Ae(Ve,Tt,ct))}function Ue(Ve,Tt,ct){return Ve=="string"?gt:Ve=="word"&&ce.allowUnquoted?(ue="string",Ae):(ue="error",Ae(Ve,Tt,ct))}function gt(Ve,Tt,ct){return Ve=="string"?gt:Ae(Ve,Tt,ct)}return{startState:function(Ve){var Tt={tokenize:pe,state:Le,indented:Ve||0,tagName:null,tagStart:null,context:null};return Ve!=null&&(Tt.baseIndent=Ve),Tt},token:function(Ve,Tt){if(!Tt.tagName&&Ve.sol()&&(Tt.indented=Ve.indentation()),Ve.eatSpace())return null;ve=null;var ct=Tt.tokenize(Ve,Tt);return(ct||ve)&&ct!="comment"&&(ue=null,Tt.state=Tt.state(ve||ct,Ve,Tt),ue&&(ct=ue=="error"?ct+" error":ue)),ct},indent:function(Ve,Tt,ct){var Ot=Ve.context;if(Ve.tokenize.isInAttribute)return Ve.tagStart==Ve.indented?Ve.stringStartCol+1:Ve.indented+he;if(Ot&&Ot.noIndent)return ne.Pass;if(Ve.tokenize!=oe&&Ve.tokenize!=pe)return ct?ct.match(/^(\s*)/)[0].length:0;if(Ve.tagName)return ce.multilineTagIndentPastTag!==!1?Ve.tagStart+Ve.tagName.length+2:Ve.tagStart+he*(ce.multilineTagIndentFactor||1);if(ce.alignCDATA&&/<!\[CDATA\[/.test(Tt))return 0;var We=Tt&&/^<(\/)?([\w_:\.-]*)/.exec(Tt);if(We&&We[1])for(;Ot;)if(Ot.tagName==We[2]){Ot=Ot.prev;break}else if(ce.implicitlyClosed.hasOwnProperty(Ot.tagName))Ot=Ot.prev;else break;else if(We)for(;Ot;){var lt=ce.contextGrabbers[Ot.tagName];if(lt&&lt.hasOwnProperty(We[2]))Ot=Ot.prev;else break}for(;Ot&&Ot.prev&&!Ot.startOfLine;)Ot=Ot.prev;return Ot?Ot.indent+he:Ve.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ce.htmlMode?"html":"xml",helperType:ce.htmlMode?"html":"xml",skipAttribute:function(Ve){Ve.state==Ue&&(Ve.state=Ae)},xmlCurrentTag:function(Ve){return Ve.tagName?{name:Ve.tagName,close:Ve.type=="closeTag"}:null},xmlCurrentContext:function(Ve){for(var Tt=[],ct=Ve.context;ct;ct=ct.prev)ct.tagName&&Tt.push(ct.tagName);return Tt.reverse()}}}),ne.defineMIME("text/xml","xml"),ne.defineMIME("application/xml","xml"),ne.mimeModes.hasOwnProperty("text/html")||ne.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function(gn,kt,ee){var ne=ee(97671);(function(xe,Me){gn.exports=Me()})(this,function(){"use strict";function xe(Qe){var Je=typeof Qe;return Qe!==null&&(Je==="object"||Je==="function")}function Me(Qe){return typeof Qe=="function"}var Ce=void 0;Array.isArray?Ce=Array.isArray:Ce=function(Qe){return Object.prototype.toString.call(Qe)==="[object Array]"};var fe=Ce,he=0,ce=void 0,ae=void 0,se=function(Je,xt){Re[he]=Je,Re[he+1]=xt,he+=2,he===2&&(ae?ae(Se):Ae())};function ve(Qe){ae=Qe}function ue(Qe){se=Qe}var pe=typeof window!="undefined"?window:void 0,oe=pe||{},ge=oe.MutationObserver||oe.WebKitMutationObserver,ye=typeof self=="undefined"&&typeof ne!="undefined"&&{}.toString.call(ne)==="[object process]",we=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function Be(){return function(){return ne.nextTick(Se)}}function ze(){return typeof ce!="undefined"?function(){ce(Se)}:Ne()}function $e(){var Qe=0,Je=new ge(Se),xt=document.createTextNode("");return Je.observe(xt,{characterData:!0}),function(){xt.data=Qe=++Qe%2}}function Le(){var Qe=new MessageChannel;return Qe.port1.onmessage=Se,function(){return Qe.port2.postMessage(0)}}function Ne(){var Qe=setTimeout;return function(){return Qe(Se,1)}}var Re=new Array(1e3);function Se(){for(var Qe=0;Qe<he;Qe+=2){var Je=Re[Qe],xt=Re[Qe+1];Je(xt),Re[Qe]=void 0,Re[Qe+1]=void 0}he=0}function Ie(){try{var Qe=Function("return this")().require("vertx");return ce=Qe.runOnLoop||Qe.runOnContext,ze()}catch(Je){return Ne()}}var Ae=void 0;ye?Ae=Be():ge?Ae=$e():we?Ae=Le():pe===void 0?Ae=Ie():Ae=Ne();function it(Qe,Je){var xt=this,ot=new this.constructor(Ve);ot[gt]===void 0&&hn(ot);var mt=xt._state;if(mt){var Nt=arguments[mt-1];se(function(){return yn(mt,ot,Nt,xt._result)})}else vt(xt,ot,Qe,Je);return ot}function Ue(Qe){var Je=this;if(Qe&&typeof Qe=="object"&&Qe.constructor===Je)return Qe;var xt=new Je(Ve);return wt(xt,Qe),xt}var gt=Math.random().toString(36).substring(2);function Ve(){}var Tt=void 0,ct=1,Ot=2;function We(){return new TypeError("You cannot resolve a promise with itself")}function lt(){return new TypeError("A promises callback cannot return that same promise.")}function ut(Qe,Je,xt,ot){try{Qe.call(Je,xt,ot)}catch(mt){return mt}}function St(Qe,Je,xt){se(function(ot){var mt=!1,Nt=ut(xt,Je,function(rn){mt||(mt=!0,Je!==rn?wt(ot,rn):Kt(ot,rn))},function(rn){mt||(mt=!0,_t(ot,rn))},"Settle: "+(ot._label||" unknown promise"));!mt&&Nt&&(mt=!0,_t(ot,Nt))},Qe)}function qe(Qe,Je){Je._state===ct?Kt(Qe,Je._result):Je._state===Ot?_t(Qe,Je._result):vt(Je,void 0,function(xt){return wt(Qe,xt)},function(xt){return _t(Qe,xt)})}function Ze(Qe,Je,xt){Je.constructor===Qe.constructor&&xt===it&&Je.constructor.resolve===Ue?qe(Qe,Je):xt===void 0?Kt(Qe,Je):Me(xt)?St(Qe,Je,xt):Kt(Qe,Je)}function wt(Qe,Je){if(Qe===Je)_t(Qe,We());else if(xe(Je)){var xt=void 0;try{xt=Je.then}catch(ot){_t(Qe,ot);return}Ze(Qe,Je,xt)}else Kt(Qe,Je)}function Wt(Qe){Qe._onerror&&Qe._onerror(Qe._result),jt(Qe)}function Kt(Qe,Je){Qe._state===Tt&&(Qe._result=Je,Qe._state=ct,Qe._subscribers.length!==0&&se(jt,Qe))}function _t(Qe,Je){Qe._state===Tt&&(Qe._state=Ot,Qe._result=Je,se(Wt,Qe))}function vt(Qe,Je,xt,ot){var mt=Qe._subscribers,Nt=mt.length;Qe._onerror=null,mt[Nt]=Je,mt[Nt+ct]=xt,mt[Nt+Ot]=ot,Nt===0&&Qe._state&&se(jt,Qe)}function jt(Qe){var Je=Qe._subscribers,xt=Qe._state;if(Je.length!==0){for(var ot=void 0,mt=void 0,Nt=Qe._result,rn=0;rn<Je.length;rn+=3)ot=Je[rn],mt=Je[rn+xt],ot?yn(xt,ot,mt,Nt):mt(Nt);Qe._subscribers.length=0}}function yn(Qe,Je,xt,ot){var mt=Me(xt),Nt=void 0,rn=void 0,It=!0;if(mt){try{Nt=xt(ot)}catch(Qt){It=!1,rn=Qt}if(Je===Nt){_t(Je,lt());return}}else Nt=ot;Je._state!==Tt||(mt&&It?wt(Je,Nt):It===!1?_t(Je,rn):Qe===ct?Kt(Je,Nt):Qe===Ot&&_t(Je,Nt))}function Xt(Qe,Je){try{Je(function(ot){wt(Qe,ot)},function(ot){_t(Qe,ot)})}catch(xt){_t(Qe,xt)}}var Ln=0;function pn(){return Ln++}function hn(Qe){Qe[gt]=Ln++,Qe._state=void 0,Qe._result=void 0,Qe._subscribers=[]}function un(){return new Error("Array Methods must be provided an Array")}var Xe=function(){function Qe(Je,xt){this._instanceConstructor=Je,this.promise=new Je(Ve),this.promise[gt]||hn(this.promise),fe(xt)?(this.length=xt.length,this._remaining=xt.length,this._result=new Array(this.length),this.length===0?Kt(this.promise,this._result):(this.length=this.length||0,this._enumerate(xt),this._remaining===0&&Kt(this.promise,this._result))):_t(this.promise,un())}return Qe.prototype._enumerate=function(xt){for(var ot=0;this._state===Tt&&ot<xt.length;ot++)this._eachEntry(xt[ot],ot)},Qe.prototype._eachEntry=function(xt,ot){var mt=this._instanceConstructor,Nt=mt.resolve;if(Nt===Ue){var rn=void 0,It=void 0,Qt=!1;try{rn=xt.then}catch(At){Qt=!0,It=At}if(rn===it&&xt._state!==Tt)this._settledAt(xt._state,ot,xt._result);else if(typeof rn!="function")this._remaining--,this._result[ot]=xt;else if(mt===at){var dn=new mt(Ve);Qt?_t(dn,It):Ze(dn,xt,rn),this._willSettleAt(dn,ot)}else this._willSettleAt(new mt(function(At){return At(xt)}),ot)}else this._willSettleAt(Nt(xt),ot)},Qe.prototype._settledAt=function(xt,ot,mt){var Nt=this.promise;Nt._state===Tt&&(this._remaining--,xt===Ot?_t(Nt,mt):this._result[ot]=mt),this._remaining===0&&Kt(Nt,this._result)},Qe.prototype._willSettleAt=function(xt,ot){var mt=this;vt(xt,void 0,function(Nt){return mt._settledAt(ct,ot,Nt)},function(Nt){return mt._settledAt(Ot,ot,Nt)})},Qe}();function ke(Qe){return new Xe(this,Qe).promise}function _e(Qe){var Je=this;return fe(Qe)?new Je(function(xt,ot){for(var mt=Qe.length,Nt=0;Nt<mt;Nt++)Je.resolve(Qe[Nt]).then(xt,ot)}):new Je(function(xt,ot){return ot(new TypeError("You must pass an array to race."))})}function Te(Qe){var Je=this,xt=new Je(Ve);return _t(xt,Qe),xt}function Fe(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function me(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var at=function(){function Qe(Je){this[gt]=pn(),this._result=this._state=void 0,this._subscribers=[],Ve!==Je&&(typeof Je!="function"&&Fe(),this instanceof Qe?Xt(this,Je):me())}return Qe.prototype.catch=function(xt){return this.then(null,xt)},Qe.prototype.finally=function(xt){var ot=this,mt=ot.constructor;return Me(xt)?ot.then(function(Nt){return mt.resolve(xt()).then(function(){return Nt})},function(Nt){return mt.resolve(xt()).then(function(){throw Nt})}):ot.then(xt,xt)},Qe}();at.prototype.then=it,at.all=ke,at.race=_e,at.resolve=Ue,at.reject=Te,at._setScheduler=ve,at._setAsap=ue,at._asap=se;function Pt(){var Qe=void 0;if(typeof ee.g!="undefined")Qe=ee.g;else if(typeof self!="undefined")Qe=self;else try{Qe=Function("return this")()}catch(ot){throw new Error("polyfill failed because global object is unavailable in this environment")}var Je=Qe.Promise;if(Je){var xt=null;try{xt=Object.prototype.toString.call(Je.resolve())}catch(ot){}if(xt==="[object Promise]"&&!Je.cast)return}Qe.Promise=at}return at.polyfill=Pt,at.Promise=at,at})},86204:function(gn){"use strict";var kt=typeof Reflect=="object"?Reflect:null,ee=kt&&typeof kt.apply=="function"?kt.apply:function(Le,Ne,Re){return Function.prototype.apply.call(Le,Ne,Re)},ne;kt&&typeof kt.ownKeys=="function"?ne=kt.ownKeys:Object.getOwnPropertySymbols?ne=function(Le){return Object.getOwnPropertyNames(Le).concat(Object.getOwnPropertySymbols(Le))}:ne=function(Le){return Object.getOwnPropertyNames(Le)};function xe($e){console&&console.warn&&console.warn($e)}var Me=Number.isNaN||function(Le){return Le!==Le};function Ce(){Ce.init.call(this)}gn.exports=Ce,gn.exports.once=we,Ce.EventEmitter=Ce,Ce.prototype._events=void 0,Ce.prototype._eventsCount=0,Ce.prototype._maxListeners=void 0;var fe=10;function he($e){if(typeof $e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof $e)}Object.defineProperty(Ce,"defaultMaxListeners",{enumerable:!0,get:function(){return fe},set:function($e){if(typeof $e!="number"||$e<0||Me($e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+$e+".");fe=$e}}),Ce.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ce.prototype.setMaxListeners=function(Le){if(typeof Le!="number"||Le<0||Me(Le))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Le+".");return this._maxListeners=Le,this};function ce($e){return $e._maxListeners===void 0?Ce.defaultMaxListeners:$e._maxListeners}Ce.prototype.getMaxListeners=function(){return ce(this)},Ce.prototype.emit=function(Le){for(var Ne=[],Re=1;Re<arguments.length;Re++)Ne.push(arguments[Re]);var Se=Le==="error",Ie=this._events;if(Ie!==void 0)Se=Se&&Ie.error===void 0;else if(!Se)return!1;if(Se){var Ae;if(Ne.length>0&&(Ae=Ne[0]),Ae instanceof Error)throw Ae;var it=new Error("Unhandled error."+(Ae?" ("+Ae.message+")":""));throw it.context=Ae,it}var Ue=Ie[Le];if(Ue===void 0)return!1;if(typeof Ue=="function")ee(Ue,this,Ne);else for(var gt=Ue.length,Ve=oe(Ue,gt),Re=0;Re<gt;++Re)ee(Ve[Re],this,Ne);return!0};function ae($e,Le,Ne,Re){var Se,Ie,Ae;if(he(Ne),Ie=$e._events,Ie===void 0?(Ie=$e._events=Object.create(null),$e._eventsCount=0):(Ie.newListener!==void 0&&($e.emit("newListener",Le,Ne.listener?Ne.listener:Ne),Ie=$e._events),Ae=Ie[Le]),Ae===void 0)Ae=Ie[Le]=Ne,++$e._eventsCount;else if(typeof Ae=="function"?Ae=Ie[Le]=Re?[Ne,Ae]:[Ae,Ne]:Re?Ae.unshift(Ne):Ae.push(Ne),Se=ce($e),Se>0&&Ae.length>Se&&!Ae.warned){Ae.warned=!0;var it=new Error("Possible EventEmitter memory leak detected. "+Ae.length+" "+String(Le)+" listeners added. Use emitter.setMaxListeners() to increase limit");it.name="MaxListenersExceededWarning",it.emitter=$e,it.type=Le,it.count=Ae.length,xe(it)}return $e}Ce.prototype.addListener=function(Le,Ne){return ae(this,Le,Ne,!1)},Ce.prototype.on=Ce.prototype.addListener,Ce.prototype.prependListener=function(Le,Ne){return ae(this,Le,Ne,!0)};function se(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ve($e,Le,Ne){var Re={fired:!1,wrapFn:void 0,target:$e,type:Le,listener:Ne},Se=se.bind(Re);return Se.listener=Ne,Re.wrapFn=Se,Se}Ce.prototype.once=function(Le,Ne){return he(Ne),this.on(Le,ve(this,Le,Ne)),this},Ce.prototype.prependOnceListener=function(Le,Ne){return he(Ne),this.prependListener(Le,ve(this,Le,Ne)),this},Ce.prototype.removeListener=function(Le,Ne){var Re,Se,Ie,Ae,it;if(he(Ne),Se=this._events,Se===void 0)return this;if(Re=Se[Le],Re===void 0)return this;if(Re===Ne||Re.listener===Ne)--this._eventsCount===0?this._events=Object.create(null):(delete Se[Le],Se.removeListener&&this.emit("removeListener",Le,Re.listener||Ne));else if(typeof Re!="function"){for(Ie=-1,Ae=Re.length-1;Ae>=0;Ae--)if(Re[Ae]===Ne||Re[Ae].listener===Ne){it=Re[Ae].listener,Ie=Ae;break}if(Ie<0)return this;Ie===0?Re.shift():ge(Re,Ie),Re.length===1&&(Se[Le]=Re[0]),Se.removeListener!==void 0&&this.emit("removeListener",Le,it||Ne)}return this},Ce.prototype.off=Ce.prototype.removeListener,Ce.prototype.removeAllListeners=function(Le){var Ne,Re,Se;if(Re=this._events,Re===void 0)return this;if(Re.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Re[Le]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Re[Le]),this;if(arguments.length===0){var Ie=Object.keys(Re),Ae;for(Se=0;Se<Ie.length;++Se)Ae=Ie[Se],Ae!=="removeListener"&&this.removeAllListeners(Ae);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Ne=Re[Le],typeof Ne=="function")this.removeListener(Le,Ne);else if(Ne!==void 0)for(Se=Ne.length-1;Se>=0;Se--)this.removeListener(Le,Ne[Se]);return this};function ue($e,Le,Ne){var Re=$e._events;if(Re===void 0)return[];var Se=Re[Le];return Se===void 0?[]:typeof Se=="function"?Ne?[Se.listener||Se]:[Se]:Ne?ye(Se):oe(Se,Se.length)}Ce.prototype.listeners=function(Le){return ue(this,Le,!0)},Ce.prototype.rawListeners=function(Le){return ue(this,Le,!1)},Ce.listenerCount=function($e,Le){return typeof $e.listenerCount=="function"?$e.listenerCount(Le):pe.call($e,Le)},Ce.prototype.listenerCount=pe;function pe($e){var Le=this._events;if(Le!==void 0){var Ne=Le[$e];if(typeof Ne=="function")return 1;if(Ne!==void 0)return Ne.length}return 0}Ce.prototype.eventNames=function(){return this._eventsCount>0?ne(this._events):[]};function oe($e,Le){for(var Ne=new Array(Le),Re=0;Re<Le;++Re)Ne[Re]=$e[Re];return Ne}function ge($e,Le){for(;Le+1<$e.length;Le++)$e[Le]=$e[Le+1];$e.pop()}function ye($e){for(var Le=new Array($e.length),Ne=0;Ne<Le.length;++Ne)Le[Ne]=$e[Ne].listener||$e[Ne];return Le}function we($e,Le){return new Promise(function(Ne,Re){function Se(Ae){$e.removeListener(Le,Ie),Re(Ae)}function Ie(){typeof $e.removeListener=="function"&&$e.removeListener("error",Se),Ne([].slice.call(arguments))}ze($e,Le,Ie,{once:!0}),Le!=="error"&&Be($e,Se,{once:!0})})}function Be($e,Le,Ne){typeof $e.on=="function"&&ze($e,"error",Le,Ne)}function ze($e,Le,Ne,Re){if(typeof $e.on=="function")Re.once?$e.once(Le,Ne):$e.on(Le,Ne);else if(typeof $e.addEventListener=="function")$e.addEventListener(Le,function Se(Ie){Re.once&&$e.removeEventListener(Le,Se),Ne(Ie)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof $e)}},24334:function(gn,kt,ee){var ne,xe;(function(Me,Ce){gn.exports=Ce(Me)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ee.g!="undefined"?ee.g:this,function(Me){"use strict";Me=Me||{};var Ce=Me.Base64,fe="2.6.4",he="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ce=function(ct){for(var Ot={},We=0,lt=ct.length;We<lt;We++)Ot[ct.charAt(We)]=We;return Ot}(he),ae=String.fromCharCode,se=function(ct){if(ct.length<2){var Ot=ct.charCodeAt(0);return Ot<128?ct:Ot<2048?ae(192|Ot>>>6)+ae(128|Ot&63):ae(224|Ot>>>12&15)+ae(128|Ot>>>6&63)+ae(128|Ot&63)}else{var Ot=65536+(ct.charCodeAt(0)-55296)*1024+(ct.charCodeAt(1)-56320);return ae(240|Ot>>>18&7)+ae(128|Ot>>>12&63)+ae(128|Ot>>>6&63)+ae(128|Ot&63)}},ve=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ue=function(ct){return ct.replace(ve,se)},pe=function(ct){var Ot=[0,2,1][ct.length%3],We=ct.charCodeAt(0)<<16|(ct.length>1?ct.charCodeAt(1):0)<<8|(ct.length>2?ct.charCodeAt(2):0),lt=[he.charAt(We>>>18),he.charAt(We>>>12&63),Ot>=2?"=":he.charAt(We>>>6&63),Ot>=1?"=":he.charAt(We&63)];return lt.join("")},oe=Me.btoa&&typeof Me.btoa=="function"?function(ct){return Me.btoa(ct)}:function(ct){if(ct.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ct.replace(/[\s\S]{1,3}/g,pe)},ge=function(ct){return oe(ue(String(ct)))},ye=function(ct){return ct.replace(/[+\/]/g,function(Ot){return Ot=="+"?"-":"_"}).replace(/=/g,"")},we=function(ct,Ot){return Ot?ye(ge(ct)):ge(ct)},Be=function(ct){return we(ct,!0)},ze;Me.Uint8Array&&(ze=function(ct,Ot){for(var We="",lt=0,ut=ct.length;lt<ut;lt+=3){var St=ct[lt],qe=ct[lt+1],Ze=ct[lt+2],wt=St<<16|qe<<8|Ze;We+=he.charAt(wt>>>18)+he.charAt(wt>>>12&63)+(typeof qe!="undefined"?he.charAt(wt>>>6&63):"=")+(typeof Ze!="undefined"?he.charAt(wt&63):"=")}return Ot?ye(We):We});var $e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Le=function(ct){switch(ct.length){case 4:var Ot=(7&ct.charCodeAt(0))<<18|(63&ct.charCodeAt(1))<<12|(63&ct.charCodeAt(2))<<6|63&ct.charCodeAt(3),We=Ot-65536;return ae((We>>>10)+55296)+ae((We&1023)+56320);case 3:return ae((15&ct.charCodeAt(0))<<12|(63&ct.charCodeAt(1))<<6|63&ct.charCodeAt(2));default:return ae((31&ct.charCodeAt(0))<<6|63&ct.charCodeAt(1))}},Ne=function(ct){return ct.replace($e,Le)},Re=function(ct){var Ot=ct.length,We=Ot%4,lt=(Ot>0?ce[ct.charAt(0)]<<18:0)|(Ot>1?ce[ct.charAt(1)]<<12:0)|(Ot>2?ce[ct.charAt(2)]<<6:0)|(Ot>3?ce[ct.charAt(3)]:0),ut=[ae(lt>>>16),ae(lt>>>8&255),ae(lt&255)];return ut.length-=[0,0,2,1][We],ut.join("")},Se=Me.atob&&typeof Me.atob=="function"?function(ct){return Me.atob(ct)}:function(ct){return ct.replace(/\S{1,4}/g,Re)},Ie=function(ct){return Se(String(ct).replace(/[^A-Za-z0-9\+\/]/g,""))},Ae=function(ct){return Ne(Se(ct))},it=function(ct){return String(ct).replace(/[-_]/g,function(Ot){return Ot=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ue=function(ct){return Ae(it(ct))},gt;Me.Uint8Array&&(gt=function(ct){return Uint8Array.from(Ie(it(ct)),function(Ot){return Ot.charCodeAt(0)})});var Ve=function(){var ct=Me.Base64;return Me.Base64=Ce,ct};if(Me.Base64={VERSION:fe,atob:Ie,btoa:oe,fromBase64:Ue,toBase64:we,utob:ue,encode:we,encodeURI:Be,btou:Ne,decode:Ue,noConflict:Ve,fromUint8Array:ze,toUint8Array:gt},typeof Object.defineProperty=="function"){var Tt=function(ct){return{value:ct,enumerable:!1,writable:!0,configurable:!0}};Me.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Tt(function(){return Ue(this)})),Object.defineProperty(String.prototype,"toBase64",Tt(function(ct){return we(this,ct)})),Object.defineProperty(String.prototype,"toBase64URI",Tt(function(){return we(this,!0)}))}}return Me.Meteor&&(Base64=Me.Base64),gn.exports?gn.exports.Base64=Me.Base64:(ne=[],xe=function(){return Me.Base64}.apply(kt,ne),xe!==void 0&&(gn.exports=xe)),{Base64:Me.Base64}})},2859:function(gn,kt,ee){"use strict";ee.d(kt,{hP:function(){return un}});var ne=function(Xe,ke){return(ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_e,Te){_e.__proto__=Te}||function(_e,Te){for(var Fe in Te)Object.prototype.hasOwnProperty.call(Te,Fe)&&(_e[Fe]=Te[Fe])})(Xe,ke)};function xe(Xe,ke){function _e(){this.constructor=Xe}ne(Xe,ke),Xe.prototype=ke===null?Object.create(ke):(_e.prototype=ke.prototype,new _e)}function Me(Xe,ke,_e,Te){return new(_e||(_e=Promise))(function(Fe,me){function at(Je){try{Qe(Te.next(Je))}catch(xt){me(xt)}}function Pt(Je){try{Qe(Te.throw(Je))}catch(xt){me(xt)}}function Qe(Je){var xt;Je.done?Fe(Je.value):(xt=Je.value,xt instanceof _e?xt:new _e(function(ot){ot(xt)})).then(at,Pt)}Qe((Te=Te.apply(Xe,ke||[])).next())})}function Ce(Xe,ke){var _e,Te,Fe,me,at={label:0,sent:function(){if(1&Fe[0])throw Fe[1];return Fe[1]},trys:[],ops:[]};return me={next:Pt(0),throw:Pt(1),return:Pt(2)},typeof Symbol=="function"&&(me[Symbol.iterator]=function(){return this}),me;function Pt(Qe){return function(Je){return function(xt){if(_e)throw new TypeError("Generator is already executing.");for(;at;)try{if(_e=1,Te&&(Fe=2&xt[0]?Te.return:xt[0]?Te.throw||((Fe=Te.return)&&Fe.call(Te),0):Te.next)&&!(Fe=Fe.call(Te,xt[1])).done)return Fe;switch(Te=0,Fe&&(xt=[2&xt[0],Fe.value]),xt[0]){case 0:case 1:Fe=xt;break;case 4:return at.label++,{value:xt[1],done:!1};case 5:at.label++,Te=xt[1],xt=[0];continue;case 7:xt=at.ops.pop(),at.trys.pop();continue;default:if(Fe=at.trys,!((Fe=Fe.length>0&&Fe[Fe.length-1])||xt[0]!==6&&xt[0]!==2)){at=0;continue}if(xt[0]===3&&(!Fe||xt[1]>Fe[0]&&xt[1]<Fe[3])){at.label=xt[1];break}if(xt[0]===6&&at.label<Fe[1]){at.label=Fe[1],Fe=xt;break}if(Fe&&at.label<Fe[2]){at.label=Fe[2],at.ops.push(xt);break}Fe[2]&&at.ops.pop(),at.trys.pop();continue}xt=ke.call(Xe,at)}catch(ot){xt=[6,ot],Te=0}finally{_e=Fe=0}if(5&xt[0])throw xt[1];return{value:xt[0]?xt[1]:void 0,done:!0}}([Qe,Je])}}}function fe(){for(var Xe=0,ke=0,_e=arguments.length;ke<_e;ke++)Xe+=arguments[ke].length;var Te=Array(Xe),Fe=0;for(ke=0;ke<_e;ke++)for(var me=arguments[ke],at=0,Pt=me.length;at<Pt;at++,Fe++)Te[Fe]=me[at];return Te}var he=function(){function Xe(){}return Xe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Xe.setAttributes=function(ke,_e){for(var Te=0,Fe=_e;Te<Fe.length;Te++){var me=Fe[Te],at=me[0],Pt=me[1];ke.setAttribute(at,Pt)}},Xe.createRect=function(ke,_e,Te){var Fe=document.createElementNS("http://www.w3.org/2000/svg","rect");return Fe.setAttribute("width",ke.toString()),Fe.setAttribute("height",_e.toString()),Te&&Xe.setAttributes(Fe,Te),Fe},Xe.createLine=function(ke,_e,Te,Fe,me){var at=document.createElementNS("http://www.w3.org/2000/svg","line");return at.setAttribute("x1",ke.toString()),at.setAttribute("y1",_e.toString()),at.setAttribute("x2",Te.toString()),at.setAttribute("y2",Fe.toString()),me&&Xe.setAttributes(at,me),at},Xe.createPolygon=function(ke,_e){var Te=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Te.setAttribute("points",ke),_e&&Xe.setAttributes(Te,_e),Te},Xe.createCircle=function(ke,_e){var Te=document.createElementNS("http://www.w3.org/2000/svg","circle");return Te.setAttribute("cx",(ke/2).toString()),Te.setAttribute("cy",(ke/2).toString()),Te.setAttribute("r",ke.toString()),_e&&Xe.setAttributes(Te,_e),Te},Xe.createEllipse=function(ke,_e,Te){var Fe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Fe.setAttribute("cx",(ke/2).toString()),Fe.setAttribute("cy",(_e/2).toString()),Fe.setAttribute("rx",(ke/2).toString()),Fe.setAttribute("ry",(_e/2).toString()),Te&&Xe.setAttributes(Fe,Te),Fe},Xe.createGroup=function(ke){var _e=document.createElementNS("http://www.w3.org/2000/svg","g");return ke&&Xe.setAttributes(_e,ke),_e},Xe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Xe.createMarker=function(ke,_e,Te,Fe,me,at,Pt){var Qe=document.createElementNS("http://www.w3.org/2000/svg","marker");return Xe.setAttributes(Qe,[["id",ke],["orient",_e],["markerWidth",Te.toString()],["markerHeight",Fe.toString()],["refX",me.toString()],["refY",at.toString()]]),Qe.appendChild(Pt),Qe},Xe.createText=function(ke){var _e=document.createElementNS("http://www.w3.org/2000/svg","text");return _e.setAttribute("x","0"),_e.setAttribute("y","0"),ke&&Xe.setAttributes(_e,ke),_e},Xe.createTSpan=function(ke,_e){var Te=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Te.textContent=ke,_e&&Xe.setAttributes(Te,_e),Te},Xe.createImage=function(ke){var _e=document.createElementNS("http://www.w3.org/2000/svg","image");return ke&&Xe.setAttributes(_e,ke),_e},Xe.createPoint=function(ke,_e){var Te=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Te.x=ke,Te.y=_e,Te},Xe.createPath=function(ke,_e){var Te=document.createElementNS("http://www.w3.org/2000/svg","path");return Te.setAttribute("d",ke),_e&&Xe.setAttributes(Te,_e),Te},Xe}(),ce=function(){function Xe(){}return Xe.addKey=function(ke){Xe.key=ke},Object.defineProperty(Xe,"isLicensed",{get:function(){return!!Xe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Xe.key)},enumerable:!1,configurable:!0}),Xe}(),ae=function(){function Xe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Xe.prototype.rasterize=function(ke,_e,Te){var Fe=this;return new Promise(function(me){var at=Te!==void 0?Te:document.createElement("canvas");ke===null&&(Fe.markersOnly=!0,Fe.naturalSize=!1);var Pt=document.createElementNS("http://www.w3.org/2000/svg","svg");Pt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Pt.setAttribute("width",_e.width.baseVal.valueAsString),Pt.setAttribute("height",_e.height.baseVal.valueAsString),Pt.setAttribute("viewBox","0 0 "+_e.viewBox.baseVal.width.toString()+" "+_e.viewBox.baseVal.height.toString()),Pt.innerHTML=_e.innerHTML,Fe.naturalSize===!0?(Pt.width.baseVal.value=ke.naturalWidth,Pt.height.baseVal.value=ke.naturalHeight):Fe.width!==void 0&&Fe.height!==void 0&&(Pt.width.baseVal.value=Fe.width,Pt.height.baseVal.value=Fe.height),at.width=Pt.width.baseVal.value,at.height=Pt.height.baseVal.value;var Qe=Pt.outerHTML,Je=at.getContext("2d");Fe.markersOnly!==!0&&Je.drawImage(ke,0,0,at.width,at.height);var xt=window.URL,ot=new Image(at.width,at.height);ot.setAttribute("crossOrigin","anonymous");var mt=new Blob([Qe],{type:"image/svg+xml"}),Nt=xt.createObjectURL(mt);ot.onload=function(){Je.drawImage(ot,0,0),xt.revokeObjectURL(Nt);var rn=at.toDataURL(Fe.imageType,Fe.imageQuality);me(rn)},ot.src=Nt})},Xe}(),se=function(){},ve=function(){function Xe(ke){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ke+"_"}return Object.defineProperty(Xe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.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(Xe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Xe.prototype.addClass=function(ke){return this.styleSheet===void 0&&this.addStyleSheet(),ke.name=""+this.classNamePrefix+ke.localName,this.classes.push(ke),this.styleSheet.sheet.insertRule("."+ke.name+" {"+ke.style+"}",this.styleSheet.sheet.cssRules.length),ke},Xe.prototype.addRule=function(ke){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ke),this.styleSheet.sheet.insertRule(ke.selector+" {"+ke.style+"}",this.styleSheet.sheet.cssRules.length)},Xe.prototype.addStyleSheet=function(){var ke;this.styleSheet=document.createElement("style"),((ke=this.styleSheetRoot)!==null&&ke!==void 0?ke:document.head).appendChild(this.styleSheet),this.addRule(new ue("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ue("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new ue("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new pe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new pe("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Xe.prototype.removeStyleSheet=function(){var ke;this.styleSheet&&(((ke=this.styleSheetRoot)!==null&&ke!==void 0?ke:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Xe}(),ue=function(Xe,ke){this.selector=Xe,this.style=ke},pe=function(Xe,ke){this.localName=Xe,this.style=ke},oe=function(){function Xe(ke,_e,Te,Fe,me){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ke,this.displayMode=_e,this.markerItems=Te,this.uiStyleSettings=Fe,this.styles=me,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Xe.prototype.show=function(ke){var _e=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ke,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Te=document.createElement("div");Te.className=this.toolbarBlockStyleClass.name,Te.style.whiteSpace="nowrap",this.uiContainer.appendChild(Te),this.addActionButton(Te,'<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(Te,'<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(Te,'<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(Te,'<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(Te,'<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(Te,'<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(Te,'<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(Te,'<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(me){var at=document.createElement("div");at.className=""+_e.toolbarButtonStyleClass.name,at.setAttribute("data-type-name",me.typeName),at.innerHTML=me.icon,at.addEventListener("click",function(){_e.markerToolbarButtonClicked(at,me)}),_e.buttons.push(at),_e.markerButtons.push(at)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Fe=document.createElement("div");Fe.className=this.toolbarBlockStyleClass.name,Fe.style.whiteSpace="nowrap",Fe.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Fe),this.addActionButton(Fe,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Fe,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Xe.prototype.addButtonClickListener=function(ke){this.buttonClickListeners.push(ke)},Xe.prototype.removeButtonClickListener=function(ke){this.buttonClickListeners.indexOf(ke)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ke),1)},Xe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Xe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ke=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var _e=0;_e<this.markerButtons.length;_e++)_e<ke||_e===ke&&this.markerButtons.length-1===ke?this.markerButtonBlock.appendChild(this.markerButtons[_e]):(_e===ke&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[_e]))}},Xe.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")},Xe.prototype.resetButtonStyles=function(){var ke=this;this.buttons.forEach(function(_e){_e.className=_e.className.replace(ke.uiStyleSettings.toolbarButtonStyleColorsClassName?ke.uiStyleSettings.toolbarButtonStyleColorsClassName:ke.toolbarButtonStyleColorsClass.name,"").trim(),_e.className=_e.className.replace(ke.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ke.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ke.toolbarActiveButtonStyleColorsClass.name,"").trim(),_e.className+=" "+(ke.uiStyleSettings.toolbarButtonStyleColorsClassName?ke.uiStyleSettings.toolbarButtonStyleColorsClassName:ke.toolbarButtonStyleColorsClass.name)})},Xe.prototype.addActionButton=function(ke,_e,Te){var Fe=this,me=document.createElement("div");switch(me.className=""+this.toolbarButtonStyleClass.name,me.innerHTML=_e,me.setAttribute("data-action",Te),me.addEventListener("click",function(){Fe.actionToolbarButtonClicked(me,Te)}),Te){case"select":me.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":me.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":me.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":me.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":me.style.fill=this.uiStyleSettings.closeButtonColor}ke.appendChild(me),this.buttons.push(me)},Xe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new pe("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 pe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new pe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new pe("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 pe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var ke=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new pe("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ke)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ke)+`px;
padding: `+ke+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new pe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ue("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new ue("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Xe.prototype.markerToolbarButtonClicked=function(ke,_e){this.setActiveButton(ke),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Te){return Te("marker",_e)}),this.markerButtonOverflowBlock.style.display="none"},Xe.prototype.actionToolbarButtonClicked=function(ke,_e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Te){return Te("action",_e)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Xe.prototype.setActiveButton=function(ke){this.resetButtonStyles(),ke.className=ke.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ke.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Xe.prototype.setActiveMarkerButton=function(ke){var _e=this.markerButtons.find(function(Te){return Te.getAttribute("data-type-name")===ke});_e&&this.setActiveButton(_e)},Xe.prototype.setCurrentMarker=function(ke){var _e=this;this.currentMarker=ke,this.buttons.filter(function(Te){return/delete|notes/.test(Te.getAttribute("data-action"))}).forEach(function(Te){_e.currentMarker===void 0?(Te.style.fillOpacity="0.4",Te.style.pointerEvents="none"):(Te.style.fillOpacity="1",Te.style.pointerEvents="all")})},Xe}(),ge=function(){function Xe(ke,_e,Te,Fe){this.panels=[],this.panelButtons=[],this.markerjsContainer=ke,this.displayMode=_e,this.uiStyleSettings=Te,this.styles=Fe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Xe.prototype.addStyles=function(){var ke;this.toolboxStyleClass=this.styles.addClass(new pe("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 pe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var _e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new pe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new pe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new pe("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 pe("toolbox-panel-row_colors",`
background-color: `+((ke=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ke!==void 0?ke:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new pe("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*_e)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*_e)+`px;
padding: `+_e+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new ue("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ue("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Xe.prototype.show=function(ke){var _e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ke,this.uiContainer.className=this.toolboxStyleClass.name+" "+((_e=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&_e!==void 0?_e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Xe.prototype.setPanelButtons=function(ke){var _e,Te,Fe=this;this.panels=ke,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((_e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&_e!==void 0?_e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Te=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Te!==void 0?Te:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(me){var at;me.uiStyleSettings=Fe.uiStyleSettings;var Pt=document.createElement("div");Pt.className=Fe.toolboxButtonStyleClass.name+" "+((at=Fe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&at!==void 0?at:Fe.toolboxButtonStyleColorsClass.name),Pt.innerHTML=me.icon,Pt.title=me.title,Pt.addEventListener("click",function(){Fe.panelButtonClick(me)}),Fe.panelButtons.push(Pt),Fe.buttonRow.appendChild(Pt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Xe.prototype.panelButtonClick=function(ke){var _e=this,Te=-1;if(ke!==this.activePanel){Te=this.panels.indexOf(ke),this.panelRow.innerHTML="";var Fe=ke.getUi();Fe.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Fe),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=ke}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){_e.displayMode==="inline"?_e.panelRow.style.display="none":_e.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(me,at){var Pt,Qe;me.className=_e.toolboxButtonStyleClass.name+" "+(at===Te?""+((Pt=_e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Pt!==void 0?Pt:_e.toolboxActiveButtonStyleColorsClass.name):""+((Qe=_e.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:_e.toolboxButtonStyleColorsClass.name))})},Xe}(),ye=function(Xe,ke){this.title=Xe,this.icon=ke},we=function(Xe){function ke(_e,Te,Fe,me){var at=Xe.call(this,_e,me||'<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 at.colors=[],at.addTransparent=!1,at.colorBoxes=[],at.colors=Te,at.currentColor=Fe,at.setCurrentColor=at.setCurrentColor.bind(at),at.getColorBox=at.getColorBox.bind(at),at}return xe(ke,Xe),ke.prototype.getUi=function(){var _e=this,Te=document.createElement("div");return Te.style.overflow="hidden",Te.style.whiteSpace="nowrap",this.colors.forEach(function(Fe){var me=_e.getColorBox(Fe);Te.appendChild(me),_e.colorBoxes.push(me)}),Te},ke.prototype.getColorBox=function(_e){var Te=this,Fe=this.uiStyleSettings.toolbarHeight/4,me=this.uiStyleSettings.toolbarHeight-Fe,at=document.createElement("div");at.style.display="inline-block",at.style.boxSizing="content-box",at.style.width=me-2+"px",at.style.height=me-2+"px",at.style.padding="1px",at.style.marginRight="2px",at.style.marginBottom="2px",at.style.borderWidth="2px",at.style.borderStyle="solid",at.style.borderRadius=(me+2)/2+"px",at.style.borderColor=_e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",at.addEventListener("click",function(){Te.setCurrentColor(_e,at)});var Pt=document.createElement("div");return Pt.style.display="inline-block",Pt.style.width=me-2+"px",Pt.style.height=me-2+"px",Pt.style.backgroundColor=_e,Pt.style.borderRadius=me/2+"px",_e==="transparent"&&(Pt.style.fill=this.uiStyleSettings.toolboxAccentColor,Pt.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>`),at.appendChild(Pt),at},ke.prototype.setCurrentColor=function(_e,Te){var Fe=this;this.currentColor=_e,this.colorBoxes.forEach(function(me){me.style.borderColor=me===Te?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(_e)},ke}(ye),Be=function(){function Xe(ke,_e,Te){this._state="new",this._isSelected=!1,this._container=ke,this._overlayContainer=_e,this.globalSettings=Te,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Xe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Xe.prototype.ownsTarget=function(ke){return!1},Object.defineProperty(Xe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Xe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Xe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Xe.prototype.pointerDown=function(ke,_e){},Xe.prototype.dblClick=function(ke,_e){},Xe.prototype.manipulate=function(ke){},Xe.prototype.pointerUp=function(ke){this.stateChanged()},Xe.prototype.dispose=function(){},Xe.prototype.addMarkerVisualToContainer=function(ke){this.container.childNodes.length>0?this.container.insertBefore(ke,this.container.childNodes[0]):this.container.appendChild(ke)},Xe.prototype.getState=function(){return{typeName:Xe.typeName,state:this.state,notes:this.notes}},Xe.prototype.restoreState=function(ke){this._state=ke.state,this.notes=ke.notes},Xe.prototype.scale=function(ke,_e){},Xe.prototype.colorChanged=function(ke){this.onColorChanged&&this.onColorChanged(ke),this.stateChanged()},Xe.prototype.fillColorChanged=function(ke){this.onFillColorChanged&&this.onFillColorChanged(ke),this.stateChanged()},Xe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ke=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ke.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ke)&&this.onStateChanged(this)}},Xe.typeName="MarkerBase",Xe}(),ze=function(){function Xe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Xe.prototype.findGripByVisual=function(ke){return this.topLeft.ownsTarget(ke)?this.topLeft:this.topCenter.ownsTarget(ke)?this.topCenter:this.topRight.ownsTarget(ke)?this.topRight:this.centerLeft.ownsTarget(ke)?this.centerLeft:this.centerRight.ownsTarget(ke)?this.centerRight:this.bottomLeft.ownsTarget(ke)?this.bottomLeft:this.bottomCenter.ownsTarget(ke)?this.bottomCenter:this.bottomRight.ownsTarget(ke)?this.bottomRight:void 0},Xe}(),$e=function(){function Xe(){this.GRIP_SIZE=10,this.visual=he.createGroup(),this.visual.appendChild(he.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(he.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Xe.prototype.ownsTarget=function(ke){return ke===this.visual||ke===this.visual.childNodes[0]||ke===this.visual.childNodes[1]},Xe}(),Le=function(){function Xe(){}return Xe.toITransformMatrix=function(ke){return{a:ke.a,b:ke.b,c:ke.c,d:ke.d,e:ke.e,f:ke.f}},Xe.toSVGMatrix=function(ke,_e){return ke.a=_e.a,ke.b=_e.b,ke.c=_e.c,ke.d=_e.d,ke.e=_e.e,ke.f=_e.f,ke},Xe}(),Ne=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.left=0,me.top=0,me.width=0,me.height=0,me.defaultSize={x:50,y:20},me.offsetX=0,me.offsetY=0,me.rotationAngle=0,me.CB_DISTANCE=10,me._suppressMarkerCreateEvent=!1,me.container.transform.baseVal.appendItem(he.createTransform()),me.setupControlBox(),me}return xe(ke,Xe),Object.defineProperty(ke.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"visual",{get:function(){return this._visual},set:function(_e){this._visual=_e;var Te=he.createTransform();this._visual.transform.baseVal.appendItem(Te)},enumerable:!1,configurable:!0}),ke.prototype.ownsTarget=function(_e){return!!Xe.prototype.ownsTarget.call(this,_e)||!!(this.controlGrips.findGripByVisual(_e)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(_e))},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.state==="new"&&(this.left=_e.x,this.top=_e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Fe=this.unrotatePoint(_e);if(this.manipulationStartX=Fe.x,this.manipulationStartY=Fe.y,this.offsetX=Fe.x-this.left,this.offsetY=Fe.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Te),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Te)){this.activeGrip=this.rotatorGrip;var me=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=me.x-this.width/2,this.top=me.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var at=this.container.transform.baseVal.getItem(0);at.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(at,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ke.prototype.pointerUp=function(_e){var Te=this.state;Xe.prototype.pointerUp.call(this,_e),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(_e),this._state="select",Te==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ke.prototype.moveVisual=function(_e){this.visual.style.transform="translate("+_e.x+"px, "+_e.y+"px)"},ke.prototype.manipulate=function(_e){var Te=this.unrotatePoint(_e);this.state==="creating"?this.resize(_e):this.state==="move"?(this.left=this.manipulationStartLeft+(Te.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Te.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Te):this.state==="rotate"&&this.rotate(_e)},ke.prototype.resize=function(_e){var Te=this.manipulationStartLeft,Fe=this.manipulationStartWidth,me=this.manipulationStartTop,at=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Te=this.manipulationStartLeft+_e.x-this.manipulationStartX,Fe=this.manipulationStartWidth+this.manipulationStartLeft-Te;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Fe=this.manipulationStartWidth+_e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:me=this.manipulationStartTop+_e.y-this.manipulationStartY,at=this.manipulationStartHeight+this.manipulationStartTop-me;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:at=this.manipulationStartHeight+_e.y-this.manipulationStartY}Fe>=0?(this.left=Te,this.width=Fe):(this.left=Te+Fe,this.width=-Fe),at>=0?(this.top=me,this.height=at):(this.top=me+at,this.height=-at),this.setSize()},ke.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ke.prototype.rotate=function(_e){if(Math.abs(_e.x-this.centerX)>.1){var Te=Math.sign(_e.x-this.centerX);this.rotationAngle=180*Math.atan((_e.y-this.centerY)/(_e.x-this.centerX))/Math.PI+90*Te,this.applyRotation()}},ke.prototype.applyRotation=function(){var _e=this.container.transform.baseVal.getItem(0);_e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_e,0)},ke.prototype.rotatePoint=function(_e){if(this.rotationAngle===0)return _e;var Te=this.container.getCTM(),Fe=he.createPoint(_e.x,_e.y);return{x:(Fe=Fe.matrixTransform(Te)).x,y:Fe.y}},ke.prototype.unrotatePoint=function(_e){if(this.rotationAngle===0)return _e;var Te=this.container.getCTM();Te=Te.inverse();var Fe=he.createPoint(_e.x,_e.y);return{x:(Fe=Fe.matrixTransform(Te)).x,y:Fe.y}},ke.prototype.select=function(){Xe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ke.prototype.deselect=function(){Xe.prototype.deselect.call(this),this.controlBox.style.display="none"},ke.prototype.setupControlBox=function(){this.controlBox=he.createGroup();var _e=he.createTransform();_e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(_e),this.container.appendChild(this.controlBox),this.controlRect=he.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=he.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 ze,this.addControlGrips(),this.controlBox.style.display="none"},ke.prototype.adjustControlBox=function(){var _e=this.controlBox.transform.baseVal.getItem(0);_e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(_e,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()},ke.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()},ke.prototype.createGrip=function(){var _e=new $e;return _e.visual.transform.baseVal.appendItem(he.createTransform()),this.controlBox.appendChild(_e.visual),_e},ke.prototype.positionGrips=function(){var _e=this.controlGrips.topLeft.GRIP_SIZE,Te=-_e/2,Fe=Te,me=(this.width+this.CB_DISTANCE)/2-_e/2,at=(this.height+this.CB_DISTANCE)/2-_e/2,Pt=this.height+this.CB_DISTANCE-_e/2,Qe=this.width+this.CB_DISTANCE-_e/2;this.positionGrip(this.controlGrips.topLeft.visual,Te,Fe),this.positionGrip(this.controlGrips.topCenter.visual,me,Fe),this.positionGrip(this.controlGrips.topRight.visual,Qe,Fe),this.positionGrip(this.controlGrips.centerLeft.visual,Te,at),this.positionGrip(this.controlGrips.centerRight.visual,Qe,at),this.positionGrip(this.controlGrips.bottomLeft.visual,Te,Pt),this.positionGrip(this.controlGrips.bottomCenter.visual,me,Pt),this.positionGrip(this.controlGrips.bottomRight.visual,Qe,Pt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,me,Fe-3*this.CB_DISTANCE)},ke.prototype.positionGrip=function(_e,Te,Fe){var me=_e.transform.baseVal.getItem(0);me.setTranslate(Te,Fe),_e.transform.baseVal.replaceItem(me,0)},ke.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ke.prototype.showControlBox=function(){this.controlBox.style.display=""},ke.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Le.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Le.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Xe.prototype.getState.call(this))},ke.prototype.restoreState=function(_e){Xe.prototype.restoreState.call(this,_e);var Te=_e;this.left=Te.left,this.top=Te.top,this.width=Te.width,this.height=Te.height,this.rotationAngle=Te.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Te.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Te.containerTransformMatrix))},ke.prototype.scale=function(_e,Te){Xe.prototype.scale.call(this,_e,Te);var Fe=this.rotatePoint({x:this.left,y:this.top}),me=this.unrotatePoint({x:Fe.x*_e,y:Fe.y*Te});this.left=me.x,this.top=me.y,this.width=this.width*_e,this.height=this.height*Te,this.adjustControlBox()},ke}(Be),Re=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.fillColor="transparent",me.strokeColor="transparent",me.strokeWidth=0,me.strokeDasharray="",me.opacity=1,me.setStrokeColor=me.setStrokeColor.bind(me),me.setFillColor=me.setFillColor.bind(me),me.setStrokeWidth=me.setStrokeWidth.bind(me),me.setStrokeDasharray=me.setStrokeDasharray.bind(me),me.createVisual=me.createVisual.bind(me),me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){return!(!Xe.prototype.ownsTarget.call(this,_e)&&_e!==this.visual)},ke.prototype.createVisual=function(){this.visual=he.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)},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.state==="new"&&(this.createVisual(),this.moveVisual(_e),this._state="creating")},ke.prototype.manipulate=function(_e){Xe.prototype.manipulate.call(this,_e)},ke.prototype.resize=function(_e){Xe.prototype.resize.call(this,_e),this.setSize()},ke.prototype.setSize=function(){Xe.prototype.setSize.call(this),he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ke.prototype.pointerUp=function(_e){Xe.prototype.pointerUp.call(this,_e),this.setSize()},ke.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.visual&&he.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(_e),this.stateChanged()},ke.prototype.setFillColor=function(_e){this.fillColor=_e,this.visual&&he.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ke.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.visual&&he.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ke.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.visual&&he.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ke.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Xe.prototype.getState.call(this))},ke.prototype.restoreState=function(_e){var Te=_e;this.fillColor=Te.fillColor,this.strokeColor=Te.strokeColor,this.strokeWidth=Te.strokeWidth,this.strokeDasharray=Te.strokeDasharray,this.opacity=Te.opacity,this.createVisual(),Xe.prototype.restoreState.call(this,_e),this.setSize()},ke.prototype.scale=function(_e,Te){Xe.prototype.scale.call(this,_e,Te),this.setSize()},ke.title="Rectangle marker",ke}(Ne),Se=function(Xe){function ke(_e,Te,Fe,me){var at=Xe.call(this,_e,me||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return at.widths=[],at.widthBoxes=[],at.widths=Te,at.currentWidth=Fe,at.setCurrentWidth=at.setCurrentWidth.bind(at),at}return xe(ke,Xe),ke.prototype.getUi=function(){var _e=this,Te=document.createElement("div");return Te.style.display="flex",Te.style.overflow="hidden",Te.style.flexGrow="2",this.widths.forEach(function(Fe){var me=document.createElement("div");me.style.display="flex",me.style.flexGrow="2",me.style.alignItems="center",me.style.justifyContent="space-between",me.style.padding="5px",me.style.borderWidth="2px",me.style.borderStyle="solid",me.style.borderColor=Fe===_e.currentWidth?_e.uiStyleSettings.toolboxAccentColor:"transparent",me.addEventListener("click",function(){_e.setCurrentWidth(Fe,me)}),Te.appendChild(me);var at=document.createElement("div");at.innerText=Fe.toString(),at.style.marginRight="5px",me.appendChild(at);var Pt=document.createElement("div");Pt.style.minHeight="20px",Pt.style.flexGrow="2",Pt.style.display="flex",Pt.style.alignItems="center";var Qe=document.createElement("hr");Qe.style.minWidth="20px",Qe.style.border="0px",Qe.style.borderTop=Fe+"px solid "+_e.uiStyleSettings.toolboxColor,Qe.style.flexGrow="2",Pt.appendChild(Qe),me.appendChild(Pt),_e.widthBoxes.push(me)}),Te},ke.prototype.setCurrentWidth=function(_e,Te){var Fe=this;this.currentWidth=_e,this.widthBoxes.forEach(function(me){me.style.borderColor=me===Te?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ke}(ye),Ie=function(Xe){function ke(_e,Te,Fe,me){var at=Xe.call(this,_e,me||'<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 at.styles=[],at.styleBoxes=[],at.styles=Te,at.currentStyle=Fe,at.setCurrentStyle=at.setCurrentStyle.bind(at),at}return xe(ke,Xe),ke.prototype.getUi=function(){var _e=this,Te=document.createElement("div");return Te.style.display="flex",Te.style.overflow="hidden",Te.style.flexGrow="2",this.styles.forEach(function(Fe){var me=document.createElement("div");me.style.display="flex",me.style.alignItems="center",me.style.justifyContent="space-between",me.style.padding="5px",me.style.borderWidth="2px",me.style.borderStyle="solid",me.style.overflow="hidden",me.style.maxWidth=100/_e.styles.length-5+"%",me.style.borderColor=Fe===_e.currentStyle?_e.uiStyleSettings.toolboxAccentColor:"transparent",me.addEventListener("click",function(){_e.setCurrentStyle(Fe,me)}),Te.appendChild(me);var at=document.createElement("div");at.style.minHeight="20px",at.style.flexGrow="2",at.style.overflow="hidden";var Pt=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+_e.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Fe!==""?'stroke-dasharray="'+Fe+'"':"")+` />
</svg>`;at.innerHTML=Pt,me.appendChild(at),_e.styleBoxes.push(me)}),Te},ke.prototype.setCurrentStyle=function(_e,Te){var Fe=this;this.currentStyle=_e,this.styleBoxes.forEach(function(me){me.style.borderColor=me===Te?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ke}(ye),Ae=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.strokeColor=Fe.defaultColor,me.strokeWidth=Fe.defaultStrokeWidth,me.strokeDasharray=Fe.defaultStrokeDasharray,me.strokePanel=new we("Line color",Fe.defaultColorSet,Fe.defaultColor),me.strokePanel.onColorChanged=me.setStrokeColor,me.strokeWidthPanel=new Se("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),me.strokeWidthPanel.onWidthChanged=me.setStrokeWidth,me.strokeStylePanel=new Ie("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),me.strokeStylePanel.onStyleChanged=me.setStrokeDasharray,me}return xe(ke,Xe),Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Xe.prototype.getState.call(this);return _e.typeName=ke.typeName,_e},ke.typeName="FrameMarker",ke.title="Frame marker",ke.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ke}(Re),it=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"},Ue=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.x1=0,me.y1=0,me.x2=0,me.y2=0,me.defaultLength=50,me.manipulationStartX=0,me.manipulationStartY=0,me.manipulationStartX1=0,me.manipulationStartY1=0,me.manipulationStartX2=0,me.manipulationStartY2=0,me.setupControlBox(),me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){return!!Xe.prototype.ownsTarget.call(this,_e)||!(!this.grip1.ownsTarget(_e)&&!this.grip2.ownsTarget(_e))},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.manipulationStartX=_e.x,this.manipulationStartY=_e.y,this.state==="new"&&(this.x1=_e.x,this.y1=_e.y,this.x2=_e.x,this.y2=_e.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(Te)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Te)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ke.prototype.pointerUp=function(_e){var Te=this.state;Xe.prototype.pointerUp.call(this,_e),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(_e),this._state="select",Te==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ke.prototype.adjustVisual=function(){},ke.prototype.manipulate=function(_e){this.state==="creating"?this.resize(_e):this.state==="move"?(this.x1=this.manipulationStartX1+_e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+_e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+_e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+_e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(_e)},ke.prototype.resize=function(_e){switch(this.activeGrip){case this.grip1:this.x1=_e.x,this.y1=_e.y;break;case this.grip2:case void 0:this.x2=_e.x,this.y2=_e.y}this.adjustVisual(),this.adjustControlBox()},ke.prototype.select=function(){Xe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ke.prototype.deselect=function(){Xe.prototype.deselect.call(this),this.controlBox.style.display="none"},ke.prototype.setupControlBox=function(){this.controlBox=he.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ke.prototype.adjustControlBox=function(){this.positionGrips()},ke.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ke.prototype.createGrip=function(){var _e=new $e;return _e.visual.transform.baseVal.appendItem(he.createTransform()),this.controlBox.appendChild(_e.visual),_e},ke.prototype.positionGrips=function(){var _e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-_e/2,this.y1-_e/2),this.positionGrip(this.grip2.visual,this.x2-_e/2,this.y2-_e/2)},ke.prototype.positionGrip=function(_e,Te,Fe){var me=_e.transform.baseVal.getItem(0);me.setTranslate(Te,Fe),_e.transform.baseVal.replaceItem(me,0)},ke.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Xe.prototype.getState.call(this))},ke.prototype.restoreState=function(_e){Xe.prototype.restoreState.call(this,_e);var Te=_e;this.x1=Te.x1,this.y1=Te.y1,this.x2=Te.x2,this.y2=Te.y2},ke.prototype.scale=function(_e,Te){Xe.prototype.scale.call(this,_e,Te),this.x1=this.x1*_e,this.y1=this.y1*Te,this.x2=this.x2*_e,this.y2=this.y2*Te,this.adjustVisual(),this.adjustControlBox()},ke}(Be),gt=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.strokeColor="transparent",me.strokeWidth=0,me.strokeDasharray="",me.setStrokeColor=me.setStrokeColor.bind(me),me.setStrokeWidth=me.setStrokeWidth.bind(me),me.setStrokeDasharray=me.setStrokeDasharray.bind(me),me.strokeColor=Fe.defaultColor,me.strokeWidth=Fe.defaultStrokeWidth,me.strokeDasharray=Fe.defaultStrokeDasharray,me.strokePanel=new we("Line color",Fe.defaultColorSet,Fe.defaultColor),me.strokePanel.onColorChanged=me.setStrokeColor,me.strokeWidthPanel=new Se("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),me.strokeWidthPanel.onWidthChanged=me.setStrokeWidth,me.strokeStylePanel=new Ie("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),me.strokeStylePanel.onStyleChanged=me.setStrokeDasharray,me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){return!(!Xe.prototype.ownsTarget.call(this,_e)&&_e!==this.visual&&_e!==this.selectorLine&&_e!==this.visibleLine)},ke.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorLine=he.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=he.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)},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ke.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()),he.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ke.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.adjustVisual(),this.colorChanged(_e)},ke.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.adjustVisual()},ke.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Xe.prototype.getState.call(this));return _e.typeName=ke.typeName,_e},ke.prototype.restoreState=function(_e){Xe.prototype.restoreState.call(this,_e);var Te=_e;this.strokeColor=Te.strokeColor,this.strokeWidth=Te.strokeWidth,this.strokeDasharray=Te.strokeDasharray,this.createVisual(),this.adjustVisual()},ke.typeName="LineMarker",ke.title="Line marker",ke.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ke}(Ue),Ve=function(Xe){function ke(_e,Te,Fe,me){var at=Xe.call(this,_e,me||'<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 at.fonts=[],at.fontBoxes=[],at.fonts=Te,at.currentFont=Fe,at.setCurrentFont=at.setCurrentFont.bind(at),at}return xe(ke,Xe),ke.prototype.getUi=function(){var _e=this,Te=document.createElement("div");return Te.style.overflow="hidden",Te.style.flexGrow="2",this.fonts.forEach(function(Fe){var me=document.createElement("div");me.style.display="inline-block",me.style.alignItems="center",me.style.justifyContent="space-between",me.style.padding="5px",me.style.borderWidth="2px",me.style.borderStyle="solid",me.style.overflow="hidden",me.style.maxWidth=100/_e.fonts.length-5+"%",me.style.borderColor=Fe===_e.currentFont?_e.uiStyleSettings.toolboxAccentColor:"transparent",me.addEventListener("click",function(){_e.setCurrentFont(Fe,me)}),Te.appendChild(me);var at=document.createElement("div");at.style.display="flex",at.style.minHeight="20px",at.style.flexGrow="2",at.style.fontFamily=Fe,at.style.overflow="hidden";var Pt=document.createElement("div");Pt.style.whiteSpace="nowrap",Pt.style.overflow="hidden",Pt.style.textOverflow="ellipsis",Pt.innerHTML="The quick brown fox jumps over the lazy dog",at.appendChild(Pt),me.appendChild(at),_e.fontBoxes.push(me)}),Te},ke.prototype.setCurrentFont=function(_e,Te){var Fe=this;this.currentFont=_e,this.fontBoxes.forEach(function(me){me.style.borderColor=me===Te?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ke}(ye),Tt=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.color="transparent",me.padding=5,me.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",me.text=me.DEFAULT_TEXT,me.isMoved=!1,me.color=Fe.defaultColor,me.fontFamily=Fe.defaultFontFamily,me.defaultSize={x:100,y:30},me.setColor=me.setColor.bind(me),me.setFont=me.setFont.bind(me),me.renderText=me.renderText.bind(me),me.sizeText=me.sizeText.bind(me),me.textEditDivClicked=me.textEditDivClicked.bind(me),me.showTextEditor=me.showTextEditor.bind(me),me.setSize=me.setSize.bind(me),me.positionTextEditor=me.positionTextEditor.bind(me),me.colorPanel=new we("Color",Fe.defaultColorSet,Fe.defaultColor),me.colorPanel.onColorChanged=me.setColor,me.fontFamilyPanel=new Ve("Font",Fe.defaultFontFamilies,Fe.defaultFontFamily),me.fontFamilyPanel.onFontChanged=me.setFont,me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){if(Xe.prototype.ownsTarget.call(this,_e)||_e===this.visual||_e===this.textElement||_e===this.bgRectangle)return!0;var Te=!1;return this.textElement.childNodes.forEach(function(Fe){Fe===_e&&(Te=!0)}),Te},ke.prototype.createVisual=function(){this.visual=he.createGroup(),this.bgRectangle=he.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=he.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.isMoved=!1,this.pointerDownPoint=_e,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(_e),this._state="creating")},ke.prototype.renderText=function(){var _e=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(Te){_e.textElement.appendChild(he.createTSpan(Te.trim()===""?" ":Te.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ke.prototype.getTextScale=function(){var _e=this.textElement.getBBox(),Te=1;if(_e.width>0&&_e.height>0){var Fe=(1*this.width-this.width*this.padding*2/100)/_e.width,me=(1*this.height-this.height*this.padding*2/100)/_e.height;Te=Math.min(Fe,me)}return Te},ke.prototype.getTextPosition=function(_e){var Te=this.textElement.getBBox(),Fe=0,me=0;return Te.width>0&&Te.height>0&&(Fe=(this.width-Te.width*_e)/2,me=this.height/2-Te.height*_e/2),{x:Fe,y:me}},ke.prototype.sizeText=function(){var _e=this.textElement.getBBox(),Te=this.getTextScale(),Fe=this.getTextPosition(Te);Fe.y-=_e.y*Te,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Fe.x+"px, "+Fe.y+"px) scale("+Te+", "+Te+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Fe.x,Fe.y),this.textElement.transform.baseVal.getItem(1).setScale(Te,Te))},ke.prototype.manipulate=function(_e){Xe.prototype.manipulate.call(this,_e),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(_e.x-this.pointerDownPoint.x)>5||Math.abs(_e.y-this.pointerDownPoint.y)>5)},ke.prototype.resize=function(_e){Xe.prototype.resize.call(this,_e),this.isMoved=!0,this.setSize(),this.sizeText()},ke.prototype.setSize=function(){Xe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ke.prototype.pointerUp=function(_e){var Te=this.state;Te==="creating"&&(this._suppressMarkerCreateEvent=!0),Xe.prototype.pointerUp.call(this,_e),this.setSize(),(Te==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ke.prototype.showTextEditor=function(){var _e=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(Te){Te.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Te=Number.parseFloat(_e.textEditor.style.fontSize);_e.textEditor.clientWidth>=Number.parseInt(_e.textEditor.style.maxWidth)&&Te>.9;)Te-=.1,_e.textEditor.style.fontSize=Math.max(Te,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Te){Te.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Te){if(Te.clipboardData){var Fe=Te.clipboardData.getData("text"),me=window.getSelection();if(!me.rangeCount)return!1;me.deleteFromDocument(),me.getRangeAt(0).insertNode(document.createTextNode(Fe)),Te.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){_e.textEditDivClicked(_e.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ke.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var _e=this.getTextScale(),Te=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Fe=this.textElement.getBBox(),me={x:Fe.width*_e,y:Fe.height*_e};Te.x-=me.x/2,Te.y-=me.y/2,this.textEditor.style.top=Te.y+"px",this.textEditor.style.left=Te.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Te.x+"px",this.textEditor.style.fontSize=Math.max(16*_e,12)+"px",this.textElement.style.display="none"}},ke.prototype.textEditDivClicked=function(_e){this.text=_e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ke.prototype.select=function(){Xe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ke.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Xe.prototype.deselect.call(this)},ke.prototype.dblClick=function(_e,Te){Xe.prototype.dblClick.call(this,_e,Te),this.showTextEditor()},ke.prototype.setColor=function(_e){this.textElement&&he.setAttributes(this.textElement,[["fill",_e]]),this.color=_e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(_e)},ke.prototype.setFont=function(_e){this.textElement&&he.setAttributes(this.textElement,[["font-family",_e]]),this.fontFamily=_e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ke.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ke.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Xe.prototype.getState.call(this));return _e.typeName=ke.typeName,_e},ke.prototype.restoreState=function(_e){var Te=_e;this.color=Te.color,this.fontFamily=Te.fontFamily,this.padding=Te.padding,this.text=Te.text,this.createVisual(),Xe.prototype.restoreState.call(this,_e),this.setSize()},ke.prototype.scale=function(_e,Te){Xe.prototype.scale.call(this,_e,Te),this.setSize(),this.sizeText(),this.positionTextEditor()},ke.typeName="TextMarker",ke.title="Text marker",ke.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>',ke}(Ne),ct=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.color="transparent",me.lineWidth=3,me.drawing=!1,me.pixelRatio=1,me.color=Fe.defaultColor,me.lineWidth=Fe.defaultStrokeWidth,me.pixelRatio=Fe.freehandPixelRatio,me.setColor=me.setColor.bind(me),me.addCanvas=me.addCanvas.bind(me),me.finishCreation=me.finishCreation.bind(me),me.setLineWidth=me.setLineWidth.bind(me),me.colorPanel=new we("Color",Fe.defaultColorSet,Fe.defaultColor),me.colorPanel.onColorChanged=me.setColor,me.lineWidthPanel=new Se("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),me.lineWidthPanel.onWidthChanged=me.setLineWidth,me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){return!(!Xe.prototype.ownsTarget.call(this,_e)&&_e!==this.visual&&_e!==this.drawingImage)},ke.prototype.createVisual=function(){this.visual=he.createGroup(),this.drawingImage=he.createImage(),this.visual.appendChild(this.drawingImage);var _e=he.createTransform();this.visual.transform.baseVal.appendItem(_e),this.addMarkerVisualToContainer(this.visual)},ke.prototype.pointerDown=function(_e,Te){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(_e.x,_e.y),this.drawing=!0):Xe.prototype.pointerDown.call(this,_e,Te)},ke.prototype.manipulate=function(_e){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(_e.x,_e.y),this.canvasContext.stroke()):Xe.prototype.manipulate.call(this,_e)},ke.prototype.resize=function(_e){Xe.prototype.resize.call(this,_e),he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ke.prototype.pointerUp=function(_e){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Xe.prototype.pointerUp.call(this,_e)},ke.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)},ke.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Xe.prototype.select.call(this)},ke.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Xe.prototype.deselect.call(this)},ke.prototype.finishCreation=function(){for(var _e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Te=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Fe=Te[0],me=Te[1],at=Te[2],Pt=Te[3],Qe=!1,Je=0;Je<this.canvasElement.height;Je++)for(var xt=0;xt<this.canvasElement.width;xt++)_e.data[Je*this.canvasElement.width*4+4*xt+3]>0&&(Qe=!0,Je<me&&(me=Je),xt<Fe&&(Fe=xt),Je>Pt&&(Pt=Je),xt>at&&(at=xt));if(Qe){this.left=Fe/this.pixelRatio,this.top=me/this.pixelRatio,this.width=(at-Fe)/this.pixelRatio,this.height=(Pt-me)/this.pixelRatio;var ot=document.createElement("canvas");ot.width=at-Fe,ot.height=Pt-me,ot.getContext("2d").putImageData(this.canvasContext.getImageData(Fe,me,at-Fe,Pt-me),0,0),this.drawingImgUrl=ot.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ke.prototype.setDrawingImage=function(){he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ke.prototype.setColor=function(_e){this.color=_e,this.colorChanged(_e)},ke.prototype.setLineWidth=function(_e){this.lineWidth=_e},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Object.assign({drawingImgUrl:this.drawingImgUrl},Xe.prototype.getState.call(this));return _e.typeName=ke.typeName,_e},ke.prototype.restoreState=function(_e){this.createVisual(),Xe.prototype.restoreState.call(this,_e),this.drawingImgUrl=_e.drawingImgUrl,this.setDrawingImage()},ke.prototype.scale=function(_e,Te){Xe.prototype.scale.call(this,_e,Te),this.setDrawingImage()},ke.typeName="FreehandMarker",ke.title="Freehand marker",ke.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>',ke}(Ne),Ot=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Fe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return me.typeBoxes=[],me.currentType=Te,me.setCurrentType=me.setCurrentType.bind(me),me}return xe(ke,Xe),ke.prototype.getUi=function(){var _e=this,Te=document.createElement("div");Te.style.display="flex",Te.style.overflow="hidden",Te.style.flexGrow="2";for(var Fe=function(Pt){var Qe="both";switch(Pt){case 0:Qe="both";break;case 1:Qe="start";break;case 2:Qe="end";break;case 3:Qe="none"}var Je=document.createElement("div");if(Je.style.display="flex",Je.style.flexGrow="2",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.borderColor=Qe===me.currentType?me.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){_e.setCurrentType(Qe,Je)}),Te.appendChild(Je),Qe==="both"||Qe==="start"){var xt=document.createElement("div");xt.style.display="flex",xt.style.alignItems="center",xt.style.minHeight="20px",xt.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="`+(me.uiStyleSettings!==void 0?me.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,xt.style.marginLeft="5px",Je.appendChild(xt)}var ot=document.createElement("div");ot.style.display="flex",ot.style.alignItems="center",ot.style.minHeight="20px",ot.style.flexGrow="2";var mt=document.createElement("hr");if(mt.style.minWidth="20px",mt.style.border="0px",mt.style.borderTop="3px solid "+(me.uiStyleSettings!==void 0?me.uiStyleSettings.toolboxColor:"#eeeeee"),mt.style.flexGrow="2",ot.appendChild(mt),Je.appendChild(ot),Qe==="both"||Qe==="end"){var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.minHeight="20px",Nt.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="`+(me.uiStyleSettings!==void 0?me.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Nt.style.marginRight="5px",Je.appendChild(Nt)}me.typeBoxes.push(Je)},me=this,at=0;at<4;at++)Fe(at);return Te},ke.prototype.setCurrentType=function(_e,Te){var Fe=this;this.currentType=_e,this.typeBoxes.forEach(function(me){me.style.borderColor=me===Te?Fe.uiStyleSettings!==void 0?Fe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ke}(ye),We=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.arrowType="end",me.arrowBaseHeight=10,me.arrowBaseWidth=10,me.getArrowPoints=me.getArrowPoints.bind(me),me.setArrowType=me.setArrowType.bind(me),me.arrowTypePanel=new Ot("Arrow type","end"),me.arrowTypePanel.onArrowTypeChanged=me.setArrowType,me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){return!(!Xe.prototype.ownsTarget.call(this,_e)&&_e!==this.arrow1&&_e!==this.arrow2)},ke.prototype.getArrowPoints=function(_e,Te){var Fe=this.arrowBaseWidth+2*this.strokeWidth,me=this.arrowBaseHeight+2*this.strokeWidth;return _e-Fe/2+","+(Te+me/2)+" "+_e+","+(Te-me/2)+" "+(_e+Fe/2)+","+(Te+me/2)},ke.prototype.createTips=function(){this.arrow1=he.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=he.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow2)},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.state==="creating"&&this.createTips()},ke.prototype.adjustVisual=function(){if(Xe.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",he.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),he.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var _e=0;Math.abs(this.x1-this.x2)>.1&&(_e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Te=this.arrow1.transform.baseVal.getItem(0);Te.setRotate(_e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Te,0);var Fe=this.arrow2.transform.baseVal.getItem(0);Fe.setRotate(_e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Fe,0)}},ke.prototype.setArrowType=function(_e){this.arrowType=_e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Object.assign({arrowType:this.arrowType},Xe.prototype.getState.call(this));return _e.typeName=ke.typeName,_e},ke.prototype.restoreState=function(_e){Xe.prototype.restoreState.call(this,_e);var Te=_e;this.arrowType=Te.arrowType,this.createTips(),this.adjustVisual()},ke.typeName="ArrowMarker",ke.title="Arrow marker",ke.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ke}(gt),lt=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.fillColor=Fe.defaultFillColor,me.strokeWidth=0,me.fillPanel=new we("Color",Fe.defaultColorSet,Fe.defaultFillColor),me.fillPanel.onColorChanged=me.setFillColor,me}return xe(ke,Xe),Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Xe.prototype.getState.call(this);return _e.typeName=ke.typeName,_e},ke.typeName="CoverMarker",ke.title="Cover marker",ke.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ke}(Re),ut=function(Xe){function ke(_e,Te,Fe,me){var at=Xe.call(this,_e,me||'<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 at.opacities=[],at.opacityBoxes=[],at.opacities=Te,at.currentOpacity=Fe,at.setCurrentOpacity=at.setCurrentOpacity.bind(at),at}return xe(ke,Xe),ke.prototype.getUi=function(){var _e=this,Te=document.createElement("div");return Te.style.display="flex",Te.style.overflow="hidden",Te.style.flexGrow="2",Te.style.justifyContent="space-between",this.opacities.forEach(function(Fe){var me=document.createElement("div");me.style.display="flex",me.style.alignItems="center",me.style.justifyContent="center",me.style.padding="5px",me.style.borderWidth="2px",me.style.borderStyle="solid",me.style.borderColor=Fe===_e.currentOpacity?_e.uiStyleSettings.toolboxAccentColor:"transparent",me.addEventListener("click",function(){_e.setCurrentOpacity(Fe,me)}),Te.appendChild(me);var at=document.createElement("div");at.innerText=100*Fe+"%",me.appendChild(at),_e.opacityBoxes.push(me)}),Te},ke.prototype.setCurrentOpacity=function(_e,Te){var Fe=this;this.currentOpacity=_e,this.opacityBoxes.forEach(function(me){me.style.borderColor=me===Te?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ke}(ye),St=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.setOpacity=me.setOpacity.bind(me),me.fillColor=Fe.defaultHighlightColor,me.strokeWidth=0,me.opacity=Fe.defaultHighlightOpacity,me.fillPanel=new we("Color",Fe.defaultColorSet,me.fillColor),me.fillPanel.onColorChanged=me.setFillColor,me.opacityPanel=new ut("Opacity",Fe.defaultOpacitySteps,me.opacity),me.opacityPanel.onOpacityChanged=me.setOpacity,me}return xe(ke,Xe),ke.prototype.setOpacity=function(_e){this.opacity=_e,this.visual&&he.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Xe.prototype.getState.call(this);return _e.typeName=ke.typeName,_e},ke.typeName="HighlightMarker",ke.title="Highlight marker",ke.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>',ke}(lt),qe='<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>',Ze='<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>',wt=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.bgColor="transparent",me.tipPosition={x:0,y:0},me.tipBase1Position={x:0,y:0},me.tipBase2Position={x:0,y:0},me.tipMoving=!1,me.color=Fe.defaultStrokeColor,me.bgColor=Fe.defaultFillColor,me.fontFamily=Fe.defaultFontFamily,me.defaultSize={x:100,y:30},me.setBgColor=me.setBgColor.bind(me),me.getTipPoints=me.getTipPoints.bind(me),me.positionTip=me.positionTip.bind(me),me.setTipPoints=me.setTipPoints.bind(me),me.colorPanel=new we("Text color",Fe.defaultColorSet,me.color,qe),me.colorPanel.onColorChanged=me.setColor,me.bgColorPanel=new we("Fill color",Fe.defaultColorSet,me.bgColor,Ze),me.bgColorPanel.onColorChanged=me.setBgColor,me.fontFamilyPanel=new Ve("Font",Fe.defaultFontFamilies,Fe.defaultFontFamily),me.fontFamilyPanel.onFontChanged=me.setFont,me.tipGrip=new $e,me.tipGrip.visual.transform.baseVal.appendItem(he.createTransform()),me.controlBox.appendChild(me.tipGrip.visual),me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){return Xe.prototype.ownsTarget.call(this,_e)||this.tipGrip.ownsTarget(_e)||this.tip===_e},ke.prototype.createTip=function(){he.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=he.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ke.prototype.pointerDown=function(_e,Te){this.state==="new"&&Xe.prototype.pointerDown.call(this,_e,Te),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Te)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Xe.prototype.pointerDown.call(this,_e,Te)},ke.prototype.pointerUp=function(_e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Xe.prototype.pointerUp.call(this,_e);else{var Te=this.state==="creating";Xe.prototype.pointerUp.call(this,_e),this.setTipPoints(Te),this.positionTip()}},ke.prototype.manipulate=function(_e){if(this.tipMoving){var Te=this.unrotatePoint(_e);this.tipPosition={x:Te.x-this.manipulationStartLeft,y:Te.y-this.manipulationStartTop},this.positionTip()}else Xe.prototype.manipulate.call(this,_e)},ke.prototype.setBgColor=function(_e){this.bgRectangle&&this.tip&&(he.setAttributes(this.bgRectangle,[["fill",_e]]),he.setAttributes(this.tip,[["fill",_e]])),this.bgColor=_e,this.fillColorChanged(_e)},ke.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},ke.prototype.setTipPoints=function(_e){_e===void 0&&(_e=!1);var Te=Math.min(this.height/2,15),Fe=this.height/5;_e&&(this.tipPosition={x:Te+Fe/2,y:this.height+20});var me=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?me<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Fe=this.width/5,Te=Math.min(this.width/2,15),this.tipBase1Position={x:Te,y:0},this.tipBase2Position={x:Te+Fe,y:0}):(this.tipBase1Position={x:0,y:Te},this.tipBase2Position={x:0,y:Te+Fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?me<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Fe=this.width/5,Te=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Te-Fe,y:0},this.tipBase2Position={x:this.width-Te,y:0}):(this.tipBase1Position={x:this.width,y:Te},this.tipBase2Position={x:this.width,y:Te+Fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?me<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Fe=this.width/5,Te=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Te-Fe,y:this.height},this.tipBase2Position={x:this.width-Te,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Te-Fe},this.tipBase2Position={x:this.width,y:this.height-Te}):me<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Fe=this.width/5,Te=Math.min(this.width/2,15),this.tipBase1Position={x:Te,y:this.height},this.tipBase2Position={x:Te+Fe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Te},this.tipBase2Position={x:0,y:this.height-Te-Fe})},ke.prototype.resize=function(_e){Xe.prototype.resize.call(this,_e),this.positionTip()},ke.prototype.positionTip=function(){he.setAttributes(this.tip,[["points",this.getTipPoints()]]);var _e=this.tipGrip.visual.transform.baseVal.getItem(0);_e.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(_e,0)},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ke.prototype.select=function(){this.positionTip(),Xe.prototype.select.call(this)},ke.prototype.getState=function(){var _e=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Xe.prototype.getState.call(this));return _e.typeName=ke.typeName,_e},ke.prototype.restoreState=function(_e){var Te=_e;this.bgColor=Te.bgColor,this.tipPosition=Te.tipPosition,Xe.prototype.restoreState.call(this,_e),this.createTip(),this.setTipPoints()},ke.prototype.scale=function(_e,Te){Xe.prototype.scale.call(this,_e,Te),this.tipPosition={x:this.tipPosition.x*_e,y:this.tipPosition.y*Te},this.positionTip()},ke.typeName="CalloutMarker",ke.title="Callout marker",ke.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>',ke}(Tt),Wt=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.fillColor="transparent",me.strokeColor="transparent",me.strokeWidth=0,me.strokeDasharray="",me.opacity=1,me.strokeColor=Fe.defaultColor,me.strokeWidth=Fe.defaultStrokeWidth,me.strokeDasharray=Fe.defaultStrokeDasharray,me.fillColor=Fe.defaultFillColor,me.setStrokeColor=me.setStrokeColor.bind(me),me.setFillColor=me.setFillColor.bind(me),me.setStrokeWidth=me.setStrokeWidth.bind(me),me.setStrokeDasharray=me.setStrokeDasharray.bind(me),me.setOpacity=me.setOpacity.bind(me),me.createVisual=me.createVisual.bind(me),me.strokePanel=new we("Line color",fe(Fe.defaultColorSet,["transparent"]),Fe.defaultColor),me.strokePanel.onColorChanged=me.setStrokeColor,me.fillPanel=new we("Fill color",fe(Fe.defaultColorSet,["transparent"]),me.fillColor,Ze),me.fillPanel.onColorChanged=me.setFillColor,me.strokeWidthPanel=new Se("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),me.strokeWidthPanel.onWidthChanged=me.setStrokeWidth,me.strokeStylePanel=new Ie("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),me.strokeStylePanel.onStyleChanged=me.setStrokeDasharray,me.opacityPanel=new ut("Opacity",Fe.defaultOpacitySteps,me.opacity),me.opacityPanel.onOpacityChanged=me.setOpacity,me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){return!(!Xe.prototype.ownsTarget.call(this,_e)&&_e!==this.visual)},ke.prototype.createVisual=function(){this.visual=he.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)},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.state==="new"&&(this.createVisual(),this.moveVisual(_e),this._state="creating")},ke.prototype.manipulate=function(_e){Xe.prototype.manipulate.call(this,_e)},ke.prototype.resize=function(_e){Xe.prototype.resize.call(this,_e),this.setSize()},ke.prototype.setSize=function(){Xe.prototype.setSize.call(this),he.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ke.prototype.pointerUp=function(_e){Xe.prototype.pointerUp.call(this,_e),this.setSize()},ke.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.visual&&he.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(_e),this.stateChanged()},ke.prototype.setFillColor=function(_e){this.fillColor=_e,this.visual&&he.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(_e),this.stateChanged()},ke.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.visual&&he.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ke.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.visual&&he.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ke.prototype.setOpacity=function(_e){this.opacity=_e,this.visual&&he.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Xe.prototype.getState.call(this));return _e.typeName=ke.typeName,_e},ke.prototype.restoreState=function(_e){var Te=_e;this.fillColor=Te.fillColor,this.strokeColor=Te.strokeColor,this.strokeWidth=Te.strokeWidth,this.strokeDasharray=Te.strokeDasharray,this.opacity=Te.opacity,this.createVisual(),Xe.prototype.restoreState.call(this,_e),this.setSize()},ke.prototype.scale=function(_e,Te){Xe.prototype.scale.call(this,_e,Te),this.setSize()},ke.typeName="EllipseMarker",ke.title="Ellipse marker",ke.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>',ke}(Ne),Kt=function(Xe){function ke(_e,Te,Fe){return Xe.call(this,_e,Te,Fe)||this}return xe(ke,Xe),Object.defineProperty(ke.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ke.prototype.ownsTarget=function(_e){return!(!Xe.prototype.ownsTarget.call(this,_e)&&_e!==this.tip1&&_e!==this.tip2)},ke.prototype.createTips=function(){this.tip1=he.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(he.createTransform()),this.visual.appendChild(this.tip1),this.tip2=he.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(he.createTransform()),this.visual.appendChild(this.tip2)},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.state==="creating"&&this.createTips()},ke.prototype.adjustVisual=function(){if(Xe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(he.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()]]),he.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 _e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Te=this.tip1.transform.baseVal.getItem(0);Te.setRotate(_e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Te,0);var Fe=this.tip2.transform.baseVal.getItem(0);Fe.setRotate(_e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Fe,0)}},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Xe.prototype.getState.call(this);return _e.typeName=ke.typeName,_e},ke.prototype.restoreState=function(_e){Xe.prototype.restoreState.call(this,_e),this.createTips(),this.adjustVisual()},ke.typeName="MeasurementMarker",ke.title="Measurement marker",ke.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>',ke}(gt),_t=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.strokePanel.colors=Fe.defaultColorSet,me.fillColor="transparent",me}return xe(ke,Xe),Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Xe.prototype.getState.call(this);return _e.typeName=ke.typeName,_e},ke.typeName="EllipseFrameMarker",ke.title="Ellipse frame marker",ke.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>',ke}(Wt),vt=function(){function Xe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Xe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Xe.prototype.addUndoStep=function(ke){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ke)||(this.undoStack.push(ke),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ke)&&this.redoStack.splice(0,this.redoStack.length))},Xe.prototype.replaceLastUndoStep=function(ke){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ke)},Xe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Xe.prototype.undo=function(){if(this.undoStack.length>1){var ke=this.undoStack.pop();return ke!==void 0&&this.redoStack.push(ke),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Xe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Xe}(),jt=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.strokeColor="transparent",me.strokeWidth=0,me.strokeDasharray="",me.curveX=0,me.curveY=0,me.manipulationStartCurveX=0,me.manipulationStartCurveY=0,me.setStrokeColor=me.setStrokeColor.bind(me),me.setStrokeWidth=me.setStrokeWidth.bind(me),me.setStrokeDasharray=me.setStrokeDasharray.bind(me),me.positionGrips=me.positionGrips.bind(me),me.addControlGrips=me.addControlGrips.bind(me),me.adjustVisual=me.adjustVisual.bind(me),me.setupControlBox=me.setupControlBox.bind(me),me.resize=me.resize.bind(me),me.strokeColor=Fe.defaultColor,me.strokeWidth=Fe.defaultStrokeWidth,me.strokeDasharray=Fe.defaultStrokeDasharray,me.strokePanel=new we("Line color",Fe.defaultColorSet,Fe.defaultColor),me.strokePanel.onColorChanged=me.setStrokeColor,me.strokeWidthPanel=new Se("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),me.strokeWidthPanel.onWidthChanged=me.setStrokeWidth,me.strokeStylePanel=new Ie("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),me.strokeStylePanel.onStyleChanged=me.setStrokeDasharray,me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){return!(!Xe.prototype.ownsTarget.call(this,_e)&&_e!==this.visual&&_e!==this.selectorCurve&&_e!==this.visibleCurve&&!this.curveGrip.ownsTarget(_e))},ke.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ke.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorCurve=he.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=he.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)},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=_e.x,this.curveY=_e.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Te)&&(this.activeGrip=this.curveGrip,this._state="resize")},ke.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),he.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ke.prototype.setupControlBox=function(){Xe.prototype.setupControlBox.call(this),this.curveControlLine1=he.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=he.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)},ke.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Xe.prototype.addControlGrips.call(this)},ke.prototype.positionGrips=function(){Xe.prototype.positionGrips.call(this);var _e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-_e/2,this.curveY-_e/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()))},ke.prototype.manipulate=function(_e){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+_e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+_e.y-this.manipulationStartY),Xe.prototype.manipulate.call(this,_e)},ke.prototype.resize=function(_e){this.activeGrip===this.curveGrip&&(this.curveX=_e.x,this.curveY=_e.y),Xe.prototype.resize.call(this,_e),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ke.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.adjustVisual(),this.colorChanged(_e)},ke.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.adjustVisual()},ke.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.adjustVisual()},ke.prototype.scale=function(_e,Te){this.curveX=this.curveX*_e,this.curveY=this.curveY*Te,Xe.prototype.scale.call(this,_e,Te)},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Xe.prototype.getState.call(this));return _e.typeName=ke.typeName,_e},ke.prototype.restoreState=function(_e){Xe.prototype.restoreState.call(this,_e);var Te=_e;this.strokeColor=Te.strokeColor,this.strokeWidth=Te.strokeWidth,this.strokeDasharray=Te.strokeDasharray,this.curveX=Te.curveX,this.curveY=Te.curveY,this.createVisual(),this.adjustVisual()},ke.typeName="CurveMarker",ke.title="Curve marker",ke.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>',ke}(Ue),yn=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,Te,Fe)||this;return me.fillColor="transparent",me.strokeColor="transparent",me.strokeWidth=0,me.strokeDasharray="",me.textColor="transparent",me.fontSize="1rem",me.isMoved=!1,me.captionText="Caption",me.PADDING=5,me.captionBoxWidth=0,me.captionBoxHeight=0,me.strokeColor=Fe.defaultColor,me.strokeWidth=Fe.defaultStrokeWidth,me.strokeDasharray=Fe.defaultStrokeDasharray,me.fillColor=Fe.defaultFillColor,me.textColor=Fe.defaultStrokeColor,me.fontFamily=Fe.defaultFontFamily,me.fontSize=Fe.defaultCaptionFontSize,me.captionText=Fe.defaultCaptionText,me.setStrokeColor=me.setStrokeColor.bind(me),me.setFillColor=me.setFillColor.bind(me),me.setStrokeWidth=me.setStrokeWidth.bind(me),me.setStrokeDasharray=me.setStrokeDasharray.bind(me),me.createVisual=me.createVisual.bind(me),me.sizeCaption=me.sizeCaption.bind(me),me.setCaptionText=me.setCaptionText.bind(me),me.showTextEditor=me.showTextEditor.bind(me),me.positionTextEditor=me.positionTextEditor.bind(me),me.finishTextEditing=me.finishTextEditing.bind(me),me.setFont=me.setFont.bind(me),me.setTextColor=me.setTextColor.bind(me),me.strokePanel=new we("Line color",fe(Fe.defaultColorSet,["transparent"]),me.strokeColor),me.strokePanel.onColorChanged=me.setStrokeColor,me.fillPanel=new we("Fill color",fe(Fe.defaultColorSet,["transparent"]),me.fillColor,Ze),me.fillPanel.onColorChanged=me.setFillColor,me.strokeWidthPanel=new Se("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),me.strokeWidthPanel.onWidthChanged=me.setStrokeWidth,me.strokeStylePanel=new Ie("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),me.strokeStylePanel.onStyleChanged=me.setStrokeDasharray,me.fontFamilyPanel=new Ve("Font",Fe.defaultFontFamilies,Fe.defaultFontFamily),me.fontFamilyPanel.onFontChanged=me.setFont,me.textColorPanel=new we("Text color",Fe.defaultColorSet,me.textColor,qe),me.textColorPanel.onColorChanged=me.setTextColor,me}return xe(ke,Xe),ke.prototype.ownsTarget=function(_e){return!(!Xe.prototype.ownsTarget.call(this,_e)&&_e!==this.visual&&_e!==this.frame&&_e!==this.captionBg&&_e!==this.captionElement)},ke.prototype.createVisual=function(){this.visual=he.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=he.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=he.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=he.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()},ke.prototype.setCaptionText=function(_e){this.captionText=_e,this.captionElement.textContent=this.captionText,this.sizeCaption()},ke.prototype.pointerDown=function(_e,Te){Xe.prototype.pointerDown.call(this,_e,Te),this.isMoved=!1,this.pointerDownPoint=_e,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(_e),this._state="creating")},ke.prototype.manipulate=function(_e){Xe.prototype.manipulate.call(this,_e),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(_e.x-this.pointerDownPoint.x)>5||Math.abs(_e.y-this.pointerDownPoint.y)>5)},ke.prototype.resize=function(_e){Xe.prototype.resize.call(this,_e),this.setSize()},ke.prototype.sizeCaption=function(){var _e=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=_e.width+2*this.PADDING,this.captionBoxHeight=_e.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),he.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')"]]),he.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')"]])},ke.prototype.showTextEditor=function(){var _e=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(Te){Te.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Te){Te.key==="Enter"&&_e.finishTextEditing(_e.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Te){Te.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){_e.finishTextEditing(_e.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){_e.finishTextEditing(_e.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ke.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"))},ke.prototype.finishTextEditing=function(_e){this.setCaptionText(_e.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ke.prototype.setFont=function(_e){this.captionElement&&he.setAttributes(this.captionElement,[["font-family",_e]]),this.fontFamily=_e,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ke.prototype.setTextColor=function(_e){this.captionElement&&he.setAttributes(this.captionElement,[["fill",_e]]),this.textColor=_e,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ke.prototype.setSize=function(){Xe.prototype.setSize.call(this),he.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ke.prototype.pointerUp=function(_e){Xe.prototype.pointerUp.call(this,_e),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ke.prototype.dblClick=function(_e,Te){Xe.prototype.dblClick.call(this,_e,Te),this.showTextEditor()},ke.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.frame&&he.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(_e),this.stateChanged()},ke.prototype.setFillColor=function(_e){this.fillColor=_e,this.captionBg&&he.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(_e),this.stateChanged()},ke.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.frame&&he.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ke.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.frame&&he.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var _e=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},Xe.prototype.getState.call(this));return _e.typeName=this.typeName,_e},ke.prototype.restoreState=function(_e){var Te=_e;this.fillColor=Te.fillColor,this.strokeColor=Te.strokeColor,this.strokeWidth=Te.strokeWidth,this.strokeDasharray=Te.strokeDasharray,this.textColor=Te.textColor,this.fontFamily=Te.fontFamily,this.captionText=Te.captionText,this.fontSize=Te.fontSize,this.createVisual(),Xe.prototype.restoreState.call(this,_e),this.setSize()},ke.prototype.scale=function(_e,Te){Xe.prototype.scale.call(this,_e,Te),this.setSize()},ke.typeName="CaptionFrameMarker",ke.title="Caption frame marker",ke.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>',ke}(Ne),Xt=function(){function Xe(ke,_e){_e===void 0&&(_e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ke,this.cancelable=_e}return Object.defineProperty(Xe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Xe.prototype.preventDefault=function(){this._defaultPrevented=!0},Xe}(),Ln=function(Xe){function ke(_e,Te,Fe){var me=Xe.call(this,_e,!1)||this;return me.dataUrl=Te,me.state=Fe,me}return xe(ke,Xe),ke}(Xt),pn=function(Xe){function ke(_e,Te,Fe){Fe===void 0&&(Fe=!1);var me=Xe.call(this,_e,Fe)||this;return me.marker=Te,me}return xe(ke,Xe),ke}(Xt),hn=function(){function Xe(){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 Xe.prototype.addEventListener=function(ke,_e){this[ke].push(_e)},Xe.prototype.removeEventListener=function(ke,_e){var Te=this[ke].indexOf(_e);Te>-1&&this[ke].splice(Te,1)},Xe}(),un=function(){function Xe(ke){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new it,this._isOpen=!1,this.undoRedoManager=new vt,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 hn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Xe.instanceCounter++,this.styles=new ve(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ke,this.targetRoot=document.body,this.width=ke.clientWidth,this.height=ke.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(Xe.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ae,ct,We,Tt,_t,Wt,St,wt,Kt,lt,gt,jt,yn]},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ae,ct,We,Tt,Wt,St,wt]},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ae,ct,We,Tt,St]},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ke){var _e=this;this._availableMarkerTypes.splice(0),ke.forEach(function(Te){if(typeof Te=="string"){var Fe=_e.ALL_MARKER_TYPES.find(function(me){return me.typeName===Te});Fe!==void 0&&_e._availableMarkerTypes.push(Fe)}else _e._availableMarkerTypes.push(Te)})},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ke){this._zoomLevel=ke,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(Xe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Xe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ce.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Xe.prototype.show=function(){var ke=this;this.styles.styleSheetRoot===void 0&&se.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=se.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(_e){return _e(new Xt(ke))})},Xe.prototype.render=function(){return Me(this,void 0,void 0,function(){var ke;return Ce(this,function(_e){switch(_e.label){case 0:return this.setCurrentMarker(),(ke=new ae).naturalSize=this.renderAtNaturalSize,ke.imageType=this.renderImageType,ke.imageQuality=this.renderImageQuality,ke.markersOnly=this.renderMarkersOnly,ke.width=this.renderWidth,ke.height=this.renderHeight,[4,ke.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return _e.sent(),[4,ke.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,_e.sent()]}})})},Xe.prototype.close=function(ke){var _e=this;if(ke===void 0&&(ke=!1),this.isOpen){var Te=!1;ke||this.eventListeners.beforeclose.forEach(function(Fe){var me=new Xt(_e,!0);Fe(me),me.defaultPrevented&&(Te=!0)}),Te||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Fe){return Fe(new Xt(_e))}),this.detachEvents(),this._isOpen=!1)}},Xe.prototype.addMarkersToToolbar=function(){for(var ke,_e=[],Te=0;Te<arguments.length;Te++)_e[Te]=arguments[Te];(ke=this._availableMarkerTypes).push.apply(ke,_e)},Xe.prototype.addRenderEventListener=function(ke){this.addEventListener("render",function(_e){ke(_e.dataUrl,_e.state)})},Xe.prototype.removeRenderEventListener=function(ke){},Xe.prototype.addCloseEventListener=function(ke){this.addEventListener("close",function(){ke()})},Xe.prototype.removeCloseEventListener=function(ke){},Xe.prototype.setupResizeObserver=function(){var ke=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ke.resize(ke.target.clientWidth,ke.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ke.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Xe.prototype.onPopupTargetResize=function(){var ke=1*this.target.clientWidth/this.target.clientHeight,_e=this.editorCanvas.clientWidth/ke>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ke:this.editorCanvas.clientWidth,Te=_e<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ke;this.resize(_e,Te)},Xe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Xe.prototype.resize=function(ke,_e){this._isResizing=!0;var Te=ke/this.imageWidth,Fe=_e/this.imageHeight;this.imageWidth=Math.round(ke),this.imageHeight=Math.round(_e),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(Te,Fe),this._isResizing=!1},Xe.prototype.scaleMarkers=function(ke,_e){var Te,Fe=this;this._currentMarker&&this._currentMarker instanceof Tt?this._currentMarker.scale(ke,_e):(Te=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(me){me!==Fe._currentMarker&&me.scale(ke,_e)}),Te!==void 0&&this.setCurrentMarker(Te)},Xe.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"},Xe.prototype.setTopLeft=function(){var ke=this.editingTarget.getBoundingClientRect(),_e=this.editorCanvas.getBoundingClientRect();this.left=ke.left-_e.left,this.top=ke.top-_e.top},Xe.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)},Xe.prototype.addDefs=function(){for(var ke,_e=[],Te=0;Te<arguments.length;Te++)_e[Te]=arguments[Te];this.defs=he.createDefs(),this.addDefsToImage(),(ke=this.defs).append.apply(ke,_e)},Xe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Xe.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)},Xe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Xe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Xe.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)},Xe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Xe.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)},Xe.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 ke=document.createElement("a");ke.href="https://markerjs.com/",ke.target="_blank",ke.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>',ke.title="Powered by marker.js",ke.style.display="grid",ke.style.alignItems="center",ke.style.justifyItems="center",ke.style.padding="3px",ke.style.width="20px",ke.style.height="20px",this.logoUI.appendChild(ke),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Xe.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")},Xe.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"},Xe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Xe.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 ke=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=ke+"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 oe(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 ge(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Xe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Xe.prototype.removeMarker=function(ke){this.markerImage.removeChild(ke.container),this.markers.indexOf(ke)>-1&&this.markers.splice(this.markers.indexOf(ke),1),ke.dispose()},Xe.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())},Xe.prototype.toolbarButtonClicked=function(ke,_e){if(ke==="marker"&&_e!==void 0)this.createNewMarker(_e);else if(ke==="action")switch(_e){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()}},Xe.prototype.deleteSelectedMarker=function(){var ke=this;if(this._currentMarker!==void 0){var _e=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Fe){var me=new pn(ke,ke._currentMarker,!0);Fe(me),me.defaultPrevented&&(_e=!0)}),!_e){var Te=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Fe){return Fe(new pn(ke,Te))})}}},Xe.prototype.clear=function(){var ke=this,_e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(at){var Pt=new pn(ke,void 0,!0);at(Pt),Pt.defaultPrevented&&(_e=!0)}),!_e)){this.setCurrentMarker();for(var Te=function(at){var Pt=Fe.markers[at];Fe.setCurrentMarker(Fe.markers[at]),Fe._currentMarker.dispose(),Fe.markerImage.removeChild(Fe._currentMarker.container),Fe.markers.splice(Fe.markers.indexOf(Fe._currentMarker),1),Fe.eventListeners.markerdelete.forEach(function(Qe){return Qe(new pn(ke,Pt))})},Fe=this,me=this.markers.length-1;me>=0;me--)Te(me);this.addUndoStep()}},Object.defineProperty(Xe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Xe.prototype.showNotesEditor=function(){var ke;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=(ke=this._currentMarker.notes)!==null&&ke!==void 0?ke:"",this.overlayContainer.appendChild(this.notesArea))},Xe.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)},Xe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Xe.prototype.addUndoStep=function(){var ke=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var _e=this.getState(),Te=this.undoRedoManager.getLastUndoStep();if(!Te||Te.width===_e.width&&Te.height===_e.height){var Fe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(_e),Fe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(me){return me(new Xt(ke))})}else this.undoRedoManager.replaceLastUndoStep(_e),this.eventListeners.statechange.forEach(function(me){return me(new Xt(ke))})}},Xe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Xe.prototype.undoStep=function(){var ke=this,_e=this.undoRedoManager.undo();_e!==void 0&&(this.restoreState(_e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Te){return Te(new Xt(ke))}))},Xe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Xe.prototype.redoStep=function(){var ke=this,_e=this.undoRedoManager.redo();_e!==void 0&&(this.restoreState(_e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Te){return Te(new Xt(ke))}))},Xe.prototype.stepZoom=function(){var ke=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ke<this.zoomSteps.length-1?this.zoomSteps[ke+1]:this.zoomSteps[0]},Xe.prototype.panTo=function(ke){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ke.x,top:this.prevPanPoint.y-ke.y}),this.prevPanPoint=ke},Xe.prototype.startRenderAndClose=function(){return Me(this,void 0,void 0,function(){var ke,_e,Te=this;return Ce(this,function(Fe){switch(Fe.label){case 0:return[4,this.render()];case 1:return ke=Fe.sent(),_e=this.getState(),this.eventListeners.render.forEach(function(me){return me(new Ln(Te,ke,_e))}),this.close(!0),[2]}})})},Xe.prototype.getState=function(ke){ke===!0&&this.setCurrentMarker();var _e={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Te){return _e.markers.push(Te.getState())}),_e},Xe.prototype.restoreState=function(ke){var _e=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ke.markers.forEach(function(Te){var Fe=_e._availableMarkerTypes.find(function(at){return at.typeName===Te.typeName});if(Fe!==void 0){var me=_e.addNewMarker(Fe);me.restoreState(Te),_e.markers.push(me)}}),ke.width&&ke.height&&(ke.width!==this.imageWidth||ke.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ke.width,this.imageHeight/ke.height),this.eventListeners.restorestate.forEach(function(Te){return Te(new Xt(_e))})},Xe.prototype.addNewMarker=function(ke){var _e=he.createGroup();return this.markerImage.appendChild(_e),new ke(_e,this.overlayContainer,this.settings)},Xe.prototype.createNewMarker=function(ke){var _e,Te=this;(_e=typeof ke=="string"?this._availableMarkerTypes.find(function(Fe){return Fe.typeName===ke}):ke)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(_e),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(_e.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Fe){return Fe(new pn(Te,Te._currentMarker))}))},Xe.prototype.markerCreated=function(ke){var _e=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ke),this.setCurrentMarker(ke),ke instanceof ct&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ct):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Te){return Te(new pn(_e,_e._currentMarker))})},Xe.prototype.colorChanged=function(ke){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ke,this.settings.defaultStrokeColor=ke)},Xe.prototype.fillColorChanged=function(ke){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ke)},Xe.prototype.markerStateChanged=function(ke){var _e=this;this.eventListeners.markerchange.forEach(function(Te){return Te(new pn(_e,ke))})},Xe.prototype.setCurrentMarker=function(ke){var _e=this;this._currentMarker!==ke&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Te){return Te(new pn(_e,_e._currentMarker))})),this._currentMarker=ke,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(Te){return Te(new pn(_e,_e._currentMarker))}))},Xe.prototype.onPointerDown=function(ke){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ke.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var _e=this.markers.find(function(Te){return Te.ownsTarget(ke.target)});_e!==void 0?(this.setCurrentMarker(_e),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ke.clientX,ke.clientY),ke.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ke.clientX,y:ke.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ke.clientX,ke.clientY))},Xe.prototype.onDblClick=function(ke){if(this._isFocused||this.focus(),this.mode==="select"){var _e=this.markers.find(function(Te){return Te.ownsTarget(ke.target)});_e!==void 0&&_e!==this._currentMarker&&this.setCurrentMarker(_e),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ke.clientX,ke.clientY),ke.target):this.setCurrentMarker()}},Xe.prototype.onPointerMove=function(ke){this.touchPoints!==1&&ke.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ke.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ke.clientX,ke.clientY)):this.zoomLevel>1&&this.panTo({x:ke.clientX,y:ke.clientY}))},Xe.prototype.onPointerUp=function(ke){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ke.clientX,ke.clientY)),this.isDragging=!1,this.addUndoStep()},Xe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Xe.prototype.onKeyUp=function(ke){this._currentMarker===void 0||this.notesArea!==void 0||ke.key!=="Delete"&&ke.key!=="Backspace"||this.deleteSelectedMarker()},Xe.prototype.clientToLocalCoordinates=function(ke,_e){var Te=this.markerImage.getBoundingClientRect();return{x:(ke-Te.left)/this.zoomLevel,y:(_e-Te.top)/this.zoomLevel}},Xe.prototype.onWindowResize=function(){this.positionUI()},Xe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ke=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ke+"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()},Xe.prototype.addLicenseKey=function(ke){ce.addKey(ke)},Xe.prototype.addEventListener=function(ke,_e){this.eventListeners.addEventListener(ke,_e)},Xe.prototype.removeEventListener=function(ke,_e){this.eventListeners.removeEventListener(ke,_e)},Xe.prototype.renderState=function(ke){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ke),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Xe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Xe.prototype.focus=function(){var ke=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(_e){return _e(new Xt(ke))}))},Xe.prototype.blur=function(){var ke=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(_e){return _e(new Xt(ke))}))},Xe.instanceCounter=0,Xe}()},5630:function(gn,kt,ee){"use strict";var ne=ee(60499),xe=ee(85899),Me=ee(18642),Ce=ee(72190),fe=ee(42244),he=ee(92310),ce=ee.n(he),ae=ee(18929),se=ee(59301),ve=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],ue=(0,se.forwardRef)(function(pe,oe){var ge,ye=pe.prefixCls,we=ye===void 0?"rc-checkbox":ye,Be=pe.className,ze=pe.style,$e=pe.checked,Le=pe.disabled,Ne=pe.defaultChecked,Re=Ne===void 0?!1:Ne,Se=pe.type,Ie=Se===void 0?"checkbox":Se,Ae=pe.title,it=pe.onChange,Ue=(0,fe.Z)(pe,ve),gt=(0,se.useRef)(null),Ve=(0,ae.Z)(Re,{value:$e}),Tt=(0,Ce.Z)(Ve,2),ct=Tt[0],Ot=Tt[1];(0,se.useImperativeHandle)(oe,function(){return{focus:function(){var St;(St=gt.current)===null||St===void 0||St.focus()},blur:function(){var St;(St=gt.current)===null||St===void 0||St.blur()},input:gt.current}});var We=ce()(we,Be,(ge={},(0,Me.Z)(ge,"".concat(we,"-checked"),ct),(0,Me.Z)(ge,"".concat(we,"-disabled"),Le),ge)),lt=function(St){Le||("checked"in pe||Ot(St.target.checked),it==null||it({target:(0,xe.Z)((0,xe.Z)({},pe),{},{type:Ie,checked:St.target.checked}),stopPropagation:function(){St.stopPropagation()},preventDefault:function(){St.preventDefault()},nativeEvent:St.nativeEvent}))};return se.createElement("span",{className:We,title:Ae,style:ze},se.createElement("input",(0,ne.Z)({},Ue,{className:"".concat(we,"-input"),ref:gt,onChange:lt,disabled:Le,checked:!!ct,type:Ie})),se.createElement("span",{className:"".concat(we,"-inner")}))});kt.Z=ue},31561:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Ie}});var ne=ee(60499),xe=ee(18642),Me=ee(72190),Ce=ee(42244),fe=ee(35593),he=ee(92310),ce=ee.n(he),ae=ee(8654),se=ee(59301),ve=ee(10228),ue=ee(16089),pe=ve.Z.ESC,oe=ve.Z.TAB;function ge(Ae){var it=Ae.visible,Ue=Ae.triggerRef,gt=Ae.onVisibleChange,Ve=Ae.autoFocus,Tt=Ae.overlayRef,ct=se.useRef(!1),Ot=function(){if(it){var St,qe;(St=Ue.current)===null||St===void 0||(qe=St.focus)===null||qe===void 0||qe.call(St),gt==null||gt(!1)}},We=function(){var St;return(St=Tt.current)!==null&&St!==void 0&&St.focus?(Tt.current.focus(),ct.current=!0,!0):!1},lt=function(St){switch(St.keyCode){case pe:Ot();break;case oe:{var qe=!1;ct.current||(qe=We()),qe?St.preventDefault():Ot();break}}};se.useEffect(function(){return it?(window.addEventListener("keydown",lt),Ve&&(0,ue.Z)(We,3),function(){window.removeEventListener("keydown",lt),ct.current=!1}):function(){ct.current=!1}},[it])}var ye=(0,se.forwardRef)(function(Ae,it){var Ue=Ae.overlay,gt=Ae.arrow,Ve=Ae.prefixCls,Tt=(0,se.useMemo)(function(){var Ot;return typeof Ue=="function"?Ot=Ue():Ot=Ue,Ot},[Ue]),ct=(0,ae.sQ)(it,Tt==null?void 0:Tt.ref);return se.createElement(se.Fragment,null,gt&&se.createElement("div",{className:"".concat(Ve,"-arrow")}),se.cloneElement(Tt,{ref:(0,ae.Yr)(Tt)?ct:void 0}))}),we=ye,Be={adjustX:1,adjustY:1},ze=[0,0],$e={topLeft:{points:["bl","tl"],overflow:Be,offset:[0,-4],targetOffset:ze},top:{points:["bc","tc"],overflow:Be,offset:[0,-4],targetOffset:ze},topRight:{points:["br","tr"],overflow:Be,offset:[0,-4],targetOffset:ze},bottomLeft:{points:["tl","bl"],overflow:Be,offset:[0,4],targetOffset:ze},bottom:{points:["tc","bc"],overflow:Be,offset:[0,4],targetOffset:ze},bottomRight:{points:["tr","br"],overflow:Be,offset:[0,4],targetOffset:ze}},Le=$e,Ne=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Re(Ae,it){var Ue,gt=Ae.arrow,Ve=gt===void 0?!1:gt,Tt=Ae.prefixCls,ct=Tt===void 0?"rc-dropdown":Tt,Ot=Ae.transitionName,We=Ae.animation,lt=Ae.align,ut=Ae.placement,St=ut===void 0?"bottomLeft":ut,qe=Ae.placements,Ze=qe===void 0?Le:qe,wt=Ae.getPopupContainer,Wt=Ae.showAction,Kt=Ae.hideAction,_t=Ae.overlayClassName,vt=Ae.overlayStyle,jt=Ae.visible,yn=Ae.trigger,Xt=yn===void 0?["hover"]:yn,Ln=Ae.autoFocus,pn=Ae.overlay,hn=Ae.children,un=Ae.onVisibleChange,Xe=(0,Ce.Z)(Ae,Ne),ke=se.useState(),_e=(0,Me.Z)(ke,2),Te=_e[0],Fe=_e[1],me="visible"in Ae?jt:Te,at=se.useRef(null),Pt=se.useRef(null),Qe=se.useRef(null);se.useImperativeHandle(it,function(){return at.current});var Je=function(At){Fe(At),un==null||un(At)};ge({visible:me,triggerRef:Qe,onVisibleChange:Je,autoFocus:Ln,overlayRef:Pt});var xt=function(At){var Lt=Ae.onOverlayClick;Fe(!1),Lt&&Lt(At)},ot=function(){return se.createElement(we,{ref:Pt,overlay:pn,prefixCls:ct,arrow:Ve})},mt=function(){return typeof pn=="function"?ot:ot()},Nt=function(){var At=Ae.minOverlayWidthMatchTrigger,Lt=Ae.alignPoint;return"minOverlayWidthMatchTrigger"in Ae?At:!Lt},rn=function(){var At=Ae.openClassName;return At!==void 0?At:"".concat(ct,"-open")},It=se.cloneElement(hn,{className:ce()((Ue=hn.props)===null||Ue===void 0?void 0:Ue.className,me&&rn()),ref:(0,ae.Yr)(hn)?(0,ae.sQ)(Qe,hn.ref):void 0}),Qt=Kt;return!Qt&&Xt.indexOf("contextMenu")!==-1&&(Qt=["click"]),se.createElement(fe.Z,(0,ne.Z)({builtinPlacements:Ze},Xe,{prefixCls:ct,ref:at,popupClassName:ce()(_t,(0,xe.Z)({},"".concat(ct,"-show-arrow"),Ve)),popupStyle:vt,action:Xt,showAction:Wt,hideAction:Qt,popupPlacement:St,popupAlign:lt,popupTransitionName:Ot,popupAnimation:We,popupVisible:me,stretch:Nt()?"minWidth":"",popup:mt(),onPopupVisibleChange:Je,onPopupClick:xt,getPopupContainer:wt}),It)}var Se=se.forwardRef(Re),Ie=Se},93681:function(gn,kt,ee){"use strict";ee.r(kt),ee.d(kt,{BaseInput:function(){return ve},default:function(){return $e}});var ne=ee(60499),xe=ee(85899),Me=ee(18642),Ce=ee(43749),fe=ee(92310),he=ee.n(fe),ce=ee(59301),ae=ee(5643),se=function(Ne){var Re,Se,Ie=Ne.inputElement,Ae=Ne.prefixCls,it=Ne.prefix,Ue=Ne.suffix,gt=Ne.addonBefore,Ve=Ne.addonAfter,Tt=Ne.className,ct=Ne.style,Ot=Ne.disabled,We=Ne.readOnly,lt=Ne.focused,ut=Ne.triggerFocus,St=Ne.allowClear,qe=Ne.value,Ze=Ne.handleReset,wt=Ne.hidden,Wt=Ne.classes,Kt=Ne.classNames,_t=Ne.dataAttrs,vt=Ne.styles,jt=Ne.components,yn=(jt==null?void 0:jt.affixWrapper)||"span",Xt=(jt==null?void 0:jt.groupWrapper)||"span",Ln=(jt==null?void 0:jt.wrapper)||"span",pn=(jt==null?void 0:jt.groupAddon)||"span",hn=(0,ce.useRef)(null),un=function(ot){var mt;(mt=hn.current)!==null&&mt!==void 0&&mt.contains(ot.target)&&(ut==null||ut())},Xe=function(){var ot;if(!St)return null;var mt=!Ot&&!We&&qe,Nt="".concat(Ae,"-clear-icon"),rn=(0,Ce.Z)(St)==="object"&&St!==null&&St!==void 0&&St.clearIcon?St.clearIcon:"\u2716";return ce.createElement("span",{onClick:Ze,onMouseDown:function(Qt){return Qt.preventDefault()},className:he()(Nt,(ot={},(0,Me.Z)(ot,"".concat(Nt,"-hidden"),!mt),(0,Me.Z)(ot,"".concat(Nt,"-has-suffix"),!!Ue),ot)),role:"button",tabIndex:-1},rn)},ke=(0,ce.cloneElement)(Ie,{value:qe,hidden:wt,className:he()((Re=Ie.props)===null||Re===void 0?void 0:Re.className,!(0,ae.X3)(Ne)&&!(0,ae.He)(Ne)&&Tt)||null,style:(0,xe.Z)((0,xe.Z)({},(Se=Ie.props)===null||Se===void 0?void 0:Se.style),!(0,ae.X3)(Ne)&&!(0,ae.He)(Ne)?ct:{})});if((0,ae.X3)(Ne)){var _e,Te="".concat(Ae,"-affix-wrapper"),Fe=he()(Te,(_e={},(0,Me.Z)(_e,"".concat(Te,"-disabled"),Ot),(0,Me.Z)(_e,"".concat(Te,"-focused"),lt),(0,Me.Z)(_e,"".concat(Te,"-readonly"),We),(0,Me.Z)(_e,"".concat(Te,"-input-with-clear-btn"),Ue&&St&&qe),_e),!(0,ae.He)(Ne)&&Tt,Wt==null?void 0:Wt.affixWrapper,Kt==null?void 0:Kt.affixWrapper),me=(Ue||St)&&ce.createElement("span",{className:he()("".concat(Ae,"-suffix"),Kt==null?void 0:Kt.suffix),style:vt==null?void 0:vt.suffix},Xe(),Ue);ke=ce.createElement(yn,(0,ne.Z)({className:Fe,style:(0,xe.Z)((0,xe.Z)({},(0,ae.He)(Ne)?void 0:ct),vt==null?void 0:vt.affixWrapper),hidden:!(0,ae.He)(Ne)&&wt,onClick:un},_t==null?void 0:_t.affixWrapper,{ref:hn}),it&&ce.createElement("span",{className:he()("".concat(Ae,"-prefix"),Kt==null?void 0:Kt.prefix),style:vt==null?void 0:vt.prefix},it),(0,ce.cloneElement)(Ie,{value:qe,hidden:null}),me)}if((0,ae.He)(Ne)){var at="".concat(Ae,"-group"),Pt="".concat(at,"-addon"),Qe=he()("".concat(Ae,"-wrapper"),at,Wt==null?void 0:Wt.wrapper),Je=he()("".concat(Ae,"-group-wrapper"),Tt,Wt==null?void 0:Wt.group);return ce.createElement(Xt,{className:Je,style:ct,hidden:wt},ce.createElement(Ln,{className:Qe},gt&&ce.createElement(pn,{className:Pt},gt),(0,ce.cloneElement)(ke,{hidden:null}),Ve&&ce.createElement(pn,{className:Pt},Ve)))}return ke},ve=se,ue=ee(77654),pe=ee(72190),oe=ee(42244),ge=ee(18929),ye=ee(2738),we=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],Be=(0,ce.forwardRef)(function(Le,Ne){var Re=Le.autoComplete,Se=Le.onChange,Ie=Le.onFocus,Ae=Le.onBlur,it=Le.onPressEnter,Ue=Le.onKeyDown,gt=Le.prefixCls,Ve=gt===void 0?"rc-input":gt,Tt=Le.disabled,ct=Le.htmlSize,Ot=Le.className,We=Le.maxLength,lt=Le.suffix,ut=Le.showCount,St=Le.type,qe=St===void 0?"text":St,Ze=Le.classes,wt=Le.classNames,Wt=Le.styles,Kt=(0,oe.Z)(Le,we),_t=(0,ge.Z)(Le.defaultValue,{value:Le.value}),vt=(0,pe.Z)(_t,2),jt=vt[0],yn=vt[1],Xt=(0,ce.useState)(!1),Ln=(0,pe.Z)(Xt,2),pn=Ln[0],hn=Ln[1],un=(0,ce.useRef)(null),Xe=function(Je){un.current&&(0,ae.nH)(un.current,Je)};(0,ce.useImperativeHandle)(Ne,function(){return{focus:Xe,blur:function(){var Je;(Je=un.current)===null||Je===void 0||Je.blur()},setSelectionRange:function(Je,xt,ot){var mt;(mt=un.current)===null||mt===void 0||mt.setSelectionRange(Je,xt,ot)},select:function(){var Je;(Je=un.current)===null||Je===void 0||Je.select()},input:un.current}}),(0,ce.useEffect)(function(){hn(function(Qe){return Qe&&Tt?!1:Qe})},[Tt]);var ke=function(Je){Le.value===void 0&&yn(Je.target.value),un.current&&(0,ae.rJ)(un.current,Je,Se)},_e=function(Je){it&&Je.key==="Enter"&&it(Je),Ue==null||Ue(Je)},Te=function(Je){hn(!0),Ie==null||Ie(Je)},Fe=function(Je){hn(!1),Ae==null||Ae(Je)},me=function(Je){yn(""),Xe(),un.current&&(0,ae.rJ)(un.current,Je,Se)},at=function(){var Je=(0,ye.Z)(Le,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return ce.createElement("input",(0,ne.Z)({autoComplete:Re},Je,{onChange:ke,onFocus:Te,onBlur:Fe,onKeyDown:_e,className:he()(Ve,(0,Me.Z)({},"".concat(Ve,"-disabled"),Tt),wt==null?void 0:wt.input),style:Wt==null?void 0:Wt.input,ref:un,size:ct,type:qe}))},Pt=function(){var Je=Number(We)>0;if(lt||ut){var xt=(0,ae.D7)(jt),ot=(0,ue.Z)(xt).length,mt=(0,Ce.Z)(ut)==="object"?ut.formatter({value:xt,count:ot,maxLength:We}):"".concat(ot).concat(Je?" / ".concat(We):"");return ce.createElement(ce.Fragment,null,!!ut&&ce.createElement("span",{className:he()("".concat(Ve,"-show-count-suffix"),(0,Me.Z)({},"".concat(Ve,"-show-count-has-suffix"),!!lt),wt==null?void 0:wt.count),style:(0,xe.Z)({},Wt==null?void 0:Wt.count)},mt),lt)}return null};return ce.createElement(ve,(0,ne.Z)({},Kt,{prefixCls:Ve,className:Ot,inputElement:at(),handleReset:me,value:(0,ae.D7)(jt),focused:pn,triggerFocus:Xe,suffix:Pt(),disabled:Tt,classes:Ze,classNames:wt,styles:Wt}))}),ze=Be,$e=ze},5643:function(gn,kt,ee){"use strict";ee.d(kt,{D7:function(){return fe},He:function(){return ne},X3:function(){return xe},nH:function(){return Ce},rJ:function(){return Me}});function ne(he){return!!(he.addonBefore||he.addonAfter)}function xe(he){return!!(he.prefix||he.suffix||he.allowClear)}function Me(he,ce,ae,se){if(ae){var ve=ce;if(ce.type==="click"){var ue=he.cloneNode(!0);ve=Object.create(ce,{target:{value:ue},currentTarget:{value:ue}}),ue.value="",ae(ve);return}if(se!==void 0){ve=Object.create(ce,{target:{value:he},currentTarget:{value:he}}),he.value=se,ae(ve);return}ae(ve)}}function Ce(he,ce){if(he){he.focus(ce);var ae=ce||{},se=ae.cursor;if(se){var ve=he.value.length;switch(se){case"start":he.setSelectionRange(0,0);break;case"end":he.setSelectionRange(ve,ve);break;default:he.setSelectionRange(0,ve)}}}}function fe(he){return typeof he=="undefined"||he===null?"":String(he)}},15285:function(gn,kt,ee){"use strict";ee.d(kt,{iz:function(){return cn},ck:function(){return Yn},BW:function(){return on},sN:function(){return Yn},Wd:function(){return Ft},ZP:function(){return Un},Xl:function(){return Ue}});var ne=ee(60499),xe=ee(18642),Me=ee(85899),Ce=ee(77654),fe=ee(72190),he=ee(42244),ce=ee(92310),ae=ee.n(ce),se=ee(83836),ve=ee(18929),ue=ee(13697),pe=ee(48736),oe=ee(59301),ge=ee(4676),ye=oe.createContext(null);function we(zt,fn){return zt===void 0?null:"".concat(zt,"-").concat(fn)}function Be(zt){var fn=oe.useContext(ye);return we(fn,zt)}var ze=ee(80547),$e=["children","locked"],Le=oe.createContext(null);function Ne(zt,fn){var vn=(0,Me.Z)({},zt);return Object.keys(fn).forEach(function(An){var En=fn[An];En!==void 0&&(vn[An]=En)}),vn}function Re(zt){var fn=zt.children,vn=zt.locked,An=(0,he.Z)(zt,$e),En=oe.useContext(Le),kn=(0,ze.Z)(function(){return Ne(En,An)},[En,An],function(Mn,Bn){return!vn&&(Mn[0]!==Bn[0]||!(0,ue.Z)(Mn[1],Bn[1],!0))});return oe.createElement(Le.Provider,{value:kn},fn)}var Se=[],Ie=oe.createContext(null);function Ae(){return oe.useContext(Ie)}var it=oe.createContext(Se);function Ue(zt){var fn=oe.useContext(it);return oe.useMemo(function(){return zt!==void 0?[].concat((0,Ce.Z)(fn),[zt]):fn},[fn,zt])}var gt=oe.createContext(null),Ve=oe.createContext({}),Tt=Ve,ct=ee(29194);function Ot(zt){var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,ct.Z)(zt)){var vn=zt.nodeName.toLowerCase(),An=["input","select","textarea","button"].includes(vn)||zt.isContentEditable||vn==="a"&&!!zt.getAttribute("href"),En=zt.getAttribute("tabindex"),kn=Number(En),Mn=null;return En&&!Number.isNaN(kn)?Mn=kn:An&&Mn===null&&(Mn=0),An&&zt.disabled&&(Mn=null),Mn!==null&&(Mn>=0||fn&&Mn<0)}return!1}function We(zt){var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vn=(0,Ce.Z)(zt.querySelectorAll("*")).filter(function(An){return Ot(An,fn)});return Ot(zt,fn)&&vn.unshift(zt),vn}var lt=null;function ut(){lt=document.activeElement}function St(){lt=null}function qe(){if(lt)try{lt.focus()}catch(zt){}}function Ze(zt,fn){if(fn.keyCode===9){var vn=We(zt),An=vn[fn.shiftKey?0:vn.length-1],En=An===document.activeElement||zt===document.activeElement;if(En){var kn=vn[fn.shiftKey?vn.length-1:0];kn.focus(),fn.preventDefault()}}}var wt=ee(10228),Wt=ee(16089),Kt=wt.Z.LEFT,_t=wt.Z.RIGHT,vt=wt.Z.UP,jt=wt.Z.DOWN,yn=wt.Z.ENTER,Xt=wt.Z.ESC,Ln=wt.Z.HOME,pn=wt.Z.END,hn=[vt,jt,Kt,_t];function un(zt,fn,vn,An){var En,kn,Mn,Bn,Kn="prev",Vn="next",cr="children",fr="parent";if(zt==="inline"&&An===yn)return{inlineTrigger:!0};var $r=(En={},(0,xe.Z)(En,vt,Kn),(0,xe.Z)(En,jt,Vn),En),Mr=(kn={},(0,xe.Z)(kn,Kt,vn?Vn:Kn),(0,xe.Z)(kn,_t,vn?Kn:Vn),(0,xe.Z)(kn,jt,cr),(0,xe.Z)(kn,yn,cr),kn),wr=(Mn={},(0,xe.Z)(Mn,vt,Kn),(0,xe.Z)(Mn,jt,Vn),(0,xe.Z)(Mn,yn,cr),(0,xe.Z)(Mn,Xt,fr),(0,xe.Z)(Mn,Kt,vn?cr:fr),(0,xe.Z)(Mn,_t,vn?fr:cr),Mn),ei={inline:$r,horizontal:Mr,vertical:wr,inlineSub:$r,horizontalSub:wr,verticalSub:wr},Xr=(Bn=ei["".concat(zt).concat(fn?"":"Sub")])===null||Bn===void 0?void 0:Bn[An];switch(Xr){case Kn:return{offset:-1,sibling:!0};case Vn:return{offset:1,sibling:!0};case fr:return{offset:-1,sibling:!1};case cr:return{offset:1,sibling:!1};default:return null}}function Xe(zt){for(var fn=zt;fn;){if(fn.getAttribute("data-menu-list"))return fn;fn=fn.parentElement}return null}function ke(zt,fn){for(var vn=zt||document.activeElement;vn;){if(fn.has(vn))return vn;vn=vn.parentElement}return null}function _e(zt,fn){var vn=We(zt,!0);return vn.filter(function(An){return fn.has(An)})}function Te(zt,fn,vn){var An=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!zt)return null;var En=_e(zt,fn),kn=En.length,Mn=En.findIndex(function(Bn){return vn===Bn});return An<0?Mn===-1?Mn=kn-1:Mn-=1:An>0&&(Mn+=1),Mn=(Mn+kn)%kn,En[Mn]}var Fe=function(fn,vn){var An=new Set,En=new Map,kn=new Map;return fn.forEach(function(Mn){var Bn=document.querySelector("[data-menu-id='".concat(we(vn,Mn),"']"));Bn&&(An.add(Bn),kn.set(Bn,Mn),En.set(Mn,Bn))}),{elements:An,key2element:En,element2key:kn}};function me(zt,fn,vn,An,En,kn,Mn,Bn,Kn,Vn){var cr=oe.useRef(),fr=oe.useRef();fr.current=fn;var $r=function(){Wt.Z.cancel(cr.current)};return oe.useEffect(function(){return function(){$r()}},[]),function(Mr){var wr=Mr.which;if([].concat(hn,[yn,Xt,Ln,pn]).includes(wr)){var ei=kn(),Xr=Fe(ei,An),Zr=Xr,Lr=Zr.elements,Or=Zr.key2element,Wr=Zr.element2key,Pr=Or.get(fn),di=ke(Pr,Lr),Ri=Wr.get(di),Vr=un(zt,Mn(Ri,!0).length===1,vn,wr);if(!Vr&&wr!==Ln&&wr!==pn)return;(hn.includes(wr)||[Ln,pn].includes(wr))&&Mr.preventDefault();var er=function(_i){if(_i){var oo=_i,Fr=_i.querySelector("a");Fr!=null&&Fr.getAttribute("href")&&(oo=Fr);var Nr=Wr.get(_i);Bn(Nr),$r(),cr.current=(0,Wt.Z)(function(){fr.current===Nr&&oo.focus()})}};if([Ln,pn].includes(wr)||Vr.sibling||!di){var Zn;!di||zt==="inline"?Zn=En.current:Zn=Xe(di);var Dr,Sr=_e(Zn,Lr);wr===Ln?Dr=Sr[0]:wr===pn?Dr=Sr[Sr.length-1]:Dr=Te(Zn,Lr,di,Vr.offset),er(Dr)}else if(Vr.inlineTrigger)Kn(Ri);else if(Vr.offset>0)Kn(Ri,!0),$r(),cr.current=(0,Wt.Z)(function(){Xr=Fe(ei,An);var Bi=di.getAttribute("aria-controls"),_i=document.getElementById(Bi),oo=Te(_i,Xr.elements);er(oo)},5);else if(Vr.offset<0){var ri=Mn(Ri,!0),yi=ri[ri.length-2],jr=Or.get(yi);Kn(yi,!1),er(jr)}}Vn==null||Vn(Mr)}}function at(zt){Promise.resolve().then(zt)}var Pt="__RC_UTIL_PATH_SPLIT__",Qe=function(fn){return fn.join(Pt)},Je=function(fn){return fn.split(Pt)},xt="rc-menu-more";function ot(){var zt=oe.useState({}),fn=(0,fe.Z)(zt,2),vn=fn[1],An=(0,oe.useRef)(new Map),En=(0,oe.useRef)(new Map),kn=oe.useState([]),Mn=(0,fe.Z)(kn,2),Bn=Mn[0],Kn=Mn[1],Vn=(0,oe.useRef)(0),cr=(0,oe.useRef)(!1),fr=function(){cr.current||vn({})},$r=(0,oe.useCallback)(function(Or,Wr){var Pr=Qe(Wr);En.current.set(Pr,Or),An.current.set(Or,Pr),Vn.current+=1;var di=Vn.current;at(function(){di===Vn.current&&fr()})},[]),Mr=(0,oe.useCallback)(function(Or,Wr){var Pr=Qe(Wr);En.current.delete(Pr),An.current.delete(Or)},[]),wr=(0,oe.useCallback)(function(Or){Kn(Or)},[]),ei=(0,oe.useCallback)(function(Or,Wr){var Pr=An.current.get(Or)||"",di=Je(Pr);return Wr&&Bn.includes(di[0])&&di.unshift(xt),di},[Bn]),Xr=(0,oe.useCallback)(function(Or,Wr){return Or.some(function(Pr){var di=ei(Pr,!0);return di.includes(Wr)})},[ei]),Zr=function(){var Wr=(0,Ce.Z)(An.current.keys());return Bn.length&&Wr.push(xt),Wr},Lr=(0,oe.useCallback)(function(Or){var Wr="".concat(An.current.get(Or)).concat(Pt),Pr=new Set;return(0,Ce.Z)(En.current.keys()).forEach(function(di){di.startsWith(Wr)&&Pr.add(En.current.get(di))}),Pr},[]);return oe.useEffect(function(){return function(){cr.current=!0}},[]),{registerPath:$r,unregisterPath:Mr,refreshOverflowKeys:wr,isSubPathKey:Xr,getKeyPath:ei,getKeys:Zr,getSubPathKeys:Lr}}function mt(zt){var fn=oe.useRef(zt);fn.current=zt;var vn=oe.useCallback(function(){for(var An,En=arguments.length,kn=new Array(En),Mn=0;Mn<En;Mn++)kn[Mn]=arguments[Mn];return(An=fn.current)===null||An===void 0?void 0:An.call.apply(An,[fn].concat(kn))},[]);return zt?vn:void 0}var Nt=Math.random().toFixed(5).toString().slice(2),rn=0;function It(zt){var fn=(0,ve.Z)(zt,{value:zt}),vn=(0,fe.Z)(fn,2),An=vn[0],En=vn[1];return oe.useEffect(function(){rn+=1;var kn="".concat(Nt,"-").concat(rn);En("rc-menu-uuid-".concat(kn))},[]),An}var Qt=ee(38705),dn=ee(17212),At=ee(39153),Lt=ee(55401),qt=ee(2738),Tn=ee(8654);function Jt(zt,fn,vn,An){var En=oe.useContext(Le),kn=En.activeKey,Mn=En.onActive,Bn=En.onInactive,Kn={active:kn===zt};return fn||(Kn.onMouseEnter=function(Vn){vn==null||vn({key:zt,domEvent:Vn}),Mn(zt)},Kn.onMouseLeave=function(Vn){An==null||An({key:zt,domEvent:Vn}),Bn(zt)}),Kn}function On(zt){var fn=oe.useContext(Le),vn=fn.mode,An=fn.rtl,En=fn.inlineIndent;if(vn!=="inline")return null;var kn=zt;return An?{paddingRight:kn*En}:{paddingLeft:kn*En}}function zn(zt){var fn=zt.icon,vn=zt.props,An=zt.children,En;return fn===null||fn===!1?null:(typeof fn=="function"?En=oe.createElement(fn,(0,Me.Z)({},vn)):typeof fn!="boolean"&&(En=fn),En||An||null)}var qn=["item"];function Xn(zt){var fn=zt.item,vn=(0,he.Z)(zt,qn);return Object.defineProperty(vn,"item",{get:function(){return(0,pe.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),fn}}),vn}var vr=["title","attribute","elementRef"],_r=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Qn=["active"],Cr=function(zt){(0,At.Z)(vn,zt);var fn=(0,Lt.Z)(vn);function vn(){return(0,Qt.Z)(this,vn),fn.apply(this,arguments)}return(0,dn.Z)(vn,[{key:"render",value:function(){var En=this.props,kn=En.title,Mn=En.attribute,Bn=En.elementRef,Kn=(0,he.Z)(En,vr),Vn=(0,qt.Z)(Kn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,pe.ZP)(!Mn,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),oe.createElement(se.Z.Item,(0,ne.Z)({},Mn,{title:typeof kn=="string"?kn:void 0},Vn,{ref:Bn}))}}]),vn}(oe.Component),ni=oe.forwardRef(function(zt,fn){var vn,An=zt.style,En=zt.className,kn=zt.eventKey,Mn=zt.warnKey,Bn=zt.disabled,Kn=zt.itemIcon,Vn=zt.children,cr=zt.role,fr=zt.onMouseEnter,$r=zt.onMouseLeave,Mr=zt.onClick,wr=zt.onKeyDown,ei=zt.onFocus,Xr=(0,he.Z)(zt,_r),Zr=Be(kn),Lr=oe.useContext(Le),Or=Lr.prefixCls,Wr=Lr.onItemClick,Pr=Lr.disabled,di=Lr.overflowDisabled,Ri=Lr.itemIcon,Vr=Lr.selectedKeys,er=Lr.onActive,Zn=oe.useContext(Tt),Dr=Zn._internalRenderMenuItem,Sr="".concat(Or,"-item"),ri=oe.useRef(),yi=oe.useRef(),jr=Pr||Bn,Bi=(0,Tn.x1)(fn,yi),_i=Ue(kn),oo=function(kr){return{key:kn,keyPath:(0,Ce.Z)(_i).reverse(),item:ri.current,domEvent:kr}},Fr=Kn||Ri,Nr=Jt(kn,jr,fr,$r),bi=Nr.active,hi=(0,he.Z)(Nr,Qn),Xi=Vr.includes(kn),mo=On(_i.length),Co=function(kr){if(!jr){var Kr=oo(kr);Mr==null||Mr(Xn(Kr)),Wr(Kr)}},ji=function(kr){if(wr==null||wr(kr),kr.which===wt.Z.ENTER){var Kr=oo(kr);Mr==null||Mr(Xn(Kr)),Wr(Kr)}},_o=function(kr){er(kn),ei==null||ei(kr)},vo={};zt.role==="option"&&(vo["aria-selected"]=Xi);var Er=oe.createElement(Cr,(0,ne.Z)({ref:ri,elementRef:Bi,role:cr===null?"none":cr||"menuitem",tabIndex:Bn?null:-1,"data-menu-id":di&&Zr?null:Zr},Xr,hi,vo,{component:"li","aria-disabled":Bn,style:(0,Me.Z)((0,Me.Z)({},mo),An),className:ae()(Sr,(vn={},(0,xe.Z)(vn,"".concat(Sr,"-active"),bi),(0,xe.Z)(vn,"".concat(Sr,"-selected"),Xi),(0,xe.Z)(vn,"".concat(Sr,"-disabled"),jr),vn),En),onClick:Co,onKeyDown:ji,onFocus:_o}),Vn,oe.createElement(zn,{props:(0,Me.Z)((0,Me.Z)({},zt),{},{isSelected:Xi}),icon:Fr}));return Dr&&(Er=Dr(Er,zt,{selected:Xi})),Er});function Jr(zt,fn){var vn=zt.eventKey,An=Ae(),En=Ue(vn);return oe.useEffect(function(){if(An)return An.registerPath(vn,En),function(){An.unregisterPath(vn,En)}},[En]),An?null:oe.createElement(ni,(0,ne.Z)({},zt,{ref:fn}))}var Yn=oe.forwardRef(Jr),mr=["className","children"],si=function(fn,vn){var An=fn.className,En=fn.children,kn=(0,he.Z)(fn,mr),Mn=oe.useContext(Le),Bn=Mn.prefixCls,Kn=Mn.mode,Vn=Mn.rtl;return oe.createElement("ul",(0,ne.Z)({className:ae()(Bn,Vn&&"".concat(Bn,"-rtl"),"".concat(Bn,"-sub"),"".concat(Bn,"-").concat(Kn==="inline"?"inline":"vertical"),An),role:"menu"},kn,{"data-menu-list":!0,ref:vn}),En)},or=oe.forwardRef(si);or.displayName="SubMenuList";var ii=or,ki=ee(11592);function gi(zt,fn){return(0,ki.Z)(zt).map(function(vn,An){if(oe.isValidElement(vn)){var En,kn,Mn=vn.key,Bn=(En=(kn=vn.props)===null||kn===void 0?void 0:kn.eventKey)!==null&&En!==void 0?En:Mn,Kn=Bn==null;Kn&&(Bn="tmp_key-".concat([].concat((0,Ce.Z)(fn),[An]).join("-")));var Vn={key:Bn,eventKey:Bn};return oe.cloneElement(vn,Vn)}return vn})}var Li=ee(35593),ui={adjustX:1,adjustY:1},dr={topLeft:{points:["bl","tl"],overflow:ui},topRight:{points:["br","tr"],overflow:ui},bottomLeft:{points:["tl","bl"],overflow:ui},bottomRight:{points:["tr","br"],overflow:ui},leftTop:{points:["tr","tl"],overflow:ui},leftBottom:{points:["br","bl"],overflow:ui},rightTop:{points:["tl","tr"],overflow:ui},rightBottom:{points:["bl","br"],overflow:ui}},Hr={topLeft:{points:["bl","tl"],overflow:ui},topRight:{points:["br","tr"],overflow:ui},bottomLeft:{points:["tl","bl"],overflow:ui},bottomRight:{points:["tr","br"],overflow:ui},rightTop:{points:["tr","tl"],overflow:ui},rightBottom:{points:["br","bl"],overflow:ui},leftTop:{points:["tl","tr"],overflow:ui},leftBottom:{points:["bl","br"],overflow:ui}},Cn=null;function Ee(zt,fn,vn){if(fn)return fn;if(vn)return vn[zt]||vn.other}var je={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Oe(zt){var fn=zt.prefixCls,vn=zt.visible,An=zt.children,En=zt.popup,kn=zt.popupStyle,Mn=zt.popupClassName,Bn=zt.popupOffset,Kn=zt.disabled,Vn=zt.mode,cr=zt.onVisibleChange,fr=oe.useContext(Le),$r=fr.getPopupContainer,Mr=fr.rtl,wr=fr.subMenuOpenDelay,ei=fr.subMenuCloseDelay,Xr=fr.builtinPlacements,Zr=fr.triggerSubMenuAction,Lr=fr.forceSubMenuRender,Or=fr.rootClassName,Wr=fr.motion,Pr=fr.defaultMotions,di=oe.useState(!1),Ri=(0,fe.Z)(di,2),Vr=Ri[0],er=Ri[1],Zn=Mr?(0,Me.Z)((0,Me.Z)({},Hr),Xr):(0,Me.Z)((0,Me.Z)({},dr),Xr),Dr=je[Vn],Sr=Ee(Vn,Wr,Pr),ri=oe.useRef(Sr);Vn!=="inline"&&(ri.current=Sr);var yi=(0,Me.Z)((0,Me.Z)({},ri.current),{},{leavedClassName:"".concat(fn,"-hidden"),removeOnLeave:!1,motionAppear:!0}),jr=oe.useRef();return oe.useEffect(function(){return jr.current=(0,Wt.Z)(function(){er(vn)}),function(){Wt.Z.cancel(jr.current)}},[vn]),oe.createElement(Li.Z,{prefixCls:fn,popupClassName:ae()("".concat(fn,"-popup"),(0,xe.Z)({},"".concat(fn,"-rtl"),Mr),Mn,Or),stretch:Vn==="horizontal"?"minWidth":null,getPopupContainer:$r,builtinPlacements:Zn,popupPlacement:Dr,popupVisible:Vr,popup:En,popupStyle:kn,popupAlign:Bn&&{offset:Bn},action:Kn?[]:[Zr],mouseEnterDelay:wr,mouseLeaveDelay:ei,onPopupVisibleChange:cr,forceRender:Lr,popupMotion:yi,fresh:!0},An)}var De=ee(77900);function Ke(zt){var fn=zt.id,vn=zt.open,An=zt.keyPath,En=zt.children,kn="inline",Mn=oe.useContext(Le),Bn=Mn.prefixCls,Kn=Mn.forceSubMenuRender,Vn=Mn.motion,cr=Mn.defaultMotions,fr=Mn.mode,$r=oe.useRef(!1);$r.current=fr===kn;var Mr=oe.useState(!$r.current),wr=(0,fe.Z)(Mr,2),ei=wr[0],Xr=wr[1],Zr=$r.current?vn:!1;oe.useEffect(function(){$r.current&&Xr(!1)},[fr]);var Lr=(0,Me.Z)({},Ee(kn,Vn,cr));An.length>1&&(Lr.motionAppear=!1);var Or=Lr.onVisibleChanged;return Lr.onVisibleChanged=function(Wr){return!$r.current&&!Wr&&Xr(!0),Or==null?void 0:Or(Wr)},ei?null:oe.createElement(Re,{mode:kn,locked:!$r.current},oe.createElement(De.default,(0,ne.Z)({visible:Zr},Lr,{forceRender:Kn,removeOnLeave:!1,leavedClassName:"".concat(Bn,"-hidden")}),function(Wr){var Pr=Wr.className,di=Wr.style;return oe.createElement(ii,{id:fn,className:Pr,style:di},En)}))}var et=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],rt=["active"],Dt=function(fn){var vn,An=fn.style,En=fn.className,kn=fn.title,Mn=fn.eventKey,Bn=fn.warnKey,Kn=fn.disabled,Vn=fn.internalPopupClose,cr=fn.children,fr=fn.itemIcon,$r=fn.expandIcon,Mr=fn.popupClassName,wr=fn.popupOffset,ei=fn.popupStyle,Xr=fn.onClick,Zr=fn.onMouseEnter,Lr=fn.onMouseLeave,Or=fn.onTitleClick,Wr=fn.onTitleMouseEnter,Pr=fn.onTitleMouseLeave,di=(0,he.Z)(fn,et),Ri=Be(Mn),Vr=oe.useContext(Le),er=Vr.prefixCls,Zn=Vr.mode,Dr=Vr.openKeys,Sr=Vr.disabled,ri=Vr.overflowDisabled,yi=Vr.activeKey,jr=Vr.selectedKeys,Bi=Vr.itemIcon,_i=Vr.expandIcon,oo=Vr.onItemClick,Fr=Vr.onOpenChange,Nr=Vr.onActive,bi=oe.useContext(Tt),hi=bi._internalRenderSubMenuItem,Xi=oe.useContext(gt),mo=Xi.isSubPathKey,Co=Ue(),ji="".concat(er,"-submenu"),_o=Sr||Kn,vo=oe.useRef(),Er=oe.useRef(),Ar=fr!=null?fr:Bi,kr=$r!=null?$r:_i,Kr=Dr.includes(Mn),Hi=!ri&&Kr,eo=mo(jr,Mn),io=Jt(Mn,_o,Wr,Pr),ao=io.active,to=(0,he.Z)(io,rt),Mo=oe.useState(!1),Yo=(0,fe.Z)(Mo,2),Ho=Yo[0],La=Yo[1],ha=function(ra){_o||La(ra)},Ko=function(ra){ha(!0),Zr==null||Zr({key:Mn,domEvent:ra})},Oo=function(ra){ha(!1),Lr==null||Lr({key:Mn,domEvent:ra})},Wi=oe.useMemo(function(){return ao||(Zn!=="inline"?Ho||mo([yi],Mn):!1)},[Zn,ao,yi,Ho,Mn,mo]),ta=On(Co.length),Zo=function(ra){_o||(Or==null||Or({key:Mn,domEvent:ra}),Zn==="inline"&&Fr(Mn,!Kr))},no=mt(function(na){Xr==null||Xr(Xn(na)),oo(na)}),ti=function(ra){Zn!=="inline"&&Fr(Mn,ra)},Fi=function(){Nr(Mn)},Ii=Ri&&"".concat(Ri,"-popup"),Ci=oe.createElement("div",(0,ne.Z)({role:"menuitem",style:ta,className:"".concat(ji,"-title"),tabIndex:_o?null:-1,ref:vo,title:typeof kn=="string"?kn:null,"data-menu-id":ri&&Ri?null:Ri,"aria-expanded":Hi,"aria-haspopup":!0,"aria-controls":Ii,"aria-disabled":_o,onClick:Zo,onFocus:Fi},to),kn,oe.createElement(zn,{icon:Zn!=="horizontal"?kr:void 0,props:(0,Me.Z)((0,Me.Z)({},fn),{},{isOpen:Hi,isSubMenu:!0})},oe.createElement("i",{className:"".concat(ji,"-arrow")}))),ro=oe.useRef(Zn);if(Zn!=="inline"&&Co.length>1?ro.current="vertical":ro.current=Zn,!ri){var qi=ro.current;Ci=oe.createElement(Oe,{mode:qi,prefixCls:ji,visible:!Vn&&Hi&&Zn!=="inline",popupClassName:Mr,popupOffset:wr,popupStyle:ei,popup:oe.createElement(Re,{mode:qi==="horizontal"?"vertical":qi},oe.createElement(ii,{id:Ii,ref:Er},cr)),disabled:_o,onVisibleChange:ti},Ci)}var Bo=oe.createElement(se.Z.Item,(0,ne.Z)({role:"none"},di,{component:"li",style:An,className:ae()(ji,"".concat(ji,"-").concat(Zn),En,(vn={},(0,xe.Z)(vn,"".concat(ji,"-open"),Hi),(0,xe.Z)(vn,"".concat(ji,"-active"),Wi),(0,xe.Z)(vn,"".concat(ji,"-selected"),eo),(0,xe.Z)(vn,"".concat(ji,"-disabled"),_o),vn)),onMouseEnter:Ko,onMouseLeave:Oo}),Ci,!ri&&oe.createElement(Ke,{id:Ii,open:Hi,keyPath:Co},cr));return hi&&(Bo=hi(Bo,fn,{selected:eo,active:Wi,open:Hi,disabled:_o})),oe.createElement(Re,{onItemClick:no,mode:Zn==="horizontal"?"vertical":Zn,itemIcon:Ar,expandIcon:kr},Bo)};function Ft(zt){var fn=zt.eventKey,vn=zt.children,An=Ue(fn),En=gi(vn,An),kn=Ae();oe.useEffect(function(){if(kn)return kn.registerPath(fn,An),function(){kn.unregisterPath(fn,An)}},[An]);var Mn;return kn?Mn=En:Mn=oe.createElement(Dt,zt,En),oe.createElement(it.Provider,{value:An},Mn)}var Bt=ee(43749),Ct=["className","title","eventKey","children"],Ht=["children"],Ut=function(fn){var vn=fn.className,An=fn.title,En=fn.eventKey,kn=fn.children,Mn=(0,he.Z)(fn,Ct),Bn=oe.useContext(Le),Kn=Bn.prefixCls,Vn="".concat(Kn,"-item-group");return oe.createElement("li",(0,ne.Z)({role:"presentation"},Mn,{onClick:function(fr){return fr.stopPropagation()},className:ae()(Vn,vn)}),oe.createElement("div",{role:"presentation",className:"".concat(Vn,"-title"),title:typeof An=="string"?An:void 0},An),oe.createElement("ul",{role:"group",className:"".concat(Vn,"-list")},kn))};function on(zt){var fn=zt.children,vn=(0,he.Z)(zt,Ht),An=Ue(vn.eventKey),En=gi(fn,An),kn=Ae();return kn?En:oe.createElement(Ut,(0,qt.Z)(vn,["warnKey"]),En)}function cn(zt){var fn=zt.className,vn=zt.style,An=oe.useContext(Le),En=An.prefixCls,kn=Ae();return kn?null:oe.createElement("li",{role:"separator",className:ae()("".concat(En,"-item-divider"),fn),style:vn})}var Rt=["label","children","key","type"];function Vt(zt){return(zt||[]).map(function(fn,vn){if(fn&&(0,Bt.Z)(fn)==="object"){var An=fn,En=An.label,kn=An.children,Mn=An.key,Bn=An.type,Kn=(0,he.Z)(An,Rt),Vn=Mn!=null?Mn:"tmp-".concat(vn);return kn||Bn==="group"?Bn==="group"?oe.createElement(on,(0,ne.Z)({key:Vn},Kn,{title:En}),Vt(kn)):oe.createElement(Ft,(0,ne.Z)({key:Vn},Kn,{title:En}),Vt(kn)):Bn==="divider"?oe.createElement(cn,(0,ne.Z)({key:Vn},Kn)):oe.createElement(Yn,(0,ne.Z)({key:Vn},Kn),En)}return null}).filter(function(fn){return fn})}function In(zt,fn,vn){var An=zt;return fn&&(An=Vt(fn)),gi(An,vn)}var wn=["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"],Nn=[],Rn=oe.forwardRef(function(zt,fn){var vn,An,En=zt,kn=En.prefixCls,Mn=kn===void 0?"rc-menu":kn,Bn=En.rootClassName,Kn=En.style,Vn=En.className,cr=En.tabIndex,fr=cr===void 0?0:cr,$r=En.items,Mr=En.children,wr=En.direction,ei=En.id,Xr=En.mode,Zr=Xr===void 0?"vertical":Xr,Lr=En.inlineCollapsed,Or=En.disabled,Wr=En.disabledOverflow,Pr=En.subMenuOpenDelay,di=Pr===void 0?.1:Pr,Ri=En.subMenuCloseDelay,Vr=Ri===void 0?.1:Ri,er=En.forceSubMenuRender,Zn=En.defaultOpenKeys,Dr=En.openKeys,Sr=En.activeKey,ri=En.defaultActiveFirst,yi=En.selectable,jr=yi===void 0?!0:yi,Bi=En.multiple,_i=Bi===void 0?!1:Bi,oo=En.defaultSelectedKeys,Fr=En.selectedKeys,Nr=En.onSelect,bi=En.onDeselect,hi=En.inlineIndent,Xi=hi===void 0?24:hi,mo=En.motion,Co=En.defaultMotions,ji=En.triggerSubMenuAction,_o=ji===void 0?"hover":ji,vo=En.builtinPlacements,Er=En.itemIcon,Ar=En.expandIcon,kr=En.overflowedIndicator,Kr=kr===void 0?"...":kr,Hi=En.overflowedIndicatorPopupClassName,eo=En.getPopupContainer,io=En.onClick,ao=En.onOpenChange,to=En.onKeyDown,Mo=En.openAnimation,Yo=En.openTransitionName,Ho=En._internalRenderMenuItem,La=En._internalRenderSubMenuItem,ha=(0,he.Z)(En,wn),Ko=oe.useMemo(function(){return In(Mr,$r,Nn)},[Mr,$r]),Oo=oe.useState(!1),Wi=(0,fe.Z)(Oo,2),ta=Wi[0],Zo=Wi[1],no=oe.useRef(),ti=It(ei),Fi=wr==="rtl",Ii=(0,ve.Z)(Zn,{value:Dr,postState:function(Uo){return Uo||Nn}}),Ci=(0,fe.Z)(Ii,2),ro=Ci[0],qi=Ci[1],Bo=function(Uo){var Xo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function fs(){qi(Uo),ao==null||ao(Uo)}Xo?(0,ge.flushSync)(fs):fs()},na=oe.useState(ro),ra=(0,fe.Z)(na,2),fa=ra[0],xo=ra[1],go=oe.useRef(!1),ca=oe.useMemo(function(){return(Zr==="inline"||Zr==="vertical")&&Lr?["vertical",Lr]:[Zr,!1]},[Zr,Lr]),ua=(0,fe.Z)(ca,2),ba=ua[0],da=ua[1],xl=ba==="inline",Cs=oe.useState(ba),ws=(0,fe.Z)(Cs,2),Ja=ws[0],Sl=ws[1],Es=oe.useState(da),Pa=(0,fe.Z)(Es,2),Da=Pa[0],Xs=Pa[1];oe.useEffect(function(){Sl(ba),Xs(da),go.current&&(xl?qi(fa):Bo(Nn))},[ba,da]);var Zs=oe.useState(0),Ps=(0,fe.Z)(Zs,2),ul=Ps[0],Ns=Ps[1],_a=ul>=Ko.length-1||Ja!=="horizontal"||Wr;oe.useEffect(function(){xl&&xo(ro)},[ro]),oe.useEffect(function(){return go.current=!0,function(){go.current=!1}},[]);var qa=ot(),Wo=qa.registerPath,Js=qa.unregisterPath,Cl=qa.refreshOverflowKeys,qs=qa.isSubPathKey,wo=qa.getKeyPath,so=qa.getKeys,ia=qa.getSubPathKeys,va=oe.useMemo(function(){return{registerPath:Wo,unregisterPath:Js}},[Wo,Js]),oa=oe.useMemo(function(){return{isSubPathKey:qs}},[qs]);oe.useEffect(function(){Cl(_a?Nn:Ko.slice(ul+1).map(function(To){return To.key}))},[ul,_a]);var za=(0,ve.Z)(Sr||ri&&((vn=Ko[0])===null||vn===void 0?void 0:vn.key),{value:Sr}),$a=(0,fe.Z)(za,2),hs=$a[0],Wa=$a[1],Ms=mt(function(To){Wa(To)}),ks=mt(function(){Wa(void 0)});(0,oe.useImperativeHandle)(fn,function(){return{list:no.current,focus:function(Uo){var Xo,fs=so(),ja=Fe(fs,ti),Ws=ja.elements,is=ja.key2element,Ba=ja.element2key,Aa=_e(no.current,Ws),Qs=hs!=null?hs:Aa[0]?Ba.get(Aa[0]):(Xo=Ko.find(function(Dc){return!Dc.props.disabled}))===null||Xo===void 0?void 0:Xo.key,ps=is.get(Qs);if(Qs&&ps){var Pl;ps==null||(Pl=ps.focus)===null||Pl===void 0||Pl.call(ps,Uo)}}}});var Na=(0,ve.Z)(oo||[],{value:Fr,postState:function(Uo){return Array.isArray(Uo)?Uo:Uo==null?Nn:[Uo]}}),mc=(0,fe.Z)(Na,2),dl=mc[0],hl=mc[1],Ol=function(Uo){if(jr){var Xo=Uo.key,fs=dl.includes(Xo),ja;_i?fs?ja=dl.filter(function(is){return is!==Xo}):ja=[].concat((0,Ce.Z)(dl),[Xo]):ja=[Xo],hl(ja);var Ws=(0,Me.Z)((0,Me.Z)({},Uo),{},{selectedKeys:ja});fs?bi==null||bi(Ws):Nr==null||Nr(Ws)}!_i&&ro.length&&Ja!=="inline"&&Bo(Nn)},Rl=mt(function(To){io==null||io(Xn(To)),Ol(To)}),wl=mt(function(To,Uo){var Xo=ro.filter(function(ja){return ja!==To});if(Uo)Xo.push(To);else if(Ja!=="inline"){var fs=ia(To);Xo=Xo.filter(function(ja){return!fs.has(ja)})}(0,ue.Z)(ro,Xo,!0)||Bo(Xo,!0)}),vc=function(Uo,Xo){var fs=Xo!=null?Xo:!ro.includes(Uo);wl(Uo,fs)},il=me(Ja,hs,Fi,ti,no,so,wo,Wa,vc,to);oe.useEffect(function(){Zo(!0)},[]);var oc=oe.useMemo(function(){return{_internalRenderMenuItem:Ho,_internalRenderSubMenuItem:La}},[Ho,La]),ol=Ja!=="horizontal"||Wr?Ko:Ko.map(function(To,Uo){return oe.createElement(Re,{key:To.key,overflowDisabled:Uo>ul},To)}),fl=oe.createElement(se.Z,(0,ne.Z)({id:ei,ref:no,prefixCls:"".concat(Mn,"-overflow"),component:"ul",itemComponent:Yn,className:ae()(Mn,"".concat(Mn,"-root"),"".concat(Mn,"-").concat(Ja),Vn,(An={},(0,xe.Z)(An,"".concat(Mn,"-inline-collapsed"),Da),(0,xe.Z)(An,"".concat(Mn,"-rtl"),Fi),An),Bn),dir:wr,style:Kn,role:"menu",tabIndex:fr,data:ol,renderRawItem:function(Uo){return Uo},renderRawRest:function(Uo){var Xo=Uo.length,fs=Xo?Ko.slice(-Xo):null;return oe.createElement(Ft,{eventKey:xt,title:Kr,disabled:_a,internalPopupClose:Xo===0,popupClassName:Hi},fs)},maxCount:Ja!=="horizontal"||Wr?se.Z.INVALIDATE:se.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Uo){Ns(Uo)},onKeyDown:il},ha));return oe.createElement(Tt.Provider,{value:oc},oe.createElement(ye.Provider,{value:ti},oe.createElement(Re,{prefixCls:Mn,rootClassName:Bn,mode:Ja,openKeys:ro,rtl:Fi,disabled:Or,motion:ta?mo:null,defaultMotions:ta?Co:null,activeKey:hs,onActive:Ms,onInactive:ks,selectedKeys:dl,inlineIndent:Xi,subMenuOpenDelay:di,subMenuCloseDelay:Vr,forceSubMenuRender:er,builtinPlacements:vo,triggerSubMenuAction:_o,getPopupContainer:eo,itemIcon:Er,expandIcon:Ar,onItemClick:Rl,onOpenChange:wl},oe.createElement(gt.Provider,{value:oa},fl),oe.createElement("div",{style:{display:"none"},"aria-hidden":!0},oe.createElement(Ie.Provider,{value:va},Ko)))))}),Jn=Rn,Sn=Jn;Sn.Item=Yn,Sn.SubMenu=Ft,Sn.ItemGroup=on,Sn.Divider=cn;var Un=Sn},83836:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ut}});var ne=ee(60499),xe=ee(85899),Me=ee(72190),Ce=ee(42244),fe=ee(59301),he=ee(92310),ce=ee.n(he),ae=ee(29301),se=ee(34280),ve=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ue=void 0;function pe(St,qe){var Ze=St.prefixCls,wt=St.invalidate,Wt=St.item,Kt=St.renderItem,_t=St.responsive,vt=St.responsiveDisabled,jt=St.registerSize,yn=St.itemKey,Xt=St.className,Ln=St.style,pn=St.children,hn=St.display,un=St.order,Xe=St.component,ke=Xe===void 0?"div":Xe,_e=(0,Ce.Z)(St,ve),Te=_t&&!hn;function Fe(Je){jt(yn,Je)}fe.useEffect(function(){return function(){Fe(null)}},[]);var me=Kt&&Wt!==ue?Kt(Wt,{index:un}):pn,at;wt||(at={opacity:Te?0:1,height:Te?0:ue,overflowY:Te?"hidden":ue,order:_t?un:ue,pointerEvents:Te?"none":ue,position:Te?"absolute":ue});var Pt={};Te&&(Pt["aria-hidden"]=!0);var Qe=fe.createElement(ke,(0,ne.Z)({className:ce()(!wt&&Ze,Xt),style:(0,xe.Z)((0,xe.Z)({},at),Ln)},Pt,_e,{ref:qe}),me);return _t&&(Qe=fe.createElement(ae.Z,{onResize:function(xt){var ot=xt.offsetWidth;Fe(ot)},disabled:vt},Qe)),Qe}var oe=fe.forwardRef(pe);oe.displayName="Item";var ge=oe,ye=ee(6089),we=ee(4676),Be=ee(16089);function ze(St){if(typeof MessageChannel=="undefined")(0,Be.Z)(St);else{var qe=new MessageChannel;qe.port1.onmessage=function(){return St()},qe.port2.postMessage(void 0)}}function $e(){var St=fe.useRef(null),qe=function(wt){St.current||(St.current=[],ze(function(){(0,we.unstable_batchedUpdates)(function(){St.current.forEach(function(Wt){Wt()}),St.current=null})})),St.current.push(wt)};return qe}function Le(St,qe){var Ze=fe.useState(qe),wt=(0,Me.Z)(Ze,2),Wt=wt[0],Kt=wt[1],_t=(0,ye.Z)(function(vt){St(function(){Kt(vt)})});return[Wt,_t]}var Ne=fe.createContext(null),Re=["component"],Se=["className"],Ie=["className"],Ae=function(qe,Ze){var wt=fe.useContext(Ne);if(!wt){var Wt=qe.component,Kt=Wt===void 0?"div":Wt,_t=(0,Ce.Z)(qe,Re);return fe.createElement(Kt,(0,ne.Z)({},_t,{ref:Ze}))}var vt=wt.className,jt=(0,Ce.Z)(wt,Se),yn=qe.className,Xt=(0,Ce.Z)(qe,Ie);return fe.createElement(Ne.Provider,{value:null},fe.createElement(ge,(0,ne.Z)({ref:Ze,className:ce()(vt,yn)},jt,Xt)))},it=fe.forwardRef(Ae);it.displayName="RawItem";var Ue=it,gt=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],Ve="responsive",Tt="invalidate";function ct(St){return"+ ".concat(St.length," ...")}function Ot(St,qe){var Ze=St.prefixCls,wt=Ze===void 0?"rc-overflow":Ze,Wt=St.data,Kt=Wt===void 0?[]:Wt,_t=St.renderItem,vt=St.renderRawItem,jt=St.itemKey,yn=St.itemWidth,Xt=yn===void 0?10:yn,Ln=St.ssr,pn=St.style,hn=St.className,un=St.maxCount,Xe=St.renderRest,ke=St.renderRawRest,_e=St.prefix,Te=St.suffix,Fe=St.component,me=Fe===void 0?"div":Fe,at=St.itemComponent,Pt=St.onVisibleChange,Qe=(0,Ce.Z)(St,gt),Je=Ln==="full",xt=$e(),ot=Le(xt,null),mt=(0,Me.Z)(ot,2),Nt=mt[0],rn=mt[1],It=Nt||0,Qt=Le(xt,new Map),dn=(0,Me.Z)(Qt,2),At=dn[0],Lt=dn[1],qt=Le(xt,0),Tn=(0,Me.Z)(qt,2),Jt=Tn[0],On=Tn[1],zn=Le(xt,0),qn=(0,Me.Z)(zn,2),Xn=qn[0],vr=qn[1],_r=Le(xt,0),Qn=(0,Me.Z)(_r,2),Cr=Qn[0],ni=Qn[1],Jr=Le(xt,0),Yn=(0,Me.Z)(Jr,2),mr=Yn[0],si=Yn[1],or=(0,fe.useState)(null),ii=(0,Me.Z)(or,2),ki=ii[0],gi=ii[1],Li=(0,fe.useState)(null),ui=(0,Me.Z)(Li,2),dr=ui[0],Hr=ui[1],Cn=fe.useMemo(function(){return dr===null&&Je?Number.MAX_SAFE_INTEGER:dr||0},[dr,Nt]),Ee=(0,fe.useState)(!1),je=(0,Me.Z)(Ee,2),Oe=je[0],De=je[1],Ke="".concat(wt,"-item"),et=Math.max(Jt,Xn),rt=un===Ve,Dt=Kt.length&&rt,Ft=un===Tt,Bt=Dt||typeof un=="number"&&Kt.length>un,Ct=(0,fe.useMemo)(function(){var kn=Kt;return Dt?Nt===null&&Je?kn=Kt:kn=Kt.slice(0,Math.min(Kt.length,It/Xt)):typeof un=="number"&&(kn=Kt.slice(0,un)),kn},[Kt,Xt,Nt,un,Dt]),Ht=(0,fe.useMemo)(function(){return Dt?Kt.slice(Cn+1):Kt.slice(Ct.length)},[Kt,Ct,Dt,Cn]),Ut=(0,fe.useCallback)(function(kn,Mn){var Bn;return typeof jt=="function"?jt(kn):(Bn=jt&&(kn==null?void 0:kn[jt]))!==null&&Bn!==void 0?Bn:Mn},[jt]),on=(0,fe.useCallback)(_t||function(kn){return kn},[_t]);function cn(kn,Mn,Bn){dr===kn&&(Mn===void 0||Mn===ki)||(Hr(kn),Bn||(De(kn<Kt.length-1),Pt==null||Pt(kn)),Mn!==void 0&&gi(Mn))}function Rt(kn,Mn){rn(Mn.clientWidth)}function Vt(kn,Mn){Lt(function(Bn){var Kn=new Map(Bn);return Mn===null?Kn.delete(kn):Kn.set(kn,Mn),Kn})}function In(kn,Mn){vr(Mn),On(Xn)}function wn(kn,Mn){ni(Mn)}function Nn(kn,Mn){si(Mn)}function Rn(kn){return At.get(Ut(Ct[kn],kn))}(0,se.Z)(function(){if(It&&typeof et=="number"&&Ct){var kn=Cr+mr,Mn=Ct.length,Bn=Mn-1;if(!Mn){cn(0,null);return}for(var Kn=0;Kn<Mn;Kn+=1){var Vn=Rn(Kn);if(Je&&(Vn=Vn||0),Vn===void 0){cn(Kn-1,void 0,!0);break}if(kn+=Vn,Bn===0&&kn<=It||Kn===Bn-1&&kn+Rn(Bn)<=It){cn(Bn,null);break}else if(kn+et>It){cn(Kn-1,kn-Vn-mr+Xn);break}}Te&&Rn(0)+mr>It&&gi(null)}},[It,At,Xn,Cr,mr,Ut,Ct]);var Jn=Oe&&!!Ht.length,Sn={};ki!==null&&Dt&&(Sn={position:"absolute",left:ki,top:0});var Un={prefixCls:Ke,responsive:Dt,component:at,invalidate:Ft},zt=vt?function(kn,Mn){var Bn=Ut(kn,Mn);return fe.createElement(Ne.Provider,{key:Bn,value:(0,xe.Z)((0,xe.Z)({},Un),{},{order:Mn,item:kn,itemKey:Bn,registerSize:Vt,display:Mn<=Cn})},vt(kn,Mn))}:function(kn,Mn){var Bn=Ut(kn,Mn);return fe.createElement(ge,(0,ne.Z)({},Un,{order:Mn,key:Bn,item:kn,renderItem:on,itemKey:Bn,registerSize:Vt,display:Mn<=Cn}))},fn={order:Jn?Cn:Number.MAX_SAFE_INTEGER,className:"".concat(Ke,"-rest"),registerSize:In,display:Jn},vn=Xe||ct,An=ke?fe.createElement(Ne.Provider,{value:(0,xe.Z)((0,xe.Z)({},Un),fn)},ke(Ht)):fe.createElement(ge,(0,ne.Z)({},Un,fn),typeof vn=="function"?vn(Ht):vn),En=fe.createElement(me,(0,ne.Z)({className:ce()(!Ft&&wt,hn),style:pn,ref:qe},Qe),_e&&fe.createElement(ge,(0,ne.Z)({},Un,{responsive:rt,responsiveDisabled:!Dt,order:-1,className:"".concat(Ke,"-prefix"),registerSize:wn,display:!0}),_e),Ct.map(zt),Bt?An:null,Te&&fe.createElement(ge,(0,ne.Z)({},Un,{responsive:rt,responsiveDisabled:!Dt,order:Cn,className:"".concat(Ke,"-suffix"),registerSize:Nn,display:!0,style:Sn}),Te));return rt?fe.createElement(ae.Z,{onResize:Rt,disabled:!Dt},En):En}var We=fe.forwardRef(Ot);We.displayName="Overflow",We.Item=Ue,We.RESPONSIVE=Ve,We.INVALIDATE=Tt;var lt=We,ut=lt},91735:function(gn,kt){"use strict";kt.Z={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"}},17115:function(gn,kt,ee){"use strict";ee.d(kt,{ZP:function(){return ce}});var ne=ee(72190),xe=ee(59301),Me=ee(47273),Ce=0,fe=(0,Me.Z)();function he(){var ae;return fe?(ae=Ce,Ce+=1):ae="TEST_OR_SSR",ae}function ce(ae){var se=xe.useState(),ve=(0,ne.Z)(se,2),ue=ve[0],pe=ve[1];return xe.useEffect(function(){pe("rc_select_".concat(he()))},[]),ae||ue}},77861:function(gn,kt,ee){"use strict";ee.d(kt,{Ac:function(){return Nt},Xo:function(){return Xn},Wx:function(){return _r},ZP:function(){return Ke},lk:function(){return Ne}});var ne=ee(60499),xe=ee(77654),Me=ee(18642),Ce=ee(85899),fe=ee(72190),he=ee(42244),ce=ee(43749),ae=ee(18929),se=ee(48736),ve=ee(59301),ue=ee(92310),pe=ee.n(ue),oe=ee(34280),ge=ee(49658),ye=ee(10228),we=ee(8654),Be=function(rt){var Dt=rt.className,Ft=rt.customizeIcon,Bt=rt.customizeIconProps,Ct=rt.onMouseDown,Ht=rt.onClick,Ut=rt.children,on;return typeof Ft=="function"?on=Ft(Bt):on=Ft,ve.createElement("span",{className:Dt,onMouseDown:function(Rt){Rt.preventDefault(),Ct&&Ct(Rt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Ht,"aria-hidden":!0},on!==void 0?on:ve.createElement("span",{className:pe()(Dt.split(/\s+/).map(function(cn){return"".concat(cn,"-icon")}))},Ut))},ze=Be;function $e(et,rt,Dt,Ft,Bt){var Ct=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Ht=arguments.length>6?arguments[6]:void 0,Ut=arguments.length>7?arguments[7]:void 0,on=ve.useMemo(function(){if((0,ce.Z)(Ft)==="object")return Ft.clearIcon;if(Bt)return Bt},[Ft,Bt]),cn=ve.useMemo(function(){return!!(!Ct&&Ft&&(Dt.length||Ht)&&!(Ut==="combobox"&&Ht===""))},[Ft,Ct,Dt.length,Ht,Ut]);return{allowClear:cn,clearIcon:ve.createElement(ze,{className:"".concat(et,"-clear"),onMouseDown:rt,customizeIcon:on},"\xD7")}}var Le=ve.createContext(null);function Ne(){return ve.useContext(Le)}function Re(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,rt=ve.useState(!1),Dt=(0,fe.Z)(rt,2),Ft=Dt[0],Bt=Dt[1],Ct=ve.useRef(null),Ht=function(){window.clearTimeout(Ct.current)};ve.useEffect(function(){return Ht},[]);var Ut=function(cn,Rt){Ht(),Ct.current=window.setTimeout(function(){Bt(cn),Rt&&Rt()},et)};return[Ft,Ut,Ht]}function Se(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,rt=ve.useRef(null),Dt=ve.useRef(null);ve.useEffect(function(){return function(){window.clearTimeout(Dt.current)}},[]);function Ft(Bt){(Bt||rt.current===null)&&(rt.current=Bt),window.clearTimeout(Dt.current),Dt.current=window.setTimeout(function(){rt.current=null},et)}return[function(){return rt.current},Ft]}function Ie(et,rt,Dt,Ft){var Bt=ve.useRef(null);Bt.current={open:rt,triggerOpen:Dt,customizedTrigger:Ft},ve.useEffect(function(){function Ct(Ht){var Ut;if(!((Ut=Bt.current)!==null&&Ut!==void 0&&Ut.customizedTrigger)){var on=Ht.target;on.shadowRoot&&Ht.composed&&(on=Ht.composedPath()[0]||on),Bt.current.open&&et().filter(function(cn){return cn}).every(function(cn){return!cn.contains(on)&&cn!==on})&&Bt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Ct),function(){return window.removeEventListener("mousedown",Ct)}},[])}var Ae=ee(26112),it=ee(83836),Ue=function(rt,Dt){var Ft,Bt,Ct=rt.prefixCls,Ht=rt.id,Ut=rt.inputElement,on=rt.disabled,cn=rt.tabIndex,Rt=rt.autoFocus,Vt=rt.autoComplete,In=rt.editable,wn=rt.activeDescendantId,Nn=rt.value,Rn=rt.maxLength,Jn=rt.onKeyDown,Sn=rt.onMouseDown,Un=rt.onChange,zt=rt.onPaste,fn=rt.onCompositionStart,vn=rt.onCompositionEnd,An=rt.open,En=rt.attrs,kn=Ut||ve.createElement("input",null),Mn=kn,Bn=Mn.ref,Kn=Mn.props,Vn=Kn.onKeyDown,cr=Kn.onChange,fr=Kn.onMouseDown,$r=Kn.onCompositionStart,Mr=Kn.onCompositionEnd,wr=Kn.style;return(0,se.Kp)(!("maxLength"in kn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),kn=ve.cloneElement(kn,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({type:"search"},Kn),{},{id:Ht,ref:(0,we.sQ)(Dt,Bn),disabled:on,tabIndex:cn,autoComplete:Vt||"off",autoFocus:Rt,className:pe()("".concat(Ct,"-selection-search-input"),(Ft=kn)===null||Ft===void 0||(Bt=Ft.props)===null||Bt===void 0?void 0:Bt.className),role:"combobox","aria-label":"Search","aria-expanded":An||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ht,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ht,"_list"),"aria-activedescendant":An?wn:void 0},En),{},{value:In?Nn:"",maxLength:Rn,readOnly:!In,unselectable:In?null:"on",style:(0,Ce.Z)((0,Ce.Z)({},wr),{},{opacity:In?null:0}),onKeyDown:function(Xr){Jn(Xr),Vn&&Vn(Xr)},onMouseDown:function(Xr){Sn(Xr),fr&&fr(Xr)},onChange:function(Xr){Un(Xr),cr&&cr(Xr)},onCompositionStart:function(Xr){fn(Xr),$r&&$r(Xr)},onCompositionEnd:function(Xr){vn(Xr),Mr&&Mr(Xr)},onPaste:zt})),kn},gt=ve.forwardRef(Ue);gt.displayName="Input";var Ve=gt;function Tt(et){return Array.isArray(et)?et:et!==void 0?[et]:[]}var ct=typeof window!="undefined"&&window.document&&window.document.documentElement,Ot=ct;function We(et){return et!=null}function lt(et){return!et&&et!==0}function ut(et){return["string","number"].includes((0,ce.Z)(et))}function St(et){var rt=void 0;return et&&(ut(et.title)?rt=et.title.toString():ut(et.label)&&(rt=et.label.toString())),rt}function qe(et,rt){Ot?ve.useLayoutEffect(et,rt):ve.useEffect(et,rt)}function Ze(et){var rt;return(rt=et.key)!==null&&rt!==void 0?rt:et.value}var wt=function(rt){rt.preventDefault(),rt.stopPropagation()},Wt=function(rt){var Dt=rt.id,Ft=rt.prefixCls,Bt=rt.values,Ct=rt.open,Ht=rt.searchValue,Ut=rt.autoClearSearchValue,on=rt.inputRef,cn=rt.placeholder,Rt=rt.disabled,Vt=rt.mode,In=rt.showSearch,wn=rt.autoFocus,Nn=rt.autoComplete,Rn=rt.activeDescendantId,Jn=rt.tabIndex,Sn=rt.removeIcon,Un=rt.maxTagCount,zt=rt.maxTagTextLength,fn=rt.maxTagPlaceholder,vn=fn===void 0?function(yi){return"+ ".concat(yi.length," ...")}:fn,An=rt.tagRender,En=rt.onToggleOpen,kn=rt.onRemove,Mn=rt.onInputChange,Bn=rt.onInputPaste,Kn=rt.onInputKeyDown,Vn=rt.onInputMouseDown,cr=rt.onInputCompositionStart,fr=rt.onInputCompositionEnd,$r=ve.useRef(null),Mr=(0,ve.useState)(0),wr=(0,fe.Z)(Mr,2),ei=wr[0],Xr=wr[1],Zr=(0,ve.useState)(!1),Lr=(0,fe.Z)(Zr,2),Or=Lr[0],Wr=Lr[1],Pr="".concat(Ft,"-selection"),di=Ct||Vt==="multiple"&&Ut===!1||Vt==="tags"?Ht:"",Ri=Vt==="tags"||Vt==="multiple"&&Ut===!1||In&&(Ct||Or);qe(function(){Xr($r.current.scrollWidth)},[di]);function Vr(yi,jr,Bi,_i,oo){return ve.createElement("span",{className:pe()("".concat(Pr,"-item"),(0,Me.Z)({},"".concat(Pr,"-item-disabled"),Bi)),title:St(yi)},ve.createElement("span",{className:"".concat(Pr,"-item-content")},jr),_i&&ve.createElement(ze,{className:"".concat(Pr,"-item-remove"),onMouseDown:wt,onClick:oo,customizeIcon:Sn},"\xD7"))}function er(yi,jr,Bi,_i,oo){var Fr=function(bi){wt(bi),En(!Ct)};return ve.createElement("span",{onMouseDown:Fr},An({label:jr,value:yi,disabled:Bi,closable:_i,onClose:oo}))}function Zn(yi){var jr=yi.disabled,Bi=yi.label,_i=yi.value,oo=!Rt&&!jr,Fr=Bi;if(typeof zt=="number"&&(typeof Bi=="string"||typeof Bi=="number")){var Nr=String(Fr);Nr.length>zt&&(Fr="".concat(Nr.slice(0,zt),"..."))}var bi=function(Xi){Xi&&Xi.stopPropagation(),kn(yi)};return typeof An=="function"?er(_i,Fr,jr,oo,bi):Vr(yi,Fr,jr,oo,bi)}function Dr(yi){var jr=typeof vn=="function"?vn(yi):vn;return Vr({title:jr},jr,!1)}var Sr=ve.createElement("div",{className:"".concat(Pr,"-search"),style:{width:ei},onFocus:function(){Wr(!0)},onBlur:function(){Wr(!1)}},ve.createElement(Ve,{ref:on,open:Ct,prefixCls:Ft,id:Dt,inputElement:null,disabled:Rt,autoFocus:wn,autoComplete:Nn,editable:Ri,activeDescendantId:Rn,value:di,onKeyDown:Kn,onMouseDown:Vn,onChange:Mn,onPaste:Bn,onCompositionStart:cr,onCompositionEnd:fr,tabIndex:Jn,attrs:(0,Ae.Z)(rt,!0)}),ve.createElement("span",{ref:$r,className:"".concat(Pr,"-search-mirror"),"aria-hidden":!0},di,"\xA0")),ri=ve.createElement(it.Z,{prefixCls:"".concat(Pr,"-overflow"),data:Bt,renderItem:Zn,renderRest:Dr,suffix:Sr,itemKey:Ze,maxCount:Un});return ve.createElement(ve.Fragment,null,ri,!Bt.length&&!di&&ve.createElement("span",{className:"".concat(Pr,"-placeholder")},cn))},Kt=Wt,_t=function(rt){var Dt=rt.inputElement,Ft=rt.prefixCls,Bt=rt.id,Ct=rt.inputRef,Ht=rt.disabled,Ut=rt.autoFocus,on=rt.autoComplete,cn=rt.activeDescendantId,Rt=rt.mode,Vt=rt.open,In=rt.values,wn=rt.placeholder,Nn=rt.tabIndex,Rn=rt.showSearch,Jn=rt.searchValue,Sn=rt.activeValue,Un=rt.maxLength,zt=rt.onInputKeyDown,fn=rt.onInputMouseDown,vn=rt.onInputChange,An=rt.onInputPaste,En=rt.onInputCompositionStart,kn=rt.onInputCompositionEnd,Mn=rt.title,Bn=ve.useState(!1),Kn=(0,fe.Z)(Bn,2),Vn=Kn[0],cr=Kn[1],fr=Rt==="combobox",$r=fr||Rn,Mr=In[0],wr=Jn||"";fr&&Sn&&!Vn&&(wr=Sn),ve.useEffect(function(){fr&&cr(!1)},[fr,Sn]);var ei=Rt!=="combobox"&&!Vt&&!Rn?!1:!!wr,Xr=Mn===void 0?St(Mr):Mn,Zr=function(){if(Mr)return null;var Or=ei?{visibility:"hidden"}:void 0;return ve.createElement("span",{className:"".concat(Ft,"-selection-placeholder"),style:Or},wn)};return ve.createElement(ve.Fragment,null,ve.createElement("span",{className:"".concat(Ft,"-selection-search")},ve.createElement(Ve,{ref:Ct,prefixCls:Ft,id:Bt,open:Vt,inputElement:Dt,disabled:Ht,autoFocus:Ut,autoComplete:on,editable:$r,activeDescendantId:cn,value:wr,onKeyDown:zt,onMouseDown:fn,onChange:function(Or){cr(!0),vn(Or)},onPaste:An,onCompositionStart:En,onCompositionEnd:kn,tabIndex:Nn,attrs:(0,Ae.Z)(rt,!0),maxLength:fr?Un:void 0})),!fr&&Mr?ve.createElement("span",{className:"".concat(Ft,"-selection-item"),title:Xr,style:ei?{visibility:"hidden"}:void 0},Mr.label):null,Zr())},vt=_t;function jt(et){return![ye.Z.ESC,ye.Z.SHIFT,ye.Z.BACKSPACE,ye.Z.TAB,ye.Z.WIN_KEY,ye.Z.ALT,ye.Z.META,ye.Z.WIN_KEY_RIGHT,ye.Z.CTRL,ye.Z.SEMICOLON,ye.Z.EQUALS,ye.Z.CAPS_LOCK,ye.Z.CONTEXT_MENU,ye.Z.F1,ye.Z.F2,ye.Z.F3,ye.Z.F4,ye.Z.F5,ye.Z.F6,ye.Z.F7,ye.Z.F8,ye.Z.F9,ye.Z.F10,ye.Z.F11,ye.Z.F12].includes(et)}var yn=function(rt,Dt){var Ft=(0,ve.useRef)(null),Bt=(0,ve.useRef)(!1),Ct=rt.prefixCls,Ht=rt.open,Ut=rt.mode,on=rt.showSearch,cn=rt.tokenWithEnter,Rt=rt.autoClearSearchValue,Vt=rt.onSearch,In=rt.onSearchSubmit,wn=rt.onToggleOpen,Nn=rt.onInputKeyDown,Rn=rt.domRef;ve.useImperativeHandle(Dt,function(){return{focus:function(){Ft.current.focus()},blur:function(){Ft.current.blur()}}});var Jn=Se(0),Sn=(0,fe.Z)(Jn,2),Un=Sn[0],zt=Sn[1],fn=function(wr){var ei=wr.which;(ei===ye.Z.UP||ei===ye.Z.DOWN)&&wr.preventDefault(),Nn&&Nn(wr),ei===ye.Z.ENTER&&Ut==="tags"&&!Bt.current&&!Ht&&(In==null||In(wr.target.value)),jt(ei)&&wn(!0)},vn=function(){zt(!0)},An=(0,ve.useRef)(null),En=function(wr){Vt(wr,!0,Bt.current)!==!1&&wn(!0)},kn=function(){Bt.current=!0},Mn=function(wr){Bt.current=!1,Ut!=="combobox"&&En(wr.target.value)},Bn=function(wr){var ei=wr.target.value;if(cn&&An.current&&/[\r\n]/.test(An.current)){var Xr=An.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");ei=ei.replace(Xr,An.current)}An.current=null,En(ei)},Kn=function(wr){var ei=wr.clipboardData,Xr=ei.getData("text");An.current=Xr},Vn=function(wr){var ei=wr.target;if(ei!==Ft.current){var Xr=document.body.style.msTouchAction!==void 0;Xr?setTimeout(function(){Ft.current.focus()}):Ft.current.focus()}},cr=function(wr){var ei=Un();wr.target!==Ft.current&&!ei&&Ut!=="combobox"&&wr.preventDefault(),(Ut!=="combobox"&&(!on||!ei)||!Ht)&&(Ht&&Rt!==!1&&Vt("",!0,!1),wn())},fr={inputRef:Ft,onInputKeyDown:fn,onInputMouseDown:vn,onInputChange:Bn,onInputPaste:Kn,onInputCompositionStart:kn,onInputCompositionEnd:Mn},$r=Ut==="multiple"||Ut==="tags"?ve.createElement(Kt,(0,ne.Z)({},rt,fr)):ve.createElement(vt,(0,ne.Z)({},rt,fr));return ve.createElement("div",{ref:Rn,className:"".concat(Ct,"-selector"),onClick:Vn,onMouseDown:cr},$r)},Xt=ve.forwardRef(yn);Xt.displayName="Selector";var Ln=Xt,pn=ee(35593),hn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],un=function(rt){var Dt=rt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Dt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Dt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Dt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Dt,adjustY:1},htmlRegion:"scroll"}}},Xe=function(rt,Dt){var Ft=rt.prefixCls,Bt=rt.disabled,Ct=rt.visible,Ht=rt.children,Ut=rt.popupElement,on=rt.animation,cn=rt.transitionName,Rt=rt.dropdownStyle,Vt=rt.dropdownClassName,In=rt.direction,wn=In===void 0?"ltr":In,Nn=rt.placement,Rn=rt.builtinPlacements,Jn=rt.dropdownMatchSelectWidth,Sn=rt.dropdownRender,Un=rt.dropdownAlign,zt=rt.getPopupContainer,fn=rt.empty,vn=rt.getTriggerDOMNode,An=rt.onPopupVisibleChange,En=rt.onPopupMouseEnter,kn=(0,he.Z)(rt,hn),Mn="".concat(Ft,"-dropdown"),Bn=Ut;Sn&&(Bn=Sn(Ut));var Kn=ve.useMemo(function(){return Rn||un(Jn)},[Rn,Jn]),Vn=on?"".concat(Mn,"-").concat(on):cn,cr=typeof Jn=="number",fr=ve.useMemo(function(){return cr?null:Jn===!1?"minWidth":"width"},[Jn,cr]),$r=Rt;cr&&($r=(0,Ce.Z)((0,Ce.Z)({},$r),{},{width:Jn}));var Mr=ve.useRef(null);return ve.useImperativeHandle(Dt,function(){return{getPopupElement:function(){return Mr.current}}}),ve.createElement(pn.Z,(0,ne.Z)({},kn,{showAction:An?["click"]:[],hideAction:An?["click"]:[],popupPlacement:Nn||(wn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Kn,prefixCls:Mn,popupTransitionName:Vn,popup:ve.createElement("div",{ref:Mr,onMouseEnter:En},Bn),stretch:fr,popupAlign:Un,popupVisible:Ct,getPopupContainer:zt,popupClassName:pe()(Vt,(0,Me.Z)({},"".concat(Mn,"-empty"),fn)),popupStyle:$r,getTriggerDOMNode:vn,onPopupVisibleChange:An}),Ht)},ke=ve.forwardRef(Xe);ke.displayName="SelectTrigger";var _e=ke,Te=ee(48745);function Fe(et,rt){var Dt=et.key,Ft;return"value"in et&&(Ft=et.value),Dt!=null?Dt:Ft!==void 0?Ft:"rc-index-key-".concat(rt)}function me(et,rt){var Dt=et||{},Ft=Dt.label,Bt=Dt.value,Ct=Dt.options,Ht=Dt.groupLabel,Ut=Ft||(rt?"children":"label");return{label:Ut,value:Bt||"value",options:Ct||"options",groupLabel:Ht||Ut}}function at(et){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Dt=rt.fieldNames,Ft=rt.childrenAsData,Bt=[],Ct=me(Dt,!1),Ht=Ct.label,Ut=Ct.value,on=Ct.options,cn=Ct.groupLabel;function Rt(Vt,In){Vt.forEach(function(wn){if(In||!(on in wn)){var Nn=wn[Ut];Bt.push({key:Fe(wn,Bt.length),groupOption:In,data:wn,label:wn[Ht],value:Nn})}else{var Rn=wn[cn];Rn===void 0&&Ft&&(Rn=wn.label),Bt.push({key:Fe(wn,Bt.length),group:!0,data:wn,label:Rn}),Rt(wn[on],!0)}})}return Rt(et,!1),Bt}function Pt(et){var rt=(0,Ce.Z)({},et);return"props"in rt||Object.defineProperty(rt,"props",{get:function(){return(0,se.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),rt}}),rt}function Qe(et,rt){if(!rt||!rt.length)return null;var Dt=!1;function Ft(Ct,Ht){var Ut=(0,Te.Z)(Ht),on=Ut[0],cn=Ut.slice(1);if(!on)return[Ct];var Rt=Ct.split(on);return Dt=Dt||Rt.length>1,Rt.reduce(function(Vt,In){return[].concat((0,xe.Z)(Vt),(0,xe.Z)(Ft(In,cn)))},[]).filter(function(Vt){return Vt})}var Bt=Ft(et,rt);return Dt?Bt:null}var Je=["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"],xt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function ot(et){return et==="tags"||et==="multiple"}var mt=ve.forwardRef(function(et,rt){var Dt,Ft,Bt=et.id,Ct=et.prefixCls,Ht=et.className,Ut=et.showSearch,on=et.tagRender,cn=et.direction,Rt=et.omitDomProps,Vt=et.displayValues,In=et.onDisplayValuesChange,wn=et.emptyOptions,Nn=et.notFoundContent,Rn=Nn===void 0?"Not Found":Nn,Jn=et.onClear,Sn=et.mode,Un=et.disabled,zt=et.loading,fn=et.getInputElement,vn=et.getRawInputElement,An=et.open,En=et.defaultOpen,kn=et.onDropdownVisibleChange,Mn=et.activeValue,Bn=et.onActiveValueChange,Kn=et.activeDescendantId,Vn=et.searchValue,cr=et.autoClearSearchValue,fr=et.onSearch,$r=et.onSearchSplit,Mr=et.tokenSeparators,wr=et.allowClear,ei=et.suffixIcon,Xr=et.clearIcon,Zr=et.OptionList,Lr=et.animation,Or=et.transitionName,Wr=et.dropdownStyle,Pr=et.dropdownClassName,di=et.dropdownMatchSelectWidth,Ri=et.dropdownRender,Vr=et.dropdownAlign,er=et.placement,Zn=et.builtinPlacements,Dr=et.getPopupContainer,Sr=et.showAction,ri=Sr===void 0?[]:Sr,yi=et.onFocus,jr=et.onBlur,Bi=et.onKeyUp,_i=et.onKeyDown,oo=et.onMouseDown,Fr=(0,he.Z)(et,Je),Nr=ot(Sn),bi=(Ut!==void 0?Ut:Nr)||Sn==="combobox",hi=(0,Ce.Z)({},Fr);xt.forEach(function(wo){delete hi[wo]}),Rt==null||Rt.forEach(function(wo){delete hi[wo]});var Xi=ve.useState(!1),mo=(0,fe.Z)(Xi,2),Co=mo[0],ji=mo[1];ve.useEffect(function(){ji((0,ge.Z)())},[]);var _o=ve.useRef(null),vo=ve.useRef(null),Er=ve.useRef(null),Ar=ve.useRef(null),kr=ve.useRef(null),Kr=Re(),Hi=(0,fe.Z)(Kr,3),eo=Hi[0],io=Hi[1],ao=Hi[2];ve.useImperativeHandle(rt,function(){var wo,so;return{focus:(wo=Ar.current)===null||wo===void 0?void 0:wo.focus,blur:(so=Ar.current)===null||so===void 0?void 0:so.blur,scrollTo:function(va){var oa;return(oa=kr.current)===null||oa===void 0?void 0:oa.scrollTo(va)}}});var to=ve.useMemo(function(){var wo;if(Sn!=="combobox")return Vn;var so=(wo=Vt[0])===null||wo===void 0?void 0:wo.value;return typeof so=="string"||typeof so=="number"?String(so):""},[Vn,Sn,Vt]),Mo=Sn==="combobox"&&typeof fn=="function"&&fn()||null,Yo=typeof vn=="function"&&vn(),Ho=(0,we.x1)(vo,Yo==null||(Dt=Yo.props)===null||Dt===void 0?void 0:Dt.ref),La=ve.useState(!1),ha=(0,fe.Z)(La,2),Ko=ha[0],Oo=ha[1];(0,oe.Z)(function(){Oo(!0)},[]);var Wi=(0,ae.Z)(!1,{defaultValue:En,value:An}),ta=(0,fe.Z)(Wi,2),Zo=ta[0],no=ta[1],ti=Ko?Zo:!1,Fi=!Rn&&wn;(Un||Fi&&ti&&Sn==="combobox")&&(ti=!1);var Ii=Fi?!1:ti,Ci=ve.useCallback(function(wo){var so=wo!==void 0?wo:!ti;Un||(no(so),ti!==so&&(kn==null||kn(so)))},[Un,ti,no,kn]),ro=ve.useMemo(function(){return(Mr||[]).some(function(wo){return[`
`,`\r
`].includes(wo)})},[Mr]),qi=function(so,ia,va){var oa=!0,za=so;Bn==null||Bn(null);var $a=va?null:Qe(so,Mr);return Sn!=="combobox"&&$a&&(za="",$r==null||$r($a),Ci(!1),oa=!1),fr&&to!==za&&fr(za,{source:ia?"typing":"effect"}),oa},Bo=function(so){!so||!so.trim()||fr(so,{source:"submit"})};ve.useEffect(function(){!ti&&!Nr&&Sn!=="combobox"&&qi("",!1,!1)},[ti]),ve.useEffect(function(){Zo&&Un&&no(!1),Un&&io(!1)},[Un]);var na=Se(),ra=(0,fe.Z)(na,2),fa=ra[0],xo=ra[1],go=function(so){var ia=fa(),va=so.which;if(va===ye.Z.ENTER&&(Sn!=="combobox"&&so.preventDefault(),ti||Ci(!0)),xo(!!to),va===ye.Z.BACKSPACE&&!ia&&Nr&&!to&&Vt.length){for(var oa=(0,xe.Z)(Vt),za=null,$a=oa.length-1;$a>=0;$a-=1){var hs=oa[$a];if(!hs.disabled){oa.splice($a,1),za=hs;break}}za&&In(oa,{type:"remove",values:[za]})}for(var Wa=arguments.length,Ms=new Array(Wa>1?Wa-1:0),ks=1;ks<Wa;ks++)Ms[ks-1]=arguments[ks];if(ti&&kr.current){var Na;(Na=kr.current).onKeyDown.apply(Na,[so].concat(Ms))}_i==null||_i.apply(void 0,[so].concat(Ms))},ca=function(so){for(var ia=arguments.length,va=new Array(ia>1?ia-1:0),oa=1;oa<ia;oa++)va[oa-1]=arguments[oa];if(ti&&kr.current){var za;(za=kr.current).onKeyUp.apply(za,[so].concat(va))}Bi==null||Bi.apply(void 0,[so].concat(va))},ua=function(so){var ia=Vt.filter(function(va){return va!==so});In(ia,{type:"remove",values:[so]})},ba=ve.useRef(!1),da=function(){io(!0),Un||(yi&&!ba.current&&yi.apply(void 0,arguments),ri.includes("focus")&&Ci(!0)),ba.current=!0},xl=function(){io(!1,function(){ba.current=!1,Ci(!1)}),!Un&&(to&&(Sn==="tags"?fr(to,{source:"submit"}):Sn==="multiple"&&fr("",{source:"blur"})),jr&&jr.apply(void 0,arguments))},Cs=[];ve.useEffect(function(){return function(){Cs.forEach(function(wo){return clearTimeout(wo)}),Cs.splice(0,Cs.length)}},[]);var ws=function(so){var ia,va=so.target,oa=(ia=Er.current)===null||ia===void 0?void 0:ia.getPopupElement();if(oa&&oa.contains(va)){var za=setTimeout(function(){var Ms=Cs.indexOf(za);if(Ms!==-1&&Cs.splice(Ms,1),ao(),!Co&&!oa.contains(document.activeElement)){var ks;(ks=Ar.current)===null||ks===void 0||ks.focus()}});Cs.push(za)}for(var $a=arguments.length,hs=new Array($a>1?$a-1:0),Wa=1;Wa<$a;Wa++)hs[Wa-1]=arguments[Wa];oo==null||oo.apply(void 0,[so].concat(hs))},Ja=ve.useState({}),Sl=(0,fe.Z)(Ja,2),Es=Sl[1];function Pa(){Es({})}var Da;Yo&&(Da=function(so){Ci(so)}),Ie(function(){var wo;return[_o.current,(wo=Er.current)===null||wo===void 0?void 0:wo.getPopupElement()]},Ii,Ci,!!Yo);var Xs=ve.useMemo(function(){return(0,Ce.Z)((0,Ce.Z)({},et),{},{notFoundContent:Rn,open:ti,triggerOpen:Ii,id:Bt,showSearch:bi,multiple:Nr,toggleOpen:Ci})},[et,Rn,Ii,ti,Bt,bi,Nr,Ci]),Zs=!!ei||zt,Ps;Zs&&(Ps=ve.createElement(ze,{className:pe()("".concat(Ct,"-arrow"),(0,Me.Z)({},"".concat(Ct,"-arrow-loading"),zt)),customizeIcon:ei,customizeIconProps:{loading:zt,searchValue:to,open:ti,focused:eo,showSearch:bi}}));var ul=function(){var so;Jn==null||Jn(),(so=Ar.current)===null||so===void 0||so.focus(),In([],{type:"clear",values:Vt}),qi("",!1,!1)},Ns=$e(Ct,ul,Vt,wr,Xr,Un,to,Sn),_a=Ns.allowClear,qa=Ns.clearIcon,Wo=ve.createElement(Zr,{ref:kr}),Js=pe()(Ct,Ht,(Ft={},(0,Me.Z)(Ft,"".concat(Ct,"-focused"),eo),(0,Me.Z)(Ft,"".concat(Ct,"-multiple"),Nr),(0,Me.Z)(Ft,"".concat(Ct,"-single"),!Nr),(0,Me.Z)(Ft,"".concat(Ct,"-allow-clear"),wr),(0,Me.Z)(Ft,"".concat(Ct,"-show-arrow"),Zs),(0,Me.Z)(Ft,"".concat(Ct,"-disabled"),Un),(0,Me.Z)(Ft,"".concat(Ct,"-loading"),zt),(0,Me.Z)(Ft,"".concat(Ct,"-open"),ti),(0,Me.Z)(Ft,"".concat(Ct,"-customize-input"),Mo),(0,Me.Z)(Ft,"".concat(Ct,"-show-search"),bi),Ft)),Cl=ve.createElement(_e,{ref:Er,disabled:Un,prefixCls:Ct,visible:Ii,popupElement:Wo,animation:Lr,transitionName:Or,dropdownStyle:Wr,dropdownClassName:Pr,direction:cn,dropdownMatchSelectWidth:di,dropdownRender:Ri,dropdownAlign:Vr,placement:er,builtinPlacements:Zn,getPopupContainer:Dr,empty:wn,getTriggerDOMNode:function(){return vo.current},onPopupVisibleChange:Da,onPopupMouseEnter:Pa},Yo?ve.cloneElement(Yo,{ref:Ho}):ve.createElement(Ln,(0,ne.Z)({},et,{domRef:vo,prefixCls:Ct,inputElement:Mo,ref:Ar,id:Bt,showSearch:bi,autoClearSearchValue:cr,mode:Sn,activeDescendantId:Kn,tagRender:on,values:Vt,open:ti,onToggleOpen:Ci,activeValue:Mn,searchValue:to,onSearch:qi,onSearchSubmit:Bo,onRemove:ua,tokenWithEnter:ro}))),qs;return Yo?qs=Cl:qs=ve.createElement("div",(0,ne.Z)({className:Js},hi,{ref:_o,onMouseDown:ws,onKeyDown:go,onKeyUp:ca,onFocus:da,onBlur:xl}),eo&&!ti&&ve.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Vt.map(function(wo){var so=wo.label,ia=wo.value;return["number","string"].includes((0,ce.Z)(so))?so:ia}).join(", "))),Cl,Ps,_a&&qa),ve.createElement(Le.Provider,{value:Xs},qs)}),Nt=mt,rn=function(et,rt){var Dt=ve.useRef({values:new Map,options:new Map}),Ft=ve.useMemo(function(){var Ct=Dt.current,Ht=Ct.values,Ut=Ct.options,on=et.map(function(Vt){if(Vt.label===void 0){var In;return(0,Ce.Z)((0,Ce.Z)({},Vt),{},{label:(In=Ht.get(Vt.value))===null||In===void 0?void 0:In.label})}return Vt}),cn=new Map,Rt=new Map;return on.forEach(function(Vt){cn.set(Vt.value,Vt),Rt.set(Vt.value,rt.get(Vt.value)||Ut.get(Vt.value))}),Dt.current.values=cn,Dt.current.options=Rt,on},[et,rt]),Bt=ve.useCallback(function(Ct){return rt.get(Ct)||Dt.current.options.get(Ct)},[rt]);return[Ft,Bt]};function It(et,rt){return Tt(et).join("").toUpperCase().includes(rt)}var Qt=function(et,rt,Dt,Ft,Bt){return ve.useMemo(function(){if(!Dt||Ft===!1)return et;var Ct=rt.options,Ht=rt.label,Ut=rt.value,on=[],cn=typeof Ft=="function",Rt=Dt.toUpperCase(),Vt=cn?Ft:function(wn,Nn){return Bt?It(Nn[Bt],Rt):Nn[Ct]?It(Nn[Ht!=="children"?Ht:"label"],Rt):It(Nn[Ut],Rt)},In=cn?function(wn){return Pt(wn)}:function(wn){return wn};return et.forEach(function(wn){if(wn[Ct]){var Nn=Vt(Dt,In(wn));if(Nn)on.push(wn);else{var Rn=wn[Ct].filter(function(Jn){return Vt(Dt,In(Jn))});Rn.length&&on.push((0,Ce.Z)((0,Ce.Z)({},wn),{},(0,Me.Z)({},Ct,Rn)))}return}Vt(Dt,In(wn))&&on.push(wn)}),on},[et,Ft,Bt,Dt,rt])},dn=ee(17115),At=ee(11592),Lt=["children","value"],qt=["children"];function Tn(et){var rt=et,Dt=rt.key,Ft=rt.props,Bt=Ft.children,Ct=Ft.value,Ht=(0,he.Z)(Ft,Lt);return(0,Ce.Z)({key:Dt,value:Ct!==void 0?Ct:Dt,children:Bt},Ht)}function Jt(et){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,At.Z)(et).map(function(Dt,Ft){if(!ve.isValidElement(Dt)||!Dt.type)return null;var Bt=Dt,Ct=Bt.type.isSelectOptGroup,Ht=Bt.key,Ut=Bt.props,on=Ut.children,cn=(0,he.Z)(Ut,qt);return rt||!Ct?Tn(Dt):(0,Ce.Z)((0,Ce.Z)({key:"__RC_SELECT_GRP__".concat(Ht===null?Ft:Ht,"__"),label:Ht},cn),{},{options:Jt(on)})}).filter(function(Dt){return Dt})}function On(et,rt,Dt,Ft,Bt){return ve.useMemo(function(){var Ct=et,Ht=!et;Ht&&(Ct=Jt(rt));var Ut=new Map,on=new Map,cn=function(In,wn,Nn){Nn&&typeof Nn=="string"&&In.set(wn[Nn],wn)};function Rt(Vt){for(var In=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,wn=0;wn<Vt.length;wn+=1){var Nn=Vt[wn];!Nn[Dt.options]||In?(Ut.set(Nn[Dt.value],Nn),cn(on,Nn,Dt.label),cn(on,Nn,Ft),cn(on,Nn,Bt)):Rt(Nn[Dt.options],!0)}}return Rt(Ct),{options:Ct,valueOptions:Ut,labelOptions:on}},[et,rt,Dt,Ft,Bt])}function zn(et){var rt=ve.useRef();rt.current=et;var Dt=ve.useCallback(function(){return rt.current.apply(rt,arguments)},[]);return Dt}var qn=function(){return null};qn.isSelectOptGroup=!0;var Xn=qn,vr=function(){return null};vr.isSelectOption=!0;var _r=vr,Qn=ee(80547),Cr=ee(2738),ni=ee(48911),Jr=ve.createContext(null),Yn=Jr;function mr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var si=["disabled","title","children","style","className"];function or(et){return typeof et=="string"||typeof et=="number"}var ii=function(rt,Dt){var Ft=Ne(),Bt=Ft.prefixCls,Ct=Ft.id,Ht=Ft.open,Ut=Ft.multiple,on=Ft.mode,cn=Ft.searchValue,Rt=Ft.toggleOpen,Vt=Ft.notFoundContent,In=Ft.onPopupScroll,wn=ve.useContext(Yn),Nn=wn.flattenOptions,Rn=wn.onActiveValue,Jn=wn.defaultActiveFirstOption,Sn=wn.onSelect,Un=wn.menuItemSelectedIcon,zt=wn.rawValues,fn=wn.fieldNames,vn=wn.virtual,An=wn.direction,En=wn.listHeight,kn=wn.listItemHeight,Mn="".concat(Bt,"-item"),Bn=(0,Qn.Z)(function(){return Nn},[Ht,Nn],function(Vr,er){return er[0]&&Vr[1]!==er[1]}),Kn=ve.useRef(null),Vn=function(er){er.preventDefault()},cr=function(er){Kn.current&&Kn.current.scrollTo(typeof er=="number"?{index:er}:er)},fr=function(er){for(var Zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Dr=Bn.length,Sr=0;Sr<Dr;Sr+=1){var ri=(er+Sr*Zn+Dr)%Dr,yi=Bn[ri],jr=yi.group,Bi=yi.data;if(!jr&&!Bi.disabled)return ri}return-1},$r=ve.useState(function(){return fr(0)}),Mr=(0,fe.Z)($r,2),wr=Mr[0],ei=Mr[1],Xr=function(er){var Zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;ei(er);var Dr={source:Zn?"keyboard":"mouse"},Sr=Bn[er];if(!Sr){Rn(null,-1,Dr);return}Rn(Sr.value,er,Dr)};(0,ve.useEffect)(function(){Xr(Jn!==!1?fr(0):-1)},[Bn.length,cn]);var Zr=ve.useCallback(function(Vr){return zt.has(Vr)&&on!=="combobox"},[on,(0,xe.Z)(zt).toString(),zt.size]);(0,ve.useEffect)(function(){var Vr=setTimeout(function(){if(!Ut&&Ht&&zt.size===1){var Zn=Array.from(zt)[0],Dr=Bn.findIndex(function(Sr){var ri=Sr.data;return ri.value===Zn});Dr!==-1&&(Xr(Dr),cr(Dr))}});if(Ht){var er;(er=Kn.current)===null||er===void 0||er.scrollTo(void 0)}return function(){return clearTimeout(Vr)}},[Ht,cn,Nn.length]);var Lr=function(er){er!==void 0&&Sn(er,{selected:!zt.has(er)}),Ut||Rt(!1)};if(ve.useImperativeHandle(Dt,function(){return{onKeyDown:function(er){var Zn=er.which,Dr=er.ctrlKey;switch(Zn){case ye.Z.N:case ye.Z.P:case ye.Z.UP:case ye.Z.DOWN:{var Sr=0;if(Zn===ye.Z.UP?Sr=-1:Zn===ye.Z.DOWN?Sr=1:mr()&&Dr&&(Zn===ye.Z.N?Sr=1:Zn===ye.Z.P&&(Sr=-1)),Sr!==0){var ri=fr(wr+Sr,Sr);cr(ri),Xr(ri,!0)}break}case ye.Z.ENTER:{var yi=Bn[wr];yi&&!yi.data.disabled?Lr(yi.value):Lr(void 0),Ht&&er.preventDefault();break}case ye.Z.ESC:Rt(!1),Ht&&er.stopPropagation()}},onKeyUp:function(){},scrollTo:function(er){cr(er)}}}),Bn.length===0)return ve.createElement("div",{role:"listbox",id:"".concat(Ct,"_list"),className:"".concat(Mn,"-empty"),onMouseDown:Vn},Vt);var Or=Object.keys(fn).map(function(Vr){return fn[Vr]}),Wr=function(er){return er.label};function Pr(Vr,er){var Zn=Vr.group;return{role:Zn?"presentation":"option",id:"".concat(Ct,"_list_").concat(er)}}var di=function(er){var Zn=Bn[er];if(!Zn)return null;var Dr=Zn.data||{},Sr=Dr.value,ri=Zn.group,yi=(0,Ae.Z)(Dr,!0),jr=Wr(Zn);return Zn?ve.createElement("div",(0,ne.Z)({"aria-label":typeof jr=="string"&&!ri?jr:null},yi,{key:er},Pr(Zn,er),{"aria-selected":Zr(Sr)}),Sr):null},Ri={role:"listbox",id:"".concat(Ct,"_list")};return ve.createElement(ve.Fragment,null,vn&&ve.createElement("div",(0,ne.Z)({},Ri,{style:{height:0,width:0,overflow:"hidden"}}),di(wr-1),di(wr),di(wr+1)),ve.createElement(ni.Z,{itemKey:"key",ref:Kn,data:Bn,height:En,itemHeight:kn,fullHeight:!1,onMouseDown:Vn,onScroll:In,virtual:vn,direction:An,innerProps:vn?null:Ri},function(Vr,er){var Zn,Dr=Vr.group,Sr=Vr.groupOption,ri=Vr.data,yi=Vr.label,jr=Vr.value,Bi=ri.key;if(Dr){var _i,oo=(_i=ri.title)!==null&&_i!==void 0?_i:or(yi)?yi.toString():void 0;return ve.createElement("div",{className:pe()(Mn,"".concat(Mn,"-group")),title:oo},yi!==void 0?yi:Bi)}var Fr=ri.disabled,Nr=ri.title,bi=ri.children,hi=ri.style,Xi=ri.className,mo=(0,he.Z)(ri,si),Co=(0,Cr.Z)(mo,Or),ji=Zr(jr),_o="".concat(Mn,"-option"),vo=pe()(Mn,_o,Xi,(Zn={},(0,Me.Z)(Zn,"".concat(_o,"-grouped"),Sr),(0,Me.Z)(Zn,"".concat(_o,"-active"),wr===er&&!Fr),(0,Me.Z)(Zn,"".concat(_o,"-disabled"),Fr),(0,Me.Z)(Zn,"".concat(_o,"-selected"),ji),Zn)),Er=Wr(Vr),Ar=!Un||typeof Un=="function"||ji,kr=typeof Er=="number"?Er:Er||jr,Kr=or(kr)?kr.toString():void 0;return Nr!==void 0&&(Kr=Nr),ve.createElement("div",(0,ne.Z)({},(0,Ae.Z)(Co),vn?{}:Pr(Vr,er),{"aria-selected":ji,className:vo,title:Kr,onMouseMove:function(){wr===er||Fr||Xr(er)},onClick:function(){Fr||Lr(jr)},style:hi}),ve.createElement("div",{className:"".concat(_o,"-content")},kr),ve.isValidElement(Un)||ji,Ar&&ve.createElement(ze,{className:"".concat(Mn,"-option-state"),customizeIcon:Un,customizeIconProps:{isSelected:ji}},ji?"\u2713":null))}))},ki=ve.forwardRef(ii);ki.displayName="OptionList";var gi=ki;function Li(et){var rt=et.mode,Dt=et.options,Ft=et.children,Bt=et.backfill,Ct=et.allowClear,Ht=et.placeholder,Ut=et.getInputElement,on=et.showSearch,cn=et.onSearch,Rt=et.defaultOpen,Vt=et.autoFocus,In=et.labelInValue,wn=et.value,Nn=et.inputValue,Rn=et.optionLabelProp,Jn=isMultiple(rt),Sn=on!==void 0?on:Jn||rt==="combobox",Un=Dt||convertChildrenToData(Ft);if(warning(rt!=="tags"||Un.every(function(An){return!An.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),rt==="tags"||rt==="combobox"){var zt=Un.some(function(An){return An.options?An.options.some(function(En){return typeof("value"in En?En.value:En.key)=="number"}):typeof("value"in An?An.value:An.key)=="number"});warning(!zt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(rt!=="combobox"||!Rn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(rt==="combobox"||!Bt,"`backfill` only works with `combobox` mode."),warning(rt==="combobox"||!Ut,"`getInputElement` only work with `combobox` mode."),noteOnce(rt!=="combobox"||!Ut||!Ct||!Ht,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),cn&&!Sn&&rt!=="combobox"&&rt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Rt||Vt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),wn!=null){var fn=toArray(wn);warning(!In||fn.every(function(An){return _typeof(An)==="object"&&("key"in An||"value"in An)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Jn||Array.isArray(wn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Ft){var vn=null;toNodeArray(Ft).some(function(An){if(!React.isValidElement(An)||!An.type)return!1;var En=An,kn=En.type;if(kn.isSelectOption)return!1;if(kn.isSelectOptGroup){var Mn=toNodeArray(An.props.children).every(function(Bn){return!React.isValidElement(Bn)||!An.type||Bn.type.isSelectOption?!0:(vn=Bn.type,!1)});return!Mn}return vn=kn,!0}),vn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(vn.displayName||vn.name||vn,"`.")),warning(Nn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function ui(et,rt){if(et){var Dt=function Ft(Bt){for(var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht=0;Ht<Bt.length;Ht++){var Ut=Bt[Ht];if(Ut[rt==null?void 0:rt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Ct&&Array.isArray(Ut[rt==null?void 0:rt.options])&&Ft(Ut[rt==null?void 0:rt.options],!0))break}};Dt(et)}}var dr=null,Hr=["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"],Cn=["inputValue"];function Ee(et){return!et||(0,ce.Z)(et)!=="object"}var je=ve.forwardRef(function(et,rt){var Dt=et.id,Ft=et.mode,Bt=et.prefixCls,Ct=Bt===void 0?"rc-select":Bt,Ht=et.backfill,Ut=et.fieldNames,on=et.inputValue,cn=et.searchValue,Rt=et.onSearch,Vt=et.autoClearSearchValue,In=Vt===void 0?!0:Vt,wn=et.onSelect,Nn=et.onDeselect,Rn=et.dropdownMatchSelectWidth,Jn=Rn===void 0?!0:Rn,Sn=et.filterOption,Un=et.filterSort,zt=et.optionFilterProp,fn=et.optionLabelProp,vn=et.options,An=et.children,En=et.defaultActiveFirstOption,kn=et.menuItemSelectedIcon,Mn=et.virtual,Bn=et.direction,Kn=et.listHeight,Vn=Kn===void 0?200:Kn,cr=et.listItemHeight,fr=cr===void 0?20:cr,$r=et.value,Mr=et.defaultValue,wr=et.labelInValue,ei=et.onChange,Xr=(0,he.Z)(et,Hr),Zr=(0,dn.ZP)(Dt),Lr=ot(Ft),Or=!!(!vn&&An),Wr=ve.useMemo(function(){return Sn===void 0&&Ft==="combobox"?!1:Sn},[Sn,Ft]),Pr=ve.useMemo(function(){return me(Ut,Or)},[JSON.stringify(Ut),Or]),di=(0,ae.Z)("",{value:cn!==void 0?cn:on,postState:function(Fi){return Fi||""}}),Ri=(0,fe.Z)(di,2),Vr=Ri[0],er=Ri[1],Zn=On(vn,An,Pr,zt,fn),Dr=Zn.valueOptions,Sr=Zn.labelOptions,ri=Zn.options,yi=ve.useCallback(function(ti){var Fi=Tt(ti);return Fi.map(function(Ii){var Ci,ro,qi,Bo,na;if(Ee(Ii))Ci=Ii;else{var ra;qi=Ii.key,ro=Ii.label,Ci=(ra=Ii.value)!==null&&ra!==void 0?ra:qi}var fa=Dr.get(Ci);if(fa){var xo;if(ro===void 0&&(ro=fa==null?void 0:fa[fn||Pr.label]),qi===void 0&&(qi=(xo=fa==null?void 0:fa.key)!==null&&xo!==void 0?xo:Ci),Bo=fa==null?void 0:fa.disabled,na=fa==null?void 0:fa.title,0)var go}return{label:ro,value:Ci,key:qi,disabled:Bo,title:na}})},[Pr,fn,Dr]),jr=(0,ae.Z)(Mr,{value:$r}),Bi=(0,fe.Z)(jr,2),_i=Bi[0],oo=Bi[1],Fr=ve.useMemo(function(){var ti,Fi=yi(_i);return Ft==="combobox"&&lt((ti=Fi[0])===null||ti===void 0?void 0:ti.value)?[]:Fi},[_i,yi,Ft]),Nr=rn(Fr,Dr),bi=(0,fe.Z)(Nr,2),hi=bi[0],Xi=bi[1],mo=ve.useMemo(function(){if(!Ft&&hi.length===1){var ti=hi[0];if(ti.value===null&&(ti.label===null||ti.label===void 0))return[]}return hi.map(function(Fi){var Ii;return(0,Ce.Z)((0,Ce.Z)({},Fi),{},{label:(Ii=Fi.label)!==null&&Ii!==void 0?Ii:Fi.value})})},[Ft,hi]),Co=ve.useMemo(function(){return new Set(hi.map(function(ti){return ti.value}))},[hi]);ve.useEffect(function(){if(Ft==="combobox"){var ti,Fi=(ti=hi[0])===null||ti===void 0?void 0:ti.value;er(We(Fi)?String(Fi):"")}},[hi]);var ji=zn(function(ti,Fi){var Ii,Ci=Fi!=null?Fi:ti;return Ii={},(0,Me.Z)(Ii,Pr.value,ti),(0,Me.Z)(Ii,Pr.label,Ci),Ii}),_o=ve.useMemo(function(){if(Ft!=="tags")return ri;var ti=(0,xe.Z)(ri),Fi=function(Ci){return Dr.has(Ci)};return(0,xe.Z)(hi).sort(function(Ii,Ci){return Ii.value<Ci.value?-1:1}).forEach(function(Ii){var Ci=Ii.value;Fi(Ci)||ti.push(ji(Ci,Ii.label))}),ti},[ji,ri,Dr,hi,Ft]),vo=Qt(_o,Pr,Vr,Wr,zt),Er=ve.useMemo(function(){return Ft!=="tags"||!Vr||vo.some(function(ti){return ti[zt||"value"]===Vr})||vo.some(function(ti){return ti[Pr.value]===Vr})?vo:[ji(Vr)].concat((0,xe.Z)(vo))},[ji,zt,Ft,vo,Vr,Pr]),Ar=ve.useMemo(function(){return Un?(0,xe.Z)(Er).sort(function(ti,Fi){return Un(ti,Fi)}):Er},[Er,Un]),kr=ve.useMemo(function(){return at(Ar,{fieldNames:Pr,childrenAsData:Or})},[Ar,Pr,Or]),Kr=function(Fi){var Ii=yi(Fi);if(oo(Ii),ei&&(Ii.length!==hi.length||Ii.some(function(qi,Bo){var na;return((na=hi[Bo])===null||na===void 0?void 0:na.value)!==(qi==null?void 0:qi.value)}))){var Ci=wr?Ii:Ii.map(function(qi){return qi.value}),ro=Ii.map(function(qi){return Pt(Xi(qi.value))});ei(Lr?Ci:Ci[0],Lr?ro:ro[0])}},Hi=ve.useState(null),eo=(0,fe.Z)(Hi,2),io=eo[0],ao=eo[1],to=ve.useState(0),Mo=(0,fe.Z)(to,2),Yo=Mo[0],Ho=Mo[1],La=En!==void 0?En:Ft!=="combobox",ha=ve.useCallback(function(ti,Fi){var Ii=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ci=Ii.source,ro=Ci===void 0?"keyboard":Ci;Ho(Fi),Ht&&Ft==="combobox"&&ti!==null&&ro==="keyboard"&&ao(String(ti))},[Ht,Ft]),Ko=function(Fi,Ii,Ci){var ro=function(){var ba,da=Xi(Fi);return[wr?{label:da==null?void 0:da[Pr.label],value:Fi,key:(ba=da==null?void 0:da.key)!==null&&ba!==void 0?ba:Fi}:Fi,Pt(da)]};if(Ii&&wn){var qi=ro(),Bo=(0,fe.Z)(qi,2),na=Bo[0],ra=Bo[1];wn(na,ra)}else if(!Ii&&Nn&&Ci!=="clear"){var fa=ro(),xo=(0,fe.Z)(fa,2),go=xo[0],ca=xo[1];Nn(go,ca)}},Oo=zn(function(ti,Fi){var Ii,Ci=Lr?Fi.selected:!0;Ci?Ii=Lr?[].concat((0,xe.Z)(hi),[ti]):[ti]:Ii=hi.filter(function(ro){return ro.value!==ti}),Kr(Ii),Ko(ti,Ci),Ft==="combobox"?ao(""):(!ot||In)&&(er(""),ao(""))}),Wi=function(Fi,Ii){Kr(Fi);var Ci=Ii.type,ro=Ii.values;(Ci==="remove"||Ci==="clear")&&ro.forEach(function(qi){Ko(qi.value,!1,Ci)})},ta=function(Fi,Ii){if(er(Fi),ao(null),Ii.source==="submit"){var Ci=(Fi||"").trim();if(Ci){var ro=Array.from(new Set([].concat((0,xe.Z)(Co),[Ci])));Kr(ro),Ko(Ci,!0),er("")}return}Ii.source!=="blur"&&(Ft==="combobox"&&Kr(Fi),Rt==null||Rt(Fi))},Zo=function(Fi){var Ii=Fi;Ft!=="tags"&&(Ii=Fi.map(function(ro){var qi=Sr.get(ro);return qi==null?void 0:qi.value}).filter(function(ro){return ro!==void 0}));var Ci=Array.from(new Set([].concat((0,xe.Z)(Co),(0,xe.Z)(Ii))));Kr(Ci),Ci.forEach(function(ro){Ko(ro,!0)})},no=ve.useMemo(function(){var ti=Mn!==!1&&Jn!==!1;return(0,Ce.Z)((0,Ce.Z)({},Zn),{},{flattenOptions:kr,onActiveValue:ha,defaultActiveFirstOption:La,onSelect:Oo,menuItemSelectedIcon:kn,rawValues:Co,fieldNames:Pr,virtual:ti,direction:Bn,listHeight:Vn,listItemHeight:fr,childrenAsData:Or})},[Zn,kr,ha,La,Oo,kn,Co,Pr,Mn,Jn,Vn,fr,Or]);return ve.createElement(Yn.Provider,{value:no},ve.createElement(Nt,(0,ne.Z)({},Xr,{id:Zr,prefixCls:Ct,ref:rt,omitDomProps:Cn,mode:Ft,displayValues:mo,onDisplayValuesChange:Wi,direction:Bn,searchValue:Vr,onSearch:ta,autoClearSearchValue:In,onSearchSplit:Zo,dropdownMatchSelectWidth:Jn,OptionList:gi,emptyOptions:!kr.length,activeValue:io,activeDescendantId:"".concat(Zr,"_list_").concat(Yo)})))}),Oe=je;Oe.Option=_r,Oe.OptGroup=Xn;var De=Oe,Ke=De},9296:function(gn,kt,ee){"use strict";ee.r(kt),ee.d(kt,{ResizableTextArea:function(){return gt},default:function(){return lt}});var ne=ee(60499),xe=ee(85899),Me=ee(18642),Ce=ee(43749),fe=ee(72190),he=ee(42244),ce=ee(77654),ae=ee(92310),se=ee.n(ae),ve=ee(93681),ue=ee(5643),pe=ee(18929),oe=ee(59301),ge=ee(29301),ye=ee(34280),we=ee(16089),Be=`
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;
`,ze=["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"],$e={},Le;function Ne(ut){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=ut.getAttribute("id")||ut.getAttribute("data-reactid")||ut.getAttribute("name");if(St&&$e[qe])return $e[qe];var Ze=window.getComputedStyle(ut),wt=Ze.getPropertyValue("box-sizing")||Ze.getPropertyValue("-moz-box-sizing")||Ze.getPropertyValue("-webkit-box-sizing"),Wt=parseFloat(Ze.getPropertyValue("padding-bottom"))+parseFloat(Ze.getPropertyValue("padding-top")),Kt=parseFloat(Ze.getPropertyValue("border-bottom-width"))+parseFloat(Ze.getPropertyValue("border-top-width")),_t=ze.map(function(jt){return"".concat(jt,":").concat(Ze.getPropertyValue(jt))}).join(";"),vt={sizingStyle:_t,paddingSize:Wt,borderSize:Kt,boxSizing:wt};return St&&qe&&($e[qe]=vt),vt}function Re(ut){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ze=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Le||(Le=document.createElement("textarea"),Le.setAttribute("tab-index","-1"),Le.setAttribute("aria-hidden","true"),document.body.appendChild(Le)),ut.getAttribute("wrap")?Le.setAttribute("wrap",ut.getAttribute("wrap")):Le.removeAttribute("wrap");var wt=Ne(ut,St),Wt=wt.paddingSize,Kt=wt.borderSize,_t=wt.boxSizing,vt=wt.sizingStyle;Le.setAttribute("style","".concat(vt,";").concat(Be)),Le.value=ut.value||ut.placeholder||"";var jt=void 0,yn=void 0,Xt,Ln=Le.scrollHeight;if(_t==="border-box"?Ln+=Kt:_t==="content-box"&&(Ln-=Wt),qe!==null||Ze!==null){Le.value=" ";var pn=Le.scrollHeight-Wt;qe!==null&&(jt=pn*qe,_t==="border-box"&&(jt=jt+Wt+Kt),Ln=Math.max(jt,Ln)),Ze!==null&&(yn=pn*Ze,_t==="border-box"&&(yn=yn+Wt+Kt),Xt=Ln>yn?"":"hidden",Ln=Math.min(yn,Ln))}var hn={height:Ln,overflowY:Xt,resize:"none"};return jt&&(hn.minHeight=jt),yn&&(hn.maxHeight=yn),hn}var Se=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ie=0,Ae=1,it=2,Ue=oe.forwardRef(function(ut,St){var qe=ut,Ze=qe.prefixCls,wt=qe.onPressEnter,Wt=qe.defaultValue,Kt=qe.value,_t=qe.autoSize,vt=qe.onResize,jt=qe.className,yn=qe.style,Xt=qe.disabled,Ln=qe.onChange,pn=qe.onInternalAutoSize,hn=(0,he.Z)(qe,Se),un=(0,pe.Z)(Wt,{value:Kt,postState:function(Xn){return Xn!=null?Xn:""}}),Xe=(0,fe.Z)(un,2),ke=Xe[0],_e=Xe[1],Te=function(Xn){_e(Xn.target.value),Ln==null||Ln(Xn)},Fe=oe.useRef();oe.useImperativeHandle(St,function(){return{textArea:Fe.current}});var me=oe.useMemo(function(){return _t&&(0,Ce.Z)(_t)==="object"?[_t.minRows,_t.maxRows]:[]},[_t]),at=(0,fe.Z)(me,2),Pt=at[0],Qe=at[1],Je=!!_t,xt=function(){try{if(document.activeElement===Fe.current){var Xn=Fe.current,vr=Xn.selectionStart,_r=Xn.selectionEnd,Qn=Xn.scrollTop;Fe.current.setSelectionRange(vr,_r),Fe.current.scrollTop=Qn}}catch(Cr){}},ot=oe.useState(it),mt=(0,fe.Z)(ot,2),Nt=mt[0],rn=mt[1],It=oe.useState(),Qt=(0,fe.Z)(It,2),dn=Qt[0],At=Qt[1],Lt=function(){rn(Ie)};(0,ye.Z)(function(){Je&&Lt()},[Kt,Pt,Qe,Je]),(0,ye.Z)(function(){if(Nt===Ie)rn(Ae);else if(Nt===Ae){var qn=Re(Fe.current,!1,Pt,Qe);rn(it),At(qn)}else xt()},[Nt]);var qt=oe.useRef(),Tn=function(){we.Z.cancel(qt.current)},Jt=function(Xn){Nt===it&&(vt==null||vt(Xn),_t&&(Tn(),qt.current=(0,we.Z)(function(){Lt()})))};oe.useEffect(function(){return Tn},[]);var On=Je?dn:null,zn=(0,xe.Z)((0,xe.Z)({},yn),On);return(Nt===Ie||Nt===Ae)&&(zn.overflowY="hidden",zn.overflowX="hidden"),oe.createElement(ge.Z,{onResize:Jt,disabled:!(_t||vt)},oe.createElement("textarea",(0,ne.Z)({},hn,{ref:Fe,style:zn,className:se()(Ze,jt,(0,Me.Z)({},"".concat(Ze,"-disabled"),Xt)),disabled:Xt,value:ke,onChange:Te})))}),gt=Ue,Ve=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Tt(ut,St){return(0,ce.Z)(ut||"").slice(0,St).join("")}function ct(ut,St,qe,Ze){var wt=qe;return ut?wt=Tt(qe,Ze):(0,ce.Z)(St||"").length<qe.length&&(0,ce.Z)(qe||"").length>Ze&&(wt=St),wt}var Ot=oe.forwardRef(function(ut,St){var qe,Ze=ut.defaultValue,wt=ut.value,Wt=ut.onFocus,Kt=ut.onBlur,_t=ut.onChange,vt=ut.allowClear,jt=ut.maxLength,yn=ut.onCompositionStart,Xt=ut.onCompositionEnd,Ln=ut.suffix,pn=ut.prefixCls,hn=pn===void 0?"rc-textarea":pn,un=ut.classes,Xe=ut.showCount,ke=ut.className,_e=ut.style,Te=ut.disabled,Fe=ut.hidden,me=ut.classNames,at=ut.styles,Pt=ut.onResize,Qe=(0,he.Z)(ut,Ve),Je=(0,pe.Z)(Ze,{value:wt,defaultValue:Ze}),xt=(0,fe.Z)(Je,2),ot=xt[0],mt=xt[1],Nt=(0,oe.useRef)(null),rn=oe.useState(!1),It=(0,fe.Z)(rn,2),Qt=It[0],dn=It[1],At=oe.useState(!1),Lt=(0,fe.Z)(At,2),qt=Lt[0],Tn=Lt[1],Jt=oe.useRef(),On=oe.useRef(0),zn=oe.useState(null),qn=(0,fe.Z)(zn,2),Xn=qn[0],vr=qn[1],_r=function(){var Ee;(Ee=Nt.current)===null||Ee===void 0||Ee.textArea.focus()};(0,oe.useImperativeHandle)(St,function(){return{resizableTextArea:Nt.current,focus:_r,blur:function(){var Ee;(Ee=Nt.current)===null||Ee===void 0||Ee.textArea.blur()}}}),(0,oe.useEffect)(function(){dn(function(Cn){return!Te&&Cn})},[Te]);var Qn=Number(jt)>0,Cr=function(Ee){Tn(!0),Jt.current=ot,On.current=Ee.currentTarget.selectionStart,yn==null||yn(Ee)},ni=function(Ee){Tn(!1);var je=Ee.currentTarget.value;if(Qn){var Oe,De=On.current>=jt+1||On.current===((Oe=Jt.current)===null||Oe===void 0?void 0:Oe.length);je=ct(De,Jt.current,je,jt)}je!==ot&&(mt(je),(0,ue.rJ)(Ee.currentTarget,Ee,_t,je)),Xt==null||Xt(Ee)},Jr=function(Ee){var je=Ee.target.value;if(!qt&&Qn){var Oe=Ee.target.selectionStart>=jt+1||Ee.target.selectionStart===je.length||!Ee.target.selectionStart;je=ct(Oe,ot,je,jt)}mt(je),(0,ue.rJ)(Ee.currentTarget,Ee,_t,je)},Yn=function(Ee){var je=Qe.onPressEnter,Oe=Qe.onKeyDown;Ee.key==="Enter"&&je&&je(Ee),Oe==null||Oe(Ee)},mr=function(Ee){dn(!0),Wt==null||Wt(Ee)},si=function(Ee){dn(!1),Kt==null||Kt(Ee)},or=function(Ee){var je;mt(""),_r(),(0,ue.rJ)((je=Nt.current)===null||je===void 0?void 0:je.textArea,Ee,_t)},ii=(0,ue.D7)(ot);!qt&&Qn&&wt==null&&(ii=Tt(ii,jt));var ki=Ln,gi;if(Xe){var Li=(0,ce.Z)(ii).length;(0,Ce.Z)(Xe)==="object"?gi=Xe.formatter({value:ii,count:Li,maxLength:jt}):gi="".concat(Li).concat(Qn?" / ".concat(jt):""),ki=oe.createElement(oe.Fragment,null,ki,oe.createElement("span",{className:se()("".concat(hn,"-data-count"),me==null?void 0:me.count),style:at==null?void 0:at.count},gi))}var ui=function(Ee){var je;Pt==null||Pt(Ee),(je=Nt.current)!==null&&je!==void 0&&je.textArea.style.height&&vr(!0)},dr=!Qe.autoSize&&!Xe&&!vt,Hr=oe.createElement(ve.BaseInput,{value:ii,allowClear:vt,handleReset:or,suffix:ki,prefixCls:hn,classes:{affixWrapper:se()(un==null?void 0:un.affixWrapper,(qe={},(0,Me.Z)(qe,"".concat(hn,"-show-count"),Xe),(0,Me.Z)(qe,"".concat(hn,"-textarea-allow-clear"),vt),qe))},disabled:Te,focused:Qt,className:ke,style:(0,xe.Z)((0,xe.Z)({},_e),Xn&&!dr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof gi=="string"?gi:void 0}},hidden:Fe,inputElement:oe.createElement(gt,(0,ne.Z)({},Qe,{onKeyDown:Yn,onChange:Jr,onFocus:mr,onBlur:si,onCompositionStart:Cr,onCompositionEnd:ni,className:me==null?void 0:me.textarea,style:(0,xe.Z)((0,xe.Z)({},at==null?void 0:at.textarea),{},{resize:_e==null?void 0:_e.resize}),disabled:Te,prefixCls:hn,onResize:ui,ref:Nt}))});return Hr}),We=Ot,lt=We},39417:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return Ae}});var ne=ee(60499),xe=ee(18642),Me=ee(42244),Ce=ee(85899),fe=ee(38705),he=ee(17212),ce=ee(15793),ae=ee(39153),se=ee(55401),ve=ee(92310),ue=ee.n(ve),pe=ee(26112),oe=ee(59301),ge=ee(39378),ye=function(Ue){for(var gt=Ue.prefixCls,Ve=Ue.level,Tt=Ue.isStart,ct=Ue.isEnd,Ot="".concat(gt,"-indent-unit"),We=[],lt=0;lt<Ve;lt+=1){var ut;We.push(oe.createElement("span",{key:lt,className:ue()(Ot,(ut={},(0,xe.Z)(ut,"".concat(Ot,"-start"),Tt[lt]),(0,xe.Z)(ut,"".concat(Ot,"-end"),ct[lt]),ut))}))}return oe.createElement("span",{"aria-hidden":"true",className:"".concat(gt,"-indent")},We)},we=oe.memo(ye),Be=ee(67841),ze=ee(71430),$e=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Le="open",Ne="close",Re="---",Se=function(it){(0,ae.Z)(gt,it);var Ue=(0,se.Z)(gt);function gt(){var Ve;(0,fe.Z)(this,gt);for(var Tt=arguments.length,ct=new Array(Tt),Ot=0;Ot<Tt;Ot++)ct[Ot]=arguments[Ot];return Ve=Ue.call.apply(Ue,[this].concat(ct)),Ve.state={dragNodeHighlight:!1},Ve.selectHandle=void 0,Ve.cacheIndent=void 0,Ve.onSelectorClick=function(We){var lt=Ve.props.context.onNodeClick;lt(We,(0,ze.F)(Ve.props)),Ve.isSelectable()?Ve.onSelect(We):Ve.onCheck(We)},Ve.onSelectorDoubleClick=function(We){var lt=Ve.props.context.onNodeDoubleClick;lt(We,(0,ze.F)(Ve.props))},Ve.onSelect=function(We){if(!Ve.isDisabled()){var lt=Ve.props.context.onNodeSelect;lt(We,(0,ze.F)(Ve.props))}},Ve.onCheck=function(We){if(!Ve.isDisabled()){var lt=Ve.props,ut=lt.disableCheckbox,St=lt.checked,qe=Ve.props.context.onNodeCheck;if(!(!Ve.isCheckable()||ut)){var Ze=!St;qe(We,(0,ze.F)(Ve.props),Ze)}}},Ve.onMouseEnter=function(We){var lt=Ve.props.context.onNodeMouseEnter;lt(We,(0,ze.F)(Ve.props))},Ve.onMouseLeave=function(We){var lt=Ve.props.context.onNodeMouseLeave;lt(We,(0,ze.F)(Ve.props))},Ve.onContextMenu=function(We){var lt=Ve.props.context.onNodeContextMenu;lt(We,(0,ze.F)(Ve.props))},Ve.onDragStart=function(We){var lt=Ve.props.context.onNodeDragStart;We.stopPropagation(),Ve.setState({dragNodeHighlight:!0}),lt(We,(0,ce.Z)(Ve));try{We.dataTransfer.setData("text/plain","")}catch(ut){}},Ve.onDragEnter=function(We){var lt=Ve.props.context.onNodeDragEnter;We.preventDefault(),We.stopPropagation(),lt(We,(0,ce.Z)(Ve))},Ve.onDragOver=function(We){var lt=Ve.props.context.onNodeDragOver;We.preventDefault(),We.stopPropagation(),lt(We,(0,ce.Z)(Ve))},Ve.onDragLeave=function(We){var lt=Ve.props.context.onNodeDragLeave;We.stopPropagation(),lt(We,(0,ce.Z)(Ve))},Ve.onDragEnd=function(We){var lt=Ve.props.context.onNodeDragEnd;We.stopPropagation(),Ve.setState({dragNodeHighlight:!1}),lt(We,(0,ce.Z)(Ve))},Ve.onDrop=function(We){var lt=Ve.props.context.onNodeDrop;We.preventDefault(),We.stopPropagation(),Ve.setState({dragNodeHighlight:!1}),lt(We,(0,ce.Z)(Ve))},Ve.onExpand=function(We){var lt=Ve.props,ut=lt.loading,St=lt.context.onNodeExpand;ut||St(We,(0,ze.F)(Ve.props))},Ve.setSelectHandle=function(We){Ve.selectHandle=We},Ve.getNodeState=function(){var We=Ve.props.expanded;return Ve.isLeaf()?null:We?Le:Ne},Ve.hasChildren=function(){var We=Ve.props.eventKey,lt=Ve.props.context.keyEntities,ut=(0,Be.Z)(lt,We)||{},St=ut.children;return!!(St||[]).length},Ve.isLeaf=function(){var We=Ve.props,lt=We.isLeaf,ut=We.loaded,St=Ve.props.context.loadData,qe=Ve.hasChildren();return lt===!1?!1:lt||!St&&!qe||St&&ut&&!qe},Ve.isDisabled=function(){var We=Ve.props.disabled,lt=Ve.props.context.disabled;return!!(lt||We)},Ve.isCheckable=function(){var We=Ve.props.checkable,lt=Ve.props.context.checkable;return!lt||We===!1?!1:lt},Ve.syncLoadData=function(We){var lt=We.expanded,ut=We.loading,St=We.loaded,qe=Ve.props.context,Ze=qe.loadData,wt=qe.onNodeLoad;ut||Ze&&lt&&!Ve.isLeaf()&&!Ve.hasChildren()&&!St&&wt((0,ze.F)(Ve.props))},Ve.isDraggable=function(){var We=Ve.props,lt=We.data,ut=We.context.draggable;return!!(ut&&(!ut.nodeDraggable||ut.nodeDraggable(lt)))},Ve.renderDragHandler=function(){var We=Ve.props.context,lt=We.draggable,ut=We.prefixCls;return lt!=null&&lt.icon?oe.createElement("span",{className:"".concat(ut,"-draggable-icon")},lt.icon):null},Ve.renderSwitcherIconDom=function(We){var lt=Ve.props.switcherIcon,ut=Ve.props.context.switcherIcon,St=lt||ut;return typeof St=="function"?St((0,Ce.Z)((0,Ce.Z)({},Ve.props),{},{isLeaf:We})):St},Ve.renderSwitcher=function(){var We=Ve.props.expanded,lt=Ve.props.context.prefixCls;if(Ve.isLeaf()){var ut=Ve.renderSwitcherIconDom(!0);return ut!==!1?oe.createElement("span",{className:ue()("".concat(lt,"-switcher"),"".concat(lt,"-switcher-noop"))},ut):null}var St=ue()("".concat(lt,"-switcher"),"".concat(lt,"-switcher_").concat(We?Le:Ne)),qe=Ve.renderSwitcherIconDom(!1);return qe!==!1?oe.createElement("span",{onClick:Ve.onExpand,className:St},qe):null},Ve.renderCheckbox=function(){var We=Ve.props,lt=We.checked,ut=We.halfChecked,St=We.disableCheckbox,qe=Ve.props.context.prefixCls,Ze=Ve.isDisabled(),wt=Ve.isCheckable();if(!wt)return null;var Wt=typeof wt!="boolean"?wt:null;return oe.createElement("span",{className:ue()("".concat(qe,"-checkbox"),lt&&"".concat(qe,"-checkbox-checked"),!lt&&ut&&"".concat(qe,"-checkbox-indeterminate"),(Ze||St)&&"".concat(qe,"-checkbox-disabled")),onClick:Ve.onCheck},Wt)},Ve.renderIcon=function(){var We=Ve.props.loading,lt=Ve.props.context.prefixCls;return oe.createElement("span",{className:ue()("".concat(lt,"-iconEle"),"".concat(lt,"-icon__").concat(Ve.getNodeState()||"docu"),We&&"".concat(lt,"-icon_loading"))})},Ve.renderSelector=function(){var We=Ve.state.dragNodeHighlight,lt=Ve.props,ut=lt.title,St=ut===void 0?Re:ut,qe=lt.selected,Ze=lt.icon,wt=lt.loading,Wt=lt.data,Kt=Ve.props.context,_t=Kt.prefixCls,vt=Kt.showIcon,jt=Kt.icon,yn=Kt.loadData,Xt=Kt.titleRender,Ln=Ve.isDisabled(),pn="".concat(_t,"-node-content-wrapper"),hn;if(vt){var un=Ze||jt;hn=un?oe.createElement("span",{className:ue()("".concat(_t,"-iconEle"),"".concat(_t,"-icon__customize"))},typeof un=="function"?un(Ve.props):un):Ve.renderIcon()}else yn&&wt&&(hn=Ve.renderIcon());var Xe;typeof St=="function"?Xe=St(Wt):Xt?Xe=Xt(Wt):Xe=St;var ke=oe.createElement("span",{className:"".concat(_t,"-title")},Xe);return oe.createElement("span",{ref:Ve.setSelectHandle,title:typeof St=="string"?St:"",className:ue()("".concat(pn),"".concat(pn,"-").concat(Ve.getNodeState()||"normal"),!Ln&&(qe||We)&&"".concat(_t,"-node-selected")),onMouseEnter:Ve.onMouseEnter,onMouseLeave:Ve.onMouseLeave,onContextMenu:Ve.onContextMenu,onClick:Ve.onSelectorClick,onDoubleClick:Ve.onSelectorDoubleClick},hn,ke,Ve.renderDropIndicator())},Ve.renderDropIndicator=function(){var We=Ve.props,lt=We.disabled,ut=We.eventKey,St=Ve.props.context,qe=St.draggable,Ze=St.dropLevelOffset,wt=St.dropPosition,Wt=St.prefixCls,Kt=St.indent,_t=St.dropIndicatorRender,vt=St.dragOverNodeKey,jt=St.direction,yn=!!qe,Xt=!lt&&yn&&vt===ut,Ln=Kt!=null?Kt:Ve.cacheIndent;return Ve.cacheIndent=Kt,Xt?_t({dropPosition:wt,dropLevelOffset:Ze,indent:Ln,prefixCls:Wt,direction:jt}):null},Ve}return(0,he.Z)(gt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Tt=this.props.selectable,ct=this.props.context.selectable;return typeof Tt=="boolean"?Tt:ct}},{key:"render",value:function(){var Tt,ct=this.props,Ot=ct.eventKey,We=ct.className,lt=ct.style,ut=ct.dragOver,St=ct.dragOverGapTop,qe=ct.dragOverGapBottom,Ze=ct.isLeaf,wt=ct.isStart,Wt=ct.isEnd,Kt=ct.expanded,_t=ct.selected,vt=ct.checked,jt=ct.halfChecked,yn=ct.loading,Xt=ct.domRef,Ln=ct.active,pn=ct.data,hn=ct.onMouseMove,un=ct.selectable,Xe=(0,Me.Z)(ct,$e),ke=this.props.context,_e=ke.prefixCls,Te=ke.filterTreeNode,Fe=ke.keyEntities,me=ke.dropContainerKey,at=ke.dropTargetKey,Pt=ke.draggingNodeKey,Qe=this.isDisabled(),Je=(0,pe.Z)(Xe,{aria:!0,data:!0}),xt=(0,Be.Z)(Fe,Ot)||{},ot=xt.level,mt=Wt[Wt.length-1],Nt=this.isDraggable(),rn=!Qe&&Nt,It=Pt===Ot,Qt=un!==void 0?{"aria-selected":!!un}:void 0;return oe.createElement("div",(0,ne.Z)({ref:Xt,className:ue()(We,"".concat(_e,"-treenode"),(Tt={},(0,xe.Z)(Tt,"".concat(_e,"-treenode-disabled"),Qe),(0,xe.Z)(Tt,"".concat(_e,"-treenode-switcher-").concat(Kt?"open":"close"),!Ze),(0,xe.Z)(Tt,"".concat(_e,"-treenode-checkbox-checked"),vt),(0,xe.Z)(Tt,"".concat(_e,"-treenode-checkbox-indeterminate"),jt),(0,xe.Z)(Tt,"".concat(_e,"-treenode-selected"),_t),(0,xe.Z)(Tt,"".concat(_e,"-treenode-loading"),yn),(0,xe.Z)(Tt,"".concat(_e,"-treenode-active"),Ln),(0,xe.Z)(Tt,"".concat(_e,"-treenode-leaf-last"),mt),(0,xe.Z)(Tt,"".concat(_e,"-treenode-draggable"),Nt),(0,xe.Z)(Tt,"dragging",It),(0,xe.Z)(Tt,"drop-target",at===Ot),(0,xe.Z)(Tt,"drop-container",me===Ot),(0,xe.Z)(Tt,"drag-over",!Qe&&ut),(0,xe.Z)(Tt,"drag-over-gap-top",!Qe&&St),(0,xe.Z)(Tt,"drag-over-gap-bottom",!Qe&&qe),(0,xe.Z)(Tt,"filter-node",Te&&Te((0,ze.F)(this.props))),Tt)),style:lt,draggable:rn,"aria-grabbed":It,onDragStart:rn?this.onDragStart:void 0,onDragEnter:Nt?this.onDragEnter:void 0,onDragOver:Nt?this.onDragOver:void 0,onDragLeave:Nt?this.onDragLeave:void 0,onDrop:Nt?this.onDrop:void 0,onDragEnd:Nt?this.onDragEnd:void 0,onMouseMove:hn},Qt,Je),oe.createElement(we,{prefixCls:_e,level:ot,isStart:wt,isEnd:Wt}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),gt}(oe.Component),Ie=function(Ue){return oe.createElement(ge.k.Consumer,null,function(gt){return oe.createElement(Se,(0,ne.Z)({},Ue,{context:gt}))})};Ie.displayName="TreeNode",Ie.isTreeNode=1;var Ae=Ie},39378:function(gn,kt,ee){"use strict";ee.d(kt,{k:function(){return xe}});var ne=ee(59301),xe=ne.createContext(null)},38028:function(gn,kt,ee){"use strict";ee.d(kt,{O:function(){return Ae.Z},Z:function(){return ke}});var ne=ee(60499),xe=ee(18642),Me=ee(43749),Ce=ee(85899),fe=ee(77654),he=ee(38705),ce=ee(17212),ae=ee(15793),se=ee(39153),ve=ee(55401),ue=ee(92310),pe=ee.n(ue),oe=ee(10228),ge=ee(26112),ye=ee(48736),we=ee(59301),Be=ee(39378);function ze(_e){var Te=_e.dropPosition,Fe=_e.dropLevelOffset,me=_e.indent,at={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Te){case-1:at.top=0,at.left=-Fe*me;break;case 1:at.bottom=0,at.left=-Fe*me;break;case 0:at.bottom=0,at.left=me;break}return we.createElement("div",{style:at})}function $e(_e){if(_e==null)throw new TypeError("Cannot destructure "+_e)}var Le=ee(72190),Ne=ee(42244),Re=ee(34280),Se=ee(48911),Ie=ee(77900),Ae=ee(39417);function it(_e,Te){var Fe=we.useState(!1),me=(0,Le.Z)(Fe,2),at=me[0],Pt=me[1];we.useLayoutEffect(function(){if(at)return _e(),function(){Te()}},[at]),we.useLayoutEffect(function(){return Pt(!0),function(){Pt(!1)}},[])}var Ue=ee(71430),gt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ve=function(Te,Fe){var me=Te.className,at=Te.style,Pt=Te.motion,Qe=Te.motionNodes,Je=Te.motionType,xt=Te.onMotionStart,ot=Te.onMotionEnd,mt=Te.active,Nt=Te.treeNodeRequiredProps,rn=(0,Ne.Z)(Te,gt),It=we.useState(!0),Qt=(0,Le.Z)(It,2),dn=Qt[0],At=Qt[1],Lt=we.useContext(Be.k),qt=Lt.prefixCls,Tn=Qe&&Je!=="hide";(0,Re.Z)(function(){Qe&&Tn!==dn&&At(Tn)},[Qe]);var Jt=function(){Qe&&xt()},On=we.useRef(!1),zn=function(){Qe&&!On.current&&(On.current=!0,ot())};it(Jt,zn);var qn=function(vr){Tn===vr&&zn()};return Qe?we.createElement(Ie.default,(0,ne.Z)({ref:Fe,visible:dn},Pt,{motionAppear:Je==="show",onVisibleChanged:qn}),function(Xn,vr){var _r=Xn.className,Qn=Xn.style;return we.createElement("div",{ref:vr,className:pe()("".concat(qt,"-treenode-motion"),_r),style:Qn},Qe.map(function(Cr){var ni=(0,ne.Z)({},($e(Cr.data),Cr.data)),Jr=Cr.title,Yn=Cr.key,mr=Cr.isStart,si=Cr.isEnd;delete ni.children;var or=(0,Ue.H8)(Yn,Nt);return we.createElement(Ae.Z,(0,ne.Z)({},ni,or,{title:Jr,active:mt,data:Cr.data,key:Yn,isStart:mr,isEnd:si}))}))}):we.createElement(Ae.Z,(0,ne.Z)({domRef:Fe,className:me,style:at},rn,{active:mt}))};Ve.displayName="MotionTreeNode";var Tt=we.forwardRef(Ve),ct=Tt;function Ot(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Fe=_e.length,me=Te.length;if(Math.abs(Fe-me)!==1)return{add:!1,key:null};function at(Pt,Qe){var Je=new Map;Pt.forEach(function(ot){Je.set(ot,!0)});var xt=Qe.filter(function(ot){return!Je.has(ot)});return xt.length===1?xt[0]:null}return Fe<me?{add:!0,key:at(_e,Te)}:{add:!1,key:at(Te,_e)}}function We(_e,Te,Fe){var me=_e.findIndex(function(Je){return Je.key===Fe}),at=_e[me+1],Pt=Te.findIndex(function(Je){return Je.key===Fe});if(at){var Qe=Te.findIndex(function(Je){return Je.key===at.key});return Te.slice(Pt+1,Qe)}return Te.slice(Pt+1)}var lt=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],ut={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},St=function(){},qe="RC_TREE_MOTION_".concat(Math.random()),Ze={key:qe},wt={key:qe,level:0,index:0,pos:"0",node:Ze,nodes:[Ze]},Wt={parent:null,children:[],pos:wt.pos,data:Ze,title:null,key:qe,isStart:[],isEnd:[]};function Kt(_e,Te,Fe,me){return Te===!1||!Fe?_e:_e.slice(0,Math.ceil(Fe/me)+1)}function _t(_e){var Te=_e.key,Fe=_e.pos;return(0,Ue.km)(Te,Fe)}function vt(_e){for(var Te=String(_e.data.key),Fe=_e;Fe.parent;)Fe=Fe.parent,Te="".concat(Fe.data.key," > ").concat(Te);return Te}var jt=we.forwardRef(function(_e,Te){var Fe=_e.prefixCls,me=_e.data,at=_e.selectable,Pt=_e.checkable,Qe=_e.expandedKeys,Je=_e.selectedKeys,xt=_e.checkedKeys,ot=_e.loadedKeys,mt=_e.loadingKeys,Nt=_e.halfCheckedKeys,rn=_e.keyEntities,It=_e.disabled,Qt=_e.dragging,dn=_e.dragOverNodeKey,At=_e.dropPosition,Lt=_e.motion,qt=_e.height,Tn=_e.itemHeight,Jt=_e.virtual,On=_e.focusable,zn=_e.activeItem,qn=_e.focused,Xn=_e.tabIndex,vr=_e.onKeyDown,_r=_e.onFocus,Qn=_e.onBlur,Cr=_e.onActiveChange,ni=_e.onListChangeStart,Jr=_e.onListChangeEnd,Yn=(0,Ne.Z)(_e,lt),mr=we.useRef(null),si=we.useRef(null);we.useImperativeHandle(Te,function(){return{scrollTo:function(Vt){mr.current.scrollTo(Vt)},getIndentWidth:function(){return si.current.offsetWidth}}});var or=we.useState(Qe),ii=(0,Le.Z)(or,2),ki=ii[0],gi=ii[1],Li=we.useState(me),ui=(0,Le.Z)(Li,2),dr=ui[0],Hr=ui[1],Cn=we.useState(me),Ee=(0,Le.Z)(Cn,2),je=Ee[0],Oe=Ee[1],De=we.useState([]),Ke=(0,Le.Z)(De,2),et=Ke[0],rt=Ke[1],Dt=we.useState(null),Ft=(0,Le.Z)(Dt,2),Bt=Ft[0],Ct=Ft[1],Ht=we.useRef(me);Ht.current=me;function Ut(){var Rt=Ht.current;Hr(Rt),Oe(Rt),rt([]),Ct(null),Jr()}(0,Re.Z)(function(){gi(Qe);var Rt=Ot(ki,Qe);if(Rt.key!==null)if(Rt.add){var Vt=dr.findIndex(function(Sn){var Un=Sn.key;return Un===Rt.key}),In=Kt(We(dr,me,Rt.key),Jt,qt,Tn),wn=dr.slice();wn.splice(Vt+1,0,Wt),Oe(wn),rt(In),Ct("show")}else{var Nn=me.findIndex(function(Sn){var Un=Sn.key;return Un===Rt.key}),Rn=Kt(We(me,dr,Rt.key),Jt,qt,Tn),Jn=me.slice();Jn.splice(Nn+1,0,Wt),Oe(Jn),rt(Rn),Ct("hide")}else dr!==me&&(Hr(me),Oe(me))},[Qe,me]),we.useEffect(function(){Qt||Ut()},[Qt]);var on=Lt?je:me,cn={expandedKeys:Qe,selectedKeys:Je,loadedKeys:ot,loadingKeys:mt,checkedKeys:xt,halfCheckedKeys:Nt,dragOverNodeKey:dn,dropPosition:At,keyEntities:rn};return we.createElement(we.Fragment,null,qn&&zn&&we.createElement("span",{style:ut,"aria-live":"assertive"},vt(zn)),we.createElement("div",null,we.createElement("input",{style:ut,disabled:On===!1||It,tabIndex:On!==!1?Xn:null,onKeyDown:vr,onFocus:_r,onBlur:Qn,value:"",onChange:St,"aria-label":"for screen reader"})),we.createElement("div",{className:"".concat(Fe,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},we.createElement("div",{className:"".concat(Fe,"-indent")},we.createElement("div",{ref:si,className:"".concat(Fe,"-indent-unit")}))),we.createElement(Se.Z,(0,ne.Z)({},Yn,{data:on,itemKey:_t,height:qt,fullHeight:!1,virtual:Jt,itemHeight:Tn,prefixCls:"".concat(Fe,"-list"),ref:mr,onVisibleChange:function(Vt,In){var wn=new Set(Vt),Nn=In.filter(function(Rn){return!wn.has(Rn)});Nn.some(function(Rn){return _t(Rn)===qe})&&Ut()}}),function(Rt){var Vt=Rt.pos,In=(0,ne.Z)({},($e(Rt.data),Rt.data)),wn=Rt.title,Nn=Rt.key,Rn=Rt.isStart,Jn=Rt.isEnd,Sn=(0,Ue.km)(Nn,Vt);delete In.key,delete In.children;var Un=(0,Ue.H8)(Sn,cn);return we.createElement(ct,(0,ne.Z)({},In,Un,{title:wn,active:!!zn&&Nn===zn.key,pos:Vt,data:Rt.data,isStart:Rn,isEnd:Jn,motion:Lt,motionNodes:Nn===qe?et:null,motionType:Bt,onMotionStart:ni,onMotionEnd:Ut,treeNodeRequiredProps:cn,onMouseMove:function(){Cr(null)}}))}))});jt.displayName="NodeList";var yn=jt,Xt=ee(35654),Ln=ee(90782),pn=ee(67841),hn=10,un=function(_e){(0,se.Z)(Fe,_e);var Te=(0,ve.Z)(Fe);function Fe(){var me;(0,he.Z)(this,Fe);for(var at=arguments.length,Pt=new Array(at),Qe=0;Qe<at;Qe++)Pt[Qe]=arguments[Qe];return me=Te.call.apply(Te,[this].concat(Pt)),me.destroyed=!1,me.delayedDragEnterLogic=void 0,me.loadingRetryTimes={},me.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Ue.w$)()},me.dragStartMousePosition=null,me.dragNode=void 0,me.currentMouseOverDroppableNodeKey=null,me.listRef=we.createRef(),me.onNodeDragStart=function(Je,xt){var ot=me.state,mt=ot.expandedKeys,Nt=ot.keyEntities,rn=me.props.onDragStart,It=xt.props.eventKey;me.dragNode=xt,me.dragStartMousePosition={x:Je.clientX,y:Je.clientY};var Qt=(0,Xt._5)(mt,It);me.setState({draggingNodeKey:It,dragChildrenKeys:(0,Xt.wA)(It,Nt),indent:me.listRef.current.getIndentWidth()}),me.setExpandedKeys(Qt),window.addEventListener("dragend",me.onWindowDragEnd),rn==null||rn({event:Je,node:(0,Ue.F)(xt.props)})},me.onNodeDragEnter=function(Je,xt){var ot=me.state,mt=ot.expandedKeys,Nt=ot.keyEntities,rn=ot.dragChildrenKeys,It=ot.flattenNodes,Qt=ot.indent,dn=me.props,At=dn.onDragEnter,Lt=dn.onExpand,qt=dn.allowDrop,Tn=dn.direction,Jt=xt.props,On=Jt.pos,zn=Jt.eventKey,qn=(0,ae.Z)(me),Xn=qn.dragNode;if(me.currentMouseOverDroppableNodeKey!==zn&&(me.currentMouseOverDroppableNodeKey=zn),!Xn){me.resetDragState();return}var vr=(0,Xt.OM)(Je,Xn,xt,Qt,me.dragStartMousePosition,qt,It,Nt,mt,Tn),_r=vr.dropPosition,Qn=vr.dropLevelOffset,Cr=vr.dropTargetKey,ni=vr.dropContainerKey,Jr=vr.dropTargetPos,Yn=vr.dropAllowed,mr=vr.dragOverNodeKey;if(rn.indexOf(Cr)!==-1||!Yn){me.resetDragState();return}if(me.delayedDragEnterLogic||(me.delayedDragEnterLogic={}),Object.keys(me.delayedDragEnterLogic).forEach(function(si){clearTimeout(me.delayedDragEnterLogic[si])}),Xn.props.eventKey!==xt.props.eventKey&&(Je.persist(),me.delayedDragEnterLogic[On]=window.setTimeout(function(){if(me.state.draggingNodeKey!==null){var si=(0,fe.Z)(mt),or=(0,pn.Z)(Nt,xt.props.eventKey);or&&(or.children||[]).length&&(si=(0,Xt.L0)(mt,xt.props.eventKey)),"expandedKeys"in me.props||me.setExpandedKeys(si),Lt==null||Lt(si,{node:(0,Ue.F)(xt.props),expanded:!0,nativeEvent:Je.nativeEvent})}},800)),Xn.props.eventKey===Cr&&Qn===0){me.resetDragState();return}me.setState({dragOverNodeKey:mr,dropPosition:_r,dropLevelOffset:Qn,dropTargetKey:Cr,dropContainerKey:ni,dropTargetPos:Jr,dropAllowed:Yn}),At==null||At({event:Je,node:(0,Ue.F)(xt.props),expandedKeys:mt})},me.onNodeDragOver=function(Je,xt){var ot=me.state,mt=ot.dragChildrenKeys,Nt=ot.flattenNodes,rn=ot.keyEntities,It=ot.expandedKeys,Qt=ot.indent,dn=me.props,At=dn.onDragOver,Lt=dn.allowDrop,qt=dn.direction,Tn=(0,ae.Z)(me),Jt=Tn.dragNode;if(Jt){var On=(0,Xt.OM)(Je,Jt,xt,Qt,me.dragStartMousePosition,Lt,Nt,rn,It,qt),zn=On.dropPosition,qn=On.dropLevelOffset,Xn=On.dropTargetKey,vr=On.dropContainerKey,_r=On.dropAllowed,Qn=On.dropTargetPos,Cr=On.dragOverNodeKey;mt.indexOf(Xn)!==-1||!_r||(Jt.props.eventKey===Xn&&qn===0?me.state.dropPosition===null&&me.state.dropLevelOffset===null&&me.state.dropTargetKey===null&&me.state.dropContainerKey===null&&me.state.dropTargetPos===null&&me.state.dropAllowed===!1&&me.state.dragOverNodeKey===null||me.resetDragState():zn===me.state.dropPosition&&qn===me.state.dropLevelOffset&&Xn===me.state.dropTargetKey&&vr===me.state.dropContainerKey&&Qn===me.state.dropTargetPos&&_r===me.state.dropAllowed&&Cr===me.state.dragOverNodeKey||me.setState({dropPosition:zn,dropLevelOffset:qn,dropTargetKey:Xn,dropContainerKey:vr,dropTargetPos:Qn,dropAllowed:_r,dragOverNodeKey:Cr}),At==null||At({event:Je,node:(0,Ue.F)(xt.props)}))}},me.onNodeDragLeave=function(Je,xt){me.currentMouseOverDroppableNodeKey===xt.props.eventKey&&!Je.currentTarget.contains(Je.relatedTarget)&&(me.resetDragState(),me.currentMouseOverDroppableNodeKey=null);var ot=me.props.onDragLeave;ot==null||ot({event:Je,node:(0,Ue.F)(xt.props)})},me.onWindowDragEnd=function(Je){me.onNodeDragEnd(Je,null,!0),window.removeEventListener("dragend",me.onWindowDragEnd)},me.onNodeDragEnd=function(Je,xt){var ot=me.props.onDragEnd;me.setState({dragOverNodeKey:null}),me.cleanDragState(),ot==null||ot({event:Je,node:(0,Ue.F)(xt.props)}),me.dragNode=null,window.removeEventListener("dragend",me.onWindowDragEnd)},me.onNodeDrop=function(Je,xt){var ot,mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Nt=me.state,rn=Nt.dragChildrenKeys,It=Nt.dropPosition,Qt=Nt.dropTargetKey,dn=Nt.dropTargetPos,At=Nt.dropAllowed;if(At){var Lt=me.props.onDrop;if(me.setState({dragOverNodeKey:null}),me.cleanDragState(),Qt!==null){var qt=(0,Ce.Z)((0,Ce.Z)({},(0,Ue.H8)(Qt,me.getTreeNodeRequiredProps())),{},{active:((ot=me.getActiveItem())===null||ot===void 0?void 0:ot.key)===Qt,data:(0,pn.Z)(me.state.keyEntities,Qt).node}),Tn=rn.indexOf(Qt)!==-1;(0,ye.ZP)(!Tn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Jt=(0,Xt.yx)(dn),On={event:Je,node:(0,Ue.F)(qt),dragNode:me.dragNode?(0,Ue.F)(me.dragNode.props):null,dragNodesKeys:[me.dragNode.props.eventKey].concat(rn),dropToGap:It!==0,dropPosition:It+Number(Jt[Jt.length-1])};mt||Lt==null||Lt(On),me.dragNode=null}}},me.cleanDragState=function(){var Je=me.state.draggingNodeKey;Je!==null&&me.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),me.dragStartMousePosition=null,me.currentMouseOverDroppableNodeKey=null},me.triggerExpandActionExpand=function(Je,xt){var ot=me.state,mt=ot.expandedKeys,Nt=ot.flattenNodes,rn=xt.expanded,It=xt.key,Qt=xt.isLeaf;if(!(Qt||Je.shiftKey||Je.metaKey||Je.ctrlKey)){var dn=Nt.filter(function(Lt){return Lt.key===It})[0],At=(0,Ue.F)((0,Ce.Z)((0,Ce.Z)({},(0,Ue.H8)(It,me.getTreeNodeRequiredProps())),{},{data:dn.data}));me.setExpandedKeys(rn?(0,Xt._5)(mt,It):(0,Xt.L0)(mt,It)),me.onNodeExpand(Je,At)}},me.onNodeClick=function(Je,xt){var ot=me.props,mt=ot.onClick,Nt=ot.expandAction;Nt==="click"&&me.triggerExpandActionExpand(Je,xt),mt==null||mt(Je,xt)},me.onNodeDoubleClick=function(Je,xt){var ot=me.props,mt=ot.onDoubleClick,Nt=ot.expandAction;Nt==="doubleClick"&&me.triggerExpandActionExpand(Je,xt),mt==null||mt(Je,xt)},me.onNodeSelect=function(Je,xt){var ot=me.state.selectedKeys,mt=me.state,Nt=mt.keyEntities,rn=mt.fieldNames,It=me.props,Qt=It.onSelect,dn=It.multiple,At=xt.selected,Lt=xt[rn.key],qt=!At;qt?dn?ot=(0,Xt.L0)(ot,Lt):ot=[Lt]:ot=(0,Xt._5)(ot,Lt);var Tn=ot.map(function(Jt){var On=(0,pn.Z)(Nt,Jt);return On?On.node:null}).filter(function(Jt){return Jt});me.setUncontrolledState({selectedKeys:ot}),Qt==null||Qt(ot,{event:"select",selected:qt,node:xt,selectedNodes:Tn,nativeEvent:Je.nativeEvent})},me.onNodeCheck=function(Je,xt,ot){var mt=me.state,Nt=mt.keyEntities,rn=mt.checkedKeys,It=mt.halfCheckedKeys,Qt=me.props,dn=Qt.checkStrictly,At=Qt.onCheck,Lt=xt.key,qt,Tn={event:"check",node:xt,checked:ot,nativeEvent:Je.nativeEvent};if(dn){var Jt=ot?(0,Xt.L0)(rn,Lt):(0,Xt._5)(rn,Lt),On=(0,Xt._5)(It,Lt);qt={checked:Jt,halfChecked:On},Tn.checkedNodes=Jt.map(function(Qn){return(0,pn.Z)(Nt,Qn)}).filter(function(Qn){return Qn}).map(function(Qn){return Qn.node}),me.setUncontrolledState({checkedKeys:Jt})}else{var zn=(0,Ln.S)([].concat((0,fe.Z)(rn),[Lt]),!0,Nt),qn=zn.checkedKeys,Xn=zn.halfCheckedKeys;if(!ot){var vr=new Set(qn);vr.delete(Lt);var _r=(0,Ln.S)(Array.from(vr),{checked:!1,halfCheckedKeys:Xn},Nt);qn=_r.checkedKeys,Xn=_r.halfCheckedKeys}qt=qn,Tn.checkedNodes=[],Tn.checkedNodesPositions=[],Tn.halfCheckedKeys=Xn,qn.forEach(function(Qn){var Cr=(0,pn.Z)(Nt,Qn);if(Cr){var ni=Cr.node,Jr=Cr.pos;Tn.checkedNodes.push(ni),Tn.checkedNodesPositions.push({node:ni,pos:Jr})}}),me.setUncontrolledState({checkedKeys:qn},!1,{halfCheckedKeys:Xn})}At==null||At(qt,Tn)},me.onNodeLoad=function(Je){var xt=Je.key,ot=new Promise(function(mt,Nt){me.setState(function(rn){var It=rn.loadedKeys,Qt=It===void 0?[]:It,dn=rn.loadingKeys,At=dn===void 0?[]:dn,Lt=me.props,qt=Lt.loadData,Tn=Lt.onLoad;if(!qt||Qt.indexOf(xt)!==-1||At.indexOf(xt)!==-1)return null;var Jt=qt(Je);return Jt.then(function(){var On=me.state.loadedKeys,zn=(0,Xt.L0)(On,xt);Tn==null||Tn(zn,{event:"load",node:Je}),me.setUncontrolledState({loadedKeys:zn}),me.setState(function(qn){return{loadingKeys:(0,Xt._5)(qn.loadingKeys,xt)}}),mt()}).catch(function(On){if(me.setState(function(qn){return{loadingKeys:(0,Xt._5)(qn.loadingKeys,xt)}}),me.loadingRetryTimes[xt]=(me.loadingRetryTimes[xt]||0)+1,me.loadingRetryTimes[xt]>=hn){var zn=me.state.loadedKeys;(0,ye.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),me.setUncontrolledState({loadedKeys:(0,Xt.L0)(zn,xt)}),mt()}Nt(On)}),{loadingKeys:(0,Xt.L0)(At,xt)}})});return ot.catch(function(){}),ot},me.onNodeMouseEnter=function(Je,xt){var ot=me.props.onMouseEnter;ot==null||ot({event:Je,node:xt})},me.onNodeMouseLeave=function(Je,xt){var ot=me.props.onMouseLeave;ot==null||ot({event:Je,node:xt})},me.onNodeContextMenu=function(Je,xt){var ot=me.props.onRightClick;ot&&(Je.preventDefault(),ot({event:Je,node:xt}))},me.onFocus=function(){var Je=me.props.onFocus;me.setState({focused:!0});for(var xt=arguments.length,ot=new Array(xt),mt=0;mt<xt;mt++)ot[mt]=arguments[mt];Je==null||Je.apply(void 0,ot)},me.onBlur=function(){var Je=me.props.onBlur;me.setState({focused:!1}),me.onActiveChange(null);for(var xt=arguments.length,ot=new Array(xt),mt=0;mt<xt;mt++)ot[mt]=arguments[mt];Je==null||Je.apply(void 0,ot)},me.getTreeNodeRequiredProps=function(){var Je=me.state,xt=Je.expandedKeys,ot=Je.selectedKeys,mt=Je.loadedKeys,Nt=Je.loadingKeys,rn=Je.checkedKeys,It=Je.halfCheckedKeys,Qt=Je.dragOverNodeKey,dn=Je.dropPosition,At=Je.keyEntities;return{expandedKeys:xt||[],selectedKeys:ot||[],loadedKeys:mt||[],loadingKeys:Nt||[],checkedKeys:rn||[],halfCheckedKeys:It||[],dragOverNodeKey:Qt,dropPosition:dn,keyEntities:At}},me.setExpandedKeys=function(Je){var xt=me.state,ot=xt.treeData,mt=xt.fieldNames,Nt=(0,Ue.oH)(ot,Je,mt);me.setUncontrolledState({expandedKeys:Je,flattenNodes:Nt},!0)},me.onNodeExpand=function(Je,xt){var ot=me.state.expandedKeys,mt=me.state,Nt=mt.listChanging,rn=mt.fieldNames,It=me.props,Qt=It.onExpand,dn=It.loadData,At=xt.expanded,Lt=xt[rn.key];if(!Nt){var qt=ot.indexOf(Lt),Tn=!At;if((0,ye.ZP)(At&&qt!==-1||!At&&qt===-1,"Expand state not sync with index check"),Tn?ot=(0,Xt.L0)(ot,Lt):ot=(0,Xt._5)(ot,Lt),me.setExpandedKeys(ot),Qt==null||Qt(ot,{node:xt,expanded:Tn,nativeEvent:Je.nativeEvent}),Tn&&dn){var Jt=me.onNodeLoad(xt);Jt&&Jt.then(function(){var On=(0,Ue.oH)(me.state.treeData,ot,rn);me.setUncontrolledState({flattenNodes:On})}).catch(function(){var On=me.state.expandedKeys,zn=(0,Xt._5)(On,Lt);me.setExpandedKeys(zn)})}}},me.onListChangeStart=function(){me.setUncontrolledState({listChanging:!0})},me.onListChangeEnd=function(){setTimeout(function(){me.setUncontrolledState({listChanging:!1})})},me.onActiveChange=function(Je){var xt=me.state.activeKey,ot=me.props.onActiveChange;xt!==Je&&(me.setState({activeKey:Je}),Je!==null&&me.scrollTo({key:Je}),ot==null||ot(Je))},me.getActiveItem=function(){var Je=me.state,xt=Je.activeKey,ot=Je.flattenNodes;return xt===null?null:ot.find(function(mt){var Nt=mt.key;return Nt===xt})||null},me.offsetActiveKey=function(Je){var xt=me.state,ot=xt.flattenNodes,mt=xt.activeKey,Nt=ot.findIndex(function(Qt){var dn=Qt.key;return dn===mt});Nt===-1&&Je<0&&(Nt=ot.length),Nt=(Nt+Je+ot.length)%ot.length;var rn=ot[Nt];if(rn){var It=rn.key;me.onActiveChange(It)}else me.onActiveChange(null)},me.onKeyDown=function(Je){var xt=me.state,ot=xt.activeKey,mt=xt.expandedKeys,Nt=xt.checkedKeys,rn=xt.fieldNames,It=me.props,Qt=It.onKeyDown,dn=It.checkable,At=It.selectable;switch(Je.which){case oe.Z.UP:{me.offsetActiveKey(-1),Je.preventDefault();break}case oe.Z.DOWN:{me.offsetActiveKey(1),Je.preventDefault();break}}var Lt=me.getActiveItem();if(Lt&&Lt.data){var qt=me.getTreeNodeRequiredProps(),Tn=Lt.data.isLeaf===!1||!!(Lt.data[rn.children]||[]).length,Jt=(0,Ue.F)((0,Ce.Z)((0,Ce.Z)({},(0,Ue.H8)(ot,qt)),{},{data:Lt.data,active:!0}));switch(Je.which){case oe.Z.LEFT:{Tn&&mt.includes(ot)?me.onNodeExpand({},Jt):Lt.parent&&me.onActiveChange(Lt.parent.key),Je.preventDefault();break}case oe.Z.RIGHT:{Tn&&!mt.includes(ot)?me.onNodeExpand({},Jt):Lt.children&&Lt.children.length&&me.onActiveChange(Lt.children[0].key),Je.preventDefault();break}case oe.Z.ENTER:case oe.Z.SPACE:{dn&&!Jt.disabled&&Jt.checkable!==!1&&!Jt.disableCheckbox?me.onNodeCheck({},Jt,!Nt.includes(ot)):!dn&&At&&!Jt.disabled&&Jt.selectable!==!1&&me.onNodeSelect({},Jt);break}}}Qt==null||Qt(Je)},me.setUncontrolledState=function(Je){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!me.destroyed){var mt=!1,Nt=!0,rn={};Object.keys(Je).forEach(function(It){if(It in me.props){Nt=!1;return}mt=!0,rn[It]=Je[It]}),mt&&(!xt||Nt)&&me.setState((0,Ce.Z)((0,Ce.Z)({},rn),ot))}},me.scrollTo=function(Je){me.listRef.current.scrollTo(Je)},me}return(0,ce.Z)(Fe,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var at=this.props.activeKey;at!==void 0&&at!==this.state.activeKey&&(this.setState({activeKey:at}),at!==null&&this.scrollTo({key:at}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var at,Pt=this.state,Qe=Pt.focused,Je=Pt.flattenNodes,xt=Pt.keyEntities,ot=Pt.draggingNodeKey,mt=Pt.activeKey,Nt=Pt.dropLevelOffset,rn=Pt.dropContainerKey,It=Pt.dropTargetKey,Qt=Pt.dropPosition,dn=Pt.dragOverNodeKey,At=Pt.indent,Lt=this.props,qt=Lt.prefixCls,Tn=Lt.className,Jt=Lt.style,On=Lt.showLine,zn=Lt.focusable,qn=Lt.tabIndex,Xn=qn===void 0?0:qn,vr=Lt.selectable,_r=Lt.showIcon,Qn=Lt.icon,Cr=Lt.switcherIcon,ni=Lt.draggable,Jr=Lt.checkable,Yn=Lt.checkStrictly,mr=Lt.disabled,si=Lt.motion,or=Lt.loadData,ii=Lt.filterTreeNode,ki=Lt.height,gi=Lt.itemHeight,Li=Lt.virtual,ui=Lt.titleRender,dr=Lt.dropIndicatorRender,Hr=Lt.onContextMenu,Cn=Lt.onScroll,Ee=Lt.direction,je=Lt.rootClassName,Oe=Lt.rootStyle,De=(0,ge.Z)(this.props,{aria:!0,data:!0}),Ke;return ni&&((0,Me.Z)(ni)==="object"?Ke=ni:typeof ni=="function"?Ke={nodeDraggable:ni}:Ke={}),we.createElement(Be.k.Provider,{value:{prefixCls:qt,selectable:vr,showIcon:_r,icon:Qn,switcherIcon:Cr,draggable:Ke,draggingNodeKey:ot,checkable:Jr,checkStrictly:Yn,disabled:mr,keyEntities:xt,dropLevelOffset:Nt,dropContainerKey:rn,dropTargetKey:It,dropPosition:Qt,dragOverNodeKey:dn,indent:At,direction:Ee,dropIndicatorRender:dr,loadData:or,filterTreeNode:ii,titleRender:ui,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},we.createElement("div",{role:"tree",className:pe()(qt,Tn,je,(at={},(0,xe.Z)(at,"".concat(qt,"-show-line"),On),(0,xe.Z)(at,"".concat(qt,"-focused"),Qe),(0,xe.Z)(at,"".concat(qt,"-active-focused"),mt!==null),at)),style:Oe},we.createElement(yn,(0,ne.Z)({ref:this.listRef,prefixCls:qt,style:Jt,data:Je,disabled:mr,selectable:vr,checkable:!!Jr,motion:si,dragging:ot!==null,height:ki,itemHeight:gi,virtual:Li,focusable:zn,focused:Qe,tabIndex:Xn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Hr,onScroll:Cn},this.getTreeNodeRequiredProps(),De))))}}],[{key:"getDerivedStateFromProps",value:function(at,Pt){var Qe=Pt.prevProps,Je={prevProps:at};function xt(zn){return!Qe&&zn in at||Qe&&Qe[zn]!==at[zn]}var ot,mt=Pt.fieldNames;if(xt("fieldNames")&&(mt=(0,Ue.w$)(at.fieldNames),Je.fieldNames=mt),xt("treeData")?ot=at.treeData:xt("children")&&((0,ye.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),ot=(0,Ue.zn)(at.children)),ot){Je.treeData=ot;var Nt=(0,Ue.I8)(ot,{fieldNames:mt});Je.keyEntities=(0,Ce.Z)((0,xe.Z)({},qe,wt),Nt.keyEntities)}var rn=Je.keyEntities||Pt.keyEntities;if(xt("expandedKeys")||Qe&&xt("autoExpandParent"))Je.expandedKeys=at.autoExpandParent||!Qe&&at.defaultExpandParent?(0,Xt.r7)(at.expandedKeys,rn):at.expandedKeys;else if(!Qe&&at.defaultExpandAll){var It=(0,Ce.Z)({},rn);delete It[qe],Je.expandedKeys=Object.keys(It).map(function(zn){return It[zn].key})}else!Qe&&at.defaultExpandedKeys&&(Je.expandedKeys=at.autoExpandParent||at.defaultExpandParent?(0,Xt.r7)(at.defaultExpandedKeys,rn):at.defaultExpandedKeys);if(Je.expandedKeys||delete Je.expandedKeys,ot||Je.expandedKeys){var Qt=(0,Ue.oH)(ot||Pt.treeData,Je.expandedKeys||Pt.expandedKeys,mt);Je.flattenNodes=Qt}if(at.selectable&&(xt("selectedKeys")?Je.selectedKeys=(0,Xt.BT)(at.selectedKeys,at):!Qe&&at.defaultSelectedKeys&&(Je.selectedKeys=(0,Xt.BT)(at.defaultSelectedKeys,at))),at.checkable){var dn;if(xt("checkedKeys")?dn=(0,Xt.E6)(at.checkedKeys)||{}:!Qe&&at.defaultCheckedKeys?dn=(0,Xt.E6)(at.defaultCheckedKeys)||{}:ot&&(dn=(0,Xt.E6)(at.checkedKeys)||{checkedKeys:Pt.checkedKeys,halfCheckedKeys:Pt.halfCheckedKeys}),dn){var At=dn,Lt=At.checkedKeys,qt=Lt===void 0?[]:Lt,Tn=At.halfCheckedKeys,Jt=Tn===void 0?[]:Tn;if(!at.checkStrictly){var On=(0,Ln.S)(qt,!0,rn);qt=On.checkedKeys,Jt=On.halfCheckedKeys}Je.checkedKeys=qt,Je.halfCheckedKeys=Jt}}return xt("loadedKeys")&&(Je.loadedKeys=at.loadedKeys),Je}}]),Fe}(we.Component);un.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:ze,allowDrop:function(){return!0},expandAction:!1},un.TreeNode=Ae.Z;var Xe=un,ke=Xe},35654:function(gn,kt,ee){"use strict";ee.d(kt,{BT:function(){return we},E6:function(){return $e},L0:function(){return ve},OM:function(){return ye},_5:function(){return se},r7:function(){return Le},wA:function(){return pe},yx:function(){return ue}});var ne=ee(77654),xe=ee(43749),Me=ee(48736),Ce=ee(59301),fe=ee(39417),he=ee(67841),ce=ee(71430),ae=null;function se(Ne,Re){if(!Ne)return[];var Se=Ne.slice(),Ie=Se.indexOf(Re);return Ie>=0&&Se.splice(Ie,1),Se}function ve(Ne,Re){var Se=(Ne||[]).slice();return Se.indexOf(Re)===-1&&Se.push(Re),Se}function ue(Ne){return Ne.split("-")}function pe(Ne,Re){var Se=[],Ie=(0,he.Z)(Re,Ne);function Ae(){var it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];it.forEach(function(Ue){var gt=Ue.key,Ve=Ue.children;Se.push(gt),Ae(Ve)})}return Ae(Ie.children),Se}function oe(Ne){if(Ne.parent){var Re=ue(Ne.pos);return Number(Re[Re.length-1])===Ne.parent.children.length-1}return!1}function ge(Ne){var Re=ue(Ne.pos);return Number(Re[Re.length-1])===0}function ye(Ne,Re,Se,Ie,Ae,it,Ue,gt,Ve,Tt){var ct,Ot=Ne.clientX,We=Ne.clientY,lt=Ne.target.getBoundingClientRect(),ut=lt.top,St=lt.height,qe=(Tt==="rtl"?-1:1)*(((Ae==null?void 0:Ae.x)||0)-Ot),Ze=(qe-12)/Ie,wt=(0,he.Z)(gt,Se.props.eventKey);if(We<ut+St/2){var Wt=Ue.findIndex(function(ke){return ke.key===wt.key}),Kt=Wt<=0?0:Wt-1,_t=Ue[Kt].key;wt=(0,he.Z)(gt,_t)}var vt=wt.key,jt=wt,yn=wt.key,Xt=0,Ln=0;if(!Ve.includes(vt))for(var pn=0;pn<Ze&&oe(wt);pn+=1)wt=wt.parent,Ln+=1;var hn=Re.props.data,un=wt.node,Xe=!0;return ge(wt)&&wt.level===0&&We<ut+St/2&&it({dragNode:hn,dropNode:un,dropPosition:-1})&&wt.key===Se.props.eventKey?Xt=-1:(jt.children||[]).length&&Ve.includes(yn)?it({dragNode:hn,dropNode:un,dropPosition:0})?Xt=0:Xe=!1:Ln===0?Ze>-1.5?it({dragNode:hn,dropNode:un,dropPosition:1})?Xt=1:Xe=!1:it({dragNode:hn,dropNode:un,dropPosition:0})?Xt=0:it({dragNode:hn,dropNode:un,dropPosition:1})?Xt=1:Xe=!1:it({dragNode:hn,dropNode:un,dropPosition:1})?Xt=1:Xe=!1,{dropPosition:Xt,dropLevelOffset:Ln,dropTargetKey:wt.key,dropTargetPos:wt.pos,dragOverNodeKey:yn,dropContainerKey:Xt===0?null:((ct=wt.parent)===null||ct===void 0?void 0:ct.key)||null,dropAllowed:Xe}}function we(Ne,Re){if(Ne){var Se=Re.multiple;return Se?Ne.slice():Ne.length?[Ne[0]]:Ne}}var Be=function(Re){return Re};function ze(Ne,Re){if(!Ne)return[];var Se=Re||{},Ie=Se.processProps,Ae=Ie===void 0?Be:Ie,it=Array.isArray(Ne)?Ne:[Ne];return it.map(function(Ue){var gt=Ue.children,Ve=_objectWithoutProperties(Ue,ae),Tt=ze(gt,Re);return React.createElement(TreeNode,_extends({key:Ve.key},Ae(Ve)),Tt)})}function $e(Ne){if(!Ne)return null;var Re;if(Array.isArray(Ne))Re={checkedKeys:Ne,halfCheckedKeys:void 0};else if((0,xe.Z)(Ne)==="object")Re={checkedKeys:Ne.checked||void 0,halfCheckedKeys:Ne.halfChecked||void 0};else return(0,Me.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Re}function Le(Ne,Re){var Se=new Set;function Ie(Ae){if(!Se.has(Ae)){var it=(0,he.Z)(Re,Ae);if(it){Se.add(Ae);var Ue=it.parent,gt=it.node;gt.disabled||Ue&&Ie(Ue.key)}}}return(Ne||[]).forEach(function(Ae){Ie(Ae)}),(0,ne.Z)(Se)}},90782:function(gn,kt,ee){"use strict";ee.d(kt,{S:function(){return ce}});var ne=ee(48736),xe=ee(67841);function Me(ae,se){var ve=new Set;return ae.forEach(function(ue){se.has(ue)||ve.add(ue)}),ve}function Ce(ae){var se=ae||{},ve=se.disabled,ue=se.disableCheckbox,pe=se.checkable;return!!(ve||ue)||pe===!1}function fe(ae,se,ve,ue){for(var pe=new Set(ae),oe=new Set,ge=0;ge<=ve;ge+=1){var ye=se.get(ge)||new Set;ye.forEach(function($e){var Le=$e.key,Ne=$e.node,Re=$e.children,Se=Re===void 0?[]:Re;pe.has(Le)&&!ue(Ne)&&Se.filter(function(Ie){return!ue(Ie.node)}).forEach(function(Ie){pe.add(Ie.key)})})}for(var we=new Set,Be=ve;Be>=0;Be-=1){var ze=se.get(Be)||new Set;ze.forEach(function($e){var Le=$e.parent,Ne=$e.node;if(!(ue(Ne)||!$e.parent||we.has($e.parent.key))){if(ue($e.parent.node)){we.add(Le.key);return}var Re=!0,Se=!1;(Le.children||[]).filter(function(Ie){return!ue(Ie.node)}).forEach(function(Ie){var Ae=Ie.key,it=pe.has(Ae);Re&&!it&&(Re=!1),!Se&&(it||oe.has(Ae))&&(Se=!0)}),Re&&pe.add(Le.key),Se&&oe.add(Le.key),we.add(Le.key)}})}return{checkedKeys:Array.from(pe),halfCheckedKeys:Array.from(Me(oe,pe))}}function he(ae,se,ve,ue,pe){for(var oe=new Set(ae),ge=new Set(se),ye=0;ye<=ue;ye+=1){var we=ve.get(ye)||new Set;we.forEach(function(Le){var Ne=Le.key,Re=Le.node,Se=Le.children,Ie=Se===void 0?[]:Se;!oe.has(Ne)&&!ge.has(Ne)&&!pe(Re)&&Ie.filter(function(Ae){return!pe(Ae.node)}).forEach(function(Ae){oe.delete(Ae.key)})})}ge=new Set;for(var Be=new Set,ze=ue;ze>=0;ze-=1){var $e=ve.get(ze)||new Set;$e.forEach(function(Le){var Ne=Le.parent,Re=Le.node;if(!(pe(Re)||!Le.parent||Be.has(Le.parent.key))){if(pe(Le.parent.node)){Be.add(Ne.key);return}var Se=!0,Ie=!1;(Ne.children||[]).filter(function(Ae){return!pe(Ae.node)}).forEach(function(Ae){var it=Ae.key,Ue=oe.has(it);Se&&!Ue&&(Se=!1),!Ie&&(Ue||ge.has(it))&&(Ie=!0)}),Se||oe.delete(Ne.key),Ie&&ge.add(Ne.key),Be.add(Ne.key)}})}return{checkedKeys:Array.from(oe),halfCheckedKeys:Array.from(Me(ge,oe))}}function ce(ae,se,ve,ue){var pe=[],oe;ue?oe=ue:oe=Ce;var ge=new Set(ae.filter(function(ze){var $e=!!(0,xe.Z)(ve,ze);return $e||pe.push(ze),$e})),ye=new Map,we=0;Object.keys(ve).forEach(function(ze){var $e=ve[ze],Le=$e.level,Ne=ye.get(Le);Ne||(Ne=new Set,ye.set(Le,Ne)),Ne.add($e),we=Math.max(we,Le)}),(0,ne.ZP)(!pe.length,"Tree missing follow keys: ".concat(pe.slice(0,100).map(function(ze){return"'".concat(ze,"'")}).join(", ")));var Be;return se===!0?Be=fe(ge,ye,we,oe):Be=he(ge,se.halfCheckedKeys,ye,we,oe),Be}},67841:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ne}});function ne(xe,Me){return xe[Me]}},71430:function(gn,kt,ee){"use strict";ee.d(kt,{F:function(){return Le},H8:function(){return $e},I8:function(){return ze},km:function(){return pe},oH:function(){return we},w$:function(){return oe},zn:function(){return ye}});var ne=ee(43749),xe=ee(77654),Me=ee(85899),Ce=ee(42244),fe=ee(11592),he=ee(2738),ce=ee(48736),ae=ee(67841),se=["children"];function ve(Ne,Re){return"".concat(Ne,"-").concat(Re)}function ue(Ne){return Ne&&Ne.type&&Ne.type.isTreeNode}function pe(Ne,Re){return Ne!=null?Ne:Re}function oe(Ne){var Re=Ne||{},Se=Re.title,Ie=Re._title,Ae=Re.key,it=Re.children,Ue=Se||"title";return{title:Ue,_title:Ie||[Ue],key:Ae||"key",children:it||"children"}}function ge(Ne,Re){var Se=new Map;function Ie(Ae){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ae||[]).forEach(function(Ue){var gt=Ue[Re.key],Ve=Ue[Re.children];warning(gt!=null,"Tree node must have a certain key: [".concat(it).concat(gt,"]"));var Tt=String(gt);warning(!Se.has(Tt)||gt===null||gt===void 0,"Same 'key' exist in the Tree: ".concat(Tt)),Se.set(Tt,!0),Ie(Ve,"".concat(it).concat(Tt," > "))})}Ie(Ne)}function ye(Ne){function Re(Se){var Ie=(0,fe.Z)(Se);return Ie.map(function(Ae){if(!ue(Ae))return(0,ce.ZP)(!Ae,"Tree/TreeNode can only accept TreeNode as children."),null;var it=Ae.key,Ue=Ae.props,gt=Ue.children,Ve=(0,Ce.Z)(Ue,se),Tt=(0,Me.Z)({key:it},Ve),ct=Re(gt);return ct.length&&(Tt.children=ct),Tt}).filter(function(Ae){return Ae})}return Re(Ne)}function we(Ne,Re,Se){var Ie=oe(Se),Ae=Ie._title,it=Ie.key,Ue=Ie.children,gt=new Set(Re===!0?[]:Re),Ve=[];function Tt(ct){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ct.map(function(We,lt){for(var ut=ve(Ot?Ot.pos:"0",lt),St=pe(We[it],ut),qe,Ze=0;Ze<Ae.length;Ze+=1){var wt=Ae[Ze];if(We[wt]!==void 0){qe=We[wt];break}}var Wt=(0,Me.Z)((0,Me.Z)({},(0,he.Z)(We,[].concat((0,xe.Z)(Ae),[it,Ue]))),{},{title:qe,key:St,parent:Ot,pos:ut,children:null,data:We,isStart:[].concat((0,xe.Z)(Ot?Ot.isStart:[]),[lt===0]),isEnd:[].concat((0,xe.Z)(Ot?Ot.isEnd:[]),[lt===ct.length-1])});return Ve.push(Wt),Re===!0||gt.has(St)?Wt.children=Tt(We[Ue]||[],Wt):Wt.children=[],Wt})}return Tt(Ne),Ve}function Be(Ne,Re,Se){var Ie={};(0,ne.Z)(Se)==="object"?Ie=Se:Ie={externalGetKey:Se},Ie=Ie||{};var Ae=Ie,it=Ae.childrenPropName,Ue=Ae.externalGetKey,gt=Ae.fieldNames,Ve=oe(gt),Tt=Ve.key,ct=Ve.children,Ot=it||ct,We;Ue?typeof Ue=="string"?We=function(St){return St[Ue]}:typeof Ue=="function"&&(We=function(St){return Ue(St)}):We=function(St,qe){return pe(St[Tt],qe)};function lt(ut,St,qe,Ze){var wt=ut?ut[Ot]:Ne,Wt=ut?ve(qe.pos,St):"0",Kt=ut?[].concat((0,xe.Z)(Ze),[ut]):[];if(ut){var _t=We(ut,Wt),vt={node:ut,index:St,pos:Wt,key:_t,parentPos:qe.node?qe.pos:null,level:qe.level+1,nodes:Kt};Re(vt)}wt&&wt.forEach(function(jt,yn){lt(jt,yn,{node:ut,pos:Wt,level:qe?qe.level+1:-1},Kt)})}lt(null)}function ze(Ne){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Se=Re.initWrapper,Ie=Re.processEntity,Ae=Re.onProcessFinished,it=Re.externalGetKey,Ue=Re.childrenPropName,gt=Re.fieldNames,Ve=arguments.length>2?arguments[2]:void 0,Tt=it||Ve,ct={},Ot={},We={posEntities:ct,keyEntities:Ot};return Se&&(We=Se(We)||We),Be(Ne,function(lt){var ut=lt.node,St=lt.index,qe=lt.pos,Ze=lt.key,wt=lt.parentPos,Wt=lt.level,Kt=lt.nodes,_t={node:ut,nodes:Kt,index:St,key:Ze,pos:qe,level:Wt},vt=pe(Ze,qe);ct[qe]=_t,Ot[vt]=_t,_t.parent=ct[wt],_t.parent&&(_t.parent.children=_t.parent.children||[],_t.parent.children.push(_t)),Ie&&Ie(_t,We)},{externalGetKey:Tt,childrenPropName:Ue,fieldNames:gt}),Ae&&Ae(We),We}function $e(Ne,Re){var Se=Re.expandedKeys,Ie=Re.selectedKeys,Ae=Re.loadedKeys,it=Re.loadingKeys,Ue=Re.checkedKeys,gt=Re.halfCheckedKeys,Ve=Re.dragOverNodeKey,Tt=Re.dropPosition,ct=Re.keyEntities,Ot=(0,ae.Z)(ct,Ne),We={eventKey:Ne,expanded:Se.indexOf(Ne)!==-1,selected:Ie.indexOf(Ne)!==-1,loaded:Ae.indexOf(Ne)!==-1,loading:it.indexOf(Ne)!==-1,checked:Ue.indexOf(Ne)!==-1,halfChecked:gt.indexOf(Ne)!==-1,pos:String(Ot?Ot.pos:""),dragOver:Ve===Ne&&Tt===0,dragOverGapTop:Ve===Ne&&Tt===-1,dragOverGapBottom:Ve===Ne&&Tt===1};return We}function Le(Ne){var Re=Ne.data,Se=Ne.expanded,Ie=Ne.selected,Ae=Ne.checked,it=Ne.loaded,Ue=Ne.loading,gt=Ne.halfChecked,Ve=Ne.dragOver,Tt=Ne.dragOverGapTop,ct=Ne.dragOverGapBottom,Ot=Ne.pos,We=Ne.active,lt=Ne.eventKey,ut=(0,Me.Z)((0,Me.Z)({},Re),{},{expanded:Se,selected:Ie,checked:Ae,loaded:it,loading:Ue,halfChecked:gt,dragOver:Ve,dragOverGapTop:Tt,dragOverGapBottom:ct,pos:Ot,active:We,key:lt});return"props"in ut||Object.defineProperty(ut,"props",{get:function(){return(0,ce.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Ne}}),ut}},8224:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return xe}});var ne=ee(4676);function xe(Me,Ce,fe,he){var ce=ne.unstable_batchedUpdates?function(se){ne.unstable_batchedUpdates(fe,se)}:fe;return Me!=null&&Me.addEventListener&&Me.addEventListener(Ce,ce,he),{remove:function(){Me!=null&&Me.removeEventListener&&Me.removeEventListener(Ce,ce,he)}}}},55468:function(gn,kt,ee){"use strict";ee.d(kt,{g1:function(){return ue},os:function(){return oe}});var ne=/margin|padding|width|height|max|min|offset/,xe={left:!0,top:!0},Me={cssFloat:1,styleFloat:1,float:1};function Ce(ge){return ge.nodeType===1?ge.ownerDocument.defaultView.getComputedStyle(ge,null):{}}function fe(ge,ye,we){if(ye=ye.toLowerCase(),we==="auto"){if(ye==="height")return ge.offsetHeight;if(ye==="width")return ge.offsetWidth}return ye in xe||(xe[ye]=ne.test(ye)),xe[ye]?parseFloat(we)||0:we}function he(ge,ye){var we=arguments.length,Be=Ce(ge);return ye=Me[ye]?"cssFloat"in ge.style?"cssFloat":"styleFloat":ye,we===1?Be:fe(ge,ye,Be[ye]||ge.style[ye])}function ce(ge,ye,we){var Be=arguments.length;if(ye=Me[ye]?"cssFloat"in ge.style?"cssFloat":"styleFloat":ye,Be===3)return typeof we=="number"&&ne.test(ye)&&(we="".concat(we,"px")),ge.style[ye]=we,we;for(var ze in ye)ye.hasOwnProperty(ze)&&ce(ge,ze,ye[ze]);return Ce(ge)}function ae(ge){return ge===document.body?document.documentElement.clientWidth:ge.offsetWidth}function se(ge){return ge===document.body?window.innerHeight||document.documentElement.clientHeight:ge.offsetHeight}function ve(){var ge=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),ye=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:ge,height:ye}}function ue(){var ge=document.documentElement.clientWidth,ye=window.innerHeight||document.documentElement.clientHeight;return{width:ge,height:ye}}function pe(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function oe(ge){var ye=ge.getBoundingClientRect(),we=document.documentElement;return{left:ye.left+(window.pageXOffset||we.scrollLeft)-(we.clientLeft||document.body.clientLeft||0),top:ye.top+(window.pageYOffset||we.scrollTop)-(we.clientTop||document.body.clientTop||0)}}},24514:function(gn,kt,ee){"use strict";ee.d(kt,{G:function(){return Ce}});var ne=ee(47273),xe=function(he){if((0,ne.Z)()&&window.document.documentElement){var ce=Array.isArray(he)?he:[he],ae=window.document.documentElement;return ce.some(function(se){return se in ae.style})}return!1},Me=function(he,ce){if(!xe(he))return!1;var ae=document.createElement("div"),se=ae.style[he];return ae.style[he]=ce,ae.style[he]!==se};function Ce(fe,he){return!Array.isArray(fe)&&he!==void 0?Me(fe,he):xe(fe)}},48911:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return un}});var ne=ee(60499),xe=ee(43749),Me=ee(85899),Ce=ee(18642),fe=ee(72190),he=ee(42244),ce=ee(92310),ae=ee.n(ce),se=ee(29301),ve=ee(70425),ue=ee(34280),pe=ee(59301),oe=ee(4676),ge=pe.forwardRef(function(Xe,ke){var _e=Xe.height,Te=Xe.offsetY,Fe=Xe.offsetX,me=Xe.children,at=Xe.prefixCls,Pt=Xe.onInnerResize,Qe=Xe.innerProps,Je=Xe.rtl,xt=Xe.extra,ot={},mt={display:"flex",flexDirection:"column"};return Te!==void 0&&(ot={height:_e,position:"relative",overflow:"hidden"},mt=(0,Me.Z)((0,Me.Z)({},mt),{},(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({transform:"translateY(".concat(Te,"px)")},Je?"marginRight":"marginLeft",-Fe),"position","absolute"),"left",0),"right",0),"top",0))),pe.createElement("div",{style:ot},pe.createElement(se.Z,{onResize:function(rn){var It=rn.offsetHeight;It&&Pt&&Pt()}},pe.createElement("div",(0,ne.Z)({style:mt,className:ae()((0,Ce.Z)({},"".concat(at,"-holder-inner"),at)),ref:ke},Qe),me,xt)))});ge.displayName="Filler";var ye=ge;function we(Xe){var ke=Xe.children,_e=Xe.setRef,Te=pe.useCallback(function(Fe){_e(Fe)},[]);return pe.cloneElement(ke,{ref:Te})}function Be(Xe,ke,_e,Te,Fe,me,at,Pt){var Qe=Pt.getKey;return Xe.slice(ke,_e+1).map(function(Je,xt){var ot=ke+xt,mt=at(Je,ot,{style:{width:Te},offsetX:Fe}),Nt=Qe(Je);return pe.createElement(we,{key:Nt,setRef:function(It){return me(Je,It)}},mt)})}function ze(Xe,ke,_e,Te){var Fe=_e-Xe,me=ke-_e,at=Math.min(Fe,me)*2;if(Te<=at){var Pt=Math.floor(Te/2);return Te%2?_e+Pt+1:_e-Pt}return Fe>me?_e-(Te-me):_e+(Te-Fe)}function $e(Xe,ke,_e){var Te=Xe.length,Fe=ke.length,me,at;if(Te===0&&Fe===0)return null;Te<Fe?(me=Xe,at=ke):(me=ke,at=Xe);var Pt={__EMPTY_ITEM__:!0};function Qe(rn){return rn!==void 0?_e(rn):Pt}for(var Je=null,xt=Math.abs(Te-Fe)!==1,ot=0;ot<at.length;ot+=1){var mt=Qe(me[ot]),Nt=Qe(at[ot]);if(mt!==Nt){Je=ot,xt=xt||mt!==Qe(at[ot+1]);break}}return Je===null?null:{index:Je,multiple:xt}}function Le(Xe,ke,_e){var Te=pe.useState(Xe),Fe=(0,fe.Z)(Te,2),me=Fe[0],at=Fe[1],Pt=pe.useState(null),Qe=(0,fe.Z)(Pt,2),Je=Qe[0],xt=Qe[1];return pe.useEffect(function(){var ot=$e(me||[],Xe||[],ke);(ot==null?void 0:ot.index)!==void 0&&(_e==null||_e(ot.index),xt(Xe[ot.index])),at(Xe)},[Xe]),[Je]}var Ne=ee(16089),Re=(typeof navigator=="undefined"?"undefined":(0,xe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Se=Re,Ie=function(Xe,ke,_e,Te){var Fe=(0,pe.useRef)(!1),me=(0,pe.useRef)(null);function at(){clearTimeout(me.current),Fe.current=!0,me.current=setTimeout(function(){Fe.current=!1},50)}var Pt=(0,pe.useRef)({top:Xe,bottom:ke,left:_e,right:Te});return Pt.current.top=Xe,Pt.current.bottom=ke,Pt.current.left=_e,Pt.current.right=Te,function(Qe,Je){var xt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ot=Qe?Je<0&&Pt.current.left||Je>0&&Pt.current.right:Je<0&&Pt.current.top||Je>0&&Pt.current.bottom;return xt&&ot?(clearTimeout(me.current),Fe.current=!1):(!ot||Fe.current)&&at(),!Fe.current&&ot}};function Ae(Xe,ke,_e,Te,Fe,me,at){var Pt=(0,pe.useRef)(0),Qe=(0,pe.useRef)(null),Je=(0,pe.useRef)(null),xt=(0,pe.useRef)(!1),ot=Ie(ke,_e,Te,Fe);function mt(At,Lt){if(Ne.Z.cancel(Qe.current),!ot(!1,Lt)){var qt=At;if(!qt._virtualHandled)qt._virtualHandled=!0;else return;Pt.current+=Lt,Je.current=Lt,Se||qt.preventDefault(),Qe.current=(0,Ne.Z)(function(){var Tn=xt.current?10:1;at(Pt.current*Tn,!1),Pt.current=0})}}function Nt(At,Lt){at(Lt,!0),Se||At.preventDefault()}var rn=(0,pe.useRef)(null),It=(0,pe.useRef)(null);function Qt(At){if(Xe){Ne.Z.cancel(It.current),It.current=(0,Ne.Z)(function(){rn.current=null},2);var Lt=At.deltaX,qt=At.deltaY,Tn=At.shiftKey,Jt=Lt,On=qt;(rn.current==="sx"||!rn.current&&Tn&&qt&&!Lt)&&(Jt=qt,On=0,rn.current="sx");var zn=Math.abs(Jt),qn=Math.abs(On);rn.current===null&&(rn.current=me&&zn>qn?"x":"y"),rn.current==="y"?mt(At,On):Nt(At,Jt)}}function dn(At){Xe&&(xt.current=At.detail===Je.current)}return[Qt,dn]}function it(Xe,ke,_e,Te){var Fe=pe.useMemo(function(){return[new Map,[]]},[Xe,_e.id,Te]),me=(0,fe.Z)(Fe,2),at=me[0],Pt=me[1],Qe=function(xt){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xt,mt=at.get(xt),Nt=at.get(ot);if(mt===void 0||Nt===void 0)for(var rn=Xe.length,It=Pt.length;It<rn;It+=1){var Qt,dn=Xe[It],At=ke(dn);at.set(At,It);var Lt=(Qt=_e.get(At))!==null&&Qt!==void 0?Qt:Te;if(Pt[It]=(Pt[It-1]||0)+Lt,At===xt&&(mt=It),At===ot&&(Nt=It),mt!==void 0&&Nt!==void 0)break}return{top:Pt[mt-1]||0,bottom:Pt[Nt]}};return Qe}var Ue=ee(38705),gt=ee(17212),Ve=function(){function Xe(){(0,Ue.Z)(this,Xe),(0,Ce.Z)(this,"maps",void 0),(0,Ce.Z)(this,"id",0),(0,Ce.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,gt.Z)(Xe,[{key:"set",value:function(_e,Te){this.diffRecords.set(_e,this.maps[_e]),this.maps[_e]=Te,this.id+=1}},{key:"get",value:function(_e){return this.maps[_e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Xe}(),Tt=Ve;function ct(Xe){var ke=parseFloat(Xe);return isNaN(ke)?0:ke}function Ot(Xe,ke,_e){var Te=pe.useState(0),Fe=(0,fe.Z)(Te,2),me=Fe[0],at=Fe[1],Pt=(0,pe.useRef)(new Map),Qe=(0,pe.useRef)(new Tt),Je=(0,pe.useRef)(0);function xt(){Je.current+=1}function ot(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;xt();var rn=function(){var dn=!1;Pt.current.forEach(function(At,Lt){if(At&&At.offsetParent){var qt=At.offsetHeight,Tn=getComputedStyle(At),Jt=Tn.marginTop,On=Tn.marginBottom,zn=ct(Jt),qn=ct(On),Xn=qt+zn+qn;Qe.current.get(Lt)!==Xn&&(Qe.current.set(Lt,Xn),dn=!0)}}),dn&&at(function(At){return At+1})};if(Nt)rn();else{Je.current+=1;var It=Je.current;Promise.resolve().then(function(){It===Je.current&&rn()})}}function mt(Nt,rn){var It=Xe(Nt),Qt=Pt.current.get(It);rn?(Pt.current.set(It,rn),ot()):Pt.current.delete(It),!Qt!=!rn&&(rn?ke==null||ke(Nt):_e==null||_e(Nt))}return(0,pe.useEffect)(function(){return xt},[]),[mt,ot,Qe.current,me]}var We=14/15;function lt(Xe,ke,_e){var Te=(0,pe.useRef)(!1),Fe=(0,pe.useRef)(0),me=(0,pe.useRef)(0),at=(0,pe.useRef)(null),Pt=(0,pe.useRef)(null),Qe,Je=function(Nt){if(Te.current){var rn=Math.ceil(Nt.touches[0].pageX),It=Math.ceil(Nt.touches[0].pageY),Qt=Fe.current-rn,dn=me.current-It,At=Math.abs(Qt)>Math.abs(dn);At?Fe.current=rn:me.current=It;var Lt=_e(At,At?Qt:dn,!1,Nt);Lt&&Nt.preventDefault(),clearInterval(Pt.current),Lt&&(Pt.current=setInterval(function(){At?Qt*=We:dn*=We;var qt=Math.floor(At?Qt:dn);(!_e(At,qt,!0)||Math.abs(qt)<=.1)&&clearInterval(Pt.current)},16))}},xt=function(){Te.current=!1,Qe()},ot=function(Nt){Qe(),Nt.touches.length===1&&!Te.current&&(Te.current=!0,Fe.current=Math.ceil(Nt.touches[0].pageX),me.current=Math.ceil(Nt.touches[0].pageY),at.current=Nt.target,at.current.addEventListener("touchmove",Je,{passive:!1}),at.current.addEventListener("touchend",xt,{passive:!0}))};Qe=function(){at.current&&(at.current.removeEventListener("touchmove",Je),at.current.removeEventListener("touchend",xt))},(0,ue.Z)(function(){return Xe&&ke.current.addEventListener("touchstart",ot,{passive:!0}),function(){var mt;(mt=ke.current)===null||mt===void 0||mt.removeEventListener("touchstart",ot),Qe(),clearInterval(Pt.current)}},[Xe])}function ut(Xe){return Math.floor(Math.pow(Xe,.5))}function St(Xe,ke){var _e="touches"in Xe?Xe.touches[0]:Xe;return _e[ke?"pageX":"pageY"]-window[ke?"scrollX":"scrollY"]}function qe(Xe,ke,_e){pe.useEffect(function(){var Te=ke.current;if(Xe&&Te){var Fe=!1,me,at,Pt=function(){Ne.Z.cancel(me)},Qe=function mt(){Pt(),me=(0,Ne.Z)(function(){_e(at),mt()})},Je=function(){Fe=!1,Pt()},xt=function(Nt){if(!(Nt.target.draggable||Nt.button!==0)){var rn=Nt;rn._virtualHandled||(rn._virtualHandled=!0,Fe=!0)}},ot=function(Nt){if(Fe){var rn=St(Nt,!1),It=Te.getBoundingClientRect(),Qt=It.top,dn=It.bottom;if(rn<=Qt){var At=Qt-rn;at=-ut(At),Qe()}else if(rn>=dn){var Lt=rn-dn;at=ut(Lt),Qe()}else Pt()}};return Te.addEventListener("mousedown",xt),Te.ownerDocument.addEventListener("mouseup",Je),Te.ownerDocument.addEventListener("mousemove",ot),Te.ownerDocument.addEventListener("dragend",Je),function(){Te.removeEventListener("mousedown",xt),Te.ownerDocument.removeEventListener("mouseup",Je),Te.ownerDocument.removeEventListener("mousemove",ot),Te.ownerDocument.removeEventListener("dragend",Je),Pt()}}},[Xe])}var Ze=10;function wt(Xe,ke,_e,Te,Fe,me,at,Pt){var Qe=pe.useRef(),Je=pe.useState(null),xt=(0,fe.Z)(Je,2),ot=xt[0],mt=xt[1];return(0,ue.Z)(function(){if(ot&&ot.times<Ze){if(!Xe.current){mt(function(si){return(0,Me.Z)({},si)});return}me();var Nt=ot.targetAlign,rn=ot.originAlign,It=ot.index,Qt=ot.offset,dn=Xe.current.clientHeight,At=!1,Lt=Nt,qt=null;if(dn){for(var Tn=Nt||rn,Jt=0,On=0,zn=0,qn=Math.min(ke.length-1,It),Xn=0;Xn<=qn;Xn+=1){var vr=Fe(ke[Xn]);On=Jt;var _r=_e.get(vr);zn=On+(_r===void 0?Te:_r),Jt=zn}for(var Qn=Tn==="top"?Qt:dn-Qt,Cr=qn;Cr>=0;Cr-=1){var ni=Fe(ke[Cr]),Jr=_e.get(ni);if(Jr===void 0){At=!0;break}if(Qn-=Jr,Qn<=0)break}switch(Tn){case"top":qt=On-Qt;break;case"bottom":qt=zn-dn+Qt;break;default:{var Yn=Xe.current.scrollTop,mr=Yn+dn;On<Yn?Lt="top":zn>mr&&(Lt="bottom")}}qt!==null&&at(qt),qt!==ot.lastTop&&(At=!0)}At&&mt((0,Me.Z)((0,Me.Z)({},ot),{},{times:ot.times+1,targetAlign:Lt,lastTop:qt}))}},[ot,Xe.current]),function(Nt){if(Nt==null){Pt();return}if(Ne.Z.cancel(Qe.current),typeof Nt=="number")at(Nt);else if(Nt&&(0,xe.Z)(Nt)==="object"){var rn,It=Nt.align;"index"in Nt?rn=Nt.index:rn=ke.findIndex(function(At){return Fe(At)===Nt.key});var Qt=Nt.offset,dn=Qt===void 0?0:Qt;mt({times:0,index:rn,offset:dn,originAlign:It})}}}var Wt=pe.forwardRef(function(Xe,ke){var _e=Xe.prefixCls,Te=Xe.rtl,Fe=Xe.scrollOffset,me=Xe.scrollRange,at=Xe.onStartMove,Pt=Xe.onStopMove,Qe=Xe.onScroll,Je=Xe.horizontal,xt=Xe.spinSize,ot=Xe.containerSize,mt=Xe.style,Nt=Xe.thumbStyle,rn=Xe.showScrollBar,It=pe.useState(!1),Qt=(0,fe.Z)(It,2),dn=Qt[0],At=Qt[1],Lt=pe.useState(null),qt=(0,fe.Z)(Lt,2),Tn=qt[0],Jt=qt[1],On=pe.useState(null),zn=(0,fe.Z)(On,2),qn=zn[0],Xn=zn[1],vr=!Te,_r=pe.useRef(),Qn=pe.useRef(),Cr=pe.useState(rn),ni=(0,fe.Z)(Cr,2),Jr=ni[0],Yn=ni[1],mr=pe.useRef(),si=function(){rn===!0||rn===!1||(clearTimeout(mr.current),Yn(!0),mr.current=setTimeout(function(){Yn(!1)},3e3))},or=me-ot||0,ii=ot-xt||0,ki=pe.useMemo(function(){if(Fe===0||or===0)return 0;var Oe=Fe/or;return Oe*ii},[Fe,or,ii]),gi=function(De){De.stopPropagation(),De.preventDefault()},Li=pe.useRef({top:ki,dragging:dn,pageY:Tn,startTop:qn});Li.current={top:ki,dragging:dn,pageY:Tn,startTop:qn};var ui=function(De){At(!0),Jt(St(De,Je)),Xn(Li.current.top),at(),De.stopPropagation(),De.preventDefault()};pe.useEffect(function(){var Oe=function(rt){rt.preventDefault()},De=_r.current,Ke=Qn.current;return De.addEventListener("touchstart",Oe,{passive:!1}),Ke.addEventListener("touchstart",ui,{passive:!1}),function(){De.removeEventListener("touchstart",Oe),Ke.removeEventListener("touchstart",ui)}},[]);var dr=pe.useRef();dr.current=or;var Hr=pe.useRef();Hr.current=ii,pe.useEffect(function(){if(dn){var Oe,De=function(rt){var Dt=Li.current,Ft=Dt.dragging,Bt=Dt.pageY,Ct=Dt.startTop;Ne.Z.cancel(Oe);var Ht=_r.current.getBoundingClientRect(),Ut=ot/(Je?Ht.width:Ht.height);if(Ft){var on=(St(rt,Je)-Bt)*Ut,cn=Ct;!vr&&Je?cn-=on:cn+=on;var Rt=dr.current,Vt=Hr.current,In=Vt?cn/Vt:0,wn=Math.ceil(In*Rt);wn=Math.max(wn,0),wn=Math.min(wn,Rt),Oe=(0,Ne.Z)(function(){Qe(wn,Je)})}},Ke=function(){At(!1),Pt()};return window.addEventListener("mousemove",De,{passive:!0}),window.addEventListener("touchmove",De,{passive:!0}),window.addEventListener("mouseup",Ke,{passive:!0}),window.addEventListener("touchend",Ke,{passive:!0}),function(){window.removeEventListener("mousemove",De),window.removeEventListener("touchmove",De),window.removeEventListener("mouseup",Ke),window.removeEventListener("touchend",Ke),Ne.Z.cancel(Oe)}}},[dn]),pe.useEffect(function(){return si(),function(){clearTimeout(mr.current)}},[Fe]),pe.useImperativeHandle(ke,function(){return{delayHidden:si}});var Cn="".concat(_e,"-scrollbar"),Ee={position:"absolute",visibility:Jr?null:"hidden"},je={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Je?(Object.assign(Ee,{height:8,left:0,right:0,bottom:0}),Object.assign(je,(0,Ce.Z)({height:"100%",width:xt},vr?"left":"right",ki))):(Object.assign(Ee,(0,Ce.Z)({width:8,top:0,bottom:0},vr?"right":"left",0)),Object.assign(je,{width:"100%",height:xt,top:ki})),pe.createElement("div",{ref:_r,className:ae()(Cn,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(Cn,"-horizontal"),Je),"".concat(Cn,"-vertical"),!Je),"".concat(Cn,"-visible"),Jr)),style:(0,Me.Z)((0,Me.Z)({},Ee),mt),onMouseDown:gi,onMouseMove:si},pe.createElement("div",{ref:Qn,className:ae()("".concat(Cn,"-thumb"),(0,Ce.Z)({},"".concat(Cn,"-thumb-moving"),dn)),style:(0,Me.Z)((0,Me.Z)({},je),Nt),onMouseDown:ui}))}),Kt=Wt,_t=20;function vt(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_e=Xe/ke*Xe;return isNaN(_e)&&(_e=0),_e=Math.max(_e,_t),Math.floor(_e)}var jt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],yn=[],Xt={overflowY:"auto",overflowAnchor:"none"};function Ln(Xe,ke){var _e=Xe.prefixCls,Te=_e===void 0?"rc-virtual-list":_e,Fe=Xe.className,me=Xe.height,at=Xe.itemHeight,Pt=Xe.fullHeight,Qe=Pt===void 0?!0:Pt,Je=Xe.style,xt=Xe.data,ot=Xe.children,mt=Xe.itemKey,Nt=Xe.virtual,rn=Xe.direction,It=Xe.scrollWidth,Qt=Xe.component,dn=Qt===void 0?"div":Qt,At=Xe.onScroll,Lt=Xe.onVirtualScroll,qt=Xe.onVisibleChange,Tn=Xe.innerProps,Jt=Xe.extraRender,On=Xe.styles,zn=Xe.showScrollBar,qn=zn===void 0?"optional":zn,Xn=(0,he.Z)(Xe,jt),vr=pe.useCallback(function(Fr){return typeof mt=="function"?mt(Fr):Fr==null?void 0:Fr[mt]},[mt]),_r=Ot(vr,null,null),Qn=(0,fe.Z)(_r,4),Cr=Qn[0],ni=Qn[1],Jr=Qn[2],Yn=Qn[3],mr=!!(Nt!==!1&&me&&at),si=pe.useMemo(function(){return Object.values(Jr.maps).reduce(function(Fr,Nr){return Fr+Nr},0)},[Jr.id,Jr.maps]),or=mr&&xt&&(Math.max(at*xt.length,si)>me||!!It),ii=rn==="rtl",ki=ae()(Te,(0,Ce.Z)({},"".concat(Te,"-rtl"),ii),Fe),gi=xt||yn,Li=(0,pe.useRef)(),ui=(0,pe.useRef)(),dr=(0,pe.useRef)(),Hr=(0,pe.useState)(0),Cn=(0,fe.Z)(Hr,2),Ee=Cn[0],je=Cn[1],Oe=(0,pe.useState)(0),De=(0,fe.Z)(Oe,2),Ke=De[0],et=De[1],rt=(0,pe.useState)(!1),Dt=(0,fe.Z)(rt,2),Ft=Dt[0],Bt=Dt[1],Ct=function(){Bt(!0)},Ht=function(){Bt(!1)},Ut={getKey:vr};function on(Fr){je(function(Nr){var bi;typeof Fr=="function"?bi=Fr(Nr):bi=Fr;var hi=fr(bi);return Li.current.scrollTop=hi,hi})}var cn=(0,pe.useRef)({start:0,end:gi.length}),Rt=(0,pe.useRef)(),Vt=Le(gi,vr),In=(0,fe.Z)(Vt,1),wn=In[0];Rt.current=wn;var Nn=pe.useMemo(function(){if(!mr)return{scrollHeight:void 0,start:0,end:gi.length-1,offset:void 0};if(!or){var Fr;return{scrollHeight:((Fr=ui.current)===null||Fr===void 0?void 0:Fr.offsetHeight)||0,start:0,end:gi.length-1,offset:void 0}}for(var Nr=0,bi,hi,Xi,mo=gi.length,Co=0;Co<mo;Co+=1){var ji=gi[Co],_o=vr(ji),vo=Jr.get(_o),Er=Nr+(vo===void 0?at:vo);Er>=Ee&&bi===void 0&&(bi=Co,hi=Nr),Er>Ee+me&&Xi===void 0&&(Xi=Co),Nr=Er}return bi===void 0&&(bi=0,hi=0,Xi=Math.ceil(me/at)),Xi===void 0&&(Xi=gi.length-1),Xi=Math.min(Xi+1,gi.length-1),{scrollHeight:Nr,start:bi,end:Xi,offset:hi}},[or,mr,Ee,gi,Yn,me]),Rn=Nn.scrollHeight,Jn=Nn.start,Sn=Nn.end,Un=Nn.offset;cn.current.start=Jn,cn.current.end=Sn,pe.useLayoutEffect(function(){var Fr=Jr.getRecord();if(Fr.size===1){var Nr=Array.from(Fr.keys())[0],bi=Fr.get(Nr),hi=gi[Jn];if(hi&&bi===void 0){var Xi=vr(hi);if(Xi===Nr){var mo=Jr.get(Nr),Co=mo-at;on(function(ji){return ji+Co})}}}Jr.resetRecord()},[Rn]);var zt=pe.useState({width:0,height:me}),fn=(0,fe.Z)(zt,2),vn=fn[0],An=fn[1],En=function(Nr){An({width:Nr.offsetWidth,height:Nr.offsetHeight})},kn=(0,pe.useRef)(),Mn=(0,pe.useRef)(),Bn=pe.useMemo(function(){return vt(vn.width,It)},[vn.width,It]),Kn=pe.useMemo(function(){return vt(vn.height,Rn)},[vn.height,Rn]),Vn=Rn-me,cr=(0,pe.useRef)(Vn);cr.current=Vn;function fr(Fr){var Nr=Fr;return Number.isNaN(cr.current)||(Nr=Math.min(Nr,cr.current)),Nr=Math.max(Nr,0),Nr}var $r=Ee<=0,Mr=Ee>=Vn,wr=Ke<=0,ei=Ke>=It,Xr=Ie($r,Mr,wr,ei),Zr=function(){return{x:ii?-Ke:Ke,y:Ee}},Lr=(0,pe.useRef)(Zr()),Or=(0,ve.useEvent)(function(Fr){if(Lt){var Nr=(0,Me.Z)((0,Me.Z)({},Zr()),Fr);(Lr.current.x!==Nr.x||Lr.current.y!==Nr.y)&&(Lt(Nr),Lr.current=Nr)}});function Wr(Fr,Nr){var bi=Fr;Nr?((0,oe.flushSync)(function(){et(bi)}),Or()):on(bi)}function Pr(Fr){var Nr=Fr.currentTarget.scrollTop;Nr!==Ee&&on(Nr),At==null||At(Fr),Or()}var di=function(Nr){var bi=Nr,hi=It?It-vn.width:0;return bi=Math.max(bi,0),bi=Math.min(bi,hi),bi},Ri=(0,ve.useEvent)(function(Fr,Nr){Nr?((0,oe.flushSync)(function(){et(function(bi){var hi=bi+(ii?-Fr:Fr);return di(hi)})}),Or()):on(function(bi){var hi=bi+Fr;return hi})}),Vr=Ae(mr,$r,Mr,wr,ei,!!It,Ri),er=(0,fe.Z)(Vr,2),Zn=er[0],Dr=er[1];lt(mr,Li,function(Fr,Nr,bi,hi){var Xi=hi;return Xr(Fr,Nr,bi)?!1:!Xi||!Xi._virtualHandled?(Xi&&(Xi._virtualHandled=!0),Zn({preventDefault:function(){},deltaX:Fr?Nr:0,deltaY:Fr?0:Nr}),!0):!1}),qe(or,Li,function(Fr){on(function(Nr){return Nr+Fr})}),(0,ue.Z)(function(){function Fr(bi){var hi=$r&&bi.detail<0,Xi=Mr&&bi.detail>0;mr&&!hi&&!Xi&&bi.preventDefault()}var Nr=Li.current;return Nr.addEventListener("wheel",Zn,{passive:!1}),Nr.addEventListener("DOMMouseScroll",Dr,{passive:!0}),Nr.addEventListener("MozMousePixelScroll",Fr,{passive:!1}),function(){Nr.removeEventListener("wheel",Zn),Nr.removeEventListener("DOMMouseScroll",Dr),Nr.removeEventListener("MozMousePixelScroll",Fr)}},[mr,$r,Mr]),(0,ue.Z)(function(){if(It){var Fr=di(Ke);et(Fr),Or({x:Fr})}},[vn.width,It]);var Sr=function(){var Nr,bi;(Nr=kn.current)===null||Nr===void 0||Nr.delayHidden(),(bi=Mn.current)===null||bi===void 0||bi.delayHidden()},ri=wt(Li,gi,Jr,at,vr,function(){return ni(!0)},on,Sr);pe.useImperativeHandle(ke,function(){return{nativeElement:dr.current,getScrollInfo:Zr,scrollTo:function(Nr){function bi(hi){return hi&&(0,xe.Z)(hi)==="object"&&("left"in hi||"top"in hi)}bi(Nr)?(Nr.left!==void 0&&et(di(Nr.left)),ri(Nr.top)):ri(Nr)}}}),(0,ue.Z)(function(){if(qt){var Fr=gi.slice(Jn,Sn+1);qt(Fr,gi)}},[Jn,Sn,gi]);var yi=it(gi,vr,Jr,at),jr=Jt==null?void 0:Jt({start:Jn,end:Sn,virtual:or,offsetX:Ke,offsetY:Un,rtl:ii,getSize:yi}),Bi=Be(gi,Jn,Sn,It,Ke,Cr,ot,Ut),_i=null;me&&(_i=(0,Me.Z)((0,Ce.Z)({},Qe?"height":"maxHeight",me),Xt),mr&&(_i.overflowY="hidden",It&&(_i.overflowX="hidden"),Ft&&(_i.pointerEvents="none")));var oo={};return ii&&(oo.dir="rtl"),pe.createElement("div",(0,ne.Z)({ref:dr,style:(0,Me.Z)((0,Me.Z)({},Je),{},{position:"relative"}),className:ki},oo,Xn),pe.createElement(se.Z,{onResize:En},pe.createElement(dn,{className:"".concat(Te,"-holder"),style:_i,ref:Li,onScroll:Pr,onMouseEnter:Sr},pe.createElement(ye,{prefixCls:Te,height:Rn,offsetX:Ke,offsetY:Un,scrollWidth:It,onInnerResize:ni,ref:ui,innerProps:Tn,rtl:ii,extra:jr},Bi))),or&&Rn>me&&pe.createElement(Kt,{ref:kn,prefixCls:Te,scrollOffset:Ee,scrollRange:Rn,rtl:ii,onScroll:Wr,onStartMove:Ct,onStopMove:Ht,spinSize:Kn,containerSize:vn.height,style:On==null?void 0:On.verticalScrollBar,thumbStyle:On==null?void 0:On.verticalScrollBarThumb,showScrollBar:qn}),or&&It>vn.width&&pe.createElement(Kt,{ref:Mn,prefixCls:Te,scrollOffset:Ke,scrollRange:It,rtl:ii,onScroll:Wr,onStartMove:Ct,onStopMove:Ht,spinSize:Bn,containerSize:vn.width,horizontal:!0,style:On==null?void 0:On.horizontalScrollBar,thumbStyle:On==null?void 0:On.horizontalScrollBarThumb,showScrollBar:qn}))}var pn=pe.forwardRef(Ln);pn.displayName="List";var hn=pn,un=hn},7062:function(gn,kt,ee){var ne=ee(19637),xe=ee(97573),Me=[ee(96627)];gn.exports=ne.createStore(xe,Me)},96627:function(gn,kt,ee){gn.exports=ne;function ne(){return ee(42424),{}}},42424:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(gn){return gn<10?"0"+gn:gn}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(gn){return rx_escapable.lastIndex=0,rx_escapable.test(gn)?'"'+gn.replace(rx_escapable,function(kt){var ee=meta[kt];return typeof ee=="string"?ee:"\\u"+("0000"+kt.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+gn+'"'}function str(gn,kt){var ee,ne,xe,Me,Ce=gap,fe,he=kt[gn];switch(he&&typeof he=="object"&&typeof he.toJSON=="function"&&(he=he.toJSON(gn)),typeof rep=="function"&&(he=rep.call(kt,gn,he)),typeof he){case"string":return quote(he);case"number":return isFinite(he)?String(he):"null";case"boolean":case"null":return String(he);case"object":if(!he)return"null";if(gap+=indent,fe=[],Object.prototype.toString.apply(he)==="[object Array]"){for(Me=he.length,ee=0;ee<Me;ee+=1)fe[ee]=str(ee,he)||"null";return xe=fe.length===0?"[]":gap?`[
`+gap+fe.join(`,
`+gap)+`
`+Ce+"]":"["+fe.join(",")+"]",gap=Ce,xe}if(rep&&typeof rep=="object")for(Me=rep.length,ee=0;ee<Me;ee+=1)typeof rep[ee]=="string"&&(ne=rep[ee],xe=str(ne,he),xe&&fe.push(quote(ne)+(gap?": ":":")+xe));else for(ne in he)Object.prototype.hasOwnProperty.call(he,ne)&&(xe=str(ne,he),xe&&fe.push(quote(ne)+(gap?": ":":")+xe));return xe=fe.length===0?"{}":gap?`{
`+gap+fe.join(`,
`+gap)+`
`+Ce+"}":"{"+fe.join(",")+"}",gap=Ce,xe}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(gn,kt,ee){var ne;if(gap="",indent="",typeof ee=="number")for(ne=0;ne<ee;ne+=1)indent+=" ";else typeof ee=="string"&&(indent=ee);if(rep=kt,kt&&typeof kt!="function"&&(typeof kt!="object"||typeof kt.length!="number"))throw new Error("JSON.stringify");return str("",{"":gn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(gn,kt){var ee,ne,xe=gn[kt];if(xe&&typeof xe=="object")for(ee in xe)Object.prototype.hasOwnProperty.call(xe,ee)&&(ne=walk(xe,ee),ne!==void 0?xe[ee]=ne:delete xe[ee]);return reviver.call(gn,kt,xe)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(gn){return"\\u"+("0000"+gn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(gn,kt,ee){var ne=ee(67039),xe=ne.slice,Me=ne.pluck,Ce=ne.each,fe=ne.bind,he=ne.create,ce=ne.isList,ae=ne.isFunction,se=ne.isObject;gn.exports={createStore:pe};var ve={version:"2.0.12",enabled:!1,get:function(oe,ge){var ye=this.storage.read(this._namespacePrefix+oe);return this._deserialize(ye,ge)},set:function(oe,ge){return ge===void 0?this.remove(oe):(this.storage.write(this._namespacePrefix+oe,this._serialize(ge)),ge)},remove:function(oe){this.storage.remove(this._namespacePrefix+oe)},each:function(oe){var ge=this;this.storage.each(function(ye,we){oe.call(ge,ge._deserialize(ye),(we||"").replace(ge._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(oe){return this._namespacePrefix=="__storejs_"+oe+"_"},createStore:function(){return pe.apply(this,arguments)},addPlugin:function(oe){this._addPlugin(oe)},namespace:function(oe){return pe(this.storage,this.plugins,oe)}};function ue(){var oe=typeof console=="undefined"?null:console;if(oe){var ge=oe.warn?oe.warn:oe.log;ge.apply(oe,arguments)}}function pe(oe,ge,ye){ye||(ye=""),oe&&!ce(oe)&&(oe=[oe]),ge&&!ce(ge)&&(ge=[ge]);var we=ye?"__storejs_"+ye+"_":"",Be=ye?new RegExp("^"+we):null,ze=/^[a-zA-Z0-9_\-]*$/;if(!ze.test(ye))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var $e={_namespacePrefix:we,_namespaceRegexp:Be,_testStorage:function(Ne){try{var Re="__storejs__test__";Ne.write(Re,Re);var Se=Ne.read(Re)===Re;return Ne.remove(Re),Se}catch(Ie){return!1}},_assignPluginFnProp:function(Ne,Re){var Se=this[Re];this[Re]=function(){var Ae=xe(arguments,0),it=this;function Ue(){if(Se)return Ce(arguments,function(Ve,Tt){Ae[Tt]=Ve}),Se.apply(it,Ae)}var gt=[Ue].concat(Ae);return Ne.apply(it,gt)}},_serialize:function(Ne){return JSON.stringify(Ne)},_deserialize:function(Ne,Re){if(!Ne)return Re;var Se="";try{Se=JSON.parse(Ne)}catch(Ie){Se=Ne}return Se!==void 0?Se:Re},_addStorage:function(Ne){this.enabled||this._testStorage(Ne)&&(this.storage=Ne,this.enabled=!0)},_addPlugin:function(Ne){var Re=this;if(ce(Ne)){Ce(Ne,function(Ae){Re._addPlugin(Ae)});return}var Se=Me(this.plugins,function(Ae){return Ne===Ae});if(!Se){if(this.plugins.push(Ne),!ae(Ne))throw new Error("Plugins must be function values that return objects");var Ie=Ne.call(this);if(!se(Ie))throw new Error("Plugins must return an object of function properties");Ce(Ie,function(Ae,it){if(!ae(Ae))throw new Error("Bad plugin property: "+it+" from plugin "+Ne.name+". Plugins should only return functions.");Re._assignPluginFnProp(Ae,it)})}},addStorage:function(Ne){ue("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(Ne)}},Le=he($e,ve,{plugins:[]});return Le.raw={},Ce(Le,function(Ne,Re){ae(Ne)&&(Le.raw[Re]=fe(Le,Ne))}),Ce(oe,function(Ne){Le._addStorage(Ne)}),Ce(ge,function(Ne){Le._addPlugin(Ne)}),Le}},67039:function(gn,kt,ee){var ne=fe(),xe=he(),Me=ce(),Ce=typeof window!="undefined"?window:ee.g;gn.exports={assign:ne,create:xe,trim:Me,bind:ae,slice:se,each:ve,map:ue,pluck:pe,isList:oe,isFunction:ge,isObject:ye,Global:Ce};function fe(){return Object.assign?Object.assign:function(Be,ze,$e,Le){for(var Ne=1;Ne<arguments.length;Ne++)ve(Object(arguments[Ne]),function(Re,Se){Be[Se]=Re});return Be}}function he(){if(Object.create)return function(ze,$e,Le,Ne){var Re=se(arguments,1);return ne.apply(this,[Object.create(ze)].concat(Re))};{let Be=function(){};var we=Be;return function($e,Le,Ne,Re){var Se=se(arguments,1);return Be.prototype=$e,ne.apply(this,[new Be].concat(Se))}}}function ce(){return String.prototype.trim?function(Be){return String.prototype.trim.call(Be)}:function(Be){return Be.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ae(we,Be){return function(){return Be.apply(we,Array.prototype.slice.call(arguments,0))}}function se(we,Be){return Array.prototype.slice.call(we,Be||0)}function ve(we,Be){pe(we,function(ze,$e){return Be(ze,$e),!1})}function ue(we,Be){var ze=oe(we)?[]:{};return pe(we,function($e,Le){return ze[Le]=Be($e,Le),!1}),ze}function pe(we,Be){if(oe(we)){for(var ze=0;ze<we.length;ze++)if(Be(we[ze],ze))return we[ze]}else for(var $e in we)if(we.hasOwnProperty($e)&&Be(we[$e],$e))return we[$e]}function oe(we){return we!=null&&typeof we!="function"&&typeof we.length=="number"}function ge(we){return we&&{}.toString.call(we)==="[object Function]"}function ye(we){return we&&{}.toString.call(we)==="[object Object]"}},97573:function(gn,kt,ee){gn.exports=[ee(52496),ee(16436),ee(76673),ee(35701),ee(65578),ee(65300)]},35701:function(gn,kt,ee){var ne=ee(67039),xe=ne.Global,Me=ne.trim;gn.exports={name:"cookieStorage",read:fe,write:ce,each:he,remove:ae,clearAll:se};var Ce=xe.document;function fe(ue){if(!ue||!ve(ue))return null;var pe="(?:^|.*;\\s*)"+escape(ue).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Ce.cookie.replace(new RegExp(pe),"$1"))}function he(ue){for(var pe=Ce.cookie.split(/; ?/g),oe=pe.length-1;oe>=0;oe--)if(Me(pe[oe])){var ge=pe[oe].split("="),ye=unescape(ge[0]),we=unescape(ge[1]);ue(we,ye)}}function ce(ue,pe){ue&&(Ce.cookie=escape(ue)+"="+escape(pe)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ae(ue){!ue||!ve(ue)||(Ce.cookie=escape(ue)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function se(){he(function(ue,pe){ae(pe)})}function ve(ue){return new RegExp("(?:^|;\\s*)"+escape(ue).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Ce.cookie)}},52496:function(gn,kt,ee){var ne=ee(67039),xe=ne.Global;gn.exports={name:"localStorage",read:Ce,write:fe,each:he,remove:ce,clearAll:ae};function Me(){return xe.localStorage}function Ce(se){return Me().getItem(se)}function fe(se,ve){return Me().setItem(se,ve)}function he(se){for(var ve=Me().length-1;ve>=0;ve--){var ue=Me().key(ve);se(Ce(ue),ue)}}function ce(se){return Me().removeItem(se)}function ae(){return Me().clear()}},65300:function(gn){gn.exports={name:"memoryStorage",read:ee,write:ne,each:xe,remove:Me,clearAll:Ce};var kt={};function ee(fe){return kt[fe]}function ne(fe,he){kt[fe]=he}function xe(fe){for(var he in kt)kt.hasOwnProperty(he)&&fe(kt[he],he)}function Me(fe){delete kt[fe]}function Ce(fe){kt={}}},16436:function(gn,kt,ee){var ne=ee(67039),xe=ne.Global;gn.exports={name:"oldFF-globalStorage",read:Ce,write:fe,each:he,remove:ce,clearAll:ae};var Me=xe.globalStorage;function Ce(se){return Me[se]}function fe(se,ve){Me[se]=ve}function he(se){for(var ve=Me.length-1;ve>=0;ve--){var ue=Me.key(ve);se(Me[ue],ue)}}function ce(se){return Me.removeItem(se)}function ae(){he(function(se,ve){delete Me[se]})}},76673:function(gn,kt,ee){var ne=ee(67039),xe=ne.Global;gn.exports={name:"oldIE-userDataStorage",write:ce,read:ae,each:se,remove:ve,clearAll:ue};var Me="storejs",Ce=xe.document,fe=ge(),he=(xe.navigator?xe.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function ce(ye,we){if(!he){var Be=oe(ye);fe(function(ze){ze.setAttribute(Be,we),ze.save(Me)})}}function ae(ye){if(!he){var we=oe(ye),Be=null;return fe(function(ze){Be=ze.getAttribute(we)}),Be}}function se(ye){fe(function(we){for(var Be=we.XMLDocument.documentElement.attributes,ze=Be.length-1;ze>=0;ze--){var $e=Be[ze];ye(we.getAttribute($e.name),$e.name)}})}function ve(ye){var we=oe(ye);fe(function(Be){Be.removeAttribute(we),Be.save(Me)})}function ue(){fe(function(ye){var we=ye.XMLDocument.documentElement.attributes;ye.load(Me);for(var Be=we.length-1;Be>=0;Be--)ye.removeAttribute(we[Be].name);ye.save(Me)})}var pe=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function oe(ye){return ye.replace(/^\d/,"___$&").replace(pe,"___")}function ge(){if(!Ce||!Ce.documentElement||!Ce.documentElement.addBehavior)return null;var ye="script",we,Be,ze;try{Be=new ActiveXObject("htmlfile"),Be.open(),Be.write("<"+ye+">document.w=window</"+ye+'><iframe src="/favicon.ico"></iframe>'),Be.close(),we=Be.w.frames[0].document,ze=we.createElement("div")}catch($e){ze=Ce.createElement("div"),we=Ce.body}return function($e){var Le=[].slice.call(arguments,0);Le.unshift(ze),we.appendChild(ze),ze.addBehavior("#default#userData"),ze.load(Me),$e.apply(this,Le),we.removeChild(ze)}}},65578:function(gn,kt,ee){var ne=ee(67039),xe=ne.Global;gn.exports={name:"sessionStorage",read:Ce,write:fe,each:he,remove:ce,clearAll:ae};function Me(){return xe.sessionStorage}function Ce(se){return Me().getItem(se)}function fe(se,ve){return Me().setItem(se,ve)}function he(se){for(var ve=Me().length-1;ve>=0;ve--){var ue=Me().key(ve);se(Ce(ue),ue)}}function ce(se){return Me().removeItem(se)}function ae(){return Me().clear()}},82059:function(gn){var kt=arguments[3],ee=arguments[4],ne=arguments[5],xe=JSON.stringify;gn.exports=function(Me,Ce){for(var fe,he=Object.keys(ne),ce=0,ae=he.length;ce<ae;ce++){var se=he[ce],ve=ne[se].exports;if(ve===Me||ve&&ve.default===Me){fe=se;break}}if(!fe){fe=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var ue={},ce=0,ae=he.length;ce<ae;ce++){var se=he[ce];ue[se]=se}ee[fe]=["function(require,module,exports){"+Me+"(self); }",ue]}var pe=Math.floor(Math.pow(16,8)*Math.random()).toString(16),oe={};oe[fe]=fe,ee[pe]=["function(require,module,exports){var f = require("+xe(fe)+");(f.default ? f.default : f)(self);}",oe];var ge={};ye(pe);function ye(Ne){ge[Ne]=!0;for(var Re in ee[Ne][1]){var Se=ee[Ne][1][Re];ge[Se]||ye(Se)}}var we="("+kt+")({"+Object.keys(ge).map(function(Ne){return xe(Ne)+":["+ee[Ne][0]+","+xe(ee[Ne][1])+"]"}).join(",")+"},{},["+xe(pe)+"])",Be=window.URL||window.webkitURL||window.mozURL||window.msURL,ze=new Blob([we],{type:"text/javascript"});if(Ce&&Ce.bare)return ze;var $e=Be.createObjectURL(ze),Le=new Worker($e);return Le.objectURL=$e,Le}},34376:function(gn){(function(kt,ee){if(1)gn.exports=ee();else var ne,xe})(window,function(){return function(kt){var ee={};function ne(xe){if(ee[xe])return ee[xe].exports;var Me=ee[xe]={i:xe,l:!1,exports:{}};return kt[xe].call(Me.exports,Me,Me.exports,ne),Me.l=!0,Me.exports}return ne.m=kt,ne.c=ee,ne.d=function(xe,Me,Ce){ne.o(xe,Me)||Object.defineProperty(xe,Me,{enumerable:!0,get:Ce})},ne.r=function(xe){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(xe,"__esModule",{value:!0})},ne.t=function(xe,Me){if(1&Me&&(xe=ne(xe)),8&Me||4&Me&&typeof xe=="object"&&xe&&xe.__esModule)return xe;var Ce=Object.create(null);if(ne.r(Ce),Object.defineProperty(Ce,"default",{enumerable:!0,value:xe}),2&Me&&typeof xe!="string")for(var fe in xe)ne.d(Ce,fe,function(he){return xe[he]}.bind(null,fe));return Ce},ne.n=function(xe){var Me=xe&&xe.__esModule?function(){return xe.default}:function(){return xe};return ne.d(Me,"a",Me),Me},ne.o=function(xe,Me){return Object.prototype.hasOwnProperty.call(xe,Me)},ne.p="",ne(ne.s=34)}([function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.forwardEvent=ee.EventEmitter=void 0;var xe=function(){function Me(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Me.prototype,"event",{get:function(){var Ce=this;return this._event||(this._event=function(fe){return Ce._listeners.push(fe),{dispose:function(){if(!Ce._disposed){for(var he=0;he<Ce._listeners.length;he++)if(Ce._listeners[he]===fe)return void Ce._listeners.splice(he,1)}}}}),this._event},enumerable:!1,configurable:!0}),Me.prototype.fire=function(Ce,fe){for(var he=[],ce=0;ce<this._listeners.length;ce++)he.push(this._listeners[ce]);for(ce=0;ce<he.length;ce++)he[ce].call(void 0,Ce,fe)},Me.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Me}();ee.EventEmitter=xe,ee.forwardEvent=function(Me,Ce){return Me(function(fe){return Ce.fire(fe)})}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.IUnicodeService=ee.IOptionsService=ee.ILogService=ee.IInstantiationService=ee.IDirtyRowService=ee.ICharsetService=ee.ICoreService=ee.ICoreMouseService=ee.IBufferService=void 0;var xe=ne(14);ee.IBufferService=xe.createDecorator("BufferService"),ee.ICoreMouseService=xe.createDecorator("CoreMouseService"),ee.ICoreService=xe.createDecorator("CoreService"),ee.ICharsetService=xe.createDecorator("CharsetService"),ee.IDirtyRowService=xe.createDecorator("DirtyRowService"),ee.IInstantiationService=xe.createDecorator("InstantiationService"),ee.ILogService=xe.createDecorator("LogService"),ee.IOptionsService=xe.createDecorator("OptionsService"),ee.IUnicodeService=xe.createDecorator("UnicodeService")},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.getDisposeArrayDisposable=ee.disposeArray=ee.Disposable=void 0;var xe=function(){function Ce(){this._disposables=[],this._isDisposed=!1}return Ce.prototype.dispose=function(){this._isDisposed=!0;for(var fe=0,he=this._disposables;fe<he.length;fe++)he[fe].dispose();this._disposables.length=0},Ce.prototype.register=function(fe){return this._disposables.push(fe),fe},Ce.prototype.unregister=function(fe){var he=this._disposables.indexOf(fe);he!==-1&&this._disposables.splice(he,1)},Ce}();function Me(Ce){for(var fe=0,he=Ce;fe<he.length;fe++)he[fe].dispose();Ce.length=0}ee.Disposable=xe,ee.disposeArray=Me,ee.getDisposeArrayDisposable=function(Ce){return{dispose:function(){return Me(Ce)}}}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.WHITESPACE_CELL_CODE=ee.WHITESPACE_CELL_WIDTH=ee.WHITESPACE_CELL_CHAR=ee.NULL_CELL_CODE=ee.NULL_CELL_WIDTH=ee.NULL_CELL_CHAR=ee.CHAR_DATA_CODE_INDEX=ee.CHAR_DATA_WIDTH_INDEX=ee.CHAR_DATA_CHAR_INDEX=ee.CHAR_DATA_ATTR_INDEX=ee.DEFAULT_ATTR=ee.DEFAULT_COLOR=void 0,ee.DEFAULT_COLOR=256,ee.DEFAULT_ATTR=256|ee.DEFAULT_COLOR<<9,ee.CHAR_DATA_ATTR_INDEX=0,ee.CHAR_DATA_CHAR_INDEX=1,ee.CHAR_DATA_WIDTH_INDEX=2,ee.CHAR_DATA_CODE_INDEX=3,ee.NULL_CELL_CHAR="",ee.NULL_CELL_WIDTH=1,ee.NULL_CELL_CODE=0,ee.WHITESPACE_CELL_CHAR=" ",ee.WHITESPACE_CELL_WIDTH=1,ee.WHITESPACE_CELL_CODE=32},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ae,se){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,ue){ve.__proto__=ue}||function(ve,ue){for(var pe in ue)ue.hasOwnProperty(pe)&&(ve[pe]=ue[pe])})(ae,se)},function(ae,se){function ve(){this.constructor=ae}xe(ae,se),ae.prototype=se===null?Object.create(se):(ve.prototype=se.prototype,new ve)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.CellData=void 0;var Ce=ne(8),fe=ne(3),he=ne(6),ce=function(ae){function se(){var ve=ae!==null&&ae.apply(this,arguments)||this;return ve.content=0,ve.fg=0,ve.bg=0,ve.extended=new he.ExtendedAttrs,ve.combinedData="",ve}return Me(se,ae),se.fromCharData=function(ve){var ue=new se;return ue.setFromCharData(ve),ue},se.prototype.isCombined=function(){return 2097152&this.content},se.prototype.getWidth=function(){return this.content>>22},se.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?Ce.stringFromCodePoint(2097151&this.content):""},se.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},se.prototype.setFromCharData=function(ve){this.fg=ve[fe.CHAR_DATA_ATTR_INDEX],this.bg=0;var ue=!1;if(ve[fe.CHAR_DATA_CHAR_INDEX].length>2)ue=!0;else if(ve[fe.CHAR_DATA_CHAR_INDEX].length===2){var pe=ve[fe.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=pe&&pe<=56319){var oe=ve[fe.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=oe&&oe<=57343?this.content=1024*(pe-55296)+oe-56320+65536|ve[fe.CHAR_DATA_WIDTH_INDEX]<<22:ue=!0}else ue=!0}else this.content=ve[fe.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|ve[fe.CHAR_DATA_WIDTH_INDEX]<<22;ue&&(this.combinedData=ve[fe.CHAR_DATA_CHAR_INDEX],this.content=2097152|ve[fe.CHAR_DATA_WIDTH_INDEX]<<22)},se.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},se}(he.AttributeData);ee.CellData=ce},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.ISoundService=ee.ISelectionService=ee.IRenderService=ee.IMouseService=ee.ICoreBrowserService=ee.ICharSizeService=void 0;var xe=ne(14);ee.ICharSizeService=xe.createDecorator("CharSizeService"),ee.ICoreBrowserService=xe.createDecorator("CoreBrowserService"),ee.IMouseService=xe.createDecorator("MouseService"),ee.IRenderService=xe.createDecorator("RenderService"),ee.ISelectionService=xe.createDecorator("SelectionService"),ee.ISoundService=xe.createDecorator("SoundService")},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.ExtendedAttrs=ee.AttributeData=void 0;var xe=function(){function Ce(){this.fg=0,this.bg=0,this.extended=new Me}return Ce.toColorRGB=function(fe){return[fe>>>16&255,fe>>>8&255,255&fe]},Ce.fromColorRGB=function(fe){return(255&fe[0])<<16|(255&fe[1])<<8|255&fe[2]},Ce.prototype.clone=function(){var fe=new Ce;return fe.fg=this.fg,fe.bg=this.bg,fe.extended=this.extended.clone(),fe},Ce.prototype.isInverse=function(){return 67108864&this.fg},Ce.prototype.isBold=function(){return 134217728&this.fg},Ce.prototype.isUnderline=function(){return 268435456&this.fg},Ce.prototype.isBlink=function(){return 536870912&this.fg},Ce.prototype.isInvisible=function(){return 1073741824&this.fg},Ce.prototype.isItalic=function(){return 67108864&this.bg},Ce.prototype.isDim=function(){return 134217728&this.bg},Ce.prototype.getFgColorMode=function(){return 50331648&this.fg},Ce.prototype.getBgColorMode=function(){return 50331648&this.bg},Ce.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},Ce.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},Ce.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},Ce.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},Ce.prototype.isFgDefault=function(){return(50331648&this.fg)==0},Ce.prototype.isBgDefault=function(){return(50331648&this.bg)==0},Ce.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},Ce.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},Ce.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},Ce.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},Ce.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},Ce.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},Ce.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},Ce.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},Ce.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},Ce.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},Ce.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},Ce}();ee.AttributeData=xe;var Me=function(){function Ce(fe,he){fe===void 0&&(fe=0),he===void 0&&(he=-1),this.underlineStyle=fe,this.underlineColor=he}return Ce.prototype.clone=function(){return new Ce(this.underlineStyle,this.underlineColor)},Ce.prototype.isEmpty=function(){return this.underlineStyle===0},Ce}();ee.ExtendedAttrs=Me},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.addDisposableDomListener=void 0,ee.addDisposableDomListener=function(xe,Me,Ce,fe){xe.addEventListener(Me,Ce,fe);var he=!1;return{dispose:function(){he||(he=!0,xe.removeEventListener(Me,Ce,fe))}}}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.Utf8ToUtf32=ee.StringToUtf32=ee.utf32ToString=ee.stringFromCodePoint=void 0,ee.stringFromCodePoint=function(Ce){return Ce>65535?(Ce-=65536,String.fromCharCode(55296+(Ce>>10))+String.fromCharCode(Ce%1024+56320)):String.fromCharCode(Ce)},ee.utf32ToString=function(Ce,fe,he){fe===void 0&&(fe=0),he===void 0&&(he=Ce.length);for(var ce="",ae=fe;ae<he;++ae){var se=Ce[ae];se>65535?(se-=65536,ce+=String.fromCharCode(55296+(se>>10))+String.fromCharCode(se%1024+56320)):ce+=String.fromCharCode(se)}return ce};var xe=function(){function Ce(){this._interim=0}return Ce.prototype.clear=function(){this._interim=0},Ce.prototype.decode=function(fe,he){var ce=fe.length;if(!ce)return 0;var ae=0,se=0;this._interim&&(56320<=(pe=fe.charCodeAt(se++))&&pe<=57343?he[ae++]=1024*(this._interim-55296)+pe-56320+65536:(he[ae++]=this._interim,he[ae++]=pe),this._interim=0);for(var ve=se;ve<ce;++ve){var ue=fe.charCodeAt(ve);if(55296<=ue&&ue<=56319){if(++ve>=ce)return this._interim=ue,ae;var pe;56320<=(pe=fe.charCodeAt(ve))&&pe<=57343?he[ae++]=1024*(ue-55296)+pe-56320+65536:(he[ae++]=ue,he[ae++]=pe)}else he[ae++]=ue}return ae},Ce}();ee.StringToUtf32=xe;var Me=function(){function Ce(){this.interim=new Uint8Array(3)}return Ce.prototype.clear=function(){this.interim.fill(0)},Ce.prototype.decode=function(fe,he){var ce=fe.length;if(!ce)return 0;var ae,se,ve,ue,pe=0,oe=0,ge=0;if(this.interim[0]){var ye=!1,we=this.interim[0];we&=(224&we)==192?31:(240&we)==224?15:7;for(var Be=0,ze=void 0;(ze=63&this.interim[++Be])&&Be<4;)we<<=6,we|=ze;for(var $e=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,Le=$e-Be;ge<Le;){if(ge>=ce)return 0;if((192&(ze=fe[ge++]))!=128){ge--,ye=!0;break}this.interim[Be++]=ze,we<<=6,we|=63&ze}ye||($e===2?we<128?ge--:he[pe++]=we:$e===3?we<2048||we>=55296&&we<=57343||(he[pe++]=we):we<65536||we>1114111||(he[pe++]=we)),this.interim.fill(0)}for(var Ne=ce-4,Re=ge;Re<ce;){for(;!(!(Re<Ne)||128&(ae=fe[Re])||128&(se=fe[Re+1])||128&(ve=fe[Re+2])||128&(ue=fe[Re+3]));)he[pe++]=ae,he[pe++]=se,he[pe++]=ve,he[pe++]=ue,Re+=4;if((ae=fe[Re++])<128)he[pe++]=ae;else if((224&ae)==192){if(Re>=ce)return this.interim[0]=ae,pe;if((192&(se=fe[Re++]))!=128){Re--;continue}if((oe=(31&ae)<<6|63&se)<128){Re--;continue}he[pe++]=oe}else if((240&ae)==224){if(Re>=ce)return this.interim[0]=ae,pe;if((192&(se=fe[Re++]))!=128){Re--;continue}if(Re>=ce)return this.interim[0]=ae,this.interim[1]=se,pe;if((192&(ve=fe[Re++]))!=128){Re--;continue}if((oe=(15&ae)<<12|(63&se)<<6|63&ve)<2048||oe>=55296&&oe<=57343)continue;he[pe++]=oe}else if((248&ae)==240){if(Re>=ce)return this.interim[0]=ae,pe;if((192&(se=fe[Re++]))!=128){Re--;continue}if(Re>=ce)return this.interim[0]=ae,this.interim[1]=se,pe;if((192&(ve=fe[Re++]))!=128){Re--;continue}if(Re>=ce)return this.interim[0]=ae,this.interim[1]=se,this.interim[2]=ve,pe;if((192&(ue=fe[Re++]))!=128){Re--;continue}if((oe=(7&ae)<<18|(63&se)<<12|(63&ve)<<6|63&ue)<65536||oe>1114111)continue;he[pe++]=oe}}return pe},Ce}();ee.Utf8ToUtf32=Me},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.CHAR_ATLAS_CELL_SPACING=ee.DIM_OPACITY=ee.INVERTED_DEFAULT_COLOR=void 0,ee.INVERTED_DEFAULT_COLOR=257,ee.DIM_OPACITY=.5,ee.CHAR_ATLAS_CELL_SPACING=1},function(kt,ee,ne){"use strict";var xe,Me,Ce,fe;function he(ae){var se=ae.toString(16);return se.length<2?"0"+se:se}function ce(ae,se){return ae<se?(se+.05)/(ae+.05):(ae+.05)/(se+.05)}Object.defineProperty(ee,"__esModule",{value:!0}),ee.contrastRatio=ee.toPaddedHex=ee.rgba=ee.rgb=ee.css=ee.color=ee.channels=void 0,function(ae){ae.toCss=function(se,ve,ue,pe){return pe!==void 0?"#"+he(se)+he(ve)+he(ue)+he(pe):"#"+he(se)+he(ve)+he(ue)},ae.toRgba=function(se,ve,ue,pe){return pe===void 0&&(pe=255),(se<<24|ve<<16|ue<<8|pe)>>>0}}(xe=ee.channels||(ee.channels={})),(Me=ee.color||(ee.color={})).blend=function(ae,se){var ve=(255&se.rgba)/255;if(ve===1)return{css:se.css,rgba:se.rgba};var ue=se.rgba>>24&255,pe=se.rgba>>16&255,oe=se.rgba>>8&255,ge=ae.rgba>>24&255,ye=ae.rgba>>16&255,we=ae.rgba>>8&255,Be=ge+Math.round((ue-ge)*ve),ze=ye+Math.round((pe-ye)*ve),$e=we+Math.round((oe-we)*ve);return{css:xe.toCss(Be,ze,$e),rgba:xe.toRgba(Be,ze,$e)}},Me.isOpaque=function(ae){return(255&ae.rgba)==255},Me.ensureContrastRatio=function(ae,se,ve){var ue=fe.ensureContrastRatio(ae.rgba,se.rgba,ve);if(ue)return fe.toColor(ue>>24&255,ue>>16&255,ue>>8&255)},Me.opaque=function(ae){var se=(255|ae.rgba)>>>0,ve=fe.toChannels(se),ue=ve[0],pe=ve[1],oe=ve[2];return{css:xe.toCss(ue,pe,oe),rgba:se}},Me.opacity=function(ae,se){var ve=Math.round(255*se),ue=fe.toChannels(ae.rgba),pe=ue[0],oe=ue[1],ge=ue[2];return{css:xe.toCss(pe,oe,ge,ve),rgba:xe.toRgba(pe,oe,ge,ve)}},(ee.css||(ee.css={})).toColor=function(ae){switch(ae.length){case 7:return{css:ae,rgba:(parseInt(ae.slice(1),16)<<8|255)>>>0};case 9:return{css:ae,rgba:parseInt(ae.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(ae){function se(ve,ue,pe){var oe=ve/255,ge=ue/255,ye=pe/255;return .2126*(oe<=.03928?oe/12.92:Math.pow((oe+.055)/1.055,2.4))+.7152*(ge<=.03928?ge/12.92:Math.pow((ge+.055)/1.055,2.4))+.0722*(ye<=.03928?ye/12.92:Math.pow((ye+.055)/1.055,2.4))}ae.relativeLuminance=function(ve){return se(ve>>16&255,ve>>8&255,255&ve)},ae.relativeLuminance2=se}(Ce=ee.rgb||(ee.rgb={})),function(ae){function se(ue,pe,oe){for(var ge=ue>>24&255,ye=ue>>16&255,we=ue>>8&255,Be=pe>>24&255,ze=pe>>16&255,$e=pe>>8&255,Le=ce(Ce.relativeLuminance2(Be,$e,ze),Ce.relativeLuminance2(ge,ye,we));Le<oe&&(Be>0||ze>0||$e>0);)Be-=Math.max(0,Math.ceil(.1*Be)),ze-=Math.max(0,Math.ceil(.1*ze)),$e-=Math.max(0,Math.ceil(.1*$e)),Le=ce(Ce.relativeLuminance2(Be,$e,ze),Ce.relativeLuminance2(ge,ye,we));return(Be<<24|ze<<16|$e<<8|255)>>>0}function ve(ue,pe,oe){for(var ge=ue>>24&255,ye=ue>>16&255,we=ue>>8&255,Be=pe>>24&255,ze=pe>>16&255,$e=pe>>8&255,Le=ce(Ce.relativeLuminance2(Be,$e,ze),Ce.relativeLuminance2(ge,ye,we));Le<oe&&(Be<255||ze<255||$e<255);)Be=Math.min(255,Be+Math.ceil(.1*(255-Be))),ze=Math.min(255,ze+Math.ceil(.1*(255-ze))),$e=Math.min(255,$e+Math.ceil(.1*(255-$e))),Le=ce(Ce.relativeLuminance2(Be,$e,ze),Ce.relativeLuminance2(ge,ye,we));return(Be<<24|ze<<16|$e<<8|255)>>>0}ae.ensureContrastRatio=function(ue,pe,oe){var ge=Ce.relativeLuminance(ue>>8),ye=Ce.relativeLuminance(pe>>8);if(ce(ge,ye)<oe)return ye<ge?se(ue,pe,oe):ve(ue,pe,oe)},ae.reduceLuminance=se,ae.increaseLuminance=ve,ae.toChannels=function(ue){return[ue>>24&255,ue>>16&255,ue>>8&255,255&ue]},ae.toColor=function(ue,pe,oe){return{css:xe.toCss(ue,pe,oe),rgba:xe.toRgba(ue,pe,oe)}}}(fe=ee.rgba||(ee.rgba={})),ee.toPaddedHex=he,ee.contrastRatio=ce},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.isLinux=ee.isWindows=ee.isIphone=ee.isIpad=ee.isMac=ee.isSafari=ee.isFirefox=void 0;var xe=typeof navigator=="undefined",Me=xe?"node":navigator.userAgent,Ce=xe?"node":navigator.platform;function fe(he,ce){return he.indexOf(ce)>=0}ee.isFirefox=!!~Me.indexOf("Firefox"),ee.isSafari=/^((?!chrome|android).)*safari/i.test(Me),ee.isMac=fe(["Macintosh","MacIntel","MacPPC","Mac68K"],Ce),ee.isIpad=Ce==="iPad",ee.isIphone=Ce==="iPhone",ee.isWindows=fe(["Windows","Win16","Win32","WinCE"],Ce),ee.isLinux=Ce.indexOf("Linux")>=0},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.C1=ee.C0=void 0,function(xe){xe.NUL="\0",xe.SOH="",xe.STX="",xe.ETX="",xe.EOT="",xe.ENQ="",xe.ACK="",xe.BEL="\x07",xe.BS="\b",xe.HT=" ",xe.LF=`
`,xe.VT="\v",xe.FF="\f",xe.CR="\r",xe.SO="",xe.SI="",xe.DLE="",xe.DC1="",xe.DC2="",xe.DC3="",xe.DC4="",xe.NAK="",xe.SYN="",xe.ETB="",xe.CAN="",xe.EM="",xe.SUB="",xe.ESC="\x1B",xe.FS="",xe.GS="",xe.RS="",xe.US="",xe.SP=" ",xe.DEL="\x7F"}(ee.C0||(ee.C0={})),function(xe){xe.PAD="\x80",xe.HOP="\x81",xe.BPH="\x82",xe.NBH="\x83",xe.IND="\x84",xe.NEL="\x85",xe.SSA="\x86",xe.ESA="\x87",xe.HTS="\x88",xe.HTJ="\x89",xe.VTS="\x8A",xe.PLD="\x8B",xe.PLU="\x8C",xe.RI="\x8D",xe.SS2="\x8E",xe.SS3="\x8F",xe.DCS="\x90",xe.PU1="\x91",xe.PU2="\x92",xe.STS="\x93",xe.CCH="\x94",xe.MW="\x95",xe.SPA="\x96",xe.EPA="\x97",xe.SOS="\x98",xe.SGCI="\x99",xe.SCI="\x9A",xe.CSI="\x9B",xe.ST="\x9C",xe.OSC="\x9D",xe.PM="\x9E",xe.APC="\x9F"}(ee.C1||(ee.C1={}))},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.BaseRenderLayer=void 0;var xe=ne(3),Me=ne(9),Ce=ne(25),fe=ne(6),he=ne(28),ce=ne(10),ae=ne(17),se=function(){function ve(ue,pe,oe,ge,ye,we,Be,ze){this._container=ue,this._alpha=ge,this._colors=ye,this._rendererId=we,this._bufferService=Be,this._optionsService=ze,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+pe+"-layer"),this._canvas.style.zIndex=oe.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return ve.prototype.dispose=function(){var ue;ae.removeElementFromParent(this._canvas),(ue=this._charAtlas)===null||ue===void 0||ue.dispose()},ve.prototype._initCanvas=function(){this._ctx=he.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},ve.prototype.onOptionsChanged=function(){},ve.prototype.onBlur=function(){},ve.prototype.onFocus=function(){},ve.prototype.onCursorMove=function(){},ve.prototype.onGridChanged=function(ue,pe){},ve.prototype.onSelectionChanged=function(ue,pe,oe){oe===void 0&&(oe=!1)},ve.prototype.setColors=function(ue){this._refreshCharAtlas(ue)},ve.prototype._setTransparency=function(ue){if(ue!==this._alpha){var pe=this._canvas;this._alpha=ue,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,pe),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},ve.prototype._refreshCharAtlas=function(ue){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=Ce.acquireCharAtlas(this._optionsService.options,this._rendererId,ue,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},ve.prototype.resize=function(ue){this._scaledCellWidth=ue.scaledCellWidth,this._scaledCellHeight=ue.scaledCellHeight,this._scaledCharWidth=ue.scaledCharWidth,this._scaledCharHeight=ue.scaledCharHeight,this._scaledCharLeft=ue.scaledCharLeft,this._scaledCharTop=ue.scaledCharTop,this._canvas.width=ue.scaledCanvasWidth,this._canvas.height=ue.scaledCanvasHeight,this._canvas.style.width=ue.canvasWidth+"px",this._canvas.style.height=ue.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},ve.prototype._fillCells=function(ue,pe,oe,ge){this._ctx.fillRect(ue*this._scaledCellWidth,pe*this._scaledCellHeight,oe*this._scaledCellWidth,ge*this._scaledCellHeight)},ve.prototype._fillBottomLineAtCells=function(ue,pe,oe){oe===void 0&&(oe=1),this._ctx.fillRect(ue*this._scaledCellWidth,(pe+1)*this._scaledCellHeight-window.devicePixelRatio-1,oe*this._scaledCellWidth,window.devicePixelRatio)},ve.prototype._fillLeftLineAtCell=function(ue,pe,oe){this._ctx.fillRect(ue*this._scaledCellWidth,pe*this._scaledCellHeight,window.devicePixelRatio*oe,this._scaledCellHeight)},ve.prototype._strokeRectAtCell=function(ue,pe,oe,ge){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(ue*this._scaledCellWidth+window.devicePixelRatio/2,pe*this._scaledCellHeight+window.devicePixelRatio/2,oe*this._scaledCellWidth-window.devicePixelRatio,ge*this._scaledCellHeight-window.devicePixelRatio)},ve.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},ve.prototype._clearCells=function(ue,pe,oe,ge){this._alpha?this._ctx.clearRect(ue*this._scaledCellWidth,pe*this._scaledCellHeight,oe*this._scaledCellWidth,ge*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(ue*this._scaledCellWidth,pe*this._scaledCellHeight,oe*this._scaledCellWidth,ge*this._scaledCellHeight))},ve.prototype._fillCharTrueColor=function(ue,pe,oe){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(oe),this._ctx.fillText(ue.getChars(),pe*this._scaledCellWidth+this._scaledCharLeft,oe*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},ve.prototype._drawChars=function(ue,pe,oe){var ge,ye,we=this._getContrastColor(ue);we||ue.isFgRGB()||ue.isBgRGB()?this._drawUncachedChars(ue,pe,oe,we):(ue.isInverse()?(ge=ue.isBgDefault()?Me.INVERTED_DEFAULT_COLOR:ue.getBgColor(),ye=ue.isFgDefault()?Me.INVERTED_DEFAULT_COLOR:ue.getFgColor()):(ye=ue.isBgDefault()?xe.DEFAULT_COLOR:ue.getBgColor(),ge=ue.isFgDefault()?xe.DEFAULT_COLOR:ue.getFgColor()),ge+=this._optionsService.options.drawBoldTextInBrightColors&&ue.isBold()&&ge<8?8:0,this._currentGlyphIdentifier.chars=ue.getChars()||xe.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=ue.getCode()||xe.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=ye,this._currentGlyphIdentifier.fg=ge,this._currentGlyphIdentifier.bold=!!ue.isBold(),this._currentGlyphIdentifier.dim=!!ue.isDim(),this._currentGlyphIdentifier.italic=!!ue.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,pe*this._scaledCellWidth+this._scaledCharLeft,oe*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(ue,pe,oe))},ve.prototype._drawUncachedChars=function(ue,pe,oe,ge){if(this._ctx.save(),this._ctx.font=this._getFont(!!ue.isBold(),!!ue.isItalic()),this._ctx.textBaseline="middle",ue.isInverse())if(ge)this._ctx.fillStyle=ge.css;else if(ue.isBgDefault())this._ctx.fillStyle=ce.color.opaque(this._colors.background).css;else if(ue.isBgRGB())this._ctx.fillStyle="rgb("+fe.AttributeData.toColorRGB(ue.getBgColor()).join(",")+")";else{var ye=ue.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&ue.isBold()&&ye<8&&(ye+=8),this._ctx.fillStyle=this._colors.ansi[ye].css}else if(ge)this._ctx.fillStyle=ge.css;else if(ue.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(ue.isFgRGB())this._ctx.fillStyle="rgb("+fe.AttributeData.toColorRGB(ue.getFgColor()).join(",")+")";else{var we=ue.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&ue.isBold()&&we<8&&(we+=8),this._ctx.fillStyle=this._colors.ansi[we].css}this._clipRow(oe),ue.isDim()&&(this._ctx.globalAlpha=Me.DIM_OPACITY),this._ctx.fillText(ue.getChars(),pe*this._scaledCellWidth+this._scaledCharLeft,oe*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},ve.prototype._clipRow=function(ue){this._ctx.beginPath(),this._ctx.rect(0,ue*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},ve.prototype._getFont=function(ue,pe){return(pe?"italic":"")+" "+(ue?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},ve.prototype._getContrastColor=function(ue){if(this._optionsService.options.minimumContrastRatio!==1){var pe=this._colors.contrastCache.getColor(ue.bg,ue.fg);if(pe!==void 0)return pe||void 0;var oe=ue.getFgColor(),ge=ue.getFgColorMode(),ye=ue.getBgColor(),we=ue.getBgColorMode(),Be=!!ue.isInverse(),ze=!!ue.isInverse();if(Be){var $e=oe;oe=ye,ye=$e;var Le=ge;ge=we,we=Le}var Ne=this._resolveBackgroundRgba(we,ye,Be),Re=this._resolveForegroundRgba(ge,oe,Be,ze),Se=ce.rgba.ensureContrastRatio(Ne,Re,this._optionsService.options.minimumContrastRatio);if(Se){var Ie={css:ce.channels.toCss(Se>>24&255,Se>>16&255,Se>>8&255),rgba:Se};return this._colors.contrastCache.setColor(ue.bg,ue.fg,Ie),Ie}this._colors.contrastCache.setColor(ue.bg,ue.fg,null)}},ve.prototype._resolveBackgroundRgba=function(ue,pe,oe){switch(ue){case 16777216:case 33554432:return this._colors.ansi[pe].rgba;case 50331648:return pe<<8;case 0:default:return oe?this._colors.foreground.rgba:this._colors.background.rgba}},ve.prototype._resolveForegroundRgba=function(ue,pe,oe,ge){switch(ue){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ge&&pe<8&&(pe+=8),this._colors.ansi[pe].rgba;case 50331648:return pe<<8;case 0:default:return oe?this._colors.background.rgba:this._colors.foreground.rgba}},ve}();ee.BaseRenderLayer=se},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.createDecorator=ee.getServiceDependencies=ee.serviceRegistry=void 0;function xe(Me,Ce,fe){Ce.di$target===Ce?Ce.di$dependencies.push({id:Me,index:fe}):(Ce.di$dependencies=[{id:Me,index:fe}],Ce.di$target=Ce)}ee.serviceRegistry=new Map,ee.getServiceDependencies=function(Me){return Me.di$dependencies||[]},ee.createDecorator=function(Me){if(ee.serviceRegistry.has(Me))return ee.serviceRegistry.get(Me);var Ce=function(fe,he,ce){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");xe(Ce,fe,ce)};return Ce.toString=function(){return Me},ee.serviceRegistry.set(Me,Ce),Ce}},function(kt,ee,ne){"use strict";function xe(Me,Ce,fe,he){if(fe===void 0&&(fe=0),he===void 0&&(he=Me.length),fe>=Me.length)return Me;fe=(Me.length+fe)%Me.length,he=he>=Me.length?Me.length:(Me.length+he)%Me.length;for(var ce=fe;ce<he;++ce)Me[ce]=Ce;return Me}Object.defineProperty(ee,"__esModule",{value:!0}),ee.concat=ee.fillFallback=ee.fill=void 0,ee.fill=function(Me,Ce,fe,he){return Me.fill?Me.fill(Ce,fe,he):xe(Me,Ce,fe,he)},ee.fillFallback=xe,ee.concat=function(Me,Ce){var fe=new Me.constructor(Me.length+Ce.length);return fe.set(Me),fe.set(Ce,Me.length),fe}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.BufferLine=ee.DEFAULT_ATTR_DATA=void 0;var xe=ne(8),Me=ne(3),Ce=ne(4),fe=ne(6);ee.DEFAULT_ATTR_DATA=Object.freeze(new fe.AttributeData);var he=function(){function ce(ae,se,ve){ve===void 0&&(ve=!1),this.isWrapped=ve,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*ae);for(var ue=se||Ce.CellData.fromCharData([0,Me.NULL_CELL_CHAR,Me.NULL_CELL_WIDTH,Me.NULL_CELL_CODE]),pe=0;pe<ae;++pe)this.setCell(pe,ue);this.length=ae}return ce.prototype.get=function(ae){var se=this._data[3*ae+0],ve=2097151&se;return[this._data[3*ae+1],2097152&se?this._combined[ae]:ve?xe.stringFromCodePoint(ve):"",se>>22,2097152&se?this._combined[ae].charCodeAt(this._combined[ae].length-1):ve]},ce.prototype.set=function(ae,se){this._data[3*ae+1]=se[Me.CHAR_DATA_ATTR_INDEX],se[Me.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[ae]=se[1],this._data[3*ae+0]=2097152|ae|se[Me.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*ae+0]=se[Me.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|se[Me.CHAR_DATA_WIDTH_INDEX]<<22},ce.prototype.getWidth=function(ae){return this._data[3*ae+0]>>22},ce.prototype.hasWidth=function(ae){return 12582912&this._data[3*ae+0]},ce.prototype.getFg=function(ae){return this._data[3*ae+1]},ce.prototype.getBg=function(ae){return this._data[3*ae+2]},ce.prototype.hasContent=function(ae){return 4194303&this._data[3*ae+0]},ce.prototype.getCodePoint=function(ae){var se=this._data[3*ae+0];return 2097152&se?this._combined[ae].charCodeAt(this._combined[ae].length-1):2097151&se},ce.prototype.isCombined=function(ae){return 2097152&this._data[3*ae+0]},ce.prototype.getString=function(ae){var se=this._data[3*ae+0];return 2097152&se?this._combined[ae]:2097151&se?xe.stringFromCodePoint(2097151&se):""},ce.prototype.loadCell=function(ae,se){var ve=3*ae;return se.content=this._data[ve+0],se.fg=this._data[ve+1],se.bg=this._data[ve+2],2097152&se.content&&(se.combinedData=this._combined[ae]),268435456&se.bg&&(se.extended=this._extendedAttrs[ae]),se},ce.prototype.setCell=function(ae,se){2097152&se.content&&(this._combined[ae]=se.combinedData),268435456&se.bg&&(this._extendedAttrs[ae]=se.extended),this._data[3*ae+0]=se.content,this._data[3*ae+1]=se.fg,this._data[3*ae+2]=se.bg},ce.prototype.setCellFromCodePoint=function(ae,se,ve,ue,pe,oe){268435456&pe&&(this._extendedAttrs[ae]=oe),this._data[3*ae+0]=se|ve<<22,this._data[3*ae+1]=ue,this._data[3*ae+2]=pe},ce.prototype.addCodepointToCell=function(ae,se){var ve=this._data[3*ae+0];2097152&ve?this._combined[ae]+=xe.stringFromCodePoint(se):(2097151&ve?(this._combined[ae]=xe.stringFromCodePoint(2097151&ve)+xe.stringFromCodePoint(se),ve&=-2097152,ve|=2097152):ve=se|1<<22,this._data[3*ae+0]=ve)},ce.prototype.insertCells=function(ae,se,ve,ue){if((ae%=this.length)&&this.getWidth(ae-1)===2&&this.setCellFromCodePoint(ae-1,0,1,(ue==null?void 0:ue.fg)||0,(ue==null?void 0:ue.bg)||0,(ue==null?void 0:ue.extended)||new fe.ExtendedAttrs),se<this.length-ae){for(var pe=new Ce.CellData,oe=this.length-ae-se-1;oe>=0;--oe)this.setCell(ae+se+oe,this.loadCell(ae+oe,pe));for(oe=0;oe<se;++oe)this.setCell(ae+oe,ve)}else for(oe=ae;oe<this.length;++oe)this.setCell(oe,ve);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(ue==null?void 0:ue.fg)||0,(ue==null?void 0:ue.bg)||0,(ue==null?void 0:ue.extended)||new fe.ExtendedAttrs)},ce.prototype.deleteCells=function(ae,se,ve,ue){if(ae%=this.length,se<this.length-ae){for(var pe=new Ce.CellData,oe=0;oe<this.length-ae-se;++oe)this.setCell(ae+oe,this.loadCell(ae+se+oe,pe));for(oe=this.length-se;oe<this.length;++oe)this.setCell(oe,ve)}else for(oe=ae;oe<this.length;++oe)this.setCell(oe,ve);ae&&this.getWidth(ae-1)===2&&this.setCellFromCodePoint(ae-1,0,1,(ue==null?void 0:ue.fg)||0,(ue==null?void 0:ue.bg)||0,(ue==null?void 0:ue.extended)||new fe.ExtendedAttrs),this.getWidth(ae)!==0||this.hasContent(ae)||this.setCellFromCodePoint(ae,0,1,(ue==null?void 0:ue.fg)||0,(ue==null?void 0:ue.bg)||0,(ue==null?void 0:ue.extended)||new fe.ExtendedAttrs)},ce.prototype.replaceCells=function(ae,se,ve,ue){for(ae&&this.getWidth(ae-1)===2&&this.setCellFromCodePoint(ae-1,0,1,(ue==null?void 0:ue.fg)||0,(ue==null?void 0:ue.bg)||0,(ue==null?void 0:ue.extended)||new fe.ExtendedAttrs),se<this.length&&this.getWidth(se-1)===2&&this.setCellFromCodePoint(se,0,1,(ue==null?void 0:ue.fg)||0,(ue==null?void 0:ue.bg)||0,(ue==null?void 0:ue.extended)||new fe.ExtendedAttrs);ae<se&&ae<this.length;)this.setCell(ae++,ve)},ce.prototype.resize=function(ae,se){if(ae!==this.length){if(ae>this.length){var ve=new Uint32Array(3*ae);this.length&&(3*ae<this._data.length?ve.set(this._data.subarray(0,3*ae)):ve.set(this._data)),this._data=ve;for(var ue=this.length;ue<ae;++ue)this.setCell(ue,se)}else if(ae){(ve=new Uint32Array(3*ae)).set(this._data.subarray(0,3*ae)),this._data=ve;var pe=Object.keys(this._combined);for(ue=0;ue<pe.length;ue++){var oe=parseInt(pe[ue],10);oe>=ae&&delete this._combined[oe]}}else this._data=new Uint32Array(0),this._combined={};this.length=ae}},ce.prototype.fill=function(ae){this._combined={},this._extendedAttrs={};for(var se=0;se<this.length;++se)this.setCell(se,ae)},ce.prototype.copyFrom=function(ae){for(var se in this.length!==ae.length?this._data=new Uint32Array(ae._data):this._data.set(ae._data),this.length=ae.length,this._combined={},ae._combined)this._combined[se]=ae._combined[se];for(var se in this._extendedAttrs={},ae._extendedAttrs)this._extendedAttrs[se]=ae._extendedAttrs[se];this.isWrapped=ae.isWrapped},ce.prototype.clone=function(){var ae=new ce(0);for(var se in ae._data=new Uint32Array(this._data),ae.length=this.length,this._combined)ae._combined[se]=this._combined[se];for(var se in this._extendedAttrs)ae._extendedAttrs[se]=this._extendedAttrs[se];return ae.isWrapped=this.isWrapped,ae},ce.prototype.getTrimmedLength=function(){for(var ae=this.length-1;ae>=0;--ae)if(4194303&this._data[3*ae+0])return ae+(this._data[3*ae+0]>>22);return 0},ce.prototype.copyCellsFrom=function(ae,se,ve,ue,pe){var oe=ae._data;if(pe)for(var ge=ue-1;ge>=0;ge--)for(var ye=0;ye<3;ye++)this._data[3*(ve+ge)+ye]=oe[3*(se+ge)+ye];else for(ge=0;ge<ue;ge++)for(ye=0;ye<3;ye++)this._data[3*(ve+ge)+ye]=oe[3*(se+ge)+ye];var we=Object.keys(ae._combined);for(ye=0;ye<we.length;ye++){var Be=parseInt(we[ye],10);Be>=se&&(this._combined[Be-se+ve]=ae._combined[Be])}},ce.prototype.translateToString=function(ae,se,ve){ae===void 0&&(ae=!1),se===void 0&&(se=0),ve===void 0&&(ve=this.length),ae&&(ve=Math.min(ve,this.getTrimmedLength()));for(var ue="";se<ve;){var pe=this._data[3*se+0],oe=2097151&pe;ue+=2097152&pe?this._combined[se]:oe?xe.stringFromCodePoint(oe):Me.WHITESPACE_CELL_CHAR,se+=pe>>22||1}return ue},ce}();ee.BufferLine=he},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.removeElementFromParent=void 0,ee.removeElementFromParent=function(){for(var xe,Me=[],Ce=0;Ce<arguments.length;Ce++)Me[Ce]=arguments[Ce];for(var fe=0,he=Me;fe<he.length;fe++){var ce=he[fe];(xe=ce==null?void 0:ce.parentElement)===null||xe===void 0||xe.removeChild(ce)}}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.tooMuchOutput=ee.promptLabel=void 0,ee.promptLabel="Terminal input",ee.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(Re,Se){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ie,Ae){Ie.__proto__=Ae}||function(Ie,Ae){for(var it in Ae)Ae.hasOwnProperty(it)&&(Ie[it]=Ae[it])})(Re,Se)},function(Re,Se){function Ie(){this.constructor=Re}xe(Re,Se),Re.prototype=Se===null?Object.create(Se):(Ie.prototype=Se.prototype,new Ie)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.InputHandler=ee.WindowsOptionsReportType=void 0;var Ce,fe=ne(12),he=ne(20),ce=ne(39),ae=ne(2),se=ne(15),ve=ne(8),ue=ne(16),pe=ne(0),oe=ne(3),ge=ne(4),ye=ne(6),we=ne(22),Be=ne(24),ze={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function $e(Re,Se){if(Re>24)return Se.setWinLines||!1;switch(Re){case 1:return!!Se.restoreWin;case 2:return!!Se.minimizeWin;case 3:return!!Se.setWinPosition;case 4:return!!Se.setWinSizePixels;case 5:return!!Se.raiseWin;case 6:return!!Se.lowerWin;case 7:return!!Se.refreshWin;case 8:return!!Se.setWinSizeChars;case 9:return!!Se.maximizeWin;case 10:return!!Se.fullscreenWin;case 11:return!!Se.getWinState;case 13:return!!Se.getWinPosition;case 14:return!!Se.getWinSizePixels;case 15:return!!Se.getScreenSizePixels;case 16:return!!Se.getCellSizePixels;case 18:return!!Se.getWinSizeChars;case 19:return!!Se.getScreenSizeChars;case 20:return!!Se.getIconTitle;case 21:return!!Se.getWinTitle;case 22:return!!Se.pushTitle;case 23:return!!Se.popTitle;case 24:return!!Se.setWinLines}return!1}(function(Re){Re[Re.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Re[Re.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(Ce=ee.WindowsOptionsReportType||(ee.WindowsOptionsReportType={}));var Le=function(){function Re(Se,Ie,Ae,it){this._bufferService=Se,this._coreService=Ie,this._logService=Ae,this._optionsService=it,this._data=new Uint32Array(0)}return Re.prototype.hook=function(Se){this._data=new Uint32Array(0)},Re.prototype.put=function(Se,Ie,Ae){this._data=se.concat(this._data,Se.subarray(Ie,Ae))},Re.prototype.unhook=function(Se){if(Se){var Ie=ve.utf32ToString(this._data);switch(this._data=new Uint32Array(0),Ie){case'"q':return this._coreService.triggerDataEvent(fe.C0.ESC+'P1$r0"q'+fe.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(fe.C0.ESC+'P1$r61;1"p'+fe.C0.ESC+"\\");case"r":var Ae=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(fe.C0.ESC+"P1$r"+Ae+fe.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(fe.C0.ESC+"P1$r0m"+fe.C0.ESC+"\\");case" q":var it={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return it-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(fe.C0.ESC+"P1$r"+it+" q"+fe.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",Ie),this._coreService.triggerDataEvent(fe.C0.ESC+"P0$r"+fe.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},Re}(),Ne=function(Re){function Se(Ie,Ae,it,Ue,gt,Ve,Tt,ct,Ot){Ot===void 0&&(Ot=new ce.EscapeSequenceParser);var We=Re.call(this)||this;We._bufferService=Ie,We._charsetService=Ae,We._coreService=it,We._dirtyRowService=Ue,We._logService=gt,We._optionsService=Ve,We._coreMouseService=Tt,We._unicodeService=ct,We._parser=Ot,We._parseBuffer=new Uint32Array(4096),We._stringDecoder=new ve.StringToUtf32,We._utf8Decoder=new ve.Utf8ToUtf32,We._workCell=new ge.CellData,We._windowTitle="",We._iconName="",We._windowTitleStack=[],We._iconNameStack=[],We._curAttrData=ue.DEFAULT_ATTR_DATA.clone(),We._eraseAttrDataInternal=ue.DEFAULT_ATTR_DATA.clone(),We._onRequestBell=new pe.EventEmitter,We._onRequestRefreshRows=new pe.EventEmitter,We._onRequestReset=new pe.EventEmitter,We._onRequestScroll=new pe.EventEmitter,We._onRequestSyncScrollBar=new pe.EventEmitter,We._onRequestWindowsOptionsReport=new pe.EventEmitter,We._onA11yChar=new pe.EventEmitter,We._onA11yTab=new pe.EventEmitter,We._onCursorMove=new pe.EventEmitter,We._onLineFeed=new pe.EventEmitter,We._onScroll=new pe.EventEmitter,We._onTitleChange=new pe.EventEmitter,We.register(We._parser),We._parser.setCsiHandlerFallback(function(qe,Ze){We._logService.debug("Unknown CSI code: ",{identifier:We._parser.identToString(qe),params:Ze.toArray()})}),We._parser.setEscHandlerFallback(function(qe){We._logService.debug("Unknown ESC code: ",{identifier:We._parser.identToString(qe)})}),We._parser.setExecuteHandlerFallback(function(qe){We._logService.debug("Unknown EXECUTE code: ",{code:qe})}),We._parser.setOscHandlerFallback(function(qe,Ze,wt){We._logService.debug("Unknown OSC code: ",{identifier:qe,action:Ze,data:wt})}),We._parser.setDcsHandlerFallback(function(qe,Ze,wt){Ze==="HOOK"&&(wt=wt.toArray()),We._logService.debug("Unknown DCS code: ",{identifier:We._parser.identToString(qe),action:Ze,payload:wt})}),We._parser.setPrintHandler(function(qe,Ze,wt){return We.print(qe,Ze,wt)}),We._parser.setCsiHandler({final:"@"},function(qe){return We.insertChars(qe)}),We._parser.setCsiHandler({intermediates:" ",final:"@"},function(qe){return We.scrollLeft(qe)}),We._parser.setCsiHandler({final:"A"},function(qe){return We.cursorUp(qe)}),We._parser.setCsiHandler({intermediates:" ",final:"A"},function(qe){return We.scrollRight(qe)}),We._parser.setCsiHandler({final:"B"},function(qe){return We.cursorDown(qe)}),We._parser.setCsiHandler({final:"C"},function(qe){return We.cursorForward(qe)}),We._parser.setCsiHandler({final:"D"},function(qe){return We.cursorBackward(qe)}),We._parser.setCsiHandler({final:"E"},function(qe){return We.cursorNextLine(qe)}),We._parser.setCsiHandler({final:"F"},function(qe){return We.cursorPrecedingLine(qe)}),We._parser.setCsiHandler({final:"G"},function(qe){return We.cursorCharAbsolute(qe)}),We._parser.setCsiHandler({final:"H"},function(qe){return We.cursorPosition(qe)}),We._parser.setCsiHandler({final:"I"},function(qe){return We.cursorForwardTab(qe)}),We._parser.setCsiHandler({final:"J"},function(qe){return We.eraseInDisplay(qe)}),We._parser.setCsiHandler({prefix:"?",final:"J"},function(qe){return We.eraseInDisplay(qe)}),We._parser.setCsiHandler({final:"K"},function(qe){return We.eraseInLine(qe)}),We._parser.setCsiHandler({prefix:"?",final:"K"},function(qe){return We.eraseInLine(qe)}),We._parser.setCsiHandler({final:"L"},function(qe){return We.insertLines(qe)}),We._parser.setCsiHandler({final:"M"},function(qe){return We.deleteLines(qe)}),We._parser.setCsiHandler({final:"P"},function(qe){return We.deleteChars(qe)}),We._parser.setCsiHandler({final:"S"},function(qe){return We.scrollUp(qe)}),We._parser.setCsiHandler({final:"T"},function(qe){return We.scrollDown(qe)}),We._parser.setCsiHandler({final:"X"},function(qe){return We.eraseChars(qe)}),We._parser.setCsiHandler({final:"Z"},function(qe){return We.cursorBackwardTab(qe)}),We._parser.setCsiHandler({final:"`"},function(qe){return We.charPosAbsolute(qe)}),We._parser.setCsiHandler({final:"a"},function(qe){return We.hPositionRelative(qe)}),We._parser.setCsiHandler({final:"b"},function(qe){return We.repeatPrecedingCharacter(qe)}),We._parser.setCsiHandler({final:"c"},function(qe){return We.sendDeviceAttributesPrimary(qe)}),We._parser.setCsiHandler({prefix:">",final:"c"},function(qe){return We.sendDeviceAttributesSecondary(qe)}),We._parser.setCsiHandler({final:"d"},function(qe){return We.linePosAbsolute(qe)}),We._parser.setCsiHandler({final:"e"},function(qe){return We.vPositionRelative(qe)}),We._parser.setCsiHandler({final:"f"},function(qe){return We.hVPosition(qe)}),We._parser.setCsiHandler({final:"g"},function(qe){return We.tabClear(qe)}),We._parser.setCsiHandler({final:"h"},function(qe){return We.setMode(qe)}),We._parser.setCsiHandler({prefix:"?",final:"h"},function(qe){return We.setModePrivate(qe)}),We._parser.setCsiHandler({final:"l"},function(qe){return We.resetMode(qe)}),We._parser.setCsiHandler({prefix:"?",final:"l"},function(qe){return We.resetModePrivate(qe)}),We._parser.setCsiHandler({final:"m"},function(qe){return We.charAttributes(qe)}),We._parser.setCsiHandler({final:"n"},function(qe){return We.deviceStatus(qe)}),We._parser.setCsiHandler({prefix:"?",final:"n"},function(qe){return We.deviceStatusPrivate(qe)}),We._parser.setCsiHandler({intermediates:"!",final:"p"},function(qe){return We.softReset(qe)}),We._parser.setCsiHandler({intermediates:" ",final:"q"},function(qe){return We.setCursorStyle(qe)}),We._parser.setCsiHandler({final:"r"},function(qe){return We.setScrollRegion(qe)}),We._parser.setCsiHandler({final:"s"},function(qe){return We.saveCursor(qe)}),We._parser.setCsiHandler({final:"t"},function(qe){return We.windowOptions(qe)}),We._parser.setCsiHandler({final:"u"},function(qe){return We.restoreCursor(qe)}),We._parser.setCsiHandler({intermediates:"'",final:"}"},function(qe){return We.insertColumns(qe)}),We._parser.setCsiHandler({intermediates:"'",final:"~"},function(qe){return We.deleteColumns(qe)}),We._parser.setExecuteHandler(fe.C0.BEL,function(){return We.bell()}),We._parser.setExecuteHandler(fe.C0.LF,function(){return We.lineFeed()}),We._parser.setExecuteHandler(fe.C0.VT,function(){return We.lineFeed()}),We._parser.setExecuteHandler(fe.C0.FF,function(){return We.lineFeed()}),We._parser.setExecuteHandler(fe.C0.CR,function(){return We.carriageReturn()}),We._parser.setExecuteHandler(fe.C0.BS,function(){return We.backspace()}),We._parser.setExecuteHandler(fe.C0.HT,function(){return We.tab()}),We._parser.setExecuteHandler(fe.C0.SO,function(){return We.shiftOut()}),We._parser.setExecuteHandler(fe.C0.SI,function(){return We.shiftIn()}),We._parser.setExecuteHandler(fe.C1.IND,function(){return We.index()}),We._parser.setExecuteHandler(fe.C1.NEL,function(){return We.nextLine()}),We._parser.setExecuteHandler(fe.C1.HTS,function(){return We.tabSet()}),We._parser.setOscHandler(0,new we.OscHandler(function(qe){We.setTitle(qe),We.setIconName(qe)})),We._parser.setOscHandler(1,new we.OscHandler(function(qe){return We.setIconName(qe)})),We._parser.setOscHandler(2,new we.OscHandler(function(qe){return We.setTitle(qe)})),We._parser.setEscHandler({final:"7"},function(){return We.saveCursor()}),We._parser.setEscHandler({final:"8"},function(){return We.restoreCursor()}),We._parser.setEscHandler({final:"D"},function(){return We.index()}),We._parser.setEscHandler({final:"E"},function(){return We.nextLine()}),We._parser.setEscHandler({final:"H"},function(){return We.tabSet()}),We._parser.setEscHandler({final:"M"},function(){return We.reverseIndex()}),We._parser.setEscHandler({final:"="},function(){return We.keypadApplicationMode()}),We._parser.setEscHandler({final:">"},function(){return We.keypadNumericMode()}),We._parser.setEscHandler({final:"c"},function(){return We.fullReset()}),We._parser.setEscHandler({final:"n"},function(){return We.setgLevel(2)}),We._parser.setEscHandler({final:"o"},function(){return We.setgLevel(3)}),We._parser.setEscHandler({final:"|"},function(){return We.setgLevel(3)}),We._parser.setEscHandler({final:"}"},function(){return We.setgLevel(2)}),We._parser.setEscHandler({final:"~"},function(){return We.setgLevel(1)}),We._parser.setEscHandler({intermediates:"%",final:"@"},function(){return We.selectDefaultCharset()}),We._parser.setEscHandler({intermediates:"%",final:"G"},function(){return We.selectDefaultCharset()});var lt=function(qe){ut._parser.setEscHandler({intermediates:"(",final:qe},function(){return We.selectCharset("("+qe)}),ut._parser.setEscHandler({intermediates:")",final:qe},function(){return We.selectCharset(")"+qe)}),ut._parser.setEscHandler({intermediates:"*",final:qe},function(){return We.selectCharset("*"+qe)}),ut._parser.setEscHandler({intermediates:"+",final:qe},function(){return We.selectCharset("+"+qe)}),ut._parser.setEscHandler({intermediates:"-",final:qe},function(){return We.selectCharset("-"+qe)}),ut._parser.setEscHandler({intermediates:".",final:qe},function(){return We.selectCharset("."+qe)}),ut._parser.setEscHandler({intermediates:"/",final:qe},function(){return We.selectCharset("/"+qe)})},ut=this;for(var St in he.CHARSETS)lt(St);return We._parser.setEscHandler({intermediates:"#",final:"8"},function(){return We.screenAlignmentPattern()}),We._parser.setErrorHandler(function(qe){return We._logService.error("Parsing error: ",qe),qe}),We._parser.setDcsHandler({intermediates:"$",final:"q"},new Le(We._bufferService,We._coreService,We._logService,We._optionsService)),We}return Me(Se,Re),Object.defineProperty(Se.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Se.prototype.dispose=function(){Re.prototype.dispose.call(this)},Se.prototype.parse=function(Ie){var Ae=this._bufferService.buffer,it=Ae.x,Ue=Ae.y;if(this._logService.debug("parsing data",Ie),this._parseBuffer.length<Ie.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(Ie.length,131072))),this._dirtyRowService.clearRange(),Ie.length>131072)for(var gt=0;gt<Ie.length;gt+=131072){var Ve=gt+131072<Ie.length?gt+131072:Ie.length,Tt=typeof Ie=="string"?this._stringDecoder.decode(Ie.substring(gt,Ve),this._parseBuffer):this._utf8Decoder.decode(Ie.subarray(gt,Ve),this._parseBuffer);this._parser.parse(this._parseBuffer,Tt)}else Tt=typeof Ie=="string"?this._stringDecoder.decode(Ie,this._parseBuffer):this._utf8Decoder.decode(Ie,this._parseBuffer),this._parser.parse(this._parseBuffer,Tt);(Ae=this._bufferService.buffer).x===it&&Ae.y===Ue||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},Se.prototype.print=function(Ie,Ae,it){var Ue,gt,Ve=this._bufferService.buffer,Tt=this._charsetService.charset,ct=this._optionsService.options.screenReaderMode,Ot=this._bufferService.cols,We=this._coreService.decPrivateModes.wraparound,lt=this._coreService.modes.insertMode,ut=this._curAttrData,St=Ve.lines.get(Ve.ybase+Ve.y);this._dirtyRowService.markDirty(Ve.y),Ve.x&&it-Ae>0&&St.getWidth(Ve.x-1)===2&&St.setCellFromCodePoint(Ve.x-1,0,1,ut.fg,ut.bg,ut.extended);for(var qe=Ae;qe<it;++qe){if(Ue=Ie[qe],gt=this._unicodeService.wcwidth(Ue),Ue<127&&Tt){var Ze=Tt[String.fromCharCode(Ue)];Ze&&(Ue=Ze.charCodeAt(0))}if(ct&&this._onA11yChar.fire(ve.stringFromCodePoint(Ue)),gt||!Ve.x){if(Ve.x+gt-1>=Ot){if(We){for(;Ve.x<Ot;)St.setCellFromCodePoint(Ve.x++,0,1,ut.fg,ut.bg,ut.extended);Ve.x=0,Ve.y++,Ve.y===Ve.scrollBottom+1?(Ve.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Ve.y>=this._bufferService.rows&&(Ve.y=this._bufferService.rows-1),Ve.lines.get(Ve.ybase+Ve.y).isWrapped=!0),St=Ve.lines.get(Ve.ybase+Ve.y)}else if(Ve.x=Ot-1,gt===2)continue}if(lt&&(St.insertCells(Ve.x,gt,Ve.getNullCell(ut),ut),St.getWidth(Ot-1)===2&&St.setCellFromCodePoint(Ot-1,oe.NULL_CELL_CODE,oe.NULL_CELL_WIDTH,ut.fg,ut.bg,ut.extended)),St.setCellFromCodePoint(Ve.x++,Ue,gt,ut.fg,ut.bg,ut.extended),gt>0)for(;--gt;)St.setCellFromCodePoint(Ve.x++,0,0,ut.fg,ut.bg,ut.extended)}else St.getWidth(Ve.x-1)?St.addCodepointToCell(Ve.x-1,Ue):St.addCodepointToCell(Ve.x-2,Ue)}it-Ae>0&&(St.loadCell(Ve.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),Ve.x<Ot&&it-Ae>0&&St.getWidth(Ve.x)===0&&!St.hasContent(Ve.x)&&St.setCellFromCodePoint(Ve.x,0,1,ut.fg,ut.bg,ut.extended),this._dirtyRowService.markDirty(Ve.y)},Se.prototype.addCsiHandler=function(Ie,Ae){var it=this;return Ie.final!=="t"||Ie.prefix||Ie.intermediates?this._parser.addCsiHandler(Ie,Ae):this._parser.addCsiHandler(Ie,function(Ue){return!$e(Ue.params[0],it._optionsService.options.windowOptions)||Ae(Ue)})},Se.prototype.addDcsHandler=function(Ie,Ae){return this._parser.addDcsHandler(Ie,new Be.DcsHandler(Ae))},Se.prototype.addEscHandler=function(Ie,Ae){return this._parser.addEscHandler(Ie,Ae)},Se.prototype.addOscHandler=function(Ie,Ae){return this._parser.addOscHandler(Ie,new we.OscHandler(Ae))},Se.prototype.bell=function(){this._onRequestBell.fire()},Se.prototype.lineFeed=function(){var Ie=this._bufferService.buffer;this._dirtyRowService.markDirty(Ie.y),this._optionsService.options.convertEol&&(Ie.x=0),Ie.y++,Ie.y===Ie.scrollBottom+1?(Ie.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ie.y>=this._bufferService.rows&&(Ie.y=this._bufferService.rows-1),Ie.x>=this._bufferService.cols&&Ie.x--,this._dirtyRowService.markDirty(Ie.y),this._onLineFeed.fire()},Se.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},Se.prototype.backspace=function(){var Ie,Ae=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(Ae.x>0&&Ae.x--);if(this._restrictCursor(this._bufferService.cols),Ae.x>0)Ae.x--;else if(Ae.x===0&&Ae.y>Ae.scrollTop&&Ae.y<=Ae.scrollBottom&&(!((Ie=Ae.lines.get(Ae.ybase+Ae.y))===null||Ie===void 0)&&Ie.isWrapped)){Ae.lines.get(Ae.ybase+Ae.y).isWrapped=!1,Ae.y--,Ae.x=this._bufferService.cols-1;var it=Ae.lines.get(Ae.ybase+Ae.y);it.hasWidth(Ae.x)&&!it.hasContent(Ae.x)&&Ae.x--}this._restrictCursor()},Se.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var Ie=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-Ie)}},Se.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},Se.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},Se.prototype._restrictCursor=function(Ie){Ie===void 0&&(Ie=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(Ie,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Se.prototype._setCursor=function(Ie,Ae){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=Ie,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+Ae):(this._bufferService.buffer.x=Ie,this._bufferService.buffer.y=Ae),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Se.prototype._moveCursor=function(Ie,Ae){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Ie,this._bufferService.buffer.y+Ae)},Se.prototype.cursorUp=function(Ie){var Ae=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;Ae>=0?this._moveCursor(0,-Math.min(Ae,Ie.params[0]||1)):this._moveCursor(0,-(Ie.params[0]||1))},Se.prototype.cursorDown=function(Ie){var Ae=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;Ae>=0?this._moveCursor(0,Math.min(Ae,Ie.params[0]||1)):this._moveCursor(0,Ie.params[0]||1)},Se.prototype.cursorForward=function(Ie){this._moveCursor(Ie.params[0]||1,0)},Se.prototype.cursorBackward=function(Ie){this._moveCursor(-(Ie.params[0]||1),0)},Se.prototype.cursorNextLine=function(Ie){this.cursorDown(Ie),this._bufferService.buffer.x=0},Se.prototype.cursorPrecedingLine=function(Ie){this.cursorUp(Ie),this._bufferService.buffer.x=0},Se.prototype.cursorCharAbsolute=function(Ie){this._setCursor((Ie.params[0]||1)-1,this._bufferService.buffer.y)},Se.prototype.cursorPosition=function(Ie){this._setCursor(Ie.length>=2?(Ie.params[1]||1)-1:0,(Ie.params[0]||1)-1)},Se.prototype.charPosAbsolute=function(Ie){this._setCursor((Ie.params[0]||1)-1,this._bufferService.buffer.y)},Se.prototype.hPositionRelative=function(Ie){this._moveCursor(Ie.params[0]||1,0)},Se.prototype.linePosAbsolute=function(Ie){this._setCursor(this._bufferService.buffer.x,(Ie.params[0]||1)-1)},Se.prototype.vPositionRelative=function(Ie){this._moveCursor(0,Ie.params[0]||1)},Se.prototype.hVPosition=function(Ie){this.cursorPosition(Ie)},Se.prototype.tabClear=function(Ie){var Ae=Ie.params[0];Ae===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:Ae===3&&(this._bufferService.buffer.tabs={})},Se.prototype.cursorForwardTab=function(Ie){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Ae=Ie.params[0]||1;Ae--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},Se.prototype.cursorBackwardTab=function(Ie){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Ae=Ie.params[0]||1,it=this._bufferService.buffer;Ae--;)it.x=it.prevStop()},Se.prototype._eraseInBufferLine=function(Ie,Ae,it,Ue){Ue===void 0&&(Ue=!1);var gt=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ie);gt.replaceCells(Ae,it,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ue&&(gt.isWrapped=!1)},Se.prototype._resetBufferLine=function(Ie){var Ae=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ie);Ae.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),Ae.isWrapped=!1},Se.prototype.eraseInDisplay=function(Ie){var Ae;switch(this._restrictCursor(),Ie.params[0]){case 0:for(Ae=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Ae),this._eraseInBufferLine(Ae++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);Ae<this._bufferService.rows;Ae++)this._resetBufferLine(Ae);this._dirtyRowService.markDirty(Ae);break;case 1:for(Ae=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Ae),this._eraseInBufferLine(Ae,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(Ae+1).isWrapped=!1);Ae--;)this._resetBufferLine(Ae);this._dirtyRowService.markDirty(0);break;case 2:for(Ae=this._bufferService.rows,this._dirtyRowService.markDirty(Ae-1);Ae--;)this._resetBufferLine(Ae);this._dirtyRowService.markDirty(0);break;case 3:var it=this._bufferService.buffer.lines.length-this._bufferService.rows;it>0&&(this._bufferService.buffer.lines.trimStart(it),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-it,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-it,0),this._onScroll.fire(0))}},Se.prototype.eraseInLine=function(Ie){switch(this._restrictCursor(),Ie.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Se.prototype.insertLines=function(Ie){this._restrictCursor();var Ae=Ie.params[0]||1,it=this._bufferService.buffer;if(!(it.y>it.scrollBottom||it.y<it.scrollTop)){for(var Ue=it.ybase+it.y,gt=this._bufferService.rows-1-it.scrollBottom,Ve=this._bufferService.rows-1+it.ybase-gt+1;Ae--;)it.lines.splice(Ve-1,1),it.lines.splice(Ue,0,it.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(it.y,it.scrollBottom),it.x=0}},Se.prototype.deleteLines=function(Ie){this._restrictCursor();var Ae=Ie.params[0]||1,it=this._bufferService.buffer;if(!(it.y>it.scrollBottom||it.y<it.scrollTop)){var Ue,gt=it.ybase+it.y;for(Ue=this._bufferService.rows-1-it.scrollBottom,Ue=this._bufferService.rows-1+it.ybase-Ue;Ae--;)it.lines.splice(gt,1),it.lines.splice(Ue,0,it.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(it.y,it.scrollBottom),it.x=0}},Se.prototype.insertChars=function(Ie){this._restrictCursor();var Ae=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Ae&&(Ae.insertCells(this._bufferService.buffer.x,Ie.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Se.prototype.deleteChars=function(Ie){this._restrictCursor();var Ae=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Ae&&(Ae.deleteCells(this._bufferService.buffer.x,Ie.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Se.prototype.scrollUp=function(Ie){for(var Ae=Ie.params[0]||1,it=this._bufferService.buffer;Ae--;)it.lines.splice(it.ybase+it.scrollTop,1),it.lines.splice(it.ybase+it.scrollBottom,0,it.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(it.scrollTop,it.scrollBottom)},Se.prototype.scrollDown=function(Ie){for(var Ae=Ie.params[0]||1,it=this._bufferService.buffer;Ae--;)it.lines.splice(it.ybase+it.scrollBottom,1),it.lines.splice(it.ybase+it.scrollTop,0,it.getBlankLine(ue.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(it.scrollTop,it.scrollBottom)},Se.prototype.scrollLeft=function(Ie){var Ae=this._bufferService.buffer;if(!(Ae.y>Ae.scrollBottom||Ae.y<Ae.scrollTop)){for(var it=Ie.params[0]||1,Ue=Ae.scrollTop;Ue<=Ae.scrollBottom;++Ue){var gt=Ae.lines.get(Ae.ybase+Ue);gt.deleteCells(0,it,Ae.getNullCell(this._eraseAttrData()),this._eraseAttrData()),gt.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}},Se.prototype.scrollRight=function(Ie){var Ae=this._bufferService.buffer;if(!(Ae.y>Ae.scrollBottom||Ae.y<Ae.scrollTop)){for(var it=Ie.params[0]||1,Ue=Ae.scrollTop;Ue<=Ae.scrollBottom;++Ue){var gt=Ae.lines.get(Ae.ybase+Ue);gt.insertCells(0,it,Ae.getNullCell(this._eraseAttrData()),this._eraseAttrData()),gt.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}},Se.prototype.insertColumns=function(Ie){var Ae=this._bufferService.buffer;if(!(Ae.y>Ae.scrollBottom||Ae.y<Ae.scrollTop)){for(var it=Ie.params[0]||1,Ue=Ae.scrollTop;Ue<=Ae.scrollBottom;++Ue){var gt=this._bufferService.buffer.lines.get(Ae.ybase+Ue);gt.insertCells(Ae.x,it,Ae.getNullCell(this._eraseAttrData()),this._eraseAttrData()),gt.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}},Se.prototype.deleteColumns=function(Ie){var Ae=this._bufferService.buffer;if(!(Ae.y>Ae.scrollBottom||Ae.y<Ae.scrollTop)){for(var it=Ie.params[0]||1,Ue=Ae.scrollTop;Ue<=Ae.scrollBottom;++Ue){var gt=Ae.lines.get(Ae.ybase+Ue);gt.deleteCells(Ae.x,it,Ae.getNullCell(this._eraseAttrData()),this._eraseAttrData()),gt.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}},Se.prototype.eraseChars=function(Ie){this._restrictCursor();var Ae=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Ae&&(Ae.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(Ie.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Se.prototype.repeatPrecedingCharacter=function(Ie){if(this._parser.precedingCodepoint){for(var Ae=Ie.params[0]||1,it=new Uint32Array(Ae),Ue=0;Ue<Ae;++Ue)it[Ue]=this._parser.precedingCodepoint;this.print(it,0,it.length)}},Se.prototype.sendDeviceAttributesPrimary=function(Ie){Ie.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(fe.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(fe.C0.ESC+"[?6c"))},Se.prototype.sendDeviceAttributesSecondary=function(Ie){Ie.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(fe.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(fe.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(Ie.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(fe.C0.ESC+"[>83;40003;0c"))},Se.prototype._is=function(Ie){return(this._optionsService.options.termName+"").indexOf(Ie)===0},Se.prototype.setMode=function(Ie){for(var Ae=0;Ae<Ie.length;Ae++)switch(Ie.params[Ae]){case 4:this._coreService.modes.insertMode=!0}},Se.prototype.setModePrivate=function(Ie){for(var Ae=0;Ae<Ie.length;Ae++)switch(Ie.params[Ae]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,he.DEFAULT_CHARSET),this._charsetService.setgCharset(1,he.DEFAULT_CHARSET),this._charsetService.setgCharset(2,he.DEFAULT_CHARSET),this._charsetService.setgCharset(3,he.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},Se.prototype.resetMode=function(Ie){for(var Ae=0;Ae<Ie.length;Ae++)switch(Ie.params[Ae]){case 4:this._coreService.modes.insertMode=!1}},Se.prototype.resetModePrivate=function(Ie){for(var Ae=0;Ae<Ie.length;Ae++)switch(Ie.params[Ae]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),Ie.params[Ae]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},Se.prototype._updateAttrColor=function(Ie,Ae,it,Ue,gt){return Ae===2?(Ie|=50331648,Ie&=-16777216,Ie|=ye.AttributeData.fromColorRGB([it,Ue,gt])):Ae===5&&(Ie&=-50331904,Ie|=33554432|255&it),Ie},Se.prototype._extractColor=function(Ie,Ae,it){var Ue=[0,0,-1,0,0,0],gt=0,Ve=0;do{if(Ue[Ve+gt]=Ie.params[Ae+Ve],Ie.hasSubParams(Ae+Ve)){var Tt=Ie.getSubParams(Ae+Ve),ct=0;do Ue[1]===5&&(gt=1),Ue[Ve+ct+1+gt]=Tt[ct];while(++ct<Tt.length&&ct+Ve+1+gt<Ue.length);break}if(Ue[1]===5&&Ve+gt>=2||Ue[1]===2&&Ve+gt>=5)break;Ue[1]&&(gt=1)}while(++Ve+Ae<Ie.length&&Ve+gt<Ue.length);for(ct=2;ct<Ue.length;++ct)Ue[ct]===-1&&(Ue[ct]=0);switch(Ue[0]){case 38:it.fg=this._updateAttrColor(it.fg,Ue[1],Ue[3],Ue[4],Ue[5]);break;case 48:it.bg=this._updateAttrColor(it.bg,Ue[1],Ue[3],Ue[4],Ue[5]);break;case 58:it.extended=it.extended.clone(),it.extended.underlineColor=this._updateAttrColor(it.extended.underlineColor,Ue[1],Ue[3],Ue[4],Ue[5])}return Ve},Se.prototype._processUnderline=function(Ie,Ae){Ae.extended=Ae.extended.clone(),(!~Ie||Ie>5)&&(Ie=1),Ae.extended.underlineStyle=Ie,Ae.fg|=268435456,Ie===0&&(Ae.fg&=-268435457),Ae.updateExtended()},Se.prototype.charAttributes=function(Ie){if(Ie.length===1&&Ie.params[0]===0)return this._curAttrData.fg=ue.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=ue.DEFAULT_ATTR_DATA.bg);for(var Ae,it=Ie.length,Ue=this._curAttrData,gt=0;gt<it;gt++)(Ae=Ie.params[gt])>=30&&Ae<=37?(Ue.fg&=-50331904,Ue.fg|=16777216|Ae-30):Ae>=40&&Ae<=47?(Ue.bg&=-50331904,Ue.bg|=16777216|Ae-40):Ae>=90&&Ae<=97?(Ue.fg&=-50331904,Ue.fg|=16777224|Ae-90):Ae>=100&&Ae<=107?(Ue.bg&=-50331904,Ue.bg|=16777224|Ae-100):Ae===0?(Ue.fg=ue.DEFAULT_ATTR_DATA.fg,Ue.bg=ue.DEFAULT_ATTR_DATA.bg):Ae===1?Ue.fg|=134217728:Ae===3?Ue.bg|=67108864:Ae===4?(Ue.fg|=268435456,this._processUnderline(Ie.hasSubParams(gt)?Ie.getSubParams(gt)[0]:1,Ue)):Ae===5?Ue.fg|=536870912:Ae===7?Ue.fg|=67108864:Ae===8?Ue.fg|=1073741824:Ae===2?Ue.bg|=134217728:Ae===21?this._processUnderline(2,Ue):Ae===22?(Ue.fg&=-134217729,Ue.bg&=-134217729):Ae===23?Ue.bg&=-67108865:Ae===24?Ue.fg&=-268435457:Ae===25?Ue.fg&=-536870913:Ae===27?Ue.fg&=-67108865:Ae===28?Ue.fg&=-1073741825:Ae===39?(Ue.fg&=-67108864,Ue.fg|=16777215&ue.DEFAULT_ATTR_DATA.fg):Ae===49?(Ue.bg&=-67108864,Ue.bg|=16777215&ue.DEFAULT_ATTR_DATA.bg):Ae===38||Ae===48||Ae===58?gt+=this._extractColor(Ie,gt,Ue):Ae===59?(Ue.extended=Ue.extended.clone(),Ue.extended.underlineColor=-1,Ue.updateExtended()):Ae===100?(Ue.fg&=-67108864,Ue.fg|=16777215&ue.DEFAULT_ATTR_DATA.fg,Ue.bg&=-67108864,Ue.bg|=16777215&ue.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",Ae)},Se.prototype.deviceStatus=function(Ie){switch(Ie.params[0]){case 5:this._coreService.triggerDataEvent(fe.C0.ESC+"[0n");break;case 6:var Ae=this._bufferService.buffer.y+1,it=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(fe.C0.ESC+"["+Ae+";"+it+"R")}},Se.prototype.deviceStatusPrivate=function(Ie){switch(Ie.params[0]){case 6:var Ae=this._bufferService.buffer.y+1,it=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(fe.C0.ESC+"[?"+Ae+";"+it+"R")}},Se.prototype.softReset=function(Ie){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=ue.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},Se.prototype.setCursorStyle=function(Ie){var Ae=Ie.params[0]||1;switch(Ae){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var it=Ae%2==1;this._optionsService.options.cursorBlink=it},Se.prototype.setScrollRegion=function(Ie){var Ae,it=Ie.params[0]||1;(Ie.length<2||(Ae=Ie.params[1])>this._bufferService.rows||Ae===0)&&(Ae=this._bufferService.rows),Ae>it&&(this._bufferService.buffer.scrollTop=it-1,this._bufferService.buffer.scrollBottom=Ae-1,this._setCursor(0,0))},Se.prototype.windowOptions=function(Ie){if($e(Ie.params[0],this._optionsService.options.windowOptions)){var Ae=Ie.length>1?Ie.params[1]:0;switch(Ie.params[0]){case 14:Ae!==2&&this._onRequestWindowsOptionsReport.fire(Ce.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(Ce.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(fe.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:Ae!==0&&Ae!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),Ae!==0&&Ae!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:Ae!==0&&Ae!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),Ae!==0&&Ae!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},Se.prototype.saveCursor=function(Ie){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},Se.prototype.restoreCursor=function(Ie){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},Se.prototype.setTitle=function(Ie){this._windowTitle=Ie,this._onTitleChange.fire(Ie)},Se.prototype.setIconName=function(Ie){this._iconName=Ie},Se.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},Se.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},Se.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},Se.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,he.DEFAULT_CHARSET)},Se.prototype.selectCharset=function(Ie){Ie.length===2?Ie[0]!=="/"&&this._charsetService.setgCharset(ze[Ie[0]],he.CHARSETS[Ie[1]]||he.DEFAULT_CHARSET):this.selectDefaultCharset()},Se.prototype.index=function(){this._restrictCursor();var Ie=this._bufferService.buffer;this._bufferService.buffer.y++,Ie.y===Ie.scrollBottom+1?(Ie.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ie.y>=this._bufferService.rows&&(Ie.y=this._bufferService.rows-1),this._restrictCursor()},Se.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},Se.prototype.reverseIndex=function(){this._restrictCursor();var Ie=this._bufferService.buffer;if(Ie.y===Ie.scrollTop){var Ae=Ie.scrollBottom-Ie.scrollTop;Ie.lines.shiftElements(Ie.ybase+Ie.y,Ae,1),Ie.lines.set(Ie.ybase+Ie.y,Ie.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(Ie.scrollTop,Ie.scrollBottom)}else Ie.y--,this._restrictCursor()},Se.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},Se.prototype.reset=function(){this._curAttrData=ue.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=ue.DEFAULT_ATTR_DATA.clone()},Se.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},Se.prototype.setgLevel=function(Ie){this._charsetService.setgLevel(Ie)},Se.prototype.screenAlignmentPattern=function(){var Ie=new ge.CellData;Ie.content=1<<22|69,Ie.fg=this._curAttrData.fg,Ie.bg=this._curAttrData.bg;var Ae=this._bufferService.buffer;this._setCursor(0,0);for(var it=0;it<this._bufferService.rows;++it){var Ue=Ae.ybase+Ae.y+it,gt=Ae.lines.get(Ue);gt&&(gt.fill(Ie),gt.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},Se}(ae.Disposable);ee.InputHandler=Ne},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.DEFAULT_CHARSET=ee.CHARSETS=void 0,ee.CHARSETS={},ee.DEFAULT_CHARSET=ee.CHARSETS.B,ee.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},ee.CHARSETS.A={"#":"\xA3"},ee.CHARSETS.B=void 0,ee.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},ee.CHARSETS.C=ee.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},ee.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},ee.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},ee.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},ee.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},ee.CHARSETS.E=ee.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},ee.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},ee.CHARSETS.H=ee.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},ee.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.Params=void 0;var xe=function(){function Me(Ce,fe){if(Ce===void 0&&(Ce=32),fe===void 0&&(fe=32),this.maxLength=Ce,this.maxSubParamsLength=fe,fe>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(Ce),this.length=0,this._subParams=new Int32Array(fe),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(Ce),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Me.fromArray=function(Ce){var fe=new Me;if(!Ce.length)return fe;for(var he=Ce[0]instanceof Array?1:0;he<Ce.length;++he){var ce=Ce[he];if(ce instanceof Array)for(var ae=0;ae<ce.length;++ae)fe.addSubParam(ce[ae]);else fe.addParam(ce)}return fe},Me.prototype.clone=function(){var Ce=new Me(this.maxLength,this.maxSubParamsLength);return Ce.params.set(this.params),Ce.length=this.length,Ce._subParams.set(this._subParams),Ce._subParamsLength=this._subParamsLength,Ce._subParamsIdx.set(this._subParamsIdx),Ce._rejectDigits=this._rejectDigits,Ce._rejectSubDigits=this._rejectSubDigits,Ce._digitIsSub=this._digitIsSub,Ce},Me.prototype.toArray=function(){for(var Ce=[],fe=0;fe<this.length;++fe){Ce.push(this.params[fe]);var he=this._subParamsIdx[fe]>>8,ce=255&this._subParamsIdx[fe];ce-he>0&&Ce.push(Array.prototype.slice.call(this._subParams,he,ce))}return Ce},Me.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Me.prototype.addParam=function(Ce){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(Ce<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=Ce>2147483647?2147483647:Ce}},Me.prototype.addSubParam=function(Ce){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(Ce<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=Ce>2147483647?2147483647:Ce,this._subParamsIdx[this.length-1]++}},Me.prototype.hasSubParams=function(Ce){return(255&this._subParamsIdx[Ce])-(this._subParamsIdx[Ce]>>8)>0},Me.prototype.getSubParams=function(Ce){var fe=this._subParamsIdx[Ce]>>8,he=255&this._subParamsIdx[Ce];return he-fe>0?this._subParams.subarray(fe,he):null},Me.prototype.getSubParamsAll=function(){for(var Ce={},fe=0;fe<this.length;++fe){var he=this._subParamsIdx[fe]>>8,ce=255&this._subParamsIdx[fe];ce-he>0&&(Ce[fe]=this._subParams.slice(he,ce))}return Ce},Me.prototype.addDigit=function(Ce){var fe;if(!(this._rejectDigits||!(fe=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var he=this._digitIsSub?this._subParams:this.params,ce=he[fe-1];he[fe-1]=~ce?Math.min(10*ce+Ce,2147483647):Ce}},Me}();ee.Params=xe},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.OscHandler=ee.OscParser=void 0;var xe=ne(23),Me=ne(8),Ce=function(){function he(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return he.prototype.addHandler=function(ce,ae){this._handlers[ce]===void 0&&(this._handlers[ce]=[]);var se=this._handlers[ce];return se.push(ae),{dispose:function(){var ve=se.indexOf(ae);ve!==-1&&se.splice(ve,1)}}},he.prototype.setHandler=function(ce,ae){this._handlers[ce]=[ae]},he.prototype.clearHandler=function(ce){this._handlers[ce]&&delete this._handlers[ce]},he.prototype.setHandlerFallback=function(ce){this._handlerFb=ce},he.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},he.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},he.prototype._start=function(){var ce=this._handlers[this._id];if(ce)for(var ae=ce.length-1;ae>=0;ae--)ce[ae].start();else this._handlerFb(this._id,"START")},he.prototype._put=function(ce,ae,se){var ve=this._handlers[this._id];if(ve)for(var ue=ve.length-1;ue>=0;ue--)ve[ue].put(ce,ae,se);else this._handlerFb(this._id,"PUT",Me.utf32ToString(ce,ae,se))},he.prototype._end=function(ce){var ae=this._handlers[this._id];if(ae){for(var se=ae.length-1;se>=0&&ae[se].end(ce)===!1;se--);for(se--;se>=0;se--)ae[se].end(!1)}else this._handlerFb(this._id,"END",ce)},he.prototype.start=function(){this.reset(),this._id=-1,this._state=1},he.prototype.put=function(ce,ae,se){if(this._state!==3){if(this._state===1)for(;ae<se;){var ve=ce[ae++];if(ve===59){this._state=2,this._start();break}if(ve<48||57<ve)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+ve-48}this._state===2&&se-ae>0&&this._put(ce,ae,se)}},he.prototype.end=function(ce){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(ce)),this._id=-1,this._state=0)},he}();ee.OscParser=Ce;var fe=function(){function he(ce){this._handler=ce,this._data="",this._hitLimit=!1}return he.prototype.start=function(){this._data="",this._hitLimit=!1},he.prototype.put=function(ce,ae,se){this._hitLimit||(this._data+=Me.utf32ToString(ce,ae,se),this._data.length>xe.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},he.prototype.end=function(ce){var ae;return this._hitLimit?ae=!1:ce&&(ae=this._handler(this._data)),this._data="",this._hitLimit=!1,ae},he}();ee.OscHandler=fe},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.PAYLOAD_LIMIT=void 0,ee.PAYLOAD_LIMIT=1e7},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.DcsHandler=ee.DcsParser=void 0;var xe=ne(8),Me=ne(21),Ce=ne(23),fe=[],he=function(){function ae(){this._handlers=Object.create(null),this._active=fe,this._ident=0,this._handlerFb=function(){}}return ae.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},ae.prototype.addHandler=function(se,ve){this._handlers[se]===void 0&&(this._handlers[se]=[]);var ue=this._handlers[se];return ue.push(ve),{dispose:function(){var pe=ue.indexOf(ve);pe!==-1&&ue.splice(pe,1)}}},ae.prototype.setHandler=function(se,ve){this._handlers[se]=[ve]},ae.prototype.clearHandler=function(se){this._handlers[se]&&delete this._handlers[se]},ae.prototype.setHandlerFallback=function(se){this._handlerFb=se},ae.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=fe,this._ident=0},ae.prototype.hook=function(se,ve){if(this.reset(),this._ident=se,this._active=this._handlers[se]||fe,this._active.length)for(var ue=this._active.length-1;ue>=0;ue--)this._active[ue].hook(ve);else this._handlerFb(this._ident,"HOOK",ve)},ae.prototype.put=function(se,ve,ue){if(this._active.length)for(var pe=this._active.length-1;pe>=0;pe--)this._active[pe].put(se,ve,ue);else this._handlerFb(this._ident,"PUT",xe.utf32ToString(se,ve,ue))},ae.prototype.unhook=function(se){if(this._active.length){for(var ve=this._active.length-1;ve>=0&&this._active[ve].unhook(se)===!1;ve--);for(ve--;ve>=0;ve--)this._active[ve].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",se);this._active=fe,this._ident=0},ae}();ee.DcsParser=he;var ce=function(){function ae(se){this._handler=se,this._data="",this._hitLimit=!1}return ae.prototype.hook=function(se){this._params=se.clone(),this._data="",this._hitLimit=!1},ae.prototype.put=function(se,ve,ue){this._hitLimit||(this._data+=xe.utf32ToString(se,ve,ue),this._data.length>Ce.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},ae.prototype.unhook=function(se){var ve;return this._hitLimit?ve=!1:se&&(ve=this._handler(this._data,this._params||new Me.Params)),this._params=void 0,this._data="",this._hitLimit=!1,ve},ae}();ee.DcsHandler=ce},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.removeTerminalFromCache=ee.acquireCharAtlas=void 0;var xe=ne(26),Me=ne(43),Ce=[];ee.acquireCharAtlas=function(fe,he,ce,ae,se){for(var ve=xe.generateConfig(ae,se,fe,ce),ue=0;ue<Ce.length;ue++){var pe=(oe=Ce[ue]).ownedBy.indexOf(he);if(pe>=0){if(xe.configEquals(oe.config,ve))return oe.atlas;oe.ownedBy.length===1?(oe.atlas.dispose(),Ce.splice(ue,1)):oe.ownedBy.splice(pe,1);break}}for(ue=0;ue<Ce.length;ue++){var oe=Ce[ue];if(xe.configEquals(oe.config,ve))return oe.ownedBy.push(he),oe.atlas}var ge={atlas:new Me.DynamicCharAtlas(document,ve),config:ve,ownedBy:[he]};return Ce.push(ge),ge.atlas},ee.removeTerminalFromCache=function(fe){for(var he=0;he<Ce.length;he++){var ce=Ce[he].ownedBy.indexOf(fe);if(ce!==-1){Ce[he].ownedBy.length===1?(Ce[he].atlas.dispose(),Ce.splice(he,1)):Ce[he].ownedBy.splice(ce,1);break}}}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.is256Color=ee.configEquals=ee.generateConfig=void 0;var xe=ne(3);ee.generateConfig=function(Me,Ce,fe,he){var ce={foreground:he.foreground,background:he.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:he.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Me,scaledCharHeight:Ce,fontFamily:fe.fontFamily,fontSize:fe.fontSize,fontWeight:fe.fontWeight,fontWeightBold:fe.fontWeightBold,allowTransparency:fe.allowTransparency,colors:ce}},ee.configEquals=function(Me,Ce){for(var fe=0;fe<Me.colors.ansi.length;fe++)if(Me.colors.ansi[fe].rgba!==Ce.colors.ansi[fe].rgba)return!1;return Me.devicePixelRatio===Ce.devicePixelRatio&&Me.fontFamily===Ce.fontFamily&&Me.fontSize===Ce.fontSize&&Me.fontWeight===Ce.fontWeight&&Me.fontWeightBold===Ce.fontWeightBold&&Me.allowTransparency===Ce.allowTransparency&&Me.scaledCharWidth===Ce.scaledCharWidth&&Me.scaledCharHeight===Ce.scaledCharHeight&&Me.colors.foreground===Ce.colors.foreground&&Me.colors.background===Ce.colors.background},ee.is256Color=function(Me){return Me<xe.DEFAULT_COLOR}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.ColorManager=ee.DEFAULT_ANSI_COLORS=void 0;var xe=ne(10),Me=ne(45),Ce=xe.css.toColor("#ffffff"),fe=xe.css.toColor("#000000"),he=xe.css.toColor("#ffffff"),ce=xe.css.toColor("#000000"),ae={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};ee.DEFAULT_ANSI_COLORS=function(){for(var ve=[xe.css.toColor("#2e3436"),xe.css.toColor("#cc0000"),xe.css.toColor("#4e9a06"),xe.css.toColor("#c4a000"),xe.css.toColor("#3465a4"),xe.css.toColor("#75507b"),xe.css.toColor("#06989a"),xe.css.toColor("#d3d7cf"),xe.css.toColor("#555753"),xe.css.toColor("#ef2929"),xe.css.toColor("#8ae234"),xe.css.toColor("#fce94f"),xe.css.toColor("#729fcf"),xe.css.toColor("#ad7fa8"),xe.css.toColor("#34e2e2"),xe.css.toColor("#eeeeec")],ue=[0,95,135,175,215,255],pe=0;pe<216;pe++){var oe=ue[pe/36%6|0],ge=ue[pe/6%6|0],ye=ue[pe%6];ve.push({css:xe.channels.toCss(oe,ge,ye),rgba:xe.channels.toRgba(oe,ge,ye)})}for(pe=0;pe<24;pe++){var we=8+10*pe;ve.push({css:xe.channels.toCss(we,we,we),rgba:xe.channels.toRgba(we,we,we)})}return ve}();var se=function(){function ve(ue,pe){this.allowTransparency=pe;var oe=ue.createElement("canvas");oe.width=1,oe.height=1;var ge=oe.getContext("2d");if(!ge)throw new Error("Could not get rendering context");this._ctx=ge,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Me.ColorContrastCache,this.colors={foreground:Ce,background:fe,cursor:he,cursorAccent:ce,selectionTransparent:ae,selectionOpaque:xe.color.blend(fe,ae),ansi:ee.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return ve.prototype.onOptionsChange=function(ue){ue==="minimumContrastRatio"&&this._contrastCache.clear()},ve.prototype.setTheme=function(ue){ue===void 0&&(ue={}),this.colors.foreground=this._parseColor(ue.foreground,Ce),this.colors.background=this._parseColor(ue.background,fe),this.colors.cursor=this._parseColor(ue.cursor,he,!0),this.colors.cursorAccent=this._parseColor(ue.cursorAccent,ce,!0),this.colors.selectionTransparent=this._parseColor(ue.selection,ae,!0),this.colors.selectionOpaque=xe.color.blend(this.colors.background,this.colors.selectionTransparent),xe.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=xe.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(ue.black,ee.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(ue.red,ee.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(ue.green,ee.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(ue.yellow,ee.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(ue.blue,ee.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(ue.magenta,ee.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(ue.cyan,ee.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(ue.white,ee.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(ue.brightBlack,ee.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(ue.brightRed,ee.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(ue.brightGreen,ee.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(ue.brightYellow,ee.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(ue.brightBlue,ee.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(ue.brightMagenta,ee.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(ue.brightCyan,ee.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(ue.brightWhite,ee.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},ve.prototype._parseColor=function(ue,pe,oe){if(oe===void 0&&(oe=this.allowTransparency),ue===void 0)return pe;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=ue,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+ue+" is invalid using fallback "+pe.css),pe;this._ctx.fillRect(0,0,1,1);var ge=this._ctx.getImageData(0,0,1,1).data;if(ge[3]!==255){if(!oe)return console.warn("Color: "+ue+" is using transparency, but allowTransparency is false. Using fallback "+pe.css+"."),pe;var ye=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(Ne){return Number(Ne)}),we=ye[0],Be=ye[1],ze=ye[2],$e=ye[3],Le=Math.round(255*$e);return{rgba:xe.channels.toRgba(we,Be,ze,Le),css:ue}}return{css:this._ctx.fillStyle,rgba:xe.channels.toRgba(ge[0],ge[1],ge[2],ge[3])}},ve}();ee.ColorManager=se},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.throwIfFalsy=void 0,ee.throwIfFalsy=function(xe){if(!xe)throw new Error("value must not be falsy");return xe}},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(se,ve){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,pe){ue.__proto__=pe}||function(ue,pe){for(var oe in pe)pe.hasOwnProperty(oe)&&(ue[oe]=pe[oe])})(se,ve)},function(se,ve){function ue(){this.constructor=se}xe(se,ve),se.prototype=ve===null?Object.create(ve):(ue.prototype=ve.prototype,new ue)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.CharacterJoinerRegistry=ee.JoinedCellData=void 0;var Ce=ne(6),fe=ne(3),he=ne(4),ce=function(se){function ve(ue,pe,oe){var ge=se.call(this)||this;return ge.content=0,ge.combinedData="",ge.fg=ue.fg,ge.bg=ue.bg,ge.combinedData=pe,ge._width=oe,ge}return Me(ve,se),ve.prototype.isCombined=function(){return 2097152},ve.prototype.getWidth=function(){return this._width},ve.prototype.getChars=function(){return this.combinedData},ve.prototype.getCode=function(){return 2097151},ve.prototype.setFromCharData=function(ue){throw new Error("not implemented")},ve.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},ve}(Ce.AttributeData);ee.JoinedCellData=ce;var ae=function(){function se(ve){this._bufferService=ve,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new he.CellData}return se.prototype.registerCharacterJoiner=function(ve){var ue={id:this._nextCharacterJoinerId++,handler:ve};return this._characterJoiners.push(ue),ue.id},se.prototype.deregisterCharacterJoiner=function(ve){for(var ue=0;ue<this._characterJoiners.length;ue++)if(this._characterJoiners[ue].id===ve)return this._characterJoiners.splice(ue,1),!0;return!1},se.prototype.getJoinedCharacters=function(ve){if(this._characterJoiners.length===0)return[];var ue=this._bufferService.buffer.lines.get(ve);if(!ue||ue.length===0)return[];for(var pe=[],oe=ue.translateToString(!0),ge=0,ye=0,we=0,Be=ue.getFg(0),ze=ue.getBg(0),$e=0;$e<ue.getTrimmedLength();$e++)if(ue.loadCell($e,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==Be||this._workCell.bg!==ze){if($e-ge>1)for(var Le=this._getJoinedRanges(oe,we,ye,ue,ge),Ne=0;Ne<Le.length;Ne++)pe.push(Le[Ne]);ge=$e,we=ye,Be=this._workCell.fg,ze=this._workCell.bg}ye+=this._workCell.getChars().length||fe.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ge>1)for(Le=this._getJoinedRanges(oe,we,ye,ue,ge),Ne=0;Ne<Le.length;Ne++)pe.push(Le[Ne]);return pe},se.prototype._getJoinedRanges=function(ve,ue,pe,oe,ge){for(var ye=ve.substring(ue,pe),we=this._characterJoiners[0].handler(ye),Be=1;Be<this._characterJoiners.length;Be++)for(var ze=this._characterJoiners[Be].handler(ye),$e=0;$e<ze.length;$e++)se._mergeRanges(we,ze[$e]);return this._stringRangesToCellRanges(we,oe,ge),we},se.prototype._stringRangesToCellRanges=function(ve,ue,pe){var oe=0,ge=!1,ye=0,we=ve[oe];if(we){for(var Be=pe;Be<this._bufferService.cols;Be++){var ze=ue.getWidth(Be),$e=ue.getString(Be).length||fe.WHITESPACE_CELL_CHAR.length;if(ze!==0){if(!ge&&we[0]<=ye&&(we[0]=Be,ge=!0),we[1]<=ye){if(we[1]=Be,!(we=ve[++oe]))break;we[0]<=ye?(we[0]=Be,ge=!0):ge=!1}ye+=$e}}we&&(we[1]=this._bufferService.cols)}},se._mergeRanges=function(ve,ue){for(var pe=!1,oe=0;oe<ve.length;oe++){var ge=ve[oe];if(pe){if(ue[1]<=ge[0])return ve[oe-1][1]=ue[1],ve;if(ue[1]<=ge[1])return ve[oe-1][1]=Math.max(ue[1],ge[1]),ve.splice(oe,1),ve;ve.splice(oe,1),oe--}else{if(ue[1]<=ge[0])return ve.splice(oe,0,ue),ve;if(ue[1]<=ge[1])return ge[0]=Math.min(ue[0],ge[0]),ve;ue[0]<ge[1]&&(ge[0]=Math.min(ue[0],ge[0]),pe=!0)}}return pe?ve[ve.length-1][1]=ue[1]:ve.push(ue),ve},se}();ee.CharacterJoinerRegistry=ae},function(kt,ee,ne){"use strict";function xe(Me,Ce){var fe=Ce.getBoundingClientRect();return[Me.clientX-fe.left,Me.clientY-fe.top]}Object.defineProperty(ee,"__esModule",{value:!0}),ee.getRawByteCoords=ee.getCoords=ee.getCoordsRelativeToElement=void 0,ee.getCoordsRelativeToElement=xe,ee.getCoords=function(Me,Ce,fe,he,ce,ae,se,ve){if(ce){var ue=xe(Me,Ce);if(ue)return ue[0]=Math.ceil((ue[0]+(ve?ae/2:0))/ae),ue[1]=Math.ceil(ue[1]/se),ue[0]=Math.min(Math.max(ue[0],1),fe+(ve?1:0)),ue[1]=Math.min(Math.max(ue[1],1),he),ue}},ee.getRawByteCoords=function(Me){if(Me)return{x:Me[0]+32,y:Me[1]+32}}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.RenderDebouncer=void 0;var xe=function(){function Me(Ce){this._renderCallback=Ce}return Me.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Me.prototype.refresh=function(Ce,fe,he){var ce=this;this._rowCount=he,Ce=Ce!==void 0?Ce:0,fe=fe!==void 0?fe:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,Ce):Ce,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,fe):fe,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return ce._innerRefresh()}))},Me.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var Ce=Math.max(this._rowStart,0),fe=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(Ce,fe)}},Me}();ee.RenderDebouncer=xe},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(fe,he){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ce,ae){ce.__proto__=ae}||function(ce,ae){for(var se in ae)ae.hasOwnProperty(se)&&(ce[se]=ae[se])})(fe,he)},function(fe,he){function ce(){this.constructor=fe}xe(fe,he),fe.prototype=he===null?Object.create(he):(ce.prototype=he.prototype,new ce)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.ScreenDprMonitor=void 0;var Ce=function(fe){function he(){var ce=fe!==null&&fe.apply(this,arguments)||this;return ce._currentDevicePixelRatio=window.devicePixelRatio,ce}return Me(he,fe),he.prototype.setListener=function(ce){var ae=this;this._listener&&this.clearListener(),this._listener=ce,this._outerListener=function(){ae._listener&&(ae._listener(window.devicePixelRatio,ae._currentDevicePixelRatio),ae._updateDpr())},this._updateDpr()},he.prototype.dispose=function(){fe.prototype.dispose.call(this),this.clearListener()},he.prototype._updateDpr=function(){var ce;this._outerListener&&((ce=this._resolutionMediaMatchList)===null||ce===void 0||ce.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},he.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},he}(ne(2).Disposable);ee.ScreenDprMonitor=Ce},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.clone=void 0,ee.clone=function xe(Me,Ce){if(Ce===void 0&&(Ce=5),typeof Me!="object")return Me;var fe=Array.isArray(Me)?[]:{};for(var he in Me)fe[he]=Ce<=1?Me[he]:Me[he]?xe(Me[he],Ce-1):Me[he];return fe}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.Terminal=void 0;var xe=ne(4),Me=ne(35),Ce=ne(18),fe=ne(0),he=ne(83),ce=function(){function oe(ge){this._core=new Me.Terminal(ge),this._addonManager=new he.AddonManager}return oe.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(oe.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new ue(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"unicode",{get:function(){return this._checkProposedApi(),new pe(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"buffer",{get:function(){return this._checkProposedApi(),new se(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),oe.prototype.blur=function(){this._core.blur()},oe.prototype.focus=function(){this._core.focus()},oe.prototype.resize=function(ge,ye){this._verifyIntegers(ge,ye),this._core.resize(ge,ye)},oe.prototype.open=function(ge){this._core.open(ge)},oe.prototype.attachCustomKeyEventHandler=function(ge){this._core.attachCustomKeyEventHandler(ge)},oe.prototype.registerLinkMatcher=function(ge,ye,we){return this._checkProposedApi(),this._core.registerLinkMatcher(ge,ye,we)},oe.prototype.deregisterLinkMatcher=function(ge){this._checkProposedApi(),this._core.deregisterLinkMatcher(ge)},oe.prototype.registerLinkProvider=function(ge){return this._checkProposedApi(),this._core.registerLinkProvider(ge)},oe.prototype.registerCharacterJoiner=function(ge){return this._checkProposedApi(),this._core.registerCharacterJoiner(ge)},oe.prototype.deregisterCharacterJoiner=function(ge){this._checkProposedApi(),this._core.deregisterCharacterJoiner(ge)},oe.prototype.registerMarker=function(ge){return this._checkProposedApi(),this._verifyIntegers(ge),this._core.addMarker(ge)},oe.prototype.addMarker=function(ge){return this.registerMarker(ge)},oe.prototype.hasSelection=function(){return this._core.hasSelection()},oe.prototype.select=function(ge,ye,we){this._verifyIntegers(ge,ye,we),this._core.select(ge,ye,we)},oe.prototype.getSelection=function(){return this._core.getSelection()},oe.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},oe.prototype.clearSelection=function(){this._core.clearSelection()},oe.prototype.selectAll=function(){this._core.selectAll()},oe.prototype.selectLines=function(ge,ye){this._verifyIntegers(ge,ye),this._core.selectLines(ge,ye)},oe.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},oe.prototype.scrollLines=function(ge){this._verifyIntegers(ge),this._core.scrollLines(ge)},oe.prototype.scrollPages=function(ge){this._verifyIntegers(ge),this._core.scrollPages(ge)},oe.prototype.scrollToTop=function(){this._core.scrollToTop()},oe.prototype.scrollToBottom=function(){this._core.scrollToBottom()},oe.prototype.scrollToLine=function(ge){this._verifyIntegers(ge),this._core.scrollToLine(ge)},oe.prototype.clear=function(){this._core.clear()},oe.prototype.write=function(ge,ye){this._core.write(ge,ye)},oe.prototype.writeUtf8=function(ge,ye){this._core.write(ge,ye)},oe.prototype.writeln=function(ge,ye){this._core.write(ge),this._core.write(`\r
`,ye)},oe.prototype.paste=function(ge){this._core.paste(ge)},oe.prototype.getOption=function(ge){return this._core.optionsService.getOption(ge)},oe.prototype.setOption=function(ge,ye){this._core.optionsService.setOption(ge,ye)},oe.prototype.refresh=function(ge,ye){this._verifyIntegers(ge,ye),this._core.refresh(ge,ye)},oe.prototype.reset=function(){this._core.reset()},oe.prototype.loadAddon=function(ge){return this._addonManager.loadAddon(this,ge)},Object.defineProperty(oe,"strings",{get:function(){return Ce},enumerable:!1,configurable:!0}),oe.prototype._verifyIntegers=function(){for(var ge=[],ye=0;ye<arguments.length;ye++)ge[ye]=arguments[ye];for(var we=0,Be=ge;we<Be.length;we++){var ze=Be[we];if(ze===1/0||isNaN(ze)||ze%1!=0)throw new Error("This API only accepts integers")}},oe}();ee.Terminal=ce;var ae=function(){function oe(ge,ye){this._buffer=ge,this.type=ye}return oe.prototype.init=function(ge){return this._buffer=ge,this},Object.defineProperty(oe.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),oe.prototype.getLine=function(ge){var ye=this._buffer.lines.get(ge);if(ye)return new ve(ye)},oe.prototype.getNullCell=function(){return new xe.CellData},oe}(),se=function(){function oe(ge){var ye=this;this._buffers=ge,this._onBufferChange=new fe.EventEmitter,this._normal=new ae(this._buffers.normal,"normal"),this._alternate=new ae(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return ye._onBufferChange.fire(ye.active)})}return Object.defineProperty(oe.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),oe}(),ve=function(){function oe(ge){this._line=ge}return Object.defineProperty(oe.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),oe.prototype.getCell=function(ge,ye){if(!(ge<0||ge>=this._line.length))return ye?(this._line.loadCell(ge,ye),ye):this._line.loadCell(ge,new xe.CellData)},oe.prototype.translateToString=function(ge,ye,we){return this._line.translateToString(ge,ye,we)},oe}(),ue=function(){function oe(ge){this._core=ge}return oe.prototype.registerCsiHandler=function(ge,ye){return this._core.addCsiHandler(ge,function(we){return ye(we.toArray())})},oe.prototype.addCsiHandler=function(ge,ye){return this.registerCsiHandler(ge,ye)},oe.prototype.registerDcsHandler=function(ge,ye){return this._core.addDcsHandler(ge,function(we,Be){return ye(we,Be.toArray())})},oe.prototype.addDcsHandler=function(ge,ye){return this.registerDcsHandler(ge,ye)},oe.prototype.registerEscHandler=function(ge,ye){return this._core.addEscHandler(ge,ye)},oe.prototype.addEscHandler=function(ge,ye){return this.registerEscHandler(ge,ye)},oe.prototype.registerOscHandler=function(ge,ye){return this._core.addOscHandler(ge,ye)},oe.prototype.addOscHandler=function(ge,ye){return this.registerOscHandler(ge,ye)},oe}(),pe=function(){function oe(ge){this._core=ge}return oe.prototype.register=function(ge){this._core.unicodeService.register(ge)},Object.defineProperty(oe.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(ge){this._core.unicodeService.activeVersion=ge},enumerable:!1,configurable:!0}),oe}()},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(Ot,We){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,ut){lt.__proto__=ut}||function(lt,ut){for(var St in ut)ut.hasOwnProperty(St)&&(lt[St]=ut[St])})(Ot,We)},function(Ot,We){function lt(){this.constructor=Ot}xe(Ot,We),Ot.prototype=We===null?Object.create(We):(lt.prototype=We.prototype,new lt)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.Terminal=void 0;var Ce=ne(36),fe=ne(37),he=ne(38),ce=ne(12),ae=ne(19),se=ne(40),ve=ne(50),ue=ne(51),pe=ne(11),oe=ne(7),ge=ne(18),ye=ne(54),we=ne(55),Be=ne(56),ze=ne(57),$e=ne(59),Le=ne(0),Ne=ne(16),Re=ne(27),Se=ne(60),Ie=ne(5),Ae=ne(61),it=ne(62),Ue=ne(63),gt=ne(64),Ve=ne(65),Tt=typeof window!="undefined"?window.document:null,ct=function(Ot){function We(lt){lt===void 0&&(lt={});var ut=Ot.call(this,lt)||this;return ut.browser=pe,ut._keyDownHandled=!1,ut._onCursorMove=new Le.EventEmitter,ut._onKey=new Le.EventEmitter,ut._onRender=new Le.EventEmitter,ut._onSelectionChange=new Le.EventEmitter,ut._onTitleChange=new Le.EventEmitter,ut._onFocus=new Le.EventEmitter,ut._onBlur=new Le.EventEmitter,ut._onA11yCharEmitter=new Le.EventEmitter,ut._onA11yTabEmitter=new Le.EventEmitter,ut._setup(),ut.linkifier=ut._instantiationService.createInstance(ve.Linkifier),ut.linkifier2=ut.register(ut._instantiationService.createInstance(Ue.Linkifier2)),ut.register(ut._inputHandler.onRequestBell(function(){return ut.bell()})),ut.register(ut._inputHandler.onRequestRefreshRows(function(St,qe){return ut.refresh(St,qe)})),ut.register(ut._inputHandler.onRequestReset(function(){return ut.reset()})),ut.register(ut._inputHandler.onRequestScroll(function(St,qe){return ut.scroll(St,qe||void 0)})),ut.register(ut._inputHandler.onRequestWindowsOptionsReport(function(St){return ut._reportWindowsOptions(St)})),ut.register(Le.forwardEvent(ut._inputHandler.onCursorMove,ut._onCursorMove)),ut.register(Le.forwardEvent(ut._inputHandler.onTitleChange,ut._onTitleChange)),ut.register(Le.forwardEvent(ut._inputHandler.onA11yChar,ut._onA11yCharEmitter)),ut.register(Le.forwardEvent(ut._inputHandler.onA11yTab,ut._onA11yTabEmitter)),ut.register(ut._bufferService.onResize(function(St){return ut._afterResize(St.cols,St.rows)})),ut}return Me(We,Ot),Object.defineProperty(We.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),We.prototype.dispose=function(){var lt,ut,St;this._isDisposed||(Ot.prototype.dispose.call(this),(lt=this._renderService)===null||lt===void 0||lt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(St=(ut=this.element)===null||ut===void 0?void 0:ut.parentNode)===null||St===void 0||St.removeChild(this.element))},We.prototype._setup=function(){Ot.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(We.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),We.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},We.prototype._updateOptions=function(lt){var ut,St,qe,Ze;switch(Ot.prototype._updateOptions.call(this,lt),lt){case"fontFamily":case"fontSize":(ut=this._renderService)===null||ut===void 0||ut.clear(),(St=this._charSizeService)===null||St===void 0||St.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(qe=this.viewport)===null||qe===void 0||qe.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new Be.AccessibilityManager(this,this._renderService)):((Ze=this._accessibilityManager)===null||Ze===void 0||Ze.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},We.prototype._onTextAreaFocus=function(lt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(ce.C0.ESC+"[I"),this.updateCursorStyle(lt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},We.prototype.blur=function(){var lt;return(lt=this.textarea)===null||lt===void 0?void 0:lt.blur()},We.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(ce.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},We.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var lt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),ut=this._bufferService.buffer.y*lt,St=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=St+"px",this.textarea.style.top=ut+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=lt+"px",this.textarea.style.lineHeight=lt+"px",this.textarea.style.zIndex="-5"}},We.prototype._initGlobal=function(){var lt=this;this._bindKeys(),this.register(oe.addDisposableDomListener(this.element,"copy",function(St){lt.hasSelection()&&he.copyHandler(St,lt._selectionService)}));var ut=function(St){return he.handlePasteEvent(St,lt.textarea,lt._coreService)};this.register(oe.addDisposableDomListener(this.textarea,"paste",ut)),this.register(oe.addDisposableDomListener(this.element,"paste",ut)),pe.isFirefox?this.register(oe.addDisposableDomListener(this.element,"mousedown",function(St){St.button===2&&he.rightClickHandler(St,lt.textarea,lt.screenElement,lt._selectionService,lt.options.rightClickSelectsWord)})):this.register(oe.addDisposableDomListener(this.element,"contextmenu",function(St){he.rightClickHandler(St,lt.textarea,lt.screenElement,lt._selectionService,lt.options.rightClickSelectsWord)})),pe.isLinux&&this.register(oe.addDisposableDomListener(this.element,"auxclick",function(St){St.button===1&&he.moveTextAreaUnderMouseCursor(St,lt.textarea,lt.screenElement)}))},We.prototype._bindKeys=function(){var lt=this;this.register(oe.addDisposableDomListener(this.textarea,"keyup",function(ut){return lt._keyUp(ut)},!0)),this.register(oe.addDisposableDomListener(this.textarea,"keydown",function(ut){return lt._keyDown(ut)},!0)),this.register(oe.addDisposableDomListener(this.textarea,"keypress",function(ut){return lt._keyPress(ut)},!0)),this.register(oe.addDisposableDomListener(this.textarea,"compositionstart",function(){return lt._compositionHelper.compositionstart()})),this.register(oe.addDisposableDomListener(this.textarea,"compositionupdate",function(ut){return lt._compositionHelper.compositionupdate(ut)})),this.register(oe.addDisposableDomListener(this.textarea,"compositionend",function(){return lt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return lt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(ut){return lt._queueLinkification(ut.start,ut.end)}))},We.prototype.open=function(lt){var ut=this;if(!lt)throw new Error("Terminal requires a parent element.");Tt.body.contains(lt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=lt.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),lt.appendChild(this.element);var St=Tt.createDocumentFragment();this._viewportElement=Tt.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),St.appendChild(this._viewportElement),this._viewportScrollArea=Tt.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=Tt.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=Tt.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),St.appendChild(this.screenElement),this.textarea=Tt.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ge.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(oe.addDisposableDomListener(this.textarea,"focus",function(wt){return ut._onTextAreaFocus(wt)})),this.register(oe.addDisposableDomListener(this.textarea,"blur",function(){return ut._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var qe=this._instantiationService.createInstance(gt.CoreBrowserService,this.textarea);this._instantiationService.setService(Ie.ICoreBrowserService,qe),this._charSizeService=this._instantiationService.createInstance(Ae.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(Ie.ICharSizeService,this._charSizeService),this._compositionView=Tt.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Ce.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(St),this._theme=this.options.theme||this._theme,this._colorManager=new Re.ColorManager(Tt,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(wt){return ut._colorManager.onOptionsChange(wt)})),this._colorManager.setTheme(this._theme);var Ze=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(Se.RenderService,Ze,this.rows,this.screenElement)),this._instantiationService.setService(Ie.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(wt){return ut._onRender.fire(wt)})),this.onResize(function(wt){return ut._renderService.resize(wt.cols,wt.rows)}),this._soundService=this._instantiationService.createInstance(ye.SoundService),this._instantiationService.setService(Ie.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(it.MouseService),this._instantiationService.setService(Ie.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(fe.Viewport,function(wt,Wt){return ut.scrollLines(wt,Wt)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return ut.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){ut._renderService.onCursorMove(),ut._syncTextArea()})),this.register(this.onResize(function(){return ut._renderService.onResize(ut.cols,ut.rows)})),this.register(this.onBlur(function(){return ut._renderService.onBlur()})),this.register(this.onFocus(function(){return ut._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return ut.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(ue.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(Ie.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(wt){return ut.scrollLines(wt.amount,wt.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return ut._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(wt){return ut._renderService.onSelectionChanged(wt.start,wt.end,wt.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(wt){ut.textarea.value=wt,ut.textarea.focus(),ut.textarea.select()})),this.register(this.onScroll(function(){ut.viewport.syncScrollArea(),ut._selectionService.refresh()})),this.register(oe.addDisposableDomListener(this._viewportElement,"scroll",function(){return ut._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(we.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return ut._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(oe.addDisposableDomListener(this.element,"mousedown",function(wt){return ut._selectionService.onMouseDown(wt)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new Be.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},We.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(se.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(ze.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},We.prototype._setTheme=function(lt){var ut,St,qe;this._theme=lt,(ut=this._colorManager)===null||ut===void 0||ut.setTheme(lt),(St=this._renderService)===null||St===void 0||St.setColors(this._colorManager.colors),(qe=this.viewport)===null||qe===void 0||qe.onThemeChange(this._colorManager.colors)},We.prototype.bindMouse=function(){var lt=this,ut=this,St=this.element;function qe(vt){var jt,yn,Xt=ut._mouseService.getRawByteCoords(vt,ut.screenElement,ut.cols,ut.rows);if(!Xt)return!1;switch(vt.overrideType||vt.type){case"mousemove":yn=32,vt.buttons===void 0?(jt=3,vt.button!==void 0&&(jt=vt.button<3?vt.button:3)):jt=1&vt.buttons?0:4&vt.buttons?1:2&vt.buttons?2:3;break;case"mouseup":yn=0,jt=vt.button<3?vt.button:3;break;case"mousedown":yn=1,jt=vt.button<3?vt.button:3;break;case"wheel":vt.deltaY!==0&&(yn=vt.deltaY<0?0:1),jt=4;break;default:return!1}return!(yn===void 0||jt===void 0||jt>4)&&ut._coreMouseService.triggerMouseEvent({col:Xt.x-33,row:Xt.y-33,button:jt,action:yn,ctrl:vt.ctrlKey,alt:vt.altKey,shift:vt.shiftKey})}var Ze={mouseup:null,wheel:null,mousedrag:null,mousemove:null},wt=function(vt){return qe(vt),vt.buttons||(lt._document.removeEventListener("mouseup",Ze.mouseup),Ze.mousedrag&&lt._document.removeEventListener("mousemove",Ze.mousedrag)),lt.cancel(vt)},Wt=function(vt){return qe(vt),vt.preventDefault(),lt.cancel(vt)},Kt=function(vt){vt.buttons&&qe(vt)},_t=function(vt){vt.buttons||qe(vt)};this.register(this._coreMouseService.onProtocolChange(function(vt){vt?(lt.optionsService.options.logLevel==="debug"&&lt._logService.debug("Binding to mouse events:",lt._coreMouseService.explainEvents(vt)),lt.element.classList.add("enable-mouse-events"),lt._selectionService.disable()):(lt._logService.debug("Unbinding from mouse events."),lt.element.classList.remove("enable-mouse-events"),lt._selectionService.enable()),8&vt?Ze.mousemove||(St.addEventListener("mousemove",_t),Ze.mousemove=_t):(St.removeEventListener("mousemove",Ze.mousemove),Ze.mousemove=null),16&vt?Ze.wheel||(St.addEventListener("wheel",Wt,{passive:!1}),Ze.wheel=Wt):(St.removeEventListener("wheel",Ze.wheel),Ze.wheel=null),2&vt?Ze.mouseup||(Ze.mouseup=wt):(lt._document.removeEventListener("mouseup",Ze.mouseup),Ze.mouseup=null),4&vt?Ze.mousedrag||(Ze.mousedrag=Kt):(lt._document.removeEventListener("mousemove",Ze.mousedrag),Ze.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(oe.addDisposableDomListener(St,"mousedown",function(vt){if(vt.preventDefault(),lt.focus(),lt._coreMouseService.areMouseEventsActive&&!lt._selectionService.shouldForceSelection(vt))return qe(vt),Ze.mouseup&&lt._document.addEventListener("mouseup",Ze.mouseup),Ze.mousedrag&&lt._document.addEventListener("mousemove",Ze.mousedrag),lt.cancel(vt)})),this.register(oe.addDisposableDomListener(St,"wheel",function(vt){if(!Ze.wheel){if(!lt.buffer.hasScrollback){var jt=lt.viewport.getLinesScrolled(vt);if(jt===0)return;for(var yn=ce.C0.ESC+(lt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(vt.deltaY<0?"A":"B"),Xt="",Ln=0;Ln<Math.abs(jt);Ln++)Xt+=yn;lt._coreService.triggerDataEvent(Xt,!0)}}},{passive:!0})),this.register(oe.addDisposableDomListener(St,"wheel",function(vt){if(!Ze.wheel)return lt.viewport.onWheel(vt)?void 0:lt.cancel(vt)},{passive:!1})),this.register(oe.addDisposableDomListener(St,"touchstart",function(vt){if(!lt._coreMouseService.areMouseEventsActive)return lt.viewport.onTouchStart(vt),lt.cancel(vt)},{passive:!0})),this.register(oe.addDisposableDomListener(St,"touchmove",function(vt){if(!lt._coreMouseService.areMouseEventsActive)return lt.viewport.onTouchMove(vt)?void 0:lt.cancel(vt)},{passive:!1}))},We.prototype.refresh=function(lt,ut){var St;(St=this._renderService)===null||St===void 0||St.refreshRows(lt,ut)},We.prototype._queueLinkification=function(lt,ut){var St;(St=this.linkifier)===null||St===void 0||St.linkifyRows(lt,ut)},We.prototype.updateCursorStyle=function(lt){this._selectionService&&this._selectionService.shouldColumnSelect(lt)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},We.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},We.prototype.scrollLines=function(lt,ut){Ot.prototype.scrollLines.call(this,lt,ut),this.refresh(0,this.rows-1)},We.prototype.paste=function(lt){he.paste(lt,this.textarea,this._coreService)},We.prototype.attachCustomKeyEventHandler=function(lt){this._customKeyEventHandler=lt},We.prototype.registerLinkMatcher=function(lt,ut,St){var qe=this.linkifier.registerLinkMatcher(lt,ut,St);return this.refresh(0,this.rows-1),qe},We.prototype.deregisterLinkMatcher=function(lt){this.linkifier.deregisterLinkMatcher(lt)&&this.refresh(0,this.rows-1)},We.prototype.registerLinkProvider=function(lt){return this.linkifier2.registerLinkProvider(lt)},We.prototype.registerCharacterJoiner=function(lt){var ut=this._renderService.registerCharacterJoiner(lt);return this.refresh(0,this.rows-1),ut},We.prototype.deregisterCharacterJoiner=function(lt){this._renderService.deregisterCharacterJoiner(lt)&&this.refresh(0,this.rows-1)},Object.defineProperty(We.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),We.prototype.addMarker=function(lt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+lt)},We.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},We.prototype.select=function(lt,ut,St){this._selectionService.setSelection(lt,ut,St)},We.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},We.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},We.prototype.clearSelection=function(){var lt;(lt=this._selectionService)===null||lt===void 0||lt.clearSelection()},We.prototype.selectAll=function(){var lt;(lt=this._selectionService)===null||lt===void 0||lt.selectAll()},We.prototype.selectLines=function(lt,ut){var St;(St=this._selectionService)===null||St===void 0||St.selectLines(lt,ut)},We.prototype._keyDown=function(lt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(lt)===!1)return!1;if(!this._compositionHelper.keydown(lt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var ut=$e.evaluateKeyboardEvent(lt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(lt),ut.type===3||ut.type===2){var St=this.rows-1;return this.scrollLines(ut.type===2?-St:St),this.cancel(lt,!0)}return ut.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,lt)||(ut.cancel&&this.cancel(lt,!0),!ut.key||(ut.key!==ce.C0.ETX&&ut.key!==ce.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ut.key,domEvent:lt}),this._showCursor(),this._coreService.triggerDataEvent(ut.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(lt,!0)))},We.prototype._isThirdLevelShift=function(lt,ut){var St=lt.isMac&&!this.options.macOptionIsMeta&&ut.altKey&&!ut.ctrlKey&&!ut.metaKey||lt.isWindows&&ut.altKey&&ut.ctrlKey&&!ut.metaKey;return ut.type==="keypress"?St:St&&(!ut.keyCode||ut.keyCode>47)},We.prototype._keyUp=function(lt){this._customKeyEventHandler&&this._customKeyEventHandler(lt)===!1||(function(ut){return ut.keyCode===16||ut.keyCode===17||ut.keyCode===18}(lt)||this.focus(),this.updateCursorStyle(lt))},We.prototype._keyPress=function(lt){var ut;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(lt)===!1)return!1;if(this.cancel(lt),lt.charCode)ut=lt.charCode;else if(lt.which===null||lt.which===void 0)ut=lt.keyCode;else{if(lt.which===0||lt.charCode===0)return!1;ut=lt.which}return!(!ut||(lt.altKey||lt.ctrlKey||lt.metaKey)&&!this._isThirdLevelShift(this.browser,lt))&&(ut=String.fromCharCode(ut),this._onKey.fire({key:ut,domEvent:lt}),this._showCursor(),this._coreService.triggerDataEvent(ut,!0),!0)},We.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},We.prototype.resize=function(lt,ut){lt!==this.cols||ut!==this.rows?Ot.prototype.resize.call(this,lt,ut):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},We.prototype._afterResize=function(lt,ut){var St,qe;(St=this._charSizeService)===null||St===void 0||St.measure(),(qe=this.viewport)===null||qe===void 0||qe.syncScrollArea(!0)},We.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var lt=1;lt<this.rows;lt++)this.buffer.lines.push(this.buffer.getBlankLine(Ne.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},We.prototype.reset=function(){var lt,ut;this.options.rows=this.rows,this.options.cols=this.cols;var St=this._customKeyEventHandler;this._setup(),Ot.prototype.reset.call(this),(lt=this._selectionService)===null||lt===void 0||lt.reset(),this._customKeyEventHandler=St,this.refresh(0,this.rows-1),(ut=this.viewport)===null||ut===void 0||ut.syncScrollArea()},We.prototype._reportWindowsOptions=function(lt){if(this._renderService)switch(lt){case ae.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var ut=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),St=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(ce.C0.ESC+"[4;"+St+";"+ut+"t");break;case ae.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var qe=this._renderService.dimensions.scaledCellWidth.toFixed(0),Ze=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(ce.C0.ESC+"[6;"+Ze+";"+qe+"t")}},We.prototype.cancel=function(lt,ut){if(this.options.cancelEvents||ut)return lt.preventDefault(),lt.stopPropagation(),!1},We.prototype._visualBell=function(){return!1},We.prototype._soundBell=function(){return this.options.bellStyle==="sound"},We}(Ve.CoreTerminal);ee.Terminal=ct},function(kt,ee,ne){"use strict";var xe=this&&this.__decorate||function(ce,ae,se,ve){var ue,pe=arguments.length,oe=pe<3?ae:ve===null?ve=Object.getOwnPropertyDescriptor(ae,se):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ae,se,ve);else for(var ge=ce.length-1;ge>=0;ge--)(ue=ce[ge])&&(oe=(pe<3?ue(oe):pe>3?ue(ae,se,oe):ue(ae,se))||oe);return pe>3&&oe&&Object.defineProperty(ae,se,oe),oe},Me=this&&this.__param||function(ce,ae){return function(se,ve){ae(se,ve,ce)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.CompositionHelper=void 0;var Ce=ne(5),fe=ne(1),he=function(){function ce(ae,se,ve,ue,pe,oe){this._textarea=ae,this._compositionView=se,this._bufferService=ve,this._optionsService=ue,this._charSizeService=pe,this._coreService=oe,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(ce.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),ce.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},ce.prototype.compositionupdate=function(ae){var se=this;this._compositionView.textContent=ae.data,this.updateCompositionElements(),setTimeout(function(){se._compositionPosition.end=se._textarea.value.length},0)},ce.prototype.compositionend=function(){this._finalizeComposition(!0)},ce.prototype.keydown=function(ae){if(this._isComposing||this._isSendingComposition){if(ae.keyCode===229||ae.keyCode===16||ae.keyCode===17||ae.keyCode===18)return!1;this._finalizeComposition(!1)}return ae.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},ce.prototype._finalizeComposition=function(ae){var se=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,ae){var ve={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(se._isSendingComposition){se._isSendingComposition=!1;var pe=void 0;pe=se._isComposing?se._textarea.value.substring(ve.start,ve.end):se._textarea.value.substring(ve.start),se._coreService.triggerDataEvent(pe,!0)}},0)}else{this._isSendingComposition=!1;var ue=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(ue,!0)}},ce.prototype._handleAnyTextareaChanges=function(){var ae=this,se=this._textarea.value;setTimeout(function(){if(!ae._isComposing){var ve=ae._textarea.value.replace(se,"");ve.length>0&&ae._coreService.triggerDataEvent(ve,!0)}},0)},ce.prototype.updateCompositionElements=function(ae){var se=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var ve=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),ue=this._bufferService.buffer.y*ve,pe=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=pe+"px",this._compositionView.style.top=ue+"px",this._compositionView.style.height=ve+"px",this._compositionView.style.lineHeight=ve+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var oe=this._compositionView.getBoundingClientRect();this._textarea.style.left=pe+"px",this._textarea.style.top=ue+"px",this._textarea.style.width=oe.width+"px",this._textarea.style.height=oe.height+"px",this._textarea.style.lineHeight=oe.height+"px"}ae||setTimeout(function(){return se.updateCompositionElements(!0)},0)}},ce=xe([Me(2,fe.IBufferService),Me(3,fe.IOptionsService),Me(4,Ce.ICharSizeService),Me(5,fe.ICoreService)],ce)}();ee.CompositionHelper=he},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ue,pe){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ge){oe.__proto__=ge}||function(oe,ge){for(var ye in ge)ge.hasOwnProperty(ye)&&(oe[ye]=ge[ye])})(ue,pe)},function(ue,pe){function oe(){this.constructor=ue}xe(ue,pe),ue.prototype=pe===null?Object.create(pe):(oe.prototype=pe.prototype,new oe)}),Ce=this&&this.__decorate||function(ue,pe,oe,ge){var ye,we=arguments.length,Be=we<3?pe:ge===null?ge=Object.getOwnPropertyDescriptor(pe,oe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ue,pe,oe,ge);else for(var ze=ue.length-1;ze>=0;ze--)(ye=ue[ze])&&(Be=(we<3?ye(Be):we>3?ye(pe,oe,Be):ye(pe,oe))||Be);return we>3&&Be&&Object.defineProperty(pe,oe,Be),Be},fe=this&&this.__param||function(ue,pe){return function(oe,ge){pe(oe,ge,ue)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.Viewport=void 0;var he=ne(2),ce=ne(7),ae=ne(5),se=ne(1),ve=function(ue){function pe(oe,ge,ye,we,Be,ze,$e){var Le=ue.call(this)||this;return Le._scrollLines=oe,Le._viewportElement=ge,Le._scrollArea=ye,Le._bufferService=we,Le._optionsService=Be,Le._charSizeService=ze,Le._renderService=$e,Le.scrollBarWidth=0,Le._currentRowHeight=0,Le._lastRecordedBufferLength=0,Le._lastRecordedViewportHeight=0,Le._lastRecordedBufferHeight=0,Le._lastTouchY=0,Le._lastScrollTop=0,Le._wheelPartialScroll=0,Le._refreshAnimationFrame=null,Le._ignoreNextScrollEvent=!1,Le.scrollBarWidth=Le._viewportElement.offsetWidth-Le._scrollArea.offsetWidth||15,Le.register(ce.addDisposableDomListener(Le._viewportElement,"scroll",Le._onScroll.bind(Le))),setTimeout(function(){return Le.syncScrollArea()},0),Le}return Me(pe,ue),pe.prototype.onThemeChange=function(oe){this._viewportElement.style.backgroundColor=oe.background.css},pe.prototype._refresh=function(oe){var ge=this;if(oe)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return ge._innerRefresh()}))},pe.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var oe=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==oe&&(this._lastRecordedBufferHeight=oe,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var ge=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==ge&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=ge),this._refreshAnimationFrame=null},pe.prototype.syncScrollArea=function(oe){if(oe===void 0&&(oe=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(oe);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var ge=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===ge&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(oe)}else this._refresh(oe)},pe.prototype._onScroll=function(oe){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var ge=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(ge,!0)}},pe.prototype._bubbleScroll=function(oe,ge){var ye=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(ge<0&&this._viewportElement.scrollTop!==0||ge>0&&ye<this._lastRecordedBufferHeight)||(oe.cancelable&&oe.preventDefault(),!1)},pe.prototype.onWheel=function(oe){var ge=this._getPixelsScrolled(oe);return ge!==0&&(this._viewportElement.scrollTop+=ge,this._bubbleScroll(oe,ge))},pe.prototype._getPixelsScrolled=function(oe){if(oe.deltaY===0)return 0;var ge=this._applyScrollModifier(oe.deltaY,oe);return oe.deltaMode===WheelEvent.DOM_DELTA_LINE?ge*=this._currentRowHeight:oe.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ge*=this._currentRowHeight*this._bufferService.rows),ge},pe.prototype.getLinesScrolled=function(oe){if(oe.deltaY===0)return 0;var ge=this._applyScrollModifier(oe.deltaY,oe);return oe.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(ge/=this._currentRowHeight+0,this._wheelPartialScroll+=ge,ge=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):oe.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ge*=this._bufferService.rows),ge},pe.prototype._applyScrollModifier=function(oe,ge){var ye=this._optionsService.options.fastScrollModifier;return ye==="alt"&&ge.altKey||ye==="ctrl"&&ge.ctrlKey||ye==="shift"&&ge.shiftKey?oe*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:oe*this._optionsService.options.scrollSensitivity},pe.prototype.onTouchStart=function(oe){this._lastTouchY=oe.touches[0].pageY},pe.prototype.onTouchMove=function(oe){var ge=this._lastTouchY-oe.touches[0].pageY;return this._lastTouchY=oe.touches[0].pageY,ge!==0&&(this._viewportElement.scrollTop+=ge,this._bubbleScroll(oe,ge))},pe=Ce([fe(3,se.IBufferService),fe(4,se.IOptionsService),fe(5,ae.ICharSizeService),fe(6,ae.IRenderService)],pe)}(he.Disposable);ee.Viewport=ve},function(kt,ee,ne){"use strict";function xe(he){return he.replace(/\r?\n/g,"\r")}function Me(he,ce){return ce?"\x1B[200~"+he+"\x1B[201~":he}function Ce(he,ce,ae){he=Me(he=xe(he),ae.decPrivateModes.bracketedPasteMode),ae.triggerDataEvent(he,!0),ce.value=""}function fe(he,ce,ae){var se=ae.getBoundingClientRect(),ve=he.clientX-se.left-10,ue=he.clientY-se.top-10;ce.style.width="20px",ce.style.height="20px",ce.style.left=ve+"px",ce.style.top=ue+"px",ce.style.zIndex="1000",ce.focus()}Object.defineProperty(ee,"__esModule",{value:!0}),ee.rightClickHandler=ee.moveTextAreaUnderMouseCursor=ee.paste=ee.handlePasteEvent=ee.copyHandler=ee.bracketTextForPaste=ee.prepareTextForTerminal=void 0,ee.prepareTextForTerminal=xe,ee.bracketTextForPaste=Me,ee.copyHandler=function(he,ce){he.clipboardData&&he.clipboardData.setData("text/plain",ce.selectionText),he.preventDefault()},ee.handlePasteEvent=function(he,ce,ae){he.stopPropagation(),he.clipboardData&&Ce(he.clipboardData.getData("text/plain"),ce,ae)},ee.paste=Ce,ee.moveTextAreaUnderMouseCursor=fe,ee.rightClickHandler=function(he,ce,ae,se,ve){fe(he,ce,ae),ve&&!se.isClickInSelection(he)&&se.selectWordAtCursor(he),ce.value=se.selectionText,ce.select()}},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ue,pe){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ge){oe.__proto__=ge}||function(oe,ge){for(var ye in ge)ge.hasOwnProperty(ye)&&(oe[ye]=ge[ye])})(ue,pe)},function(ue,pe){function oe(){this.constructor=ue}xe(ue,pe),ue.prototype=pe===null?Object.create(pe):(oe.prototype=pe.prototype,new oe)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.EscapeSequenceParser=ee.VT500_TRANSITION_TABLE=ee.TransitionTable=void 0;var Ce=ne(2),fe=ne(15),he=ne(21),ce=ne(22),ae=ne(24),se=function(){function ue(pe){this.table=new Uint8Array(pe)}return ue.prototype.setDefault=function(pe,oe){fe.fill(this.table,pe<<4|oe)},ue.prototype.add=function(pe,oe,ge,ye){this.table[oe<<8|pe]=ge<<4|ye},ue.prototype.addMany=function(pe,oe,ge,ye){for(var we=0;we<pe.length;we++)this.table[oe<<8|pe[we]]=ge<<4|ye},ue}();ee.TransitionTable=se,ee.VT500_TRANSITION_TABLE=function(){var ue=new se(4095),pe=Array.apply(null,Array(256)).map(function(ze,$e){return $e}),oe=function(ze,$e){return pe.slice(ze,$e)},ge=oe(32,127),ye=oe(0,24);ye.push(25),ye.push.apply(ye,oe(28,32));var we,Be=oe(0,14);for(we in ue.setDefault(1,0),ue.addMany(ge,0,2,0),Be)ue.addMany([24,26,153,154],we,3,0),ue.addMany(oe(128,144),we,3,0),ue.addMany(oe(144,152),we,3,0),ue.add(156,we,0,0),ue.add(27,we,11,1),ue.add(157,we,4,8),ue.addMany([152,158,159],we,0,7),ue.add(155,we,11,3),ue.add(144,we,11,9);return ue.addMany(ye,0,3,0),ue.addMany(ye,1,3,1),ue.add(127,1,0,1),ue.addMany(ye,8,0,8),ue.addMany(ye,3,3,3),ue.add(127,3,0,3),ue.addMany(ye,4,3,4),ue.add(127,4,0,4),ue.addMany(ye,6,3,6),ue.addMany(ye,5,3,5),ue.add(127,5,0,5),ue.addMany(ye,2,3,2),ue.add(127,2,0,2),ue.add(93,1,4,8),ue.addMany(ge,8,5,8),ue.add(127,8,5,8),ue.addMany([156,27,24,26,7],8,6,0),ue.addMany(oe(28,32),8,0,8),ue.addMany([88,94,95],1,0,7),ue.addMany(ge,7,0,7),ue.addMany(ye,7,0,7),ue.add(156,7,0,0),ue.add(127,7,0,7),ue.add(91,1,11,3),ue.addMany(oe(64,127),3,7,0),ue.addMany(oe(48,60),3,8,4),ue.addMany([60,61,62,63],3,9,4),ue.addMany(oe(48,60),4,8,4),ue.addMany(oe(64,127),4,7,0),ue.addMany([60,61,62,63],4,0,6),ue.addMany(oe(32,64),6,0,6),ue.add(127,6,0,6),ue.addMany(oe(64,127),6,0,0),ue.addMany(oe(32,48),3,9,5),ue.addMany(oe(32,48),5,9,5),ue.addMany(oe(48,64),5,0,6),ue.addMany(oe(64,127),5,7,0),ue.addMany(oe(32,48),4,9,5),ue.addMany(oe(32,48),1,9,2),ue.addMany(oe(32,48),2,9,2),ue.addMany(oe(48,127),2,10,0),ue.addMany(oe(48,80),1,10,0),ue.addMany(oe(81,88),1,10,0),ue.addMany([89,90,92],1,10,0),ue.addMany(oe(96,127),1,10,0),ue.add(80,1,11,9),ue.addMany(ye,9,0,9),ue.add(127,9,0,9),ue.addMany(oe(28,32),9,0,9),ue.addMany(oe(32,48),9,9,12),ue.addMany(oe(48,60),9,8,10),ue.addMany([60,61,62,63],9,9,10),ue.addMany(ye,11,0,11),ue.addMany(oe(32,128),11,0,11),ue.addMany(oe(28,32),11,0,11),ue.addMany(ye,10,0,10),ue.add(127,10,0,10),ue.addMany(oe(28,32),10,0,10),ue.addMany(oe(48,60),10,8,10),ue.addMany([60,61,62,63],10,0,11),ue.addMany(oe(32,48),10,9,12),ue.addMany(ye,12,0,12),ue.add(127,12,0,12),ue.addMany(oe(28,32),12,0,12),ue.addMany(oe(32,48),12,9,12),ue.addMany(oe(48,64),12,0,11),ue.addMany(oe(64,127),12,12,13),ue.addMany(oe(64,127),10,12,13),ue.addMany(oe(64,127),9,12,13),ue.addMany(ye,13,13,13),ue.addMany(ge,13,13,13),ue.add(127,13,0,13),ue.addMany([27,156,24,26],13,14,0),ue.add(160,0,2,0),ue.add(160,8,5,8),ue.add(160,6,0,6),ue.add(160,11,0,11),ue.add(160,13,13,13),ue}();var ve=function(ue){function pe(oe){oe===void 0&&(oe=ee.VT500_TRANSITION_TABLE);var ge=ue.call(this)||this;return ge._transitions=oe,ge.initialState=0,ge.currentState=ge.initialState,ge._params=new he.Params,ge._params.addParam(0),ge._collect=0,ge.precedingCodepoint=0,ge._printHandlerFb=function(ye,we,Be){},ge._executeHandlerFb=function(ye){},ge._csiHandlerFb=function(ye,we){},ge._escHandlerFb=function(ye){},ge._errorHandlerFb=function(ye){return ye},ge._printHandler=ge._printHandlerFb,ge._executeHandlers=Object.create(null),ge._csiHandlers=Object.create(null),ge._escHandlers=Object.create(null),ge._oscParser=new ce.OscParser,ge._dcsParser=new ae.DcsParser,ge._errorHandler=ge._errorHandlerFb,ge.setEscHandler({final:"\\"},function(){}),ge}return Me(pe,ue),pe.prototype._identifier=function(oe,ge){ge===void 0&&(ge=[64,126]);var ye=0;if(oe.prefix){if(oe.prefix.length>1)throw new Error("only one byte as prefix supported");if((ye=oe.prefix.charCodeAt(0))&&60>ye||ye>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(oe.intermediates){if(oe.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var we=0;we<oe.intermediates.length;++we){var Be=oe.intermediates.charCodeAt(we);if(32>Be||Be>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");ye<<=8,ye|=Be}}if(oe.final.length!==1)throw new Error("final must be a single byte");var ze=oe.final.charCodeAt(0);if(ge[0]>ze||ze>ge[1])throw new Error("final must be in range "+ge[0]+" .. "+ge[1]);return ye<<=8,ye|=ze},pe.prototype.identToString=function(oe){for(var ge=[];oe;)ge.push(String.fromCharCode(255&oe)),oe>>=8;return ge.reverse().join("")},pe.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},pe.prototype.setPrintHandler=function(oe){this._printHandler=oe},pe.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},pe.prototype.addEscHandler=function(oe,ge){var ye=this._identifier(oe,[48,126]);this._escHandlers[ye]===void 0&&(this._escHandlers[ye]=[]);var we=this._escHandlers[ye];return we.push(ge),{dispose:function(){var Be=we.indexOf(ge);Be!==-1&&we.splice(Be,1)}}},pe.prototype.setEscHandler=function(oe,ge){this._escHandlers[this._identifier(oe,[48,126])]=[ge]},pe.prototype.clearEscHandler=function(oe){this._escHandlers[this._identifier(oe,[48,126])]&&delete this._escHandlers[this._identifier(oe,[48,126])]},pe.prototype.setEscHandlerFallback=function(oe){this._escHandlerFb=oe},pe.prototype.setExecuteHandler=function(oe,ge){this._executeHandlers[oe.charCodeAt(0)]=ge},pe.prototype.clearExecuteHandler=function(oe){this._executeHandlers[oe.charCodeAt(0)]&&delete this._executeHandlers[oe.charCodeAt(0)]},pe.prototype.setExecuteHandlerFallback=function(oe){this._executeHandlerFb=oe},pe.prototype.addCsiHandler=function(oe,ge){var ye=this._identifier(oe);this._csiHandlers[ye]===void 0&&(this._csiHandlers[ye]=[]);var we=this._csiHandlers[ye];return we.push(ge),{dispose:function(){var Be=we.indexOf(ge);Be!==-1&&we.splice(Be,1)}}},pe.prototype.setCsiHandler=function(oe,ge){this._csiHandlers[this._identifier(oe)]=[ge]},pe.prototype.clearCsiHandler=function(oe){this._csiHandlers[this._identifier(oe)]&&delete this._csiHandlers[this._identifier(oe)]},pe.prototype.setCsiHandlerFallback=function(oe){this._csiHandlerFb=oe},pe.prototype.addDcsHandler=function(oe,ge){return this._dcsParser.addHandler(this._identifier(oe),ge)},pe.prototype.setDcsHandler=function(oe,ge){this._dcsParser.setHandler(this._identifier(oe),ge)},pe.prototype.clearDcsHandler=function(oe){this._dcsParser.clearHandler(this._identifier(oe))},pe.prototype.setDcsHandlerFallback=function(oe){this._dcsParser.setHandlerFallback(oe)},pe.prototype.addOscHandler=function(oe,ge){return this._oscParser.addHandler(oe,ge)},pe.prototype.setOscHandler=function(oe,ge){this._oscParser.setHandler(oe,ge)},pe.prototype.clearOscHandler=function(oe){this._oscParser.clearHandler(oe)},pe.prototype.setOscHandlerFallback=function(oe){this._oscParser.setHandlerFallback(oe)},pe.prototype.setErrorHandler=function(oe){this._errorHandler=oe},pe.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},pe.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},pe.prototype.parse=function(oe,ge){for(var ye=0,we=0,Be=this.currentState,ze=this._oscParser,$e=this._dcsParser,Le=this._collect,Ne=this._params,Re=this._transitions.table,Se=0;Se<ge;++Se){switch((we=Re[Be<<8|((ye=oe[Se])<160?ye:160)])>>4){case 2:for(var Ie=Se+1;;++Ie){if(Ie>=ge||(ye=oe[Ie])<32||ye>126&&ye<160){this._printHandler(oe,Se,Ie),Se=Ie-1;break}if(++Ie>=ge||(ye=oe[Ie])<32||ye>126&&ye<160){this._printHandler(oe,Se,Ie),Se=Ie-1;break}if(++Ie>=ge||(ye=oe[Ie])<32||ye>126&&ye<160){this._printHandler(oe,Se,Ie),Se=Ie-1;break}if(++Ie>=ge||(ye=oe[Ie])<32||ye>126&&ye<160){this._printHandler(oe,Se,Ie),Se=Ie-1;break}}break;case 3:this._executeHandlers[ye]?this._executeHandlers[ye]():this._executeHandlerFb(ye),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:Se,code:ye,currentState:Be,collect:Le,params:Ne,abort:!1}).abort)return;break;case 7:for(var Ae=this._csiHandlers[Le<<8|ye],it=Ae?Ae.length-1:-1;it>=0&&Ae[it](Ne)===!1;it--);it<0&&this._csiHandlerFb(Le<<8|ye,Ne),this.precedingCodepoint=0;break;case 8:do switch(ye){case 59:Ne.addParam(0);break;case 58:Ne.addSubParam(-1);break;default:Ne.addDigit(ye-48)}while(++Se<ge&&(ye=oe[Se])>47&&ye<60);Se--;break;case 9:Le<<=8,Le|=ye;break;case 10:for(var Ue=this._escHandlers[Le<<8|ye],gt=Ue?Ue.length-1:-1;gt>=0&&Ue[gt]()===!1;gt--);gt<0&&this._escHandlerFb(Le<<8|ye),this.precedingCodepoint=0;break;case 11:Ne.reset(),Ne.addParam(0),Le=0;break;case 12:$e.hook(Le<<8|ye,Ne);break;case 13:for(var Ve=Se+1;;++Ve)if(Ve>=ge||(ye=oe[Ve])===24||ye===26||ye===27||ye>127&&ye<160){$e.put(oe,Se,Ve),Se=Ve-1;break}break;case 14:$e.unhook(ye!==24&&ye!==26),ye===27&&(we|=1),Ne.reset(),Ne.addParam(0),Le=0,this.precedingCodepoint=0;break;case 4:ze.start();break;case 5:for(var Tt=Se+1;;Tt++)if(Tt>=ge||(ye=oe[Tt])<32||ye>127&&ye<=159){ze.put(oe,Se,Tt),Se=Tt-1;break}break;case 6:ze.end(ye!==24&&ye!==26),ye===27&&(we|=1),Ne.reset(),Ne.addParam(0),Le=0,this.precedingCodepoint=0}Be=15&we}this._collect=Le,this.currentState=Be},pe}(Ce.Disposable);ee.EscapeSequenceParser=ve},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ze,$e){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Le,Ne){Le.__proto__=Ne}||function(Le,Ne){for(var Re in Ne)Ne.hasOwnProperty(Re)&&(Le[Re]=Ne[Re])})(ze,$e)},function(ze,$e){function Le(){this.constructor=ze}xe(ze,$e),ze.prototype=$e===null?Object.create($e):(Le.prototype=$e.prototype,new Le)}),Ce=this&&this.__decorate||function(ze,$e,Le,Ne){var Re,Se=arguments.length,Ie=Se<3?$e:Ne===null?Ne=Object.getOwnPropertyDescriptor($e,Le):Ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ie=Reflect.decorate(ze,$e,Le,Ne);else for(var Ae=ze.length-1;Ae>=0;Ae--)(Re=ze[Ae])&&(Ie=(Se<3?Re(Ie):Se>3?Re($e,Le,Ie):Re($e,Le))||Ie);return Se>3&&Ie&&Object.defineProperty($e,Le,Ie),Ie},fe=this&&this.__param||function(ze,$e){return function(Le,Ne){$e(Le,Ne,ze)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.Renderer=void 0;var he=ne(41),ce=ne(47),ae=ne(48),se=ne(49),ve=ne(29),ue=ne(2),pe=ne(5),oe=ne(1),ge=ne(25),ye=ne(0),we=1,Be=function(ze){function $e(Le,Ne,Re,Se,Ie,Ae,it,Ue,gt){var Ve=ze.call(this)||this;Ve._colors=Le,Ve._screenElement=Ne,Ve._bufferService=Ie,Ve._charSizeService=Ae,Ve._optionsService=it,Ve._id=we++,Ve._onRequestRedraw=new ye.EventEmitter;var Tt=Ve._optionsService.options.allowTransparency;return Ve._characterJoinerRegistry=new ve.CharacterJoinerRegistry(Ve._bufferService),Ve._renderLayers=[new he.TextRenderLayer(Ve._screenElement,0,Ve._colors,Ve._characterJoinerRegistry,Tt,Ve._id,Ve._bufferService,it),new ce.SelectionRenderLayer(Ve._screenElement,1,Ve._colors,Ve._id,Ve._bufferService,it),new se.LinkRenderLayer(Ve._screenElement,2,Ve._colors,Ve._id,Re,Se,Ve._bufferService,it),new ae.CursorRenderLayer(Ve._screenElement,3,Ve._colors,Ve._id,Ve._onRequestRedraw,Ve._bufferService,it,Ue,gt)],Ve.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Ve._devicePixelRatio=window.devicePixelRatio,Ve._updateDimensions(),Ve.onOptionsChanged(),Ve}return Me($e,ze),Object.defineProperty($e.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),$e.prototype.dispose=function(){for(var Le=0,Ne=this._renderLayers;Le<Ne.length;Le++)Ne[Le].dispose();ze.prototype.dispose.call(this),ge.removeTerminalFromCache(this._id)},$e.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},$e.prototype.setColors=function(Le){this._colors=Le;for(var Ne=0,Re=this._renderLayers;Ne<Re.length;Ne++){var Se=Re[Ne];Se.setColors(this._colors),Se.reset()}},$e.prototype.onResize=function(Le,Ne){this._updateDimensions();for(var Re=0,Se=this._renderLayers;Re<Se.length;Re++)Se[Re].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},$e.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},$e.prototype.onBlur=function(){this._runOperation(function(Le){return Le.onBlur()})},$e.prototype.onFocus=function(){this._runOperation(function(Le){return Le.onFocus()})},$e.prototype.onSelectionChanged=function(Le,Ne,Re){Re===void 0&&(Re=!1),this._runOperation(function(Se){return Se.onSelectionChanged(Le,Ne,Re)})},$e.prototype.onCursorMove=function(){this._runOperation(function(Le){return Le.onCursorMove()})},$e.prototype.onOptionsChanged=function(){this._runOperation(function(Le){return Le.onOptionsChanged()})},$e.prototype.clear=function(){this._runOperation(function(Le){return Le.reset()})},$e.prototype._runOperation=function(Le){for(var Ne=0,Re=this._renderLayers;Ne<Re.length;Ne++)Le(Re[Ne])},$e.prototype.renderRows=function(Le,Ne){for(var Re=0,Se=this._renderLayers;Re<Se.length;Re++)Se[Re].onGridChanged(Le,Ne)},$e.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},$e.prototype.registerCharacterJoiner=function(Le){return this._characterJoinerRegistry.registerCharacterJoiner(Le)},$e.prototype.deregisterCharacterJoiner=function(Le){return this._characterJoinerRegistry.deregisterCharacterJoiner(Le)},$e=Ce([fe(4,oe.IBufferService),fe(5,pe.ICharSizeService),fe(6,oe.IOptionsService),fe(7,oe.ICoreService),fe(8,pe.ICoreBrowserService)],$e)}(ue.Disposable);ee.Renderer=Be},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ue,pe){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ge){oe.__proto__=ge}||function(oe,ge){for(var ye in ge)ge.hasOwnProperty(ye)&&(oe[ye]=ge[ye])})(ue,pe)},function(ue,pe){function oe(){this.constructor=ue}xe(ue,pe),ue.prototype=pe===null?Object.create(pe):(oe.prototype=pe.prototype,new oe)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.TextRenderLayer=void 0;var Ce=ne(42),fe=ne(13),he=ne(6),ce=ne(3),ae=ne(29),se=ne(4),ve=function(ue){function pe(oe,ge,ye,we,Be,ze,$e,Le){var Ne=ue.call(this,oe,"text",ge,Be,ye,ze,$e,Le)||this;return Ne._characterWidth=0,Ne._characterFont="",Ne._characterOverlapCache={},Ne._workCell=new se.CellData,Ne._state=new Ce.GridCache,Ne._characterJoinerRegistry=we,Ne}return Me(pe,ue),pe.prototype.resize=function(oe){ue.prototype.resize.call(this,oe);var ge=this._getFont(!1,!1);this._characterWidth===oe.scaledCharWidth&&this._characterFont===ge||(this._characterWidth=oe.scaledCharWidth,this._characterFont=ge,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},pe.prototype.reset=function(){this._state.clear(),this._clearAll()},pe.prototype._forEachCell=function(oe,ge,ye,we){for(var Be=oe;Be<=ge;Be++)for(var ze=Be+this._bufferService.buffer.ydisp,$e=this._bufferService.buffer.lines.get(ze),Le=ye?ye.getJoinedCharacters(ze):[],Ne=0;Ne<this._bufferService.cols;Ne++){$e.loadCell(Ne,this._workCell);var Re=this._workCell,Se=!1,Ie=Ne;if(Re.getWidth()!==0){if(Le.length>0&&Ne===Le[0][0]){Se=!0;var Ae=Le.shift();Re=new ae.JoinedCellData(this._workCell,$e.translateToString(!0,Ae[0],Ae[1]),Ae[1]-Ae[0]),Ie=Ae[1]-1}!Se&&this._isOverlapping(Re)&&Ie<$e.length-1&&$e.getCodePoint(Ie+1)===ce.NULL_CELL_CODE&&(Re.content&=-12582913,Re.content|=2<<22),we(Re,Ne,Be),Ne=Ie}}},pe.prototype._drawBackground=function(oe,ge){var ye=this,we=this._ctx,Be=this._bufferService.cols,ze=0,$e=0,Le=null;we.save(),this._forEachCell(oe,ge,null,function(Ne,Re,Se){var Ie=null;Ne.isInverse()?Ie=Ne.isFgDefault()?ye._colors.foreground.css:Ne.isFgRGB()?"rgb("+he.AttributeData.toColorRGB(Ne.getFgColor()).join(",")+")":ye._colors.ansi[Ne.getFgColor()].css:Ne.isBgRGB()?Ie="rgb("+he.AttributeData.toColorRGB(Ne.getBgColor()).join(",")+")":Ne.isBgPalette()&&(Ie=ye._colors.ansi[Ne.getBgColor()].css),Le===null&&(ze=Re,$e=Se),Se!==$e?(we.fillStyle=Le||"",ye._fillCells(ze,$e,Be-ze,1),ze=Re,$e=Se):Le!==Ie&&(we.fillStyle=Le||"",ye._fillCells(ze,$e,Re-ze,1),ze=Re,$e=Se),Le=Ie}),Le!==null&&(we.fillStyle=Le,this._fillCells(ze,$e,Be-ze,1)),we.restore()},pe.prototype._drawForeground=function(oe,ge){var ye=this;this._forEachCell(oe,ge,this._characterJoinerRegistry,function(we,Be,ze){if(!we.isInvisible()&&(ye._drawChars(we,Be,ze),we.isUnderline())){if(ye._ctx.save(),we.isInverse())if(we.isBgDefault())ye._ctx.fillStyle=ye._colors.background.css;else if(we.isBgRGB())ye._ctx.fillStyle="rgb("+he.AttributeData.toColorRGB(we.getBgColor()).join(",")+")";else{var $e=we.getBgColor();ye._optionsService.options.drawBoldTextInBrightColors&&we.isBold()&&$e<8&&($e+=8),ye._ctx.fillStyle=ye._colors.ansi[$e].css}else if(we.isFgDefault())ye._ctx.fillStyle=ye._colors.foreground.css;else if(we.isFgRGB())ye._ctx.fillStyle="rgb("+he.AttributeData.toColorRGB(we.getFgColor()).join(",")+")";else{var Le=we.getFgColor();ye._optionsService.options.drawBoldTextInBrightColors&&we.isBold()&&Le<8&&(Le+=8),ye._ctx.fillStyle=ye._colors.ansi[Le].css}ye._fillBottomLineAtCells(Be,ze,we.getWidth()),ye._ctx.restore()}})},pe.prototype.onGridChanged=function(oe,ge){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,oe,this._bufferService.cols,ge-oe+1),this._drawBackground(oe,ge),this._drawForeground(oe,ge))},pe.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},pe.prototype._isOverlapping=function(oe){if(oe.getWidth()!==1||oe.getCode()<256)return!1;var ge=oe.getChars();if(this._characterOverlapCache.hasOwnProperty(ge))return this._characterOverlapCache[ge];this._ctx.save(),this._ctx.font=this._characterFont;var ye=Math.floor(this._ctx.measureText(ge).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[ge]=ye,ye},pe}(fe.BaseRenderLayer);ee.TextRenderLayer=ve},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.GridCache=void 0;var xe=function(){function Me(){this.cache=[]}return Me.prototype.resize=function(Ce,fe){for(var he=0;he<Ce;he++){this.cache.length<=he&&this.cache.push([]);for(var ce=this.cache[he].length;ce<fe;ce++)this.cache[he].push(void 0);this.cache[he].length=fe}this.cache.length=Ce},Me.prototype.clear=function(){for(var Ce=0;Ce<this.cache.length;Ce++)for(var fe=0;fe<this.cache[Ce].length;fe++)this.cache[Ce][fe]=void 0},Me}();ee.GridCache=xe},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ye,we){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Be,ze){Be.__proto__=ze}||function(Be,ze){for(var $e in ze)ze.hasOwnProperty($e)&&(Be[$e]=ze[$e])})(ye,we)},function(ye,we){function Be(){this.constructor=ye}xe(ye,we),ye.prototype=we===null?Object.create(we):(Be.prototype=we.prototype,new Be)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.NoneCharAtlas=ee.DynamicCharAtlas=ee.getGlyphCacheKey=void 0;var Ce=ne(9),fe=ne(44),he=ne(27),ce=ne(46),ae=ne(11),se=ne(28),ve=ne(10),ue={css:"rgba(0, 0, 0, 0)",rgba:0};function pe(ye){return ye.code<<21|ye.bg<<12|ye.fg<<3|(ye.bold?0:4)+(ye.dim?0:2)+(ye.italic?0:1)}ee.getGlyphCacheKey=pe;var oe=function(ye){function we(Be,ze){var $e=ye.call(this)||this;$e._config=ze,$e._drawToCacheCount=0,$e._glyphsWaitingOnBitmap=[],$e._bitmapCommitTimeout=null,$e._bitmap=null,$e._cacheCanvas=Be.createElement("canvas"),$e._cacheCanvas.width=1024,$e._cacheCanvas.height=1024,$e._cacheCtx=se.throwIfFalsy($e._cacheCanvas.getContext("2d",{alpha:!0}));var Le=Be.createElement("canvas");Le.width=$e._config.scaledCharWidth,Le.height=$e._config.scaledCharHeight,$e._tmpCtx=se.throwIfFalsy(Le.getContext("2d",{alpha:$e._config.allowTransparency})),$e._width=Math.floor(1024/$e._config.scaledCharWidth),$e._height=Math.floor(1024/$e._config.scaledCharHeight);var Ne=$e._width*$e._height;return $e._cacheMap=new ce.LRUMap(Ne),$e._cacheMap.prealloc(Ne),$e}return Me(we,ye),we.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},we.prototype.beginFrame=function(){this._drawToCacheCount=0},we.prototype.draw=function(Be,ze,$e,Le){if(ze.code===32)return!0;if(!this._canCache(ze))return!1;var Ne=pe(ze),Re=this._cacheMap.get(Ne);if(Re!=null)return this._drawFromCache(Be,Re,$e,Le),!0;if(this._drawToCacheCount<100){var Se=void 0;Se=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var Ie=this._drawToCache(ze,Se);return this._cacheMap.set(Ne,Ie),this._drawFromCache(Be,Ie,$e,Le),!0}return!1},we.prototype._canCache=function(Be){return Be.code<256},we.prototype._toCoordinateX=function(Be){return Be%this._width*this._config.scaledCharWidth},we.prototype._toCoordinateY=function(Be){return Math.floor(Be/this._width)*this._config.scaledCharHeight},we.prototype._drawFromCache=function(Be,ze,$e,Le){if(!ze.isEmpty){var Ne=this._toCoordinateX(ze.index),Re=this._toCoordinateY(ze.index);Be.drawImage(ze.inBitmap?this._bitmap:this._cacheCanvas,Ne,Re,this._config.scaledCharWidth,this._config.scaledCharHeight,$e,Le,this._config.scaledCharWidth,this._config.scaledCharHeight)}},we.prototype._getColorFromAnsiIndex=function(Be){return Be<this._config.colors.ansi.length?this._config.colors.ansi[Be]:he.DEFAULT_ANSI_COLORS[Be]},we.prototype._getBackgroundColor=function(Be){return this._config.allowTransparency?ue:Be.bg===Ce.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:Be.bg<256?this._getColorFromAnsiIndex(Be.bg):this._config.colors.background},we.prototype._getForegroundColor=function(Be){return Be.fg===Ce.INVERTED_DEFAULT_COLOR?ve.color.opaque(this._config.colors.background):Be.fg<256?this._getColorFromAnsiIndex(Be.fg):this._config.colors.foreground},we.prototype._drawToCache=function(Be,ze){this._drawToCacheCount++,this._tmpCtx.save();var $e=this._getBackgroundColor(Be);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=$e.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var Le=Be.bold?this._config.fontWeightBold:this._config.fontWeight,Ne=Be.italic?"italic":"";this._tmpCtx.font=Ne+" "+Le+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(Be).css,Be.dim&&(this._tmpCtx.globalAlpha=Ce.DIM_OPACITY),this._tmpCtx.fillText(Be.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var Re=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),Se=!1;this._config.allowTransparency||(Se=function(Ue,gt){for(var Ve=!0,Tt=gt.rgba>>>24,ct=gt.rgba>>>16&255,Ot=gt.rgba>>>8&255,We=0;We<Ue.data.length;We+=4)Ue.data[We]===Tt&&Ue.data[We+1]===ct&&Ue.data[We+2]===Ot?Ue.data[We+3]=0:Ve=!1;return Ve}(Re,$e));var Ie=this._toCoordinateX(ze),Ae=this._toCoordinateY(ze);this._cacheCtx.putImageData(Re,Ie,Ae);var it={index:ze,isEmpty:Se,inBitmap:!1};return this._addGlyphToBitmap(it),it},we.prototype._addGlyphToBitmap=function(Be){var ze=this;!("createImageBitmap"in window)||ae.isFirefox||ae.isSafari||(this._glyphsWaitingOnBitmap.push(Be),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return ze._generateBitmap()},100)))},we.prototype._generateBitmap=function(){var Be=this,ze=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function($e){Be._bitmap=$e;for(var Le=0;Le<ze.length;Le++)ze[Le].inBitmap=!0}),this._bitmapCommitTimeout=null},we}(fe.BaseCharAtlas);ee.DynamicCharAtlas=oe;var ge=function(ye){function we(Be,ze){return ye.call(this)||this}return Me(we,ye),we.prototype.draw=function(Be,ze,$e,Le){return!1},we}(fe.BaseCharAtlas);ee.NoneCharAtlas=ge},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.BaseCharAtlas=void 0;var xe=function(){function Me(){this._didWarmUp=!1}return Me.prototype.dispose=function(){},Me.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Me.prototype._doWarmUp=function(){},Me.prototype.beginFrame=function(){},Me}();ee.BaseCharAtlas=xe},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.ColorContrastCache=void 0;var xe=function(){function Me(){this._color={},this._rgba={}}return Me.prototype.clear=function(){this._color={},this._rgba={}},Me.prototype.setCss=function(Ce,fe,he){this._rgba[Ce]||(this._rgba[Ce]={}),this._rgba[Ce][fe]=he},Me.prototype.getCss=function(Ce,fe){return this._rgba[Ce]?this._rgba[Ce][fe]:void 0},Me.prototype.setColor=function(Ce,fe,he){this._color[Ce]||(this._color[Ce]={}),this._color[Ce][fe]=he},Me.prototype.getColor=function(Ce,fe){return this._color[Ce]?this._color[Ce][fe]:void 0},Me}();ee.ColorContrastCache=xe},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.LRUMap=void 0;var xe=function(){function Me(Ce){this.capacity=Ce,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Me.prototype._unlinkNode=function(Ce){var fe=Ce.prev,he=Ce.next;Ce===this._head&&(this._head=he),Ce===this._tail&&(this._tail=fe),fe!==null&&(fe.next=he),he!==null&&(he.prev=fe)},Me.prototype._appendNode=function(Ce){var fe=this._tail;fe!==null&&(fe.next=Ce),Ce.prev=fe,Ce.next=null,this._tail=Ce,this._head===null&&(this._head=Ce)},Me.prototype.prealloc=function(Ce){for(var fe=this._nodePool,he=0;he<Ce;he++)fe.push({prev:null,next:null,key:null,value:null})},Me.prototype.get=function(Ce){var fe=this._map[Ce];return fe!==void 0?(this._unlinkNode(fe),this._appendNode(fe),fe.value):null},Me.prototype.peekValue=function(Ce){var fe=this._map[Ce];return fe!==void 0?fe.value:null},Me.prototype.peek=function(){var Ce=this._head;return Ce===null?null:Ce.value},Me.prototype.set=function(Ce,fe){var he=this._map[Ce];if(he!==void 0)he=this._map[Ce],this._unlinkNode(he),he.value=fe;else if(this.size>=this.capacity)he=this._head,this._unlinkNode(he),delete this._map[he.key],he.key=Ce,he.value=fe,this._map[Ce]=he;else{var ce=this._nodePool;ce.length>0?((he=ce.pop()).key=Ce,he.value=fe):he={prev:null,next:null,key:Ce,value:fe},this._map[Ce]=he,this.size++}this._appendNode(he)},Me}();ee.LRUMap=xe},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(fe,he){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ce,ae){ce.__proto__=ae}||function(ce,ae){for(var se in ae)ae.hasOwnProperty(se)&&(ce[se]=ae[se])})(fe,he)},function(fe,he){function ce(){this.constructor=fe}xe(fe,he),fe.prototype=he===null?Object.create(he):(ce.prototype=he.prototype,new ce)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.SelectionRenderLayer=void 0;var Ce=function(fe){function he(ce,ae,se,ve,ue,pe){var oe=fe.call(this,ce,"selection",ae,!0,se,ve,ue,pe)||this;return oe._clearState(),oe}return Me(he,fe),he.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},he.prototype.resize=function(ce){fe.prototype.resize.call(this,ce),this._clearState()},he.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},he.prototype.onSelectionChanged=function(ce,ae,se){if(this._didStateChange(ce,ae,se,this._bufferService.buffer.ydisp))if(this._clearAll(),ce&&ae){var ve=ce[1]-this._bufferService.buffer.ydisp,ue=ae[1]-this._bufferService.buffer.ydisp,pe=Math.max(ve,0),oe=Math.min(ue,this._bufferService.rows-1);if(!(pe>=this._bufferService.rows||oe<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,se){var ge=ce[0],ye=ae[0]-ge,we=oe-pe+1;this._fillCells(ge,pe,ye,we)}else{ge=ve===pe?ce[0]:0;var Be=pe===oe?ae[0]:this._bufferService.cols;this._fillCells(ge,pe,Be-ge,1);var ze=Math.max(oe-pe-1,0);if(this._fillCells(0,pe+1,this._bufferService.cols,ze),pe!==oe){var $e=ue===oe?ae[0]:this._bufferService.cols;this._fillCells(0,oe,$e,1)}}this._state.start=[ce[0],ce[1]],this._state.end=[ae[0],ae[1]],this._state.columnSelectMode=se,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},he.prototype._didStateChange=function(ce,ae,se,ve){return!this._areCoordinatesEqual(ce,this._state.start)||!this._areCoordinatesEqual(ae,this._state.end)||se!==this._state.columnSelectMode||ve!==this._state.ydisp},he.prototype._areCoordinatesEqual=function(ce,ae){return!(!ce||!ae)&&ce[0]===ae[0]&&ce[1]===ae[1]},he}(ne(13).BaseRenderLayer);ee.SelectionRenderLayer=Ce},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ae,se){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,ue){ve.__proto__=ue}||function(ve,ue){for(var pe in ue)ue.hasOwnProperty(pe)&&(ve[pe]=ue[pe])})(ae,se)},function(ae,se){function ve(){this.constructor=ae}xe(ae,se),ae.prototype=se===null?Object.create(se):(ve.prototype=se.prototype,new ve)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.CursorRenderLayer=void 0;var Ce=ne(13),fe=ne(4),he=function(ae){function se(ve,ue,pe,oe,ge,ye,we,Be,ze){var $e=ae.call(this,ve,"cursor",ue,!0,pe,oe,ye,we)||this;return $e._onRequestRedraw=ge,$e._coreService=Be,$e._coreBrowserService=ze,$e._cell=new fe.CellData,$e._state={x:0,y:0,isFocused:!1,style:"",width:0},$e._cursorRenderers={bar:$e._renderBarCursor.bind($e),block:$e._renderBlockCursor.bind($e),underline:$e._renderUnderlineCursor.bind($e)},$e}return Me(se,ae),se.prototype.resize=function(ve){ae.prototype.resize.call(this,ve),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},se.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},se.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},se.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},se.prototype.onOptionsChanged=function(){var ve,ue=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new ce(this._coreBrowserService.isFocused,function(){ue._render(!0)})):((ve=this._cursorBlinkStateManager)===null||ve===void 0||ve.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},se.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},se.prototype.onGridChanged=function(ve,ue){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},se.prototype._render=function(ve){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var ue=this._bufferService.buffer.ybase+this._bufferService.buffer.y,pe=ue-this._bufferService.buffer.ydisp;if(pe<0||pe>=this._bufferService.rows)this._clearCursor();else{var oe=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(ue).loadCell(oe,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var ge=this._optionsService.options.cursorStyle;return ge&&ge!=="block"?this._cursorRenderers[ge](oe,pe,this._cell):this._renderBlurCursor(oe,pe,this._cell),this._ctx.restore(),this._state.x=oe,this._state.y=pe,this._state.isFocused=!1,this._state.style=ge,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===oe&&this._state.y===pe&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](oe,pe,this._cell),this._ctx.restore(),this._state.x=oe,this._state.y=pe,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},se.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},se.prototype._renderBarCursor=function(ve,ue,pe){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(ve,ue,this._optionsService.options.cursorWidth),this._ctx.restore()},se.prototype._renderBlockCursor=function(ve,ue,pe){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(ve,ue,pe.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(pe,ve,ue),this._ctx.restore()},se.prototype._renderUnderlineCursor=function(ve,ue,pe){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(ve,ue),this._ctx.restore()},se.prototype._renderBlurCursor=function(ve,ue,pe){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(ve,ue,pe.getWidth(),1),this._ctx.restore()},se}(Ce.BaseRenderLayer);ee.CursorRenderLayer=he;var ce=function(){function ae(se,ve){this._renderCallback=ve,this.isCursorVisible=!0,se&&this._restartInterval()}return Object.defineProperty(ae.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),ae.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ae.prototype.restartBlinkAnimation=function(){var se=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){se._renderCallback(),se._animationFrame=void 0})))},ae.prototype._restartInterval=function(se){var ve=this;se===void 0&&(se=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(ve._animationTimeRestarted){var ue=600-(Date.now()-ve._animationTimeRestarted);if(ve._animationTimeRestarted=void 0,ue>0)return void ve._restartInterval(ue)}ve.isCursorVisible=!1,ve._animationFrame=window.requestAnimationFrame(function(){ve._renderCallback(),ve._animationFrame=void 0}),ve._blinkInterval=window.setInterval(function(){if(ve._animationTimeRestarted){var pe=600-(Date.now()-ve._animationTimeRestarted);return ve._animationTimeRestarted=void 0,void ve._restartInterval(pe)}ve.isCursorVisible=!ve.isCursorVisible,ve._animationFrame=window.requestAnimationFrame(function(){ve._renderCallback(),ve._animationFrame=void 0})},600)},se)},ae.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ae.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},ae}()},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ae,se){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,ue){ve.__proto__=ue}||function(ve,ue){for(var pe in ue)ue.hasOwnProperty(pe)&&(ve[pe]=ue[pe])})(ae,se)},function(ae,se){function ve(){this.constructor=ae}xe(ae,se),ae.prototype=se===null?Object.create(se):(ve.prototype=se.prototype,new ve)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.LinkRenderLayer=void 0;var Ce=ne(13),fe=ne(9),he=ne(26),ce=function(ae){function se(ve,ue,pe,oe,ge,ye,we,Be){var ze=ae.call(this,ve,"link",ue,!0,pe,oe,we,Be)||this;return ge.onShowLinkUnderline(function($e){return ze._onShowLinkUnderline($e)}),ge.onHideLinkUnderline(function($e){return ze._onHideLinkUnderline($e)}),ye.onShowLinkUnderline(function($e){return ze._onShowLinkUnderline($e)}),ye.onHideLinkUnderline(function($e){return ze._onHideLinkUnderline($e)}),ze}return Me(se,ae),se.prototype.resize=function(ve){ae.prototype.resize.call(this,ve),this._state=void 0},se.prototype.reset=function(){this._clearCurrentLink()},se.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var ve=this._state.y2-this._state.y1-1;ve>0&&this._clearCells(0,this._state.y1+1,this._state.cols,ve),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},se.prototype._onShowLinkUnderline=function(ve){if(ve.fg===fe.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:ve.fg&&he.is256Color(ve.fg)?this._ctx.fillStyle=this._colors.ansi[ve.fg].css:this._ctx.fillStyle=this._colors.foreground.css,ve.y1===ve.y2)this._fillBottomLineAtCells(ve.x1,ve.y1,ve.x2-ve.x1);else{this._fillBottomLineAtCells(ve.x1,ve.y1,ve.cols-ve.x1);for(var ue=ve.y1+1;ue<ve.y2;ue++)this._fillBottomLineAtCells(0,ue,ve.cols);this._fillBottomLineAtCells(0,ve.y2,ve.x2)}this._state=ve},se.prototype._onHideLinkUnderline=function(ve){this._clearCurrentLink()},se}(Ce.BaseRenderLayer);ee.LinkRenderLayer=ce},function(kt,ee,ne){"use strict";var xe=this&&this.__decorate||function(ae,se,ve,ue){var pe,oe=arguments.length,ge=oe<3?se:ue===null?ue=Object.getOwnPropertyDescriptor(se,ve):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(ae,se,ve,ue);else for(var ye=ae.length-1;ye>=0;ye--)(pe=ae[ye])&&(ge=(oe<3?pe(ge):oe>3?pe(se,ve,ge):pe(se,ve))||ge);return oe>3&&ge&&Object.defineProperty(se,ve,ge),ge},Me=this&&this.__param||function(ae,se){return function(ve,ue){se(ve,ue,ae)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.MouseZone=ee.Linkifier=void 0;var Ce=ne(0),fe=ne(1),he=function(){function ae(se,ve,ue){this._bufferService=se,this._logService=ve,this._unicodeService=ue,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new Ce.EventEmitter,this._onHideLinkUnderline=new Ce.EventEmitter,this._onLinkTooltip=new Ce.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(ae.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),ae.prototype.attachToDom=function(se,ve){this._element=se,this._mouseZoneManager=ve},ae.prototype.linkifyRows=function(se,ve){var ue=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=se,this._rowsToLinkify.end=ve):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,se),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,ve)),this._mouseZoneManager.clearAll(se,ve),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return ue._linkifyRows()},ae._timeBeforeLatency))},ae.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var se=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var ve=se.ydisp+this._rowsToLinkify.start;if(!(ve>=se.lines.length)){for(var ue=se.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,pe=Math.ceil(2e3/this._bufferService.cols),oe=this._bufferService.buffer.iterator(!1,ve,ue,pe,pe);oe.hasNext();)for(var ge=oe.next(),ye=0;ye<this._linkMatchers.length;ye++)this._doLinkifyRow(ge.range.first,ge.content,this._linkMatchers[ye]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},ae.prototype.registerLinkMatcher=function(se,ve,ue){if(ue===void 0&&(ue={}),!ve)throw new Error("handler must be defined");var pe={id:this._nextLinkMatcherId++,regex:se,handler:ve,matchIndex:ue.matchIndex,validationCallback:ue.validationCallback,hoverTooltipCallback:ue.tooltipCallback,hoverLeaveCallback:ue.leaveCallback,willLinkActivate:ue.willLinkActivate,priority:ue.priority||0};return this._addLinkMatcherToList(pe),pe.id},ae.prototype._addLinkMatcherToList=function(se){if(this._linkMatchers.length!==0){for(var ve=this._linkMatchers.length-1;ve>=0;ve--)if(se.priority<=this._linkMatchers[ve].priority)return void this._linkMatchers.splice(ve+1,0,se);this._linkMatchers.splice(0,0,se)}else this._linkMatchers.push(se)},ae.prototype.deregisterLinkMatcher=function(se){for(var ve=0;ve<this._linkMatchers.length;ve++)if(this._linkMatchers[ve].id===se)return this._linkMatchers.splice(ve,1),!0;return!1},ae.prototype._doLinkifyRow=function(se,ve,ue){for(var pe,oe=this,ge=new RegExp(ue.regex.source,(ue.regex.flags||"")+"g"),ye=-1,we=function(){var ze=pe[typeof ue.matchIndex!="number"?0:ue.matchIndex];if(!ze)return Be._logService.debug("match found without corresponding matchIndex",pe,ue),"break";if(ye=ve.indexOf(ze,ye+1),ge.lastIndex=ye+ze.length,ye<0)return"break";var $e=Be._bufferService.buffer.stringIndexToBufferIndex(se,ye);if($e[0]<0)return"break";var Le=Be._bufferService.buffer.lines.get($e[0]);if(!Le)return"break";var Ne=Le.getFg($e[1]),Re=Ne?Ne>>9&511:void 0;ue.validationCallback?ue.validationCallback(ze,function(Se){oe._rowsTimeoutId||Se&&oe._addLink($e[1],$e[0]-oe._bufferService.buffer.ydisp,ze,ue,Re)}):Be._addLink($e[1],$e[0]-Be._bufferService.buffer.ydisp,ze,ue,Re)},Be=this;(pe=ge.exec(ve))!==null&&we()!=="break";);},ae.prototype._addLink=function(se,ve,ue,pe,oe){var ge=this;if(this._mouseZoneManager&&this._element){var ye=this._unicodeService.getStringCellWidth(ue),we=se%this._bufferService.cols,Be=ve+Math.floor(se/this._bufferService.cols),ze=(we+ye)%this._bufferService.cols,$e=Be+Math.floor((we+ye)/this._bufferService.cols);ze===0&&(ze=this._bufferService.cols,$e--),this._mouseZoneManager.add(new ce(we+1,Be+1,ze+1,$e+1,function(Le){if(pe.handler)return pe.handler(Le,ue);var Ne=window.open();Ne?(Ne.opener=null,Ne.location.href=ue):console.warn("Opening link blocked as opener could not be cleared")},function(){ge._onShowLinkUnderline.fire(ge._createLinkHoverEvent(we,Be,ze,$e,oe)),ge._element.classList.add("xterm-cursor-pointer")},function(Le){ge._onLinkTooltip.fire(ge._createLinkHoverEvent(we,Be,ze,$e,oe)),pe.hoverTooltipCallback&&pe.hoverTooltipCallback(Le,ue,{start:{x:we,y:Be},end:{x:ze,y:$e}})},function(){ge._onHideLinkUnderline.fire(ge._createLinkHoverEvent(we,Be,ze,$e,oe)),ge._element.classList.remove("xterm-cursor-pointer"),pe.hoverLeaveCallback&&pe.hoverLeaveCallback()},function(Le){return!pe.willLinkActivate||pe.willLinkActivate(Le,ue)}))}},ae.prototype._createLinkHoverEvent=function(se,ve,ue,pe,oe){return{x1:se,y1:ve,x2:ue,y2:pe,cols:this._bufferService.cols,fg:oe}},ae._timeBeforeLatency=200,ae=xe([Me(0,fe.IBufferService),Me(1,fe.ILogService),Me(2,fe.IUnicodeService)],ae)}();ee.Linkifier=he;var ce=function(ae,se,ve,ue,pe,oe,ge,ye,we){this.x1=ae,this.y1=se,this.x2=ve,this.y2=ue,this.clickCallback=pe,this.hoverCallback=oe,this.tooltipCallback=ge,this.leaveCallback=ye,this.willLinkActivate=we};ee.MouseZone=ce},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ze,$e){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Le,Ne){Le.__proto__=Ne}||function(Le,Ne){for(var Re in Ne)Ne.hasOwnProperty(Re)&&(Le[Re]=Ne[Re])})(ze,$e)},function(ze,$e){function Le(){this.constructor=ze}xe(ze,$e),ze.prototype=$e===null?Object.create($e):(Le.prototype=$e.prototype,new Le)}),Ce=this&&this.__decorate||function(ze,$e,Le,Ne){var Re,Se=arguments.length,Ie=Se<3?$e:Ne===null?Ne=Object.getOwnPropertyDescriptor($e,Le):Ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ie=Reflect.decorate(ze,$e,Le,Ne);else for(var Ae=ze.length-1;Ae>=0;Ae--)(Re=ze[Ae])&&(Ie=(Se<3?Re(Ie):Se>3?Re($e,Le,Ie):Re($e,Le))||Ie);return Se>3&&Ie&&Object.defineProperty($e,Le,Ie),Ie},fe=this&&this.__param||function(ze,$e){return function(Le,Ne){$e(Le,Ne,ze)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.SelectionService=void 0;var he=ne(11),ce=ne(52),ae=ne(4),se=ne(0),ve=ne(5),ue=ne(1),pe=ne(30),oe=ne(53),ge=ne(2),ye="\xA0",we=new RegExp(ye,"g"),Be=function(ze){function $e(Le,Ne,Re,Se,Ie,Ae,it){var Ue=ze.call(this)||this;return Ue._element=Le,Ue._screenElement=Ne,Ue._bufferService=Re,Ue._coreService=Se,Ue._mouseService=Ie,Ue._optionsService=Ae,Ue._renderService=it,Ue._dragScrollAmount=0,Ue._enabled=!0,Ue._workCell=new ae.CellData,Ue._mouseDownTimeStamp=0,Ue._onLinuxMouseSelection=Ue.register(new se.EventEmitter),Ue._onRedrawRequest=Ue.register(new se.EventEmitter),Ue._onSelectionChange=Ue.register(new se.EventEmitter),Ue._onRequestScrollLines=Ue.register(new se.EventEmitter),Ue._mouseMoveListener=function(gt){return Ue._onMouseMove(gt)},Ue._mouseUpListener=function(gt){return Ue._onMouseUp(gt)},Ue._coreService.onUserInput(function(){Ue.hasSelection&&Ue.clearSelection()}),Ue._trimListener=Ue._bufferService.buffer.lines.onTrim(function(gt){return Ue._onTrim(gt)}),Ue.register(Ue._bufferService.buffers.onBufferActivate(function(gt){return Ue._onBufferActivate(gt)})),Ue.enable(),Ue._model=new ce.SelectionModel(Ue._bufferService),Ue._activeSelectionMode=0,Ue}return Me($e,ze),Object.defineProperty($e.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),$e.prototype.dispose=function(){this._removeMouseDownListeners()},$e.prototype.reset=function(){this.clearSelection()},$e.prototype.disable=function(){this.clearSelection(),this._enabled=!1},$e.prototype.enable=function(){this._enabled=!0},Object.defineProperty($e.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"hasSelection",{get:function(){var Le=this._model.finalSelectionStart,Ne=this._model.finalSelectionEnd;return!(!Le||!Ne)&&(Le[0]!==Ne[0]||Le[1]!==Ne[1])},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"selectionText",{get:function(){var Le=this._model.finalSelectionStart,Ne=this._model.finalSelectionEnd;if(!Le||!Ne)return"";var Re=this._bufferService.buffer,Se=[];if(this._activeSelectionMode===3){if(Le[0]===Ne[0])return"";for(var Ie=Le[1];Ie<=Ne[1];Ie++){var Ae=Re.translateBufferLineToString(Ie,!0,Le[0],Ne[0]);Se.push(Ae)}}else{var it=Le[1]===Ne[1]?Ne[0]:void 0;for(Se.push(Re.translateBufferLineToString(Le[1],!0,Le[0],it)),Ie=Le[1]+1;Ie<=Ne[1]-1;Ie++){var Ue=Re.lines.get(Ie);Ae=Re.translateBufferLineToString(Ie,!0),Ue&&Ue.isWrapped?Se[Se.length-1]+=Ae:Se.push(Ae)}Le[1]!==Ne[1]&&(Ue=Re.lines.get(Ne[1]),Ae=Re.translateBufferLineToString(Ne[1],!0,0,Ne[0]),Ue&&Ue.isWrapped?Se[Se.length-1]+=Ae:Se.push(Ae))}return Se.map(function(gt){return gt.replace(we," ")}).join(he.isWindows?`\r
`:`
`)},enumerable:!1,configurable:!0}),$e.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},$e.prototype.refresh=function(Le){var Ne=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return Ne._refresh()})),he.isLinux&&Le&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},$e.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},$e.prototype.isClickInSelection=function(Le){var Ne=this._getMouseBufferCoords(Le),Re=this._model.finalSelectionStart,Se=this._model.finalSelectionEnd;return!!(Re&&Se&&Ne)&&this._areCoordsInSelection(Ne,Re,Se)},$e.prototype._areCoordsInSelection=function(Le,Ne,Re){return Le[1]>Ne[1]&&Le[1]<Re[1]||Ne[1]===Re[1]&&Le[1]===Ne[1]&&Le[0]>=Ne[0]&&Le[0]<Re[0]||Ne[1]<Re[1]&&Le[1]===Re[1]&&Le[0]<Re[0]||Ne[1]<Re[1]&&Le[1]===Ne[1]&&Le[0]>=Ne[0]},$e.prototype.selectWordAtCursor=function(Le){var Ne=this._getMouseBufferCoords(Le);Ne&&(this._selectWordAt(Ne,!1),this._model.selectionEnd=void 0,this.refresh(!0))},$e.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},$e.prototype.selectLines=function(Le,Ne){this._model.clearSelection(),Le=Math.max(Le,0),Ne=Math.min(Ne,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,Le],this._model.selectionEnd=[this._bufferService.cols,Ne],this.refresh(),this._onSelectionChange.fire()},$e.prototype._onTrim=function(Le){this._model.onTrim(Le)&&this.refresh()},$e.prototype._getMouseBufferCoords=function(Le){var Ne=this._mouseService.getCoords(Le,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(Ne)return Ne[0]--,Ne[1]--,Ne[1]+=this._bufferService.buffer.ydisp,Ne},$e.prototype._getMouseEventScrollAmount=function(Le){var Ne=pe.getCoordsRelativeToElement(Le,this._screenElement)[1],Re=this._renderService.dimensions.canvasHeight;return Ne>=0&&Ne<=Re?0:(Ne>Re&&(Ne-=Re),Ne=Math.min(Math.max(Ne,-50),50),(Ne/=50)/Math.abs(Ne)+Math.round(14*Ne))},$e.prototype.shouldForceSelection=function(Le){return he.isMac?Le.altKey&&this._optionsService.options.macOptionClickForcesSelection:Le.shiftKey},$e.prototype.onMouseDown=function(Le){if(this._mouseDownTimeStamp=Le.timeStamp,(Le.button!==2||!this.hasSelection)&&Le.button===0){if(!this._enabled){if(!this.shouldForceSelection(Le))return;Le.stopPropagation()}Le.preventDefault(),this._dragScrollAmount=0,this._enabled&&Le.shiftKey?this._onIncrementalClick(Le):Le.detail===1?this._onSingleClick(Le):Le.detail===2?this._onDoubleClick(Le):Le.detail===3&&this._onTripleClick(Le),this._addMouseDownListeners(),this.refresh(!0)}},$e.prototype._addMouseDownListeners=function(){var Le=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return Le._dragScroll()},50)},$e.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},$e.prototype._onIncrementalClick=function(Le){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(Le))},$e.prototype._onSingleClick=function(Le){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(Le)?3:0,this._model.selectionStart=this._getMouseBufferCoords(Le),this._model.selectionStart){this._model.selectionEnd=void 0;var Ne=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);Ne&&Ne.length!==this._model.selectionStart[0]&&Ne.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},$e.prototype._onDoubleClick=function(Le){var Ne=this._getMouseBufferCoords(Le);Ne&&(this._activeSelectionMode=1,this._selectWordAt(Ne,!0))},$e.prototype._onTripleClick=function(Le){var Ne=this._getMouseBufferCoords(Le);Ne&&(this._activeSelectionMode=2,this._selectLineAt(Ne[1]))},$e.prototype.shouldColumnSelect=function(Le){return Le.altKey&&!(he.isMac&&this._optionsService.options.macOptionClickForcesSelection)},$e.prototype._onMouseMove=function(Le){if(Le.stopImmediatePropagation(),this._model.selectionStart){var Ne=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(Le),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(Le),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var Re=this._bufferService.buffer;if(this._model.selectionEnd[1]<Re.lines.length){var Se=Re.lines.get(this._model.selectionEnd[1]);Se&&Se.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}Ne&&Ne[0]===this._model.selectionEnd[0]&&Ne[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},$e.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var Le=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(Le.ydisp+this._bufferService.rows,Le.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=Le.ydisp),this.refresh()}},$e.prototype._onMouseUp=function(Le){var Ne=Le.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&Ne<500&&Le.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var Re=this._mouseService.getCoords(Le,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(Re&&Re[0]!==void 0&&Re[1]!==void 0){var Se=oe.moveToCellSequence(Re[0]-1,Re[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(Se,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},$e.prototype._onBufferActivate=function(Le){var Ne=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=Le.activeBuffer.lines.onTrim(function(Re){return Ne._onTrim(Re)})},$e.prototype._convertViewportColToCharacterIndex=function(Le,Ne){for(var Re=Ne[0],Se=0;Ne[0]>=Se;Se++){var Ie=Le.loadCell(Se,this._workCell).getChars().length;this._workCell.getWidth()===0?Re--:Ie>1&&Ne[0]!==Se&&(Re+=Ie-1)}return Re},$e.prototype.setSelection=function(Le,Ne,Re){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[Le,Ne],this._model.selectionStartLength=Re,this.refresh()},$e.prototype._getWordAt=function(Le,Ne,Re,Se){if(Re===void 0&&(Re=!0),Se===void 0&&(Se=!0),!(Le[0]>=this._bufferService.cols)){var Ie=this._bufferService.buffer,Ae=Ie.lines.get(Le[1]);if(Ae){var it=Ie.translateBufferLineToString(Le[1],!1),Ue=this._convertViewportColToCharacterIndex(Ae,Le),gt=Ue,Ve=Le[0]-Ue,Tt=0,ct=0,Ot=0,We=0;if(it.charAt(Ue)===" "){for(;Ue>0&&it.charAt(Ue-1)===" ";)Ue--;for(;gt<it.length&&it.charAt(gt+1)===" ";)gt++}else{var lt=Le[0],ut=Le[0];Ae.getWidth(lt)===0&&(Tt++,lt--),Ae.getWidth(ut)===2&&(ct++,ut++);var St=Ae.getString(ut).length;for(St>1&&(We+=St-1,gt+=St-1);lt>0&&Ue>0&&!this._isCharWordSeparator(Ae.loadCell(lt-1,this._workCell));){Ae.loadCell(lt-1,this._workCell);var qe=this._workCell.getChars().length;this._workCell.getWidth()===0?(Tt++,lt--):qe>1&&(Ot+=qe-1,Ue-=qe-1),Ue--,lt--}for(;ut<Ae.length&&gt+1<it.length&&!this._isCharWordSeparator(Ae.loadCell(ut+1,this._workCell));){Ae.loadCell(ut+1,this._workCell);var Ze=this._workCell.getChars().length;this._workCell.getWidth()===2?(ct++,ut++):Ze>1&&(We+=Ze-1,gt+=Ze-1),gt++,ut++}}gt++;var wt=Ue+Ve-Tt+Ot,Wt=Math.min(this._bufferService.cols,gt-Ue+Tt+ct-Ot-We);if(Ne||it.slice(Ue,gt).trim()!==""){if(Re&&wt===0&&Ae.getCodePoint(0)!==32){var Kt=Ie.lines.get(Le[1]-1);if(Kt&&Ae.isWrapped&&Kt.getCodePoint(this._bufferService.cols-1)!==32){var _t=this._getWordAt([this._bufferService.cols-1,Le[1]-1],!1,!0,!1);if(_t){var vt=this._bufferService.cols-_t.start;wt-=vt,Wt+=vt}}}if(Se&&wt+Wt===this._bufferService.cols&&Ae.getCodePoint(this._bufferService.cols-1)!==32){var jt=Ie.lines.get(Le[1]+1);if(jt&&jt.isWrapped&&jt.getCodePoint(0)!==32){var yn=this._getWordAt([0,Le[1]+1],!1,!1,!0);yn&&(Wt+=yn.length)}}return{start:wt,length:Wt}}}}},$e.prototype._selectWordAt=function(Le,Ne){var Re=this._getWordAt(Le,Ne);if(Re){for(;Re.start<0;)Re.start+=this._bufferService.cols,Le[1]--;this._model.selectionStart=[Re.start,Le[1]],this._model.selectionStartLength=Re.length}},$e.prototype._selectToWordAt=function(Le){var Ne=this._getWordAt(Le,!0);if(Ne){for(var Re=Le[1];Ne.start<0;)Ne.start+=this._bufferService.cols,Re--;if(!this._model.areSelectionValuesReversed())for(;Ne.start+Ne.length>this._bufferService.cols;)Ne.length-=this._bufferService.cols,Re++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?Ne.start:Ne.start+Ne.length,Re]}},$e.prototype._isCharWordSeparator=function(Le){return Le.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(Le.getChars())>=0},$e.prototype._selectLineAt=function(Le){var Ne=this._bufferService.buffer.getWrappedRangeForLine(Le);this._model.selectionStart=[0,Ne.first],this._model.selectionEnd=[this._bufferService.cols,Ne.last],this._model.selectionStartLength=0},$e=Ce([fe(2,ue.IBufferService),fe(3,ue.ICoreService),fe(4,ve.IMouseService),fe(5,ue.IOptionsService),fe(6,ve.IRenderService)],$e)}(ge.Disposable);ee.SelectionService=Be},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.SelectionModel=void 0;var xe=function(){function Me(Ce){this._bufferService=Ce,this.isSelectAllActive=!1,this.selectionStartLength=0}return Me.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Me.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(Me.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var Ce=this.selectionStart[0]+this.selectionStartLength;return Ce>this._bufferService.cols?[Ce%this._bufferService.cols,this.selectionStart[1]+Math.floor(Ce/this._bufferService.cols)]:[Ce,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),Me.prototype.areSelectionValuesReversed=function(){var Ce=this.selectionStart,fe=this.selectionEnd;return!(!Ce||!fe)&&(Ce[1]>fe[1]||Ce[1]===fe[1]&&Ce[0]>fe[0])},Me.prototype.onTrim=function(Ce){return this.selectionStart&&(this.selectionStart[1]-=Ce),this.selectionEnd&&(this.selectionEnd[1]-=Ce),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Me}();ee.SelectionModel=xe},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.moveToCellSequence=void 0;var xe=ne(12);function Me(se,ve,ue,pe){var oe=se-Ce(ue,se),ge=ve-Ce(ue,ve);return ae(Math.abs(oe-ge)-function(ye,we,Be){for(var ze=0,$e=ye-Ce(Be,ye),Le=we-Ce(Be,we),Ne=0;Ne<Math.abs($e-Le);Ne++){var Re=fe(ye,we)==="A"?-1:1,Se=Be.buffer.lines.get($e+Re*Ne);Se&&Se.isWrapped&&ze++}return ze}(se,ve,ue),ce(fe(se,ve),pe))}function Ce(se,ve){for(var ue=0,pe=se.buffer.lines.get(ve),oe=pe&&pe.isWrapped;oe&&ve>=0&&ve<se.rows;)ue++,oe=(pe=se.buffer.lines.get(--ve))&&pe.isWrapped;return ue}function fe(se,ve){return se>ve?"A":"B"}function he(se,ve,ue,pe,oe,ge){for(var ye=se,we=ve,Be="";ye!==ue||we!==pe;)ye+=oe?1:-1,oe&&ye>ge.cols-1?(Be+=ge.buffer.translateBufferLineToString(we,!1,se,ye),ye=0,se=0,we++):!oe&&ye<0&&(Be+=ge.buffer.translateBufferLineToString(we,!1,0,se+1),se=ye=ge.cols-1,we--);return Be+ge.buffer.translateBufferLineToString(we,!1,se,ye)}function ce(se,ve){var ue=ve?"O":"[";return xe.C0.ESC+ue+se}function ae(se,ve){se=Math.floor(se);for(var ue="",pe=0;pe<se;pe++)ue+=ve;return ue}ee.moveToCellSequence=function(se,ve,ue,pe){var oe,ge=ue.buffer.x,ye=ue.buffer.y;if(!ue.buffer.hasScrollback)return function(Be,ze,$e,Le,Ne,Re){return Me(ze,Le,Ne,Re).length===0?"":ae(he(Be,ze,Be,ze-Ce(Ne,ze),!1,Ne).length,ce("D",Re))}(ge,ye,0,ve,ue,pe)+Me(ye,ve,ue,pe)+function(Be,ze,$e,Le,Ne,Re){var Se;Se=Me(ze,Le,Ne,Re).length>0?Le-Ce(Ne,Le):ze;var Ie=Le,Ae=function(it,Ue,gt,Ve,Tt,ct){var Ot;return Ot=Me(gt,Ve,Tt,ct).length>0?Ve-Ce(Tt,Ve):Ue,it<gt&&Ot<=Ve||it>=gt&&Ot<Ve?"C":"D"}(Be,ze,$e,Le,Ne,Re);return ae(he(Be,Se,$e,Ie,Ae==="C",Ne).length,ce(Ae,Re))}(ge,ye,se,ve,ue,pe);if(ye===ve)return oe=ge>se?"D":"C",ae(Math.abs(ge-se),ce(oe,pe));oe=ye>ve?"D":"C";var we=Math.abs(ye-ve);return ae(function(Be,ze){return ze.cols-Be}(ye>ve?se:ge,ue)+(we-1)*ue.cols+1+((ye>ve?ge:se)-1),ce(oe,pe))}},function(kt,ee,ne){"use strict";var xe=this&&this.__decorate||function(he,ce,ae,se){var ve,ue=arguments.length,pe=ue<3?ce:se===null?se=Object.getOwnPropertyDescriptor(ce,ae):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(he,ce,ae,se);else for(var oe=he.length-1;oe>=0;oe--)(ve=he[oe])&&(pe=(ue<3?ve(pe):ue>3?ve(ce,ae,pe):ve(ce,ae))||pe);return ue>3&&pe&&Object.defineProperty(ce,ae,pe),pe},Me=this&&this.__param||function(he,ce){return function(ae,se){ce(ae,se,he)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.SoundService=void 0;var Ce=ne(1),fe=function(){function he(ce){this._optionsService=ce}return Object.defineProperty(he,"audioContext",{get:function(){if(!he._audioContext){var ce=window.AudioContext||window.webkitAudioContext;if(!ce)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;he._audioContext=new ce}return he._audioContext},enumerable:!1,configurable:!0}),he.prototype.playBellSound=function(){var ce=he.audioContext;if(ce){var ae=ce.createBufferSource();ce.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(se){ae.buffer=se,ae.connect(ce.destination),ae.start(0)})}},he.prototype._base64ToArrayBuffer=function(ce){for(var ae=window.atob(ce),se=ae.length,ve=new Uint8Array(se),ue=0;ue<se;ue++)ve[ue]=ae.charCodeAt(ue);return ve.buffer},he.prototype._removeMimeType=function(ce){return ce.split(",")[1]},he=xe([Me(0,Ce.IOptionsService)],he)}();ee.SoundService=fe},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ue,pe){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ge){oe.__proto__=ge}||function(oe,ge){for(var ye in ge)ge.hasOwnProperty(ye)&&(oe[ye]=ge[ye])})(ue,pe)},function(ue,pe){function oe(){this.constructor=ue}xe(ue,pe),ue.prototype=pe===null?Object.create(pe):(oe.prototype=pe.prototype,new oe)}),Ce=this&&this.__decorate||function(ue,pe,oe,ge){var ye,we=arguments.length,Be=we<3?pe:ge===null?ge=Object.getOwnPropertyDescriptor(pe,oe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ue,pe,oe,ge);else for(var ze=ue.length-1;ze>=0;ze--)(ye=ue[ze])&&(Be=(we<3?ye(Be):we>3?ye(pe,oe,Be):ye(pe,oe))||Be);return we>3&&Be&&Object.defineProperty(pe,oe,Be),Be},fe=this&&this.__param||function(ue,pe){return function(oe,ge){pe(oe,ge,ue)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.MouseZoneManager=void 0;var he=ne(2),ce=ne(7),ae=ne(5),se=ne(1),ve=function(ue){function pe(oe,ge,ye,we,Be,ze){var $e=ue.call(this)||this;return $e._element=oe,$e._screenElement=ge,$e._bufferService=ye,$e._mouseService=we,$e._selectionService=Be,$e._optionsService=ze,$e._zones=[],$e._areZonesActive=!1,$e._lastHoverCoords=[void 0,void 0],$e._initialSelectionLength=0,$e.register(ce.addDisposableDomListener($e._element,"mousedown",function(Le){return $e._onMouseDown(Le)})),$e._mouseMoveListener=function(Le){return $e._onMouseMove(Le)},$e._mouseLeaveListener=function(Le){return $e._onMouseLeave(Le)},$e._clickListener=function(Le){return $e._onClick(Le)},$e}return Me(pe,ue),pe.prototype.dispose=function(){ue.prototype.dispose.call(this),this._deactivate()},pe.prototype.add=function(oe){this._zones.push(oe),this._zones.length===1&&this._activate()},pe.prototype.clearAll=function(oe,ge){if(this._zones.length!==0){oe&&ge||(oe=0,ge=this._bufferService.rows-1);for(var ye=0;ye<this._zones.length;ye++){var we=this._zones[ye];(we.y1>oe&&we.y1<=ge+1||we.y2>oe&&we.y2<=ge+1||we.y1<oe&&we.y2>ge+1)&&(this._currentZone&&this._currentZone===we&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(ye--,1))}this._zones.length===0&&this._deactivate()}},pe.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},pe.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},pe.prototype._onMouseMove=function(oe){this._lastHoverCoords[0]===oe.pageX&&this._lastHoverCoords[1]===oe.pageY||(this._onHover(oe),this._lastHoverCoords=[oe.pageX,oe.pageY])},pe.prototype._onHover=function(oe){var ge=this,ye=this._findZoneEventAt(oe);ye!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),ye&&(this._currentZone=ye,ye.hoverCallback&&ye.hoverCallback(oe),this._tooltipTimeout=window.setTimeout(function(){return ge._onTooltip(oe)},this._optionsService.options.linkTooltipHoverDuration)))},pe.prototype._onTooltip=function(oe){this._tooltipTimeout=void 0;var ge=this._findZoneEventAt(oe);ge&&ge.tooltipCallback&&ge.tooltipCallback(oe)},pe.prototype._onMouseDown=function(oe){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var ge=this._findZoneEventAt(oe);ge!=null&&ge.willLinkActivate(oe)&&(oe.preventDefault(),oe.stopImmediatePropagation())}},pe.prototype._onMouseLeave=function(oe){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},pe.prototype._onClick=function(oe){var ge=this._findZoneEventAt(oe),ye=this._getSelectionLength();ge&&ye===this._initialSelectionLength&&(ge.clickCallback(oe),oe.preventDefault(),oe.stopImmediatePropagation())},pe.prototype._getSelectionLength=function(){var oe=this._selectionService.selectionText;return oe?oe.length:0},pe.prototype._findZoneEventAt=function(oe){var ge=this._mouseService.getCoords(oe,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(ge)for(var ye=ge[0],we=ge[1],Be=0;Be<this._zones.length;Be++){var ze=this._zones[Be];if(ze.y1===ze.y2){if(we===ze.y1&&ye>=ze.x1&&ye<ze.x2)return ze}else if(we===ze.y1&&ye>=ze.x1||we===ze.y2&&ye<ze.x2||we>ze.y1&&we<ze.y2)return ze}},pe=Ce([fe(2,se.IBufferService),fe(3,ae.IMouseService),fe(4,ae.ISelectionService),fe(5,se.IOptionsService)],pe)}(he.Disposable);ee.MouseZoneManager=ve},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(pe,oe){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,ye){ge.__proto__=ye}||function(ge,ye){for(var we in ye)ye.hasOwnProperty(we)&&(ge[we]=ye[we])})(pe,oe)},function(pe,oe){function ge(){this.constructor=pe}xe(pe,oe),pe.prototype=oe===null?Object.create(oe):(ge.prototype=oe.prototype,new ge)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.AccessibilityManager=void 0;var Ce=ne(18),fe=ne(11),he=ne(31),ce=ne(7),ae=ne(2),se=ne(32),ve=ne(17),ue=function(pe){function oe(ge,ye){var we=pe.call(this)||this;we._terminal=ge,we._renderService=ye,we._liveRegionLineCount=0,we._charsToConsume=[],we._charsToAnnounce="",we._accessibilityTreeRoot=document.createElement("div"),we._accessibilityTreeRoot.classList.add("xterm-accessibility"),we._rowContainer=document.createElement("div"),we._rowContainer.classList.add("xterm-accessibility-tree"),we._rowContainer.setAttribute("role","list"),we._rowElements=[];for(var Be=0;Be<we._terminal.rows;Be++)we._rowElements[Be]=we._createAccessibilityTreeNode(),we._rowContainer.appendChild(we._rowElements[Be]);if(we._topBoundaryFocusListener=function(ze){return we._onBoundaryFocus(ze,0)},we._bottomBoundaryFocusListener=function(ze){return we._onBoundaryFocus(ze,1)},we._rowElements[0].addEventListener("focus",we._topBoundaryFocusListener),we._rowElements[we._rowElements.length-1].addEventListener("focus",we._bottomBoundaryFocusListener),we._refreshRowsDimensions(),we._accessibilityTreeRoot.appendChild(we._rowContainer),we._renderRowsDebouncer=new he.RenderDebouncer(we._renderRows.bind(we)),we._refreshRows(),we._liveRegion=document.createElement("div"),we._liveRegion.classList.add("live-region"),we._liveRegion.setAttribute("aria-live","assertive"),we._accessibilityTreeRoot.appendChild(we._liveRegion),!we._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return we._terminal.element.insertAdjacentElement("afterbegin",we._accessibilityTreeRoot),we.register(we._renderRowsDebouncer),we.register(we._terminal.onResize(function(ze){return we._onResize(ze.rows)})),we.register(we._terminal.onRender(function(ze){return we._refreshRows(ze.start,ze.end)})),we.register(we._terminal.onScroll(function(){return we._refreshRows()})),we.register(we._terminal.onA11yChar(function(ze){return we._onChar(ze)})),we.register(we._terminal.onLineFeed(function(){return we._onChar(`
`)})),we.register(we._terminal.onA11yTab(function(ze){return we._onTab(ze)})),we.register(we._terminal.onKey(function(ze){return we._onKey(ze.key)})),we.register(we._terminal.onBlur(function(){return we._clearLiveRegion()})),we.register(we._renderService.onDimensionsChange(function(){return we._refreshRowsDimensions()})),we._screenDprMonitor=new se.ScreenDprMonitor,we.register(we._screenDprMonitor),we._screenDprMonitor.setListener(function(){return we._refreshRowsDimensions()}),we.register(ce.addDisposableDomListener(window,"resize",function(){return we._refreshRowsDimensions()})),we}return Me(oe,pe),oe.prototype.dispose=function(){pe.prototype.dispose.call(this),ve.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},oe.prototype._onBoundaryFocus=function(ge,ye){var we=ge.target,Be=this._rowElements[ye===0?1:this._rowElements.length-2];if(we.getAttribute("aria-posinset")!==(ye===0?"1":""+this._terminal.buffer.lines.length)&&ge.relatedTarget===Be){var ze,$e;if(ye===0?(ze=we,$e=this._rowElements.pop(),this._rowContainer.removeChild($e)):(ze=this._rowElements.shift(),$e=we,this._rowContainer.removeChild(ze)),ze.removeEventListener("focus",this._topBoundaryFocusListener),$e.removeEventListener("focus",this._bottomBoundaryFocusListener),ye===0){var Le=this._createAccessibilityTreeNode();this._rowElements.unshift(Le),this._rowContainer.insertAdjacentElement("afterbegin",Le)}else Le=this._createAccessibilityTreeNode(),this._rowElements.push(Le),this._rowContainer.appendChild(Le);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(ye===0?-1:1),this._rowElements[ye===0?1:this._rowElements.length-2].focus(),ge.preventDefault(),ge.stopImmediatePropagation()}},oe.prototype._onResize=function(ge){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var ye=this._rowContainer.children.length;ye<this._terminal.rows;ye++)this._rowElements[ye]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[ye]);for(;this._rowElements.length>ge;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},oe.prototype._createAccessibilityTreeNode=function(){var ge=document.createElement("div");return ge.setAttribute("role","listitem"),ge.tabIndex=-1,this._refreshRowDimensions(ge),ge},oe.prototype._onTab=function(ge){for(var ye=0;ye<ge;ye++)this._onChar(" ")},oe.prototype._onChar=function(ge){var ye=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==ge&&(this._charsToAnnounce+=ge):this._charsToAnnounce+=ge,ge===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=Ce.tooMuchOutput)),fe.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){ye._accessibilityTreeRoot.appendChild(ye._liveRegion)},0))},oe.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,fe.isMac&&ve.removeElementFromParent(this._liveRegion)},oe.prototype._onKey=function(ge){this._clearLiveRegion(),this._charsToConsume.push(ge)},oe.prototype._refreshRows=function(ge,ye){this._renderRowsDebouncer.refresh(ge,ye,this._terminal.rows)},oe.prototype._renderRows=function(ge,ye){for(var we=this._terminal.buffer,Be=we.lines.length.toString(),ze=ge;ze<=ye;ze++){var $e=we.translateBufferLineToString(we.ydisp+ze,!0),Le=(we.ydisp+ze+1).toString(),Ne=this._rowElements[ze];Ne&&($e.length===0?Ne.innerHTML="&nbsp;":Ne.textContent=$e,Ne.setAttribute("aria-posinset",Le),Ne.setAttribute("aria-setsize",Be))}this._announceCharacters()},oe.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var ge=0;ge<this._terminal.rows;ge++)this._refreshRowDimensions(this._rowElements[ge])}},oe.prototype._refreshRowDimensions=function(ge){ge.style.height=this._renderService.dimensions.actualCellHeight+"px"},oe.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},oe}(ae.Disposable);ee.AccessibilityManager=ue},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(we,Be){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ze,$e){ze.__proto__=$e}||function(ze,$e){for(var Le in $e)$e.hasOwnProperty(Le)&&(ze[Le]=$e[Le])})(we,Be)},function(we,Be){function ze(){this.constructor=we}xe(we,Be),we.prototype=Be===null?Object.create(Be):(ze.prototype=Be.prototype,new ze)}),Ce=this&&this.__decorate||function(we,Be,ze,$e){var Le,Ne=arguments.length,Re=Ne<3?Be:$e===null?$e=Object.getOwnPropertyDescriptor(Be,ze):$e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Re=Reflect.decorate(we,Be,ze,$e);else for(var Se=we.length-1;Se>=0;Se--)(Le=we[Se])&&(Re=(Ne<3?Le(Re):Ne>3?Le(Be,ze,Re):Le(Be,ze))||Re);return Ne>3&&Re&&Object.defineProperty(Be,ze,Re),Re},fe=this&&this.__param||function(we,Be){return function(ze,$e){Be(ze,$e,we)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.DomRenderer=void 0;var he=ne(58),ce=ne(9),ae=ne(2),se=ne(5),ve=ne(1),ue=ne(0),pe=ne(10),oe=ne(17),ge=1,ye=function(we){function Be(ze,$e,Le,Ne,Re,Se,Ie,Ae,it){var Ue=we.call(this)||this;return Ue._colors=ze,Ue._element=$e,Ue._screenElement=Le,Ue._viewportElement=Ne,Ue._linkifier=Re,Ue._linkifier2=Se,Ue._charSizeService=Ie,Ue._optionsService=Ae,Ue._bufferService=it,Ue._terminalClass=ge++,Ue._rowElements=[],Ue._rowContainer=document.createElement("div"),Ue._rowContainer.classList.add("xterm-rows"),Ue._rowContainer.style.lineHeight="normal",Ue._rowContainer.setAttribute("aria-hidden","true"),Ue._refreshRowElements(Ue._bufferService.cols,Ue._bufferService.rows),Ue._selectionContainer=document.createElement("div"),Ue._selectionContainer.classList.add("xterm-selection"),Ue._selectionContainer.setAttribute("aria-hidden","true"),Ue.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Ue._updateDimensions(),Ue._injectCss(),Ue._rowFactory=new he.DomRendererRowFactory(document,Ue._optionsService,Ue._colors),Ue._element.classList.add("xterm-dom-renderer-owner-"+Ue._terminalClass),Ue._screenElement.appendChild(Ue._rowContainer),Ue._screenElement.appendChild(Ue._selectionContainer),Ue._linkifier.onShowLinkUnderline(function(gt){return Ue._onLinkHover(gt)}),Ue._linkifier.onHideLinkUnderline(function(gt){return Ue._onLinkLeave(gt)}),Ue._linkifier2.onShowLinkUnderline(function(gt){return Ue._onLinkHover(gt)}),Ue._linkifier2.onHideLinkUnderline(function(gt){return Ue._onLinkLeave(gt)}),Ue}return Me(Be,we),Object.defineProperty(Be.prototype,"onRequestRedraw",{get:function(){return new ue.EventEmitter().event},enumerable:!1,configurable:!0}),Be.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),oe.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),we.prototype.dispose.call(this)},Be.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var ze=0,$e=this._rowElements;ze<$e.length;ze++){var Le=$e[ze];Le.style.width=this.dimensions.canvasWidth+"px",Le.style.height=this.dimensions.actualCellHeight+"px",Le.style.lineHeight=this.dimensions.actualCellHeight+"px",Le.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var Ne=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=Ne,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},Be.prototype.setColors=function(ze){this._colors=ze,this._injectCss()},Be.prototype._injectCss=function(){var ze=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var $e=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";$e+=this._terminalSelector+" span:not(."+he.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+he.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+he.ITALIC_CLASS+" { font-style: italic;}",$e+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",$e+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",$e+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+he.CURSOR_CLASS+"."+he.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+he.CURSOR_CLASS+"."+he.CURSOR_BLINK_CLASS+":not(."+he.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+he.CURSOR_CLASS+"."+he.CURSOR_BLINK_CLASS+"."+he.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+he.CURSOR_CLASS+"."+he.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+he.CURSOR_CLASS+"."+he.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+he.CURSOR_CLASS+"."+he.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",$e+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(Le,Ne){$e+=ze._terminalSelector+" .xterm-fg-"+Ne+" { color: "+Le.css+"; }"+ze._terminalSelector+" .xterm-bg-"+Ne+" { background-color: "+Le.css+"; }"}),$e+=this._terminalSelector+" .xterm-fg-"+ce.INVERTED_DEFAULT_COLOR+" { color: "+pe.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+ce.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=$e},Be.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},Be.prototype._refreshRowElements=function(ze,$e){for(var Le=this._rowElements.length;Le<=$e;Le++){var Ne=document.createElement("div");this._rowContainer.appendChild(Ne),this._rowElements.push(Ne)}for(;this._rowElements.length>$e;)this._rowContainer.removeChild(this._rowElements.pop())},Be.prototype.onResize=function(ze,$e){this._refreshRowElements(ze,$e),this._updateDimensions()},Be.prototype.onCharSizeChanged=function(){this._updateDimensions()},Be.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},Be.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},Be.prototype.onSelectionChanged=function(ze,$e,Le){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(ze&&$e){var Ne=ze[1]-this._bufferService.buffer.ydisp,Re=$e[1]-this._bufferService.buffer.ydisp,Se=Math.max(Ne,0),Ie=Math.min(Re,this._bufferService.rows-1);if(!(Se>=this._bufferService.rows||Ie<0)){var Ae=document.createDocumentFragment();if(Le)Ae.appendChild(this._createSelectionElement(Se,ze[0],$e[0],Ie-Se+1));else{var it=Ne===Se?ze[0]:0,Ue=Se===Ie?$e[0]:this._bufferService.cols;Ae.appendChild(this._createSelectionElement(Se,it,Ue));var gt=Ie-Se-1;if(Ae.appendChild(this._createSelectionElement(Se+1,0,this._bufferService.cols,gt)),Se!==Ie){var Ve=Re===Ie?$e[0]:this._bufferService.cols;Ae.appendChild(this._createSelectionElement(Ie,0,Ve))}}this._selectionContainer.appendChild(Ae)}}},Be.prototype._createSelectionElement=function(ze,$e,Le,Ne){Ne===void 0&&(Ne=1);var Re=document.createElement("div");return Re.style.height=Ne*this.dimensions.actualCellHeight+"px",Re.style.top=ze*this.dimensions.actualCellHeight+"px",Re.style.left=$e*this.dimensions.actualCellWidth+"px",Re.style.width=this.dimensions.actualCellWidth*(Le-$e)+"px",Re},Be.prototype.onCursorMove=function(){},Be.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},Be.prototype.clear=function(){for(var ze=0,$e=this._rowElements;ze<$e.length;ze++)$e[ze].innerHTML=""},Be.prototype.renderRows=function(ze,$e){for(var Le=this._bufferService.buffer.ybase+this._bufferService.buffer.y,Ne=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),Re=this._optionsService.options.cursorBlink,Se=ze;Se<=$e;Se++){var Ie=this._rowElements[Se];Ie.innerHTML="";var Ae=Se+this._bufferService.buffer.ydisp,it=this._bufferService.buffer.lines.get(Ae),Ue=this._optionsService.options.cursorStyle;Ie.appendChild(this._rowFactory.createRow(it,Ae===Le,Ue,Ne,Re,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(Be.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),Be.prototype.registerCharacterJoiner=function(ze){return-1},Be.prototype.deregisterCharacterJoiner=function(ze){return!1},Be.prototype._onLinkHover=function(ze){this._setCellUnderline(ze.x1,ze.x2,ze.y1,ze.y2,ze.cols,!0)},Be.prototype._onLinkLeave=function(ze){this._setCellUnderline(ze.x1,ze.x2,ze.y1,ze.y2,ze.cols,!1)},Be.prototype._setCellUnderline=function(ze,$e,Le,Ne,Re,Se){for(;ze!==$e||Le!==Ne;){var Ie=this._rowElements[Le];if(!Ie)return;var Ae=Ie.children[ze];Ae&&(Ae.style.textDecoration=Se?"underline":"none"),++ze>=Re&&(ze=0,Le++)}},Be=Ce([fe(6,se.ICharSizeService),fe(7,ve.IOptionsService),fe(8,ve.IBufferService)],Be)}(ae.Disposable);ee.DomRenderer=ye},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.DomRendererRowFactory=ee.CURSOR_STYLE_UNDERLINE_CLASS=ee.CURSOR_STYLE_BAR_CLASS=ee.CURSOR_STYLE_BLOCK_CLASS=ee.CURSOR_BLINK_CLASS=ee.CURSOR_CLASS=ee.UNDERLINE_CLASS=ee.ITALIC_CLASS=ee.DIM_CLASS=ee.BOLD_CLASS=void 0;var xe=ne(9),Me=ne(3),Ce=ne(4),fe=ne(10);ee.BOLD_CLASS="xterm-bold",ee.DIM_CLASS="xterm-dim",ee.ITALIC_CLASS="xterm-italic",ee.UNDERLINE_CLASS="xterm-underline",ee.CURSOR_CLASS="xterm-cursor",ee.CURSOR_BLINK_CLASS="xterm-cursor-blink",ee.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",ee.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",ee.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var he=function(){function ae(se,ve,ue){this._document=se,this._optionsService=ve,this._colors=ue,this._workCell=new Ce.CellData}return ae.prototype.setColors=function(se){this._colors=se},ae.prototype.createRow=function(se,ve,ue,pe,oe,ge,ye){for(var we=this._document.createDocumentFragment(),Be=0,ze=Math.min(se.length,ye)-1;ze>=0;ze--)if(se.loadCell(ze,this._workCell).getCode()!==Me.NULL_CELL_CODE||ve&&ze===pe){Be=ze+1;break}for(ze=0;ze<Be;ze++){se.loadCell(ze,this._workCell);var $e=this._workCell.getWidth();if($e!==0){var Le=this._document.createElement("span");if($e>1&&(Le.style.width=ge*$e+"px"),ve&&ze===pe)switch(Le.classList.add(ee.CURSOR_CLASS),oe&&Le.classList.add(ee.CURSOR_BLINK_CLASS),ue){case"bar":Le.classList.add(ee.CURSOR_STYLE_BAR_CLASS);break;case"underline":Le.classList.add(ee.CURSOR_STYLE_UNDERLINE_CLASS);break;default:Le.classList.add(ee.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&Le.classList.add(ee.BOLD_CLASS),this._workCell.isItalic()&&Le.classList.add(ee.ITALIC_CLASS),this._workCell.isDim()&&Le.classList.add(ee.DIM_CLASS),this._workCell.isUnderline()&&Le.classList.add(ee.UNDERLINE_CLASS),this._workCell.isInvisible()?Le.textContent=Me.WHITESPACE_CELL_CHAR:Le.textContent=this._workCell.getChars()||Me.WHITESPACE_CELL_CHAR;var Ne=this._workCell.getFgColor(),Re=this._workCell.getFgColorMode(),Se=this._workCell.getBgColor(),Ie=this._workCell.getBgColorMode(),Ae=!!this._workCell.isInverse();if(Ae){var it=Ne;Ne=Se,Se=it;var Ue=Re;Re=Ie,Ie=Ue}switch(Re){case 16777216:case 33554432:this._workCell.isBold()&&Ne<8&&this._optionsService.options.drawBoldTextInBrightColors&&(Ne+=8),this._applyMinimumContrast(Le,this._colors.background,this._colors.ansi[Ne])||Le.classList.add("xterm-fg-"+Ne);break;case 50331648:var gt=fe.rgba.toColor(Ne>>16&255,Ne>>8&255,255&Ne);this._applyMinimumContrast(Le,this._colors.background,gt)||this._addStyle(Le,"color:#"+ce(Ne.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(Le,this._colors.background,this._colors.foreground)||Ae&&Le.classList.add("xterm-fg-"+xe.INVERTED_DEFAULT_COLOR)}switch(Ie){case 16777216:case 33554432:Le.classList.add("xterm-bg-"+Se);break;case 50331648:this._addStyle(Le,"background-color:#"+ce(Se.toString(16),"0",6));break;case 0:default:Ae&&Le.classList.add("xterm-bg-"+xe.INVERTED_DEFAULT_COLOR)}we.appendChild(Le)}}return we},ae.prototype._applyMinimumContrast=function(se,ve,ue){if(this._optionsService.options.minimumContrastRatio===1)return!1;var pe=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return pe===void 0&&(pe=fe.color.ensureContrastRatio(ve,ue,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,pe!=null?pe:null)),!!pe&&(this._addStyle(se,"color:"+pe.css),!0)},ae.prototype._addStyle=function(se,ve){se.setAttribute("style",""+(se.getAttribute("style")||"")+ve+";")},ae}();function ce(ae,se,ve){for(;ae.length<ve;)ae=se+ae;return ae}ee.DomRendererRowFactory=he},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.evaluateKeyboardEvent=void 0;var xe=ne(12),Me={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};ee.evaluateKeyboardEvent=function(Ce,fe,he,ce){var ae={type:0,cancel:!1,key:void 0},se=(Ce.shiftKey?1:0)|(Ce.altKey?2:0)|(Ce.ctrlKey?4:0)|(Ce.metaKey?8:0);switch(Ce.keyCode){case 0:Ce.key==="UIKeyInputUpArrow"?ae.key=fe?xe.C0.ESC+"OA":xe.C0.ESC+"[A":Ce.key==="UIKeyInputLeftArrow"?ae.key=fe?xe.C0.ESC+"OD":xe.C0.ESC+"[D":Ce.key==="UIKeyInputRightArrow"?ae.key=fe?xe.C0.ESC+"OC":xe.C0.ESC+"[C":Ce.key==="UIKeyInputDownArrow"&&(ae.key=fe?xe.C0.ESC+"OB":xe.C0.ESC+"[B");break;case 8:if(Ce.shiftKey){ae.key=xe.C0.BS;break}if(Ce.altKey){ae.key=xe.C0.ESC+xe.C0.DEL;break}ae.key=xe.C0.DEL;break;case 9:if(Ce.shiftKey){ae.key=xe.C0.ESC+"[Z";break}ae.key=xe.C0.HT,ae.cancel=!0;break;case 13:ae.key=Ce.altKey?xe.C0.ESC+xe.C0.CR:xe.C0.CR,ae.cancel=!0;break;case 27:ae.key=xe.C0.ESC,Ce.altKey&&(ae.key=xe.C0.ESC+xe.C0.ESC),ae.cancel=!0;break;case 37:if(Ce.metaKey)break;se?(ae.key=xe.C0.ESC+"[1;"+(se+1)+"D",ae.key===xe.C0.ESC+"[1;3D"&&(ae.key=xe.C0.ESC+(he?"b":"[1;5D"))):ae.key=fe?xe.C0.ESC+"OD":xe.C0.ESC+"[D";break;case 39:if(Ce.metaKey)break;se?(ae.key=xe.C0.ESC+"[1;"+(se+1)+"C",ae.key===xe.C0.ESC+"[1;3C"&&(ae.key=xe.C0.ESC+(he?"f":"[1;5C"))):ae.key=fe?xe.C0.ESC+"OC":xe.C0.ESC+"[C";break;case 38:if(Ce.metaKey)break;se?(ae.key=xe.C0.ESC+"[1;"+(se+1)+"A",he||ae.key!==xe.C0.ESC+"[1;3A"||(ae.key=xe.C0.ESC+"[1;5A")):ae.key=fe?xe.C0.ESC+"OA":xe.C0.ESC+"[A";break;case 40:if(Ce.metaKey)break;se?(ae.key=xe.C0.ESC+"[1;"+(se+1)+"B",he||ae.key!==xe.C0.ESC+"[1;3B"||(ae.key=xe.C0.ESC+"[1;5B")):ae.key=fe?xe.C0.ESC+"OB":xe.C0.ESC+"[B";break;case 45:Ce.shiftKey||Ce.ctrlKey||(ae.key=xe.C0.ESC+"[2~");break;case 46:ae.key=se?xe.C0.ESC+"[3;"+(se+1)+"~":xe.C0.ESC+"[3~";break;case 36:ae.key=se?xe.C0.ESC+"[1;"+(se+1)+"H":fe?xe.C0.ESC+"OH":xe.C0.ESC+"[H";break;case 35:ae.key=se?xe.C0.ESC+"[1;"+(se+1)+"F":fe?xe.C0.ESC+"OF":xe.C0.ESC+"[F";break;case 33:Ce.shiftKey?ae.type=2:ae.key=xe.C0.ESC+"[5~";break;case 34:Ce.shiftKey?ae.type=3:ae.key=xe.C0.ESC+"[6~";break;case 112:ae.key=se?xe.C0.ESC+"[1;"+(se+1)+"P":xe.C0.ESC+"OP";break;case 113:ae.key=se?xe.C0.ESC+"[1;"+(se+1)+"Q":xe.C0.ESC+"OQ";break;case 114:ae.key=se?xe.C0.ESC+"[1;"+(se+1)+"R":xe.C0.ESC+"OR";break;case 115:ae.key=se?xe.C0.ESC+"[1;"+(se+1)+"S":xe.C0.ESC+"OS";break;case 116:ae.key=se?xe.C0.ESC+"[15;"+(se+1)+"~":xe.C0.ESC+"[15~";break;case 117:ae.key=se?xe.C0.ESC+"[17;"+(se+1)+"~":xe.C0.ESC+"[17~";break;case 118:ae.key=se?xe.C0.ESC+"[18;"+(se+1)+"~":xe.C0.ESC+"[18~";break;case 119:ae.key=se?xe.C0.ESC+"[19;"+(se+1)+"~":xe.C0.ESC+"[19~";break;case 120:ae.key=se?xe.C0.ESC+"[20;"+(se+1)+"~":xe.C0.ESC+"[20~";break;case 121:ae.key=se?xe.C0.ESC+"[21;"+(se+1)+"~":xe.C0.ESC+"[21~";break;case 122:ae.key=se?xe.C0.ESC+"[23;"+(se+1)+"~":xe.C0.ESC+"[23~";break;case 123:ae.key=se?xe.C0.ESC+"[24;"+(se+1)+"~":xe.C0.ESC+"[24~";break;default:if(!Ce.ctrlKey||Ce.shiftKey||Ce.altKey||Ce.metaKey)if(he&&!ce||!Ce.altKey||Ce.metaKey)he&&!Ce.altKey&&!Ce.ctrlKey&&Ce.metaKey?Ce.keyCode===65&&(ae.type=1):Ce.key&&!Ce.ctrlKey&&!Ce.altKey&&!Ce.metaKey&&Ce.keyCode>=48&&Ce.key.length===1?ae.key=Ce.key:Ce.key&&Ce.ctrlKey&&Ce.key==="_"&&(ae.key=xe.C0.US);else{var ve=Me[Ce.keyCode],ue=ve&&ve[Ce.shiftKey?1:0];if(ue)ae.key=xe.C0.ESC+ue;else if(Ce.keyCode>=65&&Ce.keyCode<=90){var pe=Ce.ctrlKey?Ce.keyCode-64:Ce.keyCode+32;ae.key=xe.C0.ESC+String.fromCharCode(pe)}}else Ce.keyCode>=65&&Ce.keyCode<=90?ae.key=String.fromCharCode(Ce.keyCode-64):Ce.keyCode===32?ae.key=xe.C0.NUL:Ce.keyCode>=51&&Ce.keyCode<=55?ae.key=String.fromCharCode(Ce.keyCode-51+27):Ce.keyCode===56?ae.key=xe.C0.DEL:Ce.keyCode===219?ae.key=xe.C0.ESC:Ce.keyCode===220?ae.key=xe.C0.FS:Ce.keyCode===221&&(ae.key=xe.C0.GS)}return ae}},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ge,ye){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(we,Be){we.__proto__=Be}||function(we,Be){for(var ze in Be)Be.hasOwnProperty(ze)&&(we[ze]=Be[ze])})(ge,ye)},function(ge,ye){function we(){this.constructor=ge}xe(ge,ye),ge.prototype=ye===null?Object.create(ye):(we.prototype=ye.prototype,new we)}),Ce=this&&this.__decorate||function(ge,ye,we,Be){var ze,$e=arguments.length,Le=$e<3?ye:Be===null?Be=Object.getOwnPropertyDescriptor(ye,we):Be;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Le=Reflect.decorate(ge,ye,we,Be);else for(var Ne=ge.length-1;Ne>=0;Ne--)(ze=ge[Ne])&&(Le=($e<3?ze(Le):$e>3?ze(ye,we,Le):ze(ye,we))||Le);return $e>3&&Le&&Object.defineProperty(ye,we,Le),Le},fe=this&&this.__param||function(ge,ye){return function(we,Be){ye(we,Be,ge)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.RenderService=void 0;var he=ne(31),ce=ne(0),ae=ne(2),se=ne(32),ve=ne(7),ue=ne(1),pe=ne(5),oe=function(ge){function ye(we,Be,ze,$e,Le,Ne){var Re=ge.call(this)||this;if(Re._renderer=we,Re._rowCount=Be,Re._isPaused=!1,Re._needsFullRefresh=!1,Re._isNextRenderRedrawOnly=!0,Re._needsSelectionRefresh=!1,Re._canvasWidth=0,Re._canvasHeight=0,Re._selectionState={start:void 0,end:void 0,columnSelectMode:!1},Re._onDimensionsChange=new ce.EventEmitter,Re._onRender=new ce.EventEmitter,Re._onRefreshRequest=new ce.EventEmitter,Re.register({dispose:function(){return Re._renderer.dispose()}}),Re._renderDebouncer=new he.RenderDebouncer(function(Ie,Ae){return Re._renderRows(Ie,Ae)}),Re.register(Re._renderDebouncer),Re._screenDprMonitor=new se.ScreenDprMonitor,Re._screenDprMonitor.setListener(function(){return Re.onDevicePixelRatioChange()}),Re.register(Re._screenDprMonitor),Re.register(Ne.onResize(function(Ie){return Re._fullRefresh()})),Re.register($e.onOptionChange(function(){return Re._renderer.onOptionsChanged()})),Re.register(Le.onCharSizeChange(function(){return Re.onCharSizeChanged()})),Re._renderer.onRequestRedraw(function(Ie){return Re.refreshRows(Ie.start,Ie.end,!0)}),Re.register(ve.addDisposableDomListener(window,"resize",function(){return Re.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var Se=new IntersectionObserver(function(Ie){return Re._onIntersectionChange(Ie[Ie.length-1])},{threshold:0});Se.observe(ze),Re.register({dispose:function(){return Se.disconnect()}})}return Re}return Me(ye,ge),Object.defineProperty(ye.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),ye.prototype._onIntersectionChange=function(we){this._isPaused=we.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},ye.prototype.refreshRows=function(we,Be,ze){ze===void 0&&(ze=!1),this._isPaused?this._needsFullRefresh=!0:(ze||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(we,Be,this._rowCount))},ye.prototype._renderRows=function(we,Be){this._renderer.renderRows(we,Be),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:we,end:Be}),this._isNextRenderRedrawOnly=!0},ye.prototype.resize=function(we,Be){this._rowCount=Be,this._fireOnCanvasResize()},ye.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},ye.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},ye.prototype.dispose=function(){ge.prototype.dispose.call(this)},ye.prototype.setRenderer=function(we){var Be=this;this._renderer.dispose(),this._renderer=we,this._renderer.onRequestRedraw(function(ze){return Be.refreshRows(ze.start,ze.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},ye.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},ye.prototype.setColors=function(we){this._renderer.setColors(we),this._fullRefresh()},ye.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},ye.prototype.onResize=function(we,Be){this._renderer.onResize(we,Be),this._fullRefresh()},ye.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},ye.prototype.onBlur=function(){this._renderer.onBlur()},ye.prototype.onFocus=function(){this._renderer.onFocus()},ye.prototype.onSelectionChanged=function(we,Be,ze){this._selectionState.start=we,this._selectionState.end=Be,this._selectionState.columnSelectMode=ze,this._renderer.onSelectionChanged(we,Be,ze)},ye.prototype.onCursorMove=function(){this._renderer.onCursorMove()},ye.prototype.clear=function(){this._renderer.clear()},ye.prototype.registerCharacterJoiner=function(we){return this._renderer.registerCharacterJoiner(we)},ye.prototype.deregisterCharacterJoiner=function(we){return this._renderer.deregisterCharacterJoiner(we)},ye=Ce([fe(3,ue.IOptionsService),fe(4,pe.ICharSizeService),fe(5,ue.IBufferService)],ye)}(ae.Disposable);ee.RenderService=oe},function(kt,ee,ne){"use strict";var xe=this&&this.__decorate||function(ae,se,ve,ue){var pe,oe=arguments.length,ge=oe<3?se:ue===null?ue=Object.getOwnPropertyDescriptor(se,ve):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(ae,se,ve,ue);else for(var ye=ae.length-1;ye>=0;ye--)(pe=ae[ye])&&(ge=(oe<3?pe(ge):oe>3?pe(se,ve,ge):pe(se,ve))||ge);return oe>3&&ge&&Object.defineProperty(se,ve,ge),ge},Me=this&&this.__param||function(ae,se){return function(ve,ue){se(ve,ue,ae)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.CharSizeService=void 0;var Ce=ne(1),fe=ne(0),he=function(){function ae(se,ve,ue){this._optionsService=ue,this.width=0,this.height=0,this._onCharSizeChange=new fe.EventEmitter,this._measureStrategy=new ce(se,ve,this._optionsService)}return Object.defineProperty(ae.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),ae.prototype.measure=function(){var se=this._measureStrategy.measure();se.width===this.width&&se.height===this.height||(this.width=se.width,this.height=se.height,this._onCharSizeChange.fire())},ae=xe([Me(2,Ce.IOptionsService)],ae)}();ee.CharSizeService=he;var ce=function(){function ae(se,ve,ue){this._document=se,this._parentElement=ve,this._optionsService=ue,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return ae.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var se=this._measureElement.getBoundingClientRect();return se.width!==0&&se.height!==0&&(this._result.width=se.width,this._result.height=Math.ceil(se.height)),this._result},ae}()},function(kt,ee,ne){"use strict";var xe=this&&this.__decorate||function(ce,ae,se,ve){var ue,pe=arguments.length,oe=pe<3?ae:ve===null?ve=Object.getOwnPropertyDescriptor(ae,se):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ae,se,ve);else for(var ge=ce.length-1;ge>=0;ge--)(ue=ce[ge])&&(oe=(pe<3?ue(oe):pe>3?ue(ae,se,oe):ue(ae,se))||oe);return pe>3&&oe&&Object.defineProperty(ae,se,oe),oe},Me=this&&this.__param||function(ce,ae){return function(se,ve){ae(se,ve,ce)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.MouseService=void 0;var Ce=ne(5),fe=ne(30),he=function(){function ce(ae,se){this._renderService=ae,this._charSizeService=se}return ce.prototype.getCoords=function(ae,se,ve,ue,pe){return fe.getCoords(ae,se,ve,ue,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,pe)},ce.prototype.getRawByteCoords=function(ae,se,ve,ue){var pe=this.getCoords(ae,se,ve,ue);return fe.getRawByteCoords(pe)},ce=xe([Me(0,Ce.IRenderService),Me(1,Ce.ICharSizeService)],ce)}();ee.MouseService=he},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ue,pe){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ge){oe.__proto__=ge}||function(oe,ge){for(var ye in ge)ge.hasOwnProperty(ye)&&(oe[ye]=ge[ye])})(ue,pe)},function(ue,pe){function oe(){this.constructor=ue}xe(ue,pe),ue.prototype=pe===null?Object.create(pe):(oe.prototype=pe.prototype,new oe)}),Ce=this&&this.__decorate||function(ue,pe,oe,ge){var ye,we=arguments.length,Be=we<3?pe:ge===null?ge=Object.getOwnPropertyDescriptor(pe,oe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ue,pe,oe,ge);else for(var ze=ue.length-1;ze>=0;ze--)(ye=ue[ze])&&(Be=(we<3?ye(Be):we>3?ye(pe,oe,Be):ye(pe,oe))||Be);return we>3&&Be&&Object.defineProperty(pe,oe,Be),Be},fe=this&&this.__param||function(ue,pe){return function(oe,ge){pe(oe,ge,ue)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.Linkifier2=void 0;var he=ne(1),ce=ne(0),ae=ne(2),se=ne(7),ve=function(ue){function pe(oe){var ge=ue.call(this)||this;return ge._bufferService=oe,ge._linkProviders=[],ge._linkCacheDisposables=[],ge._isMouseOut=!0,ge._activeLine=-1,ge._onShowLinkUnderline=ge.register(new ce.EventEmitter),ge._onHideLinkUnderline=ge.register(new ce.EventEmitter),ge.register(ae.getDisposeArrayDisposable(ge._linkCacheDisposables)),ge}return Me(pe,ue),Object.defineProperty(pe.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),pe.prototype.registerLinkProvider=function(oe){var ge=this;return this._linkProviders.push(oe),{dispose:function(){var ye=ge._linkProviders.indexOf(oe);ye!==-1&&ge._linkProviders.splice(ye,1)}}},pe.prototype.attachToDom=function(oe,ge,ye){var we=this;this._element=oe,this._mouseService=ge,this._renderService=ye,this.register(se.addDisposableDomListener(this._element,"mouseleave",function(){we._isMouseOut=!0,we._clearCurrentLink()})),this.register(se.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(se.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},pe.prototype._onMouseMove=function(oe){if(this._lastMouseEvent=oe,this._element&&this._mouseService){var ge=this._positionFromMouseEvent(oe,this._element,this._mouseService);if(ge){this._isMouseOut=!1;for(var ye=oe.composedPath(),we=0;we<ye.length;we++){var Be=ye[we];if(Be.classList.contains("xterm"))break;if(Be.classList.contains("xterm-hover"))return}this._lastBufferCell&&ge.x===this._lastBufferCell.x&&ge.y===this._lastBufferCell.y||(this._onHover(ge),this._lastBufferCell=ge)}}},pe.prototype._onHover=function(oe){if(this._activeLine!==oe.y)return this._clearCurrentLink(),void this._askForLink(oe,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,oe)||(this._clearCurrentLink(),this._askForLink(oe,!0))},pe.prototype._askForLink=function(oe,ge){var ye=this;this._activeProviderReplies&&ge||(this._activeProviderReplies=new Map,this._activeLine=oe.y);var we=!1;this._linkProviders.forEach(function(Be,ze){var $e;ge?!(($e=ye._activeProviderReplies)===null||$e===void 0)&&$e.get(ze)&&(we=ye._checkLinkProviderResult(ze,oe,we)):Be.provideLinks(oe.y,function(Le){var Ne,Re;if(!ye._isMouseOut){var Se=Le==null?void 0:Le.map(function(Ie){return{link:Ie}});(Ne=ye._activeProviderReplies)===null||Ne===void 0||Ne.set(ze,Se),we=ye._checkLinkProviderResult(ze,oe,we),((Re=ye._activeProviderReplies)===null||Re===void 0?void 0:Re.size)===ye._linkProviders.length&&ye._removeIntersectingLinks(oe.y,ye._activeProviderReplies)}})})},pe.prototype._removeIntersectingLinks=function(oe,ge){for(var ye=new Set,we=0;we<ge.size;we++){var Be=ge.get(we);if(Be)for(var ze=0;ze<Be.length;ze++)for(var $e=Be[ze],Le=$e.link.range.start.y<oe?0:$e.link.range.start.x,Ne=$e.link.range.end.y>oe?this._bufferService.cols:$e.link.range.end.x,Re=Le;Re<=Ne;Re++){if(ye.has(Re)){Be.splice(ze--,1);break}ye.add(Re)}}},pe.prototype._checkLinkProviderResult=function(oe,ge,ye){var we,Be=this;if(!this._activeProviderReplies)return ye;for(var ze=this._activeProviderReplies.get(oe),$e=!1,Le=0;Le<oe;Le++)this._activeProviderReplies.has(Le)&&!this._activeProviderReplies.get(Le)||($e=!0);if(!$e&&ze){var Ne=ze.find(function(Se){return Be._linkAtPosition(Se.link,ge)});Ne&&(ye=!0,this._handleNewLink(Ne))}if(this._activeProviderReplies.size===this._linkProviders.length&&!ye)for(Le=0;Le<this._activeProviderReplies.size;Le++){var Re=(we=this._activeProviderReplies.get(Le))===null||we===void 0?void 0:we.find(function(Se){return Be._linkAtPosition(Se.link,ge)});if(Re){ye=!0,this._handleNewLink(Re);break}}return ye},pe.prototype._onClick=function(oe){if(this._element&&this._mouseService&&this._currentLink){var ge=this._positionFromMouseEvent(oe,this._element,this._mouseService);ge&&this._linkAtPosition(this._currentLink.link,ge)&&this._currentLink.link.activate(oe,this._currentLink.link.text)}},pe.prototype._clearCurrentLink=function(oe,ge){this._element&&this._currentLink&&this._lastMouseEvent&&(!oe||!ge||this._currentLink.link.range.start.y>=oe&&this._currentLink.link.range.end.y<=ge)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ae.disposeArray(this._linkCacheDisposables))},pe.prototype._handleNewLink=function(oe){var ge=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var ye=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);ye&&this._linkAtPosition(oe.link,ye)&&(this._currentLink=oe,this._currentLink.state={decorations:{underline:oe.link.decorations===void 0||oe.link.decorations.underline,pointerCursor:oe.link.decorations===void 0||oe.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,oe.link,this._lastMouseEvent),oe.link.decorations={},Object.defineProperties(oe.link.decorations,{pointerCursor:{get:function(){var we,Be;return(Be=(we=ge._currentLink)===null||we===void 0?void 0:we.state)===null||Be===void 0?void 0:Be.decorations.pointerCursor},set:function(we){var Be,ze;!((Be=ge._currentLink)===null||Be===void 0)&&Be.state&&ge._currentLink.state.decorations.pointerCursor!==we&&(ge._currentLink.state.decorations.pointerCursor=we,ge._currentLink.state.isHovered&&((ze=ge._element)===null||ze===void 0||ze.classList.toggle("xterm-cursor-pointer",we)))}},underline:{get:function(){var we,Be;return(Be=(we=ge._currentLink)===null||we===void 0?void 0:we.state)===null||Be===void 0?void 0:Be.decorations.underline},set:function(we){var Be,ze,$e;!((Be=ge._currentLink)===null||Be===void 0)&&Be.state&&(($e=(ze=ge._currentLink)===null||ze===void 0?void 0:ze.state)===null||$e===void 0?void 0:$e.decorations.underline)!==we&&(ge._currentLink.state.decorations.underline=we,ge._currentLink.state.isHovered&&ge._fireUnderlineEvent(oe.link,we))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(we){var Be=we.start===0?0:we.start+1+ge._bufferService.buffer.ydisp;ge._clearCurrentLink(Be,we.end+1+ge._bufferService.buffer.ydisp)})))}},pe.prototype._linkHover=function(oe,ge,ye){var we;!((we=this._currentLink)===null||we===void 0)&&we.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ge,!0),this._currentLink.state.decorations.pointerCursor&&oe.classList.add("xterm-cursor-pointer")),ge.hover&&ge.hover(ye,ge.text)},pe.prototype._fireUnderlineEvent=function(oe,ge){var ye=oe.range,we=this._bufferService.buffer.ydisp,Be=this._createLinkUnderlineEvent(ye.start.x-1,ye.start.y-we-1,ye.end.x,ye.end.y-we-1,void 0);(ge?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(Be)},pe.prototype._linkLeave=function(oe,ge,ye){var we;!((we=this._currentLink)===null||we===void 0)&&we.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ge,!1),this._currentLink.state.decorations.pointerCursor&&oe.classList.remove("xterm-cursor-pointer")),ge.leave&&ge.leave(ye,ge.text)},pe.prototype._linkAtPosition=function(oe,ge){var ye=oe.range.start.y===oe.range.end.y,we=oe.range.start.y<ge.y,Be=oe.range.end.y>ge.y;return(ye&&oe.range.start.x<=ge.x&&oe.range.end.x>=ge.x||we&&oe.range.end.x>=ge.x||Be&&oe.range.start.x<=ge.x||we&&Be)&&oe.range.start.y<=ge.y&&oe.range.end.y>=ge.y},pe.prototype._positionFromMouseEvent=function(oe,ge,ye){var we=ye.getCoords(oe,ge,this._bufferService.cols,this._bufferService.rows);if(we)return{x:we[0],y:we[1]+this._bufferService.buffer.ydisp}},pe.prototype._createLinkUnderlineEvent=function(oe,ge,ye,we,Be){return{x1:oe,y1:ge,x2:ye,y2:we,cols:this._bufferService.cols,fg:Be}},pe=Ce([fe(0,he.IBufferService)],pe)}(ae.Disposable);ee.Linkifier2=ve},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.CoreBrowserService=void 0;var xe=function(){function Me(Ce){this._textarea=Ce}return Object.defineProperty(Me.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Me}();ee.CoreBrowserService=xe},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(Le,Ne){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Re,Se){Re.__proto__=Se}||function(Re,Se){for(var Ie in Se)Se.hasOwnProperty(Ie)&&(Re[Ie]=Se[Ie])})(Le,Ne)},function(Le,Ne){function Re(){this.constructor=Le}xe(Le,Ne),Le.prototype=Ne===null?Object.create(Ne):(Re.prototype=Ne.prototype,new Re)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.CoreTerminal=void 0;var Ce=ne(2),fe=ne(1),he=ne(66),ce=ne(67),ae=ne(68),se=ne(74),ve=ne(75),ue=ne(0),pe=ne(76),oe=ne(77),ge=ne(78),ye=ne(80),we=ne(81),Be=ne(19),ze=ne(82),$e=function(Le){function Ne(Re){var Se=Le.call(this)||this;return Se._onBinary=new ue.EventEmitter,Se._onData=new ue.EventEmitter,Se._onLineFeed=new ue.EventEmitter,Se._onResize=new ue.EventEmitter,Se._onScroll=new ue.EventEmitter,Se._instantiationService=new he.InstantiationService,Se.optionsService=new se.OptionsService(Re),Se._instantiationService.setService(fe.IOptionsService,Se.optionsService),Se._bufferService=Se.register(Se._instantiationService.createInstance(ae.BufferService)),Se._instantiationService.setService(fe.IBufferService,Se._bufferService),Se._logService=Se._instantiationService.createInstance(ce.LogService),Se._instantiationService.setService(fe.ILogService,Se._logService),Se._coreService=Se.register(Se._instantiationService.createInstance(ve.CoreService,function(){return Se.scrollToBottom()})),Se._instantiationService.setService(fe.ICoreService,Se._coreService),Se._coreMouseService=Se._instantiationService.createInstance(pe.CoreMouseService),Se._instantiationService.setService(fe.ICoreMouseService,Se._coreMouseService),Se._dirtyRowService=Se._instantiationService.createInstance(oe.DirtyRowService),Se._instantiationService.setService(fe.IDirtyRowService,Se._dirtyRowService),Se.unicodeService=Se._instantiationService.createInstance(ge.UnicodeService),Se._instantiationService.setService(fe.IUnicodeService,Se.unicodeService),Se._charsetService=Se._instantiationService.createInstance(ye.CharsetService),Se._instantiationService.setService(fe.ICharsetService,Se._charsetService),Se._inputHandler=new Be.InputHandler(Se._bufferService,Se._charsetService,Se._coreService,Se._dirtyRowService,Se._logService,Se.optionsService,Se._coreMouseService,Se.unicodeService),Se.register(ue.forwardEvent(Se._inputHandler.onLineFeed,Se._onLineFeed)),Se.register(Se._inputHandler),Se.register(ue.forwardEvent(Se._bufferService.onResize,Se._onResize)),Se.register(ue.forwardEvent(Se._coreService.onData,Se._onData)),Se.register(ue.forwardEvent(Se._coreService.onBinary,Se._onBinary)),Se.register(Se.optionsService.onOptionChange(function(Ie){return Se._updateOptions(Ie)})),Se._writeBuffer=new ze.WriteBuffer(function(Ie){return Se._inputHandler.parse(Ie)}),Se}return Me(Ne,Le),Object.defineProperty(Ne.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Ne.prototype.dispose=function(){var Re;this._isDisposed||(Le.prototype.dispose.call(this),(Re=this._windowsMode)===null||Re===void 0||Re.dispose(),this._windowsMode=void 0)},Ne.prototype.write=function(Re,Se){this._writeBuffer.write(Re,Se)},Ne.prototype.writeSync=function(Re){this._writeBuffer.writeSync(Re)},Ne.prototype.resize=function(Re,Se){isNaN(Re)||isNaN(Se)||(Re=Math.max(Re,ae.MINIMUM_COLS),Se=Math.max(Se,ae.MINIMUM_ROWS),this._bufferService.resize(Re,Se))},Ne.prototype.scroll=function(Re,Se){Se===void 0&&(Se=!1);var Ie,Ae=this._bufferService.buffer;(Ie=this._cachedBlankLine)&&Ie.length===this.cols&&Ie.getFg(0)===Re.fg&&Ie.getBg(0)===Re.bg||(Ie=Ae.getBlankLine(Re,Se),this._cachedBlankLine=Ie),Ie.isWrapped=Se;var it=Ae.ybase+Ae.scrollTop,Ue=Ae.ybase+Ae.scrollBottom;if(Ae.scrollTop===0){var gt=Ae.lines.isFull;Ue===Ae.lines.length-1?gt?Ae.lines.recycle().copyFrom(Ie):Ae.lines.push(Ie.clone()):Ae.lines.splice(Ue+1,0,Ie.clone()),gt?this._bufferService.isUserScrolling&&(Ae.ydisp=Math.max(Ae.ydisp-1,0)):(Ae.ybase++,this._bufferService.isUserScrolling||Ae.ydisp++)}else{var Ve=Ue-it+1;Ae.lines.shiftElements(it+1,Ve-1,-1),Ae.lines.set(Ue,Ie.clone())}this._bufferService.isUserScrolling||(Ae.ydisp=Ae.ybase),this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom),this._onScroll.fire(Ae.ydisp)},Ne.prototype.scrollLines=function(Re,Se){var Ie=this._bufferService.buffer;if(Re<0){if(Ie.ydisp===0)return;this._bufferService.isUserScrolling=!0}else Re+Ie.ydisp>=Ie.ybase&&(this._bufferService.isUserScrolling=!1);var Ae=Ie.ydisp;Ie.ydisp=Math.max(Math.min(Ie.ydisp+Re,Ie.ybase),0),Ae!==Ie.ydisp&&(Se||this._onScroll.fire(Ie.ydisp))},Ne.prototype.scrollPages=function(Re){this.scrollLines(Re*(this.rows-1))},Ne.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},Ne.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},Ne.prototype.scrollToLine=function(Re){var Se=Re-this._bufferService.buffer.ydisp;Se!==0&&this.scrollLines(Se)},Ne.prototype.addEscHandler=function(Re,Se){return this._inputHandler.addEscHandler(Re,Se)},Ne.prototype.addDcsHandler=function(Re,Se){return this._inputHandler.addDcsHandler(Re,Se)},Ne.prototype.addCsiHandler=function(Re,Se){return this._inputHandler.addCsiHandler(Re,Se)},Ne.prototype.addOscHandler=function(Re,Se){return this._inputHandler.addOscHandler(Re,Se)},Ne.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},Ne.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},Ne.prototype._updateOptions=function(Re){var Se;switch(Re){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((Se=this._windowsMode)===null||Se===void 0||Se.dispose(),this._windowsMode=void 0)}},Ne.prototype._enableWindowsMode=function(){var Re=this;if(!this._windowsMode){var Se=[];Se.push(this.onLineFeed(we.updateWindowsModeWrappedState.bind(null,this._bufferService))),Se.push(this.addCsiHandler({final:"H"},function(){return we.updateWindowsModeWrappedState(Re._bufferService),!1})),this._windowsMode={dispose:function(){for(var Ie=0,Ae=Se;Ie<Ae.length;Ie++)Ae[Ie].dispose()}}}},Ne}(Ce.Disposable);ee.CoreTerminal=$e},function(kt,ee,ne){"use strict";var xe=this&&this.__spreadArrays||function(){for(var ce=0,ae=0,se=arguments.length;ae<se;ae++)ce+=arguments[ae].length;var ve=Array(ce),ue=0;for(ae=0;ae<se;ae++)for(var pe=arguments[ae],oe=0,ge=pe.length;oe<ge;oe++,ue++)ve[ue]=pe[oe];return ve};Object.defineProperty(ee,"__esModule",{value:!0}),ee.InstantiationService=ee.ServiceCollection=void 0;var Me=ne(1),Ce=ne(14),fe=function(){function ce(){for(var ae=[],se=0;se<arguments.length;se++)ae[se]=arguments[se];this._entries=new Map;for(var ve=0,ue=ae;ve<ue.length;ve++){var pe=ue[ve],oe=pe[0],ge=pe[1];this.set(oe,ge)}}return ce.prototype.set=function(ae,se){var ve=this._entries.get(ae);return this._entries.set(ae,se),ve},ce.prototype.forEach=function(ae){this._entries.forEach(function(se,ve){return ae(ve,se)})},ce.prototype.has=function(ae){return this._entries.has(ae)},ce.prototype.get=function(ae){return this._entries.get(ae)},ce}();ee.ServiceCollection=fe;var he=function(){function ce(){this._services=new fe,this._services.set(Me.IInstantiationService,this)}return ce.prototype.setService=function(ae,se){this._services.set(ae,se)},ce.prototype.getService=function(ae){return this._services.get(ae)},ce.prototype.createInstance=function(ae){for(var se=[],ve=1;ve<arguments.length;ve++)se[ve-1]=arguments[ve];for(var ue=Ce.getServiceDependencies(ae).sort(function(ze,$e){return ze.index-$e.index}),pe=[],oe=0,ge=ue;oe<ge.length;oe++){var ye=ge[oe],we=this._services.get(ye.id);if(!we)throw new Error("[createInstance] "+ae.name+" depends on UNKNOWN service "+ye.id+".");pe.push(we)}var Be=ue.length>0?ue[0].index:se.length;if(se.length!==Be)throw new Error("[createInstance] First service dependency of "+ae.name+" at position "+(Be+1)+" conflicts with "+se.length+" static arguments");return new(ae.bind.apply(ae,xe([void 0],xe(se,pe))))},ce}();ee.InstantiationService=he},function(kt,ee,ne){"use strict";var xe=this&&this.__decorate||function(se,ve,ue,pe){var oe,ge=arguments.length,ye=ge<3?ve:pe===null?pe=Object.getOwnPropertyDescriptor(ve,ue):pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ye=Reflect.decorate(se,ve,ue,pe);else for(var we=se.length-1;we>=0;we--)(oe=se[we])&&(ye=(ge<3?oe(ye):ge>3?oe(ve,ue,ye):oe(ve,ue))||ye);return ge>3&&ye&&Object.defineProperty(ve,ue,ye),ye},Me=this&&this.__param||function(se,ve){return function(ue,pe){ve(ue,pe,se)}},Ce=this&&this.__spreadArrays||function(){for(var se=0,ve=0,ue=arguments.length;ve<ue;ve++)se+=arguments[ve].length;var pe=Array(se),oe=0;for(ve=0;ve<ue;ve++)for(var ge=arguments[ve],ye=0,we=ge.length;ye<we;ye++,oe++)pe[oe]=ge[ye];return pe};Object.defineProperty(ee,"__esModule",{value:!0}),ee.LogService=ee.LogLevel=void 0;var fe,he=ne(1);(function(se){se[se.DEBUG=0]="DEBUG",se[se.INFO=1]="INFO",se[se.WARN=2]="WARN",se[se.ERROR=3]="ERROR",se[se.OFF=4]="OFF"})(fe=ee.LogLevel||(ee.LogLevel={}));var ce={debug:fe.DEBUG,info:fe.INFO,warn:fe.WARN,error:fe.ERROR,off:fe.OFF},ae=function(){function se(ve){var ue=this;this._optionsService=ve,this._updateLogLevel(),this._optionsService.onOptionChange(function(pe){pe==="logLevel"&&ue._updateLogLevel()})}return se.prototype._updateLogLevel=function(){this._logLevel=ce[this._optionsService.options.logLevel]},se.prototype._evalLazyOptionalParams=function(ve){for(var ue=0;ue<ve.length;ue++)typeof ve[ue]=="function"&&(ve[ue]=ve[ue]())},se.prototype._log=function(ve,ue,pe){this._evalLazyOptionalParams(pe),ve.call.apply(ve,Ce([console,"xterm.js: "+ue],pe))},se.prototype.debug=function(ve){for(var ue=[],pe=1;pe<arguments.length;pe++)ue[pe-1]=arguments[pe];this._logLevel<=fe.DEBUG&&this._log(console.log,ve,ue)},se.prototype.info=function(ve){for(var ue=[],pe=1;pe<arguments.length;pe++)ue[pe-1]=arguments[pe];this._logLevel<=fe.INFO&&this._log(console.info,ve,ue)},se.prototype.warn=function(ve){for(var ue=[],pe=1;pe<arguments.length;pe++)ue[pe-1]=arguments[pe];this._logLevel<=fe.WARN&&this._log(console.warn,ve,ue)},se.prototype.error=function(ve){for(var ue=[],pe=1;pe<arguments.length;pe++)ue[pe-1]=arguments[pe];this._logLevel<=fe.ERROR&&this._log(console.error,ve,ue)},se=xe([Me(0,he.IOptionsService)],se)}();ee.LogService=ae},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ue,pe){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ge){oe.__proto__=ge}||function(oe,ge){for(var ye in ge)ge.hasOwnProperty(ye)&&(oe[ye]=ge[ye])})(ue,pe)},function(ue,pe){function oe(){this.constructor=ue}xe(ue,pe),ue.prototype=pe===null?Object.create(pe):(oe.prototype=pe.prototype,new oe)}),Ce=this&&this.__decorate||function(ue,pe,oe,ge){var ye,we=arguments.length,Be=we<3?pe:ge===null?ge=Object.getOwnPropertyDescriptor(pe,oe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ue,pe,oe,ge);else for(var ze=ue.length-1;ze>=0;ze--)(ye=ue[ze])&&(Be=(we<3?ye(Be):we>3?ye(pe,oe,Be):ye(pe,oe))||Be);return we>3&&Be&&Object.defineProperty(pe,oe,Be),Be},fe=this&&this.__param||function(ue,pe){return function(oe,ge){pe(oe,ge,ue)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.BufferService=ee.MINIMUM_ROWS=ee.MINIMUM_COLS=void 0;var he=ne(1),ce=ne(69),ae=ne(0),se=ne(2);ee.MINIMUM_COLS=2,ee.MINIMUM_ROWS=1;var ve=function(ue){function pe(oe){var ge=ue.call(this)||this;return ge._optionsService=oe,ge.isUserScrolling=!1,ge._onResize=new ae.EventEmitter,ge.cols=Math.max(oe.options.cols,ee.MINIMUM_COLS),ge.rows=Math.max(oe.options.rows,ee.MINIMUM_ROWS),ge.buffers=new ce.BufferSet(oe,ge),ge}return Me(pe,ue),Object.defineProperty(pe.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),pe.prototype.dispose=function(){ue.prototype.dispose.call(this),this.buffers.dispose()},pe.prototype.resize=function(oe,ge){this.cols=oe,this.rows=ge,this.buffers.resize(oe,ge),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:oe,rows:ge})},pe.prototype.reset=function(){this.buffers.dispose(),this.buffers=new ce.BufferSet(this._optionsService,this),this.isUserScrolling=!1},pe=Ce([fe(0,he.IOptionsService)],pe)}(se.Disposable);ee.BufferService=ve},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(ce,ae){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,ve){se.__proto__=ve}||function(se,ve){for(var ue in ve)ve.hasOwnProperty(ue)&&(se[ue]=ve[ue])})(ce,ae)},function(ce,ae){function se(){this.constructor=ce}xe(ce,ae),ce.prototype=ae===null?Object.create(ae):(se.prototype=ae.prototype,new se)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.BufferSet=void 0;var Ce=ne(70),fe=ne(0),he=function(ce){function ae(se,ve){var ue=ce.call(this)||this;return ue._onBufferActivate=ue.register(new fe.EventEmitter),ue._normal=new Ce.Buffer(!0,se,ve),ue._normal.fillViewportRows(),ue._alt=new Ce.Buffer(!1,se,ve),ue._activeBuffer=ue._normal,ue.setupTabStops(),ue}return Me(ae,ce),Object.defineProperty(ae.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),ae.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},ae.prototype.activateAltBuffer=function(se){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(se),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},ae.prototype.resize=function(se,ve){this._normal.resize(se,ve),this._alt.resize(se,ve)},ae.prototype.setupTabStops=function(se){this._normal.setupTabStops(se),this._alt.setupTabStops(se)},ae}(ne(2).Disposable);ee.BufferSet=he},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.BufferStringIterator=ee.Buffer=ee.MAX_BUFFER_SIZE=void 0;var xe=ne(71),Me=ne(16),Ce=ne(4),fe=ne(3),he=ne(72),ce=ne(73),ae=ne(20),se=ne(6);ee.MAX_BUFFER_SIZE=4294967295;var ve=function(){function pe(oe,ge,ye){this._hasScrollback=oe,this._optionsService=ge,this._bufferService=ye,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Me.DEFAULT_ATTR_DATA.clone(),this.savedCharset=ae.DEFAULT_CHARSET,this.markers=[],this._nullCell=Ce.CellData.fromCharData([0,fe.NULL_CELL_CHAR,fe.NULL_CELL_WIDTH,fe.NULL_CELL_CODE]),this._whitespaceCell=Ce.CellData.fromCharData([0,fe.WHITESPACE_CELL_CHAR,fe.WHITESPACE_CELL_WIDTH,fe.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new xe.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return pe.prototype.getNullCell=function(oe){return oe?(this._nullCell.fg=oe.fg,this._nullCell.bg=oe.bg,this._nullCell.extended=oe.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new se.ExtendedAttrs),this._nullCell},pe.prototype.getWhitespaceCell=function(oe){return oe?(this._whitespaceCell.fg=oe.fg,this._whitespaceCell.bg=oe.bg,this._whitespaceCell.extended=oe.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new se.ExtendedAttrs),this._whitespaceCell},pe.prototype.getBlankLine=function(oe,ge){return new Me.BufferLine(this._bufferService.cols,this.getNullCell(oe),ge)},Object.defineProperty(pe.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"isCursorInViewport",{get:function(){var oe=this.ybase+this.y-this.ydisp;return oe>=0&&oe<this._rows},enumerable:!1,configurable:!0}),pe.prototype._getCorrectBufferLength=function(oe){if(!this._hasScrollback)return oe;var ge=oe+this._optionsService.options.scrollback;return ge>ee.MAX_BUFFER_SIZE?ee.MAX_BUFFER_SIZE:ge},pe.prototype.fillViewportRows=function(oe){if(this.lines.length===0){oe===void 0&&(oe=Me.DEFAULT_ATTR_DATA);for(var ge=this._rows;ge--;)this.lines.push(this.getBlankLine(oe))}},pe.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new xe.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},pe.prototype.resize=function(oe,ge){var ye=this.getNullCell(Me.DEFAULT_ATTR_DATA),we=this._getCorrectBufferLength(ge);if(we>this.lines.maxLength&&(this.lines.maxLength=we),this.lines.length>0){if(this._cols<oe)for(var Be=0;Be<this.lines.length;Be++)this.lines.get(Be).resize(oe,ye);var ze=0;if(this._rows<ge)for(var $e=this._rows;$e<ge;$e++)this.lines.length<ge+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Me.BufferLine(oe,ye)):this.ybase>0&&this.lines.length<=this.ybase+this.y+ze+1?(this.ybase--,ze++,this.ydisp>0&&this.ydisp--):this.lines.push(new Me.BufferLine(oe,ye)));else for($e=this._rows;$e>ge;$e--)this.lines.length>ge+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(we<this.lines.maxLength){var Le=this.lines.length-we;Le>0&&(this.lines.trimStart(Le),this.ybase=Math.max(this.ybase-Le,0),this.ydisp=Math.max(this.ydisp-Le,0),this.savedY=Math.max(this.savedY-Le,0)),this.lines.maxLength=we}this.x=Math.min(this.x,oe-1),this.y=Math.min(this.y,ge-1),ze&&(this.y+=ze),this.savedX=Math.min(this.savedX,oe-1),this.scrollTop=0}if(this.scrollBottom=ge-1,this._isReflowEnabled&&(this._reflow(oe,ge),this._cols>oe))for(Be=0;Be<this.lines.length;Be++)this.lines.get(Be).resize(oe,ye);this._cols=oe,this._rows=ge},Object.defineProperty(pe.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),pe.prototype._reflow=function(oe,ge){this._cols!==oe&&(oe>this._cols?this._reflowLarger(oe,ge):this._reflowSmaller(oe,ge))},pe.prototype._reflowLarger=function(oe,ge){var ye=he.reflowLargerGetLinesToRemove(this.lines,this._cols,oe,this.ybase+this.y,this.getNullCell(Me.DEFAULT_ATTR_DATA));if(ye.length>0){var we=he.reflowLargerCreateNewLayout(this.lines,ye);he.reflowLargerApplyNewLayout(this.lines,we.layout),this._reflowLargerAdjustViewport(oe,ge,we.countRemoved)}},pe.prototype._reflowLargerAdjustViewport=function(oe,ge,ye){for(var we=this.getNullCell(Me.DEFAULT_ATTR_DATA),Be=ye;Be-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ge&&this.lines.push(new Me.BufferLine(oe,we))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-ye,0)},pe.prototype._reflowSmaller=function(oe,ge){for(var ye=this.getNullCell(Me.DEFAULT_ATTR_DATA),we=[],Be=0,ze=this.lines.length-1;ze>=0;ze--){var $e=this.lines.get(ze);if(!(!$e||!$e.isWrapped&&$e.getTrimmedLength()<=oe)){for(var Le=[$e];$e.isWrapped&&ze>0;)$e=this.lines.get(--ze),Le.unshift($e);var Ne=this.ybase+this.y;if(!(Ne>=ze&&Ne<ze+Le.length)){var Re=Le[Le.length-1].getTrimmedLength(),Se=he.reflowSmallerGetNewLineLengths(Le,this._cols,oe),Ie=Se.length-Le.length,Ae=void 0;Ae=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+Ie):Math.max(0,this.lines.length-this.lines.maxLength+Ie);for(var it=[],Ue=0;Ue<Ie;Ue++){var gt=this.getBlankLine(Me.DEFAULT_ATTR_DATA,!0);it.push(gt)}it.length>0&&(we.push({start:ze+Le.length+Be,newLines:it}),Be+=it.length),Le.push.apply(Le,it);var Ve=Se.length-1,Tt=Se[Ve];Tt===0&&(Tt=Se[--Ve]);for(var ct=Le.length-Ie-1,Ot=Re;ct>=0;){var We=Math.min(Ot,Tt);if(Le[Ve].copyCellsFrom(Le[ct],Ot-We,Tt-We,We,!0),(Tt-=We)===0&&(Tt=Se[--Ve]),(Ot-=We)===0){ct--;var lt=Math.max(ct,0);Ot=he.getWrappedLineTrimmedLength(Le,lt,this._cols)}}for(Ue=0;Ue<Le.length;Ue++)Se[Ue]<oe&&Le[Ue].setCell(Se[Ue],ye);for(var ut=Ie-Ae;ut-- >0;)this.ybase===0?this.y<ge-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+Be)-ge&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+Ie,this.ybase+ge-1)}}}if(we.length>0){var St=[],qe=[];for(Ue=0;Ue<this.lines.length;Ue++)qe.push(this.lines.get(Ue));var Ze=this.lines.length,wt=Ze-1,Wt=0,Kt=we[Wt];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+Be);var _t=0;for(Ue=Math.min(this.lines.maxLength-1,Ze+Be-1);Ue>=0;Ue--)if(Kt&&Kt.start>wt+_t){for(var vt=Kt.newLines.length-1;vt>=0;vt--)this.lines.set(Ue--,Kt.newLines[vt]);Ue++,St.push({index:wt+1,amount:Kt.newLines.length}),_t+=Kt.newLines.length,Kt=we[++Wt]}else this.lines.set(Ue,qe[wt--]);var jt=0;for(Ue=St.length-1;Ue>=0;Ue--)St[Ue].index+=jt,this.lines.onInsertEmitter.fire(St[Ue]),jt+=St[Ue].amount;var yn=Math.max(0,Ze+Be-this.lines.maxLength);yn>0&&this.lines.onTrimEmitter.fire(yn)}},pe.prototype.stringIndexToBufferIndex=function(oe,ge,ye){for(ye===void 0&&(ye=!1);ge;){var we=this.lines.get(oe);if(!we)return[-1,-1];for(var Be=ye?we.getTrimmedLength():we.length,ze=0;ze<Be;++ze)if(we.get(ze)[fe.CHAR_DATA_WIDTH_INDEX]&&(ge-=we.get(ze)[fe.CHAR_DATA_CHAR_INDEX].length||1),ge<0)return[oe,ze];oe++}return[oe,0]},pe.prototype.translateBufferLineToString=function(oe,ge,ye,we){ye===void 0&&(ye=0);var Be=this.lines.get(oe);return Be?Be.translateToString(ge,ye,we):""},pe.prototype.getWrappedRangeForLine=function(oe){for(var ge=oe,ye=oe;ge>0&&this.lines.get(ge).isWrapped;)ge--;for(;ye+1<this.lines.length&&this.lines.get(ye+1).isWrapped;)ye++;return{first:ge,last:ye}},pe.prototype.setupTabStops=function(oe){for(oe!=null?this.tabs[oe]||(oe=this.prevStop(oe)):(this.tabs={},oe=0);oe<this._cols;oe+=this._optionsService.options.tabStopWidth)this.tabs[oe]=!0},pe.prototype.prevStop=function(oe){for(oe==null&&(oe=this.x);!this.tabs[--oe]&&oe>0;);return oe>=this._cols?this._cols-1:oe<0?0:oe},pe.prototype.nextStop=function(oe){for(oe==null&&(oe=this.x);!this.tabs[++oe]&&oe<this._cols;);return oe>=this._cols?this._cols-1:oe<0?0:oe},pe.prototype.addMarker=function(oe){var ge=this,ye=new ce.Marker(oe);return this.markers.push(ye),ye.register(this.lines.onTrim(function(we){ye.line-=we,ye.line<0&&ye.dispose()})),ye.register(this.lines.onInsert(function(we){ye.line>=we.index&&(ye.line+=we.amount)})),ye.register(this.lines.onDelete(function(we){ye.line>=we.index&&ye.line<we.index+we.amount&&ye.dispose(),ye.line>we.index&&(ye.line-=we.amount)})),ye.register(ye.onDispose(function(){return ge._removeMarker(ye)})),ye},pe.prototype._removeMarker=function(oe){this.markers.splice(this.markers.indexOf(oe),1)},pe.prototype.iterator=function(oe,ge,ye,we,Be){return new ue(this,oe,ge,ye,we,Be)},pe}();ee.Buffer=ve;var ue=function(){function pe(oe,ge,ye,we,Be,ze){ye===void 0&&(ye=0),we===void 0&&(we=oe.lines.length),Be===void 0&&(Be=0),ze===void 0&&(ze=0),this._buffer=oe,this._trimRight=ge,this._startIndex=ye,this._endIndex=we,this._startOverscan=Be,this._endOverscan=ze,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return pe.prototype.hasNext=function(){return this._current<this._endIndex},pe.prototype.next=function(){var oe=this._buffer.getWrappedRangeForLine(this._current);oe.first<this._startIndex-this._startOverscan&&(oe.first=this._startIndex-this._startOverscan),oe.last>this._endIndex+this._endOverscan&&(oe.last=this._endIndex+this._endOverscan),oe.first=Math.max(oe.first,0),oe.last=Math.min(oe.last,this._buffer.lines.length);for(var ge="",ye=oe.first;ye<=oe.last;++ye)ge+=this._buffer.translateBufferLineToString(ye,this._trimRight);return this._current=oe.last+1,{range:oe,content:ge}},pe}();ee.BufferStringIterator=ue},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.CircularList=void 0;var xe=ne(0),Me=function(){function Ce(fe){this._maxLength=fe,this.onDeleteEmitter=new xe.EventEmitter,this.onInsertEmitter=new xe.EventEmitter,this.onTrimEmitter=new xe.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(Ce.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"maxLength",{get:function(){return this._maxLength},set:function(fe){if(this._maxLength!==fe){for(var he=new Array(fe),ce=0;ce<Math.min(fe,this.length);ce++)he[ce]=this._array[this._getCyclicIndex(ce)];this._array=he,this._maxLength=fe,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"length",{get:function(){return this._length},set:function(fe){if(fe>this._length)for(var he=this._length;he<fe;he++)this._array[he]=void 0;this._length=fe},enumerable:!1,configurable:!0}),Ce.prototype.get=function(fe){return this._array[this._getCyclicIndex(fe)]},Ce.prototype.set=function(fe,he){this._array[this._getCyclicIndex(fe)]=he},Ce.prototype.push=function(fe){this._array[this._getCyclicIndex(this._length)]=fe,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},Ce.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(Ce.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),Ce.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},Ce.prototype.splice=function(fe,he){for(var ce=[],ae=2;ae<arguments.length;ae++)ce[ae-2]=arguments[ae];if(he){for(var se=fe;se<this._length-he;se++)this._array[this._getCyclicIndex(se)]=this._array[this._getCyclicIndex(se+he)];this._length-=he}for(se=this._length-1;se>=fe;se--)this._array[this._getCyclicIndex(se+ce.length)]=this._array[this._getCyclicIndex(se)];for(se=0;se<ce.length;se++)this._array[this._getCyclicIndex(fe+se)]=ce[se];if(this._length+ce.length>this._maxLength){var ve=this._length+ce.length-this._maxLength;this._startIndex+=ve,this._length=this._maxLength,this.onTrimEmitter.fire(ve)}else this._length+=ce.length},Ce.prototype.trimStart=function(fe){fe>this._length&&(fe=this._length),this._startIndex+=fe,this._length-=fe,this.onTrimEmitter.fire(fe)},Ce.prototype.shiftElements=function(fe,he,ce){if(!(he<=0)){if(fe<0||fe>=this._length)throw new Error("start argument out of range");if(fe+ce<0)throw new Error("Cannot shift elements in list beyond index 0");if(ce>0){for(var ae=he-1;ae>=0;ae--)this.set(fe+ae+ce,this.get(fe+ae));var se=fe+he+ce-this._length;if(se>0)for(this._length+=se;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(ae=0;ae<he;ae++)this.set(fe+ae+ce,this.get(fe+ae))}},Ce.prototype._getCyclicIndex=function(fe){return(this._startIndex+fe)%this._maxLength},Ce}();ee.CircularList=Me},function(kt,ee,ne){"use strict";function xe(Me,Ce,fe){if(Ce===Me.length-1)return Me[Ce].getTrimmedLength();var he=!Me[Ce].hasContent(fe-1)&&Me[Ce].getWidth(fe-1)===1,ce=Me[Ce+1].getWidth(0)===2;return he&&ce?fe-1:fe}Object.defineProperty(ee,"__esModule",{value:!0}),ee.getWrappedLineTrimmedLength=ee.reflowSmallerGetNewLineLengths=ee.reflowLargerApplyNewLayout=ee.reflowLargerCreateNewLayout=ee.reflowLargerGetLinesToRemove=void 0,ee.reflowLargerGetLinesToRemove=function(Me,Ce,fe,he,ce){for(var ae=[],se=0;se<Me.length-1;se++){var ve=se,ue=Me.get(++ve);if(ue.isWrapped){for(var pe=[Me.get(se)];ve<Me.length&&ue.isWrapped;)pe.push(ue),ue=Me.get(++ve);if(he>=se&&he<ve)se+=pe.length-1;else{for(var oe=0,ge=xe(pe,oe,Ce),ye=1,we=0;ye<pe.length;){var Be=xe(pe,ye,Ce),ze=Be-we,$e=fe-ge,Le=Math.min(ze,$e);pe[oe].copyCellsFrom(pe[ye],we,ge,Le,!1),(ge+=Le)===fe&&(oe++,ge=0),(we+=Le)===Be&&(ye++,we=0),ge===0&&oe!==0&&pe[oe-1].getWidth(fe-1)===2&&(pe[oe].copyCellsFrom(pe[oe-1],fe-1,ge++,1,!1),pe[oe-1].setCell(fe-1,ce))}pe[oe].replaceCells(ge,fe,ce);for(var Ne=0,Re=pe.length-1;Re>0&&(Re>oe||pe[Re].getTrimmedLength()===0);Re--)Ne++;Ne>0&&(ae.push(se+pe.length-Ne),ae.push(Ne)),se+=pe.length-1}}}return ae},ee.reflowLargerCreateNewLayout=function(Me,Ce){for(var fe=[],he=0,ce=Ce[he],ae=0,se=0;se<Me.length;se++)if(ce===se){var ve=Ce[++he];Me.onDeleteEmitter.fire({index:se-ae,amount:ve}),se+=ve-1,ae+=ve,ce=Ce[++he]}else fe.push(se);return{layout:fe,countRemoved:ae}},ee.reflowLargerApplyNewLayout=function(Me,Ce){for(var fe=[],he=0;he<Ce.length;he++)fe.push(Me.get(Ce[he]));for(he=0;he<fe.length;he++)Me.set(he,fe[he]);Me.length=Ce.length},ee.reflowSmallerGetNewLineLengths=function(Me,Ce,fe){for(var he=[],ce=Me.map(function(ge,ye){return xe(Me,ye,Ce)}).reduce(function(ge,ye){return ge+ye}),ae=0,se=0,ve=0;ve<ce;){if(ce-ve<fe){he.push(ce-ve);break}ae+=fe;var ue=xe(Me,se,Ce);ae>ue&&(ae-=ue,se++);var pe=Me[se].getWidth(ae-1)===2;pe&&ae--;var oe=pe?fe-1:fe;he.push(oe),ve+=oe}return he},ee.getWrappedLineTrimmedLength=xe},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(he,ce){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ae,se){ae.__proto__=se}||function(ae,se){for(var ve in se)se.hasOwnProperty(ve)&&(ae[ve]=se[ve])})(he,ce)},function(he,ce){function ae(){this.constructor=he}xe(he,ce),he.prototype=ce===null?Object.create(ce):(ae.prototype=ce.prototype,new ae)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.Marker=void 0;var Ce=ne(0),fe=function(he){function ce(ae){var se=he.call(this)||this;return se.line=ae,se._id=ce._nextId++,se.isDisposed=!1,se._onDispose=new Ce.EventEmitter,se}return Me(ce,he),Object.defineProperty(ce.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),ce.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},ce._nextId=1,ce}(ne(2).Disposable);ee.Marker=fe},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.OptionsService=ee.DEFAULT_OPTIONS=ee.DEFAULT_BELL_SOUND=void 0;var xe=ne(0),Me=ne(11),Ce=ne(33);ee.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",ee.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:ee.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:Me.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var fe=["cols","rows"],he=function(){function ce(ae){this._onOptionChange=new xe.EventEmitter,this.options=Ce.clone(ee.DEFAULT_OPTIONS);for(var se=0,ve=Object.keys(ae);se<ve.length;se++){var ue=ve[se];if(ue in this.options){var pe=ae[ue];this.options[ue]=pe}}}return Object.defineProperty(ce.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),ce.prototype.setOption=function(ae,se){if(!(ae in ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+ae+'"');if(fe.indexOf(ae)!==-1)throw new Error('Option "'+ae+'" can only be set in the constructor');this.options[ae]!==se&&(se=this._sanitizeAndValidateOption(ae,se),this.options[ae]!==se&&(this.options[ae]=se,this._onOptionChange.fire(ae)))},ce.prototype._sanitizeAndValidateOption=function(ae,se){switch(ae){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":se||(se=ee.DEFAULT_OPTIONS[ae]);break;case"cursorWidth":se=Math.floor(se);case"lineHeight":case"tabStopWidth":if(se<1)throw new Error(ae+" cannot be less than 1, value: "+se);break;case"minimumContrastRatio":se=Math.max(1,Math.min(21,Math.round(10*se)/10));break;case"scrollback":if((se=Math.min(se,4294967295))<0)throw new Error(ae+" cannot be less than 0, value: "+se);break;case"fastScrollSensitivity":case"scrollSensitivity":if(se<=0)throw new Error(ae+" cannot be less than or equal to 0, value: "+se)}return se},ce.prototype.getOption=function(ae){if(!(ae in ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+ae+'"');return this.options[ae]},ce}();ee.OptionsService=he},function(kt,ee,ne){"use strict";var xe,Me=this&&this.__extends||(xe=function(oe,ge){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,we){ye.__proto__=we}||function(ye,we){for(var Be in we)we.hasOwnProperty(Be)&&(ye[Be]=we[Be])})(oe,ge)},function(oe,ge){function ye(){this.constructor=oe}xe(oe,ge),oe.prototype=ge===null?Object.create(ge):(ye.prototype=ge.prototype,new ye)}),Ce=this&&this.__decorate||function(oe,ge,ye,we){var Be,ze=arguments.length,$e=ze<3?ge:we===null?we=Object.getOwnPropertyDescriptor(ge,ye):we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$e=Reflect.decorate(oe,ge,ye,we);else for(var Le=oe.length-1;Le>=0;Le--)(Be=oe[Le])&&($e=(ze<3?Be($e):ze>3?Be(ge,ye,$e):Be(ge,ye))||$e);return ze>3&&$e&&Object.defineProperty(ge,ye,$e),$e},fe=this&&this.__param||function(oe,ge){return function(ye,we){ge(ye,we,oe)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.CoreService=void 0;var he=ne(1),ce=ne(0),ae=ne(33),se=ne(2),ve=Object.freeze({insertMode:!1}),ue=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),pe=function(oe){function ge(ye,we,Be,ze){var $e=oe.call(this)||this;return $e._bufferService=we,$e._logService=Be,$e._optionsService=ze,$e.isCursorInitialized=!1,$e.isCursorHidden=!1,$e._onData=$e.register(new ce.EventEmitter),$e._onUserInput=$e.register(new ce.EventEmitter),$e._onBinary=$e.register(new ce.EventEmitter),$e._scrollToBottom=ye,$e.register({dispose:function(){return $e._scrollToBottom=void 0}}),$e.modes=ae.clone(ve),$e.decPrivateModes=ae.clone(ue),$e}return Me(ge,oe),Object.defineProperty(ge.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),ge.prototype.reset=function(){this.modes=ae.clone(ve),this.decPrivateModes=ae.clone(ue)},ge.prototype.triggerDataEvent=function(ye,we){if(we===void 0&&(we=!1),!this._optionsService.options.disableStdin){var Be=this._bufferService.buffer;Be.ybase!==Be.ydisp&&this._scrollToBottom(),we&&this._onUserInput.fire(),this._logService.debug('sending data "'+ye+'"',function(){return ye.split("").map(function(ze){return ze.charCodeAt(0)})}),this._onData.fire(ye)}},ge.prototype.triggerBinaryEvent=function(ye){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+ye+'"',function(){return ye.split("").map(function(we){return we.charCodeAt(0)})}),this._onBinary.fire(ye))},ge=Ce([fe(1,he.IBufferService),fe(2,he.ILogService),fe(3,he.IOptionsService)],ge)}(se.Disposable);ee.CoreService=pe},function(kt,ee,ne){"use strict";var xe=this&&this.__decorate||function(ue,pe,oe,ge){var ye,we=arguments.length,Be=we<3?pe:ge===null?ge=Object.getOwnPropertyDescriptor(pe,oe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ue,pe,oe,ge);else for(var ze=ue.length-1;ze>=0;ze--)(ye=ue[ze])&&(Be=(we<3?ye(Be):we>3?ye(pe,oe,Be):ye(pe,oe))||Be);return we>3&&Be&&Object.defineProperty(pe,oe,Be),Be},Me=this&&this.__param||function(ue,pe){return function(oe,ge){pe(oe,ge,ue)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.CoreMouseService=void 0;var Ce=ne(1),fe=ne(0),he={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(ue){return ue.button!==4&&ue.action===1&&(ue.ctrl=!1,ue.alt=!1,ue.shift=!1,!0)}},VT200:{events:19,restrict:function(ue){return ue.action!==32}},DRAG:{events:23,restrict:function(ue){return ue.action!==32||ue.button!==3}},ANY:{events:31,restrict:function(ue){return!0}}};function ce(ue,pe){var oe=(ue.ctrl?16:0)|(ue.shift?4:0)|(ue.alt?8:0);return ue.button===4?(oe|=64,oe|=ue.action):(oe|=3&ue.button,4&ue.button&&(oe|=64),8&ue.button&&(oe|=128),ue.action===32?oe|=32:ue.action!==0||pe||(oe|=3)),oe}var ae=String.fromCharCode,se={DEFAULT:function(ue){var pe=[ce(ue,!1)+32,ue.col+32,ue.row+32];return pe[0]>255||pe[1]>255||pe[2]>255?"":"\x1B[M"+ae(pe[0])+ae(pe[1])+ae(pe[2])},SGR:function(ue){var pe=ue.action===0&&ue.button!==4?"m":"M";return"\x1B[<"+ce(ue,!0)+";"+ue.col+";"+ue.row+pe}},ve=function(){function ue(pe,oe){this._bufferService=pe,this._coreService=oe,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new fe.EventEmitter,this._lastEvent=null;for(var ge=0,ye=Object.keys(he);ge<ye.length;ge++){var we=ye[ge];this.addProtocol(we,he[we])}for(var Be=0,ze=Object.keys(se);Be<ze.length;Be++){var $e=ze[Be];this.addEncoding($e,se[$e])}this.reset()}return ue.prototype.addProtocol=function(pe,oe){this._protocols[pe]=oe},ue.prototype.addEncoding=function(pe,oe){this._encodings[pe]=oe},Object.defineProperty(ue.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(pe){if(!this._protocols[pe])throw new Error('unknown protocol "'+pe+'"');this._activeProtocol=pe,this._onProtocolChange.fire(this._protocols[pe].events)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(pe){if(!this._encodings[pe])throw new Error('unknown encoding "'+pe+'"');this._activeEncoding=pe},enumerable:!1,configurable:!0}),ue.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(ue.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),ue.prototype.triggerMouseEvent=function(pe){if(pe.col<0||pe.col>=this._bufferService.cols||pe.row<0||pe.row>=this._bufferService.rows||pe.button===4&&pe.action===32||pe.button===3&&pe.action!==32||pe.button!==4&&(pe.action===2||pe.action===3)||(pe.col++,pe.row++,pe.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,pe))||!this._protocols[this._activeProtocol].restrict(pe))return!1;var oe=this._encodings[this._activeEncoding](pe);return oe&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(oe):this._coreService.triggerDataEvent(oe,!0)),this._lastEvent=pe,!0},ue.prototype.explainEvents=function(pe){return{down:!!(1&pe),up:!!(2&pe),drag:!!(4&pe),move:!!(8&pe),wheel:!!(16&pe)}},ue.prototype._compareEvents=function(pe,oe){return pe.col===oe.col&&pe.row===oe.row&&pe.button===oe.button&&pe.action===oe.action&&pe.ctrl===oe.ctrl&&pe.alt===oe.alt&&pe.shift===oe.shift},ue=xe([Me(0,Ce.IBufferService),Me(1,Ce.ICoreService)],ue)}();ee.CoreMouseService=ve},function(kt,ee,ne){"use strict";var xe=this&&this.__decorate||function(he,ce,ae,se){var ve,ue=arguments.length,pe=ue<3?ce:se===null?se=Object.getOwnPropertyDescriptor(ce,ae):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(he,ce,ae,se);else for(var oe=he.length-1;oe>=0;oe--)(ve=he[oe])&&(pe=(ue<3?ve(pe):ue>3?ve(ce,ae,pe):ve(ce,ae))||pe);return ue>3&&pe&&Object.defineProperty(ce,ae,pe),pe},Me=this&&this.__param||function(he,ce){return function(ae,se){ce(ae,se,he)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.DirtyRowService=void 0;var Ce=ne(1),fe=function(){function he(ce){this._bufferService=ce,this.clearRange()}return Object.defineProperty(he.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(he.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),he.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},he.prototype.markDirty=function(ce){ce<this._start?this._start=ce:ce>this._end&&(this._end=ce)},he.prototype.markRangeDirty=function(ce,ae){if(ce>ae){var se=ce;ce=ae,ae=se}ce<this._start&&(this._start=ce),ae>this._end&&(this._end=ae)},he.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},he=xe([Me(0,Ce.IBufferService)],he)}();ee.DirtyRowService=fe},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.UnicodeService=void 0;var xe=ne(0),Me=ne(79),Ce=function(){function fe(){this._providers=Object.create(null),this._active="",this._onChange=new xe.EventEmitter;var he=new Me.UnicodeV6;this.register(he),this._active=he.version,this._activeProvider=he}return Object.defineProperty(fe.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"activeVersion",{get:function(){return this._active},set:function(he){if(!this._providers[he])throw new Error('unknown Unicode version "'+he+'"');this._active=he,this._activeProvider=this._providers[he],this._onChange.fire(he)},enumerable:!1,configurable:!0}),fe.prototype.register=function(he){this._providers[he.version]=he},fe.prototype.wcwidth=function(he){return this._activeProvider.wcwidth(he)},fe.prototype.getStringCellWidth=function(he){for(var ce=0,ae=he.length,se=0;se<ae;++se){var ve=he.charCodeAt(se);if(55296<=ve&&ve<=56319){if(++se>=ae)return ce+this.wcwidth(ve);var ue=he.charCodeAt(se);56320<=ue&&ue<=57343?ve=1024*(ve-55296)+ue-56320+65536:ce+=this.wcwidth(ue)}ce+=this.wcwidth(ve)}return ce},fe}();ee.UnicodeService=Ce},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.UnicodeV6=void 0;var xe,Me=ne(15),Ce=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],fe=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],he=function(){function ce(){if(this.version="6",!xe){xe=new Uint8Array(65536),Me.fill(xe,1),xe[0]=0,Me.fill(xe,0,1,32),Me.fill(xe,0,127,160),Me.fill(xe,2,4352,4448),xe[9001]=2,xe[9002]=2,Me.fill(xe,2,11904,42192),xe[12351]=1,Me.fill(xe,2,44032,55204),Me.fill(xe,2,63744,64256),Me.fill(xe,2,65040,65050),Me.fill(xe,2,65072,65136),Me.fill(xe,2,65280,65377),Me.fill(xe,2,65504,65511);for(var ae=0;ae<Ce.length;++ae)Me.fill(xe,0,Ce[ae][0],Ce[ae][1]+1)}}return ce.prototype.wcwidth=function(ae){return ae<32?0:ae<127?1:ae<65536?xe[ae]:function(se,ve){var ue,pe=0,oe=ve.length-1;if(se<ve[0][0]||se>ve[oe][1])return!1;for(;oe>=pe;)if(se>ve[ue=pe+oe>>1][1])pe=ue+1;else{if(!(se<ve[ue][0]))return!0;oe=ue-1}return!1}(ae,fe)?0:ae>=131072&&ae<=196605||ae>=196608&&ae<=262141?2:1},ce}();ee.UnicodeV6=he},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.CharsetService=void 0;var xe=function(){function Me(){this.glevel=0,this._charsets=[]}return Me.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Me.prototype.setgLevel=function(Ce){this.glevel=Ce,this.charset=this._charsets[Ce]},Me.prototype.setgCharset=function(Ce,fe){this._charsets[Ce]=fe,this.glevel===Ce&&(this.charset=fe)},Me}();ee.CharsetService=xe},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.updateWindowsModeWrappedState=void 0;var xe=ne(3);ee.updateWindowsModeWrappedState=function(Me){var Ce=Me.buffer.lines.get(Me.buffer.ybase+Me.buffer.y-1),fe=Ce==null?void 0:Ce.get(Me.cols-1),he=Me.buffer.lines.get(Me.buffer.ybase+Me.buffer.y);he&&fe&&(he.isWrapped=fe[xe.CHAR_DATA_CODE_INDEX]!==xe.NULL_CELL_CODE&&fe[xe.CHAR_DATA_CODE_INDEX]!==xe.WHITESPACE_CELL_CODE)}},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.WriteBuffer=void 0;var xe=function(){function Me(Ce){this._action=Ce,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Me.prototype.writeSync=function(Ce){if(this._writeBuffer.length){for(var fe=this._bufferOffset;fe<this._writeBuffer.length;++fe){var he=this._writeBuffer[fe],ce=this._callbacks[fe];this._action(he),ce&&ce()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(Ce)},Me.prototype.write=function(Ce,fe){var he=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return he._innerWrite()})),this._pendingData+=Ce.length,this._writeBuffer.push(Ce),this._callbacks.push(fe)},Me.prototype._innerWrite=function(){for(var Ce=this,fe=Date.now();this._writeBuffer.length>this._bufferOffset;){var he=this._writeBuffer[this._bufferOffset],ce=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(he),this._pendingData-=he.length,ce&&ce(),Date.now()-fe>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return Ce._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Me}();ee.WriteBuffer=xe},function(kt,ee,ne){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.AddonManager=void 0;var xe=function(){function Me(){this._addons=[]}return Me.prototype.dispose=function(){for(var Ce=this._addons.length-1;Ce>=0;Ce--)this._addons[Ce].instance.dispose()},Me.prototype.loadAddon=function(Ce,fe){var he=this,ce={instance:fe,dispose:fe.dispose,isDisposed:!1};this._addons.push(ce),fe.dispose=function(){return he._wrappedAddonDispose(ce)},fe.activate(Ce)},Me.prototype._wrappedAddonDispose=function(Ce){if(!Ce.isDisposed){for(var fe=-1,he=0;he<this._addons.length;he++)if(this._addons[he]===Ce){fe=he;break}if(fe===-1)throw new Error("Could not dispose an addon that has not been loaded");Ce.isDisposed=!0,Ce.dispose.apply(Ce.instance),this._addons.splice(fe,1)}},Me}();ee.AddonManager=xe}])})},62522:function(gn){"use strict";gn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUYAAABYCAYAAACJfF6vAAAAAXNSR0IArs4c6QAAIABJREFUeF7sXQe4FcXZfmd2T7n90jtYsFGModkVUGNJ7BVTVIxdI5ii/iYmxkRjEhV7ohF7wQaxBqOIxgqCQSkWUKRIv72csjvzP9/M7p7ZPefce8EGhOOD95wt0+ed9yvzDcO2z7YW2NYCm00LNL19cQ/H4j/nEt+vKK38LhtyVWazKdz/UEHY/1Bdt1V1Wwts1i3QMGviGRLyJgAVVFCb4YiykZNe2KwLvZUWbhswbqUdu61aW1YL1L0z4TrG8Cuz1IyxOytH3njOllWTraO024Bx6+jHbbXYglugcfaEC4TErZEqNAN4q2rUpEO24KptsUXfBoxbbNdtK/jW0AINsyfsC2CGlIgzBgGJaRzi9jKeeo2NuDO7NdRxS6zDNmDcEnttW5k32xYYP3XZFADfA6QFsKWTj+2/e7HCyld+azeU1S8AsDOAjxnEGZWjbn7z26rc+H8u/yWEPMti9kV3HdN7+rdVjs0h323AuDn0wrYybDUtMH7a8lsh5QW6Qqxl8rH9yopVrmHWhLMl8HcAL1UK93i21y0N30ZD/Hj66rJYKjMZAid5+T82+dj+J38bZdlc8twGjJtLT2wrx1bRAmc+tWy8ZLhb4yJWTz6mf69CFSO2WF9av5QxLG1w2CH99rmx9dtogDP/uXygFHIqgCG6zOyhxkzf0x4/ibnfRnk2lzy3WGBsmDXhTSkxFAxSAksB9jFneIFZztMVw25Zt7k08Jcpx7p9d6lAPD5BMHkKY/K33V9e8MSXSe+berf+zYmdEZO3VpZUnf6/5od35tTloyTkO15bz5t8bP89CrV7/bsTvg+B+2yOoWUjJq36pvomms/4aStugxTne6A4td/RfU+4ijHxbZVnc8l3SwbGP0ng0gIN6TDgXhv896Wjbli+uTT0xpZj7ZihR0gmJwPoocmH/E33GQv+sLHpfBvP18+eOBFS3sAYplWOnHTst1GGbyvPs5/5oqvjOGphZmBP3X1sv+MLAuOsCVM4w2sVIyfd9m2V1c93/D+XHQWBS7Kl8e8/cGhPsob/z3+2WGCsnz3hcEg8X7QHpUwxxi6uHDXpzi2tl2tG7z4ky8UcAHG/7BJ4vueM+d/fEupSN2viSwzyIAbMqxw1qSBj2hLqsallPGPqshYGlDCGP959TP9fR9ORn1yUaKy1llQ4bCf2LYnQm1q3/5X3tlhgbPrg4h6ilR0NoBJgO0vIsQB2zBuEUl5WvedN121JHbruoKHXCSlNZ986Bjat+4wPztgS6tEwa8JqSUyXyb9VjbzpvC2hzF9lGcdPXbYSQG8p+ZH3HNf32WjaTbMvPsQFP7xq5I2XfJX5bkvrq2uBLRYYC4on7168JxPsCgkcGdxnEFzKMRWjbnrtq2u2rzeltWOHPCKBU1QuDNNjrOXkzi99Wv/15vrVpV4/awL539mc48qKEZOu/upS3jJSGj91+ceA3D4Vk90f/sGA2mip62dPuF5IPNBp1KT/bhk1+t8r5VYFjH73Ncye8CspEbBECTxVPWpSQV3P5tjla8cOeVMCezNgJUtnd+v2xkeNm2M5i5WpbtaEJgaUMc4urxxx45+2pLJ/FWU9Y+qyxUz5MPY7uFB6DbMn/LNy5CSSdrZ9NtMW2CqBUT52otWwXZ80AMtr9wVVoyZpd4TN/LNu/916iZhFRiMLjP22x8sf/H4zL3Je8RpmT3xfSjlUQl5fPeqmX2xp5f+y5R0/bdkqJnDF3cf1J+NZ6FP3/mWdrHT69xUjb7zoy+az7f2vrwW2SmCsfeOCATxmf0ZOWV7TPV01avNfoSXA144d8iSAY6jcUoq9er6y0Hf9+PpGwVeccv27E2+DkOcD7M2qUTfSlrf/mc/oV6S9Q92KVY1Z9H/8pH55vom170w8llbryj1vJN/BbZ/NtAW2SmBsmD3xH1LKM/02t5j8XvnIm/69mfaBKtYXhwwZYbns94A83Ctn4/L6RJcRc+Zscftl62dPHAUp/8gku/1/DQDGP7XiO5KJI+85tn9B16r6WRNulen0b6r3vyNP97g5j89vs2xrxgw5jjGc0W3G/KMYIL+Jsmx1wNjwzoS9JZNvBGyR4f6qkZNO+yYa88vksWbskPcBDDXSeKrHjPlbjF70y9R9a3p3/NSlxyezpdNvP6l7U6F61c+e+EjVyBvHbWqdT3/mi10t1zlTSowF5E4ASwJYx4A5kvEn7L59HrlzBNviFtNi7bF27ODnJZhPFu5Yt1pMGLJw4dcevHfrA8bZE5+QUvqAslzEsHun706q29SB+E29t3bMkMslwzWUH62KEjisx4z5L37d+cvHYKEbZYlyoMJuqXFjpby8NCvczjEeY04qYYML2+ash+uyOMAtBlYGLsshEQNYDC6LcUtWA7Ic4EwIxjizOJjkAsxidJGJCsncwVLCBhhnknFIFWiBQzAOFuiDAbrHyKddswPJpNADlUkwSbsyBJikLWt0X0gmXMaRhbBWMmmtEKBnJHkjuABzIaUEE6SpqBdSNoOLLIfMgCHrZuM1YI4DLh3Eso4U1hqb7nGRzXJHCJltTJSiEYl0Fk5jFp+iBWdDMIaCW+bOfnpl/zuP6rOsUL81vTtxqCvkiVWjJl25Kf3q7cMm9yde7H0GLHGZnHjvMQOe2ZQ8Nrd31o4dulJC9vbLxYAVYHig+8vz/+/rLOtWBYzyldOTDWXVtBE/Ro3GGT+hYuQNpLPb7D9LDt6hqlyUUrTmnTjDn7q9PP/6YoWWr8BGBVhtLUqTtSXlJYmycgi7Ck4sASa7u+lYGWDFmO30hcNLYKE7wBOMsTgYejLJ4hDclpIiRYsqSG4ziVJIZlFUGElgxRnBkCLeGp0UYOuP1MidGzxaujGvqVdzjxf5bqCftyKY+UTTMB7JS89/1pezKO/Q+8wvT2TI0yoU3DMKHVSU6iUlY3AkAS1nrWDCYWA1krEWMAWiDgTWSMgUlzIlpFwvuJuyZXwFIFKIpzOOK1en+x1xmpVe+4ps/M+MkuSGJnRCC4YXB9lo/585bfmVUsqrAKxnDA8I4AMmmC0hhzOGEwB00esH9Zz8e1m834RbjmBkhNxiP6vHDrmCAaZaYi1n1v7dXp738ddZqa0KGGvfmrAdt/CZbjBWXzlyRRfGHt88N8MT9wFY7Us7VKRSg7O9GlsqYGdLIXgP1121I+OpXnDRHdyuZpbsxJjVSQpWCclKmJQ9pFBglpRSJomAqWmv0MDXwtDcMJAp+BGFq2KQYsJQ9Huh3/41Dzl1HxSARq93FHCZMFbovWLXjCnhI6AHZBpqc5/QbR/sdENFytce7Ppp5upEeekSRurhP+Lb/ug3Y2jpNxKly94hMktAm5IMKTCWAU9+zJCth4y3CCHXcJlOwyIWm21yXb4STDaCZ1rSPLH2Bvu2C/YQ//7znuL6Fd0WoIVdpTKXJz42P15hV10Mhis1c1f1md0Fy8b9fPG+q+OVxNSBRhc8ZsHiApylwUorIRprIMuTiv8z4cKVaV0hYUGIVkiXQ4hmSLcesu/2EIsBpDdApnpDDv8CEoMhscBodl0mfwR8KZ0gzZF1Ywf/SoKRzSDOwY/rNuP9uUYXfy1ftypglO9eWtUgUrXekrmyetSkvl9FqylxE4ivWwfLcsFdC6LbWjUog832xOLqllaXV9t2SUZaXTi3ezAZJ5GzJ3N5FzDeFRI9mc07A6ySwA2CE0urUF5FUiQhpS0J49RQ9yjYV1GB/4U08hFws6p1troPRLIcidUfdbxcHqAGOA6pYqZIiQyYbAVjDYDbCMbXCVc0AW7dYj4ocV/ZFUeu4X1I90gagvoRLf+87uQNl7/tSrdFZLJpIeBK+geImJWQkkHINIRwmCsAkYgxtyVLugomShgTMt0kZQLSlRAiDVkhITYkId1WyGoBIco1aKYciIGdIeesgmzsBbluIeSJj+s58k0ZTTreuG0/uVUBI1W1ftYE2mM8jCRAy2Kjyobd+O6mNNZvfwv+i8HlXbK1sifSvNrm8c7cinWyLd6VMbu7xa1qzqxO4LyLBOvCGKohUQnBysBo7Y0OB4PB+ZjnPRPmOLq0Siw1eifKrfw6mbxHsxdTxM3VPPe+yZY01zF5nS61foamIf2NDpIoI/OoapBZsbL65TPYROid/HLk6rOxvDZXyxxiFqqr10u6zY26FypYobbVdfV5ajgvP21SmTbvtD9Klr0HKxUOuZjPbr20aLiwMP+lnggUr6Fcw6QszUtxZ8mlmBffW1eDMTky/Urr8al76rq4XzRKiRop3TrhoEYKd42Q7jrhOGuyWacWqUxNS1OmkWWd1kw6kxbSW/yTQCKblK02kwkJ0ZxlMiGYcAUTMgaZtJtcR0JUuhCuC+E4EM0JuCs6w1UAOQgSV+XkmU2Zk9/kO1sdMDbOnnCClOwByeRKKXF39ahJ10YbVOno0n0rG+viXUsEujPBezLGegsXfTh4HyZZDylkD0antUlUMrBySXrLnOwUiKlqSHrj0pdkc0o5z4ziI1wIMQpN9RBihpV6vknGm4hRNAugTOkE1axStooc8nldHczuQmKsLm8Ah+qL94JWOOZLoAaaUTVDeftlNhE+QCC/jB6squS9awFa5Z4JkMtEMm8FYVRnszlVmbz6UTtoSVbZYAKVQyQ7PwFdB7NP9QoVXAuht7d6+Te9l0nFp1rRu57pviPc8i4o+Wx2MBT9quaqXAB28/oqVy4Fxt7w0gpg0gl7+aqsGZ4qGY9/lVDsWV1osi/tkX0Luzrz0N39Akm0YKCz0APPQEpxwVhKSlnPGKsTUtRIR9RIIdesRo+113e6uef2rR988qMVv56damiuyWRaW9GUTrkMrisgkjakEGUiVmFlU2sbnLIyOCGAfBxkSAsj+TeJeB3Ma6sDxkL1llMGHipS1rGMyb6Q6A3BukOgE5R+jmkLnz+PNvsuM2tYiMN0sOc3y8c2k/q0KZZvXBndss5o3XEUkkvnwG74OsKEtl2e9+L74v7yCWji1Xk9/oOWB3F0y30dGgkEwv8uOQ5TSnVMkCGZ2eLCxiszNnMaIOUGIeU615Fr4IgFaz9fMzXT4NZx28rYaSuTSDRkurXAmROHO5w051sAc9zqgdF9aKffs1b+a9J3RyHFJx8B2QgTigAvFVkymEqUaxVK1385yLRAS0eIhrYCe/YTM02TpAQkMELeTHDPk30NohGQqUh5FJnymZXHMXxx3rc2q+YxlvsgiUi5i+UR1ClCBAtaS6IEt+CKF1ZehfI18CJEJs2yRtQVfhbm2hgdNAER9wh5MfsSpSHjpWjdaS+wdAtKF7+dI+9RYlxkrQus/GZbRHDQJ9rm+Izaghp4Nf5ZejreSB4GlykbjPpcWvcz7JhZGGh9cgO+sE7mxqrrsDA+PHj/qOZ7cWTLg6GeUTRD4LP1S9b9JF3XsiZt8VSpY7c2JxozdiMyS5fCGT0T7ubOGrdqYEw/OmC3WGNinnClct+Jgk1uAhSnCG2Sh0KT9Ute+6bza7e4aoR4ui0PGUMLRQhoDEjx5LyNrU8gxptIv7GJtFsp/4G2EjbvheRn7+VcSc2F0v8uyqqR2mE4eUKh5KM3wFPk7/31VCSaarFcNvAemJM8EKutvqiUdTiq6T7wwu6YRVtwXmJv3F15OVK8DF3dL3DN+h/n1Yu63kk7Tyx/f8WfrCRrjgurWTK7pU42prEOmcGD4JiGyw531zf44FYNjM7kHU9mGf6oJN9eY7T4SuygnX32Za7GhUZ7VEHvqxA9lhcARjsd6LOOfKJg6AWV+42hIywg4gfF7cDMIEW+0h+a7eB9z12LgEGR0RFisKbay9N1hfSSAV0LJ+abdvKXq+KNp97xgDpfS9WeiBvpUJ/+muYnkxrr9SCY9CH2JrUeN795cu3XOmh/iJIKJJbMhVW3us1nzaIEY2MTMFTXMLy05I+x3JXAf9Nf3DyJQOmnTcU5vWKMv5fLjsOUygsRlyncsvqIXN2M14SUi5fPXXluvJQ1Omm3IcOtxngy0WyvrEv3BTLYzHWNWzUwtt65ww/jLn9QEDCaKBiwEV1909Jn8KO8GRoeqznbrX6wLXTK3StkVzRFvVw6+fBTeK5EmYtZp0JMJ1zW8DQKrwy5t3NukhD+hhPaz+IHL9ItEF1L/PIWneO0QYU2uXhGg8A6X2BUBj0YEn/1GxE4D4msyhwkhVYle3qA0Dv+4qDsTLRhxtXpcRI5zYKYsGMODbNvc22Q7bUzrOZa8Ib1hlwabqFC7VK4x8Iek+EeD/VSpA/yx3d0/CkzDQG9t6rnl8m7YtiZaqweuLf6Uvyg8T7skpkXeC+YI4tJ+fnn81b83OWsgUlrQ0yI2qxrN6WbmlpTnZAefifoCJICy/03SAvbyGqrBUbyPUxt6D8+LmJ3amAsNk2LgYffatH32gLAQgAZGi5eosWms5mnDzXR8hXLn7zSPF922sCilD2FaG9RGMkfJpX9wfrtDayaC1m3RN23xlwDlHSFXP8R5Nt/Arjt7XjRrDywDkdTi2KMlQAffhHQZWeIF84DpAO+ywmQiQrPckxT2N/5VoCf1X8KufQlr55ha63GM822Wbch4PtcCvHGNZDrFxVHcMq1/wHgIy4E3CzEa78Daj/xDMvR/or2abElAUBJN10WNw1k/LCaxSCxEE60u7y0IaIXXZK83il2v1Ce7aUV6XAhVi6dv/pKxniNbcu1krs16Ra7wSpraUqvRurxx+FcRdrIzfSzVQLjF8/0LpULM/0qZfx7JeXJmzVe+G4o+X57bfdNeJDkGsznN20xCZ+NRlmFv6eOtgSHffWizLNt2DbSregH65C/ALESiDf/AvH5zHzGyyy1DdkHTJNr5IRDT0Sk3W+H3Qq+y5GQzevh3rs/2K7HwDpIez+JFy6E/PRfHt8mNkZfuQJKxcyyzWFcDpVGgg0aB2vMH3VaC5+EePkXsE57A6wy2BbbZreIT56DeOF8nZ/6FBjK8QpYp/8HLF6uvI3dx44BBM1F3WdR4ZvtdgKsg3V8Y+fRo4F1tJ2DGJX/fI6r+e/7eftSR2jZES6scc+BdR8M8fnrcKf9UJW3raU1l4MpqvsuWDSQuUd8zZEYxnuz4Uy5xmSLhcZVWxDsv5v/np9DWPKSQqxa/uHqaxnnG6SUqzmz1ieYqM3EE42OW9f64C3IbgPGb3BV+OLvKE0vLqt0m53ybj26HF7WKXGzIB//Dn/aY4TRhIo8b8UB2rJMcQzShlNvshP40B+CJavgzv0H0LwmkmAhRuc9YieA8t5qosMmj9sqsEQ5ECsFq9oOfMRZGmhWzgGaVwP0fKwcLFain7dLIT5+FuKNP3lMqwAL8EY+6z4U9slTlbjs/udPkB9OhfWj6WAl2u1DNq7SaRA75RYYidWKqVqQGz6B+9gP9G+FWTofk1cRteSH3gq+sz7fy33tj5CpGlU3PvgUINkJ4oOHgHSt1o1W7wA2+ESwRKVidO67t0O8c6PO23TXNFtTuOD7/Rp8+E91Hm/8GfLd2zSr9T4KchTZlWC7nwbrIL0t17n/IMiaxV7ZuUeFiwwiagdKhPpaJe5lIBzYp78K1nVniMX/gvvPM2kLe2EQz0s60jcl3WDtcwmQqoNMNwKpWv03XQ+01kDWL1eLInNaIZ1WQDiA6xi6QlKH5FQfG8n/iigsik0qBibE6s8/WnujZfO1rovVUsq1Nhc1djbe4LgNLdsNQGZzNsBsVYyRxOc1s5Bsaiov4yzbqUvP6sPKqkomuT4wBh6x5rocFbLDQyb8pM8Pciu0b7jweaOaaDQhTnocvO9IiA+fhvPCxZ4uDUD1AMTO1MfPZB86CnLVewGoqGAwBZTnvkKe9d0H9okPKZFZkmjmZIBsi/7nZsG676Ymslj9AeTaBWBOC2SmFcg0AdlGyEwKsuYTyDV01Ehupc/l6Rl8mAV73D/BegyBbK2Dc/d+sI67D7z3cD3xnbQCAaqnEt/pn3TAynuoeso18+E8eoTB5nLtFtL22iWwTnkesnk1xMuXQ9Z+ohYT6+C/gg08FHBaIeY/Cla9Hfh2YyEzjRCLnoCYdw/QsAygxUehdAH6511jJZ1hETjFyyBXzIb4/FXwXY/yyu2V381CiixYWXewLgP14vLpTA0+6z+EePcOSGJqGuVDIE8AZB9xK1i/vVR5Vds4aUgnpVgzXWexUsjapZBLXoTMpnR/ZBohs9Q3zQqAZZ23xT+AzVw+Kt8uuyB22nRISnvtIr0gJjuBlXWB3LAEYtFUWPv+XAGiyjvTAmQaIFMaRClPd/Ydqj455pj/zWSNftNG4c+fEwFLVg72YclJCrl2xeK1t0DytczCSjCsdaS7oYzH62W8saXvjUizbaJ0sZXlq70uT4S1ZgCSLXVl5Yg51V26Vx9eVpW8MQDG3Lje9IwLEUR/BBFK0mTlcdhH3wk+YB/F3sS7d4OVdVK6OVT0gjX0FK2PW/8J7ZEGEhUaTKaekQcmoYLacbBEJ0iaWG5Ki4WK7nCgtDPi57wDWDbcWXdCLHgCiJcCsSRYvBIgYGhaBbn8zQLOf0YuUsA64ApYo87VmNO4GuK/98PaXx9a6L76B4gPHlQTk0RPWAnIT54D67ITrCNuV6DhPD0ekkT56I6fvJkmgdJuQOt6NaH5/leC9dhdM8QuO4OVds4VjAw0NZ9Ctm7Q4LvybYi3/wzJSDTNbW1U4rHPIGlFIda472UqTfHW9bAO+A34sNM73P/is9fgPDEOMPz/Qi+rRXAK+Hb7dTjN6IPurL/BfY0izhmBQCJmJdZ7BGKnPglZsxTZe8eqvuc7HAL7uLvUGHMeP1UvTKQ+GHsVeN8Reux9+gpYCY29LhAeMLZb0I2nk3lJMinWLl+y/jYKSk9nF4HJNSIrakqteJ1b1tjctxLp/1nGKB8bPBCuHAQpi8aPa7eTog/45jO1rBuj1XVBLlmZjGOJtBt3Um4ZHGdEMmH9lHbG+5+8Po9cMBlgVKj10yjozWAnED/jZQVQSnSNWGwL1pNAzVvh5cq5cB4bFwBjSOw0zSjVA2Af9hc1AVi8RInRsElUToDFEjnQI0bnZgE3o1lMthViyb/hvnylLpsPHqbMQNvKuuyK2OkvBEYN2VqD7B3DwYefDZaogniboqE5YBX9YJ/5uqqW89y5kKvngX/nNCXquXNuU2JbSBzxK+Qp9iSBunpAX6DwhtYxD4JvN0axaLF0plI38O+OV/VQrE1kYe14OFj3QSAdo/PcOQCPhZSFwRY7SlYIFYZRZa1CM3LwwaeCb7e/Bm0Sa0lHyWkxs8Gq+oFV9dELQs2nqlxixbtwFePXuswQ41UXBPiw8WBdd1GirFJfWDEwuwSs1x5gSTIm6Y9ib9TGavGkfPW0cF67HuLtSYEDkKnH87+zHQ5C7IR7FMATawSxQiphSTXEp6/CeeInavFDNoXY+JfAuuwAZ/rlcOdOzhmolH7T15WEtQPqqsf88vWI+Xp5s28LmhKlrFu3vOH5eNKqY3G7JlZi11rxWGOs1G7hiVjGSjBhKck+7Nmw0XgQfYGpEBkL2GkffqmwZF+LKK222z465M9w5cVqj7HpEqbcIjyBxHfV8xCo0IAwLZ0+EwjSMxuFGBhZn10JmRWQGQGRykJkSM/yDXy4hfhPZ6pJIVtrwUq7gFX2gkw1wJ17H9Bap9lOayPsH9wAVlIF57Ub4M6ZrEUwEktVDNZ2PiVdYA0frydGlpgjibQEABQrinR8HmWykmBq4nMNnrEyuO/cCqSKn8Kq2p/biJ3zpmKxxApJj5W9bQ8l9lm7/wjW3hfCfeV3kGs/QOzsWWoyOdN/AT5gP7AdD4Xzr4shl7wQ7LQMgYmBKvaJT4GVddWTlvJ4+FDYR98Lvv1BEIunQ3zwAFDWA/b3rldA4D5/gWLJfNg54AP2V7pS59lzizNs4cA66DrwPqNUu0rhQrxzG8RHTytWb+09AeKDRz0Rlqk2tPf7Jaz9LlEDNHPLd4GWdZ6xyke2In2j+s3XK2rDGuszArEfPQEWU0Fu1Mf98F9wpp2r+4PAkwA5VqbGi0xt0NHjinz4bkcjdvStECvmwvn3FWCl3cAHHwtryLFwFz4N8eGziB11qxKjlZhN8X/XLAQavoBM1UEseRli0TPhyCTtjbUvcV86AulaB3aJDavMhl1qgyUssBhX/2B5BjvfDchD17Z8gUO+JV5TBTu2qAdyOEKBh++AvXBi3e17VGRY9iIwdgwDSE9Cr3wEiSeYFHd0n7mwYKT1rwcYH9h1nJT8YSMoV0GfsHC7FytKIe4U2UDviSAaGAVEVkJkXIi0A2Q1MJq6k0JOLB0dA4XSCd4lJiZcMDcDa9+JsMdeDtm4Bumbh+UsiVIgfv5b4J0GwPnPJDiveae8+vvvPKZVzFxEYiMxFPvAn2uWSOxDKdU99kkskUDTyWgdFgR4lx1VEdN3HQK5blFBCddnDFR+a+S5kM3rEDvmFpVG5ubdwfvvA/u4fyiwdT98Fu7L/4f4+f9VE9B58TLw7Q4E3/lwBfDOi5dCLHzUK1euxXILn0Rs/Fs5dtZSg+zfvwP76HvAdzhYMyLSmxK7SlJgcAoBS0HYaZktA7MTEB8RMBJjzG1xC/WrcBA75gHwHccG3ZN94VeQn0xH7IdTFaMia7vzxGkQa96nOOCwD7wc1t4XqD5M37wH0Oody+I78kf87fP0cb5es6IX4uOfA6vonjesss9eCnfu/XpBUM+TTloTJ27nC1YaDHSfxw67GrJuBdyPXlDMnPUdAWvHMXDnPgCxej5iR1wHsfQNuHMfBMq6qrbjuxwG3nMwnNdvgfPqtR4wdnzaB0+amxk6YIqRjkRrTVYBokX/SmzwhAUe46qeKq57QF4L2vQjiuNCMyJsc881NgVrZ2hdgL83zWbHA6xroflNIr4Q7gk9Zy56O3pfFW3D2xdV2sK2K/e+obbhrUs6WXGMEILIOErHAAAgAElEQVQNqBx1w10dBQzzOfnQoGkyI8Pn5vpwvykJtvdOIJ5JFTSOVisFjKkcMLaXxJe/T8Cko+4TxtnDfozYkddDppuRuW0fSIv0g+VAohLxo28G6zwAYvm7EJ+/qXVp8XKIms/hzrymbT0j8cLv/hix718H6WaQuedoyJYNSomvxGYCRkFHfngiavchSJw9XQPj5CMhV7Ud41NLt5rxxM94GtLJIPvYaYidcDdYvBRi1ftwnrkQrKInYqdM8RjjZRDzH4F99GTwgQcpcMw8cITyGwxEt0gDWwf+BqzrrkqsJQNP5o6hiNH7Ox4Cd+49cF75NVjlAMTPelOD8x17KAOCfdhNsIacAPHhM8g+d64WcYM5Y0weSQB/IVjvYbB2OlTlnn1mAsSCJ2GNOg/2mMu16JhqQPaJ8RCfv4HYIX+ANepM1YbpG4dqXa5qD49ntDVIfANQsjPi46eBd90RYsV/wXsP1Zb9T9+AtcO+yviSuf8UiOUUsFYdzKD/UsT0eDGNk1SMnA8+RvUBklVg8QogSeqUcjjvPUxCP+wxl8KZfQ/ceY9p4F/2NuzRl8P6zgnITr8S7ux/dNAi/uVng3AkUrUOrFILdmkMPGnBImCMW+A2qRMIGDsC0JsOHHXTObKk4Sz+yYCxST1e/uDSgsDYOHviLULKC82bDJhROWrSQZvSRPKBXQ6Dw6YJgUTeqlogQf+ZYnmZ99v8TqsvRdPMEjBqUZoYY6H0o8wv90yuI/LZYW4zYTRNThNw2KlK56P+VfcHq+6riTuJyaQLa2cciGWzkL77CCXqFdt0Rm1kDToa8RPuUCKi+8E0rTMk0VfpHMuV0UWJcMpFpwQsUaqB8f4TFBDnPiHhRF32daykx0uc85LKI33zSFijLwPvNRSZR05F4uyZYCWVQTKZB4+F/GK2Knfs2Mlw339YibrayTxaaa0/IVUQ2+4AxE56BLK1HpnbCRj/AT7we5Ak7jev1+JmdX8tCtct021JTChRAZes/c94wFhk4JCVn5X2QuICHZIzO+0CBagkVtt7XajAUTZ+gezTF0N89h/YR/wF9vAfK/AiYITTkktZScse8EaiuvnAycp7In7a4+DdBkLWLkfm4TOQuOAllUbmiYtgDT0G1i4HQbbUIn3PCZBfzM9593AGnsgBY0hOKusK3mUn5c4k0y1K9UBSAS2MSncqXMQOvRr23ucg+8pfwUo7wd7zTGSmTYC16+Gwdj0Umacugjv/iSKRIwsqsUKt2pakVGh+CUcgVedqxkjidIkHjDELzGOMxXCxmERXDEuimKAKzlm2cRZ/MvURO8WrCHVmA4USlJAlYJjEXPmX7jMXri40fJhii9xaAYo9aH6krK18vroru+qqDii+8pN279v1IubImzuiNivo8UpJRtlzm3KsjreXY4wColUDY9SFOn+y5gNEGDz8X4WQTReS7/p9JE65O3iNDAbMd3amePHL5yg9I4m/1sAD1XNi+Xtw3rxNsUrli9ZSqwHAlF9yKQbfeL+9YB90GcgVhXXdAcyy4Mx9HLJ+mU4r06z0m7HRExUIuO89BueNWyDrV+jJrvwNCwCW0Y0K3PuM0MYh8pGzbCXeypoliP/4SfBee0B89qpya3HnP6aNEF0GQjathnSaQ04nofbWMrtus377IDZuigLCzK0EjHeB73QoxLK34C6aBlbSBfYBv1LGF2fG75Uu1tr9VPA+w+Au+iecZ84L+eapRI3thWoZq+yLxLlvaWB86ly4BNhUAgLmIScp0VoxbikQG/corJ0OVm2Yvml3lZ+pw1KqIaVCNJmpNsCwXsOQOPUesMqeCujTdx2tdrskJ+q8Mw+fBffzt5G8aAZYeTcNjg+cAbGEDFgcFLmdE40INq7nwIrv9n3Ej7lZq06U6oDGOY1t7RLkLn9P6Y7t4eOQefYyWP33hLX7sUg/MA72AZfAGjASaWKp5IIUDK6oySTXL21PPH+QROdMGM6IC6TqXc0YCRiTNniSxGjNGEFHqpljMIquHWZD5qDV/aPdStkvNzwcmwUmf+JKcWfPLgvnsMfhytGj7XprQ//qlz8g61rRD2ucM+E44eIeOgNcG6XYUgb5Ghjuqhw56Y22Xm7vnnvPznfCwVlqS6y5KBWw7oUw0A/p5CtUI3UPdY25eitgJJc6ATframDMeCdJRhi5and1zQSIIp0dvBs5vCkoF9Mg1XMI0LIesrUB9l5nIbbv2Sr97L9+j+ysycp1Bs0bEDvkN4gdcJG65372JpxX/gJ36dtaFCbLYRBsthDhot0lxD457GE/RPwHeveI8/5UOHMeUVZQsorb+5yjxTgp4cx/VgMiufvEyuG88w+4S8idxq+AHz3Hm5jCQfz4v4F16g/33fthj/kleOf+yL78JwUa8cOv0oD79l1w/vNnZfW2Rp4Fe8xlkKveR2bKOL0FzmyfCA4r6bHfnoj/8CllrU3fMhixo++EtfNhcN+7D9kXL1dW4sS570BmWpB9bgJYshL23heDVfeDu3Aask+fF1Y7KCdrhY66X0lHWdEfifP0MM48+VOIj2m3Dj3iwP7BLeB9hmuDFG1R7KH9QGXTeqRu2UNbtf0Atyq8qpd+kI/eTxXb+1y9UMUSui73joNY+jZ47+8g+bOXVXbpyePgfvIy+Pb7ITH+UTA7rnSp2eeuRvY/f8uJ0iRSGztz/Ca0Bh4CRscjrPwv4if/A7xzP2Rn3gixar7yOLCGjYM95Eikp5yL2P4XgvcegtTNByB+8p3gPXZF6u+HQ6x8L5h50V0weSzNuJD/rIdaoWgo+pruZgaXGGODgE1MUTFGW4vSpGMkw4vaiu4fuFbA2u/TGdN7wpzDxrz3iZUqji7A/fysj0//Mnuxg+Eq5/2iDNmGDBtx51d2Jq2krXlryl8RjhyV7+cQgVUTGf1o0d4Yz9vLHwHZoGECxkjiNAGjA6QzoUVSRxQxNMn6FI0gzmA09mJQypBsEyGhweomgNIuiB/1V9hDj1RMIjP9j0qsip94q9qJ0HrtborRWbsdgfhRfwKr0lvgRN0KiKWzkH3tZsg1C4MA3N44038qeiNJohkBrEWGFy/Qge+a47nlKCfibAoyTY7dzcqxWzuC0/e00kHRJCkgSOvqxkpQ8qt5ynKenf5HWMNOVuIhiWlUvviJf4M96Ailn8s89CPIbDOs7fZD7NCrVFu7i19B5vGf0GF6hm+e15IGQPIdRiN+ysMK+NI3D0HsyNtg7XI43PfuR/ZflyoxOnHeO5DZFoiPXoQ15JigO5y5DyA7/Vdg3m4OXRfj+AhvceGdBiJxzqsaGJ8gYHzeD+etfDVjB+efZOrMfRDZ5y4J3Jo0kCr1sbJeB2OZRNjD/ojYfufoR9JNECs+gFyzCJJYe2ln2KN+qO5lX/orBInOrQ2wdjsUsf1+Grh0Zd9+COkpF4KXeuqWaLxK10H8Rw/CHnwEUveeivhxN4BX9oQz7ymIlfPgLnoB9sjTwAeMgjN3CuJHXwekm9B67RAkfz4LvKoXWm/YE3LDZ4EVMjqcQ9ZJv74eMQlNR/90yGKRpbz+VTpGAkYlSlvgSQMYycikHCh8v82INUcNdgMFQ9gQsckYZaWvnOM95tQdwC5YV9DaHEGdoj/b0Xp1NJniz7XevdMOiayc5Qp0UZn5QTr9KClm/UNHcuYmUl5gAq+hAv9h3/1HWfgIFCPAqBo6V8agHP71cFSynAnbfC8qeUSov5oEe56O2H7nKh0PsYv0Uz+H885kWLsdhuQZjypdUMs1g8G67QS56gOgvCeSP31KDVy1Y6XuC7TesJdiACFA9McCsZqBo/VuidYGSNoO5oGe2u2gdqF4/oEkT5COjqzWtnYLYdKBILHY1/3lKYf0BXvoMUiMu0ul1fLXkUj+5EHwnrsh+/odyDz3f0p8jR9yBZz50xTzSZz9HJzXb1NuKLF9ztELwtQL4c5/MvChCw00+pGoQOLM6WCdt1dVFcvegVizSIE3+Q6SzyUZqqzvjPO2txEI/UHrGxtWI/3YjyHXfeT5J1KCBYYyjyFxyiPg2+mzT2T9SmSe/xXkZ68q/RwZf2KjL/UAima6C3fFbLiz71QGGO1W5qVN45ZEaXKKpbHgT9ZkJ5T87FWgtBqp+36ExFHXgnffqc2J4342G86cx5E4/jrd55O+pxzplfHFrIb/3XGUCG71+y7SUy5A/Khr1KJFxh3JY8i+eA3cRc+p7ZKJs/6pnpOuA+fNu5B98x+KyZJhT0kk/sfre/UnSjSKld58zhw7/nej7ASM6UapdYtKlPZ1jCROkyit9alF9YzGfAt8iw0cDaauAZqWjVomxZ7s3E8/+bLI9bUDIxXQuX1H8iF6gjxBQt64QekLLQkGapkoEXonPLOVhEMOvWR8oX8kSqfDBDgiUbfbfnkrqxeJL9pwNMFLLvgXWFlnOB88B9Z1R/BOfZCZfg3E8jkouejfevfFuiXg3QciM/MWiDUfIXnyrQqAMtP/BPez1yE+fyeY5OGy5n5R2rH9zgNL0j5pMq5UALQThYwvcdobnQTI2Vs5EpO/nPZvdBZNR2rySdq/0fuE6kcjULhInvcvWNuNgvv5u2i9ZYya+Fb/YZBNG+DMI7CzdNrxUmVp5VU9VWqpxy6E1W+4EtPJpUc7ufvCldHUUiDxw4dg7UqGlkY1YWlrmwIv2srmLwwBpyWLU1w7S7uO3iMsXDhv3AbnndsVTciBmEpF/Zc49m8hlhnUuXGNcnshVqe2zSlLvrc9UKE0bRZIAyIDd8V7cOdP1fVQHg++OJ1rQWvH0aqdnQ+no+SC6eCd+mtH73gy5Mfov+F+9Bpabz0C9t5nQCz7L8SqBVpCiOsAEXkfK4bSKxaq3VNKd632p3O0/HkkxLpPtIph6NGIfe9y8OreSsep+j1RCrFyPlIPnQGxfknIt7TYwO/I/MifEzo18zrFJ0g1SdjEFAkck1bIXYcCJwWxNc2zfkIFi+KCeTN8jzZDAfKH9gWfPtLupO7AA98IMFI5sjdvfxOAnwUBPyMNaVazrXLnkZxIWymrNLnrBMBIq+TXUc3IEKKgCANGqd7m1X2R/NFdSg/XesuhyrhQdqk+CCnz4l8R/94vlOWz5c97IXHsn2EP+h5Ewxq0Xr+vUsq397H6D0fJRS+qx8joQqxDMUjSlZHxJdUImW5Q+6RlayMSx/wR9q4Hwf3kdbT+jazeOd+/PIpCi/n2+8EefjLcj2fCeW8KEifehtieWiQs9hH1q9Dy51F6H7Cn38ub5T4zJ3eFk25HbOQpSE25UDGf5Kn/AO+1a3tVz92ntr1xL22sCoy5xuiQLuLH/x32d46HWL1IuUbZI37UQReRXDbpx86ES47RKlQj7RPXfoehcajiOHr0R9FK2tViwR52EpKn3KwSa73xEIiWWu1mk01BrP7QA3CPkZKlPmYwX1+soeBrvQajdOJrehFReuKEyq/56sGKxpZe8h+wCu2qR+MoNXmcWoSTZzzkAWUD0lMugrPgaWXo+SY+tLakm0SOLXqMkZy7lbuOdxQ6laXQnI6SU7/MhXBCJcXY3dZFn+poIV/B5+tAjILFkn/vXSpSiXdcIYeoBwosTb6Pc4frFVm61Pj0GCMpf2UrsQsyAhRgLcbxoL7A5OupcirksPycC1yWn6L/LlmDS3/xhlrds7MeRfqRs1UorbLfLVKTsvX2YxA/+mpYfYYi+940pKddirLLZumdMPNfQCsNau98rvyjMnWFrZ6DUfpLvR0v9fBFELWfKdZAaShXHfJzI3ZF3xNlsHY6UCnr3c/nomXSgYox6pS0+5H5Ca4Qg1LRc7jaoZI4+Vbw/t/V7h4UtcXbbkgiqVy3BOl/XQuxZkFuEVLJ5tLWUWw8h1zyv+09FPEDL0DqYTJQ0WTlsLbfG9aAEWDlxB7bXAIhm2uQfeV6r4za4T8YV1638e33QfywK5C69xQV4Yj3GwVr6NHgXQbobZvEeok9q10oxIJt75/e1kdMtvX2AzWLVZsHSJQ29ZjeOPaNMV4ZVPbky7rXaUiedKOSCJqu3A2yaa0qIvO2uAftTu+ppjbkW6/tyOUoccx1iB9wLrJznoCz6EUkx92m+pDGS/aNu8F33A/x0efDefdxpJ/9DWQTHbolQe5DJec8Cd5zF6QeOAvu/GfUTp5ceF9/IvpNZ/aXP0V1LMyctGzuS89d1d9yM4SMoHSagzK+EFv0RWmbaUd2ZZXOjbzo3PfVZ8EjxlyPQofF2GKeYiPYZZ8W39bVYVDRD35jwEiZNV/Xb0Qixl93BWhTbwc/hci9iYi5+8qNQjFGjzUq44tpHY1mGV2XzJN7zYlpPtdGsel8j/OegT1wb8imGqQeOh9IlMDabk/ER+ugDK33nq4mSsn4+zWjvPFg8H7fRfKkG9Qq33Lb0RBLXvPdsyP2SQ/gO/VH+ZXzNA44eqeLzFIg1FbtlEx/lb9bg2KmVp/dwXsMhLtqEVr+NDLHGINN3/4uhNxADwtGXhBcK+HhlTezVVQdan9COo+FFhxR5gzwtoTSrKB3yBldJeHFqNT+MLl9owHAhhcpVRAF3JH+MIcGgR3lYerWaPX0YzIqZmvMArKSKpDSoio5XetAHb7xxRCjA5OngYYhC6NE/IDzkTj2GrWQNF0xEGjx521kTBOKBm46EcUbAeOJNyO+7+lovf+ncOY8BmvnMUiefBN41+08RKMtjwJoqVPO8MQslThN/ygqUHUvZP59PZx5Uw3G3PbCk4OHqDhb7Hd4LhG7TjVD6xb9fwmufBjVzhfl4to+/OgnpDpjO899jzY7WDybzboHlfxq+X86CCgdeqz9knUomY4/lP1Lvz9IsCuUz6H3WiHY8Z0WfEujryA2VxDTwqwajtgiGV8IGGm/NDl4k1U6cCQwGVKYlIcPlw+vf9EhlA8furS83zCUnj8VrLQarfefDWunAxDf+0ehxmm5/Vg4H81E2S9ehfvpW0i/+Fe1wpeMuw2Ztx+A++mb2o3BeMuEBHWnpBolZz4MpBqQnnEzxOfvqhBgjMKRKUtw7qPmfef+yulcttRBNHwRWODNsz18C6F5Ho5ieKZ1sJBjqcGW8vqz4Nwzw3x7NTPdYPIKX0TU8t1ofC8DD1uD1T6MxSrVQrAfPO9bYNUFj1P5MX2D8kWsqH5Zi4E3xckkR3irBLL2cyNqQ35sygAqC5WbMSROuR3pJ3+hw4mprVVxZd22B+4D1nV7ZcBj5bQNkBz8adtk+Py3ltuPg/vRyx778+Ubz5JfcKzlH6fgPxaMEc9dR6fmzxndzrRmppoZrCRXOkZb7XrxQDGWE6VDwytvjfOIQEAnfTlHP8j1PJkU++WyiR1HoI49+Y0Do7yhb4mTBVmptUj9ZT6RiWcaX1zSBRnAGMqmEAn9MuXI+QuBd+qL2N6nI/381bCHnYjS8fcoVkeg5Lz7BFLTLtfmTRLjyMjgR+GhkdSRiDx+OUmUVaPDi5i9UeUvhFi5vavmfA8tH1HSRg+aLgOh0WQ2cqTBDWlUgTO5SxlO04GwZu4aK4ZqJuKFQLUdRtTGbd/xOCiHiooSnEgTRtgQEhdoIL9Z1QFaHsFVeftRf1QjFuk9o5DF9EyKAXtxPGkskFqAouwkCJRpF1aVMmw5C6d7W0U3aqDohzdhvvjAaCu2yLUPY0IDo7JKk7/mpqKP1yycs8X1aB3W7dL1/pkRm1C5wq9satG+VAFar+m1vw02wxHKzVN93J12h6juDN7UCL58MVgTiQHGwAhNDDMsj/+YjsRMrDEkSmc0Y2yrooUE87YEhsKCvOeKpAaSACNLaawEvKKH2gusDCJkfS0AfoXwJupkWIi1RjtBY4tmeUEZjUEdGt8+WQsxKd1KodPjvIzz5kYAbsaREb5jut/aClC07kmLvl5PBCDoiUeBGO31kgeIXnVCTK/QPG1v3hbtrzZHsdniOaaYl5c/sEJKzvDxaiH+71Ok0O4ZjwkZB05pQ60uQ6QkoaHhA1cUZMwxFTX6mnOh0DgvNFfMNizWbH6VPOcGtDYzaGD0wJGs7krHaACjP9iCAhs5hQoeLoHFIQQThycvX6WtkF/x51sBRqpD5g+97hISP6XGFD37wdljn1zVhID14VzwZfoAJhPY2upInzH6ojQFkWAeMAYJFZtFHen5jjR+W7O0vRlcKP3QCPceaKsORXu0HQbV7vIRKZw3C0K7morm7TVu4HiaS0tH7MpRSK3jy2evHWn6dp8phDBFXsp/tI2p4gN+gZhZ/ltRcA4t+iZItlcJ1fdt9KU5NqLjpNgYb29cRt9r73lflG4hpsgDxmgpUZopcPSt0ib2hbiP0Q7RvlDqacYeif/6i1Pba65Nvf+tAWPT/3XvEUvyBeT4LZNlWq/TpTvcgYOB0jJVH+v9WeDL29zSGKp3IEordx2pwo75wNheX0bHUxSQ/d+FxlZHMLWtMekDf1vMpth4b69eZrmLMQF1XWVOu4C8H74hQiWQO6XP45TaUZ+e9Qvti9SBf5oBfjkiGGY79K6y49DqaJBKz0Ibqlu08MYKWbQN2hjd6p22Ot1IP1eTcII5K6wpFhqJdnR2bQwwFpjpHV0nOzpWollsypgnUbq1hcM2gJHHmLcl0NsrHR34HZTZbQv1TjoztPSPNcs3Ffjae6+jXddeOht9X/62c2Vaxpa4UnYNtUcsDnfEAZBduyuLoPXOTLD1RgAMf39mgV5W4yuwSoeBcaML2MEXOsLDOphU6LGNSndTR7yZowdyoTnq6/iKjRLf7cQDRUVkzH/tVdwHV2U00yCrPXeIURieP/5uqejq5E+s9vLpyP0oEBbpgDb7JdpOHVaiGYy5DY1jR6qxuTxDRvLWZgJG2vHClI7Rimu2GPgxmsBoLp7FFizveQtoyDp8YMW1q8kv6Wv5fGvA2Hx5tzMtjn/QRgJzfKufsRjcAw4FKqqAbAbWay+CNdbled3ltR+NLwpUSzvjlPHFAcsa26C8JizEvtpadTsy/wq93xG86ggT9J8pNHcVczN1qF6PtsmiCrIh32iam/pRybc9SZlA0WQXxepWcCSb9TAy6kgbRvG9LWbcXnp590N0yQsGFzzkHQLVluRfTPlnFFrt1S8wNovN+I1qVzMf73sU3Iv1ayGmGF2bouKvn5ZmjB4okvElrv/5sRiVp5XXNu0x3mh9KZSjI3BxxbXrtPf81/D5VoBR/hY8k+k6Kyvk8KKdX1UNMeZw7XOXSYPNmw2+fKnh8qDfDDWavyVQnRwpINNuDhgLjYaCANEBqtAubTDQvhgKb2xnbhSF3NjEizwfHfX+Y+YsNl7VkWg6kHexBztax0LPFSlTB0qT5w9UrBgdLV6QZ97sMhvUG70daS+zEsXqXiidQqhVbJX1N+60lU575TDua8ZIbjqenjHhidHEGGmn6JexStPeIs4Wzt+wfo8Rd+IrC3oTrV6Hxs5X+VDTJVUHWbb1b0e07WAutx8IOdIwyqRagYZ68E8+BL6gwKXhUmmdl9DbXsmXMeOCF2CMAaLSl+jgLbocR0ZkdJkrsOypSwa78Db06kyDm5El3SxPG2kGluNIx+R7dURi0kfr3N5yba4+HahzUJz2qFlBW2sbM69Q3gX6L+d76aVl0J5wfxRwQ2m3zJvmutKhuRONqGO+ZI4hf9AXpXPGOI2CXHRs5bVfcfaQ1zTGBb9dyYruOzUpxthMjJGAkURpDouMLqRnJMqnfPN1gYJ1MpK9/lm4UygGheOIoytvqKN9jl/551thjM0/r35RCBwSuG8YSBV1ixO7DQV2HxbykmdPPw7W0qwNAJHO1g7etCPEA0Y6+6SDzWb2S+F4dW0v1x1hFOFncr/ChKcjKRWrlF/y/DSieYedSvIdqcPt4TuO+PmGW9Usf87ZN1w/cy4Xw1gzVf128RiY/spYjCxG38yvj48MujTR9tA1Ldxjha621WvF26TYiMj1b+F0275aCAML1ye/1n7KbY1Vc0NE/kiQ5EuD1iYtSivWGCfG6OkXaTugxxgDA5Y3IMwRQ76tCmw95NX5eH6vKkAPe6Pkr7X7f5m4i34rN8ye+EdIwSua669iY+5NfePA2PCziv0si7/qio7vZpc9egGDhgCdOgPNTWDTnyuMCurYFR2sVjNGB5y2zKnWNro5mEkFhoC/9Sg4klA/83GP/fDgnrfA4TH0qV+E4Z9PxYilT8D2z1cJXCgKyJN5oqPvh+kvlx4tM5/zv7crn3qVMV1FzLoGLVWorv5N754aeQbMRN1C/PshhPENB5EjH6M+qN6AjkYsVkkVCHgaKoc3IbRrR1SpaoBX0fhZHVhoCrWzaorotCsA737bh9rdbG+vfyPNG4Y+T7wIrQyFdBNmFGcvwbzjM83dRZF0g6YIPM/DiuGgqAXu5y0URh1VW+XGghKlPWBUbNEAxoAxlpVD7rob0LMPUFau31+zGuxVHdw37xPpRosR/5GHV93UoA812sSPfOxEq2G7Pp8B6McYFnGJn200MNKu2LVjBl8Bxn4CyL7dZywoo814HSkTGR2bL6qY4YKNDnZMmMt9Macmv7M8uVStJN7ECzCPnhF0DKYEhTxS4JjRJ/aZm5t0dv6JKvqXz14KSR76nsSTw6/B2zuMC1WzqmUVjpp3NYau0FGh/dTCGw8NB2gDdHLP5FxhwvPGZzFmljmeZVsUXVoi49D5zbnJmnPtzokq+m5OwR+wIH81VuZgcxIauzz0i8Lz2CHlhzq+SfW5vq7/MrjSu0fXKLykMjoztadFvxN+V8UG8zaEUBGD5veu5drULLpn96ZgNPosOKXX1LvDJJ0RoL8zhbbaI1I9R9cBLumMWf+7vk42ALquvkum0qB3PViMUBlzDSkw6HNjKddXuUnmj6Yw7JutnQtgEu13nz371/2ezrmPm3n74zyXSi4YRM79KuBgxujNjZXoBlpznIWFXHPkewOGROkoY/R8GHsD+/wAABucSURBVFUUPPI6OHEcUKLPIwo+ixYA71LovSJqi9woUWW2OWaVrmrYh44t6AgGFXqmftYECh31YHCP4bmNBsa1Y4dMkcBJfiKJDOtc/foH7cfKAlB7QenRMfCpjg6YnQdI5n5LP/1CBTTX7CiwqR1SZJH29ktzP0hBCIAjPhFmAMzIObf+dP37mIfRlOiC9RXbwaXzgI3P7sufwwmzL0PSMYIGm2gbraxZljAa6g0i5pY5owH8r7YlUZIQZJlDayp0YLkKpapOryegAhw6WUEyRsZ/VzCWVYGzGMvScdCS0z04YCwrmHrWEf67HA4kpcOFpANS6Oh6AkDun3ziez4GJ0To4328+cppFkU6L1Qvg1/Qa9625LxQAR1acY2+iIroqkjGGhME3aLzuCRhKEG3Bk9IySm8AZNCOQ1JAZtLWLQzmUnYELC4pO+SwhPFoP/SM+o3h9SnmUgZk3SN4o8JWAS8+tBvLSVFu98HAX8BC4edCW1Nymd3+fipr5htHx2Lhd6JElx/Yvlp5es4cjhSYPs76RhbmizYcdIvMs8iTTtY9QmByir9vcOB3n1Cc0k+Ow1s/froxq/gGbN/6Ts1rhDih1V3ND+8KcAo559f3tgS/1ACfkEcbmH3jQLGNQcPPh6CPeG12Ycc7JLuMz54oSMFkhNR0pQqf8+VcpdgNSgACgUVgtFOLvSeVyi9dVRvC6SAtQoYTZSN0kNTtDAzD6homEc6PIHPuo3AGzudjoV9Dg50n10al+K0189Bz/qP2m8OXxqKgDUxKwZGgOaCSYpImiHwAkNGgGckZMayZLLKcreXHM11sP+bgUX7RDPCoueYSyDImHRIzUrbplQoNg6a6WFG5iMOU+cwqXv6EpEm9Vtdo3vK95o8U9TZPSpJdd3rBvVXNavnjmi+5z/nNwpBrHnNZIfRhgu3vE4/UMDkwW74bfKAiUYeFN47/nUCRg+RVU/4bpT0HD2j/qqDlbyFnMDUg5zgvtbSqKWDnvU4sGKcHqMlMLWYgC0JVIWkqItxLhBnAjEpBJ0NmGASCehTNeNcihiBrQQSBL5Mg2oArCFcizZStBGD8d3+sGz7iY1LyAdGHxR1dDfPj9H3U917HyCbBdatA0jlVVoKLPaCb5vspxDJMOa0zbC0Nd28e7fJ2Og90w2zJt4pIc8ykPeqqj0n/W6jgHH12CFEMY9gwPPdEqnj2AuL24rpFWrn+rNLf8OA39OsjwzhQPGthVb/E9m4X2ANKdRVKh4jBWAmcZrgROrjU/XHTD0navqiRTh3X+AsZoZhWNp1OJ4cdS3WVO2sUo87zThh1qXY4/NnNbL48CIgWZKtI320YCwNsLS00CoZUi7jadholUBGcmJujBidQ/GiiZ35sQY0sAn0yKaPtaQsXReLT81YVoMXkUmLutSSHqPzJqpQXE+zNw10mv7RZJacUWPpe/4z6j0tDWnA01oHDZ7+tZwUl2tQxbsM8KUSEcE0G9UvQ0hSz+lh1LMeYG8sUwyNqQhomkCn2sADPaYDIPpDgwRq4ssKgujQQ2/I+HIitVYAlKo1KLShHlZ+7RmtbNRaOuiPar3gPXVqLEG757/uxaZQ95nWClCHqzw8xqrst8RSIYidyhiXMsEEkkyKJHNRYgkkpZRJLmWJbJX9KdyiytyD5lwFw+ojv9JRBUtunvhVy7VsWJTOCdO5J3OGHOF6xhdijN4/Yosq5okPjF7SbUNuIRkgjCBaXyKvq7yr9bIIuLT5s37Wxb8G2NXGQ29Ujlx5IGOPuxsFjGvGDFnLGLrEhLNjp5kfLu1oIRrPiA9iFp+VldB7/Tbp0/6K5QORYoykY8ySHESEK9fdZtaFiCjdN3MK5eqHCvRC+pEaK4Mknh3xa8wdmgsvtseiKRjzn+tQ0lqraQjN/Z1j9yLGUwQy68p3Kuve/EmTJhpCcpoPNJ3ImOfp3bgHWEpbpvV4ssJJ71LlusfV27HJTZa1wtPzqbWAJAoveoTS21GaaocfAZQPah7AabDTQMaZSz7xckPlrmUPDf7bOQctvfHRoeueXk7vkXJbPavCxitKqQBSKXO4vu9SUCB/xvjPqUb0LBIUstG7bxn3Ff7471Ei3kd/s9RpBRszTOhAP/N5oldueNYH91XN1X1trfF/e3VkLleHNyjAI9BS36mzci2pAFA/o6LvUsQ3RpK2pQBTarDTayp1sgJDyodkdQW66h61jMUYl8wR4MpQS897ek71vgZogliS8VVa6rr3jA+uTLCY/DhzjmKlvjHIDzfJPUUqFc4LY0lo68Uh1opYb6dRVKKOEreO9kk2zZBJaaOLb3ghl2S180XHPw6oTi5NM/eOdr/uVovJtHDdfarvyc5tr4xS/taun1X/R8bwS0Pp8BG33f0rht2idtNsHDCOHUKHEn/aY8YHHQ4ZJk9EvKE8/qoA2ysnc0UUq1Hx1kSnQqgW7T2/JbwDi7QBRusa1bZC5oVlUs95Da7S0AnpPdakqyC2SX+9397ZUvq+vmakoL772+AW7XQEnj/oWqQT+iD6ZKoOw+Y/gt0Wv4AeNYsE286etLz7qOTbA04btrjb6BGjP7nxsX0+u2uRMhkxRpFGKWsFaASQJP4qwCMxWDJlT+qdbbnEYWzeukTiX8rsQUyPnieW6AGpAlHJSFkm6JvUpgR11f+uAM8DRmoZx7Jw28iXftMQ7zWcSTc7aMOLt5308c/+TXilwMsDKfW+B2gK2ChXPz6SoANJlQtFbkT7z3MPTP1QkfSO953AMhxBMjesbbI6ej/NwxjMgU/66uhE8J91BRi9T799TWxagJn3FVgLMFdIRmV3XeoC/WE+2HrMkNLzQdTi9A79ttSSRGBqS+8aMU+PUVIa5IFhWSo6GCdIVODnSjpFlERzbkmLCSa5YpuOBk0Swwm7lDFIU1Ddk3RPA6syJtEt6m7pIGEtzVzu6TZzZ197veF3ivJz9XXYEezRyK1BS8Xp9b4zLpVTNt1XbLZAfGCzD2ieNDfQ6sKU+ExitHbVocp6+kWz13wdfyEcCDqjDWOM9z4H/tvQlN6n3+PwTpMrDJH1syY8Rqaf4K7EJzHGDyoddUOw93qjgHH1mCGLOLC++yvz928Plf37tT+J/55x/IYOVwuAxHdmLbIomKuUD0SFvGECNud9UX+IzamtgdqfUekaSX5R2OOdc+Qw7c7jgV14t4ZWAPqBW4N+8VvK+xvs9PJ/A2go74nnxlyLxQNGh5pHhWZQTDCn9ko6jWsunrnPry3XcTgnzkZ6QEYSSMAg9TUlXYlymdmx0nEuWZOIn5/lzLE0eGrA84Dvk96Hdtll3YtrbQ+k6D49p80KZEohxSXtGtBgR3/p923DX/5VTbzvsVTomGj9+IhPr75kZN1Ta+i3gywVSHWJ7ernY2TXNT5kdTA3XobuW/khZ0LPuvnM0NcKk/Uia9i5VLoZIEumJe8T5KUKlitUNmU8Q+n4t/1n6Lx6Lx3KIks2de+TFWDqMTrNlMCR8rT0NdqUwATNco91kgnLLwsBsaWBVz8H5nDJYtqur8BTid2UJgGra3HvpIHgGgEkKVGUSOyCu0zqZyg9BgJPrhwS6LuUlgJaYXHhyJLYisxNkkptgqH/3R/kAUKaSmddgdA88Pex+xMwoBSeyT4ATg2WCjg1+IPYoioggSKBIQGjJ0YrWuwFGgmxUcM7KIotUTwohj1KGcHl9dX3ZH/RFj7J9y/r1JROnS8kjmMMq1wbP+r03Ul15jsbBYxrxg6+k2xJPWbM92Kqtw2PG35of8+22LOOgDrmJzSbom5vCjULMEn/utFBeRY3490cu/NZo+fTqEDSi1Sv5FWv7N4qpWUq739B6ED9UACSBggGZaBONtQgBJif9dkHb3znLHzaZz8IP+S/l50t0mu7NS15+ZCPr31mQO27tcRpCbwc4UrLUjpFQeOLmI4StMBElkH2TbdOdCwsqk2WPgtXAx39s+k+gJk7/GyHFC+3f7DkqkXSAk0ZGXc0YKnfHgBJi6nrpByOW5DXj/jPFQ3xnqdR8eKyZeapSy64eOem15tM5XHCZjLlX/AOpUiQzdr/JIFkDLI1BSTt8HV1LcbU8Tv0DDlntJAY29rquInCLhZEUIjAm6PLShPpKyN0Co1ZRq3gfYg+0VeiCyXeX5YFS9LZONGh6j9E17OS0X16znyQ2eG8MmlweiZtaxClpiCPMDVGfFW2C0bvBddtSQDHFAgToFkaGDUYx4xrksG/t7LHWNaaPDnbecM1TufGLwgYHQJJR/IYPaP1iJyAkyiYSyCZlqUla9NTpEQ8b1umyRBDQYINQIwCZh6g5vSH1MOv7nUJRvz3PpS2bvAS0fNHhQTzWKFmiNroooFT6x8UgG0M8kTBw3w3gpqW0pCIEzo96E5rG53avrsxxcOaMYP3BWOvS5sP7fni+/PbSrruVOzALfutrIvuPqaZUnHBkHLG7jU/bYU5eahaPGcFjL7oS6xRue94Ry6TPKpYYthXJADFAmwwaCDtHOf1fg5D1WDwixN5P2uXYE3nndGa7Cw+Hjj60qrWxYtHLpvyBTFAy4bIusTamAKtWIyipGUVoMU8NihdNe0lTaS+TnrKChsnu3bCIWAjgJMeCMks5F9Hz/nrOfOO+FWXzNqsjwxKXZ9lssR7rhlAaYxJ9TcO9feGnV6/qCXW5bK4aH7gwiWHX97FWRoo/GQcsjwJKTOQDSTzpyFLyY3H+2Rb4TZ31uA2cANcDIbEib5xO2/h6ajSaJPHc6FjyfEY+OLVsJMOeIyAxAfRJrBupWA1JWANLng1gLo6fb5fUIAqgHnMk5M7bOTTnAYrBzkmA82kyi4H+Q4wNBOE608L+QrEJeMecLY6GlRpgaAYJ6VxsJQjWToGVuKClSzvcyRrLbkWahWQNbKq4YzmLms/JLAlIM4yybNZcALYhB1j/neWFaWJdZkZkqzbxuQJ1Fc+MSkCgGqO+tvO6BkFoDkUNcH23UGn4vkD/4B95/4NY9/8c7ASBrxCsUmyQHvH5xAYWp5u0TtRN9qYphTtz/eQ378xx5Q6IDy8cj3DyLcKtdmss2/XKSBV1SZ9NgoYKYe1Y4e8CIaa7i/PP6VYjqtORLfSGJ/pSDYoqLDBqtR7oZbwfCV8tZ/RsXmWk+hqYbLMYJXzwJEU/8pQ4jl8EyB6orYyisg4Ym4vMJRA8Do49uqANKoiFANKowzR4Cn6t7E7QQE7c5vL+V4yzuticQgCKwK1uIAgpiLJM86CTNIZ7zaTIgNJrCpZwoRIM9lLNu1puTi4pqriavJHKEtByjiTFOO8ItEgp+xyz4CPq0bfd8Vr2x9YlYAkp9LqZI651dDvUv2b1vfOLZC0XIkWSNEMefegx3ocvvCkNT0qIft28t4j09poOGxMDgg3aYRtwS+RYWPxzxC3O+dA0a4CsxrCIMnLwKgd/aquawLr4f2gezWtYJ1LIOkvnX9Y1wryRVAjhZeCNabBqlClQDW2rO8vmMsvzzWbXO12qxmbqmioYXEwAtbyOJTvAgFrmktO7NgSoqykxn1Pu/gYjR5gm/7iy0DGj9DX4BkjDQLM1kQ1VncehLcHn44Ptz9UZdB9w4c47/HDQqKgr3P3nbiVvtJnkL6Bx2eMJiaYUldUujTHUPSd6Pjy9Y1MLnFSYv9uT2HVpgzBjQbGdWN230VAvMcYO637jA8eL5Rp3SnsSRfsuA5FWtmUUrfzjm+dVuzQY4+kdyRuoxmlbl07vSOYzC2wbuJzSN4cBkQTBA2wDAFn9LrPcv3JwZBNlcQGpWKx+pJSJmRKg1pZBRfEUirjdVIkIKtLIDes1y917ge5dh3glkLuWo8rHeCJmnIolu5UhrUS13xnye8E7GGXvTLgyHRnyMEAFiwEUp0gh/eCfHwhZLdBtN0IAlfpU1a+hmb/n0nSJyzeeVwMvwPDwgijHJT7PVOtMcCcVWAUTmpBLRgG6eZK1ITfsxvBSpcNIWdlpfNVHy4fkXssUL52vAWsphzM8sC1IQNWjWpkRLqsc0v6EylREurcEMAV6CKfTNAtg00GPz0gmnzow/i0dy6gS2mqBmc+cyK61S1WcykXvIQMODpwr69L9A06PmhGycTXNXAsJmd2elSO2ZT0NxoYKZO1Y4eeLiFvZVwc1v2lhfqAY+Oz4URcyRi7SslY5smQHruLxppV/WGIy37DmWKAfz94zPui/pisUeXpxcnzxWpKyDsFU62IVCa3AjzVP1RuaddDJlfoa9oRTRt7DVk5d2qeN4qiwOmnaFy3ORYtT8qR2RLIHmWQTi2kU5EDp/RqSAIxerXxY0iaRDMPzBVt3y/wQKw3cifeX+V7LepynvnUso/AsGDysf1zk2lTRsO2d76xFigo9nsjr/bgoYOzQr5vFMa17MyQLpmPCYUwZ2cNpslasERP/Z3GUB+wN7MSOpRfCB1zkysqhkafDc05rwD0zufdR+DOI55UV8pa1+P0F09Drw2eNi0kDXoqJ0/fqOaOZ2wJVGL+6Yv+tI+gUO5YHC8tE7wjPeTPf/XXn5IeaxSQ13d7DG0aYop1+CYBIyW2ZuyQ3wH4OYCf9Jgxf6qZQe0xqJZxzIRk3/GP9NA+w74C10DBApYU9VxQUx8BTZ7j93rOzh9OO6oj0SuaYoq+8THVByxLmiX6CCC5BojVEWLmUNoExADho02pfcT88EjaNU+XmQaCzdHsuji+8xD8+/GFYCcOgsRVADXe7/KHbx6Tk+ehk+vg9/ZduKhQJ/7kqRU720x8BMamTj6m33Hf2MzeltHX2gJrxw5ZLoG+QSZMXt3j5QVXmplGwXXdcdg/buFZR6IiEJl9pAvp78OGFOM83WDs5nlqQOLB0XcikW3CoXOvQ0XLGm/06kmiR32uRFqjpOenvu7r6M0a5EzRsrknZKoLwLNg8QawkvXKouWtFQHSezOr6L5ZJaVrr5IPbVvuX/kIPBls47prk4FRgeOYIbcBOE8yXNNDzP8dm5nTR607ChU8jjMZMCKI4rBxZdvkp42AyH6P+b3n15e5dbseL6VNqmCHlS3/J4vXu8qpWrvA5FTw+iySnGomNwpC5TOh3hsT5DG0hkvc3eVJLNjUyjhn4xjCWPsuhBYfP70zpi07g0lMBvDS5GP7H7Kp+Wx7b/NqgTVjhrwFhr38UjHgje4z5u/XXinXHYVdEMNPLaB3ofhV5txgMUXlgp040WGvniXPeXJkJP9JY0ulvzVSbRNVPmOhkpGXrN4PRN60yoEu9/GO7VYX1C4kmoQ1u54opXEYNs/CLl85h8WaOrDH1khcO5z8lzv4x/+3d7WxTZVR+Dn9WBk4BjLWDdmmyBC2zg9C4g+/YIUpxAxKVIjGIKUgiBKJP4zEECDRxBh/kCEJbN0w/jAGYkdggsC6KUJUVJB1w8wfaiewdW5B0cDW9R7z9mN00G39uGs3ec/P3vOec97nNufe956vybUYkIIzHHY3uexY2G/l7VxQvFkheh+MCwro1dyGpi8Tkzjyqz0Lix5lRXMy4ON4V46zOeLb2MhbMryGXht2XmNsz7RDxFBuIWutexcYGwH8WG3JH7Qj+vCaJMdoQsBjNp1lxoNhNnUbnS4Ru/nfUffCGZm9yngHAY+H5eKLfV7TMy+6s6H5VLI3ndAbY8hYj7n4KWaqgnhKEY4R086pzqajo/Ej/y+LZxom9o5rBAefxoQyY73reLKBj1afdy0+01di0COytdZ9HAzRzaKz2pLnT42SNLYR4Geh9XSZPARkMOMKCK1E+Cq73rVlbO9saOuDgd1dIPF/7qeuNEU3b3LjuahLkNXASBXHKAzxzC+6gzUa0ZVikz/7HvwbgQ5B4c97DPgu74vmiG88Yi0XFaW1G1GY29AS95EzGjDaF5aUaBSuYKA/tKFVaE5WY9PP0axPNg/bMKeP8LK+Eq8PpntNrdvFjGJxbJmQNn5SxZIpIuVQkkRgTCIgSiH/LDV9qADrb2yATxqdzeJtMmmkmmMMWdxuLplB4PVgrAaQFfqdwJdEWhgBfzHoKqCkgWkSCCLl6z4Rp0g36HMyjpwdkZGIHWbTWQw8mgjT/s02XJ8SS5egpN0ZkcxrwzZinNHZMUjLcsBa2+YGc57/AUPaR2qW3XU6mTZKXRIBtREQzrGz1HSCgfBUm+U3B3nV1hsuT3XHGBL+6/y7x2VQxpNM/JgCiNrqB4JVVAP3w+gE+DS0dMrX11szrbE1rijScCB1mIv3gGld2FNIYdZsyGlo2jvc2lRcF8cpbyZa9T24nz4WtRSRyepwi5TIQOcK0KZqS15FKuyVOiUCaiLQZS4u6lPIFQrcMqEup971tJo6hpI1Yo4xktKuxTMn9vWMm8qKL12rV7qv6HxdhTH0dEwEFM8Ck5UJ9qAD+VYL2pLlPO9MROZIru2x4RkwrAY7lgylx+po2wZQAUi5zhpNXU359MMjaZeULREIIbC61r0CjPVareatqvLp38SDzKX5s7J02rSlYCXdpyiHc8PaGd4UgOoyOl39J9B4dMWyJqmOMRbD1ObtNM+exay1KMyNOQ0twaESamtRRx6/BoP3Gs4zY7vBjrhatqtjiZQiERgcAavDLYZQlfm/4hB9YF+WJ/obRk2dpXPm+qA5RoFKSXHiqTc6m/oDL+1m0xlizAtc47+NzubMqIUnyHjbOMYEcUrq8l4b9hBhpY6QS3v9zWgkSQRGHQJWh1t89vI7NQKO2y35wklGTZ5SU2N4IJSAq41TXJOf2w9fMFAqar8DrTQZJ4wNrqTl6UrHGPVtTA6jdy22M2MrAe/oq/B2crRKLRKB2BGwOtzioS16WAi6XG3JnxaLlI5Sk+iJ4m9PxODNOsKp9sv8U3YWilmnEbOlZgTliT7nZVn1TSdikZ8Ir3SMiaCn4lp+ERO8BohKolUEdOv6cC/tiz9zX0XTpCiJQEQErI62VoALQxcV+B7aZ7nnXLRweUpNFxiY7XeMGlomBjURaVcCLKaQ3hh/ybzV2NAcPpslWhVx80nHGDd06izkddB7FYiB1TsAFPilEjamVWK3OhqkFInAyCCw5qB7NyvYECbdXm3Jt0WrLdiMpmYI/otEeCO73vVptDLV4pOOUS0kY5TjXYs3WfGXfC0CBb7TBOmTtCo8H6M4yS4RSDoCLx1qK9T4+Dw40Pzc39Bcy3M/Ki+IulCjw1zygsh7DpY/iubevzPoay376to7cMTU0hI+CSNpe5SOMWlQD1TktaGOcUsqzg/6HjwxVN5iisyVaiUCERFYc/CPVayw3T9AQxDzgerlBTcGTY1R3KRjTNGN67NhnQLsCakn4KguHSuoArKkL0X3RKqNDwGrw11GoPcU4gM1S/Pe7R+dG5+4UbFKOsYU3QZ+BTneXlxk4DIBO/RVqByNTTdSBI9UKxFIKQLSMaYQ/t7VeFj/D76n/ZGn5aXQNKlaInBbI/Af7NFDa4Ye3CIAAAAASUVORK5CYII="},48136:function(gn,kt,ee){"use strict";var ne=Object.defineProperty,xe=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ce=(a,y,b)=>y in a?ne(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,ae=(a,y)=>{for(var b in y||(y={}))fe.call(y,b)&&ce(a,b,y[b]);if(Ce)for(var b of Ce(y))he.call(y,b)&&ce(a,b,y[b]);return a},se=(a,y)=>xe(a,Me(y)),ve=a=>typeof a=="symbol"?a:a+"",ue=(a,y)=>{var b={};for(var E in a)fe.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&Ce)for(var E of Ce(a))y.indexOf(E)<0&&he.call(a,E)&&(b[E]=a[E]);return b};function pe(a){return Array.isArray(a)}var oe={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 ge(){return"window"in globalThis&&"document"in globalThis}function ye(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function we(){return typeof navigator.vibrate=="function"}function Be(){var a,y;if(!ge())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 ze(){if(!ge())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 $e(){return HTMLElement.prototype.hasOwnProperty("popover")}var Le={strings:oe,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Le._locale||(Le._locale=ge()?navigator.language.slice(0,5):"en-US"),Le._locale},set locale(a){Le._locale=a,Le._numberFormatter=void 0,Le.dirty=!0},get numberFormatter(){return Le._numberFormatter||(Le._numberFormatter=new Intl.NumberFormat(Le.locale)),Le._numberFormatter},merge(a,y){if(typeof a=="string"&&y)Le.strings[a]=ae(ae({},Le.strings[a]),y),Le.dirty=!0;else for(const b of Object.keys(a))Le.merge(b,a[b])},get dirty(){return Le._dirty},set dirty(a){Le._dirty||Le._dirty===a||(Le._dirty=!0,setTimeout(()=>{Le._dirty=!1,this._subscribers.forEach(y=>y==null?void 0:y())},0))},subscribe(a){return Le._subscribers.push(a),Le._subscribers.length-1},unsubscribe(a){a<0||a>=Le._subscribers.length||(Le._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 te=Ne(E);te&&b.setAttribute("data-tooltip",te)}}y=a.querySelectorAll("[data-l10n-arial-label]");for(const b of y){const E=b.getAttribute("data-l10n-arial-label");if(E){const te=Ne(E);te&&b.setAttribute("aria-label",te)}}}};function Ne(a,...y){if(a===void 0)return;let b="";const E=Le.locale;Le.strings[E]&&(b=Le.strings[E][a]);const te=E.slice(0,2);if(!b&&Le.strings[te]&&(b=Le.strings[te][a]),b||(b=Le.strings.en[a]),!b)return;const le=/(%@|%([0-9]+)\$@)/g;let be=le.exec(b),He=0;for(;be;){if(y[He++]){const nt=be[2]?parseInt(be[2],10)-1:He-1;let dt=y[nt];typeof dt=="number"&&(dt=Le.numberFormatter.format(dt)),b=b.replace(be[1],dt)}be=le.exec(b)}return b=b.replace(/%%/g,"%"),b}var Re={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},Se={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Ie={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"},Ae={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"},it={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"},Ue={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 gt(a){var y,b,E,te,le,be;const He=a.split("!");let Ye,nt,dt,Mt=255,Zt=255,sn=255,bn=-1;const Gn=He.length>0&&He[0].startsWith("-");Gn&&(He[0]=He[0].slice(1));for(let Gr=0;Gr<He.length;Gr++){Ye=Mt,nt=Zt,dt=sn;const Wn=(y=He[Gr].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],yr=Wn==null?void 0:Wn.toLowerCase(),Qr=Wn&&(be=(le=(te=(E=(b=Ae[yr])!=null?b:Ae[it[Wn]])!=null?E:Se[Wn])!=null?te:Ue[Wn])!=null?le:Re[Wn])!=null?be:He[Gr].trim();let Ir=Qr.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(Ir!=null&&Ir[1]&&Ir[2]&&Ir[3])Mt=Math.max(0,Math.min(255,Number.parseInt(Ir[1],16))),Zt=Math.max(0,Math.min(255,Number.parseInt(Ir[2],16))),sn=Math.max(0,Math.min(255,Number.parseInt(Ir[3],16)));else if(Ir=Qr.match(/^#([\da-f]{3})$/i),Ir!=null&&Ir[1]){const Ni=Number.parseInt(Ir[1][0],16),Yi=Number.parseInt(Ir[1][1],16),$i=Number.parseInt(Ir[1][2],16);Mt=Math.max(0,Math.min(255,Ni*16+Ni)),Zt=Math.max(0,Math.min(255,Yi*16+Yi)),sn=Math.max(0,Math.min(255,$i*16+$i))}else if(Ir=Qr.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),Ir!=null&&Ir[1]&&Ir[2]&&Ir[3])Mt=Math.max(0,Math.min(255,Number.parseInt(Ir[1]))),Zt=Math.max(0,Math.min(255,Number.parseInt(Ir[2]))),sn=Math.max(0,Math.min(255,Number.parseInt(Ir[3])));else return;bn>=0&&(Mt=(1-bn)*Mt+bn*Ye,Zt=(1-bn)*Zt+bn*nt,sn=(1-bn)*sn+bn*dt,bn=-1),Gr+1<He.length&&(bn=Math.max(0,Math.min(100,Number.parseInt(He[++Gr])))/100)}return bn>=0&&(Mt=bn*Mt+(1-bn)*Ye,Zt=bn*Zt+(1-bn)*nt,sn=bn*sn+(1-bn)*dt),Gn&&(Mt=255-Mt,Zt=255-Zt,sn=255-sn),"#"+("00"+Math.round(Mt).toString(16)).slice(-2)+("00"+Math.round(Zt).toString(16)).slice(-2)+("00"+Math.round(sn).toString(16)).slice(-2)}function Ve(a){var y,b;return a=a.trim(),(b=(y=Ie[a.toLowerCase()])!=null?y:Ie[it[a]])!=null?b:gt(a)}function Tt(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 ct(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 Ot(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 te=E<=.5?E*(b+1):E+b-E*b,le=E*2-te;return{r:Math.round(255*ct(le,te,y+2)),g:Math.round(255*ct(le,te,y)),b:Math.round(255*ct(le,te,y-2))}}function We(a){return a<0?0:a>255?255:Math.round(a)}function lt(a){const{r:y,g:b,b:E}=a;let te=((1<<24)+(We(y)<<16)+(We(b)<<8)+We(E)).toString(16).slice(1);return te[0]===te[1]&&te[2]===te[3]&&te[4]===te[5]&&te[6]===te[7]&&(te=te[0]+te[2]+te[4]),"#"+te}function ut(a){let{r:y,g:b,b:E}=a;y=y/255,b=b/255,E=E/255;const te=Math.min(y,b,E),le=Math.max(y,b,E),be=le-te;let He,Ye;le===te?He=0:y===le?He=(b-E)/be:b===le?He=2+(E-y)/be:E===le&&(He=4+(y-b)/be),He=Math.min(He*60,360),He<0&&(He+=360);const nt=(te+le)/2;return le===te?Ye=0:nt<=.5?Ye=be/(le+te):Ye=be/(2-le-te),{h:He,s:Ye,l:nt}}function St(a){let y=Tt(a);if(!y)return a;let{h:b,s:E,l:te}=ut(y);return E+=.1,te-=.1,lt(Ot({h:b,s:E,l:te}))}var qe={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"},Ze={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},wt=[{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 Wt(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 te of wt)if((!y||te.variant===y)&&(!b||te.style===b)&&E>=te.offset&&E<te.offset+te.len){const le=te.start+E-te.offset;return String.fromCodePoint(Ze[le]||le)}return a}function Kt(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in Ze)if(Ze[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of wt)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 _t(a){var y;let b="";for(const E of a){if("{}<>[]$&#^_%:'\u02DC".includes(E)){b+=E;continue}const te=(y=E.codePointAt(0))!=null?y:0;let le=qe[te];if(le)le.startsWith("\\")?b+=le+" ":b+=le;else{const{char:be,variant:He,style:Ye}=Kt(te);switch(le=be,He){case"double-struck":le=`\\mathbb{${le}}`;break;case"fraktur":le=`\\mathfrak{${le}}`;break;case"script":le=`\\mathscr{${le}}`;break;case"sans-serif":le=`\\mathsf{${le}}`;break;case"monospace":le=`\\mathtt{${le}}`;break;case"calligraphic":le=`\\mathcal{${le}}`;break}switch(Ye){case"bold":le=`\\mathbf{${le}}`;break;case"italic":le=`\\mathit{${le}}`;break;case"bolditalic":le=`\\mathbfit{${le}}`;break}b+=le}}return b}function vt(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var jt={},yn=ae({},qe),Xt={},Ln={},pn={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}"},hn={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}},un={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}},Xe={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:un},"amsmath.sty":{package:hn,primitive:!0},"texvc.sty":{package:pn,primitive:!1}},ke={" ":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},_e=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,Te,Fe;ze()?(Te=new RegExp("\\p{Letter}","u"),Fe=new RegExp("[0-9\\p{Letter}]","u")):(Te=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,Fe=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function me(a,y,b="mord",E){y!==void 0&&(jt[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},yn[y]||(yn[y]=a))}function at(a,y,b){if(typeof a=="string"){for(let E=0;E<a.length;E++){const te=a.charAt(E);me(te,te.codePointAt(0))}return}for(const[E,te,le,be]of a)me(E,te,le!=null?le:y,be!=null?be:b)}function Pt(a,y){for(let b=a;b<=y;b++)me(String.fromCodePoint(b),b)}function Qe(a){var y;return(y=Ln[a])!=null?y:null}function Je(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const te=[];for(const be in Xt)be.startsWith(y)&&!Xt[be].infix&&te.push({match:be,frequency:(b=Xt[be].frequency)!=null?b:0});for(const be in jt)be.startsWith(y)&&te.push({match:be,frequency:(E=jt[be].frequency)!=null?E:0});const le=y.substring(1);for(const be of Object.keys(a.options.macros))be.startsWith(le)&&te.push({match:"\\"+be,frequency:0});return te.sort((be,He)=>{var Ye,nt;return be.frequency===He.frequency?be.match.length===He.match.length?be.match<He.match?-1:1:be.match.length-He.match.length:((Ye=He.frequency)!=null?Ye:0)-((nt=be.frequency)!=null?nt:0)}),te.map(be=>be.match)}function xt(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function ot(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:xt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...ot(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:xt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...ot(b[E]))}return y}function mt(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 Nt(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)Ln[E]=b}function rn(a,y,b){typeof a=="string"&&(a=[a]);const te={tabular:!0,params:ot(y),createAtom:b};for(const le of a)Ln[le]=te}function It(a,y,b){var E,te;b||(b={});const le={definitionType:"function",params:ot(y),ifMode:b.ifMode,isFunction:(E=b.isFunction)!=null?E:!1,applyMode:b.applyMode,infix:(te=b.infix)!=null?te:!1,parse:b.parse,createAtom:b.createAtom,applyStyle:b.applyStyle,serialize:b.serialize,render:b.render};if(typeof a=="string")Xt["\\"+a]=le;else for(const be of a)Xt["\\"+be]=le}var Qt;function dn(a){return Qt||(Qt=Lt(Xe)),a?Lt(ae(ae({},Qt),a)):Qt}function At(a,y){var b,E,te,le;if(typeof a=="string"){let be=0;const He=a;return/(^|[^\\])#1/.test(He)&&(be=1),/(^|[^\\])#2/.test(He)&&(be=2),/(^|[^\\])#3/.test(He)&&(be=3),/(^|[^\\])#4/.test(He)&&(be=4),/(^|[^\\])#5/.test(He)&&(be=5),/(^|[^\\])#6/.test(He)&&(be=6),/(^|[^\\])#7/.test(He)&&(be=7),/(^|[^\\])#8/.test(He)&&(be=8),/(^|[^\\])#9/.test(He)&&(be=9),{expand:(b=y==null?void 0:y.expand)!=null?b:!0,captureSelection:(E=y==null?void 0:y.captureSelection)!=null?E:!0,args:be,def:He}}return ae({expand:(te=y==null?void 0:y.expand)!=null?te:!0,captureSelection:(le=y==null?void 0:y.captureSelection)!=null?le:!0,args:0},a)}function Lt(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 te of Object.keys(E.package))y[te]=At(E.package[te],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=At(E)}return y}function qt(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=Xt[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=jt[a]:ke[a]&&(b={definitionType:"symbol",type:"mord",codepoint:ke[a]})}else if(y==="math"){if(b=jt[a],!b&&a.length===1){const E=Jt("math",a.codePointAt(0));return E.startsWith("\\")?se(ae({},qt(E,"math")),{command:E}):null}}else ke[a]?b={definitionType:"symbol",type:"mord",codepoint:ke[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function Tn(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function Jt(a,y){if(y===void 0)return"";if(a==="math"&&yn[y])return yn[y];if(a==="text"){const b=Object.keys(ke).find(E=>ke[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var On=[0,.68889,0,0,.72222],zn=[0,.68889,0,0,.66667],qn=[0,.68889,0,0,.77778],Xn=[0,.68889,0,0,.61111],vr=[.16667,.68889,0,0,.77778],_r=[0,.68889,0,0,.55556],Qn=[0,0,0,0,.25],Cr=[0,.825,0,0,2.33334],ni=[0,.9,0,0,2.33334],Jr=[0,.68889,0,0,.54028],Yn=[-.03598,.46402,0,0,.5],mr=[-.13313,.36687,0,0,1],si=[.01354,.52239,0,0,1],or=[.01354,.52239,0,0,1.11111],ii=[0,.54986,0,0,1],ki=[0,.69224,0,0,.5],gi=[0,.43056,0,0,1],Li=[.08198,.58198,0,0,.77778],ui=[.19444,.69224,0,0,.41667],dr=[.1808,.675,0,0,1],Hr=[.19444,.69224,0,0,.83334],Cn=[.13667,.63667,0,0,1],Ee=[-.064,.437,0,0,1.334],je=[.08167,.58167,0,0,.77778],Oe=[0,.69224,0,0,.72222],De=[0,.69224,0,0,.66667],Ke=[-.13313,.36687,0,0,.77778],et=[.06062,.54986,0,0,.77778],rt=[0,.69224,0,0,.77778],Dt=[.25583,.75583,0,0,.77778],Ft=[.25142,.75726,0,0,.77778],Bt=[.20576,.70576,0,0,.77778],Ct=[.30274,.79383,0,0,.77778],Ht=[.22958,.72958,0,0,.77778],Ut=[.1808,.675,0,0,.77778],on=[.13667,.63667,0,0,.77778],cn=[.13597,.63597,0,0,.77778],Rt=[.03517,.54986,0,0,.77778],Vt=[0,.675,0,0,.77778],In=[.19444,.69224,0,0,.61111],wn=[0,.54986,0,0,.76042],Nn=[0,.54986,0,0,.66667],Rn=[.0391,.5391,0,0,.77778],Jn=[.03517,.54986,0,0,1.33334],Sn=[.38569,.88569,0,0,.77778],Un=[.23222,.74111,0,0,.77778],zt=[.19444,.69224,0,0,.77778],fn=[0,.37788,0,0,.5],vn=[0,.54986,0,0,.72222],An=[0,.69224,0,0,.83334],En=[.11111,.69224,0,0,.66667],kn=[.26167,.75726,0,0,.77778],Mn=[.48256,.98256,0,0,.77778],Bn=[.28481,.79383,0,0,.77778],Kn=[.08167,.58167,0,0,.22222],Vn=[.08167,.58167,0,0,.38889],cr=[0,.43056,.04028,0,.66667],fr=[.41951,.91951,0,0,.77778],$r=[.24982,.74947,0,0,.38865],Mr=[.08319,.58283,0,0,.75623],wr=[0,.10803,0,0,.27764],ei=[0,.47534,0,0,.50181],Xr=[.18906,.47534,0,0,.50181],Zr=[0,.69141,0,0,.50181],Lr=[.24982,.74947,0,0,.27764],Or=[0,.69141,0,0,.21471],Wr=[.25,.75,0,0,.44722],Pr=[0,.64444,0,0,.575],di=[.08556,.58556,0,0,.89444],Ri=[0,.69444,0,0,.89444],Vr=[0,.68611,0,0,.9],er=[0,.68611,0,0,.86944],Zn=[.25,.75,0,0,.575],Dr=[.25,.75,0,0,.31944],Sr=[0,.69444,0,0,.63889],ri=[0,.69444,0,0,.31944],yi=[0,.44444,0,0,.63889],jr=[0,.44444,0,0,.51111],Bi=[0,.69444,0,0,.575],_i=[.13333,.63333,0,0,.89444],oo=[0,.44444,0,0,.31944],Fr=[0,.69444,0,0,.86944],Nr=[0,.68611,0,0,.69166],bi=[0,.68611,0,0,.83055],hi=[0,.68611,0,0,.89444],Xi=[0,.69444,0,0,.60278],mo=[.19444,.69444,0,0,.51111],Co=[0,.69444,0,0,.83055],ji=[-.10889,.39111,0,0,1.14999],_o=[.19444,.69444,0,0,.575],vo=[.19444,.69444,0,0,1.14999],Er=[.19444,.69444,0,0,.70277],Ar=[.05556,.75,0,0,.575],kr=[0,.68611,0,0,.95833],Kr=[.08556,.58556,0,0,.76666],Hi=[-.02639,.47361,0,0,.575],eo=[0,.44444,0,0,.89444],io=[0,.55556,0,0,.76666],ao=[-.10889,.39111,0,0,.89444],to=[.00222,.50222,0,0,.89444],Mo=[.19667,.69667,0,0,.89444],Yo=[.08556,.58556,0,0,1.14999],Ho=[0,.69444,0,0,.70277],La=[-.02778,.47222,0,0,.575],ha=[.25,.75,0,0,.51111],Ko=[-.13889,.36111,0,0,1.14999],Oo=[.19444,.69444,0,0,1.02222],Wi=[.12963,.69444,0,0,.89444],ta=[.19444,.69444,0,0,.44722],Zo=[0,.64444,.13167,0,.59111],no=[.19444,.64444,.13167,0,.59111],ti=[0,.68611,.17208,0,.8961],Fi=[.19444,.44444,.105,0,.53222],Ii=[0,.44444,.085,0,.82666],Ci=[0,.69444,.06709,0,.59111],ro=[0,.69444,.12945,0,.35555],qi=[0,.69444,0,0,.94888],Bo=[0,.69444,.11472,0,.59111],na=[0,.68611,.10778,0,.88555],ra=[0,.69444,.07939,0,.62055],fa=[0,.69444,.12417,0,.30667],xo=[0,.64444,.13556,0,.51111],go=[.19444,.64444,.13556,0,.51111],ca=[0,.68333,.16389,0,.74333],ua=[.19444,.43056,.08847,0,.46],ba=[0,.43056,.07514,0,.71555],da=[0,.69444,.06646,0,.51111],xl=[0,.69444,0,0,.83129],Cs=[0,.69444,.1225,0,.51111],ws=[0,.68333,.09403,0,.76666],Ja=[0,.68333,.11111,0,.76666],Sl=[0,.69444,.06961,0,.51444],Es=[0,.69444,0,0,.27778],Pa=[.25,.75,0,0,.38889],Da=[0,.64444,0,0,.5],Xs=[0,.69444,0,0,.77778],Zs=[0,.68333,0,0,.75],Ps=[0,.68333,0,0,.77778],ul=[0,.68333,0,0,.68056],Ns=[0,.68333,0,0,.72222],_a=[.25,.75,0,0,.5],qa=[.25,.75,0,0,.27778],Wo=[0,.69444,0,0,.5],Js=[0,.69444,0,0,.55556],Cl=[0,.43056,0,0,.44445],qs=[0,.43056,0,0,.5],wo=[.19444,.43056,0,0,.55556],so=[0,.43056,0,0,.55556],ia=[.08333,.58333,0,0,.77778],va=[0,.43056,0,0,.27778],oa=[0,.66786,0,0,.27778],za=[0,.69444,0,0,.75],$a=[0,.66786,0,0,.5],hs=[0,.68333,0,0,.625],Wa=[.19444,.69444,0,0,.44445],Ms=[0,.69444,0,0,.72222],ks=[.19444,.69444,0,0,.5],Na=[.19444,.69444,0,0,1],mc=[.011,.511,0,0,1.126],dl=[.19444,.69444,0,0,.61111],hl=[.05556,.75,0,0,.5],Ol=[0,.68333,0,0,.83334],Rl=[.0391,.5391,0,0,.66667],wl=[-.05555,.44445,0,0,.5],vc=[0,.43056,0,0,.77778],il=[0,.55556,0,0,.66667],oc=[-.03625,.46375,0,0,.77778],ol=[-.01688,.48312,0,0,.77778],fl=[.0391,.5391,0,0,1],To=[0,.69444,0,0,.61111],Uo=[-.03472,.46528,0,0,.5],Xo=[.25,.75,0,0,.44445],fs=[-.14236,.35764,0,0,1],ja=[.244,.744,0,0,.412],Ws=[.19444,.69444,0,0,.88889],is=[.12963,.69444,0,0,.77778],Ba=[.19444,.69444,0,0,.38889],Aa=[.011,.511,0,0,1.638],Qs=[.19444,.69444,0,0,0],ps=[0,.44444,0,0,.575],Pl=[.19444,.44444,0,0,.575],Dc=[0,.68611,0,0,.75555],al=[0,.69444,0,0,.66759],cu=[0,.68611,0,0,.80555],Qc=[0,.68611,.08229,0,.98229],gc=[0,.68611,0,0,.76666],uu=[0,.44444,0,0,.58472],Ac=[.19444,.44444,0,0,.6118],yc=[.19444,.43056,0,0,.5],Ic=[0,.68333,.02778,.08334,.76278],pl=[0,.68333,.08125,.05556,.83125],El=[0,.43056,0,.05556,.48472],Nl=[.19444,.43056,0,.08334,.51702],du=[.25,.75,0,0,.42778],Qa=[0,.69444,0,0,.55],Ml=[0,.69444,0,0,.73334],Vl=[0,.69444,0,0,.79445],hu=[0,.69444,0,0,.51945],Tc=[0,.69444,0,0,.70278],Oc=[0,.69444,0,0,.76389],ac=[.25,.75,0,0,.34306],Gl=[0,.69444,0,0,.56111],Iu=[0,.69444,0,0,.25556],Ui=[.19444,.45833,0,0,.56111],fu=[0,.45833,0,0,.56111],Bl=[0,.69444,0,0,.30556],pu=[0,.69444,0,0,.58056],el=[0,.69444,0,0,.67223],Yl=[0,.69444,0,0,.85556],ml=[0,.69444,0,0,.55834],Ls=[0,.65556,.11156,0,.5],Fo=[0,.69444,.08094,0,.70834],Ia=[.17014,0,0,0,.44445],eu=[0,.69444,.0799,0,.5],Ds=[0,.69444,0,0,.73752],Tu=[0,.69444,.09205,0,.5],bs=[0,.69444,.09031,0,.77778],kl=[0,.69444,.07816,0,.27778],bc=[0,.69444,.00316,0,.5],pt=[.19444,.69444,0,0,.83334],bt=[.05556,.75,0,0,.83334],$t=[0,.75,0,0,.5],Gt=[.125,.08333,0,0,.27778],ln=[0,.08333,0,0,.27778],Ge=[0,.65556,0,0,.5],st=[0,.69444,0,0,.47222],ht=[0,.69444,0,0,.66667],Yt=[0,.69444,0,0,.59722],en=[0,.69444,0,0,.54167],nn=[0,.69444,0,0,.70834],tn=[.25,.75,0,0,.28889],mn=[0,.69444,0,0,.51667],_n=[0,.44444,0,0,.44445],Dn=[.19444,.44444,0,0,.51667],tr=[0,.44444,0,0,.38333],Hn=[0,.44444,0,0,.51667],nr=[0,.69444,0,0,.83334],jn=[.35001,.85,0,0,.45834],lr=[.35001,.85,0,0,.57778],ur=[.35001,.85,0,0,.41667],qr=[.35001,.85,0,0,.58334],pr=[0,.72222,0,0,.55556],Yr=[1e-5,.6,0,0,.66667],wi=[1e-5,.6,0,0,.77778],ar=[.25001,.75,0,0,.94445],Br=[.306,.805,.19445,0,.47222],$n=[.30612,.805,.19445,0,.47222],rr=[.25001,.75,0,0,.83334],br=[.35001,.85,0,0,.47222],pi=[.25001,.75,0,0,1.11111],Ki=[.65002,1.15,0,0,.59722],ir=[.65002,1.15,0,0,.81111],gr=[.65002,1.15,0,0,.47222],oi=[.65002,1.15,0,0,.66667],xr=[0,.75,0,0,1],mi=[.55001,1.05,0,0,1.27778],Di=[.862,1.36,.44445,0,.55556],zi=[.86225,1.36,.44445,0,.55556],zo=[.55001,1.05,0,0,1.11111],Vi=[.65002,1.15,0,0,.52778],Jo=[.65002,1.15,0,0,.61111],co=[.55001,1.05,0,0,1.51112],Lo=[.95003,1.45,0,0,.73611],Ro=[.95003,1.45,0,0,1.04445],xi=[.95003,1.45,0,0,.52778],li=[.95003,1.45,0,0,.75],Ei=[0,.75,0,0,1.44445],Oi=[.95003,1.45,0,0,.58334],fi=[1.25003,1.75,0,0,.79167],So=[1.25003,1.75,0,0,1.27778],Mi=[1.25003,1.75,0,0,.58334],Ai=[1.25003,1.75,0,0,.80556],lo=[0,.825,0,0,1.8889],yo=[1.25003,1.75,0,0,.63889],Ua=[.64502,1.155,0,0,.875],Ta=[1e-5,.6,0,0,.875],Gi=[-99e-5,.601,0,0,.66667],uo=[.64502,1.155,0,0,.66667],pa=[1e-5,.9,0,0,.88889],Po=[.65002,1.15,0,0,.88889],bo=[.90001,0,0,0,.88889],os=[-.00499,.605,0,0,1.05556],fo=[0,.12,0,0,.45],Tr=[0,.61111,0,0,.525],Eo=[.08333,.69444,0,0,.525],aa=[-.08056,.53055,0,0,.525],Oa=[-.05556,.55556,0,0,.525],Zi=[0,.43056,0,0,.525],$o=[.22222,.43056,0,0,.525],es=[0,0,0,0,.525],Us={"AMS-Regular":{32:Qn,65:On,66:zn,67:On,68:On,69:zn,70:Xn,71:qn,72:qn,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:qn,76:zn,77:[0,.68889,0,0,.94445],78:On,79:vr,80:Xn,81:vr,82:On,83:_r,84:zn,85:On,86:On,87:[0,.68889,0,0,1],88:On,89:On,90:zn,107:_r,160:Qn,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:_r,295:Jr,710:Cr,732:ni,770:Cr,771:ni,989:je,1008:cr,8245:[0,.54986,0,0,.275],8463:Jr,8487:On,8498:_r,8502:zn,8503:[0,.68889,0,0,.44445],8504:zn,8513:[0,.68889,0,0,.63889],8592:Yn,8594:Yn,8602:mr,8603:mr,8606:si,8608:si,8610:or,8611:or,8619:ii,8620:ii,8621:[-.13313,.37788,0,0,1.38889],8622:mr,8624:ki,8625:ki,8630:gi,8631:gi,8634:Li,8635:Li,8638:ui,8639:ui,8642:ui,8643:ui,8644:dr,8646:dr,8647:dr,8648:Hr,8649:dr,8650:Hr,8651:si,8652:si,8653:mr,8654:mr,8655:mr,8666:Cn,8667:Cn,8669:[-.13313,.37788,0,0,1],8672:Ee,8674:Ee,8705:[0,.825,0,0,.5],8708:_r,8709:je,8717:[0,.43056,0,0,.42917],8722:Yn,8724:[.08198,.69224,0,0,.77778],8726:je,8733:rt,8736:Oe,8737:Oe,8738:[.03517,.52239,0,0,.72222],8739:Kn,8740:[.25142,.74111,0,0,.27778],8741:Vn,8742:[.25142,.74111,0,0,.5],8756:De,8757:De,8764:Ke,8765:[-.13313,.37788,0,0,.77778],8769:Ke,8770:oc,8774:Ct,8776:ol,8778:je,8782:et,8783:et,8785:Li,8786:Li,8787:Li,8790:rt,8791:Ht,8796:[.08198,.91667,0,0,.77778],8806:Dt,8807:Dt,8808:Ft,8809:Ft,8812:[.25583,.75583,0,0,.5],8814:Bt,8815:Bt,8816:Ct,8817:Ct,8818:Ht,8819:Ht,8822:Ut,8823:Ut,8828:on,8829:on,8830:Ht,8831:Ht,8832:Bt,8833:Bt,8840:Ct,8841:Ct,8842:cn,8843:cn,8847:Rt,8848:Rt,8858:Li,8859:Li,8861:Li,8862:Vt,8863:Vt,8864:Vt,8865:Vt,8872:[0,.69224,0,0,.61111],8873:Oe,8874:[0,.69224,0,0,.88889],8876:Xn,8877:Xn,8878:On,8879:On,8882:Rt,8883:Rt,8884:on,8885:on,8888:[0,.54986,0,0,1.11111],8890:wo,8891:In,8892:In,8901:[0,.54986,0,0,.27778],8903:je,8905:je,8906:je,8907:rt,8908:rt,8909:[-.03598,.46402,0,0,.77778],8910:wn,8911:wn,8912:Rt,8913:Rt,8914:Nn,8915:Nn,8916:De,8918:Rn,8919:Rn,8920:Jn,8921:Jn,8922:Sn,8923:Sn,8926:on,8927:on,8928:Ct,8929:Ct,8934:Un,8935:Un,8936:Un,8937:Un,8938:Bt,8939:Bt,8940:Ct,8941:Ct,8994:zt,8995:zt,9416:[.15559,.69224,0,0,.90222],9484:ki,9488:ki,9492:fn,9496:fn,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Vt,9633:Vt,9650:vn,9651:vn,9654:Rt,9660:vn,9661:vn,9664:Rt,9674:En,9733:[.19444,.69224,0,0,.94445],10003:An,10016:An,10731:En,10846:[.19444,.75583,0,0,.61111],10877:on,10878:on,10885:Dt,10886:Dt,10887:cn,10888:cn,10889:kn,10890:kn,10891:Mn,10892:Mn,10901:on,10902:on,10933:Ft,10934:Ft,10935:kn,10936:kn,10937:kn,10938:kn,10949:Dt,10950:Dt,10955:Bn,10956:Bn,57350:Kn,57351:Vn,57352:je,57353:cr,57356:Ft,57357:Ft,57358:fr,57359:Ct,57360:Ct,57361:fr,57366:Ft,57367:Ft,57368:Ft,57369:Ft,57370:cn,57371:cn},"Caligraphic-Regular":{32:Qn,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:Qn},"Fraktur-Regular":{32:Qn,33:[0,.69141,0,0,.29574],34:Or,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:$r,41:$r,42:[0,.62119,0,0,.27764],43:Mr,44:wr,45:Mr,46:wr,47:[.24982,.74947,0,0,.50181],48:ei,49:ei,50:ei,51:Xr,52:Xr,53:Xr,54:Zr,55:Xr,56:Zr,57:Xr,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:Lr,93:Lr,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:Qn,8216:Or,8217:Or,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:Qn,33:[0,.69444,0,0,.35],34:Xi,35:[.19444,.69444,0,0,.95833],36:Ar,37:[.05556,.75,0,0,.95833],38:Ri,39:ri,40:Wr,41:Wr,42:[0,.75,0,0,.575],43:_i,44:[.19444,.15556,0,0,.31944],45:tr,46:[0,.15556,0,0,.31944],47:Zn,48:Pr,49:Pr,50:Pr,51:Pr,52:Pr,53:Pr,54:Pr,55:Pr,56:Pr,57:Pr,58:oo,59:[.19444,.44444,0,0,.31944],60:di,61:ao,62:di,63:[0,.69444,0,0,.54305],64:Ri,65:er,66:[0,.68611,0,0,.81805],67:bi,68:[0,.68611,0,0,.88194],69:Dc,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:Vr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:Nr,77:[0,.68611,0,0,1.09166],78:Vr,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:er,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:Dr,92:Zn,93:Dr,94:Bi,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:Sr,99:jr,100:Sr,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:Sr,105:ri,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:ri,109:[0,.44444,0,0,.95833],110:yi,111:ps,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:yi,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:jr,123:Zn,124:Dr,125:Zn,126:[.35,.34444,0,0,.575],160:Qn,163:[0,.69444,0,0,.86853],168:Bi,172:[0,.44444,0,0,.76666],176:Fr,177:_i,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:_i,216:[.04861,.73472,0,0,.89444],223:Yt,230:[0,.44444,0,0,.83055],247:_i,248:[.09722,.54167,0,0,.575],305:oo,338:[0,.68611,0,0,1.16944],339:eo,567:[.19444,.44444,0,0,.35139],710:Bi,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Bi,715:Bi,728:Bi,729:ri,730:Fr,732:Bi,733:Bi,915:Nr,916:kr,920:hi,923:cu,926:gc,928:Vr,931:bi,933:hi,934:bi,936:hi,937:bi,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:ri,8217:ri,8220:Xi,8221:Xi,8224:mo,8225:mo,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:al,8465:Co,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:Co,8501:Ho,8592:ji,8593:_o,8594:ji,8595:_o,8596:ji,8597:Zn,8598:vo,8599:vo,8600:vo,8601:vo,8636:ji,8637:ji,8640:ji,8641:ji,8656:ji,8657:Er,8658:ji,8659:Er,8660:ji,8661:[.25,.75,0,0,.70277],8704:Sr,8706:[0,.69444,.06389,0,.62847],8707:Sr,8709:Ar,8711:kr,8712:Kr,8715:Kr,8722:_i,8723:_i,8725:Zn,8726:Zn,8727:La,8728:Hi,8729:Hi,8730:[.18,.82,0,0,.95833],8733:eo,8734:[0,.44444,0,0,1.14999],8736:Oe,8739:Dr,8741:Zn,8743:io,8744:io,8745:io,8746:io,8747:[.19444,.69444,.12778,0,.56875],8764:ao,8768:[.19444,.69444,0,0,.31944],8771:to,8776:[.02444,.52444,0,0,.89444],8781:to,8801:to,8804:Mo,8805:Mo,8810:Yo,8811:Yo,8826:di,8827:di,8834:di,8835:di,8838:Mo,8839:Mo,8846:io,8849:Mo,8850:Mo,8851:io,8852:io,8853:_i,8854:_i,8855:_i,8856:_i,8857:_i,8866:Ho,8867:Ho,8868:Ri,8869:Ri,8900:Hi,8901:[-.02639,.47361,0,0,.31944],8902:La,8968:ha,8969:ha,8970:ha,8971:ha,8994:Ko,8995:Ko,9651:Oo,9657:La,9661:Oo,9667:La,9711:vo,9824:Wi,9825:Wi,9826:Wi,9827:Wi,9837:[0,.75,0,0,.44722],9838:ta,9839:ta,10216:Wr,10217:Wr,10815:Vr,10927:Mo,10928:Mo,57376:Qs},"Main-BoldItalic":{32:Qn,33:[0,.69444,.11417,0,.38611],34:ra,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:ro,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:Zo,49:Zo,50:Zo,51:Zo,52:no,53:Zo,54:Zo,55:no,56:Zo,57:Zo,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Bo,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:ti,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:ti,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:Ci,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:Fi,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:Fi,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:Qn,168:[0,.69444,.11473,0,.59111],176:qi,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:Ii,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:Ii,567:[.19444,.44444,.04611,0,.385],710:Ci,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:ro,730:qi,732:Bo,733:Bo,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:ti,931:[0,.68611,.11431,0,.82666],933:na,934:[0,.68611,.05632,0,.82666],936:na,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:ro,8217:ro,8220:[0,.69444,.16772,0,.62055],8221:ra},"Main-Italic":{32:Qn,33:fa,34:Sl,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:fa,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:xo,49:xo,50:xo,51:xo,52:go,53:xo,54:xo,55:go,56:xo,57:xo,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Cs,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:ca,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:ca,79:ws,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:ca,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:da,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:ua,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:ua,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:Qn,168:[0,.66786,.10474,0,.51111],176:xl,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:ba,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:ba,710:da,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:xl,732:[0,.66786,.11585,0,.51111],733:Cs,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:ws,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:ca,931:[0,.68333,.12028,0,.71555],933:Ja,934:[0,.68333,.05986,0,.71555],936:Ja,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:fa,8217:fa,8220:[0,.69444,.1685,0,.51444],8221:Sl,8463:Jr},"Main-Regular":{32:Qn,33:Es,34:Wo,35:pt,36:hl,37:bt,38:Xs,39:Es,40:Pa,41:Pa,42:$t,43:ia,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:_a,48:Da,49:Da,50:Da,51:Da,52:Da,53:Da,54:Da,55:Da,56:Da,57:Da,58:va,59:[.19444,.43056,0,0,.27778],60:Rn,61:Ke,62:Rn,63:st,64:Xs,65:Zs,66:[0,.68333,0,0,.70834],67:Ns,68:[0,.68333,0,0,.76389],69:ul,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:Zs,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:Ps,76:hs,77:[0,.68333,0,0,.91667],78:Zs,79:Ps,80:ul,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:Ns,85:Zs,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:Zs,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:qa,92:_a,93:qa,94:Wo,95:[.31,.12056,.02778,0,.5],97:qs,98:Js,99:Cl,100:Js,101:Cl,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Js,105:oa,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:Es,109:[0,.43056,0,0,.83334],110:so,111:qs,112:wo,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:so,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:Cl,123:_a,124:qa,125:_a,126:[.35,.31786,0,0,.5],160:Qn,163:[0,.69444,0,0,.76909],167:Wa,168:$a,172:[0,.43056,0,0,.66667],176:za,177:ia,182:dl,184:Ia,198:[0,.68333,0,0,.90278],215:ia,216:[.04861,.73194,0,0,.77778],223:Wo,230:[0,.43056,0,0,.72222],247:ia,248:[.09722,.52778,0,0,.5],305:va,338:[0,.68333,0,0,1.01389],339:vc,567:[.19444,.43056,0,0,.30556],710:Wo,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Wo,715:Wo,728:Wo,729:oa,730:za,732:$a,733:Wo,915:hs,916:Ol,920:Ps,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:Zs,931:Ns,933:Ps,934:Ns,936:Ps,937:Ns,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:Es,8217:Es,8220:Wo,8221:Wo,8224:Wa,8225:Wa,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:Jr,8465:Ms,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Ms,8501:To,8592:mr,8593:ks,8594:mr,8595:ks,8596:mr,8597:_a,8598:Na,8599:Na,8600:Na,8601:Na,8614:[.011,.511,0,0,1],8617:mc,8618:mc,8636:mr,8637:mr,8640:mr,8641:mr,8652:[.011,.671,0,0,1],8656:mr,8657:dl,8658:mr,8659:dl,8660:mr,8661:[.25,.75,0,0,.61111],8704:Js,8706:[0,.69444,.05556,.08334,.5309],8707:Js,8709:hl,8711:Ol,8712:Rl,8715:Rl,8722:ia,8723:ia,8725:_a,8726:_a,8727:Uo,8728:wl,8729:wl,8730:[.2,.8,0,0,.83334],8733:vc,8734:gi,8736:Oe,8739:qa,8741:_a,8743:il,8744:il,8745:il,8746:il,8747:[.19444,.69444,.11111,0,.41667],8764:Ke,8768:[.19444,.69444,0,0,.27778],8771:oc,8773:[-.022,.589,0,0,1],8776:ol,8781:oc,8784:[-.133,.67,0,0,.778],8801:oc,8804:cn,8805:cn,8810:fl,8811:fl,8826:Rn,8827:Rn,8834:Rn,8835:Rn,8838:cn,8839:cn,8846:il,8849:cn,8850:cn,8851:il,8852:il,8853:ia,8854:ia,8855:ia,8856:ia,8857:ia,8866:To,8867:To,8868:Xs,8869:Xs,8872:[.249,.75,0,0,.867],8900:wl,8901:[-.05555,.44445,0,0,.27778],8902:Uo,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:Xo,8969:Xo,8970:Xo,8971:Xo,8994:fs,8995:fs,9136:ja,9137:ja,9651:Ws,9657:Uo,9661:Ws,9667:Uo,9711:Na,9824:is,9825:is,9826:is,9827:is,9837:[0,.75,0,0,.38889],9838:Ba,9839:Ba,10216:Pa,10217:Pa,10222:ja,10223:ja,10229:[.011,.511,0,0,1.609],10230:Aa,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:Aa,10815:Zs,10927:cn,10928:cn,57376:Qs},"Math-BoldItalic":{32:Qn,48:ps,49:ps,50:ps,51:Pl,52:Pl,53:Pl,54:Pr,55:Pl,56:Pr,57:Pl,65:er,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:Qc,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:Dc,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:al,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:uu,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:Qn,915:[0,.68611,.15972,0,.65694],916:kr,920:[0,.68611,.03194,0,.86722],923:cu,926:[0,.68611,.07458,0,.84125],928:Qc,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:gc,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:uu,960:[0,.44444,.03704,0,.68241],961:Ac,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:Ac,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Qn,48:qs,49:qs,50:qs,51:yc,52:yc,53:yc,54:Da,55:yc,56:Da,57:yc,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:pl,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:Ic,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:El,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:Qn,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Ic,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:pl,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:El,960:[0,.43056,.03588,0,.57003],961:Nl,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:Nl,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Qn,33:[0,.69444,0,0,.36667],34:ml,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:Bl,40:du,41:du,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:Qa,49:Qa,50:Qa,51:Qa,52:Qa,53:Qa,54:Qa,55:Qa,56:Qa,57:Qa,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:hu,64:Ml,65:Ml,66:Ml,67:Tc,68:Vl,69:[0,.69444,0,0,.64167],70:To,71:Ml,72:Vl,73:[0,.69444,0,0,.33056],74:hu,75:Oc,76:pu,77:[0,.69444,0,0,.97778],78:Vl,79:Vl,80:Tc,81:[.10556,.69444,0,0,.79445],82:Tc,83:To,84:Ml,85:Oc,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Ml,89:[0,.69444,.0275,0,.73334],90:el,91:ac,93:ac,94:Qa,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:Gl,99:[0,.45833,0,0,.48889],100:Gl,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:Gl,105:Iu,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Iu,109:[0,.45833,0,0,.86667],110:fu,111:[0,.45833,0,0,.55],112:Ui,113:Ui,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:fu,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:Qn,168:Qa,176:Ml,180:Qa,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:Qa,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:Qa,729:Bl,730:Ml,732:Qa,733:Qa,915:pu,916:[0,.69444,0,0,.91667],920:Yl,923:el,926:Ml,928:Vl,931:Vl,933:Yl,934:Vl,936:Yl,937:Vl,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Bl,8217:Bl,8220:ml,8221:ml},"SansSerif-Italic":{32:Qn,33:[0,.69444,.05733,0,.31945],34:bc,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:kl,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:Gt,45:[0,.44444,.01946,0,.33333],46:ln,47:[.25,.75,.13164,0,.5],48:Ls,49:Ls,50:Ls,51:Ls,52:Ls,53:Ls,54:Ls,55:Ls,56:Ls,57:Ls,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:ht,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:Fo,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:en,77:[0,.69444,.08094,0,.875],78:Fo,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:eu,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:Qn,168:[0,.67937,.06385,0,.5],176:Ds,184:Ia,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:eu,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Tu,715:Wo,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Ds,732:[0,.67659,.08826,0,.5],733:Tu,915:[0,.69444,.13372,0,.54167],916:nr,920:[0,.69444,.07555,0,.77778],923:To,926:[0,.69444,.12816,0,.66667],928:Fo,931:[0,.69444,.11983,0,.72222],933:bs,934:[0,.69444,.04603,0,.72222],936:bs,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:kl,8217:kl,8220:[0,.69444,.14205,0,.5],8221:bc},"SansSerif-Regular":{32:Qn,33:[0,.69444,0,0,.31945],34:Wo,35:pt,36:hl,37:bt,38:[0,.69444,0,0,.75834],39:Es,40:Pa,41:Pa,42:$t,43:ia,44:Gt,45:[0,.44444,0,0,.33333],46:ln,47:_a,48:Ge,49:Ge,50:Ge,51:Ge,52:Ge,53:Ge,54:Ge,55:Ge,56:Ge,57:Ge,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:st,64:ht,65:ht,66:ht,67:Sr,68:[0,.69444,0,0,.72223],69:Yt,70:[0,.69444,0,0,.56945],71:ht,72:nn,73:Es,74:st,75:[0,.69444,0,0,.69445],76:en,77:[0,.69444,0,0,.875],78:nn,79:[0,.69444,0,0,.73611],80:Sr,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Js,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:ht,89:[0,.69444,.025,0,.66667],90:To,91:tn,93:tn,94:Wo,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:mn,99:_n,100:mn,101:_n,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:mn,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:Hn,111:[0,.44444,0,0,.5],112:Dn,113:Dn,114:[0,.44444,.01389,0,.34167],115:tr,116:[0,.57143,0,0,.36111],117:Hn,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:Qn,168:[0,.67937,0,0,.5],176:ht,184:Ia,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Wo,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Wo,715:Wo,728:Wo,729:[0,.67937,0,0,.27778],730:ht,732:[0,.67659,0,0,.5],733:Wo,915:en,916:nr,920:Xs,923:To,926:ht,928:nn,931:Ms,933:Xs,934:Ms,936:Xs,937:Ms,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:Es,8217:Es,8220:Wo,8221:Wo},"Script-Regular":{32:Qn,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:Qn},"Size1-Regular":{32:Qn,40:jn,41:jn,47:lr,91:ur,92:lr,93:ur,123:qr,125:qr,160:Qn,710:pr,732:pr,770:pr,771:pr,8214:[-99e-5,.601,0,0,.77778],8593:Yr,8595:Yr,8657:wi,8659:wi,8719:ar,8720:ar,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:$n,8748:Br,8749:Br,8750:$n,8896:rr,8897:rr,8898:rr,8899:rr,8968:br,8969:br,8970:br,8971:br,9168:Gi,10216:br,10217:br,10752:pi,10753:pi,10754:pi,10756:rr,10758:rr},"Size2-Regular":{32:Qn,40:Ki,41:Ki,47:ir,91:gr,92:ir,93:gr,123:oi,125:oi,160:Qn,710:xr,732:xr,770:xr,771:xr,8719:mi,8720:mi,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:zi,8748:Di,8749:Di,8750:zi,8896:zo,8897:zo,8898:zo,8899:zo,8968:Vi,8969:Vi,8970:Vi,8971:Vi,10216:Jo,10217:Jo,10752:co,10753:co,10754:co,10756:zo,10758:zo},"Size3-Regular":{32:Qn,40:Lo,41:Lo,47:Ro,91:xi,92:Ro,93:xi,123:li,125:li,160:Qn,710:Ei,732:Ei,770:Ei,771:Ei,8730:[.95003,1.45,0,0,1],8968:Oi,8969:Oi,8970:Oi,8971:Oi,10216:li,10217:li},"Size4-Regular":{32:Qn,40:fi,41:fi,47:So,91:Mi,92:So,93:Mi,123:Ai,125:Ai,160:Qn,710:lo,732:lo,770:lo,771:lo,8730:[1.25003,1.75,0,0,1],8968:yo,8969:yo,8970:yo,8971:yo,9115:Ua,9116:Ta,9117:Ua,9118:Ua,9119:Ta,9120:Ua,9121:uo,9122:Gi,9123:uo,9124:uo,9125:Gi,9126:uo,9127:pa,9128:Po,9129:bo,9130:[0,.3,0,0,.88889],9131:pa,9132:Po,9133:bo,9143:[.88502,.915,0,0,1.05556],10216:Ai,10217:Ai,57344:os,57345:os,57680:fo,57681:fo,57682:fo,57683:fo},"Typewriter-Regular":{32:es,33:Tr,34:Tr,35:Tr,36:Eo,37:Eo,38:Tr,39:Tr,40:Eo,41:Eo,42:[0,.52083,0,0,.525],43:aa,44:[.13889,.125,0,0,.525],45:aa,46:[0,.125,0,0,.525],47:Eo,48:Tr,49:Tr,50:Tr,51:Tr,52:Tr,53:Tr,54:Tr,55:Tr,56:Tr,57:Tr,58:Zi,59:[.13889,.43056,0,0,.525],60:Oa,61:[-.19549,.41562,0,0,.525],62:Oa,63:Tr,64:Tr,65:Tr,66:Tr,67:Tr,68:Tr,69:Tr,70:Tr,71:Tr,72:Tr,73:Tr,74:Tr,75:Tr,76:Tr,77:Tr,78:Tr,79:Tr,80:Tr,81:[.13889,.61111,0,0,.525],82:Tr,83:Tr,84:Tr,85:Tr,86:Tr,87:Tr,88:Tr,89:Tr,90:Tr,91:Eo,92:Eo,93:Eo,94:Tr,95:[.09514,0,0,0,.525],96:Tr,97:Zi,98:Tr,99:Zi,100:Tr,101:Zi,102:Tr,103:$o,104:Tr,105:Tr,106:[.22222,.61111,0,0,.525],107:Tr,108:Tr,109:Zi,110:Zi,111:Zi,112:$o,113:$o,114:Zi,115:Zi,116:[0,.55358,0,0,.525],117:Zi,118:Zi,119:Zi,120:Zi,121:$o,122:Zi,123:Eo,124:Eo,125:Eo,126:Tr,127:Tr,160:es,176:Tr,184:[.19445,0,0,0,.525],305:Zi,567:$o,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:Tr,715:Tr,728:Tr,730:Tr,770:Tr,771:Tr,776:Tr,915:Tr,916:Tr,920:Tr,923:Tr,926:Tr,928:Tr,931:Tr,933:Tr,934:Tr,936:Tr,937:Tr,8216:Tr,8217:Tr,8242:Tr,9251:[.11111,.21944,0,0,.525]}},Ll=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,As=10,as=.25,vl=1.2,ss=.431,Is={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[ss,ss,ss],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:[as,as,as],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]},ms=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],ga=5,ya={"\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 _s(a,y){a===void 0&&(a=77);const b=Us[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 ya)a=ya[E].codePointAt(0);else if(Ll.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 Fl={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]},tl={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]},Dl={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 Xl(a){if(tl[a]){const[nt,dt,Mt]=tl[a],Zt=`<span class="stretchy" style="height:${Mt}em"><svg width="100%" height="${Mt}em" viewBox="0 0 ${nt} ${dt}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Dl[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*Mt/2)/100}em;min-width:0">${Zt}</span>`}const[y,b,E,te]=Fl[a];let le,be;const He=E/1e3;y.length===3?(le=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],be=["xMinYMin","xMidYMin","xMaxYMin"]):y.length===2?(le=["slice-1-of-2","slice-2-of-2"],be=["xMinYMin","xMaxYMin"]):(le=["slice-1-of-1"],be=[te]);const Ye=y.map((nt,dt)=>`<span class="${le[dt]}" style=height:${He}em><svg width=400em height=${He}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${be[dt]} slice"><path fill="currentcolor" d="${Dl[nt]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${He}em;min-width:${b}em;">${Ye}</span>`}function mu(a){return Fl[a]?Fl[a][2]/1e3:tl[a][2]}function Do(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 te=a.charCodeAt(b+1);if(te>=56320&&te<=57343){const le=E-55296,be=te-56320;E=qc(2,16)+le*qc(2,10)+be,b++}}y.push(E)}return y}var qo=8205,Va=[[qo,1],[65038,2],[127995,5],[129456,4],[917536,96]],Qo,Ga=[127462,127487];function ls(a){var y;if(Qo===void 0){Qo={};for(const b of Va)for(let E=b[0];E<=b[0]+b[1]-1;E++)Qo[E]=!0}return(y=Qo[a])!=null?y:!1}function Bs(a){return a>=Ga[0]&&a<=Ga[1]}function zl(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=Do(a);let E=0;for(;E<b.length;){const te=b[E++],le=b[E];if(le===qo){const be=E-1;for(E+=2;b[E]===qo;)E+=2;y.push(String.fromCodePoint(...b.slice(be,E-be+1)))}else if(ls(le)){const be=E-1;for(;ls(b[E]);)E+=b[E]===qo?2:1;y.push(String.fromCodePoint(...b.slice(be,2*E-be-1)))}else Bs(te)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(te))}return y}var Ou=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=zl(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 sc(a,y){var b,E,te,le;const be=[];let He=a.next();if(He&&He!=="\\relax"){if(He==="\\noexpand")He=a.next(),He&&be.push(He);else if(He==="\\obeyspaces")a.obeyspaces=!0;else if(He==="\\bgroup")be.push("<{>");else if(He==="\\egroup")be.push("<}>");else if(He==="\\string"){if(He=a.next(),He)if(He.startsWith("\\"))for(const Ye of He)be.push(Ye==="\\"?"\\backslash":Ye);else He==="<{>"?be.push("\\{"):He==="<space>"?be.push("~"):He==="<}>"&&be.push("\\}")}else if(He==="\\csname"){for(;a.peek()==="<space>";)a.next();let Ye="",nt=!1,dt=[];do{if(dt.length===0)if(/^#[\d?@]$/.test(a.peek())){const Mt=a.get().slice(1);dt=$l((E=(b=y==null?void 0:y(Mt))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),He=dt[0]}else He=a.next(),dt=He?[He]:[];nt=dt.length===0,!nt&&He==="\\endcsname"&&(nt=!0,dt.shift()),nt||(nt=He==="<$>"||He==="<$$>"||He==="<{>"||He==="<}>"||typeof He=="string"&&He.length>1&&He.startsWith("\\")),nt||(Ye+=dt.shift())}while(!nt);Ye&&be.push("\\"+Ye),be.push(...dt)}else if(He!=="\\endcsname")if(He.length>1&&He.startsWith("#")){const Ye=He.slice(1);be.push(...$l((le=(te=y==null?void 0:y(Ye))!=null?te:y==null?void 0:y("?"))!=null?le:"\\placeholder{}",y))}else be.push(He)}return be}function $l(a,y=null){const b=[];let E="";for(const be of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const He=be.match(/((?:\\%)|[^%])*/);He!==null&&b.push(He[0])}const te=new Ou(_t(b.join(""))),le=[];do le.push(...sc(te,y));while(!te.end());return le}function ko(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 xa(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:ko([a,...y.map(b=>`{${b}}`)])}function Al(a){return ko(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var _c=class dh{constructor(y){dh._registry[y]=this}static createAtom(y,b,E){return dh._registry[y].createAtom(b,qt(b,y),E)}static serialize(y,b){var E;if(!y||y.length===0)return"";if((E=b.skipStyles)!=null&&E){const te=[];for(const le of td(y)){const be=dh._registry[le[0].mode];te.push(...be.serialize(le,b))}return ko(te)}return ko(vu(y,b))}static getFont(y,b,E){return dh._registry[y].getFont(b,E)}};_c._registry={};var nl=_c;function td(a){const y=[];let b=[],E="NONE";for(const te of a)te.type!=="first"&&(te.mode!==E?(b.length>0&&y.push(b),b=[te],E=te.mode):b.push(te));return b.length>0&&y.push(b),y}function Ha(a,y){const b=[];let E=[],te;for(const le of a)if(le.type!=="first"&&le.style){let be;y==="variant"?(be=le.style.variant,le.style.variantStyle&&le.style.variantStyle!=="up"&&(be+="-"+le.style.variantStyle)):be=le.style[y],be===te?E.push(le):(E.length>0&&b.push(E),E=[le],te=be)}return E.length>0&&b.push(E),b}function Ru(a,y){var b;const{parent:E}=a[0],te=E==null?void 0:E.computedStyle.color,le=[];for(const be of td(a)){const He=y.defaultMode;for(const Ye of Ha(be,"color")){const nt=Ye[0].computedStyle,dt=nl._registry[Ye[0].mode].serialize(Ye,se(ae({},y),{defaultMode:He==="text"?"text":"math"}));!y.skipStyles&&nt.color&&nt.color!=="none"&&(!E||te!==nt.color)?le.push(xa("\\textcolor",(b=nt.verbatimColor)!=null?b:nt.color,ko(dt))):le.push(ko(dt))}}return le}function nd(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return Ha(a,"backgroundColor").map(te=>{var le;if(te.length>0||te[0].type!=="box"){const be=te[0].computedStyle;if(be.backgroundColor&&be.backgroundColor!=="none"&&(!b||E!==be.backgroundColor))return xa("\\colorbox",(le=be.verbatimBackgroundColor)!=null?le:be.backgroundColor,ko(Ru(te,se(ae({},y),{defaultMode:"text"}))))}return ko(Ru(te,y))})}function vu(a,y){if(a.length===0)return[];const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.fontSize,te=[];for(const le of Ha(a,"fontSize")){const be=le[0].computedStyle.fontSize,He=nd(le,y);He&&(be&&be!=="auto"&&(!b||E!==be)?te.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][be],...He):te.push(...He))}return te}function gu(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=gu(a[0].type),b=gu(a[a.length-1].type);return y&&y===b?y:"ord"}function xc(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 Ur=class w0{constructor(y,b){var E,te,le,be,He;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:pe(y)?this.children=y.filter(nt=>nt!==null):y&&y instanceof w0&&(this.children=[y]),this.children)for(const nt of this.children)nt.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=(te=b==null?void 0:b.classes)!=null?te:"",this.isTight=(le=b==null?void 0:b.isTight)!=null?le:!1,b!=null&&b.attributes&&(this.attributes=b.attributes);let Ye=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(Ye=(He=nl.getFont((be=b.mode)!=null?be:"math",this,se(ae({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?He:void 0),Ye||(Ye="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),lc(this,Ye)}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 te=xc(b,E);te.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[y]=te)}setTop(y){Number.isFinite(y)&&Math.abs(y)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=xc(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"]=xc(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"]=xc(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"]=xc(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 te=y.backgroundColor;this.isSelected&&(te=St(te)),te&&te!==b.backgroundColor&&(this.setStyle("background-color",te),this.setStyle("display","inline-block"));const le=y.scalingFactor;return this.scale=le,this.skew*=le,this.italic*=le,this}toMarkup(){var y,b,E,te;let le=(y=this.value)!=null?y:"";if(this.children)for(const sn of this.children)le+=sn.toMarkup();let be="";if(this.svgBody)be=Xl(this.svgBody);else if(this.svgOverlay){be='<span style="',be+="display: inline-block;",be+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,be+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,be+='">',be+=le,be+="</span>",be+='<svg style="position:absolute;overflow:visible;',be+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const sn=(b=this.cssProperties)==null?void 0:b.padding;sn?(be+=`top:${sn};`,be+=`left:${sn};`,be+=`width:calc(100% - 2 * ${sn} );`):be+="top:0;left:0;width:100%;",be+="z-index:2;",be+='"',this.svgStyle&&(be+=this.svgStyle),be+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,be+=`>${this.svgOverlay}</svg>`}let He="";const Ye=this.classes.split(" ");Ye.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&Ye.push("ML__latex-caret"),this.isSelected&&Ye.push("ML__selected");const nt=Ye.length===1?Ye[0]:Ye.filter((sn,bn,Gn)=>sn.length>0&&Gn.indexOf(sn)===bn).join(" ");if(nt.length>0&&(He+=` class="${nt}"`),this.id&&(He+=` data-atom-id=${this.id}`),this.cssId&&(He+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(He+=" "+Object.keys(this.attributes).map(sn=>`${sn}="${this.attributes[sn]}"`).join(" ")),this.htmlData){const sn=this.htmlData.split(",");for(const bn of sn){const Gn=bn.match(/([^=]+)=(.+$)/);if(Gn){const Gr=Gn[1].trim().replace(/ /g,"-");Gr&&(He+=` data-${Gr}="${Gn[2]}" `)}else{const Gr=bn.trim().replace(/ /g,"-");Gr&&(He+=` data-${Gr} `)}}}const dt=(te=this.cssProperties)!=null?te:{};this.hasExplicitWidth&&dt.width===void 0&&(dt.width=`${Math.ceil(this._width*100)/100}em`);const Mt=Object.keys(dt).map(sn=>`${sn}:${dt[sn]}`);if(this.scale!==void 0&&this.scale!==1&&(le.length>0||be.length>0)&&Mt.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const sn=this.htmlStyle.split(";");let bn="";for(const Gn of sn){const Gr=Gn.match(/([^=]+):(.+$)/);if(Gr){const Wn=Gr[1].trim().replace(/ /g,"-");Wn&&(bn+=`${Wn}:${Gr[2]};`)}}bn&&(He+=` style="${bn}"`)}Mt.length>0&&(He+=` style="${Mt.join(";")}"`);let Zt="";return He.length>0||be.length>0?Zt=`<span${He}>${le}${be}</span>`:Zt=le,this.caret==="text"?Zt+='<span class="ML__text-caret"></span>':this.caret==="math"&&(Zt+='<span class="ML__caret"></span>'),Zt}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 Ye of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&Ye in y.cssProperties||this.cssProperties&&Ye in this.cssProperties)return!1}const te=this.cssProperties?Object.keys(this.cssProperties).length:0,le=y.cssProperties?Object.keys(y.cssProperties).length:0;if(te!==le)return!1;if(te>0){for(const Ye of Object.keys(this.cssProperties))if(this.cssProperties[Ye]!==y.cssProperties[Ye])return!1}const be=this.classes.trim().replace(/\s+/g," ").split(" "),He=y.classes.trim().replace(/\s+/g," ").split(" ");if(be.length!==He.length)return!1;be.sort(),He.sort();for(const[Ye,nt]of be.entries())if(nt==="vertical-separator"||nt!==He[Ye])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 Pu(a){if(!a||a.length===0)return[];a[0].children=Pu(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=Pu(a[b].children),y.push(a[b]));return y}function yu(a){return a.children&&(a.children=Pu(a.children)),a}function bu(a,y){if(!a)return new Ur(null,y);const b=new Ur(null,{classes:"ML__strut",type:"ignore"});b.setStyle("height",Math.max(0,a.height),"em");const E=[b];if(a.depth!==0){const te=new Ur(null,{classes:"ML__strut--bottom",type:"ignore"});te.setStyle("height",a.height+a.depth,"em"),te.setStyle("vertical-align",-a.depth,"em"),E.push(te)}return E.push(a),new Ur(E,se(ae({},y),{type:"lift"}))}function gl(a){const y=mu(a)/2,b=new Ur(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function lc(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 te=_s(a.value.codePointAt(E),y);a.height=Math.max(a.height,te.height),a.depth=Math.max(a.depth,te.depth),a._width+=te.width,a.skew=te.skew,a.italic=te.italic}return}if(a.children&&a.children.length>0){let E=-1/0,te=-1/0,le=0;for(const be of a.children)be.height>E&&(E=be.height),be.depth>te&&(te=be.depth),le=Math.max(le,(b=be.maxFontSize)!=null?b:0);a.height=E,a.depth=te,a._width=a.children.reduce((be,He)=>be+He.width,0),a.maxFontSize=le}}function Pc(a){if("individualShift"in a){const y=a.individualShift;let b=y[0];const E=[b],te=-b.shift-b.box.depth;let le=te;for(let be=1;be<y.length;be++){const He=y[be],Ye=-He.shift-le-He.box.depth,nt=Ye-(b.box.height+b.box.depth);le=le+Ye,E.push(nt),E.push(He),b=He}return[E,te]}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 Sc(a){var y;const[b,E]=Pc(a);if(!b)return[[],0,0];const te=new Ur(null,{classes:"pstrut"});let le=0;for(const bn of b)if(typeof bn!="number"){const Gn=bn.box;le=Math.max(le,Gn.maxFontSize,Gn.height)}le+=2,te.height=le,te.setStyle("height",le,"em");const be=[];let He=E,Ye=E,nt=E,dt=0;for(const bn of b){if(typeof bn=="number")nt+=bn;else{const Gn=bn.box,Gr=(y=bn.classes)!=null?y:[],Wn=new Ur([te,Gn],{classes:Gr.join(" "),style:bn.style});Gn.setStyle("height",Gn.height+Gn.depth,"em"),Gn.setStyle("display","inline-block"),Wn.setStyle("top",-le-nt-Gn.depth,"em"),bn.marginLeft&&Wn.setStyle("margin-left",bn.marginLeft,"em"),bn.marginRight&&Wn.setStyle("margin-right",bn.marginRight,"em"),be.push(Wn),nt+=Gn.height+Gn.depth,dt=Math.max(dt,Wn.width)}He=Math.min(He,nt),Ye=Math.max(Ye,nt)}be.forEach(bn=>{bn.softWidth=dt});const Mt=new Ur(be,{classes:"vlist"});if(Mt.softWidth=dt,Mt.height=Ye,Mt.setStyle("height",Ye,"em"),He>=0)return[[new Ur(Mt,{classes:"vlist-r"})],Ye,-He];const Zt=new Ur(new Ur(null),{classes:"vlist"});Zt.height=-He,Zt.setStyle("height",-He,"em");const sn=new Ur(8203,{classes:"vlist-s",maxFontSize:0});return sn.softWidth=0,sn.height=0,sn.depth=0,[[new Ur([Mt,sn],{classes:"vlist-r"}),new Ur(Zt,{classes:"vlist-r"})],Ye,-He]}var ma=class extends Ur{constructor(a,y){var b;const[E,te,le]=Sc(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=te,this.depth=le,this.softWidth=E.reduce((be,He)=>Math.max(be,He.width),0)}};function rd(a,y){var b,E,te,le,be;const He=a.metrics,Ye=new Ur(y.base),nt=(b=y.baseShift)!=null?b:0,dt=(E=y.slant)!=null?E:0;let Mt=0,Zt=0;y.above&&(Mt=(te=y.aboveShift)!=null?te:Math.max(He.bigOpSpacing1,He.bigOpSpacing3-y.above.depth)),y.below&&(Zt=(le=y.belowShift)!=null?le:Math.max(He.bigOpSpacing2,He.bigOpSpacing4-y.below.height));let sn=null;if(y.below&&y.above){const bn=He.bigOpSpacing5+y.below.height+y.below.depth+Zt+Ye.depth+nt;sn=new ma({bottom:bn,children:[He.bigOpSpacing5,{box:y.below,marginLeft:-dt,classes:["ML__center"]},Zt,{box:Ye,classes:["ML__center"]},Mt,{box:y.above,marginLeft:dt,classes:["ML__center"]},He.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)sn=new ma({top:Ye.height-nt,children:[He.bigOpSpacing5,{box:y.below,marginLeft:-dt,classes:["ML__center"]},Zt,{box:Ye,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const bn=Ye.depth+nt;sn=new ma({bottom:bn,children:[{box:Ye,classes:["ML__center"]},Mt,{box:y.above,marginLeft:dt,classes:["ML__center"]},He.bigOpSpacing5]}).wrap(a)}else{const bn=Ye.depth+nt;sn=new ma({bottom:bn,children:[{box:Ye},He.bigOpSpacing5]}).wrap(a)}return new Ur(sn,{type:(be=y.type)!=null?be:"op"})}var _u=7,jl=6,tu=5,Jl=4,ql=3,Ts=2,rl=1,vs=0,Hl=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(Is).reduce((te,le)=>se(ae({},te),{[le]:Is[le][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return Vo[[vs,rl,vs,rl,Ts,ql,Ts,ql][this.id]]}get sub(){return Vo[[vs,vs,vs,vs,Ts,Ts,Ts,Ts][this.id]]}get fracNum(){return Vo[[vs,rl,vs,rl,Ts,ql,Jl,tu][this.id]]}get fracDen(){return Vo[[vs,vs,vs,vs,Ts,Ts,Jl,Jl][this.id]]}get cramp(){return Vo[[vs,vs,Ts,Ts,Jl,Jl,jl,jl][this.id]]}get isTight(){return this.sizeDelta<0}},Ao={7:new Hl(_u,0,!1),6:new Hl(jl,0,!0),5:new Hl(tu,0,!1),4:new Hl(Jl,0,!0),3:new Hl(ql,-3,!1),2:new Hl(Ts,-3,!0),1:new Hl(rl,-4,!1),0:new Hl(vs,-4,!0)},Vo=se(ae({},Ao),{displaystyle:Ao[_u],textstyle:Ao[tu],scriptstyle:Ao[ql],scriptscriptstyle:Ao[rl]});function Os(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:As,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 te=qc(10,y);return Math.round(a.dimension/As*E*te)/te}return a.dimension*E}function Kl(a,y){if(a===null)return 0;const b=Os(a)/As;if(Number.isFinite(y)){const E=qc(10,y);return Math.round(b*E)/E}return b}function Zl(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function Nu(a){let y=Zl(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${Zl(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${Zl(a.shrink)}`),y}function Ka(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=Nu(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 te=Math.round(a.number)>>>0;a.base==="hexadecimal"?(E=Number(te).toString(16).toUpperCase(),te<=255?E=E.padStart(2,"0"):te<=65535?E=E.padStart(4,"0"):te<=16777215?E=E.padStart(6,"0"):E=E.padStart(8,"0"),E=`"${E}`):a.base==="octal"&&(E=Number(te).toString(8),te<=63?E=E.padStart(2,"0"):te<=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 yl(a,y){return a==null?null:"number"in a?se(ae({},a),{number:a.number*y}):"register"in a?"factor"in a&&a.factor?se(ae({},a),{factor:a.factor*y}):se(ae({},a),{factor:y}):"dimension"in a?se(ae({},a),{dimension:a.dimension*y}):"glue"in a?a.shrink&&a.grow?{glue:yl(a.glue,y),shrink:yl(a.shrink,y),grow:yl(a.grow,y)}:a.shrink?{glue:yl(a.glue,y),shrink:yl(a.shrink,y)}:a.grow?{glue:yl(a.glue,y),grow:yl(a.grow,y)}:{glue:yl(a.glue,y)}:null}var Bu={"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 cc(){return ae({},Bu)}function id(){return{registers:cc(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Le.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:gt,backgroundColorMap:Ve,getMacro:a=>Tn(a,dn())}}var jo=class E0{constructor(y,b){var E,te,le,be,He,Ye,nt,dt,Mt,Zt,sn,bn,Gn,Gr,Wn;let yr;y!=null&&y.parent?(this.parent=y.parent,yr=y.parent,this.registers={}):(yr=ae(ae({},id()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=yr.registers),yr.atomIdsSettings&&(this.atomIdsSettings=ae({},yr.atomIdsSettings)),this.renderPlaceholder=yr.renderPlaceholder,this.isPhantom=(be=(le=y==null?void 0:y.isPhantom)!=null?le:(te=this.parent)==null?void 0:te.isPhantom)!=null?be:!1,this.letterShapeStyle=yr.letterShapeStyle,this.minFontScale=yr.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(Ye=(He=this.parent)==null?void 0:He.color)!=null?Ye:"",b!=null&&b.backgroundColor&&b.backgroundColor!=="none"?this.backgroundColor=b.backgroundColor:this.backgroundColor=(dt=(nt=this.parent)==null?void 0:nt.backgroundColor)!=null?dt:"",b!=null&&b.fontSize&&b.fontSize!=="auto"&&b.fontSize!==((Mt=this.parent)==null?void 0:Mt.size)?this.size=b.fontSize:this.size=(sn=(Zt=this.parent)==null?void 0:Zt.size)!=null?sn:ga;let Qr=(Gn=(bn=this.parent)==null?void 0:bn.mathstyle)!=null?Gn:Vo.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(yr instanceof E0)switch(y.mathstyle){case"cramp":Qr=Qr.cramp;break;case"superscript":Qr=Qr.sup;break;case"subscript":Qr=Qr.sub;break;case"numerator":Qr=Qr.fracNum;break;case"denominator":Qr=Qr.fracDen;break}switch(y.mathstyle){case"textstyle":Qr=Vo.textstyle;break;case"displaystyle":Qr=Vo.displaystyle;break;case"scriptstyle":Qr=Vo.scriptstyle;break;case"scriptscriptstyle":Qr=Vo.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=Qr,this.smartFence=yr.smartFence,this.placeholderSymbol=yr.placeholderSymbol,this.colorMap=(Gr=yr.colorMap)!=null?Gr:Ir=>Ir,this.backgroundColorMap=(Wn=yr.backgroundColorMap)!=null?Wn:Ir=>Ir,this.getMacro=yr.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===_u||this.mathstyle.id===jl}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(ms[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 Kl(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 te=b.getRegister(y.register);if(te===void 0)return;if(typeof te=="string")return{string:Number(te).toString()+te};if(typeof te=="number")return{number:E*te};const le=b.evaluate(te);if(le!==void 0)return"string"in le?{string:Number(te).toString()+le.string}:"number"in le?{number:E*le.number}:"dimension"in le?se(ae({},le),{dimension:E*le.dimension}):"glue"in le?se(ae({},le),{glue:se(ae({},le.glue),{dimension:E*le.glue.dimension}),shrink:le.shrink?se(ae({},le.shrink),{dimension:E*le.shrink.dimension}):void 0,grow:le.grow?se(ae({},le.grow),{dimension:E*le.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:Os(E,b)/As}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 te=this.evaluate(y);return te===void 0?null:"string"in te?(E=(b=this.colorMap)==null?void 0:b.call(this,te.string))!=null?E:te.string:null}toBackgroundColor(y){var b,E;if(y===null)return null;const te=this.evaluate(y);return te===void 0?null:"string"in te?(E=(b=this.backgroundColorMap)==null?void 0:b.call(this,te.string))!=null?E:te.string:null}},xu=["body","above","below","superscript","subscript"];function Cc(a){return typeof a=="string"&&xu.includes(a)}function Fu(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var sr=class su{constructor(y){var b,E,te,le,be,He;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=(te=y.mode)!=null?te:"math",y.isFunction&&(this.isFunction=!0),y.limits&&(this.subsupPlacement=y.limits),this.style=ae({},y.style),this.displayContainsHighlight=(le=y.displayContainsHighlight)!=null?le:!1,this.captureSelection=(be=y.captureSelection)!=null?be:!1,this.skipBoundary=(He=y.skipBoundary)!=null?He:!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 te;if(!b)return null;const le=hh(b),be=[];for(const Ye of le){const nt=Ye[0].style,dt=fh(y,Ye,{style:{color:nt.color,backgroundColor:nt.backgroundColor,fontSize:nt.fontSize}});dt&&be.push(dt)}if(be.length===0)return null;const He=((te=E==null?void 0:E.classes)!=null?te:"").trim();return be.length===1&&!He&&!(E!=null&&E.type)?be[0].wrap(y):new Ur(be,{classes:He,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return nl.serialize(y,b)}static commonAncestor(y,b){if(y===b||y.parent===b.parent)return y.parent;const E=new WeakSet;let{parent:te}=y;for(;te;)E.add(te),te=te.parent;for(te=b.parent;te;){if(E.has(te))return te;te=te.parent}console.assert(!!te)}static fromJson(y){return typeof y=="string"?new su({type:"mord",value:y,mode:"math"}):new su(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=ae({},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=Id(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=qt(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?ko([xa(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?ko([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return nl.serialize(this.body,se(ae({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return nl.serialize(this.above,y)}belowToLatex(y){return nl.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=se(ae({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=nl.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=nl.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(Cc(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of xu)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(Cc(y)),Cc(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 Fu(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Fu(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",te=typeof this.style.verbatimBackgroundColor=="string",le=ae(ae({},(b=(y=this.parent)==null?void 0:y.computedStyle)!=null?b:{}),this.style);return delete le.variant,delete le.variantStyle,te||delete le.verbatimBackgroundColor,E||delete le.verbatimColor,le}applyStyle(y){this.isDirty=!0,this.style=ae(ae({},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(Cc(b)),!Cc(b)))return;console.assert(((E=y[0])==null?void 0:E.type)!=="first");const te=[this.makeFirstAtom(b),...y];this._branches?this._branches[b]=te:this._branches={[b]:te};for(const le of y)le.parent=this,le.parentBranch=b;this.isDirty=!0}makeFirstAtom(y){const b=new su({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 te of y)te.parent=this,te.parentBranch=b,E.push(te);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 te of y)te.parent=this,te.parentBranch=b.parentBranch;return y[y.length-1]}removeBranch(y){const b=this.branch(y);if(Cc(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 xu)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=qt(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new jo({parent:y},this.style);let te=this.createBox(E,{classes:this.parent?"":"ML__base"});return te?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(te=this.attachSupsub(E,{base:te})),te.wrap(E)):null}attachSupsub(y,b){var E;const te=b.base,le=this.superscript,be=this.subscript;if(!le&&!be)return te;let He=null,Ye=null;const nt=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let dt=0;if(le){const Gn=new jo({parent:y,mathstyle:"superscript"});He=su.createBox(Gn,le),nt||(dt=te.height-y.metrics.supDrop*Gn.scalingFactor)}let Mt=0;if(be){const Gn=new jo({parent:y,mathstyle:"subscript"});Ye=su.createBox(Gn,be),nt||(Mt=te.depth+y.metrics.subDrop*Gn.scalingFactor)}let Zt;y.isDisplayStyle?Zt=y.metrics.sup1:y.isCramped?Zt=y.metrics.sup3:Zt=y.metrics.sup2;const sn=.5/As/y.scalingFactor;let bn=null;if(Ye&&He){dt=Math.max(dt,Zt,He.depth+.25*y.metrics.xHeight),Mt=Math.max(Mt,y.metrics.sub2);const Gn=y.metrics.defaultRuleThickness;if(dt-He.depth-(Ye.height-Mt)<4*Gn){Mt=4*Gn-(dt-He.depth)+Ye.height;const Wn=.8*y.metrics.xHeight-(dt-He.depth);Wn>0&&(dt+=Wn,Mt-=Wn)}const Gr=this.isExtensibleSymbol&&te.italic?-te.italic:0;bn=new ma({individualShift:[{box:Ye,shift:Mt,marginLeft:Gr},{box:He,shift:-dt}]}).wrap(y)}else Ye&&!He?(Mt=Math.max(Mt,y.metrics.sub1,Ye.height-.8*ss),bn=new ma({shift:Mt,children:[{box:Ye,marginRight:sn,marginLeft:this.isCharacterBox()?-te.italic:0}]})):!Ye&&He&&(dt=Math.max(dt,Zt,He.depth+.25*ss),bn=new ma({shift:-dt,children:[{box:He,marginRight:sn}]}));return new Ur([te,new Ur(bn,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?su.createBox(new jo({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,te=this.subscript?su.createBox(new jo({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!te?b.base.wrap(y):rd(y,se(ae({},b),{above:E,below:te}))}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,te,le,be;const He=(E=this.value)!=null?E:this.body,Ye=(te=b==null?void 0:b.boxType)!=null?te:gu(this.type);let nt=(le=b==null?void 0:b.classes)!=null?le:"";this.mode==="text"&&(nt+=" ML__text");const dt=typeof He=="string"||He===void 0?new Ur(He!=null?He:null,{type:Ye,isSelected:this.isSelected,mode:this.mode,maxFontSize:y.scalingFactor,style:se(ae({variant:"normal"},this.style),{fontSize:Math.max(1,y.size+y.mathstyle.sizeDelta)}),letterShapeStyle:y.letterShapeStyle,classes:nt}):(be=su.createBox(y,He,{type:Ye,classes:nt}))!=null?be:new Ur(null);return y.isTight&&(dt.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(dt.italic=0),dt.right=dt.italic,this.bind(y,dt),this.caret&&!this.superscript&&!this.subscript&&(dt.caret=this.caret),dt}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 hh(a){let y;const b=[];let E=[];for(const te of a)if(!y&&!te.style)E.push(te);else{const le=te.computedStyle;y&&le.color===y.color&&le.backgroundColor===y.backgroundColor&&le.fontSize===y.fontSize?E.push(te):(E.length>0&&b.push(E),E=[te],y=le)}return E.length>0&&b.push(E),b}function fh(a,y,b){var E,te,le,be,He;if(!y||y.length===0)return null;const Ye=new jo({parent:a},b.style),nt=!((E=Ye.atomIdsSettings)!=null&&E.groupNumbers);let dt=[];if(y.length===1){const Zt=y[0],sn=Zt.render(Ye);sn&&(nt&&Zt.isSelected&&sn.selected(!0),dt=[sn])}else{let Zt="",sn=!0;for(const bn of y){(te=Ye.atomIdsSettings)!=null&&te.groupNumbers&&Zt&&(sn&&bn.isDigit()||!sn&&Ad(bn))&&(Ye.atomIdsSettings.overrideID=Zt);const Gn=bn.render(Ye);Ye.atomIdsSettings&&(Ye.atomIdsSettings.overrideID=void 0),Gn&&((le=Ye.atomIdsSettings)!=null&&le.groupNumbers&&((bn.isDigit()||Ad(bn))&&(!Zt||sn!==bn.isDigit())&&(sn=bn.isDigit(),Zt=(be=bn.id)!=null?be:""),Zt&&(!(bn.isDigit()||Ad(bn))||!bn.hasEmptyBranch("superscript")||!bn.hasEmptyBranch("subscript"))&&(Zt="")),nt&&bn.isSelected&&Gn.selected(!0),dt.push(Gn))}}if(dt.length===0)return null;const Mt=new Ur(dt,se(ae({isTight:Ye.isTight},b),{type:(He=b.type)!=null?He:"lift"}));return Mt.isSelected=dt.every(Zt=>Zt.isSelected),Mt.wrap(Ye)}function Ad(a){return a.mode==="text"}function Id(a){return a.map(y=>y===null?"<null>":Array.isArray(y)&&y[0]instanceof sr?{atoms:y.map(b=>b.toJson())}:typeof y=="object"&&"group"in y?{group:y.group.map(b=>b.toJson())}:y)}var wc=class M0 extends sr{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 M0(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:Jt("text",this.value.codePointAt(0))}};function zu(a,y){if(a.direction===y.direction){const b=a.ranges.length;if(y.ranges.length===b){let E=0;for(;E<b&&rf(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function rf(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function Fs(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 Nc(a){return typeof a=="number"&&!Number.isNaN(a)}function od(a){return Array.isArray(a)&&a.length===2}function ad(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function of(a,y){const b=a.at(y);let E;if(b){E=b.mode;let te=b.parent;for(;!E&&te;)te&&(E=te.mode),te=te.parent}return E}function ph(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,te=!1,le=!1,be=!1,He=!1,Ye=!1,nt=!1,dt=!1,Mt=!1,Zt=!1,sn=!1,bn=!1,Gn=!1,Gr=!1,Wn=a[0],yr=0;for(;Wn!=null&&Wn.type&&/^(subsup|placeholder)$/.test(Wn.type);)yr+=1,Wn=a[yr];return b=!Wn||Wn.type==="first",Wn&&(Gn=Wn.mode==="text",E=!Gn&&Wn.type==="mord"&&Te.test(Wn.value),te=!Gn&&Wn.type==="mord"&&/\d+$/.test(Wn.value),le=!Gn&&Wn.isFunction,be=Wn.type==="genfrac",He=Wn.type==="surd",Ye=Wn.type==="mbin",nt=Wn.type==="mrel",dt=Wn.type==="mop"||Wn.type==="operator"||Wn.type==="extensible-symbol",Mt=Wn.type==="mpunct"||Wn.type==="minner",Zt=Wn.type==="array",sn=Wn.type==="mopen",bn=Wn.type==="mclose"||Wn.type==="leftright",Gr=Wn.type==="space"),y.after.includes("nothing")&&b||y.after.includes("letter")&&E||y.after.includes("digit")&&te||y.after.includes("function")&&le||y.after.includes("frac")&&be||y.after.includes("surd")&&He||y.after.includes("binop")&&Ye||y.after.includes("relop")&&nt||y.after.includes("operator")&&dt||y.after.includes("punct")&&Mt||y.after.includes("array")&&Zt||y.after.includes("openfence")&&sn||y.after.includes("closefence")&&bn||y.after.includes("text")&&Gn||y.after.includes("space")&&Gr?y.value:""}function Td(a,y,b){return b?ph(a,b[y]):""}var mh={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\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 $u(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=gh(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",Vs(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function Vs(a,y){var b,E,te;if(!a)return"";let le=!1,be;const He=(b=y.inlineShortcuts)!=null?b:mh;if(!le&&(a.startsWith("^")||a.startsWith("_"))&&(be=Bc(a.slice(1),{inlineShortcuts:He,noWrap:!0}),a=a[0]+"{"+be.match+"}",a+=Vs(be.rest,y),le=!0),le||(be=a.match(/^(sqrt|\u221A)(.*)/),be&&(be=Bc(be[2],{inlineShortcuts:He,noWrap:!0}),a="\\sqrt{"+((E=be.match)!=null?E:"\\placeholder{}")+"}",a+=Vs(be.rest,y),le=!0)),le||(be=a.match(/^(\\cbrt|\u221B)(.*)/),be&&(be=Bc(be[2],{inlineShortcuts:He,noWrap:!0}),a="\\sqrt[3]{"+((te=be.match)!=null?te:"\\placeholder{}")+"}",a+=Vs(be.rest,y),le=!0)),le||(be=a.match(/^abs(.*)/),be&&(be=Bc(be[1],{inlineShortcuts:He,noWrap:!0}),a="\\left|"+be.match+"\\right|",a+=Vs(be.rest,y),le=!0)),le||(be=a.match(/^["”“](.*?)["”“](.*)/),be&&(a="\\text{"+be[1]+"}",a+=Vs(be[2],y),le=!0)),le||(be=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),be&&(a=vh(be[1],He),a+=Vs(be[2],y),le=!0)),!le&&/^([fgh])[^a-zA-Z]/.test(a)&&(be=Bc(a.slice(1),{inlineShortcuts:He,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+be.match+"\\right)":a[0]+be.match,a+=Vs(be.rest,y),le=!0),le||(be=a.match(/^([a-zA-Z]+)(.*)/),be&&(a=vh(be[1],He),a+=Vs(be[2],y),le=!0)),!le)if(be=Bc(a,{inlineShortcuts:He,noWrap:!0}),be.match&&be.rest[0]==="/"){const Ye=Bc(be.rest.slice(1),{inlineShortcuts:He,noWrap:!0});Ye.match&&(a="\\frac{"+be.match+"}{"+Ye.match+"}"+Vs(Ye.rest,y)),le=!0}else be.match&&(a=a.startsWith("(")?"\\left("+be.match+"\\right)"+Vs(be.rest,y):be.match+Vs(be.rest,y),le=!0);return le||(be=a.match(/^(\s+)(.*)$/),be&&(a=" "+Vs(be[2],y),le=!0)),a}function Bc(a,y){let b="";a=a.trim();let E=a,te=a.charAt(0),le={"(":")","{":"}","[":"]"}[te];if(le){let be=1,He=1;for(;He<a.length&&be>0;)a[He]===te&&be++,a[He]===le&&be--,He++;be===0?(y.noWrap&&te==="("?b=Vs(a.substring(1,He-1),y):(te==="{"&&le==="}"&&(te="\\{",le="\\}"),b="\\left"+te+Vs(a.substring(1,He-1),y)+"\\right"+le),E=a.slice(Math.max(0,He))):(b=a.substring(1,He),E="")}else{let be=a.match(/^([a-zA-Z]+)/);if(be){let He=Td(null,a,y.inlineShortcuts);if(He)return He=He.replace("_{#?}",""),He=He.replace("^{#?}",""),{match:He,rest:a.slice(He.length)}}if(be=a.match(/^([a-zA-Z])/),be)return{match:be[1],rest:a.slice(1)};if(be=a.match(/^(-)?\d+(\.\d*)?/),be)return{match:be[0],rest:a.slice(be[0].length)};/^\\(left|right)/.test(a)||(be=a.match(/^(\\[a-zA-Z]+)/),be&&(E=a.slice(be[1].length),b=be[1]))}return{match:b,rest:E}}function vh(a,y){let b=Td(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var Od=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function Fc(a){const y=a.trim();for(const b of Od)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 gh(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=Fc(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 sd="$$",af="$$",sf=(a,y,b)=>(Od.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${sd} ${y} ${af}`),y),yh=class nf{constructor(y){nf._modes[y]=this}static onPaste(y,b,E){var te;if(!b.contentEditable&&b.userSelect==="none")return b.model.announce("plonk"),!1;if(typeof E=="string"){const be=new DataTransfer;be.setData("text/plain",E),E=be}const le=new ClipboardEvent("paste",{clipboardData:E,cancelable:!0});return(te=b.host)!=null&&te.dispatchEvent(le)?nf._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,te=E.selectionIsCollapsed?[0,E.lastOffset]:Fs(E.selection),le=E.getValue(te,b);navigator.clipboard.writeText(le).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 te=y.model,le=te.selectionIsCollapsed?[0,te.lastOffset]:Fs(te.selection);let be=te.getAtoms(le);if(be.every(He=>He.mode==="text"||!He.mode))b.clipboardData.setData("text/plain",be.filter(He=>He instanceof wc).map(He=>He.value).join(""));else if(be.every(He=>He.mode==="latex"))b.clipboardData.setData("text/plain",te.getAtoms(le,{includeChildren:!0}).map(He=>{var Ye;return(Ye=He.value)!=null?Ye:""}).join(""));else{let He;be.length===1&&be[0].verbatimLatex!==void 0?He=be[0].verbatimLatex:He=te.getValue(le,"latex-expanded"),b.clipboardData.setData("application/x-latex",He);try{b.clipboardData.setData("text/plain",y.options.onExport(y,He,le))}catch(Ye){}if(be.length===1){const Ye=be[0];(Ye.type==="root"||Ye.type==="group")&&(be=Ye.body.filter(nt=>nt.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(be.map(Ye=>Ye.toJson())))}catch(Ye){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const Ye=window.MathfieldElement.computeEngine;if(Ye)try{const nt=Ye.jsonSerializationOptions;Ye.jsonSerializationOptions={metadata:["latex"]};const dt=Ye.parse(te.getValue(le,"latex-unstyled"));Ye.jsonSerializationOptions=nt;const Mt=JSON.stringify(dt.json);Mt&&b.clipboardData.setData("application/json",Mt)}catch(nt){}}}b.preventDefault()}static insert(y,b,E={}){var te;const le=E.mode==="auto"?y.mode:(te=E.mode)!=null?te:y.mode;return nf._modes[le].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};yh._modes={};var ho=yh,lf=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],Rd={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function Ql(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function ec(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 zc(a){const y=ec(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 Nd(a,y,b){if(!y)return null;const E=a.field.getBoundingClientRect(),te=y.right-y.left,le=y.bottom-y.top,be=Math.ceil(y.left-E.left+a.field.scrollLeft*b),He=Math.ceil(y.top-E.top);return{left:be,right:be+te,top:He,bottom:He+le}}function Bd(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 te of a.children)if(te.nodeType===1&&"atomId"in te.dataset&&!te.classList.contains("pstrut")){const le=Bd(te);E.left=Math.min(E.left,le.left),E.right=Math.max(E.right,le.right),E.top=Math.min(E.top,le.top),E.bottom=Math.max(E.bottom,le.bottom)}return E}function Su(a,y){var b,E;if(!y.id)return null;let te=(E=(b=a.atomBoundsCache)==null?void 0:b.get(y.id))!=null?E:null;if(te!==null)return te;const le=a.field.querySelector(`[data-atom-id="${y.id}"]`);return te=le?Bd(le):null,a.atomBoundsCache&&(te?a.atomBoundsCache.set(y.id,te):a.atomBoundsCache.delete(y.id)),te!=null?te:null}function bh(a,y,b){const E=new Map;for(const te of a.model.getAtoms(y,{includeChildren:!0})){if(b!=null&&b.excludeAtomsWithBackground&&te.style.backgroundColor)continue;const le=a.field,be=le.offsetWidth;let Ye=Math.floor(le.getBoundingClientRect().width)/be;Ye=isNaN(Ye)?1:Ye;const nt=Nd(a,Su(a,te),Ye);if(nt){const dt=Pd(te);if(E.has(dt)){const Mt=E.get(dt);E.set(dt,{left:Math.min(Mt.left,nt.left),right:Math.max(Mt.right,nt.right),top:Math.min(Mt.top,nt.top),bottom:Math.max(Mt.bottom,nt.bottom)})}else E.set(dt,nt)}}return[...E.values()]}function Fd(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...bh(a,E,y)),[])}function zd(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function ld(a){let y=0,b=0;const E=a.offsetWidth,te=a.offsetHeight;for(;a instanceof HTMLElement;)y+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return new DOMRect(b,y,E,te)}var _h=`@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;
}
`,Sa=`.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);
}
`,xh=`#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);
}
`,cf=`/* 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;
}
`,Cu=`/* 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);*/
}
`,uf=`.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));
}
`,cd=`:host {
--primary-color: #5898ff;
--primary-color-dimmed: #c0c0f0;
--primary-color-dark: var(--blue-500);
--primary-color-light: var(--blue-100);
--primary-color-reverse: #ffffff;
--secondary-color: #ff8a65;
--secondary-color-dimmed: #f0d5c5;
--secondary-color-dark: var(--orange-500);
--secondary-color-light: var(--orange-100);
--secondary-color-reverse: #ffffff;
--link-color: #5898ff;
--link-color-dimmed: #c5c5c5;
--link-color-dark: #121212;
--link-color-light: #e2e2e2;
--link-color-reverse: #ffffff;
--semantic-blue: var(--blue-700);
--semantic-red: var(--red-400);
--semantic-orange: var(--orange-400);
--semantic-green: var(--green-700);
--neutral-100: #f5f5f5;
--neutral-200: #eeeeee;
--neutral-300: #e0e0e0;
--neutral-400: #bdbdbd;
--neutral-500: #9e9e9e;
--neutral-600: #757575;
--neutral-700: #616161;
--neutral-800: #424242;
--neutral-900: #212121;
--red-25: #fff8f7;
--red-50: #fff1ef;
--red-100: #ffeae6;
--red-200: #ffcac1;
--red-300: #ffa495;
--red-400: #ff7865;
--red-500: #f21c0d;
--red-600: #e50018;
--red-700: #d30024;
--red-800: #bd002c;
--red-900: #a1002f;
--orange-25: #fffbf8;
--orange-50: #fff7f1;
--orange-100: #fff3ea;
--orange-200: #ffe1c9;
--orange-300: #ffcca2;
--orange-400: #ffb677;
--orange-500: #fe9310;
--orange-600: #f58700;
--orange-700: #ea7c00;
--orange-800: #dc6d00;
--orange-900: #ca5b00;
--brown-25: #fff8ef;
--brown-50: #fff1df;
--brown-100: #ffe9ce;
--brown-200: #ebcca6;
--brown-300: #cdaf8a;
--brown-400: #af936f;
--brown-500: #856a47;
--brown-600: #7f5e34;
--brown-700: #78511f;
--brown-800: #6e4200;
--brown-900: #593200;
--yellow-25: #fffdf9;
--yellow-50: #fffcf2;
--yellow-100: #fffaec;
--yellow-200: #fff2ce;
--yellow-300: #ffe8ab;
--yellow-400: #ffdf85;
--yellow-500: #ffcf33;
--yellow-600: #f1c000;
--yellow-700: #dfb200;
--yellow-800: #c9a000;
--yellow-900: #ad8a00;
--lime-25: #f4ffee;
--lime-50: #e9ffdd;
--lime-100: #ddffca;
--lime-200: #a8fb6f;
--lime-300: #94e659;
--lime-400: #80d142;
--lime-500: #63b215;
--lime-600: #45a000;
--lime-700: #268e00;
--lime-800: #007417;
--lime-900: #005321;
--green-25: #f5fff5;
--green-50: #ebffea;
--green-100: #e0ffdf;
--green-200: #a7ffa7;
--green-300: #5afa65;
--green-400: #45e953;
--green-500: #17cf36;
--green-600: #00b944;
--green-700: #00a34a;
--green-800: #008749;
--green-900: #00653e;
--teal-25: #f3ffff;
--teal-50: #e6fffe;
--teal-100: #d9fffe;
--teal-200: #8dfffe;
--teal-300: #57f4f4;
--teal-400: #43e5e5;
--teal-500: #17cfcf;
--teal-600: #00c2c0;
--teal-700: #00b5b1;
--teal-800: #00a49e;
--teal-900: #009087;
--cyan-25: #f7fcff;
--cyan-50: #eff8ff;
--cyan-100: #e7f5ff;
--cyan-200: #c2e6ff;
--cyan-300: #95d5ff;
--cyan-400: #61c4ff;
--cyan-500: #13a7ec;
--cyan-600: #069eda;
--cyan-700: #0095c9;
--cyan-800: #0088b2;
--cyan-900: #0a7897;
--blue-25: #f7faff;
--blue-50: #eef5ff;
--blue-100: #e5f1ff;
--blue-200: #bfdbff;
--blue-300: #92c2ff;
--blue-400: #63a8ff;
--blue-500: #0d80f2;
--blue-600: #0077db;
--blue-700: #006dc4;
--blue-800: #0060a7;
--blue-900: #005086;
--indigo-25: #f8f7ff;
--indigo-50: #f1efff;
--indigo-100: #eae7ff;
--indigo-200: #ccc3ff;
--indigo-300: #ac99ff;
--indigo-400: #916aff;
--indigo-500: #63c;
--indigo-600: #5a21b2;
--indigo-700: #4e0b99;
--indigo-800: #3b0071;
--indigo-900: #220040;
--purple-25: #fbf7ff;
--purple-50: #f8f0ff;
--purple-100: #f4e8ff;
--purple-200: #e4c4ff;
--purple-300: #d49aff;
--purple-400: #c36aff;
--purple-500: #a219e6;
--purple-600: #9000c4;
--purple-700: #7c009f;
--purple-800: #600073;
--purple-900: #3d0043;
--magenta-25: #fff8fb;
--magenta-50: #fff2f6;
--magenta-100: #ffebf2;
--magenta-200: #ffcddf;
--magenta-300: #ffa8cb;
--magenta-400: #ff7fb7;
--magenta-500: #eb4799;
--magenta-600: #da3689;
--magenta-700: #c82179;
--magenta-800: #b00065;
--magenta-900: #8a004c;
}
@media (prefers-color-scheme: dark) {
:host {
--semantic-blue: var(--blue-700);
--semantic-red: var(--red-400);
--semantic-orange: var(--orange-400);
--semantic-green: var(--green-700);
--semantic-bg-blue: var(--blue-25);
--semantic-bg-red: var(--red-25);
--semantic-bg-orange: var(--orange-25);
--semantic-bg-green: var(--green-25);
--neutral-100: #121212;
--neutral-200: #424242;
--neutral-300: #616161;
--neutral-400: #757575;
--neutral-500: #9e9e9e;
--neutral-600: #bdbdbd;
--neutral-700: #e0e0e0;
--neutral-800: #eeeeee;
--neutral-900: #f5f5f5;
}
}
:host([theme='dark']) {
--semantic-blue: var(--blue-700);
--semantic-red: var(--red-400);
--semantic-orange: var(--orange-400);
--semantic-green: var(--green-700);
--semantic-bg-blue: var(--blue-25);
--semantic-bg-red: var(--red-25);
--semantic-bg-orange: var(--orange-25);
--semantic-bg-green: var(--green-25);
--neutral-100: #121212;
--neutral-200: #424242;
--neutral-300: #616161;
--neutral-400: #757575;
--neutral-500: #9e9e9e;
--neutral-600: #bdbdbd;
--neutral-700: #e0e0e0;
--neutral-800: #eeeeee;
--neutral-900: #f5f5f5;
}
/* @media (prefers-color-scheme: dark) {
:host {
--label-color: #fff;
--active-label-color: #000;
--menu-bg: #525252;
--active-bg: #5898ff;
--active-bg-dimmed: #5c5c5c;
}
} */
:host {
--ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol';
--ui-font-size: 14px;
--ui-line-height: 1.5;
--ui-letter-spacing: 0.007em;
--mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono',
'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
--ui-layer-1: var(--neutral-100);
--ui-layer-2: var(--neutral-200);
--ui-layer-3: var(--neutral-300);
--ui-layer-4: var(--neutral-400);
--ui-layer-5: var(--neutral-500);
--ui-layer-6: var(--neutral-600);
--ui-border-color: var(--primary-color);
--ui-border-radius: 4px;
--ui-text: var(--neutral-900);
--ui-text-secondary: var(--neutral-700);
--ui-text-placeholder: var(--neutral-500);
--ui-text-muted: var(--neutral-300);
/** A field is a UI element in which a user can type data, for
* example an input or textarea element.
*/
--ui-field-bg: var(--neutral-100);
--ui-field-bg-hover: var(--neutral-100);
--ui-field-bg-disabled: var(--neutral-300);
--ui-field-bg-invalid: var(--red-100);
--ui-field-bg-focus: var(--neutral-100);
--ui-field-border: 0.5px solid var(--border-color);
--ui-field-border-hover: 0.5px solid var(--border-color);
--ui-field-border-disabled: 0.5px solid var(--border-color);
--ui-field-border-invalid: 0.5px solid var(--border-color);
--ui-field-border-focus: 0.5px solid var(--border-color);
--ui-menu-bg: var(--neutral-100);
--ui-menu-text: var(--neutral-900);
--ui-menu-bg-hover: var(--neutral-200);
--ui-menu-text-hover: var(--neutral-900);
/** The \`active\` state is used for the state of menu items
* when they are selected.
*/
--ui-menu-bg-active: var(--primary-color);
--ui-menu-text-active: var(--primary-color-reverse);
/** The \`active-muted\` set is used for the state of
* submenus when they are open.
*/
--ui-menu-bg-active-muted: var(--neutral-300);
--ui-menu-text-active-muted: var(--neutral-900);
/* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
0 2px 6px 2px rgba(60, 64, 67, 0.149); */
--ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
--ui-menu-divider: 0.5px solid #c7c7c7;
/* var(--neutral-300); */
--ui-menu-z-index: 10000;
--page-bg: var(--neutral-100);
--content-bg: var(--neutral-200);
}
@media (prefers-color-scheme: dark) {
:host {
--ui-menu-bg: var(--neutral-200);
}
}
:host([theme='dark']) {
--ui-menu-bg: var(--neutral-200);
}
/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font.
Noto is a Linux/Android font.
*/
:lang(zh-cn),
:lang(zh-sg),
:lang(zh-my),
:lang(zh) {
--ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB',
'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI',
'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53',
STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;
}
:lang(zh-tw),
:lang(zh-hk),
:lang(zh-mo) {
--ui-font-family: -apple-system, system-ui, 'Noto Sans',
'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4',
'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;
}
:lang(ja),
:lang(ja-jp),
:lang(ja-jp-mac) {
--ui-font-family: -apple-system, system-ui, 'Hiragino Sans',
'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans',
'\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo,
'\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;
}
:lang(ko),
:lang(ko-kr),
:lang(ko-kr-std) {
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo',
'\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
}
:lang(ko-kr-apple) {
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo',
'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
}
:lang(zh-cn),
:lang(zh-sg),
:lang(zh-my),
:lang(zh),
:lang(zh-tw),
:lang(zh-hk),
:lang(zh-mo),
:lang(ja),
:lang(ja-jp),
:lang(ja-jp-mac),
:lang(ko),
:lang(ko-kr),
:lang(ko-kr-std),
:lang(ko-kr-apple) {
--ui-font-size: 1rem;
--ui-line-height: 1.7;
--ui-letter-spacing: 0;
}
:dir(rtl) {
--ui-line-height: auto;
--ui-letter-spacing: 0;
}
`,df=`.ui-menu *,
.ui-menu ::before,
.ui-menu ::after {
box-sizing: border-box;
}
.ui-menu {
display: none;
color-scheme: light dark;
-webkit-user-select: none;
/* Important: Safari iOS doesn't respect user-select */
user-select: none;
cursor: default;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0 0 0 0);
--active-label-color: #fff;
/* ui-menu-text-active */
--label-color: #121212;
/* ui-menu-text */
--menu-bg: #e2e2e2;
/* ui-menu-background */
--active-bg: #5898ff;
/* ui-menu-background-active */
--active-bg-dimmed: #c5c5c5;
/* ui-menu-background-active-muted */
}
/** Use the :where pseudo selector to make the specificity of the
* selector 0, so that it can be overridden by the user.
*/
:where(.ui-menu-container) {
position: absolute;
overflow: visible;
width: auto;
height: auto;
z-index: 10000;
border-radius: 8px;
background: var(--ui-menu-bg);
box-shadow: var(--ui-menu-shadow);
list-style: none;
padding: 6px 0 6px 0;
margin: 0;
user-select: none;
cursor: default;
color: var(--ui-menu-text);
font-weight: normal;
font-style: normal;
text-shadow: none;
text-transform: none;
letter-spacing: 0;
outline: none;
opacity: 1;
/* The [popover] elements have a 1px solid black border. Ugh. */
border: none;
width: fit-content;
height: fit-content;
}
:where(.ui-menu-container > li) {
display: flex;
flex-flow: row;
align-items: center;
padding: 1px 7px 1px 7px;
margin-top: 0;
margin-left: 6px;
margin-right: 6px;
border-radius: 4px;
white-space: nowrap;
position: relative;
outline: none;
fill: currentColor;
user-select: none;
cursor: default;
text-align: left;
color: inherit;
font-family: var(--ui-font-family);
font-size: var(--ui-font-size);
line-height: var(--ui-line-height);
letter-spacing: var(--ui-letter-spacing);
}
:where(.ui-menu-container > li > .label) {
appearance: none;
background: none;
outline: none;
width: 100%;
margin: 0;
padding: 1px 2px 1px 1px;
overflow: visible;
border: 1px solid transparent;
white-space: nowrap;
text-align: start;
}
:where(.ui-menu-container > li:has(.heading)) {
margin-top: 0.5em;
}
:where(.ui-menu-container > li > .label.heading) {
font-weight: bold;
opacity: 0.4;
}
:where(.ui-menu-container > li.indent > .label) {
margin-inline-start: 12px;
}
:where(.ui-menu-container > li > .label.indent) {
margin-inline-start: 12px;
}
:where(.ui-menu-container > li[role='divider']) {
border-bottom: 1px solid var(--ui-menu-divider);
border-radius: 0;
padding: 0;
margin-left: 15px;
margin-right: 15px;
padding-top: 5px;
margin-bottom: 5px;
width: calc(100% - 30px);
/** 100% - (margin-left + margin-right) */
}
:where(.ui-menu-container > li[aria-disabled='true']) {
opacity: 0.5;
}
:where(.ui-menu-container > li.active) {
background: var(--ui-menu-bg-active);
background: -apple-system-control-accent;
color: var(--ui-menu-text-active);
}
:where(.ui-menu-container > li.active.is-submenu-open) {
background: var(--ui-menu-bg-active-muted);
color: inherit;
}
:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
padding-inline-end: 0;
}
:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
color: var(--ui-menu-text-active);
}
/** Keyboard shortcut */
:where(.ui-menu-container > li > kbd) {
font-family: var(--ui-font-family);
margin-inline-start: 12px;
opacity: 0.4;
}
:where(.ui-menu-container > li.active > kbd) {
opacity: 0.85;
}
.ui-trailing-chevron {
display: flex;
margin-inline-start: 24px;
width: 10px;
height: 10px;
margin-bottom: 4px;
}
.ui-trailing-chevron:dir(rtl) {
transform: scaleX(-1);
}
.ui-checkmark {
display: flex;
margin-inline-end: -11px;
margin-inline-start: -4px;
margin-top: 2px;
width: 16px;
height: 16px;
}
.ui-mixedmark {
display: flex;
margin-inline-end: -11px;
margin-inline-start: -4px;
margin-top: 2px;
width: 16px;
height: 16px;
}
`,wa;function nu(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=Sa;break;case"mathfield":y=_h;break;case"environment-popover":y=xh;break;case"suggestion-popover":y=cf;break;case"keystroke-caption":y=Cu;break;case"virtual-keyboard":y=uf;break;case"ui":y=cd;break;case"menu":y=df;break;default:debugger}return y}function wu(a){return wa||(wa={}),wa[a]||(wa[a]=new CSSStyleSheet,wa[a].replaceSync(nu(a))),wa[a]}var Ec;function Wl(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(nu(a))),window.document.head.appendChild(b);return}if(Ec||(Ec={}),((y=Ec[a])!=null?y:0)!==0)Ec[a]+=1;else{const b=wu(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],Ec[a]=1}}function x(a){if("adoptedStyleSheets"in document&&Ec!=null&&Ec[a]&&(Ec[a]-=1,Ec[a]<=0)){const y=wa[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class k0 extends sr{constructor(y){var b;super(se(ae({},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 k0(y)}toJson(){return se(ae({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new jo({parent:y,mathstyle:"cramp"},this.style),te=(b=sr.createBox(E,this.body))!=null?b:new Ur("\u25A2",{style:this.style});let le=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(le=te.skew);let be=Math.min(te.height,ss),He;if(this.svgAccent)He=gl(this.svgAccent),be=E.metrics.bigOpSpacing1-be;else if(this.accent){const nt=new Ur(this.accent,{fontFamily:"Main-Regular"});nt.italic=0;const dt=this.accent===8407?" ML__accent-vec":"";He=new Ur(new Ur(nt),{classes:"ML__accent-body"+dt})}He=new ma({shift:0,children:[{box:new Ur(te)},-be,{box:He,marginLeft:te.left+2*le,classes:["ML__center"]}]});const Ye=new Ur(He,{type:"lift"});return this.caret&&(Ye.caret=this.caret),this.bind(E,Ye.wrap(E)),this.attachSupsub(E,{base:Ye})}},ie={"(":")","{":"}","[":"]","|":"|","\\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"},re=Object.fromEntries(Object.entries(ie).map(([a,y])=>[y,a]));function de(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 Pe(a,y,b,E){var te;const be=new Ur(de(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((te=E.classes)!=null?te:"")}).wrap(y);return b&&be.setTop((1-y.scalingFactor)*as),be}function tt(a,y,b,E,te){var le,be;const He=new jo({parent:E,mathstyle:"textstyle"},te==null?void 0:te.style),Ye=new Ur(de(a),{fontFamily:`Size${y}-Regular`,isSelected:te.isSelected,classes:((le=te.classes)!=null?le:"")+` ML__delim-size${y}`,type:(be=te.type)!=null?be:"ignore"}).wrap(He);return b&&Ye.setTop((1-He.scalingFactor)*as),Ye}function ft(a,y,b,E,te){var le;let be,He,Ye,nt;be=Ye=nt=de(a),He=null;let dt="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?Ye=be=nt=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?Ye=be=nt=8741:a==="\\uparrow"?Ye=nt=9168:a==="\\Uparrow"?Ye=nt=8214:a==="\\downarrow"?be=Ye=9168:a==="\\Downarrow"?be=Ye=8214:a==="\\updownarrow"?(be=8593,Ye=9168,nt=8595):a==="\\Updownarrow"?(be=8657,Ye=8214,nt=8659):a==="["||a==="\\lbrack"?(be=9121,Ye=9122,nt=9123,dt="Size4-Regular"):a==="]"||a==="\\rbrack"?(be=9124,Ye=9125,nt=9126,dt="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(Ye=be=9122,nt=9123,dt="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(be=9121,Ye=nt=9122,dt="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(Ye=be=9125,nt=9126,dt="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(be=9124,Ye=nt=9125,dt="Size4-Regular"):a==="("||a==="\\lparen"?(be=9115,Ye=9116,nt=9117,dt="Size4-Regular"):a===")"||a==="\\rparen"?(be=9118,Ye=9119,nt=9120,dt="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(be=9127,He=9128,nt=9129,Ye=9130,dt="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(be=9131,He=9132,nt=9133,Ye=9130,dt="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(be=9127,nt=9129,Ye=9130,dt="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(be=9131,nt=9133,Ye=9130,dt="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(be=9127,nt=9133,Ye=9130,dt="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(be=9131,nt=9129,Ye=9130,dt="Size4-Regular"):a==="\\surd"?(be=57345,nt=9143,Ye=57344,dt="Size4-Regular"):a==="\\ulcorner"?(be=9484,Ye=nt=32):a==="\\urcorner"?(be=9488,Ye=nt=32):a==="\\llcorner"?(nt=9492,Ye=be=32):a==="\\lrcorner"&&(be=9496,Ye=be=32);const Mt=_s(be,dt),Zt=Mt.height+Mt.depth,sn=_s(Ye,dt),bn=sn.height+sn.depth,Gn=_s(nt,dt),Gr=Gn.height+Gn.depth;let Wn=0,yr=1;if(He!==null){const Hs=_s(He,dt);Wn=Hs.height+Hs.depth,yr=2}const Qr=Zt+Gr+Wn,Ir=Math.max(0,Math.ceil((y-Qr)/(yr*bn))),Ni=Qr+Ir*yr*bn;let Yi=as;b&&(Yi=Yi*E.scalingFactor);const $i=Ni/2-Yi,Go=.008,Ca=[];Ca.push({box:new Ur(nt,{fontFamily:dt})}),Ca.push(-Go);const ci=new Ur(Ye,{fontFamily:dt});if(He===null)for(let Hs=0;Hs<Ir;Hs++)Ca.push({box:ci});else{for(let Hs=0;Hs<Ir;Hs++)Ca.push({box:ci});Ca.push(-Go),Ca.push({box:new Ur(He,{fontFamily:dt})}),Ca.push(-Go);for(let Hs=0;Hs<Ir;Hs++)Ca.push({box:ci})}Ca.push(-Go),Ca.push({box:new Ur(be,{fontFamily:dt})});let rc="";dt==="Size1-Regular"?rc=" delim-size1":dt==="Size4-Regular"&&(rc=" delim-size4");const Vc=new ma({bottom:$i,children:Ca},{classes:rc});return new Ur(Vc,se(ae({},te!=null?te:{}),{classes:((le=te==null?void 0:te.classes)!=null?le:"")+" ML__delim-mult"}))}var yt=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),Et=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),an=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),xn=[0,1.2,1.8,2.4,3];function Fn(a,y,b,E){return a===void 0||a==="."?Pi(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),yt.has(a)||an.has(a)?tt(a,y,!1,b,E):Et.has(a)?ft(a,xn[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var Pn=[{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}],hr=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],Rr=[{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 ai(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function Si(a,y,b,E){const te={"-4":0,"-3":1,0:2}[E.mathstyle.sizeDelta];for(let le=te;le<b.length&&b[le].type!=="stack";le++){const be=_s(a,ai(b[le]));if(be.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let He=be.height+be.depth;if(b[le].type==="small"&&(b[le].mathstyle==="scriptscriptstyle"?He*=Math.max(ms[Math.max(1,E.size-2)],E.minFontScale):b[le].mathstyle==="scriptstyle"&&(He*=Math.max(ms[Math.max(1,E.size-1)],E.minFontScale))),He>y)return b[le]}return b[b.length-1]}function Ti(a,y,b,E,te,le){if(!y||y.length===0||y===".")return Pi(te);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let be;an.has(y)?be=Pn:yt.has(y)?be=Rr:be=hr;const He=Si(de(y),b,be,te),Ye=new jo({parent:te,mathstyle:He.mathstyle},le==null?void 0:le.style);return He.type==="small"?Pe(y,Ye,E,se(ae({},le),{type:a})):He.type==="large"?tt(y,He.size,E,Ye,se(ae({},le),{type:a})):(console.assert(He.type==="stack"),ft(y,b,E,Ye,se(ae({},le),{type:a})))}function vi(a,y,b,E,te,le){if(y===".")return Pi(te,le==null?void 0:le.classes);const be=as*te.scalingFactor,He=901,Ye=5/As,nt=Math.max(b-be,E+be),dt=Math.max(nt/500*He,2*nt-Ye);return Ti(a,y,dt,!0,te,le)}function Pi(a,y){const b=new Ur(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new jo({parent:a,mathstyle:"textstyle"}))}var Ji=class L0 extends sr{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 L0(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{}"}},Qi=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],Io=["cases","dcases","rcases"],Ea=["align","align*","aligned","gather","gathered","split"],Rs=["array","subequations","eqnarray"];function Ya(a){return Rs.concat(Ea).concat(Io).concat(Qi).includes(a)}function sl(a){return Qi.includes(a)}function ll(a){return Io.includes(a)}function gs(a){return Ea.includes(a)}function cl(a,y,b){let E=0;for(const nt of b)"align"in nt&&(E+=1);let te=0;const le=[];for(const nt of y){let dt=0;for(te=Math.max(te,Math.min(nt.length,E));dt<nt.length;){const Mt=[],Zt=Math.min(nt.length,dt+E);for(;dt<Zt;){const sn=nt[dt];sn.length===0?Mt.push([new sr({type:"first",mode:a.mode})]):sn[0].type!=="first"?Mt.push([new sr({type:"first",mode:a.mode}),...sn]):(console.assert(!sn.slice(1).some(bn=>bn.type==="first")),Mt.push(sn)),dt+=1}le.push(Mt)}}le.length>0&&le[le.length-1].length===1&&le[le.length-1][0].length===1&&le[le.length-1][0][0].type==="first"&&le.pop();const be=[];for(const nt of le){if(nt.length!==te)for(let dt=nt.length;dt<te;dt++)nt.push([new sr({type:"first",mode:a.mode}),new Ji]);be.push(nt)}let He=0,Ye=0;for(const nt of be){Ye=0;for(const dt of nt){for(const Mt of dt)Mt.parent=a,Mt.parentBranch=[He,Ye];Ye+=1}He+=1}return a.isDirty=!0,be}var po=class D0 extends sr{constructor(y,b,E,te={}){var le;super({type:"array"}),this.environmentName=y,this.rowGaps=E,te.mathstyleName&&(this.mathstyleName=te.mathstyleName),te.columns&&(te.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=te.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=cl(this,b,this.colFormat),te.leftDelim&&(this.leftDelim=te.leftDelim),te.rightDelim&&(this.rightDelim=te.rightDelim),te.arraycolsep!==void 0&&(this.arraycolsep=te.arraycolsep),this.colSeparationType=te.colSeparationType,te.arraystretch!==void 0&&(this.arraystretch=te.arraystretch),this.minColumns=(le=te.minColumns)!=null?le:1}static fromJson(y){return new D0(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=se(ae({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(b=>b.map(E=>E.map(te=>te.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(Fu(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return Fu(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(Cc(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 te of E)y.push(...te.children),y.push(te);return[...y,...super.children]}render(y){var b,E,te,le,be,He;const Ye=new jo({parent:y,mathstyle:this.mathstyleName},this.style),nt=Ye.getRegisterAsEm("arrayrulewidth"),dt=Ye.getRegisterAsEm("arraycolsep"),Mt=Ye.getRegisterAsEm("doublerulesep"),Zt=(E=(b=this.arraystretch)!=null?b:Ye.getRegisterAsNumber("arraystretch"))!=null?E:1;let sn=typeof this.arraycolsep=="number"?this.arraycolsep:dt;this.colSeparationType==="small"&&(sn=.2778*(new jo({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const bn=Zt*vl,Gn=.7*bn,Gr=.3*bn;let Wn=0;const yr=[];let Qr=0;const Ir=this.array.length;for(let ka=0;ka<Ir;++ka){const ds=this.array[ka];Qr=Math.max(Qr,ds.length);const Ks=new jo({parent:Ye,mathstyle:this.mathstyleName},this.style);let Gc=Gn/Ks.scalingFactor,Yc=Gr/Ks.scalingFactor;const Xc={cells:[],height:0,depth:0,pos:0};for(const Lc of ds){const ep=(te=sr.createBox(Ks,Lc,{type:"ignore"}))!=null?te:new Ur(null,{type:"ignore"});Yc=Math.max(Yc,ep.depth),Gc=Math.max(Gc,ep.height),Xc.cells.push(ep)}let Jc=(le=Kl(this.rowGaps[ka]))!=null?le:0;Jc>0&&(Jc+=Gr,Yc=Math.max(Yc,Jc),Jc=0),ka<Ir-1&&!sl(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Yc+=Ye.getRegisterAsEm("jot")),Xc.height=Gc,Xc.depth=Yc,Wn+=Gc,Xc.pos=Wn,Wn+=Yc+Jc,yr.push(Xc)}const Ni=Wn/2+as,Yi=[];for(let ka=0;ka<Qr;ka++){const ds=[];for(const Ks of yr){const Gc=Ks.cells[ka];Gc.depth=Ks.depth,Gc.height=Ks.height,ds.push({box:Gc,shift:Ks.pos-Ni})}ds.length>0&&Yi.push(new ma({individualShift:ds}))}const $i=[];let Go=!1,Ca=!1,ci=0,rc=!this.leftDelim;const{colFormat:Vc}=this;for(const ka of Vc){if("align"in ka&&ci>=Yi.length)break;if("align"in ka)Go?$i.push(Xa(2*sn)):(Ca||rc)&&$i.push(Xa(sn)),$i.push(new Ur(Yi[ci],{classes:"col-align-"+ka.align})),ci++,Go=!0,Ca=!1,rc=!1;else if("gap"in ka){if(typeof ka.gap=="number")$i.push(Xa(ka.gap));else{const ds=ns(y,yr,Ni,ka.gap);ds&&$i.push(ds)}Go=!1,Ca=!1,rc=!1}else if("separator"in ka){const ds=new Ur(null,{classes:"vertical-separator"});ds.height=Wn,ds.setStyle("height",Wn,"em"),ds.setStyle("border-right",`${nt}em ${ka.separator} currentColor`),ds.setStyle("vertical-align",-(Wn-Ni),"em");let Ks=0;Ca?Ks=Mt-nt:Go&&(Ks=sn-nt),ds.left=Ks,$i.push(ds),Go=!1,Ca=!0,rc=!1}}Go&&!this.rightDelim&&$i.push(Xa(sn));const fc=new Ur($i,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(fc.caret=this.caret),this.bind(y,fc);const Hs=fc.height,ic=fc.depth,Tl=this.bind(y,new Ur([this.bind(y,vi("open",(be=this.leftDelim)!=null?be:".",Hs,ic,Ye,{isSelected:this.isSelected})),fc,this.bind(y,vi("close",(He=this.rightDelim)!=null?He:".",Hs,ic,Ye,{isSelected:this.isSelected}))],{type:"ord"}));return Tl?(Tl.setStyle("display","inline-block"),this.caret&&(Tl.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:Tl}))):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 te of this.colFormat)"align"in te&&typeof te.align=="string"?E.push(te.align):"separator"in te&&te.separator==="solid"?E.push("|"):"separator"in te&&te.separator==="dashed"&&E.push(":");E.push("}")}for(let te=0;te<this.array.length;te++){for(let le=0;le<this.array[te].length;le++)le>0&&E.push(" & "),E.push(sr.serialize(this.array[te][le],y));if(te<this.array.length-1){const le=this.rowGaps[te];le!=null&&le.dimension?E.push(`\\\\[${le.dimension} ${(b=le.unit)!=null?b:"pt"}] `):E.push("\\\\ ")}}return this.environmentName==="lines"?E.push("}"):E.push(`\\end{${this.environmentName}}`),ko(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 le of this.array[y][b])le.parent=void 0,le.parentBranch=void 0;let te=E;(E.length===0||E[0].type!=="first")&&(te=[new sr({type:"first",mode:this.mode}),...E]),this.array[y][b]=te;for(const le of te)le.parent=this,le.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(ts(this));this.array.splice(y,0,b);for(let E=y;E<this.rowCount;E++)for(let te=0;te<this.colCount;te++){const le=this.array[E][te];if(le)for(const be of le)be.parentBranch=[E,te]}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(ts(this));this.array.splice(y+1,0,b);for(let E=y+1;E<this.rowCount;E++)for(let te=0;te<this.colCount;te++){const le=this.array[E][te];if(le)for(const be of le)be.parentBranch=[E,te]}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 te of E)if(te)for(const le of te)le.parent=void 0,le.parentBranch=void 0;for(let E=y;E<this.rowCount;E++)for(let te=0;te<this.colCount;te++){const le=this.array[E][te];if(le)for(const be of le)be.parentBranch=[E,te]}this.isDirty=!0}addColumnBefore(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y,0,ts(this));for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const te=this.array[b][E];if(te)for(const le of te)le.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,ts(this));for(let b=0;b<this.rowCount;b++)for(let E=y+1;E<this.colCount;E++){const te=this.array[b][E];if(te)for(const le of te)le.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 te of E)if(te)for(const le of te)le.parent=void 0,le.parentBranch=void 0}for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const te=this.array[b][E];if(te)for(const le of te)le.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(te=>te.type!=="first"));return y}};function ts(a){const y=new sr({type:"first",mode:a.mode});y.parent=a;const b=new Ji;return b.parent=a,[y,b]}function Xa(a){const y=new Ur(null,{classes:"arraycolsep"});return y.width=a,y}function ns(a,y,b,E){if(!E)return null;const te=[];for(const le of y){const be=sr.createBox(a,E,{type:"ignore"});be&&(be.depth=le.depth,be.height=le.height,te.push({box:be,shift:le.pos-b}))}return new ma({individualShift:te}).wrap(a)}var cs=class A0 extends sr{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 A0(y)}toJson(){return se(ae({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(y){var b,E,te,le;const be=sr.createBox(y,this.body,{type:"lift"});if(!be)return null;const He=y.toEm((b=this.offset)!=null?b:{dimension:0});be.depth+=He,be.setStyle("display","inline-block"),be.setStyle("position","relative"),be.setStyle("height",Math.floor(100*be.height+be.depth)/100,"em"),be.setStyle("vertical-align",-Math.floor(100*be.height)/100,"em");const Ye=new jo({parent:y},this.style),nt=Ye.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),dt=new Ur(null,{classes:"ML__box"});dt.height=be.height+nt,dt.depth=be.depth+nt,dt.setStyle("box-sizing","border-box"),dt.setStyle("position","absolute"),dt.setStyle("top",-nt+.3,"em"),dt.setStyle("left",0),dt.setStyle("height",dt.height+dt.depth,"em"),dt.setStyle("width","100%"),this.backgroundcolor&&dt.setStyle("background-color",(te=Ye.toColor(this.backgroundcolor))!=null?te:"transparent"),this.framecolor&&dt.setStyle("border",`${Ye.getRegisterAsEm("fboxrule",2)}em solid ${(le=Ye.toColor(this.framecolor))!=null?le:"black"}`),this.border&&dt.setStyle("border",this.border);const Mt=new Ur([dt,be],{type:"lift"});return Mt.setStyle("display","inline-block"),Mt.setStyle("position","relative"),Mt.setStyle("line-height",0),Mt.height=be.height+nt+(He>0?He:0),Mt.depth=be.depth+nt+(He<0?-He:0),Mt.setStyle("padding-left",nt,"em"),Mt.setStyle("padding-right",nt,"em"),Mt.setStyle("height",Math.floor(100*(be.height+be.depth+2*nt+Math.abs(He)))/100,"em"),Mt.setStyle("margin-top",-nt,"em"),Mt.setStyle("top",Math.floor(100*(be.depth-be.height+2*nt-He))/100,"em"),Mt.setStyle("vertical-align",Math.floor(100*(be.depth+2*nt))/100,"em"),this.caret&&(Mt.caret=this.caret),this.attachSupsub(y,{base:Mt})}_serialize(y){return y.skipStyles?ko([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},ru=class I0 extends sr{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 I0(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new Ur(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},bl=class T0 extends sr{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new T0(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},zs=class O0 extends sr{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 O0(y.body,y.mode,y.style)}render(y){const b=sr.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=qt(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},sa=class R0 extends sr{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 R0((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 te=this.matchingRightDelim();return this.variant==="left...right"?ko(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",te]):this.variant==="mleft...mright"?ko(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",te]):ko([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(y),te])}matchingRightDelim(){var y,b;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const E=(y=this.leftDelim)!=null?y:".";return(b=ie[E])!=null?b:E}render(y){var b,E;const te=new jo({parent:y},this.style);console.assert(this.body!==void 0);const le=new jo({parent:y,mathstyle:"textstyle"},this.style),be=(b=sr.createBox(te,this.body,{type:"inner"}))!=null?b:new Ur(null,{type:"inner"}),He=be.height/le.scalingFactor,Ye=be.depth/le.scalingFactor,nt=[];if(this.leftDelim&&nt.push(this.bind(le,vi("open",this.leftDelim,He,Ye,le,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),be&&(xs(be.children,this,te,He,Ye),nt.push(be)),this.rightDelim){let sn=this.containsCaret?" ML__contains-caret":"",bn=this.rightDelim;bn==="?"&&(te.smartFence?(bn=this.matchingRightDelim(),sn+=" ML__smart-fence__close"):bn="."),nt.push(this.bind(le,vi("close",bn,He,Ye,le,{isSelected:this.isSelected,classes:sn+" ML__close",mode:this.mode,style:this.style})))}let dt=this.variant==="mleft...mright";const Mt=this.leftSibling;Mt&&(!dt&&Mt.isFunction&&(dt=!0),!dt&&Mt.type==="subsup"&&((E=Mt.leftSibling)!=null&&E.isFunction)&&(dt=!0));const Zt=new Ur(nt,{type:dt?"close":"inner",classes:"left-right"});return Zt.setStyle("margin-top",`${-be.depth}em`),Zt.setStyle("height",`${be.height+be.depth}em`),this.caret&&(Zt.caret=this.caret),this.bind(te,Zt.wrap(te))}};function xs(a,y,b,E,te){if(a)for(let le=0;le<a.length;le++){const be=a[le];be.type==="middle"?(a[le]=y.bind(b,vi("inner",be.value,E,te,b,{isSelected:y.isSelected})),a[le].caret=be.caret,a[le].isSelected=be.isSelected,a[le].cssId=be.cssId,a[le].htmlData=be.htmlData,a[le].htmlStyle=be.htmlStyle,a[le].attributes=be.attributes,a[le].cssProperties=be.cssProperties):be.children&&xs(be.children,y,b,E,te)}}var ud=class P0 extends sr{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 P0(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=sr.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},Mc=class N0 extends sr{constructor(){super({type:"macro-argument"})}static fromJson(y){return new N0}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},$c=class B0 extends sr{constructor(y,b,E=!1,te,le){var be;super({type:"prompt",mode:(be=le==null?void 0:le.mode)!=null?be:"math",style:le==null?void 0:le.style,command:"\\placeholder"}),this.body=te,this.correctness=b,this.placeholderId=y,this.locked=E,this.captureSelection=this.locked}static fromJson(y){return new B0(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 jo({parent:y}),E=b.getRegisterAsEm("fboxsep"),te=E,le=E,be=sr.createBox(y,this.body);if(!be)return null;be.height||(be.height=b.metrics.xHeight),be.setStyle("vertical-align",-be.height,"em"),this.correctness==="correct"?be.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&be.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const He=new Ur(be,{type:"ord"});He.setStyle("display","inline-block"),He.setStyle("height",be.height+be.depth,"em"),He.setStyle("vertical-align",-le,"em");let Ye="ML__prompt ";this.locked?Ye+=" ML__lockedPromptBox ":Ye+=" ML__editablePromptBox ",this.correctness==="correct"?Ye+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(Ye+=" ML__incorrectPromptBox "),this.containsCaret&&(Ye+=" ML__focusedPromptBox ");const nt=new Ur(null,{classes:Ye,attributes:{part:"prompt"}});nt.height=He.height+le,nt.depth=He.depth+le,nt.width=He.width+2*te,nt.setStyle("box-sizing","border-box"),nt.setStyle("position","absolute"),nt.setStyle("height",He.height+He.depth+2*le,"em"),te===0&&nt.setStyle("width","100%"),te!==0&&(nt.setStyle("width",`calc(100% + ${2*te}em)`),nt.setStyle("top",E,"em"),nt.setStyle("left",-te,"em")),(!this.body||this.body.length===1)&&(nt.width=3*te,nt.setStyle("width",`calc(100% + ${3*te}em)`),nt.setStyle("left",-1.5*te,"em"));let dt="";this.correctness==="incorrect"&&(dt+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),dt&&(nt.svgOverlay=dt);const Mt=new Ur([nt,He],{classes:"ML__prompt-atom"});return Mt.setStyle("position","relative"),Mt.setStyle("display","inline-block"),Mt.setStyle("line-height",0),Mt.height=He.height+le+.2,Mt.depth=He.depth+le,Mt.left=te,Mt.right=te,Mt.setStyle("height",He.height+le,"em"),Mt.setStyle("top",He.depth-He.height,"em"),Mt.setStyle("vertical-align",He.depth+le,"em"),Mt.setStyle("margin-left",.5,"em"),Mt.setStyle("margin-right",.5,"em"),this.caret&&(Mt.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:Mt}))}_serialize(y){var b;const E=(b=this.bodyToLatex(y))!=null?b:"";if(y.skipPlaceholders)return E;let te="\\placeholder";return this.placeholderId&&(te+=`[${this.placeholderId}]`),this.correctness==="correct"?te+="[correct]":this.correctness==="incorrect"&&(te+="[incorrect]"),this.locked&&(te+="[locked]"),xa(te,E)}},uc=class F0 extends sr{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new F0(y);for(const E of xu)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new jo({parent:y,isPhantom:!0}),te=this.leftSibling,le=(b=te.render(E))!=null?b:new Ur(null),be=new Ur(null);return be.height=le.height,be.depth=le.depth,this.attachSupsub(y,{base:be,isCharacterBox:te.isCharacterBox(),type:"ignore"})}_serialize(y){return this.supsubToLatex(y)}};function ys(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var iu=class{constructor(a,y,b){this.errors=[],this.index=0,this.endCount=0;var E,te,le,be;b!=null||(b={}),this.tokens=a,this.context=y instanceof jo&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new jo({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:(te=b.style)!=null?te:{},parseMode:(le=b.parseMode)!=null?le:"math",mathstyle:(be=b.mathstyle)!=null?be:"displaystyle",tabular:!1}}beginContext(a){var y,b,E;const te=this.parsingContext,le={parent:te,mathlist:[],style:ae({},te.style),parseMode:(y=a==null?void 0:a.mode)!=null?y:te.parseMode,mathstyle:(b=a==null?void 0:a.mathstyle)!=null?b:te.mathstyle,tabular:(E=a==null?void 0:a.tabular)!=null?E:!1};this.parsingContext=le}endContext(){this.parsingContext=this.parsingContext.parent}onError(a){this.errors.push(ae({before:Al(this.tokens.slice(this.index,this.index+10)),after:Al(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 ae({},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 uc({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=qt(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?$s(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Ji({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 le=this.get();ys(le)?(E+=le,b=this.end()||E.length>=a.length):b=!0}const te=a.toUpperCase()===E.toUpperCase();return te||(this.index=y),te}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(ys(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,te=this.peek();for(;te==="<space>"||te==="+"||te==="-";)this.get(),te==="-"&&(E=!E),te=this.peek();a=!!a;let le=10,be=/\d/;if(this.match("'"))le=8,be=/[0-7]/,a=!0;else if(this.match('"'))le=16,be=/[\dA-F]/,a=!0;else if(this.match("x"))le=16,be=/[\dA-Fa-f]/,a=!0;else if(this.match("`"))return te=this.get(),te?te.length===2&&te.startsWith("\\")?{number:(E?-1:1)*((y=te.codePointAt(1))!=null?y:0),base:"alpha"}:{number:(E?-1:1)*((b=te.codePointAt(0))!=null?b:0),base:"alpha"}:null;let He="";for(;this.hasPattern(be);)He+=this.get();if(!a&&(this.match(".")||this.match(",")))for(He+=".";this.hasPattern(be);)He+=this.get();const Ye=a?Number.parseInt(He,le):Number.parseFloat(He);return Number.isNaN(Ye)?null:{number:E?-Ye:Ye,base:le===16?"hexadecimal":le===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 le=this.peek();if(le==="-")E=!E;else if(le!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const le=this.get();return le.startsWith("\\")?b?{register:le,global:!0,factor:(E?-1:1)*b.number}:E?{register:le,global:!0,factor:-1}:{register:le,global:!0}:(this.index=y,null)}let te=this.get();return te!=null&&te.startsWith("\\")?(te=te.substring(1),this.context.registers[te]?!E||b!==null?{register:te,factor:(E?-1:1)*((a=b==null?void 0:b.number)!=null?a:1)}:{register:te}:(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()||!ys(this.peek()))return null;const te=this.scanString();return te.length>0?{string:te}: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=Qe(a);if(!y)return this.onError({code:"unknown-environment",arg:a}),null;const b=[];if(y.params)for(const He of y.params)if(He.isOptional)b.push(this.scanOptionalArgument(He.type));else{const Ye=this.scanArgument(He.type);Ye||this.onError({code:"missing-argument",arg:a}),b.push(Ye)}this.beginContext({tabular:y.tabular});const E=[],te=[];let le=[],be=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:a}),be=!0),!be&&this.match("\\end")&&(this.scanArgument("string")!==a&&this.onError({code:"unbalanced-environment",arg:a}),be=!0),!be)if(this.matchColumnSeparator())le.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){le.push(this.mathlist),this.mathlist=[];let He=null;this.skipWhitespace(),this.match("[")&&(He=this.scanDimen(),this.skipWhitespace(),this.match("]")),te.push(He!=null?He:{dimension:0}),E.push(le),le=[]}else this.mathlist.push(...this.scan(He=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(He)));while(!be);return le.push(this.mathlist),le.length>0&&E.push(le),this.endContext(),y.createAtom(a,E,te,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=be=>be==="<}>");let y="",b=null,E=[],te=null;for(;!this.end()&&!a(this.peek());)this.hasInfixCommand()&&!y?(y=this.get(),b=qt(y,"math"),b&&(E=this.scanArguments(b)[1]),te=this.mathlist,this.mathlist=[]):this.parseExpression();let le;return y?(console.assert(!!b),E.unshift(this.mathlist),te&&E.unshift(te),le=[b.createAtom({command:y,args:E,style:this.style,mode:this.parseMode})]):le=this.mathlist,this.endContext(),le}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 zs(y,this.parseMode,this.style);return b.verbatimLatex=Al(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 sa("",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(!ys(a)&&!a.startsWith("\\"))return null;this.next();const y=qt(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 bl("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new bl("\\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 bl(y==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(y);)this.parseExpression();const E=this.mathlist;this.endContext();const te=(a=this.scanDelim())!=null?a:".";return new sa(y==="\\right"?"left...right":"mleft...mright",E,{leftDelim:b,rightDelim:te,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 sr({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):y.addChild(new sr({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&y.addChildren(vt(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 te=a.params[E];te.type==="rest"?b.push(this.scan(le=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(le))):te.isOptional?b.push(this.scanOptionalArgument(te.type)):te.type.endsWith("*")?y=te.type.slice(0,-1):b.push(this.scanArgument(te.type)),E+=1}return[y,b]}scanSymbolOrLiteral(){const a=this.peek();if(!a)return null;this.next();let y;if(ys(a)){const b=nl.createAtom(this.parseMode,a,ae({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=qt(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new bl(a)];if(b.definitionType==="symbol"){const E=ae({},this.style);b.variant&&(E.variant=b.variant),y=new sr({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 bl(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 te=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),te}if(a==="text"){a!==b&&this.beginContext({mode:"text"});const te=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),te}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 te=this.mathlist;return this.endContext(),{group:te}}if(a==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const te=this.mathlist;return this.endContext(),{group:te}}let E=null;if(a==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const te=this.mathlist;return this.endContext(),{group:te}}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 te of E){const le=te.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(le)b.padding={dimension:parseInt(le[1]),unit:le[2]};else{const be=te.match(/^\s*border\s*:\s*(.*)/);be?b.border=be[1]:b.backgroundcolor={string:te}}}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 He=this.scanOptionalArgument("string"),Ye=this.scanOptionalArgument("math"),nt=sr.serialize(Ye,{defaultMode:"math"});let dt=[],Mt;!Mt&&nt==="correct"?Mt="correct":!Mt&&nt==="incorrect"?Mt="incorrect":nt!==""&&(dt=Ye);const Zt=this.scanOptionalArgument("string")==="locked",sn=this.scanArgument("auto");let bn;return sn&&Array.isArray(sn)&&sn.length>0?bn=sn:sn&&typeof sn=="object"&&"group"in sn?bn=sn.group:bn=dt,He?[new $c(He,Mt,Zt,bn!=null?bn:dt,{mode:this.parseMode,style:this.style})]:[new Ji({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const He=this.index,Ye=this.scanLiteralGroup()||this.next();if(!Ye)return null;if(this.context.registers[Ye.substring(1)]){const nt=this.scanArgument("string");nt!==null&&(this.context.registers[Ye.substring(1)]=nt);const dt=ko([a,Al(this.tokens.slice(He,this.index))]);return[new sr({type:"text",value:"",verbatimLatex:dt})]}}let te=this.scanMacro(a);if(te)return[te];const le=qt(a,this.parseMode);if(!le)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(He=>new sr({type:"text",value:He,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new bl(a)]);const be=this.index;if(le.definitionType==="symbol"){const He=ae({},this.style);le.variant&&(He.variant=le.variant),te=new sr({type:le.type,command:a,style:He,value:String.fromCodePoint(le.codepoint),mode:this.parseMode})}else{if(le.ifMode&&!le.ifMode.includes(this.parseMode))return[];const He=this.parseMode;le.applyMode&&(this.parseMode=le.applyMode);let Ye,nt=[];if(le.parse?nt=le.parse(this):[Ye,nt]=this.scanArguments(le),this.parseMode=He,le.applyMode&&!le.applyStyle&&!le.createAtom)return vt(nt[0]);if(le.infix)return this.onError({code:"too-many-infix-commands",arg:a}),null;if(typeof le.createAtom=="function")te=le.createAtom({command:a,args:nt,style:this.style,mode:this.parseMode}),Ye&&(te.body=vt(this.scanArgument(Ye)));else if(typeof le.applyStyle=="function"){const dt=ae(ae({},this.style),le.applyStyle(a,nt,this.context)),Mt=this.parseMode;if(le.applyMode&&(this.parseMode=le.applyMode),Ye){const Zt=this.style;this.style=dt;const sn=this.scanArgument(Ye);return this.style=Zt,this.parseMode=Mt,vt(sn)}this.style=dt}else te=new sr({type:"mord",command:(b=le.command)!=null?b:a,style:ae({},this.style),value:a,mode:(E=le.applyMode)!=null?E:this.parseMode})}if(!te)return null;if(te instanceof sr&&te.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const He=ko([a,Al(this.tokens.slice(be,this.index))]);He&&(te.verbatimLatex=He)}if(te.verbatimLatex===null&&(te.verbatimLatex=void 0),te.isFunction&&this.smartFence){const He=this.scanSmartFence();if(He)return[te,He]}return[te]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(ys(a)){const y=nl.createAtom(this.parseMode,a,ae({},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 wc(" "," ",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,te=b.args,le={"?":(y=this.args)==null?void 0:y.call(this,"?")};for(let be=1;be<=te;be++){let He=this.scanLiteralGroup();if(!He){const Ye=this.index;this.scanExpression(),He=Al(this.tokens.slice(Ye,this.index))}le[be]=He}return new ud(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:Al(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:$s(b.def,{context:this.context,parseMode:this.parseMode,args:be=>le[be],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var a,y,b,E;let te=(E=(b=(y=(a=this.scanEnvironment())!=null?a:this.scanModeShift())!=null?y:this.scanModeSet())!=null?b:this.scanGroup())!=null?E:this.scanLeftRight();if(te===null){if(this.parseSupSub()||this.parseLimits())return!0;te=this.scanSymbolCommandOrLiteral()}return te?(Array.isArray(te)?this.mathlist.push(...te):this.mathlist.push(te),!0):!1}};function $s(a,y){var b,E,te,le;const be=(b=y==null?void 0:y.args)!=null?b:void 0,He=new iu($l(a,be),y==null?void 0:y.context,{args:be,mathstyle:(E=y==null?void 0:y.mathstyle)!=null?E:"displaystyle",parseMode:(te=y==null?void 0:y.parseMode)!=null?te:"math",style:(le=y==null?void 0:y.style)!=null?le:{}}),Ye=[];for(;!He.end();)Ye.push(...He.scan(()=>!1));return Ye}function tp(a,y){var b;const E=new iu($l(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 np=class z0 extends sr{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=Za.go(zr.go(b,y==="\\pu"?"pu":"ce"),!1);this.body=$s(E),this._verbatimLatex=y+"{"+b+"}",this.arg=b,this.captureSelection=!0}static fromJson(y){return new z0(y.command,y.arg)}set verbatimLatex(y){}get verbatimLatex(){return this._verbatimLatex}toJson(){return se(ae({},super.toJson()),{arg:this.arg})}render(y){const b=sr.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}};It(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new np(a.command,(y=a.args[0])!=null?y:"")}});var zr={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 te,le=10,be=[];;){te!==a?(le=10,te=a):le--;var He=zr.stateMachines[y],Ye=He.transitions[b]||He.transitions["*"];e:for(var nt=0;nt<Ye.length;nt++){var dt=zr.patterns.match_(Ye[nt].pattern,a);if(dt){for(var Mt=Ye[nt].task,Zt=0;Zt<Mt.action_.length;Zt++){var sn;if(He.actions[Mt.action_[Zt].type_])sn=He.actions[Mt.action_[Zt].type_](E,dt.match_,Mt.action_[Zt].option);else if(zr.actions[Mt.action_[Zt].type_])sn=zr.actions[Mt.action_[Zt].type_](E,dt.match_,Mt.action_[Zt].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+Mt.action_[Zt].type_+")"];zr.concatArray(be,sn)}if(b=Mt.nextState||b,a.length>0){if(Mt.revisit||(a=dt.remainder),!Mt.toContinue)break e}else return be}}if(le<=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=zr.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 zr.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return zr.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return zr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return zr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return zr.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return zr.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return zr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return zr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return zr.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return zr.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return zr.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return zr.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return zr.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 zr.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return zr.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return zr.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return zr.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 zr.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return zr.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return zr.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return zr.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return zr.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return zr.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return zr.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return zr.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=zr.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,te,le,be,He,Ye,nt){var dt=function(Wn,yr){if(typeof yr=="string")return Wn.indexOf(yr)!==0?null:yr;var Qr=Wn.match(yr);return Qr?Qr[0]:null},Mt=function(Wn,yr,Qr){for(var Ir=0;yr<Wn.length;){var Ni=Wn.charAt(yr),Yi=dt(Wn.substr(yr),Qr);if(Yi!==null&&Ir===0)return{endMatchBegin:yr,endMatchEnd:yr+Yi.length};if(Ni==="{")Ir++;else if(Ni==="}"){if(Ir===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];Ir--}yr++}return Ir>0,null},Zt=dt(a,y);if(Zt===null||(a=a.substr(Zt.length),Zt=dt(a,b),Zt===null))return null;var sn=Mt(a,Zt.length,E||te);if(sn===null)return null;var bn=a.substring(0,E?sn.endMatchEnd:sn.endMatchBegin);if(le||be){var Gn=this.findObserveGroups(a.substr(sn.endMatchEnd),le,be,He,Ye);if(Gn===null)return null;var Gr=[bn,Gn.match_];return{match_:nt?Gr.join(""):Gr,remainder:Gn.remainder}}else return{match_:bn,remainder:a.substr(sn.endMatchEnd)}},match_:function(a,y){var b=zr.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return zr.patterns.patterns[a](y);var E=y.match(b);if(E){var te;return E[2]?te=[E[1],E[2]]:E[1]?te=E[1]:te=E[0],{match_:te,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 zr.go(y,"text")},"{text}":function(a,y){var b=["{"];return zr.concatArray(b,zr.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return zr.go(y,"tex-math")},"tex-math tight":function(a,y){return zr.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 zr.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 zr.go(y,"9,9")}},createTransitions:function(a){var y,b,E,te,le={};for(y in a)for(b in a[y])for(E=b.split("|"),a[y][b].stateArray=E,te=0;te<E.length;te++)le[E[te]]=[];for(y in a)for(b in a[y])for(E=a[y][b].stateArray||[],te=0;te<E.length;te++){var be=a[y][b];if(be.action_){be.action_=[].concat(be.action_);for(var He=0;He<be.action_.length;He++)typeof be.action_[He]=="string"&&(be.action_[He]={type_:be.action_[He]})}else be.action_=[];for(var Ye=y.split("|"),nt=0;nt<Ye.length;nt++)if(E[te]==="*")for(var dt in le)le[dt].push({pattern:Ye[nt],task:be});else le[E[te]].push({pattern:Ye[nt],task:be})}return le},stateMachines:{}};zr.stateMachines={ce:{transitions:zr.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 zr.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 zr.concatArray(b,this.output(a)),zr.concatArray(b,zr.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=zr.patterns.match_("orbital",a.o||""),te=zr.patterns.match_("one lowercase greek letter $",a.o||""),le=zr.patterns.match_("one lowercase latin letter $",a.o||""),be=zr.patterns.match_("$one lowercase latin letter$ $",a.o||""),He=y==="-"&&(E&&E.remainder===""||te||le||be);He&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&le&&(a.o="$"+a.o+"$");var Ye=[];return He?(zr.concatArray(Ye,this.output(a)),Ye.push({type_:"hyphen"})):(E=zr.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(zr.concatArray(Ye,zr.actions["d="](a,y)),zr.concatArray(Ye,this.output(a))):(zr.concatArray(Ye,this.output(a)),zr.concatArray(Ye,zr.actions.bond(a,y,"-")))),Ye},"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:zr.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"&&zr.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:zr.go(a.a,"a"),b:zr.go(a.b,"bd"),p:zr.go(a.p,"pq"),o:zr.go(a.o,"o"),q:zr.go(a.q,"pq"),d:zr.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var te;a.rdt==="M"?te=zr.go(a.rd,"tex-math"):a.rdt==="T"?te=[{type_:"text",p1:a.rd||""}]:te=zr.go(a.rd);var le;a.rqt==="M"?le=zr.go(a.rq,"tex-math"):a.rqt==="T"?le=[{type_:"text",p1:a.rq||""}]:le=zr.go(a.rq),E={type_:"arrow",r:a.r,rd:te,rq:le}}for(var be in a)be!=="parenthesisLevel"&&be!=="beginsWithBond"&&delete a[be];return E},"oxidation-output":function(a,y){var b=["{"];return zr.concatArray(b,zr.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:zr.go(y[0]),p2:zr.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:zr.go(y[0]),p2:zr.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:zr.go(y[0]),p2:zr.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:zr.go(y[0]),p2:zr.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:zr.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:zr.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:zr.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:zr.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:zr.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:zr.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:zr.go(y[1],"pq")}}}},bd:{transitions:zr.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:zr.go(y[1],"bd")}}}},oxidation:{transitions:zr.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:zr.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:zr.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:zr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:zr.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]&&(zr.concatArray(b,zr.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?zr.concatArray(b,zr.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]),zr.concatArray(b,zr.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=zr.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=zr.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 te={d:zr.go(a.d,"pu"),q:zr.go(a.q,"pu")};a.o==="//"?y={type_:"pu-frac",p1:te.d,p2:te.q}:(y=te.d,te.d.length>1||te.q.length>1?y.push({type_:" / "}):y.push({type_:"/"}),zr.concatArray(y,te.q))}else y=zr.go(a.d,"pu-2");for(var le in a)delete a[le];return y}}},"pu-2":{transitions:zr.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=zr.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=zr.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:zr.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 te in a)delete a[te];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 te in a)delete a[te];return y}}}};var Za={go:function(a,y){if(!a)return"";for(var b="",E=!1,te=0;te<a.length;te++){var le=a[te];typeof le=="string"?b+=le:(b+=Za._go2(le),le.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&Za.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:Za._goInner(a.a),b:Za._goInner(a.b),p:Za._goInner(a.p),o:Za._goInner(a.o),q:Za._goInner(a.q),d:Za._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 "+Za._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+Za._goInner(a.p1);break;case"bond":if(y=Za._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 te="\\frac{"+Za._goInner(a.p1)+"}{"+Za._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+te+"}{"+te+"}{"+te+"}{"+te+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+Za._goInner(a.p1)+"}{"+Za._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+Za._goInner(a.p1)+"}{"+Za._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+Za._goInner(a.p1)+"}{"+Za._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+Za._goInner(a.p1)+"}_{"+Za._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+Za._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var le={rd:Za._goInner(a.rd),rq:Za._goInner(a.rq)},be=Za._getArrow(a.r);le.rd||le.rq?a.r==="<=>"||a.r==="<=>>"||a.r==="<<=>"||a.r==="<-->"?(be="\\long"+be,le.rd&&(be="\\overset{"+le.rd+"}{"+be+"}"),le.rq&&(a.r==="<-->"?be="\\underset{\\lower2mu{"+le.rq+"}}{"+be+"}":be="\\underset{\\lower6mu{"+le.rq+"}}{"+be+"}"),be=" {}\\mathrel{"+be+"}{} "):(le.rq&&(be+="[{"+le.rq+"}]"),be+="{"+le.rd+"}",be=" {}\\mathrel{\\x"+be+"}{} "):be=" {}\\mathrel{\\long"+be+"}{} ",y=be;break;case"operator":y=Za._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 M1(a){}var rp=class $0 extends sr{constructor(y){super(se(ae({},y),{type:"delim"})),this.value=y.delim,this.size=y.size}static fromJson(y){return new $0(y)}toJson(){return se(ae({},super.toJson()),{delim:this.value,size:this.size})}render(y){return new Ur(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=qt(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):xa(this.command,this.value)}},ip=class j0 extends sr{constructor(y){super(se(ae({},y),{type:"sizeddelim",value:y.delim})),this.delimType=y.delimType,this.size=y.size}static fromJson(y){return new j0(y)}toJson(){return se(ae({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(y){let b=Fn(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=qt(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):xa(this.command,this.value)}},$d=class H0 extends sr{constructor(y,b,E,te){var le,be;super({type:"enclose",command:y,style:te.style}),this.body=b,this.backgroundcolor=te.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=(le=te.shadow)!=null?le:"none",this.strokeWidth=(be=te.strokeWidth)!=null?be:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=te.strokeStyle,this.svgStrokeStyle=te.svgStrokeStyle,this.strokeColor=te.strokeColor,this.borderStyle=te.borderStyle,this.padding=te.padding,this.captureSelection=!1}static fromJson(y){return new H0(y.command,y.body,y.notation,y)}toJson(){return se(ae({},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=qt(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);let te=(b=this.command)!=null?b:"";if(this.command==="\\enclose"){te+="{"+Object.keys(this.notation).join(" ")+"}";let le="",be="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(le+=be+'mathbackground="'+this.backgroundcolor+'"',be=","),this.shadow&&this.shadow!=="auto"&&(le+=be+'shadow="'+this.shadow+'"',be=","),this.strokeWidth||this.strokeStyle!=="solid"?(le+=be+this.borderStyle,be=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(le+=be+'mathcolor="'+this.strokeColor+'"',be=","),le&&(te+=`[${le}]`)}return xa(te,this.bodyToLatex(y))}render(y){const b=new jo({parent:y},this.style),E=sr.createBox(b,this.body);if(!E)return null;const te=im(this.borderStyle),le=b.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});E.setStyle("position","relative"),E.setStyle("display","inline-block"),E.setStyle("top",le,"em"),E.setStyle("height",E.height+E.depth,"em"),E.setStyle("width",E.width,"em");const be=new Ur(null,{classes:"ML__notation"});let He=E.height+E.depth+2*le;const Ye=E.width+2*le;let nt="";if(this.notation.horizontalstrike&&(nt+=this.line(3,50,97,50)),this.notation.verticalstrike&&(nt+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(nt+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(nt+=this.line(3,3,97,97)),this.notation.updiagonalarrow){nt+=this.line(le.toString(),(le+E.depth+E.height).toString(),(le+E.width).toString(),le.toString());const bn=.03*Math.sqrt(Ye*Ye+He*He)*1,Gn=E.width*bn,Gr=(E.depth+E.height)*bn,Wn=le+E.width;let yr=le;yr+Gr-.4*Gn<0&&(yr=.4*Gn-Gr),nt+='<polygon points="',nt+=`${Wn},${yr} ${Wn-Gn-.4*Gr},${yr+Gr-.4*Gn} `,nt+=`${Wn-.7*Gn},${yr+.7*Gr} ${Wn-Gn+.4*Gr},${yr+Gr+.4*Gn} `,nt+=`${Wn},${yr}`,nt+=`" stroke='none' fill="${this.strokeColor}"`,nt+="/>"}let dt=0;if(this.notation.phasorangle){const Zt=op(b),sn=(E.height+E.depth+2*Zt+le).toString(),bn=(E.height+E.depth)/2;nt+=this.line(le.toString(),sn,(le+bn+E.width).toString(),sn),nt+=this.line(le.toString(),sn,(le+bn).toString(),(le-Zt).toString()),He+=Zt,dt=bn,E.left+=He/2-le}if(this.notation.longdiv){const Zt=op(b);He+=Zt,nt+=this.line(le.toString(),le.toString(),(le+E.width).toString(),le.toString());const sn=.3;dt=sn+Zt,E.left+=sn+Zt,E.setTop(le+Zt),nt+='<path d="',nt+=`M ${le} ${le} a${sn} ${(E.depth+E.height+2*Zt)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*Zt} "`,nt+=` stroke-width="${om(b)}" stroke="${this.strokeColor}" fill="none"`,nt+="/>"}if(be.width=E.width+2*le+dt,be.height=E.height+le,be.depth=E.depth+le,be.setStyle("box-sizing","border-box"),be.setStyle("left",`calc(-${te} / 2 )`),be.setStyle("height",`${Math.floor(100*He)/100}em`),be.setStyle("top",`calc(${te} / 2 )`),this.backgroundcolor&&be.setStyle("background-color",this.backgroundcolor),this.notation.box&&be.setStyle("border","1px solid red"),this.notation.actuarial&&(be.setStyle("border-top",this.borderStyle),be.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(be.setStyle("border-bottom",this.borderStyle),be.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(be.setStyle("border-radius","8px"),be.setStyle("border",this.borderStyle)),this.notation.circle&&(be.setStyle("border-radius","50%"),be.setStyle("border",this.borderStyle)),this.notation.top&&be.setStyle("border-top",this.borderStyle),this.notation.left&&be.setStyle("border-left",this.borderStyle),this.notation.right&&be.setStyle("border-right",this.borderStyle),this.notation.bottom&&be.setStyle("border-bottom",this.borderStyle),nt){let Zt="";this.shadow==="auto"&&(Zt+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(Zt+=`filter: drop-shadow(${this.shadow})`),Zt+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,Zt+=' stroke-linecap="round"',this.svgStrokeStyle&&(Zt+=` stroke-dasharray="${this.svgStrokeStyle}"`),be.svgStyle=Zt,be.svgOverlay=nt}const Mt=new Ur([be,E]);return Mt.setStyle("position","relative"),Mt.setStyle("vertical-align",le,"em"),Mt.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*le))/100}em`),Mt.setStyle("display","inline-block"),Mt.height=be.height,Mt.depth=be.depth,Mt.width=be.width-2*le,Mt.left=le,Mt.right=le,this.caret&&(Mt.caret=this.caret),Mt.wrap(b)}line(y,b,E,te){return`<line x1="${Sh(y)}" y1="${Sh(b)}" x2="${Sh(E)}" y2="${Sh(te)}" vector-effect="non-scaling-stroke"></line>`}};function Sh(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 om(a){return(Math.floor(100*a.metrics.sqrtRuleThickness/a.scalingFactor)/100/10).toString()+"em"}function op(a){const y=a.isDisplayStyle?ss:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var dd=class K0 extends sr{constructor(y,b,E){var te,le;super(se(ae({},E),{type:"genfrac",displayContainsHighlight:!0})),this.above=y,this.below=b,this.hasBarLine=(te=E==null?void 0:E.hasBarLine)!=null?te:!0,this.continuousFraction=(le=E==null?void 0:E.continuousFraction)!=null?le:!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 K0(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),ae(ae({},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 te=new jo({parent:y,mathstyle:this.mathstyleName},this.style),le=te.metrics,be=new jo({parent:te,mathstyle:this.continuousFraction?"":"numerator"},this.style),He=this.numerPrefix?new Ur([new Ur(this.numerPrefix),sr.createBox(be,this.above)],{isTight:be.isTight,type:"ignore"}):(b=sr.createBox(be,this.above,{type:"ignore"}))!=null?b:new Ur(null,{type:"ignore"}),Ye=new jo({parent:te,mathstyle:this.continuousFraction?"":"denominator"},this.style),nt=this.denomPrefix?new Ur([new Ur(this.denomPrefix),sr.createBox(Ye,this.below,{type:"ignore"})]):(E=sr.createBox(Ye,this.below,{type:"ignore"}))!=null?E:new Ur(null,{type:"ignore"}),dt=this.hasBarLine?le.defaultRuleThickness:0;let Mt,Zt=0,sn;te.isDisplayStyle?(Mt=be.metrics.num1,Zt=dt>0?3*dt:7*dt,sn=Ye.metrics.denom1):(dt>0?(Mt=be.metrics.num2,Zt=dt):(Mt=be.metrics.num3,Zt=3*le.defaultRuleThickness),sn=Ye.metrics.denom2);const bn=[];this.isSelected&&bn.push("ML__selected");const Gn=He.depth,Gr=nt.height;let Wn;if(dt<=0){const $i=Mt-Gn-(Gr-sn);$i<Zt&&(Mt+=(Zt-$i)/2,sn+=(Zt-$i)/2),Wn=new ma({individualShift:[{box:He,shift:-Mt,classes:[...bn,"ML__center"]},{box:nt,shift:sn,classes:[...bn,"ML__center"]}]}).wrap(te)}else{const $i=new Ur(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});$i.softWidth=Math.max(He.width,nt.width),$i.height=dt/2,$i.depth=dt/2;const Go=as+dt/2;Mt<Zt+Gn+Go&&(Mt=Zt+Gn+Go);const Ca=as-dt/2;sn<Zt+Gr-Ca&&(sn=Zt+Gr-Ca),Wn=new ma({individualShift:[{box:nt,shift:sn,classes:[...bn,"ML__center"]},{box:$i,shift:-Ca,classes:bn},{box:He,shift:-Mt,classes:[...bn,"ML__center"]}]}).wrap(te)}const yr=te.isDisplayStyle?le.delim1:le.delim2,Qr=this.leftDelim?this.bind(y,Ti("open",this.leftDelim,yr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Pi(te,"open");let Ir=null;this.continuousFraction?Ir=new Ur(null,{type:"close"}):this.rightDelim?Ir=this.bind(y,Ti("close",this.rightDelim,yr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Ir=Pi(te,"close");const Ni=new Ur([Qr,Wn,Ir],{isTight:te.isTight,type:"inner",classes:"mfrac"}),Yi=this.bind(y,Ni);return this.caret&&(Yi.caret=this.caret),this.attachSupsub(y,{base:Yi})}},Gs=class Z0 extends sr{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 Z0(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),ae({type:"latex",value:this.value},y)}get computedStyle(){return{}}render(y){const b=new Ur(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}},jd=class W0 extends sr{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new Gs(b)),this.skipBoundary=!1}static fromJson(y){return new W0("")}toJson(){return super.toJson()}render(y){const b=sr.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(te=>te.value).join(""))!=null?E:""}},hf=class U0 extends sr{constructor(y,b){super(se(ae({},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 U0(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",te=new Ur(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(!te)return null;te.right=te.italic;const le=(te.height-te.depth)/2-as*y.scalingFactor,be=te.italic;te.setTop(le);let He=te;if(this.superscript||this.subscript){const Ye=(b=this.subsupPlacement)!=null?b:"auto";He=Ye==="over-under"||Ye==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:te,baseShift:le,slant:be}):this.attachSupsub(y,{base:te})}return new Ur(this.bind(y,He),{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=qt(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)),ko(E)}},ju=class V0 extends sr{constructor(y){const b=y.body;super(se(ae({},y),{type:"overlap",body:typeof b=="string"?[new sr({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 V0(y)}toJson(){const y={};return this.align&&(y.align=this.align),this.boxType&&(y.boxType=this.boxType),ae(ae({},super.toJson()),y)}render(y){const b=sr.createBox(y,this.body,{classes:"inner"});return b?(this.caret&&(b.caret=this.caret),this.bind(y,new Ur([b,new Ur(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},dc=class G0 extends sr{constructor(y){var b,E,te,le;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=(te=y.paddedBody)!=null?te:!1,this.paddedLabels=(le=y.paddedLabels)!=null?le:!1}static fromJson(y){return new G0(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?gl(this.svgBody):sr.createBox(y,this.body,{type:"ignore"});const E=new jo({parent:y,mathstyle:"scriptstyle"},this.style);let te=null;this.svgAbove?te=gl(this.svgAbove):this.above&&(te=sr.createBox(E,this.above,{type:"ignore"}));let le=null;this.svgBelow?le=gl(this.svgBelow):this.below&&(le=sr.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new Ur([Pi(y,"open"),b,Pi(y,"close")],{type:"ignore"}));let be=am(y,{base:b,above:te,below:le,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return be?(this.subsupPlacement==="over-under"?be=this.attachLimits(y,{base:be,type:be.type}):be=this.attachSupsub(y,{base:be}),this.caret&&(be.caret=this.caret),this.bind(y,be)):null}};function am(a,y){if(!y.base)return null;if(!y.above&&!y.below){const He=new Ur(y.base,{type:y.type});return He.setStyle("position","relative"),He}let b=0;y.above&&(b=a.metrics.bigOpSpacing5);let E=null;const te=y.base,le=0,be=["ML__center"];if(y.paddedAboveBelow&&be.push("ML__label_padding"),y.below&&y.above){const He=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+te.depth+le;E=new ma({bottom:He,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:be},{box:te,classes:["ML__center"]},b,{box:y.above,classes:be},a.metrics.bigOpSpacing5]})}else y.below?E=new ma({top:te.height-le,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:be},{box:te,classes:["ML__center"]}]}):y.above&&(E=new ma({bottom:te.depth+le,children:[{box:te,classes:["ML__center"]},b,{box:y.above,classes:be},a.metrics.bigOpSpacing5]}));return new Ur(E,{type:y.type})}var Hd=class Y0 extends sr{constructor(y){var b,E,te,le;super(se(ae({},y),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(b=y.isInvisible)!=null?b:!1,this.smashDepth=(E=y.smashDepth)!=null?E:!1,this.smashHeight=(te=y.smashHeight)!=null?te:!1,this.smashWidth=(le=y.smashWidth)!=null?le:!1}static fromJson(y){return new Y0(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),ae(ae({},super.toJson()),y)}render(y){const b=new jo({parent:y,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),sr.createBox(b,this.body,{classes:"inner"});const E=sr.createBox(this.isInvisible?b:y,this.body);if(!E)return null;if(this.smashWidth){const te=new Ur(null,{classes:"fix"});return new Ur([E,te],{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 te of E.children)this.smashHeight&&(te.height=0),this.smashDepth&&(te.depth=0);return new ma({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},Kd=class X0 extends sr{constructor(y){var b;super(ae({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 X0(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 Ur(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new Ur(null,{classes:"mspace"}),E.left=y.toEm(this.width);else{const te=(b={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?b:"mediumspace";E=new Ur(null,{classes:te})}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=qt(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);const te=(b=this.command)!=null?b:"";return this.width===void 0?te:this._braced&&!("register"in this.width)?`${te}{${Ka(this.width)}}`:`${te}${Ka(this.width)}`}},ap=class J0 extends sr{constructor(y){var b;super(se(ae({},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 J0(se(ae({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=qt(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=this.command,te=this.bodyToLatex(y);return this.above&&!this.hasEmptyBranch("above")?xa(`${E}[${this.aboveToLatex(y)}]`,te):/^[0-9]$/.test(te)?`${E}${te}`:xa(E,te)}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 jo({parent:y,mathstyle:"cramp"},this.style),te=(b=sr.createBox(E,this.body,{type:"inner"}))!=null?b:new Ur(null),le=E.scalingFactor,be=E.metrics.defaultRuleThickness/le,He=y.isDisplayStyle?ss:be,Ye=new Ur(null,{classes:"ML__sqrt-line",style:this.style});Ye.height=be,Ye.softWidth=te.width;let nt=le*(be+He/4);const Mt=Math.max(le*2*He,te.height+te.depth)+nt+be,Zt=new jo({parent:y},this.style),sn=this.bind(Zt,new Ur(Ti("inner","\\surd",Mt,!1,Zt,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!sn)return null;const bn=sn.height+sn.depth-be;bn>te.height+te.depth+nt&&(nt=(nt+bn-(te.height+te.depth))/2),sn.setTop(sn.height-te.height-nt);const Gn=this.bind(y,new ma({firstBaseline:[{box:new Ur(te)},nt-2*be,{box:Ye},be]})),Gr=sr.createBox(new jo({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!Gr){const Qr=new Ur([sn,Gn],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return Qr.setStyle("display","inline-block"),Qr.setStyle("height",Qr.height+Qr.depth,"em"),this.caret&&(Qr.caret=this.caret),this.bind(y,Qr)}const Wn=new ma({shift:-.6*(Math.max(sn.height,Gn.height)-Math.max(sn.depth,Gn.depth)),children:[{box:Gr}]}),yr=new Ur([new Ur(Wn,{classes:"ML__sqrt-index",type:"ignore"}),sn,Gn],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return yr.height=sn.height,yr.depth=sn.depth,this.caret&&(yr.caret=this.caret),this.bind(y,yr)}},sm=class extends Ur{constructor(a){super(null,{type:"skip"}),this._width=a}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function Ch(a,y){if(!a.parent)return;const b=a.parent.children,E=b.indexOf(a);let te=E-1;for(;te>=0&&b[te].type==="ignore";)te-=1;if(te<0&&a.parent.parent&&a.parent.type==="lift"){Ch(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){Wd(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 Zd(a,y){if(!a.children)return a;const b=a.children;um(b);const E=y.getRegisterAsEm("thinmuskip"),te=y.getRegisterAsEm("medmuskip"),le=y.getRegisterAsEm("thickmuskip");return Wd(b,(be,He)=>{var Ye,nt,dt;if(!be)return;const Mt=be.type,Zt=He.isTight?(Ye=cm[Mt])!=null?Ye:null:(nt=lm[Mt])!=null?nt:null,sn=(dt=Zt==null?void 0:Zt[He.type])!=null?dt:null;sn===3&&Ch(He,E),sn===4&&Ch(He,te),sn===5&&Ch(He,le)}),a}function Wd(a,y,b=void 0){if(!a)return b;a=[...a];for(const E of a)E.type==="lift"?b=Wd(E.children,y,b):E.type==="ignore"?Wd(E.children,y):(y(b,E),Wd(E.children,y),b=E);return b}var ff=class q0 extends sr{constructor(y){super({type:"tooltip",command:y.command,mode:y.mode,style:y.style,body:y.body,displayContainsHighlight:!0}),this.tooltip=new sr({type:"root",mode:y.content,body:y.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(y){return new q0(se(ae({},y),{tooltip:Eu(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 se(ae({},super.toJson()),{tooltip:b})}render(y){const b=sr.createBox(new jo,this.body);if(!b)return null;const E=new jo({parent:y,mathstyle:"displaystyle"},{fontSize:ga}),te=yu(Zd(new Ur(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),le=new Ur([te,b],{classes:"ML__tooltip-container"});return this.caret&&(le.caret=this.caret),this.bind(y,le)}},Hu=class Q0 extends sr{constructor(y,b){super(se(ae({},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 Q0(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 Ur(this.value,{type:"op",mode:"math",maxFontSize:y.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:y.letterShapeStyle});let te=E;if(this.superscript||this.subscript){const le=(b=this.subsupPlacement)!=null?b:"auto";te=le==="over-under"||le==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:E}):this.attachSupsub(y,{base:E})}return new Ur(this.bind(y,te),{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=qt(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)),ko(E)}};function Eu(a){if(pe(a))return a.map(E=>Eu(E));if(typeof a=="string")return sr.fromJson(a);a=ae({},a);for(const E of xu)a[E]&&(a[E]=Eu(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=Eu(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=po.fromJson(a)),y==="box"&&(b=cs.fromJson(a)),y==="chem"&&(b=np.fromJson(a)),y==="composition"&&(b=ru.fromJson(a)),y==="delim"&&(b=rp.fromJson(a)),y==="enclose"&&(b=$d.fromJson(a)),y==="error"&&(b=bl.fromJson(a)),y==="extensible-symbol"&&(b=hf.fromJson(a)),y==="genfrac"&&(b=dd.fromJson(a)),y==="group"&&(b=zs.fromJson(a)),y==="latex"&&(b=Gs.fromJson(a)),y==="latexgroup"&&(b=jd.fromJson(a)),y==="leftright"&&(b=sa.fromJson(a)),y==="macro"&&(b=ud.fromJson(a)),y==="macro-argument"&&(b=Mc.fromJson(a)),y==="operator"&&(b=Hu.fromJson(a)),y==="overlap"&&(b=ju.fromJson(a)),y==="overunder"&&(b=dc.fromJson(a)),y==="placeholder"&&(b=Ji.fromJson(a)),y==="prompt"&&(b=$c.fromJson(a)),y==="phantom"&&(b=Hd.fromJson(a)),y==="sizeddelim"&&(b=ip.fromJson(a)),y==="spacing"&&(b=Kd.fromJson(a)),y==="subsup"&&(b=uc.fromJson(a)),y==="surd"&&(b=ap.fromJson(a)),y==="text"&&(b=wc.fromJson(a)),y==="tooltip"&&(b=ff.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=sr.fromJson(a));for(const E of xu)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=>Eu(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>Eu(b)):y)}var sp={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},pf={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},lp=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,hm=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,fm=[/^[a-z]$/,/^[A-Z]$/,lp,hm],pm={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},mm=class extends nl{constructor(){super("math")}createAtom(a,y,b){var E,te,le,be;if(y===null)return new sr({type:"mord",mode:"math",command:a,value:a,style:b});const He=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const nt=new sr({type:(te=y.type)!=null?te:"mord",mode:"math",command:(le=y.command)!=null?le:a,value:String.fromCodePoint(y.codepoint),style:b});return He&&(nt.isFunction=!0),a.startsWith("\\")&&(nt.verbatimLatex=a),nt}const Ye=new sr({type:"mord",mode:"math",command:(be=y.command)!=null?be:a,value:a,style:b});return He&&(Ye.isFunction=!0),a.startsWith("\\")&&(Ye.verbatimLatex=a),Ye}serialize(a,y){const b=vm(a,se(ae({},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&&fm.forEach((He,Ye)=>{var nt;He.test(a.value)&&pm[(nt=y.letterShapeStyle)!=null?nt:"tex"][Ye]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const te=E?b+"-"+E:b;console.assert(sp[te]!==void 0);const[le,be]=sp[te];return pf[b]&&!pf[b].test(a.value)?(a.value=Wt(a.value,b,E),null):(lp.test(a.value)&&(a.classes+=" lcGreek"),be&&(a.classes+=" "+be),le)}};function vm(a,y){const{parent:b}=a[0],E=cp(b);return Ha(a,"variant").map(te=>{const le=cp(te[0]);let be="";le&&le!==E&&(be={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"}[le],console.assert(be!==void 0));const He=ko(te.map(Ye=>Ye._serialize(y)));return be?xa(be,He):He})}function cp(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 gm(a,y){return a.map(b=>b._serialize(y))}function ym(a,y){return Ha(a,"fontShape").map(b=>{const E=gm(b,y),{fontShape:te}=b[0].style;let le="";return te==="it"&&(le="\\textit"),te==="sl"&&(le="\\textsl"),te==="sc"&&(le="\\textsc"),te==="n"&&(le="\\textup"),!le&&te?`{${xa("\\fontshape",te)}${ko(E)}}`:le?xa(le,ko(E)):ko(E)})}function bm(a,y){return Ha(a,"fontSeries").map(b=>{const E=ym(b,y),{fontSeries:te}=b[0].style;let le="";return te==="b"&&(le="\\textbf"),te==="l"&&(le="\\textlf"),te==="m"&&(le="\\textmd"),te&&!le?`{${xa("\\fontseries",te)}${ko(E)}}`:le?xa(le,ko(E)):ko(E)})}function _m(a,y){return Ha(a,"fontSize").map(b=>{var E,te;const le=bm(b,y),be=(te=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(E=b[0].style.fontSize)!=null?E:""])!=null?te:"";return be?`${be} ${ko(le)}`:ko(le)})}function xm(a,y,b){return Ha(a,"fontFamily").map(E=>{var te,le;const be=_m(E,y),He=(le={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(te=E[0].style.fontFamily)!=null?te:""])!=null?le:"";return He?`\\${He}{${ko(be)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${ko(be)}}`:b?`\\text{${ko(be)}}`:ko(be)})}var up={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Sm=class extends nl{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new wc(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return xm(a,se(ae({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,te,le,be;const{fontFamily:He}=y;if(up[He]?a.classes+=" "+up[He]:He&&a.setStyle("font-family",He),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 Ye=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);Ye&&(a.classes+=" ",a.classes+=(te={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=Ye[1])!=null?E:""])!=null?te:"",a.classes+=" ",a.classes+=(be={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"}[(le=Ye[2])!=null?le:""])!=null?be:"")}return"Main-Regular"}};new Sm;var Cm=class extends nl{constructor(){super("latex")}createAtom(a){return new Gs(a)}serialize(a,y){return a.filter(b=>b instanceof Gs&&!b.isSuggestion).map(b=>b.value)}getFont(){return null}};new Cm;var wm={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},mf={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},dp={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:["\\","|","",""]}},hp={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:["=","=","=","="]}},Mm={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},km={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},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:["=","=","=","="]}},Dm={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Am={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},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"]}},Tm={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Om={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 fp(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 hd(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 Rm={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]"},Ud=[],Vd;function vf(){switch(Be()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function tc(a){(!a.platform||a.platform===vf())&&Ud.push(a)}function Pm(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[te,le]of Object.entries(y.mapping)){if(le[0]===a)return E.key=`[${te}]`,E;if(le[1]===a)return E.shift=!0,E.key=`[${te}]`,E;if(le[2]===a)return E.alt=!0,E.key=`[${te}]`,E;if(le[3]===a)return E.shift=!0,E.alt=!0,E.key=`[${te}]`,E}return E.key=(b=Rm[a])!=null?b:"",E}function Nm(a){if(a.code)return a;const y=Object.entries(Gd().mapping);let b=!1,E=!1,te="";for(let le=0;le<4;le++){for(const[be,He]of y)if(He[le]===a.key){te=be,le===3?(b=!0,E=!0):le===2?b=!0:le===1&&(E=!0);break}if(te)break}return new KeyboardEvent(a.type,se(ae({},a),{altKey:b,shiftKey:E,code:te}))}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 te of Ud)((y=te.mapping[a.code])==null?void 0:y[E])===a.key?te.score+=1:(b=te.mapping[a.code])!=null&&b[E]&&(te.score=0);Ud.sort((te,le)=>le.score-te.score)}function Fm(a){Vd=Ud.find(y=>a.startsWith(y.locale))}function Gd(){return Vd!=null?Vd:Ud[0]}function zm(){switch(vf()){case"apple":return mf;case"windows":return dp;case"linux":return hp}return mf}switch(vf()){case"apple":tc(mf),tc(Em),tc(Im),tc(Lm);break;case"windows":tc(dp),tc(Mm),tc(Tm),tc(Dm);break;case"linux":tc(hp),tc(km),tc(Om),tc(Am);break}tc(wm);function gf(a){var y;const b=/macos|ios/.test(Be()),E=a.split("+");let te="";for(const le of E)te&&(te+=b?"\u2009":'<span class="ML__shortcut-join">+</span>'),le.startsWith("[Key")?te+=le.slice(4,5):le.startsWith("Key")?te+=le.slice(3,4):le.startsWith("[Digit")?te+=le.slice(6,7):le.startsWith("Digit")?te+=le.slice(5,6):te+=(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:"* &#128290;",numpaddivide:"/ &#128290;",numpadsubtract:"- &#128290;",numpadadd:"+ &#128290;",numpaddecimal:". &#128290;",numpadcomma:", &#128290;",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[le.toLowerCase()])!=null?y:le.toUpperCase();return te}function wh(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,te)=>({x:E.x+te.clientX,y:E.y+te.clientY}),{x:0,y:0}),b=a.touches.length;return{x:y.x/b,y:y.y/b}}}function Ku(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 $m(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 jm=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 Eh(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:jm.has(a.code)}function Mh(){var a;let y=document.activeElement;for(;(a=y==null?void 0:y.shadowRoot)!=null&&a.activeElement;)y=y.shadowRoot.activeElement;return y}var jc=class lu{static get scrim(){return lu._scrim||(lu._scrim=new lu),lu._scrim}static open(y){lu.scrim.open(y)}static close(){lu.scrim.close()}static get state(){return lu.scrim.state}static get element(){return lu.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=Mh();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 te=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const le=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${le+te}px`,y!=null&&y.child&&E.append(y.child),this.state="open"}close(){var y,b,E,te;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:le}=this;le.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),le.remove(),document.body.style.overflow=(y=this.savedOverflow)!=null?y:"",document.body.style.marginRight=(b=this.savedMarginRight)!=null?b:"",Mh()!==this.savedActiveElement&&((te=(E=this.savedActiveElement)==null?void 0:E.focus)==null||te.call(E)),le.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,te=null,le=!1,be=!1,He=!1;const Ye=new AbortController,nt=Ye.signal;return a.addEventListener("keydown",dt=>{if(le||dt.key==="Process"||dt.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(dt.code)){E=null;return}E=dt,te=null,b.onKeystroke(dt)?a.textContent="":E=null},{capture:!0,signal:nt}),a.addEventListener("keypress",dt=>{le||(E&&te&&b.onKeystroke(E),te=dt)},{capture:!0,signal:nt}),a.addEventListener("compositionstart",dt=>{a.textContent="",le=!0,b.onCompositionStart(dt.data)},{capture:!0,signal:nt}),a.addEventListener("compositionupdate",dt=>{le&&b.onCompositionUpdate(dt.data)},{capture:!0,signal:nt}),a.addEventListener("compositionend",dt=>{a.textContent="",le&&(le=!1,b.onCompositionEnd(dt.data))},{capture:!0,signal:nt}),a.addEventListener("beforeinput",dt=>dt.stopImmediatePropagation(),{signal:nt}),a.addEventListener("input",dt=>{var Mt;if(!le&&(a.textContent="",dt.inputType!=="insertCompositionText")){if(dt.inputType==="insertFromPaste"){dt.preventDefault(),dt.stopPropagation();return}b.onInput((Mt=dt.data)!=null?Mt:""),dt.preventDefault(),dt.stopPropagation()}},{signal:nt}),a.addEventListener("paste",dt=>{a.focus({preventScroll:!0}),a.textContent="",b.onPaste(dt)||dt.preventDefault(),dt.stopImmediatePropagation()},{signal:nt}),a.addEventListener("cut",dt=>b.onCut(dt),{capture:!0,signal:nt}),a.addEventListener("copy",dt=>b.onCopy(dt),{capture:!0,signal:nt}),a.addEventListener("blur",dt=>{var Mt,Zt;if(((Zt=(Mt=dt.relatedTarget)==null?void 0:Mt._mathfield)==null?void 0:Zt.element)===y){a.focus({preventScroll:!0}),dt.preventDefault(),dt.stopPropagation();return}const sn=jc.state;if(sn==="open"||sn==="opening"){dt.preventDefault(),dt.stopPropagation();return}if(dt.relatedTarget===dt.target.getRootNode().host){dt.preventDefault(),dt.stopPropagation();return}He||be||(He=!0,E=null,te=null,b.onBlur(),He=!1)},{capture:!0,signal:nt}),a.addEventListener("focus",dt=>{He||be||(be=!0,b.onFocus(),be=!1)},{capture:!0,signal:nt}),{dispose:()=>Ye.abort(),cancelComposition:()=>{le&&(a.blur(),requestAnimationFrame(()=>a.focus({preventScroll:!0})))},blur:()=>{typeof a.blur=="function"&&a.blur()},focus:()=>{!be&&typeof a.focus=="function"&&a.focus({preventScroll:!0})},hasFocus:()=>Mh()===a,setAriaLabel:dt=>a.setAttribute("aria-label",dt),setValue:dt=>{var Mt;a.textContent=dt,a.style.left="-1000px",(Mt=window.getSelection())==null||Mt.selectAllChildren(a)},moveTo:(dt,Mt)=>{a.style.top=`${Mt}px`,a.style.left=`${dt}px`}}}function fd(a){var y;if(!a||!Eh(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 pp(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 Km(a){if(ge()){const y=Be(),b=a.startsWith("!"),E=a.endsWith(y);if(b&&!E||!b&&E)return!0}return a==="!other"?!1:a==="other"}function Zm(a,y,b){if(a.length===0)return"";const E=hd(fp(pp(b))),te=hd({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(Be()),cmd:!1,win:!1});for(let le=a.length-1;le>=0;le--)if((a[le].key===E||a[le].key===te)&&(!a[le].ifMode||a[le].ifMode===y))return a[le].command;return""}function mp(a){let y=a;return pe(y)&&(y=y.length>0?y[0]+"("+y.slice(1).join("")+")":""),y}function Wm(a,y){let b=[];if(typeof y=="string"){const le=Rd[y];pe(le)?b=le.slice():le&&b.push(le)}const E=mp(y),te=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const le of a)te.test(mp(le.command))&&b.push(le.key);return b.map(gf)}function Um(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=fp(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=Be()==="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&&!Km(E))return;if(/^\[.+\]$/.test(b.key))return se(ae({},a),{key:hd(b)});const te=Pm(b.key,y);if(!te)return se(ae({},a),{key:hd(b)});if(te.shift&&b.shift||te.alt&&b.alt)throw new Error(`The keybinding ${a.key} (${yf(a.command)}) is conflicting with the key combination ${hd(te)} using the ${y.displayName} keyboard layout`);return te.shift=te.shift||b.shift,te.alt=te.alt||b.alt,te.meta=b.meta,te.ctrl=b.ctrl,se(ae({},a),{key:hd(te)})}function yf(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 te of a)try{const le=Um(te,y);if(!le)continue;const be=E.find(He=>He.key===le.key&&He.ifMode===le.ifMode);if(be)throw new Error(`Ambiguous key binding ${te.key} (${yf(te.command)}) matches ${be.key} (${yf(be.command)}) with the ${y.displayName} keyboard layout`);E.push(le)}catch(le){le instanceof Error&&b.push(le.message)}return[E,b]}var Gm=class extends ho{constructor(){super("latex")}createAtom(a){return new Gs(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"}),rs(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 te=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Fs(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 le=[];for(const Ye of y)_e.test(Ye)&&le.push(new Gs(Ye));let be=a.at(a.position);if(be instanceof jd&&(be=be.lastChild),!(be.parent instanceof jd)){const Ye=new jd("");be.parent.addChildAfter(Ye,be),be=Ye.firstChild}const He=be.parent.addChildrenAfter(le,be);return a.silenceNotifications=te,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(He)):He&&(a.position=a.offsetOf(He))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Ym(a){return a.atoms.find(y=>y.type==="latexgroup")}function Yd(a){var y,b;const E=a.atoms.find(te=>te.type==="latexgroup");return E?(b=(y=E.body)==null?void 0:y.filter(te=>te.type==="latex"))!=null?b:[]:[]}function vp(a,y){var b;let E=0,te=!1;const le=Number.isFinite(y==null?void 0:y.before)?(b=y==null?void 0:y.before)!=null?b:0:a.lastOffset;for(;E<=le&&!te;){const Ye=a.at(E);te=Ye instanceof Gs&&Ye.isSuggestion,te||E++}if(!te)return[void 0,void 0];let be=E,He=!1;for(;be<=le&&!He;){const Ye=a.at(be);He=!(Ye instanceof Gs&&Ye.isSuggestion),He||be++}return[E-1,be-1]}new Gm;function kh(a){const y=Yd(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 Xd(a,y){var b;const{model:E}=a;kh(a);for(const dt of Yd(E))dt.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){md(a);return}const te=[];let le=E.at(E.position);for(;le&&le instanceof Gs&&/^[a-zA-Z\*]$/.test(le.value);)le=le.leftSibling;if(le&&le instanceof Gs&&le.value==="\\")for(te.push(le),le=le.rightSibling;le&&le instanceof Gs&&/^[a-zA-Z\*]$/.test(le.value);)te.push(le),le=le.rightSibling;const be=te.map(dt=>dt.value).join(""),He=Je(a,be);if(He.length===0){if(/^\\[a-zA-Z\*]+$/.test(be))for(const dt of te)dt.isError=!0;md(a);return}const Ye=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=Ye<0?He.length-1:Ye%He.length;const nt=He[a.suggestionIndex];if(nt!==be){const dt=te[te.length-1];dt.parent.addChildrenAfter([...nt.slice(be.length-nt.length)].map(Mt=>new Gs(Mt,{isSuggestion:!0})),dt),Zu(a,{interactive:!0})}Jm(a,He)}function gp(a){const[y,b]=vp(a,{before:a.position});if(y===void 0||b===void 0)return!1;let E=!1;return a.getAtoms([y,b]).forEach(te=>{te.isSuggestion&&(te.isSuggestion=!1,E=!0)}),E}function pd(a,y="accept",b){var E,te;md(a);const le=Ym(a.model);if(!le)return!1;if(y==="accept-suggestion"||y==="accept-all"){const nt=Yd(a.model).filter(dt=>dt.isSuggestion);if(nt.length!==0){for(const dt of nt)dt.isSuggestion=!1;a.model.position=a.model.offsetOf(nt[nt.length-1])}if(y==="accept-suggestion")return nt.length!==0}const He=Yd(a.model).filter(nt=>!nt.isSuggestion).map(nt=>nt.value).join(""),Ye=le.leftSibling;return le.parent.removeChild(le),a.model.position=a.model.offsetOf(Ye),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||(ho.insert(a.model,He,{selectionMode:(te=b==null?void 0:b.selectItem)!=null&&te?"item":"placeholder",format:"latex",mode:"math"}),a.snapshot(),a.model.announce("replacement"),a.switchMode("math")),!0}function Lh(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 bf(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 Xm(a,y){const b=new jo({from:a.context}),E=new sr({mode:"math",type:"root",body:$s(y,{context:b})}),te=yu(Zd(new Ur(E.render(b),{classes:"ML__base"}),b));return bu(te,{classes:"ML__latex"}).toMarkup()}function Jm(a,y){var b;if(y.length===0){md(a);return}let E="";for(const[le,be]of y.entries()){const He=be,Ye=Xm(a,be),nt=Wm(a.keybindings,He).join("<br>");E+=`<li role="button" data-command="${He}" ${le===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${He}</span><span class="ML__popover__command">${Ye}</span>`,nt&&(E+=`<span class="ML__popover__keybinding">${nt}</span>`),E+="</li>"}const te=qm(a,`<ul>${E}</ul>`);_f()&&((b=te.querySelector(".ML__popover__current"))==null||b.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var le;te&&!_f()&&(te.classList.add("is-visible"),Dh(a),(le=te.querySelector(".ML__popover__current"))==null||le.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function _f(){const a=document.getElementById("mathlive-suggestion-popover");return a?a.classList.contains("is-visible"):!1}function Dh(a,y){var b;if(!a.element||a.element.mathfield!==a||!_f())return;if(((b=a.model.at(a.model.position))==null?void 0:b.type)!=="latex"){md(a);return}if(y!=null&&y.deferred){setTimeout(()=>Dh(a),32);return}const E=zc(a.field);if(!E)return;const te=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,le=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,be=window.innerWidth-document.documentElement.clientWidth,He=window.innerHeight-document.documentElement.clientHeight,Ye=window.mathVirtualKeyboard.boundingRect.height,nt=document.getElementById("mathlive-suggestion-popover");E.x+nt.offsetWidth/2>le-be?nt.style.left=`${le-nt.offsetWidth-be}px`:E.x-nt.offsetWidth/2<0?nt.style.left="0":nt.style.left=`${E.x-nt.offsetWidth/2}px`;const dt=E.y-E.height;te-He-Ye-E.y<dt?(nt.classList.add("ML__popover--reverse-direction"),nt.classList.remove("top-tip"),nt.classList.add("bottom-tip"),nt.style.top=`${E.y-E.height-nt.offsetHeight-15}px`):(nt.classList.remove("ML__popover--reverse-direction"),nt.classList.add("top-tip"),nt.classList.remove("bottom-tip"),nt.style.top=`${E.y+15}px`)}function md(a){a.suggestionIndex=0;const y=document.getElementById("mathlive-suggestion-popover");y&&(y.classList.remove("is-visible"),y.innerHTML="")}function qm(a,y){let b=document.getElementById("mathlive-suggestion-popover");return b||(b=Lh("mathlive-suggestion-popover"),Wl("suggestion-popover"),Wl("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let te=E.target;for(;te&&!te.dataset.command;)te=te.parentElement;te&&(pd(a,"reject"),ho.insert(a.model,te.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")&&(bf("mathlive-suggestion-popover"),x("suggestion-popover"),x("core"))}function ev(){const a=String(new Error().stack).replace(/^Error.*\n/,"").split(`
`);if(a.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let 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 Ah=null,yp,bp,xf=((bp=(yp=globalThis==null?void 0:globalThis.document)==null?void 0:yp.currentScript)==null?void 0:bp.src)||ev();function _p(a){return Au(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(Ah===null)try{const y=yield fetch(xf,{method:"HEAD"});y.status===200&&(Ah=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${xf}")`)}return new URL(a,Ah!=null?Ah:xf).href})}function tv(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var nc="not-loaded";function nv(){return Au(this,null,function*(){return nc="not-loaded",Ih()})}function Ih(){return Au(this,null,function*(){var a;if(nc!=="not-loaded")return;if(nc="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){nc="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(be=>be.family);if(b.every(be=>E.includes(be))){nc="ready";return}if(!window.MathfieldElement.fontsDirectory){nc="not-loaded";return}const te=yield _p(window.MathfieldElement.fontsDirectory);if(!te){document.body.classList.add("ML__fonts-did-not-load"),nc="error";return}const le=[["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(be=>tv(be[0].replace(/-[a-zA-Z]+$/,""),`${te}/${be[0]}`,be[1]));try{(yield Promise.all(le.map(He=>{try{return He.load()}catch(Ye){}}))).forEach(He=>document.fonts.add(He)),nc="ready";return}catch(be){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${te}"`,{cause:be}),document.body.classList.add("ML__fonts-did-not-load")}nc="error"}})}function rv(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 rs(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Ql(a)&&a.dirty&&(a.atomBoundsCache=new Map,Zu(a,y),a.atomBoundsCache=void 0)})))}function iv(a,y){var b;y=y!=null?y:{};const E=new jo({from:se(ae({},a.context),{atomIdsSettings:{seed:y.forHighlighting?rv(sr.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"}),te=a.model.root.render(E);return bu(Zd(te,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function xp(a,y){const{model:b}=a;b.root.caret=void 0,b.root.isSelected=!1,b.root.containsCaret=!0;for(const te of b.atoms)te.caret=void 0,te.isSelected=!1,te.containsCaret=!1;if(b.selectionIsCollapsed){const te=b.at(b.position);te.caret=a.model.mode;let le=te.parent;for(;le;)le.containsCaret=!0,le=le.parent}else{const te=b.getAtoms(b.selection,{includeChildren:!0});for(const le of te)le.isSelected=!0}return iv(a,y).toMarkup()}function Zu(a,y){if(!Ql(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 te=a.isSelectionEditable&&a.hasFocus(),le=E.classList.contains("ML__focused");le&&!te?E.classList.remove("ML__focused"):!le&&te&&E.classList.add("ML__focused");let be=xp(a,y);const He=a.element.querySelector("[part=menu-toggle]");if(He&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?He.style.display="none":He.style.display=""),a.model.atoms.length<=1){const Ye=a.options.contentPlaceholder;Ye&&(be+=`<span part=placeholder class="ML__content-placeholder">${js(Ye)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(be),Th(a,y.interactive),a.dirty=!1}function Th(a,y){const b=a.field;if(!b)return;for(const He of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))He.remove();!(y!=null&&y)&&nc!=="error"&&nc!=="ready"&&setTimeout(()=>{nc==="ready"?Th(a):setTimeout(()=>Th(a),128)},32);const E=a.model,te=b.offsetWidth,le=b.getBoundingClientRect().width;let be=Math.floor(le)/te;if(be=isNaN(be)?1:be,E.selectionIsCollapsed){Dh(a,{deferred:!0});let He=E.at(E.position);for(;He&&He.type!=="prompt"&&!(He.containsCaret&&He.displayContainsHighlight);)He=He.parent;if(He!=null&&He.containsCaret&&He.displayContainsHighlight){const Ye=Nd(a,Su(a,He),be);if(Ye){Ye.left/=be,Ye.right/=be,Ye.top/=be,Ye.bottom/=be;const nt=document.createElement("div");nt.classList.add("ML__contains-highlight"),nt.style.position="absolute",nt.style.left=`${Ye.left+1}px`,nt.style.top=`${Math.ceil(Ye.top)}px`,nt.style.width=`${Math.ceil(Ye.right-Ye.left)}px`,nt.style.height=`${Math.ceil(Ye.bottom-Ye.top)}px`,b.insertBefore(nt,b.childNodes[0])}}return}for(const He of ov(Fd(a,{excludeAtomsWithBackground:!0}))){He.left/=be,He.right/=be,He.top/=be,He.bottom/=be;const Ye=document.createElement("div");Ye.classList.add("ML__selection"),Ye.style.position="absolute",Ye.style.left=`${He.left}px`,Ye.style.top=`${He.top}px`,Ye.style.width=`${Math.ceil(He.right-He.left)}px`,Ye.style.height=`${Math.ceil(He.bottom-He.top-1)}px`,b.insertBefore(Ye,b.childNodes[0])}}function ov(a){let y=[];for(const b of a){let E=!1;for(const te of y)if(b.left===te.left&&b.right===te.right&&b.top===te.top&&b.bottom===te.bottom){E=!0;break}E||y.push(b)}a=y,y=[];for(const b of a){let E=0;for(const te of a)if(b.left>=te.left&&b.right<=te.right&&b.top>=te.top&&b.bottom<=te.bottom&&(E+=1,E>1))break;E===1&&y.push(b)}return y}var Sp=3,Hc;function Ul(a,y){y=ae({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),Hc||(Hc={});for(const b of Object.keys(a))console.assert(!Hc[b],"Selector already defined: ",b),Hc[b]=se(ae({},y),{fn:a[b]})}function Sf(a){let y;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return Sf(a[1]);y=a[0]}else y=a;return y=y.replace(/-\w/g,b=>b[1].toUpperCase()),Hc[y]}function vd(a){var y;return(y=Sf(a))==null?void 0:y.target}function av(a,y){var b;if(!y)return!1;let E,te=[],le=!1,be=!1;pe(y)?(E=y[0],te=y.slice(1)):E=y,E=E.replace(/-\w/g,nt=>nt[1].toUpperCase());const He=Hc[E],Ye=He==null?void 0:He.target;if(Ye==="model"){if(!a.isSelectionEditable&&(He!=null&&He.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||kh(a),Hc[E].fn(a.model,...te),Xd(a),be=!0,le=!0}else if(Ye==="virtual-keyboard")be=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,le=!0;else if(Hc[E]){if(!a.isSelectionEditable&&(He!=null&&He.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),be=Hc[E].fn(a,...te),le=!0}else throw new Error(`Unknown command "${E}"`);return Ye!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||He!=null&&He.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),He!=null&&He.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),be&&rs(a),le}function sv(a,y){var b;if(!a)return!1;a.focus(),g0.keypressVibration&&we()&&navigator.vibrate(Sp);const E=Sf(y);window.MathfieldElement.playSound((b=E==null?void 0:E.audioFeedback)!=null?b:"keypress");const te=a.executeCommand(y);return a.scrollIntoView(),te}Ul({performWithFeedback:(a,y)=>sv(a,y)});function lv(a){return Xd(a,{atIndex:a.suggestionIndex+1}),!1}function cv(a){return Xd(a,{atIndex:a.suggestionIndex-1}),!1}Ul({complete:pd},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Ul({nextSuggestion:lv,previousSuggestion:cv},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Oh="mathlive#virtual-keyboard-message";function Cf(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Oh}var uv=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(Cf(y)){if(!zd(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;vd(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(ae({type:Oh,action:y},b),this.targetOrigin)}},Cp={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:"&alpha;&beta;&gamma;",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>&#x03c6;</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>&#x03c2;</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>&#x03f5;</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>&rho;</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>&tau;</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>&upsilon;</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>&theta;</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>&iota;</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>&omicron;</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>&pi;</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>&alpha;</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>&sigma;</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>&delta;</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>&gamma;</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>&eta;</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>&xi;</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>&kappa;</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>&lambda;</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>&zeta;</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>&chi;</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>&psi;</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>&omega;</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>&beta;</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>&nu;</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>&mu;</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>&#x03b5;</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>&#x03d1;</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>&#x3f0;</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>&#x03d6;</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>&#x03f1;</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"&infin;\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]"]]}},Rh={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"}]},Jd;function wp(a,y){var b,E,te;const le=Mu.singleton;if(!le)return;const be=gd(a),He=(E=(b=le.getKeycap(be==null?void 0:be.id))==null?void 0:b.variants)!=null?E:"";if(typeof He=="string"&&!Ep(He)||Array.isArray(He)&&He.length===0){y==null||y();return}const Ye={};let nt="";for(const Gn of hv(He)){const Gr=kp(Gn),Wn=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);Ye[Wn]=Gr;const[yr,Qr]=Ph(Gr);nt+=`<div id=${Wn} class="item ${Qr}">${yr}</div>`}const dt=document.createElement("div");dt.setAttribute("aria-hidden","true"),dt.className="MLK__variant-panel",dt.style.height="auto";const Mt=Object.keys(Ye).length;let Zt=5;Mt===1?Zt=1:Mt===2||Mt===4?Zt=2:Mt===3||Mt===5||Mt===6?Zt=3:Mt>=7&&Mt<14&&(Zt=4),dt.style.width=`calc(var(--variant-keycap-length) * ${Zt} + 12px)`,dt.innerHTML=g0.createHTML(nt),jc.open({root:(te=le==null?void 0:le.container)==null?void 0:te.querySelector(".ML__keyboard"),child:dt}),Jd=new AbortController;const{signal:sn}=Jd,bn=a==null?void 0:a.getBoundingClientRect();if(bn){bn.top-dt.clientHeight<0&&(dt.style.width="auto",Mt<=6?dt.style.height="56px":Mt<=12?dt.style.height="108px":Mt<=18?dt.style.height="205px":dt.classList.add("compact"));const Gn=Math.max(0,Math.min(window.innerWidth-dt.offsetWidth,(bn.left+bn.right-dt.offsetWidth)/2)),Gr=bn.top-dt.clientHeight+5;dt.style.transform=`translate(${Gn}px, ${Gr}px)`,dt.classList.add("is-visible"),requestAnimationFrame(()=>{dt.addEventListener("pointerup",Wn=>{const yr=gd(Wn.target);!(yr!=null&&yr.id)||!Ye[yr.id]||(wf(Ye[yr.id]),qd(),y==null||y(),Wn.preventDefault())},{capture:!0,passive:!1,signal:sn}),dt.addEventListener("pointerenter",Wn=>{const yr=gd(Wn.target);!(yr!=null&&yr.id)||!Ye[yr.id]||yr.classList.add("is-active")},{capture:!0,signal:sn}),dt.addEventListener("pointerleave",Wn=>{const yr=gd(Wn.target);!(yr!=null&&yr.id)||!Ye[yr.id]||yr.classList.remove("is-active")},{capture:!0,signal:sn}),window.addEventListener("pointercancel",()=>{qd(),y==null||y()},{signal:sn}),window.addEventListener("pointerup",()=>{qd(),y==null||y()},{signal:sn})})}}function qd(){Jd==null||Jd.abort(),Jd=null,jc.state==="open"&&jc.close()}function dv(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(Ae))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+Ae[b]+'"></span>',command:["applyStyle",{color:b}]});return y}if(a==="background-color"){const y=[];for(const b of Object.keys(Ie))y.push({class:"swatch-button",label:'<span style="background:'+Ie[b]+'"></span>',command:["applyStyle",{backgroundColor:b}]});return y}}function Ep(a){return Rh[a]!==void 0}function hv(a){var y;return typeof a!="string"?a:(Rh[a]||(Rh[a]=(y=dv(a))!=null?y:[]),Rh[a])}function fv(a){return typeof a=="string"?a:Object.entries(a).map(([y,b])=>`${y}:${b} !important`).join(";")}function pv(a){return Object.keys(a).map(y=>`${y} {${fv(a[y])}}`).join("")}function Qd(a){if(!a)return"";const y=new jo,b=new sr({mode:"math",type:"root",body:$s(a,{context:y,args:te=>te==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=yu(Zd(new Ur(b.render(y),{classes:"ML__base"}),y));return bu(E,{classes:"ML__latex"}).toMarkup()}function eh(a){var y;if(Array.isArray(a))return a.map(E=>eh(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(te=>kp(te)))),(y=b.id)!=null||(b.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[b]}function mv(){var a,y;let E=window.mathVirtualKeyboard.alphabeticLayout;if(E==="auto"){const He=Gd();He&&(E=He.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Le.locale.slice(0,2)])!=null?a:"qwerty")}const te={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},le=(y=te[E])!=null?y:te.qwerty,be=E==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(const He of le){const Ye=[];for(const nt of He)/[a-z]/.test(nt)?Ye.push({label:nt,class:"hide-shift",shift:{label:nt.toUpperCase()},variants:Ep(nt)?nt:void 0}):nt==="~"?E!=="dvorak"?Ye.push("[backspace]"):Ye.push({label:"[backspace]",width:1}):nt==="^"?Ye.push("[shift]"):nt===" "&&Ye.push("[separator-5]");be.push(Ye)}return be.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:eh({rows:be})}}function Mp(a){if(a==="alphabetic")return mv();if(typeof a=="string")return console.assert(Cp[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),Mp(Cp[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 te=a,{rows:le}=te,be=ue(te,["rows"]);y=se(ae({},be),{layers:eh({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const te=a,{markup:le}=te,be=ue(te,["markup"]);y=se(ae({},be),{layers:eh(a.markup)})}else y=ae({},a),"layers"in a?y.layers=eh(a.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let b=!1,E=!1;for(const te of y.layers)if(te.rows)for(const le of te.rows.flat()){yd(le)&&(b=!0);const be=le.command;typeof be=="string"&&["undo","redo","cut","copy","paste"].includes(be)&&(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 vv(a,y){var b,E;let te='<div class="left">';if(a.normalizedLayouts.length>1)for(const[le,be]of a.normalizedLayouts.entries()){const He=be,Ye=[le===y?"selected":"layer-switch"];He.tooltip&&Ye.push("MLK__tooltip"),He.labelClass&&Ye.push(...He.labelClass.split(" ")),te+=`<div class="${Ye.join(" ")}"`,He.tooltip&&(te+=" data-tooltip='"+((b=Ne(He.tooltip))!=null?b:He.tooltip)+"' "),le!==y&&(te+=`data-layer="${He.layers[0].id}"`),te+=`>${(E=He.label)!=null?E:"untitled"}</div>`}return te+="</div>",te}function gv(a,y){let b="";if(a.editToolbar==="none")return"";const te=[];y.selectionIsCollapsed?te.push("undo","redo","pasteFromClipboard"):te.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const le={undo:`<div class='action ${y.canUndo===!1?"disabled":""}'
data-command='"undo"'
data-tooltip='${Ne("tooltip.undo")}'>
<svg><use xlink:href='#svg-undo' /></svg>
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
data-command='"redo"'
data-tooltip='${Ne("tooltip.redo")}'>
<svg><use xlink:href='#svg-redo' /></svg>
</div>`,cutToClipboard:`
<div class='action'
data-command='"cutToClipboard"'
data-tooltip='${Ne("tooltip.cut to clipboard")}'>
<svg><use xlink:href='#svg-cut' /></svg>
</div>
`,copyToClipboard:`
<div class='action'
data-command='"copyToClipboard"'
data-tooltip='${Ne("tooltip.copy to clipboard")}'>
<svg><use xlink:href='#svg-copy' /></svg>
</div>
`,pasteFromClipboard:`
<div class='action'
data-command='"pasteFromClipboard"'
data-tooltip='${Ne("tooltip.paste from clipboard")}'>
<svg><use xlink:href='#svg-paste' /></svg>
</div>
`};return b+=te.map(be=>le[be]).join(""),b}function yv(a){for(const y of a)bv(y)}function bv(a){const y=Mu.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,te]=Ph(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function _v(){Wl("virtual-keyboard"),Wl("core"),Ih()}function xv(){x("core"),x("virtual-keyboard")}var Sv=`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-delete-backward" viewBox="0 0 576 512">
<path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
</symbol>
<symbol id="svg-shift" viewBox="0 0 384 512">
<path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
</symbol>
<symbol id="svg-commit" viewBox="0 0 512 512">
<path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
</symbol>
<symbol id="circle-plus" viewBox="0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"/></symbol>
<symbol id="svg-command" viewBox="0 0 640 512">
<path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
</symbol>
<symbol id="svg-undo" viewBox="0 0 512 512">
<path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
</symbol>
<symbol id="svg-redo" viewBox="0 0 512 512">
<path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
</symbol>
<symbol id="svg-arrow-left" viewBox="0 0 320 512">
<path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 320 512">
<path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
</symbol>
<symbol id="svg-tab" viewBox="0 0 448 512">
<path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
</symbol>
<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
</symbol>
<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
</symbol>
<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
</symbol>
<symbol id="svg-trash" viewBox="0 0 448 512">
<path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
</symbol>
<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
</svg>`;function Cv(a){a.resetKeycapRegistry(),_v();const y=document.createElement("div");y.className="ML__keyboard";const b=document.createElement("div");b.className="MLK__plate",b.innerHTML=window.MathfieldElement.createHTML(Sv+a.normalizedLayouts.map((be,He)=>wv(a,be,He)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(b),y.appendChild(E),y.addEventListener("pointerdown",Mv,{passive:!1});const te=y.querySelectorAll(".ML__edit-toolbar");if(te)for(const be of te)be.addEventListener("click",He=>{var Ye,nt;let dt=He.target,Mt="";for(;dt&&!Mt;)Mt=(Ye=dt==null?void 0:dt.getAttribute("data-command"))!=null?Ye:"",dt=(nt=dt==null?void 0:dt.parentElement)!=null?nt:null;Mt&&a.executeCommand(JSON.parse(Mt))});yv(y.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const le=y.querySelectorAll(".MLK__layer");console.assert(le.length>0,"No virtual keyboards available");for(const be of le)be.addEventListener("pointerdown",He=>He.preventDefault());return a.currentLayer=a.latentLayer,y}function wv(a,y,b){const E=[];if(!("layers"in y))return"";for(const te of y.layers)E.push(`<div tabindex="-1" class="MLK__layer" id="${te.id}">`),(a.normalizedLayouts.length>1||y.displayEditToolbar)&&(E.push("<div class='MLK__toolbar' role='toolbar'>"),E.push(vv(a,b)),y.displayEditToolbar&&E.push('<div class="ML__edit-toolbar right"></div>'),E.push("</div>")),E.push(Ev(a,te)),E.push("</div>");return E.join("")}function Ev(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>${pv(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 te of E)if(te){const le=a.registerKeycap(te),[be,He]=Ph(te);/(^|\s)separator/.test(He)?b+=`<div class="${He}"`:b+=`<div tabindex="-1" id="${le}" class="${He}"`,te.tooltip&&(b+=` data-tooltip="${te.tooltip}"`),b+=`>${be}</div>`}b+="</div>"}b+="</div>"}else y.markup&&(b+=y.markup);return y.container&&(b+="</div>"),y.backdrop&&(b+="</div>"),b}function Ph(a,y={shifted:!1}){var b,E,te,le,be,He,Ye;let nt="",dt=(b=a.class)!=null?b:"";if(y.shifted&&yd(a)&&(dt+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?nt=Qd(a.shift):typeof a.shift=="object"&&(nt=a.shift.label?a.shift.label:(E=Qd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(dt=(le=(te=a.shift.class)!=null?te:a.class)!=null?le:"");else{if(nt=a.label?a.label:(be=Qd(a.latex||a.insert||"")||a.key)!=null?be:"",a.shift){let Mt;typeof a.shift=="string"?Mt=Qd(a.shift):a.shift.label?Mt=a.shift.label:Mt=(He=Qd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?He:"",nt+=`<span class="MLK__shift">${Mt}</span>`}a.aside&&(nt+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(dt)&&(dt+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(dt)||(dt+=" MLK__keycap"),!/\bw[0-9]+\b/.test(dt)&&a.width&&(dt+=(Ye={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?Ye:""),[nt,dt||"MLK__keycap"]}var Wu={"[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:"&#x2212;",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"&divide;"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"&times;",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 kp(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!Wu[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&Wu[a.label]&&(b=se(ae(ae({},Wu[a.label]),a),{label:Wu[a.label].label})),"key"in a&&a.key&&Wu[a.key]&&(b=se(ae(ae({},Wu[a.key]),a),{key:Wu[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=ae(ae({},b),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(b=ae(ae({},b),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(b=ae(ae({},b),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(b=ae(ae({},b),window.mathVirtualKeyboard.tabKeycap)),b):a}var th;function Mv(a){var y;if(a.button!==0)return;const b=Mu.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 te=gd(a.target);if(!(te!=null&&te.id))return;const le=b.getKeycap(te.id);if(!le)return;console.assert(a.type==="pointerdown");const be=new AbortController,He=be.signal;te.classList.add("is-pressed"),te.addEventListener("pointerenter",Nh(be),{capture:!0,signal:He}),te.addEventListener("pointerleave",Nh(be),{capture:!0,signal:He}),te.addEventListener("pointercancel",Nh(be),{signal:He}),te.addEventListener("pointerup",Nh(be),{signal:He}),yd(le)&&(te.classList.add("is-active"),b.shiftPressCount++),le.variants&&(th&&clearTimeout(th),th=setTimeout(()=>{te.classList.contains("is-pressed")&&(te.classList.remove("is-pressed"),te.classList.add("is-active"),a.target&&"releasePointerCapture"in a.target&&a.target.releasePointerCapture(a.pointerId),wp(te,()=>{be.abort(),te==null||te.classList.remove("is-active")}))},300)),a.preventDefault()}function Nh(a){return y=>{const b=gd(y.target);if(!(b!=null&&b.id))return;const E=Mu.singleton;if(!E)return;const te=E.getKeycap(b.id);if(te){if(y.type==="pointerenter"&&y.target===b&&y.isPrimary&&b.classList.add("is-pressed"),y.type==="pointercancel"){b.classList.remove("is-pressed"),yd(te)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted)),a.abort();return}if(y.type==="pointerleave"&&y.target===b){b.classList.remove("is-pressed"),yd(te)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){th&&clearTimeout(th),yd(te)?b.classList.toggle("is-active",E.isShifted):b.classList.contains("is-pressed")&&(b.classList.remove("is-pressed"),E.isShifted&&te.shift?typeof te.shift=="string"?E.executeCommand(["insert",te.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):wf(te.shift):wf(te),E.shiftPressCount===1&&!y.shiftKey&&(E.shiftPressCount=0)),a.abort(),y.preventDefault();return}}}}function wf(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=Mu.singleton)==null||y.executeCommand(b)}function kv(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 gd(a){if(!a)return;let y=a;for(;y&&!kv(y);)y=y.parentElement;return y!=null?y:void 0}function yd(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var Mu=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(te=>{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(te){window.addEventListener("message",this)}document.body.addEventListener("focusin",te=>{const le=te.target;le!=null&&le.isConnected&&setTimeout(()=>{const be=Lp();be&&!be.readOnly&&be.mathVirtualKeyboardPolicy==="auto"&&ye()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",te=>{te.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{Lp()||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 te of E.layers)if(te.id===y)return te}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(te=>te==="default");E>=0&&b.splice(E,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(b),this._normalizedLayouts=b.map(te=>Mp(te))}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 te=E-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${te}px)`:`${te}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 te=this.getKeycap(E.id);if(te){const[le,be]=Ph(te,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(le),E.className=be}}}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 te=this._element.getElementsByClassName("MLK__plate")[0];if(te&&this.observer.observe(te),E===window.document.body){const le=E.style.paddingBottom;this.originalContainerBottomPadding=le;const be=te.offsetHeight-1;E.style.paddingBottom=le?`calc(${le} + ${be}px)`:`${be}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 te;return(te=this._element)==null?void 0:te.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 te=this._element.getElementsByClassName("MLK__plate")[0];te&&this.observer.unobserve(te),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}),qd(),xv(),(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=Cv(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",b=>{b.shiftKey||((b.ctrlKey||b.button===2)&&wp(b.target),b.preventDefault(),b.stopPropagation())},{capture:!0}),(y=this.container)==null||y.appendChild(this.element)}handleEvent(y){if(Cf(y)){if(!zd(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:te}=y,le=vd(te);if(window.top!==void 0&&le!=="virtual-keyboard")return;this.executeCommand(te);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:ae({type:Oh,action:y},b)}));return}if(E)E.postMessage(ae({type:Oh,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 te=b.command[1].split("");for(const le of te)this.dispatchEvent(new KeyboardEvent("keydown",{key:le,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:le,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 te of E)te.innerHTML=gv(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=[],te=vd(y);return pe(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),te=vd(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,le=>le[1].toUpperCase()),te==="virtual-keyboard"?Hc[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 Lp(){var a,y;let b=Mh(),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(ge()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=Mu.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>uv.singleton,configurable:!0});function Bh(a){const y={};for(const b of Object.keys(a))switch(b){case"scriptDepth":const E=a.scriptDepth;if(pe(E))y.scriptDepth=[E[0],E[1]];else if(typeof E=="number")y.scriptDepth=[E,E];else if(typeof E=="string"){const[le,be]=E.split(",").map(He=>parseInt(He.trim()));y.scriptDepth=[le,be]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let te=a.mathVirtualKeyboardPolicy.toLowerCase();if(te==="sandboxed"){if(window!==window.top){const le=Mu.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>le})}te="manual"}y.mathVirtualKeyboardPolicy=te;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?Le.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=Lt(a.macros);break;default:pe(a[b])?y[b]=[...a[b]]:typeof a[b]=="object"&&!(a[b]instanceof Element)&&b!=="computeEngine"?y[b]=ae({},a[b]):y[b]=a[b]}return y}function Uu(a,y){let b;typeof y=="string"?b=[y]:y===void 0?b=Object.keys(a):b=y;const E={};for(const te of b)a[te]===null?E[te]=null:pe(a[te])?E[te]=[...a[te]]:typeof a[te]=="object"&&!(a[te]instanceof Element)&&te!=="computeEngine"?E[te]=ae({},a[te]):E[te]=a[te];return typeof y=="string"?E[y]:E}function Fh(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:gt,backgroundColorMap:Ve,letterShapeStyle:Le.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:a=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(a),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:lf,inlineShortcuts:mh,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sf,value:""}}function Dp(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function ku(a,y){!a||!y||(pe(a)?a.forEach(b=>ku(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),ku(a.body,y),ku(a.above,y),ku(a.below,y),ku(a.subscript,y),ku(a.superscript,y)))}function Ef(a,y,b,E){function te(be,He){for(const Ye of le)if(Ye.style[be]!==He)return!1;return!0}if(y=a.normalizeRange(y),y[0]===y[1])return!1;const le=a.getAtoms(y,{includeChildren:!0});E.operation==="toggle"&&(b.color&&te("color",b.color)&&(b.color="none",delete b.verbatimColor),b.backgroundColor&&te("backgroundColor",b.backgroundColor)&&(b.backgroundColor="none",delete b.verbatimBackgroundColor),b.fontFamily&&te("fontFamily",b.fontFamily)&&(b.fontFamily="none"),b.fontSeries&&te("fontSeries",b.fontSeries)&&(b.fontSeries="auto"),b.fontShape&&te("fontShape",b.fontShape)&&(b.fontShape="auto"),b.fontSize&&te("fontSize",b.fontSize)&&(b.fontSize=ga),b.variant&&te("variant",b.variant)&&(b.variant="normal"),b.variantStyle&&te("variantStyle",b.variantStyle)&&(b.variantStyle=""));for(const be of le)be.applyStyle(b);return!0}function Lv(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 te=new ru(y,{mode:b.mode});te.caret=E,b.parent.addChildAfter(te,b),a.position+=1}}function Dv(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}Nt(["math","displaymath"],hc),Nt("center",hc),It("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 po("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),rn("array","{columns:colspec}",(a,y,b,E)=>new po(a,Mf(y),b,{columns:E[0],mathstyleName:"textstyle"})),rn(["equation","equation*","subequations"],"",(a,y,b)=>new po(a,Mf(y),b,{columns:[{align:"c"}]})),rn(["multline","multline*"],"",hc),rn(["align","align*","aligned","eqnarray"],"",hc),rn("split","",hc),rn(["gather","gathered"],"",hc),rn(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",hc),rn(["smallmatrix","smallmatrix*"],"[columns:colspec]",hc),rn(["cases","dcases","rcases"],"",hc);function Av(a){for(const y of a)for(const b of y)if(b.length>0)return!1;return!0}function Mf(a,y=1){return Av(a)?Array(y).fill([[new sr({type:"first"}),new Ji]]):a.map(b=>b.length===0?[[new sr({type:"first"})]]:b.map(E=>E.length===0?[new sr({type:"first"})]:(E[0].type!=="first"&&E.unshift(new sr({type:"first"})),E)))}function hc(a,y=[[[]]],b=[],E=[]){switch(y=Mf(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new po(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new po(a,y,b,{mathstyleName:"textstyle"});case"center":return new po(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new po(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new po(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new po(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new po(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Vu(E[0])});case"bmatrix":case"bmatrix*":return new po(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Vu(E[0])});case"Bmatrix":case"Bmatrix*":return new po(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Vu(E[0])});case"vmatrix":case"vmatrix*":return new po(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Vu(E[0])});case"Vmatrix":case"Vmatrix*":return new po(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Vu(E[0])});case"matrix":case"matrix*":return new po(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Vu(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new po(a,y,b,{mathstyleName:"scriptstyle",columns:Vu(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new po(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 po(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new po(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let te=0;for(const He of y)te=Math.max(te,He.length);const le=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let be=2;for(;be<te;)le.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),be+=2;return le.push({gap:0}),new po(a,y,b,{arraycolsep:0,columns:le,minColumns:2})}}return new po(a,y,b,{mathstyleName:"textstyle"})}function Vu(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 Iv(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof po);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof po)){const E=a.at(a.position);if(b=E,!b.parent.parent){let te=a.extractAtoms([a.position,a.lastOffset]),le=a.extractAtoms([0,a.position]);le.length===0&&(le=jh()),te.length===0&&(te=jh());let be;return y.endsWith("column")?(be=hc("split",[[le,te]]),a.root=be,Gu(be,0,0)?Yu(a,be,0,0):Gu(be,0,1)?Yu(a,be,0,1):a.position=a.offsetOf(E)):(be=hc("lines",[[le],[te]]),a.root=be,Gu(be,0,0)?Yu(a,be,0,0):Gu(be,1,0)?Yu(a,be,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof sa){const te=b.parent;let le=a.extractAtoms([a.position,a.offsetOf(te.lastChild)]),be=a.extractAtoms([a.offsetOf(te.firstChild),a.position]);be.length===0&&(be=jh()),le.length===0&&(le=jh());let He="pmatrix";const Ye=te.leftDelim,nt=te.rightDelim;Ye==="("&&(nt===")"||nt==="?")?He="pmatrix":(Ye==="["||Ye==="\\lbrack")&&(nt==="]"||nt==="\\rbrack"||nt==="?")?He="bmatrix":Ye==="\\vert"&&nt==="\\vert"?He="vmatrix":Ye==="\\Vert"&&nt==="\\Vert"?He="Vmatrix":(Ye==="{"||Ye==="\\lbrace")&&(nt==="."||nt==="?")&&(He="cases");const dt=hc(He,y.endsWith("column")?[[be,le]]:[[be],[le]]);return te.parent.addChildBefore(dt,te),te.parent.removeChild(te),Gu(dt,0,0)?Yu(a,dt,0,0):y.endsWith("column")?Gu(dt,0,1)?Yu(a,dt,0,1):a.position=a.offsetOf(b):Gu(dt,1,0)?Yu(a,dt,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof po?[b.parent,b.parentBranch]:[void 0,[0,0]]}function Gu(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Tv(a,y,b,E){const te=y.getCell(b,E);return te?[a.offsetOf(te[0]),a.offsetOf(te[te.length-1])]:-1}function Yu(a,y,b,E){const te=Tv(a,y,b,E);typeof te!="number"&&a.setSelection(te)}function zh(a,y,b,E,te){const le=y.getCell(b,E);le&&a.setPositionHandlingPlaceholder(a.offsetOf(le[te==="start"?0:le.length-1]))}function $h(a,y){const[b,[E,te]]=Iv(a,y);if(b)switch(y){case"after row":b.addRowAfter(E),zh(a,b,E+1,0,"end");break;case"after column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnAfter(te),zh(a,b,E,te+1,"end");break;case"before row":b.addRowBefore(E),zh(a,b,E,0,"start");break;case"before column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnBefore(te),zh(a,b,E,te,"start");break}}function Ap(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Ov(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Ip(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Rv(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Tp(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 te=a.at(a.position),le=te.type==="array"?te:a.parentEnvironment;return le.environmentName=y,le.leftDelim=b,le.rightDelim=E,a.contentDidChange({}),!0}function Op(a,y){let b=a.at(a.position);for(;b&&!(Array.isArray(b.parentBranch)&&b.parent instanceof po);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof po){const E=b.parent,te=b.parentBranch;let le;switch(y){case"row":if(E.rowCount>1){E.removeRow(te[0]);const be=E.getCell(Math.max(0,te[0]-1),te[1]);le=a.offsetOf(be[be.length-1])}break;case"column":if(E.colCount>E.minColumns){E.removeColumn(te[1]);const be=E.getCell(te[0],Math.max(0,te[1]-1));le=a.offsetOf(be[be.length-1])}break}le&&a.setPositionHandlingPlaceholder(le)}}function Pv(a){return a.contentWillChange({inputType:"deleteContent"})?(Op(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function Nv(a){return a.contentWillChange({inputType:"deleteContent"})?(Op(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}Ul({addRowAfter:Ap,addColumnAfter:Ip,addRowBefore:Ov,addColumnBefore:Rv,removeRow:Pv,removeColumn:Nv,setEnvironment:Tp},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function jh(){return[new Ji]}var Rp=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}};Rp.maximumDepth=1e3;var Bv=Rp;function kf(a,y,b){if(a.at(y).mode!=="text")return y;const E=b==="backward"?-1:1;let te;if(Fe.test(a.at(y).value)){let le=y,be;do be=a.at(le).mode==="text"&&Fe.test(a.at(le).value),le+=E;while(a.at(le)&&be);te=a.at(le)?le-2*E:le-E}else if(/\s/.test(a.at(y).value)){let le=y;for(;a.at(le)&&a.at(le).mode==="text"&&/\s/.test(a.at(le).value);)le+=E;if(!a.at(le))te=le-E;else{let be=!0;do be=a.at(le).mode==="text"&&!/\s/.test(a.at(le).value),le+=E;while(a.at(le)&&be);te=a.at(le)?le-2*E:le-E}}else{let le=y;for(;a.at(le)&&a.at(le).mode==="text"&&!/\s/.test(a.at(le).value);)le+=E;te=a.at(le)?le:le-E;let be=!0;for(;a.at(le)&&be;)be=a.at(le).mode==="text"&&/\s/.test(a.at(le).value),be&&(te=le),le+=E;te=a.at(le)?le-2*E:le-E}return te-(E>0?0:1)}function bd(a,y,b){var E,te,le,be,He,Ye,nt;const dt=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let Mt=a.at(a.position);if(y==="forward"&&(Mt.type==="subsup"?(Mt=Mt.rightSibling,Mt||(Mt=a.at(a.position+1))):Mt=a.at(a.position+1)),!Mt)return a.announce("plonk"),!1;let Zt=a.offsetOf(Mt);if(Mt instanceof wc)Zt=kf(a,Zt,y);else if(Mt instanceof Gs)if(Mt.isSuggestion)for(console.assert(y==="forward");Mt&&Mt instanceof Gs;)Mt.isSuggestion=!1,Zt=a.offsetOf(Mt),Mt=Mt.rightSibling;else if(y==="forward"){if(Mt=Mt.rightSibling,!Mt||!(Mt instanceof Gs))return a.announce("plonk"),!1;for(;Mt&&Mt instanceof Gs&&/[a-zA-Z\*]/.test(Mt.value);)Zt=a.offsetOf(Mt),Mt=Mt.rightSibling}else{if(Mt=Mt.leftSibling,!Mt||!(Mt instanceof Gs))return a.announce("plonk"),!1;for(;Mt&&Mt instanceof Gs&&/[a-zA-Z\*]/.test(Mt.value);)Zt=a.offsetOf(Mt),Mt=Mt.leftSibling}else if(y==="forward"&&Mt.type==="mopen"){let sn=0;do Mt.type==="mopen"?sn+=1:Mt.type==="mclose"&&(sn-=1),Mt=Mt.rightSibling;while(!Mt.isLastSibling&&sn!==0);Zt=a.offsetOf(Mt.leftSibling)}else if(y==="backward"&&Mt.type==="mclose"){let sn=0;do Mt.type==="mopen"?sn+=1:Mt.type==="mclose"&&(sn-=1),Mt=Mt.leftSibling;while(!Mt.isFirstSibling&&sn!==0);Zt=a.offsetOf(Mt)}else if(y==="backward")if(Mt.type==="first")for(;Zt>0&&Mt.type==="first";)Zt-=1,Mt=a.at(Zt);else{const sn=Mt.type;Mt.type==="subsup"&&(Zt=a.offsetOf(a.at(Zt).leftSibling)),Zt-=1;let bn=(te=a.at(Zt))==null?void 0:te.type;for(;Zt>=0&&bn===sn;)((le=a.at(Zt))==null?void 0:le.type)==="subsup"?Zt=a.offsetOf(a.at(Zt).leftSibling):Zt-=1,bn=a.at(Zt).type}else{const{type:sn}=Mt;let bn=(be=a.at(Zt))==null?void 0:be.type;const{lastOffset:Gn}=a;for(;Zt<=Gn&&(bn===sn||bn==="subsup");){for(;((He=a.at(Zt).rightSibling)==null?void 0:He.type)==="subsup";)Zt=a.offsetOf(a.at(Zt).rightSibling);Zt+=1,bn=(Ye=a.at(Zt))==null?void 0:Ye.type}Zt-=1}if((nt=b==null?void 0:b.extend)!=null&&nt){if(!a.setSelection(a.anchor,Zt))return a.announce("plonk"),!1}else{if(Zt===a.position)return a.announce("plonk"),!1;a.position=Zt}return a.announce("move",dt),a.mathfield.stopCoalescingUndo(),!0}function Kc(a,y,b){var E,te;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[He,Ye]=vp(a);He!==void 0&&Ye!==void 0&&a.deleteAtoms([He,Ye])}if(y==="upward")return zv(a,b);if(y==="downward")return $v(a,b);if(b.extend){let He=Hh(a,a.position,y);He<0&&(He=0),He>a.lastOffset&&(He=a.lastOffset);const Ye=a.setSelection(a.anchor,He);return a.mathfield.stopCoalescingUndo(),Ye}if(a.selectionIsPlaceholder){a.collapseSelection(y);const He=Kc(a,y);return a.mathfield.stopCoalescingUndo(),He}let le=a.position;const be=le;if(a.collapseSelection(y)?(le=a.position,Pp(a,le)||(le=Hh(a,le,y))):le=Hh(a,le,y),le<0||le>a.lastOffset){let He=!0;return a.silenceNotifications||(He=(te=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))!=null?te:!0),He&&a.announce("plonk"),He}return a.setPositionHandlingPlaceholder(le),a.mathfield.stopCoalescingUndo(),a.announce("move",be),!0}function Hh(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||Pp(a,y)?y:Hh(a,y,b)}function Pp(a,y){var b;const E=a.at(y);let te=E.parent;for(;te&&!te.inCaptureSelection;)te=te.parent;return!(te!=null&&te.inCaptureSelection||(b=E.parent)!=null&&b.skipBoundary&&(!E.isFirstSibling&&E.isLastSibling||E.type==="first")||a.mathfield.hasEditablePrompts&&!E.parentPrompt)}function Fv(a,y,b){let E=1/0,te=0;for(;te<y.length;te++){const le=ld(a.getHTMLElement(y[te])).right,be=Math.abs(b-le);if(be<=E)E=be;else break}return y[te-1]}function Kh(a,y,b,E,te){const le=a.mathfield.hasEditablePrompts,be=le?b.filter(nt=>nt.type==="prompt"&&!nt.captureSelection):b,He=ld(a.mathfield.getHTMLElement(y)).right,Ye=a.offsetOf(Fv(a.mathfield,be,He))-(le?1:0);if(E){const[nt,dt]=a.selection.ranges[0];let Mt;Ye<(te==="up"?nt:dt)?Mt={ranges:[[Ye,dt]],direction:"backward"}:Mt={ranges:[[nt,Ye]],direction:"forward"},a.setSelection(Mt)}else a.setPositionHandlingPlaceholder(Ye);a.announce(`move ${te}`)}function zv(a,y){var b,E;const te=(b=y==null?void 0:y.extend)!=null?b:!1;te||a.collapseSelection("backward");const le=()=>{var Ye,nt;let dt=!0;return a.silenceNotifications||(dt=(nt=(Ye=a.mathfield.host)==null?void 0:Ye.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?nt:!0),a.announce(dt?"plonk":"line"),dt},be=a.at(a.position);let He=be;for(;He&&He.parentBranch!=="below"&&!(Array.isArray(He.parentBranch)&&He.parent instanceof po);)He=He.parent;if(Array.isArray(He==null?void 0:He.parentBranch)&&He.parent instanceof po){const Ye=He.parent;if(He.parentBranch[0]<1)return le();const nt=He.parentBranch[0]-1,dt=Ye.array[nt][He.parentBranch[1]];if(!dt.some(Zt=>Zt.type==="prompt"&&!Zt.captureSelection)&&a.mathfield.hasEditablePrompts)return le();Kh(a,be,dt,te,"up")}else if(He){const Ye=(E=He.parent.branch("above"))!=null?E:He.parent.createBranch("above");if(!Ye.some(dt=>dt.type==="prompt"&&dt.placeholderId)&&a.mathfield.hasEditablePrompts)return le();Kh(a,be,Ye,te,"up")}else return le();return a.mathfield.stopCoalescingUndo(),!0}function $v(a,y){var b,E;const te=(b=y==null?void 0:y.extend)!=null?b:!1;te||a.collapseSelection("forward");const le=()=>{var Ye,nt;let dt=!0;return a.silenceNotifications||(dt=(nt=(Ye=a.mathfield.host)==null?void 0:Ye.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?nt:!0),a.announce(dt?"plonk":"line"),dt},be=a.at(a.position);let He=be;for(;He&&He.parentBranch!=="above"&&!(Array.isArray(He.parentBranch)&&He.parent instanceof po);)He=He.parent;if(Array.isArray(He==null?void 0:He.parentBranch)&&He.parent instanceof po){const Ye=He.parent;if(He.parentBranch[0]+1>Ye.array.length-1)return le();const nt=He.parentBranch[0]+1,dt=Ye.array[nt][He.parentBranch[1]];if(!dt.some(Zt=>Zt.type==="prompt"&&!Zt.captureSelection)&&a.mathfield.hasEditablePrompts)return le();Kh(a,be,dt,te,"down")}else if(He){const Ye=(E=He.parent.branch("below"))!=null?E:He.parent.createBranch("below");if(!Ye.some(dt=>dt.type==="prompt")&&a.mathfield.hasEditablePrompts)return le();Kh(a,be,Ye,te,"down")}else return le();return!0}function Np(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 jv(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 Hv(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 Bp(a){var y;if(a.collapseSelection(),jv(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 uc({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function Fp(a){var y;if(a.collapseSelection(),Hv(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 uc({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 Kv(){function a(Ye){const nt=[],dt=[];return[...Ye.querySelectorAll(`input, select, textarea, a[href], button,
[tabindex], audio[controls], video[controls],
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((Zt,sn)=>{const bn=E(Zt);bn===0?nt.push(Zt):dt.push({documentOrder:sn,tabIndex:bn,node:Zt})}),dt.sort((Zt,sn)=>Zt.tabIndex===sn.tabIndex?Zt.documentOrder-sn.documentOrder:Zt.tabIndex-sn.tabIndex).map(Zt=>Zt.node).concat(nt)}function y(Ye){return!(!b(Ye)||te(Ye)||E(Ye)<0)}function b(Ye){return!(Ye.disabled||Ye.type==="hidden"&&Ye.tagName.toUpperCase()==="INPUT"||He(Ye))}function E(Ye){var nt;const dt=Number.parseInt((nt=Ye.getAttribute("tabindex"))!=null?nt:"NaN",10);return Number.isNaN(dt)?Ye.contentEditable==="true"||(Ye.nodeName==="AUDIO"||Ye.nodeName==="VIDEO")&&Ye.getAttribute("tabindex")===null?0:Ye.tabIndex:dt}function te(Ye){return Ye.tagName.toUpperCase()==="INPUT"&&Ye.type==="radio"&&!be(Ye)}function le(Ye,nt){for(const dt of Ye)if(dt.checked&&dt.form===nt)return dt;return null}function be(Ye){var nt;if(!Ye.name)return!0;const Mt=((nt=Ye.form)!=null?nt:Ye.ownerDocument).querySelectorAll('input[type="radio"][name="'+Ye.name+'"]'),Zt=le(Mt,Ye.form);return!Zt||Zt===Ye}function He(Ye){if(!ge()||Ye===document.activeElement||Ye.contains(document.activeElement))return!1;if(getComputedStyle(Ye).visibility==="hidden")return!0;const nt=Ye.getBoundingClientRect();if(nt.width===0||nt.height===0)return!0;for(;Ye;){if(getComputedStyle(Ye).display==="none")return!0;Ye=Ye.parentElement}return!1}return ge()?a(document.body):[]}function _l(a,y,b="forward"){const E=a.position;if(Array.isArray(y)){const te=a.offsetOf(y[0]),le=a.offsetOf(y[y.length-1]);return b==="forward"?a.setSelection(te,le):a.setSelection(le,te),a.announce("move",E),a.mathfield.stopCoalescingUndo(),!0}return b==="forward"?_l(a,[y.leftSibling,y]):_l(a,[y,y.leftSibling])}function kc(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 Zh(a,y,b=!0){var E,te;const le=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Kc(a,y);let be;const He=a.at(a.anchor).parentPrompt;He?y==="forward"?be=a.offsetOf(He)+1:be=a.offsetOf(He.leftSibling):be=Math.max(a.position+le,0);const Ye=Lf(a,be,y);if(!Ye||y==="forward"&&a.offsetOf(Ye)<be||y==="backward"&&a.offsetOf(Ye)>be){if(!b||!((te=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))==null||te))return a.announce("plonk"),!1;const dt=Kv();if(!document.activeElement||dt.length<=1)return a.announce("plonk"),!1;let Mt=dt.indexOf(document.activeElement)+le;return Mt<0&&(Mt=dt.length-1),Mt>=dt.length&&(Mt=0),dt[Mt].focus(),a.mathfield.stopCoalescingUndo(),!0}return kc(a,Ye),!0}function Lf(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)}Ul({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 te=b.parentBranch;let le;if(typeof te=="string"&&(le=y[te]),!le){const He=b.subsupPlacement?Fp(a):Bp(a);return a.mathfield.stopCoalescingUndo(),He}E.branch(le)||E.createBranch(le);const be=a.setSelection(a.getBranchRange(a.offsetOf(E),le));return a.mathfield.stopCoalescingUndo(),be},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=>Np(a),moveToNextChar:a=>Kc(a,"forward"),moveToPreviousChar:a=>Kc(a,"backward"),moveUp:a=>Kc(a,"upward"),moveDown:a=>Kc(a,"downward"),moveToNextWord:a=>bd(a,"forward"),moveToPreviousWord:a=>bd(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,te;if(a.position===a.lastOffset&&a.anchor===a.lastOffset)return Zh(a,"forward");const le=a.at(a.position);if(le.mode==="text"){if(a.selectionIsCollapsed){let Zt=le;for(;Zt&&Zt.mode==="text";)Zt=Zt.leftSibling;let sn=le;for(;((y=sn.rightSibling)==null?void 0:y.mode)==="text";)sn=sn.rightSibling;if(Zt&&sn)return _l(a,[Zt,sn])}if(le.rightSibling.mode==="text"){let Zt=le;for(;Zt&&Zt.mode==="text";)Zt=Zt.rightSibling;return Zt?(kc(a,(b=Zt.leftSibling)!=null?b:Zt),a.mathfield.switchMode("math"),!0):kc(a,a.lastOffset)}}const He=a.at(a.anchor).parentPrompt,Ye=He?a.offsetOf(He)+1:Math.max(a.position+1,0),nt=Lf(a,Ye,"forward");if(nt)return kc(a,nt);const dt=zp(a,le,Zt=>Zt.type==="leftright"||Zt.type==="text","forward");if(dt){if(dt.mode==="text"){let Zt=dt;for(;Zt&&Zt.mode==="text";)Zt=Zt.rightSibling;return _l(a,[(E=dt.leftSibling)!=null?E:dt,(te=Zt.leftSibling)!=null?te:Zt])}return _l(a,dt)}const Mt=le.parent;if(Mt){if(Mt.type==="leftright"||Mt.type==="surd")return _l(a,Mt);if(le.parentBranch==="superscript"&&Mt.subscript)return _l(a,Mt.subscript);if(le.parentBranch==="above"&&Mt.below)return _l(a,Mt.below);if(le.parentBranch==="superscript"||le.parentBranch==="subscript")return kc(a,Mt);if(le.parentBranch==="above"||le.parentBranch==="below")return _l(a,Mt)}return kc(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return Zh(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let He=b;for(;He&&He.mode==="text";)He=He.leftSibling;let Ye=b;for(;((y=Ye.rightSibling)==null?void 0:y.mode)==="text";)Ye=Ye.rightSibling;if(He&&Ye)return _l(a,[He,Ye])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?kc(a,b):kc(a,0)}const te=a.at(a.anchor).parentPrompt,le=te?a.offsetOf(te.leftSibling):Math.max(a.position-1,0),be=Lf(a,le,"backward");if(be)return kc(a,be);if(E==="math"){const He=zp(a,b,nt=>nt.type==="leftright"||nt.type==="text","backward");if(He){if(He.mode==="text"){let nt=He;for(;nt&&nt.mode==="text";)nt=nt.leftSibling;return _l(a,[He,nt])}return _l(a,He)}const Ye=b.parent;if(Ye){if(Ye.type==="leftright"||Ye.type==="surd")return _l(a,Ye);if(b.parentBranch==="subscript"&&Ye.superscript)return _l(a,Ye.superscript);if(b.parentBranch==="below"&&Ye.above)return _l(a,Ye.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return kc(a,Ye);if(b.parentBranch==="above"||b.parentBranch==="below")return _l(a,Ye)}return kc(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:Bp,moveToSubscript:Fp},{target:"model",changeSelection:!0}),Ul({moveToNextPlaceholder:a=>Zh(a,"forward"),moveToPreviousPlaceholder:a=>Zh(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function zp(a,y,b,E){if(E==="forward"){let le=y.rightSibling;for(;le&&!b(le);)le=le.rightSibling;return le}let te=y.leftSibling;for(;te&&!b(te);)te=te.leftSibling;return te}function Wh(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,te=!1,le="";for(;!te;){const be=a.at(E);te=y===0||be===void 0||be.type==="first"||be.mode!=="math"||!(be.type&&/mord|mpunct|operator/.test(be.type)||be.type==="mop"&&/[a-zA-Z ]+/.test(be.value))||!be.hasEmptyBranch("superscript")||!be.hasEmptyBranch("subscript")||typeof b=="function"&&!b(be),te||(be.mode="text",be.command=be.value,be.verbatimLatex=void 0,le+=be.value),E-=1,y-=1}a.contentDidChange({data:le,inputType:"insertText"})}function Xu(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,te=!1;const le=[];for(;!te;){const be=a.at(E);te=y===0||!be||be.type==="first"||be.isFirstSibling||be.mode!=="text"||be.value===" "||typeof b=="function"&&!b(be),te||(le.push(sr.serialize([be],{defaultMode:"math"})),be.mode="math"),E-=1,y-=1}Df(a),a.contentDidChange({data:ko(le),inputType:"insertText"})}function Df(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 Zv(a){let y="",b=a.position,E=!1;for(;!E;){const te=a.at(b);E=!(te&&(te.mode==="text"||te.mode==="math"&&te.type&&/mord|mpunct/.test(te.type))),E||(y=te.value+y),b-=1}return y}function Wv(a,y,b){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!b||!Eh(b))return!1;const te=fd(b);if(!E.selectionIsCollapsed)return!!(a.model.mode==="text"&&/[/_^]/.test(te));const le=Zv(E)+te;if(a.model.mode==="text"){if(y==="Esc"||/[/\\]/.test(te))return!0;if(/[\^_]/.test(te))return/(^|\s)[a-zA-Z][^_]$/.test(le)&&Xu(E,1),!0;const be={")":"(","}":"{","]":"["}[te],{parent:He}=E.at(E.position);if(be&&He instanceof sa&&He.leftDelim===be)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(le))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(te))return!0;if(/(^|[^a-zA-Z'])[a-zA-Z] $/.test(le))return Xu(E,1),!1;if(/\D\.[^\d\s]$/.test(le)){Xu(E,1);const Ye=E.at(E.position);return Ye.value="\u22C5",Ye.style.variant="normal",Ye.command="\\cdot",Ye.verbatimLatex=void 0,E.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(le)||/\.\d$/.test(le)||/\([\d+\-.]$/.test(le))return Xu(E,1),!0;if(/\([a-z][,;]$/.test(le))return Xu(E,2),!0;if(/[\d+\-=><*|]$/.test(te))return Df(E),!0}else{if(y==="[Space]")return Wh(E,void 0,be=>/[a-z][:,;.]$/.test(be.value)),!0;if(/[a-zA-Z]{3,}$/.test(le)&&!/(dxd|abc|xyz|uvw)$/.test(le))return Wh(E,void 0,be=>/[a-zA-Z]/.test(be.value)),!0;if(/(^|\W)(if)$/i.test(le))return Wh(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(le)&&!/(αβγ)$/.test(le))return Wh(E,void 0,be=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(be.value)),!0;if(te==="?"||te==="."&&!/[\d-+]\.$/.test(le))return!0}return!1}function Uv(a,y){if(!a.isSelectionEditable||!a.keystrokeCaptionVisible)return;const b=$p(),E=a.element.getBoundingClientRect();b.style.left=`${E.left}px`,b.style.top=`${E.top-64}px`,b.innerHTML=window.MathfieldElement.createHTML("<span>"+(gf(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 Vv(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const y=$p();y.innerHTML=""}else{const y=Lh("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function $p(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(Wl("keystroke-caption"),Wl("core"),Lh("mathlive-keystroke-caption-panel"))}function Gv(){document.getElementById("mathlive-keystroke-caption-panel")&&(bf("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function jp(a,y){var b,E,te;const{model:le}=a,be=pp(y);if(y.isTrusted){Bm(y);const sn=Gd();a.keyboardLayout!==sn.id&&(a.keyboardLayout=sn.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Uv(a,be),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let He,Ye="",nt;const dt=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(le.mode==="math")if(be==="[Backspace]")dt.pop();else if(!Eh(y))a.flushInlineShortcutBuffer();else{const sn=fd(y),bn=[...(E=(b=dt[dt.length-1])==null?void 0:b.keystrokes)!=null?E:[],sn];dt.push({state:le.getState(),keystrokes:bn,leftSiblings:Yv(a)});let Gn=0,Gr="";for(;!He&&Gn<bn.length;)nt=dt.length-(bn.length-Gn),Gr=bn.slice(Gn).join(""),He=Td(dt[nt].leftSiblings,Gr,a.options.inlineShortcuts),!He&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(Gr)&&(He=a.options.onInlineShortcut(a,Gr)),Gn+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(He?a.switchMode("math"):Wv(a,be,y)&&(a.switchMode({math:"text",text:"math"}[le.mode]),Ye=""))}if(!He){if(Ye||(Ye=Zm(a.keybindings,le.mode,y)),!Ye&&(be==="[Enter]"||be==="[Return]")){let sn=!1;return le.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(sn=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),sn||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),le.contentDidChange({inputType:"insertLineBreak"})),sn}if((!Ye||be==="[Space]")&&le.mode==="math"){if(be==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return ho.insert(le,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),Ye="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const sn=le.at(le.position+1),bn=le.at(le.position-1);if((sn==null?void 0:sn.mode)==="text"||(bn==null?void 0:bn.mode)==="text")return ho.insert(le," ",{mode:"text"}),a.snapshot("insert-space"),a.dirty=!0,a.scrollIntoView(),!1}(te=le.at(le.position))!=null&&te.isDigit()&&window.MathfieldElement.decimalSeparator===","&&fd(y)===","&&(Ye="insertDecimalSeparator")}}if(!He&&!Ye){if(le.mathfield.smartFence){if(If(le,fd(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:sn}=le.at(le.position);if(sn instanceof sa&&sn.rightDelim==="?"&&le.at(le.position).isLastSibling&&/^[)}\]|]$/.test(be))return a.snapshot(),sn.isDirty=!0,sn.rightDelim=be,le.position+=1,le.selectionDidChange(),le.contentDidChange({data:fd(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!le.selectionIsCollapsed){const bn=fd(y);if(bn==="("||bn==="{"||bn==="["){const Gn={"(":"(","{":"\\lbrace","[":"\\lbrack"}[bn],Gr={"(":")","{":"\\rbrace","[":"\\rbrack"}[bn],[Wn,yr]=Fs(le.selection);return a.snapshot(),le.position=yr,ho.insert(le,Gr,{format:"latex"}),le.position=Wn,ho.insert(le,Gn,{format:"latex"}),le.setSelection(Wn+1,yr+1),le.contentDidChange({data:bn,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const Mt=le.at(Math.max(le.position,le.anchor)),{parent:Zt}=Mt;if(Ye==="moveAfterParent"&&(Zt==null?void 0:Zt.type)==="leftright"&&Mt.isLastSibling&&a.options.smartFence&&If(le,".",a.defaultStyle)&&(Ye="",rs(a)),a.keyboardDelegate.cancelComposition(),Ye)a.executeCommand(Ye);else if(He){const sn=a.effectiveStyle;le.setState(dt[nt].state);const bn=dt[dt.length-1].keystrokes;for(const Gn of bn)ho.insert(le,Gn,{silenceNotifications:!0,style:sn});a.snapshot("insert-shortcut"),le.setState(dt[nt].state),le.deferNotifications({content:!0,selection:!0,data:He,type:"insertText"},()=>(ho.insert(le,He,{format:"latex",style:sn}),Df(a.model),He.endsWith(" ")&&(a.switchMode("text"),ho.insert(le," ",{style:sn,mode:"text"})),a.snapshot(),le.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,le.announce("replacement")}return a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}function Af(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 te=zl(y);const le=window.mathVirtualKeyboard;if(le!=null&&le.isShifted&&(te=typeof te=="string"?te.toUpperCase():te.map(Ye=>Ye.toUpperCase())),b.simulateKeystroke){let Ye=!0;for(const nt of te)jp(a,new KeyboardEvent("keypress",{key:nt}))&&(Ye=!1);if(Ye)return}const be=E.at(E.position),He=ae(ae({},be.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(Fs(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{kh(a);for(const Ye of te)ho.insert(E,Ye);a.snapshot("insert-latex"),Xd(a)});else if(E.mode==="text"){for(const Ye of te)ho.insert(E,Ye,{style:He});a.snapshot("insert-text")}else if(E.mode==="math")for(const Ye of te)Xv(a,Ye,He,be);a.dirty=!0,a.scrollIntoView()}function Yv(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 Xv(a,y,b,E){const te=a.model;let le={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[y];if(y===" "&&a.options.mathModeSpace&&(le=["insert",a.options.mathModeSpace]),le){a.executeCommand(le);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){Jv(te),ho.insert(te,y,{style:b}),a.snapshot(),Np(te),a.snapshot();return}if(/[a-zA-Z0-9]/.test(y)&&a.adoptStyle!=="none"){const be=a.adoptStyle==="left"?E:E.parent?E.rightSibling:null;(be==null?void 0:be.type)==="mord"&&/[a-zA-Z0-9]/.test(be.value)&&(b=ae({},b),be.style.variant&&(b.variant=be.style.variant),be.style.variantStyle&&(b.variantStyle=be.style.variantStyle))}ho.insert(te,y,{style:b}),a.snapshot(`insert-${te.at(te.position).type}`)}function Jv(a){a.selectionIsCollapsed||(a.deleteAtoms(Fs(a.selection)),a.mathfield.snapshot("delete"))}function If(a,y,b){if(!y||a.mode!=="math")return!1;const E=a.at(a.position),{parent:te}=E,le={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[y];if(!le)return!1;const be=re[le],He=ie[le];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[Ye,nt]=Fs(a.selection),dt=a.extractAtoms([Ye,nt]),Mt=te.addChildrenAfter([new sa("left...right",dt,{leftDelim:le,rightDelim:He})],a.at(Ye));return a.setSelection(a.offsetOf(Mt.firstChild),a.offsetOf(Mt.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:le,inputType:"insertText"}),!0}if(le==="|"){const Ye=te instanceof sa?te.leftDelim+te.rightDelim:"";if(Ye==="\\lbrace\\rbrace"||Ye==="\\{\\}"||Ye==="\\lbrace?")return a.mathfield.snapshot(),ho.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:le,inputType:"insertText"}),!0}if(He){if(te instanceof sa&&te.firstChild===E&&(te.leftDelim==="?"||te.leftDelim==="."))return te.leftDelim=le,te.isDirty=!0,a.mathfield.snapshot(),a.contentDidChange({data:le,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(!(te instanceof sa)){let Mt=E;for(;Mt&&!(Mt.type==="mclose"&&Mt.value===He);)Mt=Mt.rightSibling;if(Mt){a.mathfield.snapshot();const Zt=a.extractAtoms([a.offsetOf(E),a.offsetOf(Mt)]);return Zt.pop(),te.addChildrenAfter([new sa("left...right",Zt,{leftDelim:le,rightDelim:He})],E),a.position=a.offsetOf(te.firstChild)+1,a.contentDidChange({data:le,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const Ye=a.offsetOf(E.lastSibling);let nt;for(nt=a.position;nt<=Ye;nt++){const Mt=a.at(nt);if(Mt instanceof sa&&(Mt.leftDelim==="?"||Mt.leftDelim===".")&&Hp(le,Mt.rightDelim))break}const dt=a.at(nt);if(nt<=Ye&&dt instanceof sa){dt.leftDelim=le,a.mathfield.snapshot();let Mt=a.extractAtoms([a.position,nt-1]);return Mt=Mt.filter(Zt=>Zt.type!=="first"),dt.addChildren(Mt,dt.parentBranch),a.position+=1,a.contentDidChange({data:le,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(te instanceof sa&&(te.leftDelim==="?"||te.leftDelim===".")&&Hp(le,te.rightDelim)){te.isDirty=!0,te.leftDelim=le,a.mathfield.snapshot();const Mt=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const Zt of Mt)te.parent.addChildBefore(Zt,te);return a.contentDidChange({data:le,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(te instanceof sa&&te.leftDelim==="|")){if(a.mathfield.snapshot(),ho.insert(a,`\\left${le}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const Mt=a.offsetOf(E.lastSibling),Zt=a.extractAtoms([a.position,Mt]);a.at(a.position).body=Zt,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(be){let Ye=E;for(;Ye;){if(Ye.type==="mopen"&&Ye.value===be){a.mathfield.snapshot();const sn=Ye.leftSibling,bn=a.extractAtoms([a.offsetOf(Ye.leftSibling),a.offsetOf(E)]);bn.shift();const Gn=new sa("left...right",bn,{leftDelim:be,rightDelim:le});return te.addChildrenAfter([Gn],sn),a.position=a.offsetOf(Gn),a.contentDidChange({data:le,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}Ye=Ye.leftSibling}if(te instanceof sa&&E.isLastSibling&&Tf(te.leftDelim,le))return a.mathfield.snapshot(),te.isDirty=!0,te.rightDelim=le,a.position+=1,a.contentDidChange({data:le,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const nt=a.offsetOf(E.firstSibling);let dt;for(dt=a.position;dt>=nt;dt--){const sn=a.at(dt);if(sn instanceof sa&&(sn.rightDelim==="?"||sn.rightDelim===".")&&Tf(sn.leftDelim,le))break}const Mt=a.at(dt);if(dt>=nt&&Mt instanceof sa)return a.mathfield.snapshot(),Mt.rightDelim=le,Mt.addChildren(a.extractAtoms([dt,a.position]),Mt.parentBranch),a.contentDidChange({data:le,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(te instanceof sa&&(te.rightDelim==="?"||te.rightDelim===".")&&Tf(te.leftDelim,le))return a.mathfield.snapshot(),te.isDirty=!0,te.rightDelim=le,te.parent.addChildren(a.extractAtoms([a.position,a.offsetOf(E.lastSibling)]),te.parentBranch),a.position=a.offsetOf(te),a.contentDidChange({data:le,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const Zt=te.parent;return Zt instanceof sa&&(Zt.rightDelim==="?"||Zt.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(Zt),If(a,le,b)):!1}return!1}function Tf(a,y){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y):ie[a]===y:!0}function Hp(a,y){return y?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):re[y]===a:!0}Ul({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:Vv,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)=>(Af(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 te="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),le=0;for(;E.includes(te)&&le<100;){if(le===99)return console.error("could not find a unique ID after 100 tries"),!1;te="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),le++}return a.insert(`\\placeholder[${y!=null?y:te}]{}`,b),!0}}),Ul({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"}),Ul({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})&&(Xd(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),rs(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function qv(a,y){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const b=Of(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=ae(ae({},a.defaultStyle),b)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(te=>Ef(E,te,b,{operation:"toggle"})),a.snapshot("style-change")}),!0}Ul({applyStyle:qv},{target:"mathfield",canUndo:!0,changeContent:!0});function Of(a,y){var b,E,te,le,be,He,Ye,nt,dt,Mt;const Zt={};if(typeof y.color=="string"){const bn=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";bn!==y.color&&(Zt.verbatimColor=(te=y.verbatimColor)!=null?te:y.color),Zt.color=bn}if(typeof y.backgroundColor=="string"){const bn=(be=a.backgroundColorMap((le=y.backgroundColor)!=null?le:y.verbatimBackgroundColor))!=null?be:"none";bn!==y.backgroundColor&&(Zt.verbatimBackgroundColor=(He=y.verbatimBackgroundColor)!=null?He:y.backgroundColor),Zt.backgroundColor=bn}typeof y.fontFamily=="string"&&(Zt.fontFamily=y.fontFamily),typeof y.series=="string"&&(Zt.fontSeries=y.series),typeof y.fontSeries=="string"&&(Zt.fontSeries=y.fontSeries.toLowerCase()),Zt.fontSeries&&(Zt.fontSeries=(Ye={bold:"b",medium:"m",normal:"m"}[Zt.fontSeries])!=null?Ye:Zt.fontSeries),typeof y.shape=="string"&&(Zt.fontShape=y.shape),typeof y.fontShape=="string"&&(Zt.fontShape=y.fontShape.toLowerCase()),Zt.fontShape&&(Zt.fontShape=(nt={italic:"it",up:"n",upright:"n",normal:"n"}[Zt.fontShape])!=null?nt:Zt.fontShape),y.variant&&(Zt.variant=y.variant.toLowerCase()),y.variantStyle&&(Zt.variantStyle=y.variantStyle.toLowerCase());const sn=(dt=y.size)!=null?dt:y.fontSize;return typeof sn=="number"?Zt.fontSize=Math.max(1,Math.min(10,sn)):typeof sn=="string"&&(Zt.fontSize=(Mt={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[sn.toLowerCase()])!=null?Mt:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[sn]),Zt}function Rf(a){let[y,b]=Fs(a.selection);if(y=Kp(a,y,"backward"),b=Kp(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 Kp(a,y,b){var E,te,le;let be=a.at(y);if(!be)return y;const He=b==="forward"?1:-1;if(be.mode==="text"){for(;be&&!(be.mode!=="text"||!Fe.test(be.value));)y+=He,be=a.at(y);return b==="backward"?y-1:y}if(be.mode==="latex"){if(/[a-zA-Z\*]/.test(be.value))if(b==="backward")for(;be&&be.mode==="latex"&&be.value!=="\\"&&/[a-zA-Z]/.test(be.value);)y+=He,be=a.at(y);else for(;be&&be.mode==="latex"&&/[a-zA-Z\*]/.test(be.value);)y+=He,be=a.at(y);else if(be.value==="{"){if(b==="forward"){for(;be&&be.mode==="latex"&&be.value!=="}";)y+=He,be=a.at(y);return y}return y-1}else if(be.value==="}"){if(b==="backward"){for(;be&&be.mode==="latex"&&be.value!=="{";)y+=He,be=a.at(y);return y-1}return y}return y-1}if(be.mode==="math"){if(be.isDigit()){for(;(E=a.at(y+He))!=null&&E.isDigit();)y+=He;return b==="backward"?y-1:y}if(be.style.variant||be.style.variantStyle){let Ye=(te=a.at(y))==null?void 0:te.style;for(;Ye&&Ye.variant===be.style.variant&&Ye.variantStyle===be.style.variantStyle;)Ye=(le=a.at(y+He))==null?void 0:le.style,y+=He;return b==="backward"?y-1:y}return y}return y}Ul({selectGroup:a=>{const y=Rf(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Kc(a,"forward",{extend:!0}),extendSelectionBackward:a=>Kc(a,"backward",{extend:!0}),extendToNextWord:a=>bd(a,"forward",{extend:!0}),extendToPreviousWord:a=>bd(a,"backward",{extend:!0}),extendSelectionUpward:a=>Kc(a,"upward",{extend:!0}),extendSelectionDownward:a=>Kc(a,"downward",{extend:!0}),extendToNextBoundary:a=>bd(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>bd(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 Ju=null,nh=0,Uh=class pc{static start(y,b,E,te){var le;pc.element=y,(le=pc.controller)==null||le.abort(),pc.controller=new AbortController;const be={signal:pc.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,be),y.addEventListener("pointerup",te,be),y.addEventListener("pointercancel",te,be),Pf(b)&&(pc.pointerId=b.pointerId,y.setPointerCapture(b.pointerId))):(window.addEventListener("mousemove",E,be),window.addEventListener("blur",te,be),window.addEventListener("mouseup",te,be))}static stop(){var y;(y=pc.controller)==null||y.abort(),pc.controller=void 0,typeof pc.pointerId=="number"&&(pc.element.releasePointerCapture(pc.pointerId),pc.pointerId=void 0)}};function Pf(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function Zp(a,y){var b;if(y.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let te,le=!1,be=!1,He="none",Ye=!1,nt=!1;const dt=y.clientX,Mt=y.clientY,Zt=Date.now(),sn=E.field,bn=setInterval(()=>{Ye?sn.scroll({top:0,left:sn.scrollLeft-16}):nt&&sn.scroll({top:0,left:sn.scrollLeft+16})},32);function Gn(){Uh.stop(),le=!1,clearInterval(bn),a.element.classList.remove("tracking"),y&&y.preventDefault()}function Gr(yr){if(!E.hasFocus()){Gn();return}const Qr=yr.clientX,Ir=yr.clientY,Ni=Pf(yr)&&yr.pointerType==="touch"?20:5;if(Date.now()<Zt+500&&Math.abs(dt-Qr)<Ni&&Math.abs(Mt-Ir)<Ni){yr.preventDefault(),yr.stopPropagation();return}const Yi=sn.getBoundingClientRect();nt=Qr>Yi.right,Ye=Qr<Yi.left;let $i=te;Pf(yr)&&(yr.isPrimary||($i=rh(E,yr.clientX,yr.clientY,{bias:0})));const Go=rh(E,Qr,Ir,{bias:Qr<=dt?Qr===dt?0:-1:1});$i>=0&&Go>=0&&(E.model.extendSelectionTo($i,Go),rs(a)),be&&Rf(E.model)}Ju&&Math.abs(Ju.x-dt)<5&&Math.abs(Ju.y-Mt)<5&&Date.now()<Ju.time+500?(nh+=1,Ju.time=Zt):(Ju={x:dt,y:Mt,time:Zt},nh=1);const Wn=sn.getBoundingClientRect();if(dt>=Wn.left&&dt<=Wn.right&&Mt>=Wn.top&&Mt<=Wn.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",te=rh(a,dt,Mt,{bias:0}),te>=0){if(a.element.classList.add("tracking"),y.shiftKey){const yr=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,te),gp(a.model)||yr?He="all":He="selection"}else a.model.at(te).type==="placeholder"?(a.model.setSelection(te-1,te),He="selection"):((b=a.model.at(te).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(te,te+1),He="selection"):(a.model.position=te,gp(a.model)?He="all":He="selection");a.defaultStyle={},y.detail===3||nh>2?(Gn(),(y.detail===3||nh===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},He="all")):le||(le=!0,Uh.start(sn,y,Gr,Gn),(y.detail===2||nh===2)&&(be=!0,Rf(a.model),He="all"))}a.hasFocus()||(He="none",a.focus({preventScroll:!0}))}else Ju=null;a.stopCoalescingUndo(),He!=="none"&&(a.model.selectionIsCollapsed&&(He="all"),rs(a)),y.preventDefault()}function Qv(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,te=y-(b.top+b.bottom)/2;return E*E+te*te}function Wp(a,y,b,E,te){if(!b.id)return[1/0,null];if(y.has(b.id))return y.get(b.id);const le=Su(a,b);if(!le)return[1/0,null];let be=[1/0,null];if(b.hasChildren&&!b.captureSelection&&E>=le.left&&E<=le.right)for(const He of b.children){const Ye=Wp(a,y,He,E,te);Ye[0]<=be[0]&&(be=Ye)}return be[1]||(be=[Qv(E,te,le),b]),y.set(b.id,be),be}function eg(a,y,b){const[,E]=Wp(a,new Map,a.model.root,y,b);return E}function rh(a,y,b,E){var te;const le=a.field.querySelector(".ML__latex").getBoundingClientRect();if(!le)return 0;if(y>le.right||b>le.bottom+8)return a.model.lastOffset;if(y<le.left||b<le.top-8)return 0;E=E!=null?E:{},E.bias=(te=E.bias)!=null?te:0;let be=eg(a,y,b);const He=[];let Ye=be;for(;Ye;)He.unshift(Ye),Ye=Ye.parent;for(const dt of He)if(dt.captureSelection){be=dt;break}let nt=a.model.offsetOf(be);if(nt<0)return-1;if(be.leftSibling)if(E.bias===0&&be.type!=="placeholder"){const dt=Su(a,be);dt&&y<(dt.left+dt.right)/2&&(nt=a.model.offsetOf(be.leftSibling))}else E.bias<0&&(nt=a.model.offsetOf(be.leftSibling));return nt}var tg=class extends ho{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",te=typeof y!="string"?y.getData("application/json+mathlive"):"";if(te)try{const le=JSON.parse(te);if(le&&Array.isArray(le)){a.snapshot();const be=Eu(le),{model:He}=a;He.selectionIsCollapsed||He.deleteAtoms(Fs(He.selection));const Ye=He.at(He.position);if(Ye.parent instanceof po){console.assert(Ye.parentBranch!==void 0);const nt=[];let dt=[];be[0].type==="first"&&be.shift(),be[be.length-1].type==="first"&&be.pop();for(const bn of be)bn.type==="first"&&dt.length>0?(nt.push(dt),dt=[bn]):dt.push(bn);dt.length>0&&nt.push(dt);let Mt=Number(Ye.parentBranch[0]),Zt=Number(Ye.parentBranch[1]);const sn=Ye.parent.maxColumns;for(;Ye.parent.colCount-Zt<nt.length&&Ye.parent.colCount<sn;)Ye.parent.addColumn();Ye.parent.addChildrenAfter(nt[0],Ye);for(let bn=1;bn<nt.length;bn++)Zt++,Zt>=sn&&(Zt=0,Ye.parent.addRowAfter(Mt),Mt++),Ye.parent.setCell(Mt,Zt,nt[bn])}else Ye.parent.addChildrenAfter(be.filter(nt=>nt.type!=="first"),Ye);return He.position=He.offsetOf(be[be.length-1]),He.contentDidChange({inputType:"insertFromPaste"}),rs(a),!0}}catch(le){}if(te=typeof y!="string"?y.getData("application/json"):"",te&&window.MathfieldElement.computeEngine)try{const le=JSON.parse(te);if(typeof le=="object"&&"latex"in le&&le.latex&&(b=le.latex),!b){const be=window.MathfieldElement.computeEngine.box(le);be&&!be.has("Error")&&(b=be.latex)}b||(E="latex")}catch(le){}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 le;return[le,b]=Fc(b),E==="auto"&&le&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),rs(a)),a.startRecording(),!0}return!1}insert(a,y,b){var E,te;const le=typeof y=="string"?y:(te=(E=window.MathfieldElement.computeEngine)==null?void 0:E.box(y).latex)!=null?te:"";if(!b.silenceNotifications&&!a.contentWillChange({data:le,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:be}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const He=a.silenceNotifications;a.silenceNotifications=!0;const Ye={"?":"\\placeholder{}","@":"\\placeholder{}"};Ye[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Fs(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 nt=-1;Ye[0]?Ye["@"]=Ye[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(nt=rg(a),nt>=0&&(Ye["@"]=a.getValue(nt,a.position,"latex"))),Ye[0]||(Ye[0]=Ye["?"]);let dt=!1;const Mt=Qr=>(dt=!0,Ye[Qr]);let[Zt,sn]=Up(a,y,Mt,b);if(!sn)return!1;const bn=sn.length===1&&sn[0].type==="genfrac";bn&&nt>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(Ye["@"]=Ye["?"],dt=!1,[Zt,sn]=Up(a,y,Mt,b)):nt>=0&&a.deleteAtoms([nt,a.position]);const{parent:Gn}=a.at(a.position),Gr=Gn.hasEmptyBranch("body");if(bn&&Zt!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Gn instanceof sa&&Gn.leftDelim==="("&&Gr){const Qr=Gn.parent,Ir=Gn.parentBranch;Qr.removeChild(Gn),Qr.setChildren(sn,Ir)}const Wn=a.at(a.position);Wn.parent.addChildrenAfter(sn,Wn),Zt==="latex"&&typeof y=="string"&&(Gn==null?void 0:Gn.type)==="root"&&Gr&&!dt&&(Gn.verbatimLatex=y),a.silenceNotifications=He;const yr=sn[sn.length-1];if(b.selectionMode==="placeholder"){const Qr=sn.flatMap(Ir=>[Ir,...Ir.children]).find(Ir=>Ir.type==="placeholder");if(Qr){const Ir=a.offsetOf(Qr);a.setSelection(Ir-1,Ir),a.announce("move")}else yr&&(a.position=a.offsetOf(yr))}else b.selectionMode==="before"||(b.selectionMode==="after"?yr&&(a.position=a.offsetOf(yr)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(yr)));return a.contentDidChange({data:le,inputType:"insertText"}),a.silenceNotifications=be,!0}};function Up(a,y,b,E){var te;let le,be=[];if(typeof y!="string"||E.format==="math-json"){const He=window.MathfieldElement.computeEngine;if(!He)return["math-json",[]];[le,y]=["latex",He.box(y).latex],be=$s(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([le,y]=$u(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),be=$s(y,{context:a.mathfield.context}),le!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Vh(be)):(E.format==="auto"||(te=E.format)!=null&&te.startsWith("latex"))&&(E.format==="auto"&&([le,y]=$u(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=Fc(y)),be=$s(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Vh(be));return ku(be,E.style),[le!=null?le:"latex",be]}function ng(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const y=a[0];return y instanceof sa&&y.leftDelim==="("&&y.rightDelim===")"?y.removeBranch("body"):null}function Vh(a){if(a){for(let y=0;a[y];y++){const b=a[y];if(b instanceof sa&&b.leftDelim==="("){let E=0,te=0,le=0;for(let be=0;b.body[be];be++)b.body[be].type==="genfrac"&&(E++,te=be),le++;le===0&&E===1&&(a[y]=b.body[te])}}for(const y of a){for(const b of y.branches)if(!y.hasEmptyBranch(b)){Vh(y.branch(b));const E=ng(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof po)for(const b of y.cells)Vh(b)}}}function rg(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 te=re[y.value];for(;!y.isFirstSibling&&!(y.type==="mopen"&&y.value===te);)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||Vp(y));)y=y.leftSibling;else{const te=[];for(;!y.isFirstSibling&&(Vp(y)||te.length>0);)y.type==="mclose"&&te.unshift(y.value),y.type==="mopen"&&te.length>0&&y.value===re[te[0]]&&te.shift(),y=y.leftSibling}return b===y?-1:a.offsetOf(y)}function Vp(a){return a.isDigit()?!0:a.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(a.type)?!a.isExtensibleSymbol:!1}new tg;var ig=class extends ho{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"),rs(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 te=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Fs(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 le=og(y,a.mathfield.context);if(ku(le,b.style),!le)return!1;const be=a.at(a.position),He=be.parent.addChildrenAfter(le,be);return a.silenceNotifications=te,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(He)):He&&(a.position=a.offsetOf(He))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function og(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 "),$s(a,{context:y,parseMode:"text"})}new ig;function Zc(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var Ra=4,Il=20,Ss=2*(Il+Ra),Gh=(a,y)=>`
<line x1="${a+Il}" y1="${y+Il}"
x2="${a>y?a+Il:7*Il+10*Ra}"
y2="${a<y?y+Il:7*Il+10*Ra}"/>
<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>`,Gp=(a,y)=>`
<line x1="${a+Il}" y1="${y+Il}"
x2="${a>y?a+Il:7*Il+10*Ra}"
y2="${a<y?y+Il:7*Il+10*Ra}"/>
<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>`,Yh=(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>`,ag=`
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox=
"-2 -2 ${8*Il+10*Ra+5} ${8*Il+10*Ra+5}">
<rect
class="MLEP__array-insert-background rows"
x="0"
y="${Ss+Ra}"
height="${3*Ss}"
width="${Ss}"
rx="${Ss/2}"/>
<rect
class="MLEP__array-insert-background columns"
x="${Ss+Ra}"
y="0"
height="${Ss}"
width="${3*Ss}"
rx="${Ss/2}"/>
<g data-command='"moveDown"'>
${Yh(2*(Ra+Ss),2*Ra+3*Ss,0)}
</g>
<g data-command='"moveUp"'>
${Yh(2*(Ra+Ss),2*Ra+Ss,180)}
</g>
<g data-command='"moveToNextWord"'>
${Yh(2*Ra+3*Ss,2*(Ra+Ss),-90)}
</g>
<g data-command='"moveToPreviousWord"'>
${Yh(2*Ra+Ss,2*(Ra+Ss),90)}
</g>
<g>
<g data-command='"addColumnBefore"'>
${Gh(2*Ra+Ss,Ra)}
</g>
<g data-command='"removeColumn"'>
${Gp(2*Ra+2*Ss,Ra)}
</g>
<g data-command='"addColumnAfter"'>
${Gh(2*Ra+3*Ss,Ra)}
</g>
<g data-command='"addRowBefore"'>
${Gh(Ra,2*Ra+Ss)}
</g>
<g data-command='"removeRow"'>
${Gp(Ra,2*Ra+2*Ss)}
</g>
<g data-command='"addRowAfter"'>
${Gh(Ra,2*Ra+3*Ss)}
</g>
</svg>`,sg=a=>`
<svg id="matrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","matrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/></svg>`,lg=a=>`
<svg id="pmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","pmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/></svg>`,Yp=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>`,cg=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>`,ug=a=>`
<svg id="vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","vmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
</svg>`,dg=a=>`
<svg id="Vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
data-command='["setEnvironment","Vmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
</svg>`,hg=a=>`
<svg id="cases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","cases"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
<circle cx="13" cy="8" r="1"/>
<circle cx="13" cy="16" r="1"/>
<circle cx="21" cy="8" r="1"/>
<circle cx="21" cy="16" r="1"/>
</svg>`,fg=a=>`
<svg id="rcases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","rcases"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
<circle cx="15" cy="8" r="1"/>
<circle cx="15" cy="16" r="1"/>
<circle cx="7" cy="8" r="1"/>
<circle cx="7" cy="16" r="1"/>
</svg>`,Nf={matrix:sg,pmatrix:lg,bmatrix:cg,Bmatrix:Yp,vmatrix:ug,Vmatrix:dg},Bf={cases:hg,rcases:fg,Bmatrix:Yp};function pg(a){var y,b;const E=(y=a.model.parentEnvironment)==null?void 0:y.array;if(!E)return;let te=0;E.forEach(bn=>{(!te||bn.length>te)&&(te=bn.length)});let le=document.getElementById("mathlive-environment-popover");le||(le=Lh("mathlive-environment-popover"),Wl("environment-popover"),Wl("core"),le.setAttribute("aria-hidden","true"));let be;const He=le.querySelector(".MLEP__environment-controls");He?be=He:(be=document.createElement("div"),le.innerHTML="",le.appendChild(be)),be.className="MLEP__environment-controls",be.style.display="flex",be.style.width="100%",be.style.height="100%",be.style.boxSizing="border-box",be.innerHTML=ag;let Ye=[],nt="";const dt=a.model.parentEnvironment.environmentName;if(sl(dt)){const bn=vg(dt);nt=Nf[bn]("active");const Gn=Nf,{[bn]:Gr}=Gn,Wn=ue(Gn,[ve(bn)]);Ye=Object.values(Wn).map(yr=>yr("inactive"))}else if(ll(dt)){const bn=gg(dt);nt=Bf[bn]("active");const Gn=Bf,{[bn]:Gr}=Gn,Wn=ue(Gn,[ve(bn)]);Ye=Object.values(Wn).map(yr=>yr("inactive"))}else gs(dt)&&(nt=Nf.matrix("active"),Ye=Object.values(Bf).map(bn=>bn("inactive")));const Mt=document.createElement("div");Mt.className="MLEP__environment-delimiter-controls",Mt.style.display="flex",Mt.style.flexDirection="column",Mt.innerHTML=`
<div class='MLEP__array-delimiter-options'>
${nt}
${Ye.join("")}
</div>`,nt&&be.appendChild(Mt),be.querySelectorAll("[data-command]").forEach(bn=>{const Gn=bn.dataset.command;let Gr=Gn;try{Gr=JSON.parse(Gn)}catch(Wn){}bn.addEventListener("mousedown",Wn=>Wn.preventDefault()),Gr&&bn.addEventListener("click",()=>a.executeCommand(Gr))});const sn=(b=a.field)==null?void 0:b.getBoundingClientRect();sn&&(le.style.top=`${window.scrollY+(sn.top-le.clientHeight-15)}px`,le.style.left=`${sn.left+20}px`,le.classList.add("is-visible"))}function Ff(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mg(){document.getElementById("mathlive-environment-popover")&&(bf("mathlive-environment-popover"),x("environment-popover"),x("core"))}function Xh(a){if(!a.hasFocus())return;let y=!1;if(a.model.mode==="math"){const b=a.model.parentEnvironment;if(b!=null&&b.array&&Ya(b.environmentName)){const E=a.options.environmentPopoverPolicy;y=E==="auto"||E==="on"}}y?pg(a):Ff()}function vg(a){return a.replace("*","")}function gg(a){return a==="dcases"?"cases":a}function Xp(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function Jp(a,y,b){return y==="left"||y==="leading"&&b==="ltr"||y==="trailing"&&b==="rtl"?a.left:a.right}function zf(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 yg(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 bg(a,y){var b,E,te;const le=(b=Xp(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 be=a.getBoundingClientRect(),He=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let Ye=Math.min(He,(E=y.height)!=null?E:be.height),nt=zf(y.location.y,Ye,y.verticalPos,le);nt+Ye>window.innerHeight-8&&(y.alternateLocation?(nt=zf(y.alternateLocation.y,Ye,y.verticalPos,le),nt+Ye>window.innerHeight-8&&(nt=void 0)):nt=void 0),Number.isFinite(nt)||(nt=Math.max(8,window.innerHeight-8-Ye),8+Ye>window.innerHeight-8&&(a.style.bottom="8px")),Ye=Math.min(nt+Ye,window.innerHeight-8)-nt;const dt=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let Mt=Math.min(dt,(te=y.width)!=null?te:be.width),Zt=zf(y.location.x,Mt,y.horizontalPos,le);Zt+Mt>window.innerWidth-8&&(y.alternateLocation?(Zt=yg(y.alternateLocation.x,Mt,y.verticalPos,le),Zt+Mt>window.innerWidth-8&&(Zt=void 0)):Zt=void 0),Number.isFinite(Zt)||(Zt=Math.max(8,window.innerWidth-8-Mt),8+Mt>window.innerWidth-8&&(a.style.right="8px")),Mt=Math.min(Zt+Mt,window.innerWidth-8)-Zt,le==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-Zt-Mt).toString()}px`:a.style.left=`${Math.ceil(Zt).toString()}px`,a.style.top=`${Math.ceil(nt).toString()}px`,Ye!==be.height&&(a.style.height=`${Math.ceil(Ye).toString()}px`),Mt!==be.width&&(a.style.width=`${Math.ceil(Mt).toString()}px`)}function _g(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function _d(a){return"submenu"in a}function Wc(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function $f(a){return"type"in a&&a.type==="divider"}function jf(a){return"type"in a&&a.type==="heading"}var qp={};function Hf(a){let y=qp[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,qp[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 Qp=80,e0=class{constructor(a,y){this._element=null;var b;this.parentMenu=y,this._declaration=a,_d(a)?(this.type="submenu",this.submenu=new t0(a.submenu,{parentMenu:y,submenuClass:a.submenuClass,columnCount:a.columnCount})):this.type=(b=a.type)!=null?b:"command",this.hasCheck=Wc(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 te=this._declaration;if($f(te)){this.enabled=!1,this.checked=!1;return}jf(te)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Wc(te)&&(this.checked=Wc(te)&&((y=xd(te.checked,a))!=null?y:!1)),(Wc(te)||_d(te))&&(this.enabled=(b=xd(te.enabled,a))!=null?b:!0,this.visible=(E=xd(te.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(Wc(te)||jf(te)||_d(te))&&(this.label=xd(te.label,a),this.tooltip=xd(te.tooltip,a),this.ariaLabel=xd(te.ariaLabel,a)),this._element&&this.updateElement()}set dirty(a){console.assert(a===!0),a&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const a=this.element;a.textContent="",this.enabled?a.removeAttribute("aria-disabled"):a.setAttribute("aria-disabled","true"),this.checked===!0?(a.setAttribute("aria-checked","true"),a.append(Hf("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Hf("mixedmark"))):a.removeAttribute("aria-checked"),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel);const 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),Wc(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=gf(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(Hf("trailing-chevron"))}get element(){if(this._element)return this._element;if($f(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,(Wc(this._declaration)||jf(this._declaration)||_d(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(!Wc(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()},Qp)},Qp)}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=Xp(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:Jp(b,"trailing",E),y:b.top-4},alternateLocation:{x:Jp(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(xg(E,y.clientY-a.clientY,b)<=.2)return!1;let le="right";if(this.submenu.element){const be=this.submenu.element.getBoundingClientRect(),He=this.element.getBoundingClientRect();be.left<He.left+He.width/2&&(le="left")}return le==="right"?E>0:E<0}};function xg(a,y,b){return Math.hypot(a,y)/b}function xd(a,y){return a===void 0||typeof a!="function"?a:(y!=null||(y={alt:!1,control:!1,shift:!1,meta:!1}),a(y))}var t0=class Dd{constructor(y,b){this._element=null,this._activeMenuItem=null,this._dirty=!0;var E,te;this.parentMenu=(E=b==null?void 0:b.parentMenu)!=null?E:null,this._submenuClass=b==null?void 0:b.submenuClass,this.columnCount=(te=b==null?void 0:b.columnCount)!=null?te: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 e0(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,te;this._menuItems.forEach(nt=>nt.updateState(y));const le=this.hasCheck;this.hasCheck=this._menuItems.some(nt=>nt.visible&&nt.hasCheck),this.hasCheck!==le&&this._menuItems.forEach(nt=>nt.updateState(y));let be,He=0;for(const nt of this._menuItems)nt.type==="heading"?(be&&He===0&&(be.visible=!1),be=nt,He=0):nt.type==="divider"&&be?(be.visible=He>0,be=void 0,He=0):be&&nt.visible&&(He+=1);be&&(be.visible=He>0);let Ye=!0;for(const nt of this._menuItems)nt.type==="divider"?(nt.visible=!Ye,Ye=!0):nt.visible&&(Ye=!1);(b=this.activeMenuItem)!=null&&b.visible||(this.activeMenuItem=null),!((E=this.activeMenuItem)!=null&&E.enabled)&&((te=this.activeMenuItem)==null?void 0:te.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,te,le;if(this.rootMenu.cancelDelayedOperation(),y!==this._activeMenuItem){if(this.activeMenuItem){const be=this.activeMenuItem;be.active=!1,(b=be.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?(te=y.element)==null||te.focus({preventScroll:!0}):(le=this._element)==null||le.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let y=0,b=!1;const E=this._menuItems;for(;!b&&y<=E.length-1;){const te=E[y];b=te.type!=="divider"&&te.visible&&te.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 te=y[b];E=te.type!=="divider"&&te.visible&&te.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 te=this._menuItems.indexOf(this._activeMenuItem),le=1;for(;te>=b&&te<=E;){te+=y>0?1:-1;const be=this._menuItems[te];if(!be)break;if(be.visible&&be.enabled){if(le===Math.abs(y))return this._menuItems[te];le+=1}}return y>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(y){this.updateIfDirty();const E=this._menuItems.filter(te=>te.visible&&te.enabled).indexOf(y);return E<0?-1:E%this.columnCount}static get collator(){return Dd._collator||(Dd._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Dd._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(He=>He.type!=="divider"&&He.visible&&He.enabled);if(E.length===0)return null;const te=Math.max(...E.map(He=>He.label.length))-y.length;if(te<0)return null;let le=null,be=0;for(;be<te&&!le;)le=(b=E.find(He=>Dd.collator.compare(y,He.label.substring(be,y.length))===0))!=null?b:null,be++;return le}show(y){return!this.visible||!y.container?!1:(this.updateElement(),y.container.appendChild(this.element),$e()&&(this.element.popover="manual",this.element.showPopover()),y.location&&bg(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,te,le;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),$e()&&((y=this._element)!=null&&y.popover)&&this.element.hidePopover(),(E=(b=this.parentMenu)==null?void 0:b.element)==null||E.focus(),(le=(te=this._element)==null?void 0:te.parentNode)==null||le.removeChild(this._element)}set openSubmenu(y){var b,E,te,le;const be=y!==null;((b=this.activeMenuItem)==null?void 0:b.type)==="submenu"&&((E=this.activeMenuItem.element)==null||E.setAttribute("aria-expanded",be.toString())),(le=(te=this.activeMenuItem)==null?void 0:te.element)==null||le.classList.toggle("is-submenu-open",be),this.isSubmenuOpen=be}},n0=class rm extends t0{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(r0),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(y){$m(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=Ku(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,te;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Ku(y));let le=!0;const be=this.activeSubmenu,He=be.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":He==null||He.select(Ku(y));break;case"ArrowRight":if((He==null?void 0:He.type)==="submenu")He.select(Ku(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!He)be.activeMenuItem=be.firstMenuItem;else{const Ye=(b=be.getMenuItemColumn(He))!=null?b:-1;if(Ye>=0&&Ye<((E=be.columnCount)!=null?E:1)-1){const nt=be.nextMenuItem(1);nt&&(be.activeMenuItem=nt)}}break;case"ArrowLeft":if(be===this.rootMenu)He||(be.activeMenuItem=be.firstMenuItem);else if((He&&(te=be.getMenuItemColumn(He))!=null?te:-1)<=0||!He){be.hide();const nt=be.parentMenu.activeMenuItem;if(nt){const{element:dt}=nt;dt==null||dt.focus(),dt==null||dt.classList.remove("is-submenu-open")}}else{const nt=be.nextMenuItem(-1);nt&&(be.activeMenuItem=nt)}break;case"ArrowDown":be.activeMenuItem=be.nextMenuItem(be.columnCount);break;case"ArrowUp":be.activeMenuItem=be.nextMenuItem(-be.columnCount);break;case"Home":case"PageUp":be.activeMenuItem=be.firstMenuItem;break;case"End":case"PageDown":be.activeMenuItem=be.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const Ye=be.findMenuItem(this.typingBuffer);Ye&&(be.activeMenuItem=Ye),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Eh(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const Ye=be.findMenuItem(this.typingBuffer);Ye&&(be.activeMenuItem=Ye),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else le=!1}le&&(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 jc.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),jc.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),jc.state==="open"&&jc.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(se(ae({},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,jc.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)}};n0.SUBMENU_DELAY=120;var Sg=n0;function r0(a){return $f(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(Wc(a)||_d(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||Wc(a)&&typeof a.checked=="function"?!0:_d(a)?a.submenu.some(r0):!1}var Jh=class{};Jh.DELAY=300,Jh.MAX_DISTANCE=10;function Cg(a){return new Promise((y,b)=>{const E=wh(a);E||y(!1);let te=E;const le=setTimeout(()=>{be.abort(),y(_g(te,E)<Jh.MAX_DISTANCE)},Jh.DELAY),be=new AbortController,He=be.signal;for(const Ye of["pointermove","pointerup","pointercancel"])window.addEventListener(Ye,nt=>{if(nt.type==="pointerup"||nt.type==="pointercancel")clearTimeout(le),be.abort(),y(!1);else if(nt.type==="pointermove"){const dt=wh(nt);dt&&(te=dt)}},{passive:!0,signal:He})})}function i0(a,y,b){return Au(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:wh(E),modifiers:Ku(E)}))return a.preventDefault(),a.stopPropagation(),!0}if(a.type==="keydown"){const E=a;if(E.code==="ContextMenu"||E.code==="F10"&&E.shiftKey){const te=y==null?void 0:y.getBoundingClientRect();if(te&&b.show({target:y,location:{x:Math.ceil(te.left+te.width/2),y:Math.ceil(te.top+te.height/2)},modifiers:Ku(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 te=wh(a);if(yield Cg(a))return b.state!=="closed"?!1:(b.show({target:y,location:te}),!0)}return!1})}var o0={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};It(Object.keys(o0),"{body:auto}",{createAtom:a=>new z(se(ae({},a),{body:vt(a.args[0]),accentChar:o0[a.command.slice(1)]}))}),It(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=mt(vt(a.args[0]));return new z(se(ae({},a),{body:vt(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),It(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(se(ae({},a),{body:vt(a.args[0]),svgAccent:"overarc"}))}),It(["underarc","underparen"],"{body:auto}",{createAtom:a=>new dc(se(ae({},a),{body:vt(a.args[0]),svgBelow:"underarc"}))}),It("utilde","{body:auto}",{createAtom:a=>{const y=vt(a.args[0]),b=mt(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new dc(se(ae({},a),{body:y,svgBelow:E,boxType:Rc(y)}))}}),It("^","{:string}",{createAtom:a=>{var y;return new sr(se(ae({},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:"^"}))}}),It("`","{:string}",{createAtom:a=>{var y;return new sr(se(ae({},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:"`"}))}}),It("'","{:string}",{createAtom:a=>{var y;return new sr(se(ae({},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:"'"}))}}),It('"',"{:string}",{createAtom:a=>{var y,b;return new sr(se(ae({},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]:'"'}))}}),It(".","{:string}",{createAtom:a=>{var y,b;return new sr(se(ae({},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]:"."}))}}),It("=","{:string}",{createAtom:a=>{var y,b;return new sr(se(ae({},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]:"="}))}}),It("~","{:string}",{createAtom:a=>{var y;return new sr(se(ae({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"}))}}),It("c","{:string}",{createAtom:a=>{var y;return new sr(se(ae({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),It("enclose","{notation:string}[style:string]{body:auto}",{createAtom:a=>{var y,b;const E=a.args,te={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 be=E[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const He of be){const Ye=He.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(Ye)te.strokeWidth=Ye[1],te.strokeStyle=Ye[2],te.strokeColor=Ye[3];else{const nt=He.match(/\s*([a-z]*)\s*=\s*"(.*)"/);nt&&(nt[1]==="mathbackground"?te.backgroundcolor=nt[2]:nt[1]==="mathcolor"?te.strokeColor=nt[2]:nt[1]==="padding"?te.padding=nt[2]:nt[1]==="shadow"&&(te.shadow=nt[2]))}}te.strokeStyle==="dashed"?te.svgStrokeStyle="5,5":te.strokeStyle==="dotted"&&(te.svgStrokeStyle="1,5")}te.borderStyle=`${te.strokeWidth} ${te.strokeStyle} ${te.strokeColor}`;const le={};return((b=E[0])!=null?b:"").split(/[, ]/).filter(be=>be.length>0).forEach(be=>{le[be.toLowerCase()]=!0}),new $d(a.command,vt(E[2]),le,te)}}),It("cancel","{body:auto}",{createAtom:a=>{var y;return new $d(a.command,vt(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:{}})}}),It("bcancel","{body:auto}",{createAtom:a=>{var y;return new $d(a.command,vt(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:{}})}}),It("xcancel","{body:auto}",{createAtom:a=>{var y;return new $d(a.command,vt(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:{}})}}),It(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new dc(se(ae({},a),{body:vt((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),It("overbrace","{:auto}",{createAtom:a=>new dc(se(ae({},a),{body:vt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),It(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new dc(se(ae({},a),{body:vt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),It(["underbrace"],"{:auto}",{createAtom:a=>new dc(se(ae({},a),{body:vt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),It(["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,te,le;return new dc(se(ae({},a),{svgBody:a.command.slice(1),above:((b=vt((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:vt((E=a.args)==null?void 0:E[1]),below:(le=vt((te=a.args)==null?void 0:te[0]))!=null?le: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)}`}),It(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:a=>new Hu(a.command.slice(1),se(ae({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),It(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new Hu({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],se(ae({},a),{limits:"over-under",variant:"main"}))}),It(["lim","mod"],"",{ifMode:"math",createAtom:a=>new Hu(a.command.slice(1),se(ae({},a),{limits:"over-under",variant:"main"}))}),It(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new Hu(a.command.slice(1),se(ae({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),It(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new sr(se(ae({},a),{body:vt(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 te=new Ur("\xB0",{style:se(ae({},a.style),{variant:"normal",variantStyle:"up"})});return new Ur([b,te],{type:"inner",isSelected:a.isSelected,caret:E})}}),It("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new ap(se(ae({},a),{body:vt(a.args[1]),index:a.args[0]?vt(a.args[0]):void 0}))}),It(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const y=ae({},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 dd(E[0]?vt(E[0]):[new Ji],E[1]?vt(E[1]):[new Ji],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}`:xa(a.command,b,E)}}),It(["brace","brack"],"",{infix:!0,createAtom:a=>new dd(vt(a.args[0]),vt(a.args[1]),se(ae({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>ko([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),It(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new dd(vt(E[0]),vt(E[1]),se(ae({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>ko([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),It(["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 dd(vt(E[0]),vt(E[1]),se(ae({},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)}`}),It("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new dd(vt(a.args[0]),vt(a.args[1]),se(ae({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),It(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:a=>new hf({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[a.command.slice(1)],se(ae({},a),{limits:"auto",variant:"main"}))}),It("smallint","",{ifMode:"math",createAtom:a=>new Hu("\u222B",se(ae({},a),{limits:"adjacent",variant:"main"}))});var a0={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"};It(Object.keys(a0),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=a0[y.slice(1)];return new hf(b,se(ae({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),It(["Re","Im"],"",{ifMode:"math",createAtom:a=>new Hu({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],se(ae({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),It("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new rp(se(ae({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),It("the","{:value}",{createAtom:a=>new sr(se(ae({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new jo({parent:y},a.style);let te="";a.isSelected&&(te+=" ML__selected");const le=E.evaluate(a.args[0]);return new Ur(((b=Ka(le))!=null?b:"").split("").map(be=>new Ur(be,{type:"ord",classes:te,mode:a.mode,isSelected:a.isSelected,style:ae({variant:"main"},a.style)})),{type:"lift",style:a.style,caret:a.caret,isSelected:a.isSelected,classes:te}).wrap(E)},serialize:a=>{var y;return`\\the${(y=Ka(a.args[0]))!=null?y:"\\relax"}`}}),It("mathtip","{:auto}{:math}",{createAtom:a=>new ff(se(ae({},a),{body:vt(a.args[0]),tooltip:vt(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${sr.serialize([a.tooltip],se(ae({},y),{defaultMode:"math"}))}}`}),It("texttip","{:auto}{:text}",{createAtom:a=>new ff(se(ae({},a),{body:vt(a.args[0]),tooltip:vt(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${sr.serialize([a.tooltip],se(ae({},y),{defaultMode:"text"}))}}`}),It("error","{:math}",{createAtom:a=>new sr(se(ae({},a),{body:vt(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),It("ensuremath","{:math}",{createAtom:a=>new sr(se(ae({},a),{body:vt(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(se(ae({},y),{defaultMode:"math"}))}}`}),It("color","{:value}",{applyStyle:(a,y,b)=>{var E,te;return{verbatimColor:(E=Ka(y[0]))!=null?E:void 0,color:b.toColor((te=y[0])!=null?te:{string:"red"})}}}),It("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,te;return{verbatimColor:(E=Ka(y[0]))!=null?E:void 0,color:b.toColor((te=y[0])!=null?te:{string:"red"})}}}),It("boxed","{content:math}",{createAtom:a=>new cs(se(ae({},a),{body:vt(a.args[0]),framecolor:{string:"black"}}))}),It("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,te;return{verbatimBackgroundColor:(E=Ka(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((te=y[0])!=null?te:{string:"yellow"})}}}),It("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new cs(se(ae({},a),{body:vt(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(se(ae({},y),{defaultMode:"text"})):xa(a.command,(b=Ka(a.framecolor))!=null?b:"",(E=Ka(a.backgroundcolor))!=null?E:"",a.bodyToLatex(se(ae({},y),{defaultMode:"text"})))}}),It("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=vt(a.args[1]);return b?new cs(se(ae({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new cs(se(ae({},a),{body:E}))},serialize:(a,y)=>{var b,E;if(y.skipStyles)return a.bodyToLatex(y);let te=a.command;if(Number.isFinite(a.padding)||a.border!==void 0||a.backgroundcolor!==void 0){const le=[];a.padding&&le.push((b=Ka(a.padding))!=null?b:""),a.border&&le.push(`border: ${a.border}`),a.backgroundcolor&&le.push((E=Ka(a.backgroundcolor))!=null?E:""),te+=`[${le.join(",")}]`}return xa(te,a.bodyToLatex(y))}}),It(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new sr(se(ae({},a),{body:vt(a.args[0])})),render:(a,y)=>{const b=new jo({parent:y,mathstyle:a.command.slice(1)},a.style),E=sr.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):`{${ko([a.command,a.bodyToLatex(y)])}}`}),It(["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]})}),It("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),It("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),It("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),It("selectfont","",{ifMode:"text",applyStyle:()=>({})}),It("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),It(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new sr(se(ae({},a),{body:vt(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),It("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),It("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),It("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),It("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),It("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),It("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),It("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),It("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),It("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),It("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),It("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),It("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),It("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),It("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),It("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),It("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),It("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),It("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),It("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),It("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),It("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),It("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),It("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),It("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),It("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),It("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),It("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),It(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),It(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),It("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),It("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),It("mbox","{:text}",{ifMode:"math",createAtom:a=>new sr(se(ae({},a),{type:"mord",body:vt(a.args[0]),mode:"math"})),serialize:(a,y)=>xa("\\mbox",a.bodyToLatex(se(ae({},y),{defaultMode:"text"})))}),It("text","{:text}",{ifMode:"math",applyMode:"text"}),It(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new sr(se(ae({},a),{body:vt(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:""})}}),It(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new sr(se(ae({},a),{body:vt(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}}),It("htmlData","{data:string}{content:auto}",{createAtom:a=>new sr(se(ae({},a),{body:vt(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}}),It(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new sr(se(ae({},a),{body:vt(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}}),It("em","{:rest}",{createAtom:a=>new sr(se(ae({},a),{body:vt(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"})}),It("emph","{:auto}",{createAtom:a=>new sr(se(ae({},a),{body:vt(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 s0={"\\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}};It(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var y;return new ip(se(ae({},a),{delim:(y=a.args[0])!=null?y:".",size:s0[a.command].size,delimType:s0[a.command].mclass}))}}),It(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new Kd(se(ae({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),It(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new Kd(se(ae({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),It("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new sr(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===tu||E===Jl)&&(b=1),(E===ql||E===Ts)&&(b=2),(E===rl||E===vs)&&(b=3);const te=vt(a.args[b]);return sr.createBox(y,te)},serialize:(a,y)=>`\\mathchoice{${sr.serialize(a.args[0],y)}}{${sr.serialize(a.args[1],y)}}{${sr.serialize(a.args[2],y)}}{${sr.serialize(a.args[3],y)}}`}),It("mathop","{:auto}",{createAtom:a=>new sr(se(ae({},a),{type:"mop",body:vt(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,y)=>{var b;let E=sr.createBox(y,a.body);if(a.superscript||a.subscript){const te=(b=a.subsupPlacement)!=null?b:"auto";E=te==="over-under"||te==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return new Ur(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[xa(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)),ko(b)}}),It(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new sr(se(ae({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:vt(a.args[0])}))}),It(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=vt(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 sr(se(ae({},a),{type:"mop",body:y,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,y)=>{var b;let E=sr.createBox(y,a.body);if(a.superscript||a.subscript){const te=(b=a.subsupPlacement)!=null?b:"auto";E=te==="over-under"||te==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return a.caret&&(E.caret=a.caret),new Ur(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[xa(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)),ko(b)}}),It(["char","unicode"],"{charcode:value}",{createAtom:a=>new sr(se(ae({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${Ka((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)}}),It("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new sr(a),render:(a,y)=>{var b,E,te;const le=new jo({parent:y,mathstyle:"textstyle"},a.style),be=le.toEm((b=a.args[0])!=null?b:{dimension:0}),He=le.toEm((E=a.args[1])!=null?E:{dimension:10}),Ye=le.toEm((te=a.args[2])!=null?te:{dimension:10}),nt=new Ur(null,{classes:"rule",type:"ord"});return nt.width=He,nt.height=Ye+be,nt.depth=-be,nt.setStyle("border-right-width",He,"em"),nt.setStyle("border-top-width",Ye,"em"),nt.setStyle("border-color",a.style.color),nt.setStyle("vertical-align",be,"em"),a.isSelected&&nt.setStyle("opacity","50%"),a.bind(le,nt),a.caret&&(nt.caret=a.caret),nt.wrap(y)},serialize:a=>`\\rule${a.args[0]?`[${Ka(a.args[0])}]`:""}{${Ka(a.args[1])}}{${Ka(a.args[2])}}`}),It(["overline","underline"],"{:auto}",{createAtom:a=>new sr(se(ae({},a),{body:vt(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new jo({parent:y,mathstyle:"cramp"},a.style),te=sr.createBox(E,a.body);if(!te)return null;const le=E.metrics.defaultRuleThickness/E.scalingFactor,be=new Ur(null,{classes:b+"-line"});be.height=le,be.maxFontSize=le*1.125*E.scalingFactor;let He;return b==="overline"?He=new ma({shift:0,children:[{box:te},3*le,{box:be},le]}):He=new ma({top:te.height,children:[le,{box:be},3*le,{box:te}]}),a.caret&&(He.caret=a.caret),new Ur(He,{classes:b,type:"ignore"})}}),It("overset","{:auto}{base:auto}",{createAtom:a=>{const y=vt(a.args[1]);return new dc(se(ae({},a),{above:vt(a.args[0]),body:y,skipBoundary:!1,boxType:Rc(y)}))},serialize:(a,y)=>xa(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),It("underset","{:auto}{base:auto}",{createAtom:a=>{const y=vt(a.args[1]);return new dc(se(ae({},a),{below:vt(a.args[0]),body:y,skipBoundary:!1,boxType:Rc(y)}))},serialize:(a,y)=>xa(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),It("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=vt(a.args[2]);return new dc(se(ae({},a),{above:vt(a.args[0]),below:vt(a.args[1]),body:y,skipBoundary:!1,boxType:Rc(y)}))},serialize:(a,y)=>xa(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),It(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new dc(se(ae({},a),{body:vt(a.args[2]),above:vt(a.args[1]),below:vt(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>xa(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),It("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,te;return new Hd(se(ae({},a),{body:vt(a.args[1]),smashHeight:(b=(y=a.args[0])==null?void 0:y.includes("t"))!=null?b:!0,smashDepth:(te=(E=a.args[0])==null?void 0:E.includes("b"))!=null?te:!0}))}}),It(["vphantom"],"{:auto}",{createAtom:a=>new Hd(se(ae({},a),{body:vt(a.args[0]),isInvisible:!0,smashWidth:!0}))}),It(["hphantom"],"{:auto}",{createAtom:a=>new Hd(se(ae({},a),{body:vt(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),It(["phantom"],"{:auto}",{createAtom:a=>new Hd(se(ae({},a),{body:vt(a.args[0]),isInvisible:!0}))}),It("not","{:math}",{createAtom:a=>{const y=vt(a.args[0]);return y.length===0?new sr(se(ae({},a),{type:"mrel",value:"\uE020"})):new sr(se(ae({},a),{body:[new ju(se(ae({},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{${sr.serialize(b.group,y)}}`:`\\not${sr.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(vt(a.args[0])),te=sr.createBox(y,a.body,{type:E});return a.caret&&(te.caret=a.caret),a.bind(y,te)}}),It(["ne","neq"],"",{createAtom:a=>new sr(se(ae({},a),{type:"mrel",body:[new ju(se(ae({},a),{body:"\uE020",align:"right",boxType:"rel"})),new sr(se(ae({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),It("rlap","{:auto}",{createAtom:a=>new ju(se(ae({},a),{body:vt(a.args[0]),align:"right"}))}),It("llap","{:auto}",{createAtom:a=>new ju(se(ae({},a),{body:vt(a.args[0]),align:"left"}))}),It("mathrlap","{:math}",{createAtom:a=>new ju(se(ae({},a),{body:vt(a.args[0]),align:"left"}))}),It("mathllap","{:math}",{createAtom:a=>new ju(se(ae({},a),{body:vt(a.args[0]),align:"left"}))}),It("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new cs(se(ae({},a),{body:vt(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return xa("\\raisebox",(b=Ka(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),It("raise","{:value}{:auto}",{createAtom:a=>{var y;return new cs(se(ae({},a),{body:vt(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return xa("\\raise",(b=Ka(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),It("lower","{:value}{:auto}",{createAtom:a=>{var y;return new cs(se(ae({},a),{body:vt(a.args[1]),padding:{dimension:0},offset:(y=yl(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return xa("\\lower",(E=Ka(yl((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),at("0123456789/@.?!"),Pt(65,90),Pt(97,122),at([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),at([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),at([["\\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]]),at([["\\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"),at([["\\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"]]),at([["\\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"]]),at([["\\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"),at([["+",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"),at([["\\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"),at([["\\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]]),at([["=",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"),at([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),at([["\\wp",8472],["\\aleph",8501]]),at([["\\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"),at([["\\ ",160],["~",160]],"space"),It(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new Kd(a)}),It("space","",{createAtom:a=>new Kd(a)}),at([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),at([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),at([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var l0="<mo>&#x2061;</mo>",qh="<mo>&#8290;</mo>";function Qh(a){return a.replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Ma(a,y){return!a||!y.generateID?"":` extid="${a}"`}function wg(a,y,b){var E,te,le,be,He,Ye,nt,dt,Mt,Zt,sn;let bn=!1;y=y!=null?y:a.atoms.length;let Gn="",Gr="",Wn=a.atoms[a.index];const yr=(te=(E=Wn.style)==null?void 0:E.variant)!=null?te:"",Qr=(be=(le=Wn.style)==null?void 0:le.variantStyle)!=null?be:"";let Ir="";if(yr||Qr){const Yi=Wt(Wn.value,(He=Wn.style)==null?void 0:He.variant,(Ye=Wn.style)==null?void 0:Ye.variantStyle);if(Yi!==Wn.value)return a.index+=1,Gn=`<mi${Ma(Wn.id,b)}>${Yi}</mi>`,ou(Gn,a,b)||(a.mathML+=Gn,a.lastType="mi"),!0;Ir=(nt={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"}[Qr+yr])!=null?nt:"",Ir=` mathvariant="${Ir}"`}const Ni={"\\exponentialE":"&#x02147;","\\imaginaryI":"&#x2148;","\\differentialD":"&#x2146;","\\capitalDifferentialD":"&#x2145;","\\alpha":"&#x03b1;","\\pi":"&#x03c0;","\\infty":"&#x221e;","\\forall":"&#x2200;","\\nexists":"&#x2204;","\\exists":"&#x2203;","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(Wn.command==="!")return a.index+=1,Gn="<mo>!</mo>",ou(Gn,a,b)||(a.mathML+=Gn,a.lastType="mo"),!0;if(Ni[Wn.command]){a.index+=1;let Yi=`<mi${Ma(Wn.id,b)}${Ir}>${Ni[Wn.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(Yi=qh+Yi),ou(Yi,a,b)||(a.mathML+=Yi,a.lastType="mi"),!0}if(Wn.command==="\\operatorname")Gr=Sd(Wn.body),a.index+=1;else if(yr||Qr)for(;a.index<y&&(Wn.type==="mord"||Wn.type==="macro")&&!Wn.isDigit()&&yr===((Mt=(dt=Wn.style)==null?void 0:dt.variant)!=null?Mt:"")&&Qr===((sn=(Zt=Wn.style)==null?void 0:Zt.variantStyle)!=null?sn:"");)Gr+=Sd([Wn]),a.index+=1,Wn=a.atoms[a.index];else(Wn.type==="mord"||Wn.type==="macro")&&!Wn.isDigit()&&(Gr+=Sd([Wn]),a.index+=1);if(Gr.length>0){bn=!0,Gn=`<mi${Ir}>${Gr}</mi>`;const Yi=a.lastType;Gn.endsWith(">f</mi>")||Gn.endsWith(">g</mi>")?(Gn+=l0,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(Gn)?"mo":"mi",ou(Gn,a,b)||((Yi==="mi"||Yi==="mn"||Yi==="mtext"||Yi==="fence")&&(Gn=qh+Gn),a.mathML+=Gn)}return bn}function Eg(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function Mg(a){let y=-1,b=a.index,E=!1,te=!1;for(;b<a.atoms.length&&!E&&!te;){const le=a.atoms[b];E=!le.isDigit(),te=!E&&le.superscript!==void 0,b++}return te&&(y=b-1),y}function ou(a,y,b){var E;let te=y.atoms[y.index-1];if(!te)return!1;if(!te.superscript&&!te.subscript)if(((E=y.atoms[y.index])==null?void 0:E.type)==="subsup")te=y.atoms[y.index],y.index+=1;else return!1;const le=y.lastType;y.lastType="";const be=la(te.superscript,b);y.lastType="";const He=la(te.subscript,b);if(y.lastType=le,!be&&!He)return!1;let Ye="";return be&&He?Ye=`<msubsup>${a}${He}${be}</msubsup>`:be?Ye=`<msup>${a}${be}</msup>`:He&&(Ye=`<msub>${a}${He}</msub>`),y.mathML+=Ye,y.lastType="",!0}function kg(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let te="";for(;a.index<y&&a.atoms[a.index].mode==="text";)te+=a.atoms[a.index].value?a.atoms[a.index].value:" ",a.index+=1;return te.length>0?(a.mathML+=`<mtext ${Ma(a.atoms[E].id,b)}>${te}</mtext>`,a.lastType="mtext",!0):!1}function Lg(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let te="",le=Mg(a);for(le>=0&&le<y&&(y=le);a.index<y&&a.atoms[a.index].isDigit();)te+=a.atoms[a.index].asDigit(),a.index+=1;return te.length<=0?!1:(te="<mn"+Ma(a.atoms[E].id,b)+">"+te+"</mn>",le<0&&Eg(a)&&(le=a.index,a.index+=1),ou(te,a,b)||(a.mathML+=te,a.lastType="mn"),!0)}function Dg(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let te="",le="";if(a.index<y&&a.atoms[a.index].type==="mopen"){let be=!1,He=0;const Ye=a.index;let nt=-1,dt=Ye+1;for(;dt<y&&!be;)a.atoms[dt].type==="mopen"?He+=1:a.atoms[dt].type==="mclose"&&(He-=1),He===-1&&(be=!0,nt=dt),dt+=1;be&&(te="<mrow>",te+=qu(a.atoms[Ye],b),te+=la(a.atoms,b,Ye+1,nt),te+=qu(a.atoms[nt],b),te+="</mrow>",a.index=nt+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=qh),ou(te,a,b)&&(E=!0,a.lastType="",te=""),le="fence")}return te.length>0&&(E=!0,a.mathML+=te,a.lastType=le),E}function Ag(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let te="",le="";const be=a.atoms[a.index];if(!be)return!1;const He={"\\ne":"&ne;","\\neq":"&neq;","\\pm":"&#177;","\\times":"&#215;","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(He[be.command]){a.index+=1;const Ye=`<mo${Ma(be.id,b)}>${He[be.command]}</mo>`;return ou(Ye,a,b)||(a.mathML+=Ye,a.lastType="mo"),!0}if(a.index<y&&(be.type==="mbin"||be.type==="mrel"))te+=Kf(a.atoms[a.index],b),a.index+=1,le="mo";else if(a.index<y&&(be.type==="mop"||be.type==="operator"||be.type==="extensible-symbol")){if(be.subsupPlacement==="over-under"&&(be.superscript||be.subscript)){const Ye=qu(be,b);return be.superscript&&be.subscript?(te+="<munderover>"+Ye,te+=la(be.subscript,b),te+=la(be.superscript,b),te+="</munderover>"):be.superscript?(te+="<mover>"+Ye,te+=la(be.superscript,b),te+="</mover>"):be.subscript&&(te+="<munder>"+Ye,te+=la(be.subscript,b),te+="</munder>"),a.mathML+=te,a.lastType="mo",a.index+=1,!0}{const Ye=a.atoms[a.index],nt=Ye.value==="\\operatorname",dt=nt?'<mi class="MathML-Unit"'+Ma(Ye.id,b)+">"+Sd(Ye.value)+"</mi>":qu(Ye,b);te+=dt,!nt&&!/^<mo>(.*)<\/mo>$/.test(dt)?(te+=l0,le="applyfunction"):le=nt?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(te)&&(te=qh+te),a.index+=1}return te.length>0&&(E=!0,ou(te,a,b)||(a.mathML+=te,a.lastType=le)),E}function la(a,y,b,E){y!=null||(y={});const te={atoms:[],index:b!=null?b:0,mathML:"",lastType:""};if(typeof a=="number"||typeof a=="boolean")te.mathML=a.toString();else if(typeof a=="string")te.mathML=a;else if(a instanceof sr)te.mathML=Kf(a,y);else if(Array.isArray(a)){te.atoms=a;let le=0;for(E=E||(a?a.length:0);te.index<E;)if(kg(te,E,y)||Lg(te,E,y)||wg(te,E,y)||Ag(te,E,y)||Dg(te,E,y))le+=1;else if(te.index<E){let be=Kf(te.atoms[te.index],y);te.lastType==="mn"&&be.length>0&&te.atoms[te.index].type==="genfrac"&&(be="<mo>&#x2064;</mo>"+be),te.atoms[te.index].type==="genfrac"?te.lastType="mfrac":te.lastType="",te.index+=1,ou(be,te,y)?le+=1:be.length>0&&(te.mathML+=be,le+=1)}le>1&&(te.mathML="<mrow>"+te.mathML+"</mrow>")}return te.mathML}function qu(a,y){let b="";const E=Sd(a.value);return E&&(b="<mo"+Ma(a.id,y)+">"+E+"</mo>"),b}function Sd(a){if(!a)return"";if(typeof a=="string")return Qh(a);if(!Array.isArray(a)&&typeof a.body=="string")return Qh(a.body);let y="";for(const b of a)typeof b.value=="string"&&(y+=b.value);return Qh(y)}function Kf(a,y){var b,E,te,le,be,He,Ye,nt,dt,Mt,Zt,sn,bn,Gn,Gr,Wn,yr,Qr,Ir,Ni,Yi,$i;if(a.mode==="text")return`<mi${Ma(a.id,y)}>${a.value}</mi>`;const Go={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"},Ca={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let ci="",rc="",Vc,fc,Hs,ic,Tl,ka;const{command:ds}=a;if(a.command==="\\error")return`<merror${Ma(a.id,y)}>${la(a.body,y)}</merror>`;const Ks={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Gc={"\\vec":"&#x20d7;","\\acute":"&#x00b4;","\\grave":"&#x0060;","\\dot":"&#x02d9;","\\ddot":"&#x00a8;","\\tilde":"&#x007e;","\\bar":"&#x00af;","\\breve":"&#x02d8;","\\check":"&#x02c7;","\\hat":"&#x005e;"};switch(a.type){case"first":break;case"group":case"root":ci=la(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(ci+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(ci+="<mo>"+(Ks[a.leftDelim]||a.leftDelim)+"</mo>")),ci+="<mtable",a.colFormat){for(ci+=' columnalign="',Hs=0;Hs<a.colFormat.length;Hs++)a.colFormat[Hs].align&&(ci+={l:"left",c:"center",r:"right"}[a.colFormat[Hs].align]+" ");ci+='"'}for(ci+=">",fc=0;fc<a.array.length;fc++){for(ci+="<mtr>",Vc=0;Vc<a.array[fc].length;Vc++)ci+="<mtd>"+la(a.array[fc][Vc],y)+"</mtd>";ci+="</mtr>"}ci+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(ci+="<mo>"+(Ks[a.leftDelim]||a.rightDelim)+"</mo>"),ci+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(ci+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(ci+="<mo"+Ma(a.id,y)+">"+(Ks[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(ci+="<mfrac>",ci+=la(a.above,y)||"<mi>&nbsp;</mi>",ci+=la(a.below,y)||"<mi>&nbsp;</mi>",ci+="</mfrac>"):(ci+="<mtable"+Ma(a.id,y)+">",ci+="<mtr>"+la(a.above,y)+"</mtr>",ci+="<mtr>"+la(a.below,y)+"</mtr>",ci+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(ci+="<mo"+Ma(a.id,y)+">"+(Ks[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(ci+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(ci+="<msqrt"+Ma(a.id,y)+">",ci+=la(a.body,y),ci+="</msqrt>"):(ci+="<mroot"+Ma(a.id,y)+">",ci+=la(a.body,y),ci+=la(a.above,y),ci+="</mroot>");break;case"leftright":const Yc=a,Xc=Yc.leftDelim;ci="<mrow>",Xc&&Xc!=="."&&(ci+=`<mo${Ma(a.id,y)}>${(b=Ks[Xc])!=null?b:Xc}</mo>`),a.body&&(ci+=la(a.body,y));const Jc=Yc.matchingRightDelim();Jc&&Jc!=="."&&(ci+=`<mo${Ma(a.id,y)}>${(E=Ks[Jc])!=null?E:Jc}</mo>`),ci+="</mrow>";break;case"sizeddelim":case"delim":ci+=`<mo${Ma(a.id,y)}>${Ks[a.value]||a.value}</mo>`;break;case"accent":ci+='<mover accent="true"'+Ma(a.id,y)+">",ci+=la(a.body,y),ci+="<mo>"+(Gc[ds]||a.accent)+"</mo>",ci+="</mover>";break;case"line":case"overlap":break;case"overunder":Tl=a.above,ic=a.below,(a.svgAbove||Tl)&&(a.svgBelow||ic)?ka=a.body:Tl&&Tl.length>0?(ka=a.body,(le=(te=a.body)==null?void 0:te[0])!=null&&le.below?(ic=a.body[0].below,ka=a.body[0].body):((He=(be=a.body)==null?void 0:be[0])==null?void 0:He.type)==="first"&&((nt=(Ye=a.body)==null?void 0:Ye[1])!=null&&nt.below)&&(ic=a.body[1].below,ka=a.body[1].body)):ic&&ic.length>0&&(ka=a.body,(Mt=(dt=a.body)==null?void 0:dt[0])!=null&&Mt.above?(Tl=a.body[0].above,ka=a.body[0].body):((sn=(Zt=a.body)==null?void 0:Zt[0])==null?void 0:sn.type)==="first"&&((Gn=(bn=a.body)==null?void 0:bn[1])!=null&&Gn.above)&&(Tl=a.body[1].overscript,ka=a.body[1].body)),(a.svgAbove||Tl)&&(a.svgBelow||ic)?(ci+=`<munderover ${Ma(a.id,y)}>`,ci+=(Gr=Go[a.svgBody])!=null?Gr:la(ka,y),ci+=(Wn=Go[a.svgBelow])!=null?Wn:la(ic,y),ci+=(yr=Go[a.svgAbove])!=null?yr:la(Tl,y),ci+="</munderover>"):a.svgAbove||Tl?(ci+=`<mover ${Ma(a.id,y)}>`+((Qr=Go[a.svgBody])!=null?Qr:la(ka,y)),ci+=(Ir=Go[a.svgAbove])!=null?Ir:la(Tl,y),ci+="</mover>"):(a.svgBelow||ic)&&(ci+=`<munder ${Ma(a.id,y)}>`+((Ni=Go[a.svgBody])!=null?Ni:la(ka,y)),ci+=(Yi=Go[a.svgBelow])!=null?Yi:la(ic,y),ci+="</munder>");break;case"placeholder":ci+="?";break;case"mord":{ci=typeof a.value=="string"?a.value:ds,ds==="\\char"?ci="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":ci.length>0&&ci.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?ci="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?ci=a.value.charAt(0):(console.error("Did not expect this"),ci=""));const Lc=/\d/.test(ci)?"mn":"mi";ci=`<${Lc}${Ma(a.id,y)}>${Qh(ci)}</${Lc}>`;break}case"mbin":case"mrel":case"minner":ci=qu(a,y);break;case"mpunct":ci='<mo separator="true"'+Ma(a.id,y)+">"+ds+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(ci="<mo"+Ma(a.id,y)+">",ci+=ds==="\\operatorname"?a.body:ds||a.body,ci+="</mo>");break;case"box":ci='<menclose notation="box"',a.backgroundcolor&&(ci+=' mathbackground="'+a.backgroundcolor+'"'),ci+=Ma(a.id,y)+">"+la(a.body,y)+"</menclose>";break;case"spacing":ci+='<mspace width="'+(($i=Ca[ds])!=null?$i:0)+'em"/>';break;case"enclose":ci='<menclose notation="';for(const Lc in a.notation)Object.prototype.hasOwnProperty.call(a.notation,Lc)&&a.notation[Lc]&&(ci+=rc+Lc,rc=" ");ci+=Ma(a.id,y)+'">'+la(a.body,y)+"</menclose>";break;case"prompt":ci='<menclose notation="roundexbox""">'+la(a.body,y)+"</menclose>";break;case"space":ci+="&nbsp;";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":ci+=qu(a,y);break;case"mclose":ci+=qu(a,y);break;case"macro":{const Lc=a.command+Sd(a.macroArgs);Lc&&(ci+=`<mo ${Ma(a.id,y)}>${Lc}</mo>`)}break;case"latexgroup":ci+=la(a.body,y);break;case"latex":ci+="<mtext"+Ma(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":ci+=la(a.body,y);break;case"text":ci+=`<mtext ${Ma(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${Ma(a.id,y)} displaystyle="true">${la(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${Ma(a.id,y)} displaystyle="false">${la(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return ci}var Cd={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Zf={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Ig(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function ih(a){let y=0;if(pe(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Tg(a){if(pe(a)){for(const y of a)if(y.type!=="first"&&y.id)return y.id.toString()}return""}function c0(a){let y="";if(pe(a))for(const b of a)b.type!=="first"&&typeof b.value=="string"&&(y+=b.value);return y}function Og(a){return a?a.map(y=>y.value).join(""):""}function No(a,y){var b,E,te,le,be;function He(dt){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(dt)?` <say-as interpret-as="character">${dt}</say-as>`:/[A-Z]/.test(dt)?`capital <say-as interpret-as="character">${dt.toLowerCase()}</say-as>`:dt:/[a-z]/.test(dt)?" '"+dt.toUpperCase()+"'":/[A-Z]/.test(dt)?" 'capital "+dt.toUpperCase()+"'":dt}function Ye(dt){return"<emphasis>"+dt+"</emphasis>"}if(!y)return"";let nt="";if(pe(y)){let dt=!1,Mt=!1;for(let Zt=0;Zt<y.length;Zt++)y[Zt].type!=="first"&&(y[Zt].mode!=="text"&&(Mt=!1),Zt<y.length-2&&y[Zt].type==="mopen"&&y[Zt+2].type==="mclose"&&y[Zt+1].type==="mord"?(nt+=" of ",nt+=Ye(No(a,y[Zt+1])),Zt+=2):y[Zt].mode==="text"?Mt?nt+=(b=y[Zt].value)!=null?b:" ":(Mt=!0,nt+=No("text",y[Zt])):y[Zt].isDigit()?dt?nt+=y[Zt].asDigit():(dt=!0,nt+=No(a,y[Zt])):(dt=!1,nt+=No(a,y[Zt])))}else if(y.mode==="text")y.id&&a==="math"&&(nt+='<mark name="'+y.id.toString()+'"/>'),nt+=y.value;else{y.id&&a==="math"&&(nt+='<mark name="'+y.id.toString()+'"/>');let dt="",Mt="",Zt="",sn=!1;const{command:bn}=y;switch(bn){case"\\vec":return"vector "+No(a,y.body);case"\\acute":return No(a,y.body)+" acute";case"\\grave":return No(a,y.body)+" grave";case"\\dot":return"dot over"+No(a,y.body);case"\\ddot":return"double dot over"+No(a,y.body);case"\\mathring":return"ring over"+No(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+No(a,y.body);case"\\bar":return No(a,y.body)+" bar";case"\\breve":return No(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+No(a,y.body);case"\\hat":case"\\widehat":return"hat over"+No(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+No(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+No(a,y.body)}switch(y.type){case"prompt":const Gn=y.body.length>1?'start input . <break time="500ms"/> '+No(a,y.body)+'. <break time="500ms"/> end input':"blank";nt+=' <break time="300ms"/> '+Gn+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const Gr=y.array,Wn=y.environmentName;if(Object.keys(Zf).includes(Wn)){nt+=` begin ${Zf[Wn]} `;for(let Ir=0;Ir<Gr.length;Ir++){Ir>0&&(nt+=","),nt+=` row ${Ir+1} `;for(let Ni=0;Ni<Gr[Ir].length;Ni++)Ni>0&&(nt+=","),nt+=` column ${Ni+1}: `,nt+=No("math",Gr[Ir][Ni])}nt+=` end ${Zf[Wn]} `}break;case"group":bn==="\\ne"?nt+=" not equal ":(bn==="\\not"&&(nt+=" not "),nt+=No("math",y.body));break;case"root":nt+=No("math",y.body);break;case"genfrac":if(dt=No("math",y.above),Mt=No("math",y.below),ih(y.above)&&ih(y.below)){const Ni={"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 "}[c0(y.above)+"/"+c0(y.below)];Ni?nt=Ni:nt+=dt+" over "+Mt}else nt+=' the fraction <break time="150ms"/>'+dt+' over <break time="150ms"/>'+Mt+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(Zt=No("math",y.body),y.hasEmptyBranch("above"))nt+=ih(y.body)?" the square root of "+Zt+" , ":' the square root of <break time="200ms"/>'+Zt+'. <break time="200ms"/> End square root';else{let Ir=No("math",y.above);Ir=Ir.trim();const Ni=Ir.replace(/<mark([^/]*)\/>/g,"");Ni==="3"?nt+=' the cube root of <break time="200ms"/>'+Zt+'. <break time="200ms"/> End cube root':Ni==="n"?nt+=' the nth root of <break time="200ms"/>'+Zt+'. <break time="200ms"/> End root':nt+=' the root with index: <break time="200ms"/>'+Ir+', of <break time="200ms"/>'+Zt+'. <break time="200ms"/> End root'}break;case"leftright":{const Ir=y;nt+=(te=Ir.leftDelim?Cd[Ir.leftDelim]:void 0)!=null?te:Ir.leftDelim,nt+=No("math",y.body),nt+=(le=Ir.rightDelim?Cd[Ir.rightDelim]:void 0)!=null?le:Ir.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const yr=bn.replace(/^\\/g,""),Qr=dn()[yr];Qr&&(Qr!=null&&Qr.expand?nt+=No("math",y.body):nt+=`${yr} `);break;case"placeholder":nt+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(bn==="\\mathbin"||bn==="\\mathrel"||bn==="\\mathopen"||bn==="\\mathclose"||bn==="\\mathpunct"||bn==="\\mathord"||bn==="\\mathinner"){nt=No(a,y.body);break}let Ir=y.isDigit()?y.asDigit():y.value,Ni=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(Ni=y.value,Ir=Ni),a==="text")nt+=Ir;else{if(y.type==="mbin"&&(nt+='<break time="150ms"/>'),Ir){const Yi=Cd[Ir]||(Ni?Cd[Ni.trim()]:"");if(Yi)nt+=" "+Yi;else{const $i=Ni?Ig(Ni.trim()):"";nt+=$i||He(Ir)}}else nt+=No("math",y.body);y.type==="mbin"&&(nt+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const Ir=y.command;if(Ir==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Ni=No("math",y.superscript);Ni=Ni.trim();let Yi=No("math",y.subscript);Yi=Yi.trim(),nt+=' the summation from <break time="200ms"/>'+Yi+'<break time="200ms"/> to <break time="200ms"/>'+Ni+'<break time="200ms"/> of <break time="150ms"/>',sn=!0}else if(y.hasEmptyBranch("subscript"))nt+=" the summation of";else{let Ni=No("math",y.subscript);Ni=Ni.trim(),nt+=' the summation from <break time="200ms"/>'+Ni+'<break time="200ms"/> of <break time="150ms"/>',sn=!0}else if(Ir==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Ni=No("math",y.superscript);Ni=Ni.trim();let Yi=No("math",y.subscript);Yi=Yi.trim(),nt+=' the product from <break time="200ms"/>'+Yi+'<break time="200ms"/> to <break time="200ms"/>'+Ni+'<break time="200ms"/> of <break time="150ms"/>',sn=!0}else if(y.hasEmptyBranch("subscript"))nt+=" the product of ";else{let Ni=No("math",y.subscript);Ni=Ni.trim(),nt+=' the product from <break time="200ms"/>'+Ni+'<break time="200ms"/> of <break time="150ms"/>',sn=!0}else if(Ir==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Ni=No("math",y.superscript);Ni=Ni.trim();let Yi=No("math",y.subscript);Yi=Yi.trim(),nt+=' the integral from <break time="200ms"/>'+Ye(Yi)+'<break time="200ms"/> to <break time="200ms"/>'+Ye(Ni)+' <break time="200ms"/> of ',sn=!0}else nt+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const Ni=(be=Cd[y.value])!=null?be:y.command?Cd[y.command]:void 0;nt+=Ni||" "+y.value}else y.command&&(y.command==="\\mathop"?nt+=No("math",y.body):y.command==="\\operatorname"?nt+=Og(y.body):nt+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":Zt=No("math",y.body),nt+=" crossed out "+Zt+". End crossed out.";break;case"space":case"spacing":break}if(!sn&&!y.hasEmptyBranch("superscript")){let Gn=No(a,y.superscript);Gn=Gn.trim();const Gr=Gn.replace(/<[^>]*>/g,"");if(ih(y.superscript)){if(a==="math"){const Wn=Tg(y.superscript);Wn&&(nt+='<mark name="'+Wn+'"/>')}Gr==="\u2032"?nt+=" prime ":Gr==="2"?nt+=" squared ":Gr==="3"?nt+=" cubed ":Number.isNaN(Number.parseInt(Gr))?nt+=" to the "+Gn+"; ":nt+=' to the <say-as interpret-as="ordinal">'+Gr+"</say-as> power; "}else Number.isNaN(Number.parseInt(Gr))?nt+=" raised to the "+Gn+"; ":nt+=' raised to the <say-as interpret-as="ordinal">'+Gr+"</say-as> power; "}if(!sn&&!y.hasEmptyBranch("subscript")){let Gn=No("math",y.subscript);Gn=Gn.trim(),nt+=ih(y.subscript)?" sub "+Gn:" subscript "+Gn+". End subscript. "}}return nt}function wd(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const te=la(a);if(te){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(y=window.MathfieldElement.textToSpeechRulesOptions)!=null?y:{},window.MathfieldElement.textToSpeechRulesOptions=se(ae({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=se(ae({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=se(ae({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const le=(b=window.SRE)!=null?b:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&le.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let be="";try{be=le.toSpeech(te)}catch(He){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",He)}return be}return""}let E=No("math",a);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let te="";window.MathfieldElement.speechEngineRate&&(te='<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>'+te+"<p><s>"+E+"</s></p>"+(te?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&Be()==="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 oh={"\\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"},ah={"\\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 Rg(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 us(a){var y,b,E,te,le,be,He,Ye,nt,dt,Mt,Zt,sn;if(!a)return"";if(pe(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(us).join("");if(a[0].mode==="text"){let Qr=0,Ir="";for(;((y=a[Qr])==null?void 0:y.mode)==="text";)Ir+=a[Qr].body?us(a[Qr].body):a[Qr].value,Qr++;return`"${Ir}" ${us(a.slice(Qr))}`}let Wn=0;const yr=[];for(;a[Wn]&&a[Wn].mode==="math";){let Qr="";for(;a[Wn]&&a[Wn].type==="mord"&&/\d/.test(a[Wn].value);)Qr+=a[Wn++].value;Qr?yr.push(Qr):yr.push(us(a[Wn++]))}return yr.push(us(a.slice(Wn))),Rg(yr)}if(a.mode==="text")return`"${a.value}"`;let bn="";const{command:Gn}=a;let Gr;if(Gn==="\\placeholder")return`(${us(a.body)})`;switch(a.type){case"accent":const Wn={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[Gn];bn=`${Wn!=null?Wn:""} ${us(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map($i=>$i.value).join("");case"group":case"root":bn=(b=oh[Gn])!=null?b:us(a.body);break;case"genfrac":{const $i=a;($i.leftDelim||$i.rightDelim)&&(bn=$i.leftDelim==="."||!$i.leftDelim?"{:":$i.leftDelim),$i.hasBarLine?(bn+="(",bn+=us($i.above),bn+=")/(",bn+=us($i.below),bn+=")"):(bn+="("+us($i.above)+"),",bn+="("+us($i.below)+")"),($i.leftDelim||$i.rightDelim)&&(bn+=$i.rightDelim==="."||!$i.rightDelim?"{:":$i.rightDelim)}break;case"surd":bn+=a.hasEmptyBranch("above")?"sqrt("+us(a.body)+")":"root("+us(a.above)+")("+us(a.body)+")";break;case"latex":bn=a.value;break;case"leftright":{const $i=a,Go=$i.leftDelim;bn+=Go==="."||!Go?"{:":Go,bn+=us($i.body);const Ca=$i.matchingRightDelim();bn+=Ca==="."||!Ca?":}":Ca}break;case"sizeddelim":case"delim":bn=a.value;break;case"overlap":break;case"overunder":break;case"mord":bn=(te=(E=oh[Gn])!=null?E:Gn)!=null?te:typeof a.value=="string"?a.value:"",bn.startsWith("\\")&&(bn+=" "),Gr=Gn?Gn.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,Gr?bn=String.fromCodePoint(Number.parseInt("0x"+Gr[1])):bn.length>0&&bn.startsWith("\\")&&(bn=typeof a.value=="string"?a.value.charAt(0):a.command),bn=Pg(bn,a.style);break;case"mbin":case"mrel":case"minner":bn=(be=(le=oh[Gn])!=null?le:ah[Gn])!=null?be:a.value;break;case"mopen":case"mclose":bn=a.value;break;case"mpunct":bn=(He=ah[Gn])!=null?He:Gn;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(ah[Gn]?bn=ah[Gn]:bn=Gn==="\\operatorname"?us(a.body):(Ye=a.value)!=null?Ye:Gn,bn+=" ");break;case"array":const yr=a.array,Qr=a.environmentName,Ir=(nt={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Qr])!=null?nt:["(",")"],Ni=[];for(const $i of yr){const Go=[];for(const Ca of $i)Go.push(Ir[0]+us(Ca)+Ir[1]);Ni.push(Go.join(","))}const Yi=(dt={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Qr])!=null?dt:["(",")"];bn=Yi[0]+Ni.join(",")+Yi[1];break;case"box":break;case"spacing":bn=(Mt=oh[Gn])!=null?Mt:" ";break;case"enclose":bn="("+us(a.body)+")";break;case"space":bn=" ";break;case"subsup":bn="";break;case"macro":bn=(sn=(Zt=oh[Gn])!=null?Zt:ah[Gn])!=null?sn:us(a.body);break}if(!a.hasEmptyBranch("subscript")){bn+="_";const Wn=us(a.subscript);bn+=Wn.length!==1?`(${Wn})`:Wn}if(!a.hasEmptyBranch("superscript")){bn+="^";const Wn=us(a.superscript);bn+=Wn.length!==1?`(${Wn})`:Wn}return bn}function Pg(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 js(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const te=new jo({from:se(ae({},id()),{renderPlaceholder:()=>new Ur(160,{maxFontSize:1}),letterShapeStyle:(E=y==null?void 0:y.letterShapeStyle)!=null?E:"tex"}),mathstyle:y.mathstyle}),be=new sr({mode:"math",type:"root",body:$s(a,{context:te,parseMode:"math",mathstyle:y.mathstyle})}).render(te);return be?(yu(Zd(be,te)),bu(be,{classes:"ML__latex"}).toMarkup()):""}function k1(a){return tp(a,{context:id()})}function Ng(a,y={}){return la($s(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function Bg(a){const y=$s(a,{parseMode:"math",mathstyle:"displaystyle"});return wd(y)}var ef;function Fg(a){var y,b;if(!ef){const E=(y=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;E?ef=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=ef==null?void 0:ef.box(a).latex)!=null?b:""}function L1(a,y="math"){return us(new sr({type:"root",body:$s(a,{parseMode:y})}))}function D1(a){return $u(a,{format:"ascii-math"})[1]}function Wf(a){if(typeof a=="string"){const y=zg(a);if(!y)throw new Error(`Invalid color: ${a}`);return y}return"C"in a?jg(a):"a"in a?u0(a):a}function Ed(a){return a<0?0:a>255?255:Math.round(a)}function zg(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 Uf(a){const[y,b,E]=[a.L,a.C,a.H],te=E*Math.PI/180,le={L:y,a:b*Math.cos(te),b:b*Math.sin(te)};return a.alpha!==void 0&&(le.alpha=a.alpha),le}function $g(a){const[y,b,E]=[a.L,a.a,a.b],te=Math.sqrt(b*b+E*E),be=Math.atan2(E,b)*180/Math.PI,He={L:y,C:te,H:be};return a.alpha!==void 0&&(He.alpha=a.alpha),He}function Vf(a){const[y,b,E]=[a.L,a.a,a.b],te=Math.pow(.9999999984505198*y+.39633779217376786*b+.2158037580607588*E,3),le=Math.pow(1.00000000888176*y-.10556134232365635*b-.0638541747717059*E,3),be=Math.pow(y*1.000000054672411-.0894841820949657*b-1.2914855378640917*E,3),He=4.076741661347994*te-3.307711590408193*le+.230969928729428*be,Ye=-1.2684380040921763*te+2.6097574006633715*le-.3413193963102197*be,nt=-.004196086541837188*te-.7034186144594493*le+1.7076147009309444*be,dt=Mt=>{const Zt=Math.abs(Mt);return Zt<=.0031308?Mt*12.92:(Math.sign(Mt)||1)*(1.055*Math.pow(Zt,1/2.4)-.055)};return[dt(He),dt(Ye),dt(nt)]}function Gf(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Yf(a,y){let[b,E,te]=a;return b=Ed(b*255),E=Ed(E*255),te=Ed(te*255),y!==void 0?{r:b,g:E,b:te,alpha:y}:{r:b,g:E,b:te}}function u0(a){let[y,b,E]=Vf(a);if(Gf([y,b,E]))return Yf([y,b,E],a.alpha);const te=$g(a);if(te.C=0,[y,b,E]=Vf(Uf(te)),!Gf([y,b,E]))return Yf([y,b,E],a.alpha);let le=0,be=a.L,He=(le+be)/2;te.C=He;const Ye=.36/Math.pow(2,12);for(;be-le>Ye;)He=(le+be)/2,te.C=He,[y,b,E]=Vf(Uf(te)),Gf([y,b,E])?le=He:be=He;return Yf([y,b,E],a.alpha)}function jg(a){return u0(Uf(a))}function d0(a,y){const b=Wf(a),E=Wf(y),te=.56,le=.57,be=.62,He=.65,Ye=.022,nt=1.414,dt=.1,Mt=5e-4,Zt=1.14,sn=.027,bn=1.14,Gn=.027;function Gr($i){return $i>=Ye?$i:$i+qc(Ye-$i,nt)}function Wn($i){return($i<0?-1:1)*Math.pow(Math.abs($i),2.4)}const yr=Gr(Wn(E.r/255)*.2126729+Wn(E.g/255)*.7151522+Wn(E.b/255)*.072175),Qr=Gr(Wn(b.r/255)*.2126729+Wn(b.g/255)*.7151522+Wn(b.b/255)*.072175);let Ir,Ni,Yi;return Math.abs(Qr-yr)<Mt?Ni=0:Qr>yr?(Ir=qc(Qr,te)-qc(yr,le),Ni=Ir*Zt):(Ir=qc(Qr,He)-qc(yr,be),Ni=Ir*bn),Math.abs(Ni)<dt?Yi=0:Ni>0?Yi=Ni-Gn:Yi=Ni+sn,Yi*100}function h0(a,y,b){b!=null||(b="#fff"),y!=null||(y="#000");const E=d0(a,b),te=d0(a,y);return Math.abs(E)>Math.abs(te)?b:y}function Hg(a){const y=Wf(a);let b=((1<<24)+(Ed(y.r)<<16)+(Ed(y.g)<<8)+Ed(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 Fa(a){const y=f0(a);let b="";for(const E of y){if(typeof E.value!="string")return"";b+=E.value}return b}function f0(a){const b=a.model.selection.ranges;return b.length!==1?[]:a.model.getAtoms(b[0])}function Kg(a,y){const b=f0(a);if(b.length!==1)return!1;const E=pf[y];return E?!!E.test(b[0].value):!1}function Zg(a,y){return Fa(a).length>0}function Wg(a){return[Xf(a,"double-struck","mathbb","tooltip.blackboard"),Xf(a,"fraktur","mathfrak","tooltip.fraktur"),Xf(a,"calligraphic","mathcal","tooltip.caligraphic"),Jf(a,"up","mathrm","tooltip.roman-upright"),Jf(a,"bold","mathbf","tooltip.bold"),Jf(a,"italic","mathit","tooltip.italic")]}function Ug(a){return[{label:()=>js(`\\vec{${Fa(a)}}`),visible:()=>Fa(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>js(`\\overrightarrow{${Fa(a)}}`),visible:()=>Fa(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>js(`\\overleftarrow{${Fa(a)}}`),visible:()=>Fa(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>js(`\\dot{${Fa(a)}}`),visible:()=>Fa(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>js(`\\ddot{${Fa(a)}}`),visible:()=>Fa(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>js(`\\bar{${Fa(a)}}`),visible:()=>Fa(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>js(`\\overline{${Fa(a)}}`),visible:()=>Fa(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>js(`\\overgroup{${Fa(a)}}`),visible:()=>Fa(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>js(`\\overbrace{${Fa(a)}}`),visible:()=>Fa(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>js(`\\underline{${Fa(a)}}`),visible:()=>Fa(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>js(`\\undergroup{${Fa(a)}}`),visible:()=>Fa(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>js(`\\underbrace{${Fa(a)}}`),visible:()=>Fa(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function Vg(a){return[{label:()=>js(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>js(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>js(`\\bbox[5px, border: 2px dashed black]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function Gg(a){const y=[];for(const b of Object.keys(Ie))y.push({class:(Hg(h0(Ie[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ie[b]} "></span>`,ariaLabel:()=>{var E;return(E=Ne(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 Yg(a){const y=[];for(const b of Object.keys(Ae))y.push({class:(h0(Ae[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ae[b]} "></span>`,ariaLabel:()=>{var E;return(E=Ne(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 Xg=class extends e0{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 Jg(a){const y=[];for(let b=1;b<=5;b++)for(let E=1;E<=5;E++)y.push({onCreate:(te,le)=>new Xg(te,le,b,E),label:"\u2610",tooltip:()=>Ne("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 qg(a){return[{label:()=>Ne("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Qu(a)},{label:()=>Ne("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Qu(a)},{label:()=>Ne("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Qu(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=e1(a);return b<y.maxColumns}},{label:()=>Ne("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Qu(a)},{type:"divider"},{label:()=>Ne("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Qu(a)},{label:()=>Ne("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Qu(a)},{type:"divider"},{label:()=>Ne("menu.borders"),visible:()=>(Qg(a)||Qu(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>sh(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>sh(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>sh(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>sh(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>sh(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>Ne("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:Jg(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>Ne("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>Ne("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{pd(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>Ne("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{pd(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>Ne("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>Ne("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:Wg(a),submenuClass:"variant-submenu"},{label:()=>Ne("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Yg(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>Ne("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gg(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>Ne("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Ug(a),submenuClass:"variant-submenu"},{label:()=>Ne("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&Fa(a).length>0,submenu:Vg(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>Ne("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:()=>Ne("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?Ne("menu.solve-for",js(b)):Ne("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],te=(y=b.solve(E))==null?void 0:y.map(le=>{var be;return(be=le.simplify().latex)!=null?be:""});if(!te){a.model.announce("plonk");return}a.insert(`${E}=${te.length===1?te[0]:"\\left\\lbrace"+(te==null?void 0:te.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>Ne("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>Ne("menu.copy"),id:"copy",submenu:[{label:()=>Ne("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>ho.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>Ne("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>ho.copyToClipboard(a,"ascii-math")},{label:()=>Ne("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>ho.copyToClipboard(a,"math-ml")}]},{label:()=>Ne("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>Ne("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Qu(a){var y;return!!((y=a.model.parentEnvironment)!=null&&y.array)}function Qg(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,te)=>Math.max(E,te.length),0)]:[0,0]}function sh(a,y){kh(a),a.flushInlineShortcutBuffer(),Tp(a.model,y),rs(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 te=E.evaluate();return te.isSame(E)&&(te=E.N()),te.latex}function Xf(a,y,b,E){return{label:()=>js(`\\${b}{${Fa(a)}}`),tooltip:()=>{var te;return(te=Ne(E))!=null?te:E},visible:()=>Kg(a,y),checked:()=>{var te;return{some:"mixed",all:!0}[(te=a.queryStyle({variant:y}))!=null?te:!1]},onMenuSelect:()=>{a.applyStyle({variant:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Jf(a,y,b,E){return{label:()=>js(`\\${b}{${Fa(a)}}`),tooltip:()=>{var te;return(te=Ne(E))!=null?te:E},visible:()=>Zg(a,y),checked:()=>{var te;return{some:"mixed",all:!0}[(te=a.queryStyle({variantStyle:y}))!=null?te:!1]},onMenuSelect:()=>{a.applyStyle({variantStyle:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Md(a,y){return a+wd(y)}Ul({speak:(a,y,b)=>n1(a,y,b)},{target:"mathfield"});function n1(a,y,b){var E,te;b=b!=null?b:{withHighlighting:!1};const{model:le}=a;function be(dt){let Mt=null;switch(dt){case"all":Mt=le.root;break;case"selection":Mt=le.getAtoms(le.selection);break;case"left":{Mt=le.getAtoms(le.offsetOf(le.at(le.position).leftSibling),le.position);break}case"right":{Mt=le.getAtoms(le.position,le.offsetOf(le.at(le.position).rightSibling));break}case"group":Mt=le.getAtoms(le.getSiblingsRange(le.position));break;case"parent":{const{parent:Zt}=le.at(le.position);Zt!=null&&Zt.parent?Mt=Zt:Mt=le.root;break}default:Mt=le.root}return Mt}function He(dt){let Mt="";switch(dt){case"all":console.log("Internal failure: speak all failed");break;case"selection":Mt="no selection";break;case"left":Mt="at start";break;case"right":Mt="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":Mt="no parent";break;default:console.log('unknown speak_ param value: "'+dt+'"');break}return Mt}const Ye=be(y);if(Ye===null)return(te=(E=window.MathfieldElement).speakHook)==null||te.call(E,He(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const nt=wd(Ye);return ge()&&b.withHighlighting?(Du().readAloudMathfield=a,Zu(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,nt)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(nt),!1}function r1(a){var y,b;if(!ge()){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"}),te={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(te,(le,be)=>{if(le)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${le}`);else if(be!=null&&be.AudioStream){const He=new Uint8Array(be.AudioStream),Ye=new Blob([He.buffer],{type:"audio/mpeg"}),nt=URL.createObjectURL(Ye);new Audio(nt).play().catch(Mt=>console.log(Mt))}else console.log("polly.synthesizeSpeech():",be)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function p0(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 te="";if(y==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(y==="delete")te=Md("deleted: ",E);else if(y==="focus"||y.includes("move"))te=o1(a.model,b)+(a.model.selectionIsCollapsed?"":"selected: ")+a1(a.model);else if(y==="replacement")te=Md("",a.model.at(a.model.position));else if(y==="line"){const le=Md("",a.model.root);a.keyboardDelegate.setAriaLabel(le)}else te=E?Md(y+" ",E):y;if(te){const le=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=te+le}}function o1(a,y){if(Number.isNaN(y))return"";const b=a.at(y);if(!b||b.treeDepth<=a.at(a.position).treeDepth)return"";let E="",te=b.parent;const le=a.at(a.position).parent;for(;te!==a.root&&te!==le;)E+=`out of ${p0(te)};`,te=te.parent;return E}function a1(a){if(!a.selectionIsCollapsed)return Md("",a.getAtoms(a.selection));let y="";const b=a.at(a.position),E=p0(b);return b.isFirstSibling&&(y=(E?"start of "+E:"unknown")+": "),b.isLastSibling?b.isFirstSibling||(y+=E?"end of "+E:"unknown"):y+=Md("",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 te={};if((y==null?void 0:y.type)==="undo"&&(te={inputType:"historyUndo"}),(y==null?void 0:y.type)==="redo"&&(te={inputType:"historyRedo"}),this.contentWillChange(te)){const le=this.silenceNotifications;this.silenceNotifications=!0,this.mode=a.mode,this.root=Eu(a.content),this.selection=a.selection,this.silenceNotifications=le,this.contentDidChange(te)}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,te;const le=this.normalizeSelection(a,y);if(le===void 0)throw new TypeError("Invalid selection");if(le.ranges.length===1&&le.ranges[0][0]===le.ranges[0][1]){const dt=le.ranges[0][0];if(!this.mathfield.dirty&&!((b=this.at(dt))!=null&&b.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(dt-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(dt-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((te=this.at(dt+1))!=null&&te.parentPrompt){this._anchor=this.normalizeOffset(dt+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=dt,this._position=dt,this._selection=le;return}const be=Fs(le);le.direction==="backward"?[this._position,this._anchor]=be:[this._anchor,this._position]=be;const He=this.at(be[0]+1),Ye=this.at(be[1]),nt=sr.commonAncestor(He,Ye);(nt==null?void 0:nt.type)==="array"&&He.parent===nt&&Ye.parent===nt?this._selection={ranges:[be],direction:le.direction}:this._selection={ranges:[be],direction:le.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 Gs&&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(ad(a)){if(E=y!=null?y:{},a.ranges.length>1)return a.ranges.reduce((nt,dt)=>[...nt,...this.getAtoms(dt,E)],[]);a=a.ranges[0]}let te,le;if(Nc(a)){if(te=a,!Nc(y))return[];le=y}else[te,le]=a,E=y!=null?y:{};if(!Number.isFinite(te))return[];E.includeChildren===void 0&&(E.includeChildren=!1),te<0&&(te=this.lastOffset-te+1),le<0&&(le=this.lastOffset-le+1);const be=Math.min(te,le)+1,He=Math.max(te,le);if(!E.includeChildren&&be===1&&He===this.lastOffset)return[this.root];let Ye=[];for(let nt=be;nt<=He;nt++){const dt=this.atoms[nt];m0(this,dt,be,He)&&Ye.push(dt)}return E.includeChildren||(Ye=Ye.filter(nt=>{let dt=!1,{parent:Mt}=nt;for(;Mt&&!dt;)dt=m0(this,Mt,be,He),Mt=Mt.parent;return!dt})),Ye}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 te=this.lastOffset;if(b==="forward"){for(let le=y;le<=te;le++)if(E=this.atoms[le],a(E))return E;for(let le=0;le<y;le++)if(E=this.atoms[le],a(E))return E;return}for(let le=y;le>=0;le--)if(E=this.atoms[le],a(E))return E;for(let le=te;le>y;le--)if(E=this.atoms[le],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 sr({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 sr.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 la(a);if(b==="spoken")return wd(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const te=wd(a);return window.MathfieldElement.textToSpeechMarkup=E,te}if(b==="spoken-ssml"||b==="spoken-ssml-with-highlighting"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const te=wd(a);return window.MathfieldElement.textToSpeechMarkup=E,te}return b==="ascii-math"?us(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,te;if(Nc(a)&&Nc(y)?(E=[this.normalizeRange([a,y])],te=b):od(a)?(E=[this.normalizeRange(a)],te=y):ad(a)?(E=a.ranges,te=y):(E=[this.normalizeRange([0,-1])],te=a),te!=null||(te="latex"),te==="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 le=this.getValue({ranges:E},"latex-unstyled");try{const be=window.MathfieldElement.computeEngine.parse(le);return JSON.stringify(be.json)}catch(be){return JSON.stringify(["Error",`'${be.toString()}'`])}}if(te.startsWith("latex")){const le={expandMacro:te==="latex-expanded",skipStyles:te==="latex-unstyled",skipPlaceholders:te==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return ko(E.map(be=>sr.serialize(this.getAtoms(be),le)))}return E.map(le=>this.getAtoms(le).map(be=>this.atomToString(be,te)).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,te]=b,{parent:le}=this.at(te);if(le&&(le.type==="genfrac"||le.type==="subsup"))for(;le!==this.root&&qf(this,le,[E,te]);)te=this.offsetOf(le),le=le.parent;for(le=this.at(E).parent;le!==this.root&&qf(this,le,[E,te]);)E=this.offsetOf(le.leftSibling),le=le.parent;if(le=this.at(te).parent,(le==null?void 0:le.type)==="genfrac")for(;le!==this.root&&qf(this,le,[E,te]);)te=this.offsetOf(le),console.assert(te>=0),le=le.parent;this._position=this.normalizeOffset(y),this._selection={ranges:[[E,te]],direction:"none"}})}announce(a,y,b=[]){var E,te;((te=(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?te:!0)&&i1(this.mathfield,a,y,b)}deferNotifications(a,y){const b=this._selection,E=this._anchor,te=this._position,le=this.silenceNotifications;this.silenceNotifications=!0;const be=this.root.changeCounter;y();const He=this.root.changeCounter!==be,Ye=E!==this._anchor||te!==this._position||zu(this._selection,b)==="different";return this.silenceNotifications=le,a.content&&He&&this.contentDidChange({inputType:a.type}),a.selection&&Ye&&this.selectionDidChange(),He||Ye}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(Nc(a)){const te=this.normalizeOffset(a);if(Nc(y)){const le=this.normalizeOffset(y);E=te<=le?{ranges:[[te,le]],direction:"none"}:{ranges:[[le,te]],direction:"backward"}}else E={ranges:[[te,te]],direction:"none"}}else if(od(a)){const te=this.normalizeOffset(a[0]),le=this.normalizeOffset(a[1]);E=te<=le?{ranges:[[te,le]],direction:"none"}:{ranges:[[le,te]],direction:"backward"}}else ad(a)&&(E={ranges:a.ranges.map(te=>this.normalizeRange(te)),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(Zc(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const b=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",se(ae({},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(Zc(this.mathfield)),this.silenceNotifications))return;const a=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=a}};function m0(a,y,b,E){const te=a.offsetOf(y);if(te<b||te>E)return!1;if(!y.hasChildren)return!0;const le=a.offsetOf(y.firstChild);if(le>=b&&le<=E){const be=a.offsetOf(y.lastChild);if(be>=b&&be<=E)return!0}return!1}function qf(a,y,b){if(!(y!=null&&y.hasChildren))return!1;const[E,te]=b,le=a.offsetOf(y.firstChild),be=a.offsetOf(y.lastChild);return le>=E&&le<=te&&be>=le&&be<=te}function lh(a,y,b,E){var te,le,be,He,Ye,nt;const dt=b.parent;if(dt&&b instanceof sa){const Mt=!E&&y==="forward"||E==="body"&&y==="backward";let Zt=Mt?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return Mt?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(dt.addChildrenAfter(b.removeBranch("body"),b),dt.removeChild(b),Zt--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(dt.addChildrenAfter(b.removeBranch("body"),b),dt.removeChild(b),Zt--),a.position=Zt,!0}if(dt&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const Mt=b.leftSibling;b.hasChildren&&dt.addChildrenAfter(b.removeBranch("body"),b),dt.removeChild(b),a.position=a.offsetOf(Mt)}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),dt.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(dt&&(b.type==="box"||b.type==="enclose")){const Mt=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return dt.addChildrenAfter(b.removeBranch("body"),b),dt.removeChild(b),a.position=a.offsetOf(Mt),!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 Mt=ch.fractionNavigationOrder==="numerator-denominator"?"above":"below",Zt=Mt==="above"?"below":"above";if(dt&&(y==="forward"&&E===Mt||y==="backward"&&E===Zt)){const sn=b.removeBranch(Mt),bn=b.removeBranch(Zt);return dt.addChildrenAfter([...sn,...bn],b),dt.removeChild(b),a.position=a.offsetOf(sn.length>0?sn[sn.length-1]:bn[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 Mt=y==="forward"?(be=(te=b.superscript)==null?void 0:te[0])!=null?be:(le=b.subscript)==null?void 0:le[0]:(nt=(He=b.subscript)==null?void 0:He[0].lastSibling)!=null?nt:(Ye=b.superscript)==null?void 0:Ye[0].lastSibling;return Mt&&(a.position=a.offsetOf(Mt)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const Mt=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=Mt,!0}if(E==="superscript")if(y==="backward"){const Mt=a.offsetOf(b.firstChild)-1;console.assert(Mt>=0),a.position=Mt}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 Mt=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=Mt}return!0}if((dt==null?void 0:dt.type)==="genfrac"&&!E&&b.type!=="first"){let Mt=a.offsetOf(b.leftSibling);return dt.removeChild(b),dt.hasEmptyBranch("above")&&dt.hasEmptyBranch("below")?(Mt=a.offsetOf(dt.leftSibling),dt.parent.removeChild(dt),a.announce("delete",void 0,[dt]),a.position=Mt,!0):(a.announce("delete",void 0,[b]),a.position=Mt,!0)}if(y==="backward"&&((dt==null?void 0:dt.command)==="\\ln"||(dt==null?void 0:dt.command)==="\\log")&&b.parentBranch!=="body"){const Mt=a.offsetOf(dt.leftSibling);return dt.parent.removeChild(dt),a.announce("delete",void 0,[dt]),a.position=Mt,!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&&lh(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(lh(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])}}):Uc(a,Fs(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&&lh(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&lh(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&lh(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 te=(y=a.at(a.position))==null?void 0:y.rightSibling;for(;(te==null?void 0:te.type)==="subsup";)te.parent.removeChild(te),te=(b=a.at(a.position))==null?void 0:b.rightSibling;a.announce("delete",void 0,[E])}):Uc(a,Fs(a.selection),"deleteContentForward")}function Uc(a,y,b){const E=a.getAtoms(y);if(E.length>0&&E[0].parent){let te=E[0].parent.firstChild;te.type==="first"&&(te=te.rightSibling);const le=E[E.length-1].parent.lastChild;let be=E[0];be.type==="first"&&(be=be.rightSibling);const He=E[E.length-1];if(be===te&&He===le){const Ye=E[0].parent;Ye.parent&&Ye.type!=="prompt"&&(y=[a.offsetOf(Ye.leftSibling),a.offsetOf(Ye)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const Ye=E[0].parent,nt=E[0].parentBranch==="below"?"above":"below",dt=a.offsetOf(Ye.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var Mt,Zt;const sn=Ye.removeBranch(nt);if(sn.length===1&&sn[0].type==="placeholder")(Zt=Ye.parent)==null||Zt.removeChild(Ye),a.position=Math.max(0,dt);else{const bn=Ye.parent.addChildrenAfter(sn,Ye);(Mt=Ye.parent)==null||Mt.removeChild(Ye),a.position=a.offsetOf(bn)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}Ul({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&Uc(a,[0,-1],"deleteContent"),deleteForward:a=>c1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&Uc(a,[a.anchor,kf(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&Uc(a,[a.anchor,kf(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&Uc(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&Uc(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&Uc(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&Uc(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="${Ne("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="${Ne("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,h1=class{constructor(a,y){this.focusBlurInProgress=!1;var b,E,te;this.options=ae(se(ae({},Fh()),{macros:dn(),registers:cc()}),Bh(y)),this.eventController=new AbortController;const le=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 be=(E=(b=y.value)!=null?b:this.element.textContent)!=null?E:"";be=be.trim();const He=Dp(this.options),Ye=new sr({type:"root",mode:He,body:$s(be,{context:this.context})});this.model=new s1(this,He,Ye),this.undoManager=new Bv(this.model);const nt=[];if(nt.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>"),nt.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),nt.push("<span part=content class=ML__content>"),nt.push(xp(this)),nt.push("</span>"),window.mathVirtualKeyboard&&(nt.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">`),nt.push(u1),nt.push("</div>")),nt.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),nt.push(d1),nt.push("</div>"),nt.push("</span>"),nt.push("<span class=ML__sr-only>"),nt.push("<span role=status aria-live=assertive aria-atomic=true></span>"),nt.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(nt.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=Le.subscribe(()=>Le.update(this.element)),Le.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",Mt=>Mt.stopImmediatePropagation(),{capture:!1,signal:le}),this.field.addEventListener("wheel",this,{passive:!1,signal:le}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:le}):this.field.addEventListener("mousedown",this,{signal:le}),(te=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||te.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(Zc(this)))},{signal:le}),this._menu=new Sg(qg(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:le});const dt=this.element.querySelector("[part=menu-toggle]");dt==null||dt.addEventListener("pointerdown",Mt=>{if(Mt.currentTarget!==dt||this._menu.state!=="closed")return;this.element.classList.add("tracking");const Zt=dt.getBoundingClientRect();this._menu.modifiers=Ku(Mt),this._menu.show({target:dt,location:{x:Zt.left,y:Zt.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),Mt.preventDefault(),Mt.stopPropagation()},{signal:le}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(dt.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:le}),document.addEventListener("scroll",this,{signal:le}),this.resizeObserver=new ResizeObserver(()=>rs(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:le}),Vd&&!Le.locale.startsWith(Vd.locale)&&Fm(Le.locale),nc!=="ready"&&document.fonts.ready.then(()=>Th(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(Zc(this)),Xh(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Ff())}showMenu(a){var y,b;const E=(b=(y=a==null?void 0:a.location)!=null?y:zc(this.field))!=null?b:void 0,te=a==null?void 0:a.modifiers,le=this.element.querySelector("[part=container]");return this._menu.show({target:le,location:E,modifiers:te})}get colorMap(){return a=>{var y,b,E;return(E=(b=(y=this.options).colorMap)==null?void 0:b.call(y,a))!=null?E:gt(a)}}get backgroundColorMap(){return a=>{var y,b,E,te,le,be;return(be=(le=(b=(y=this.options).backgroundColorMap)==null?void 0:b.call(y,a))!=null?le:(te=(E=this.options).colorMap)==null?void 0:te.call(E,a))!=null?be:Ve(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=sr.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=ae({},a[0].style);for(const b of a)for(const[E,te]of Object.entries(b.style))y[E]!==te&&delete y[E];return y}queryStyle(a){const y=Of(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 Ye of Object.keys(y)){const nt=this.queryStyle({[Ye]:y[Ye]});if(nt==="none")return"none";if(nt==="some")return"some"}return"all"}const E=Object.keys(y)[0],te=y[E];if(this.model.selectionIsCollapsed)return this.effectiveStyle[E]===te?"all":"none";const le=this.model.getAtoms(this.model.selection,{includeChildren:!0});let be=le.length;if(be===0)return"none";let He=0;for(const Ye of le){if(Ye.type==="first"){be-=1;continue}Ye.style[E]===te&&(He+=1)}return He===0?"none":He===be?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=Vm(this.options.keybindings,(a=Gd())!=null?a:zm());return((y=Gd())==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=ae(ae({},this.options),Bh(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=sr.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&ho.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)&&rs(this)}getOptions(a){return Uu(this.options,a)}getOption(a){return Uu(this.options,a)}handleEvent(a){return Au(this,null,function*(){var y;if(Ql(this)){if(Cf(a)){if(!zd(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(vd(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"&&Zp(this,a);break;case"pointerdown":this.userSelect!=="none"&&(Zp(this,a),a.shiftKey===!1&&(yield i0(a,this.element.querySelector("[part=container]"),this._menu))&&Uh.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield i0(a,this.element.querySelector("[part=container]"),this._menu))&&Uh.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&Xh(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Ql(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Ql(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Ql(this))return;Le.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,Gv(),Qm(),mg()}flushInlineShortcutBuffer(a){if(a!=null||(a={defer:!1}),!a.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(a){return vd(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Zc(this))),!1):av(this,a)}get errors(){return tp(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=of(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();ho.insert(this.model,a,y)&&(rs(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,te=this.host.getBoundingClientRect();te.bottom>E.top&&((a=window.document.scrollingElement)==null||a.scrollBy(0,te.bottom-E.top+8))}}this.dirty&&Zu(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=zc(this.field);else{const E=Fd(this);if(E.length>0){let te=-1/0,le=-1/0;for(const be of E)be.right>te&&(te=be.right),be.top<le&&(le=be.top);b={x:te+y.left-this.field.scrollLeft,y:le+y.top-this.field.scrollTop,height:0}}}if(this.host&&b){const E=this.host.getBoundingClientRect(),te=b.y;let le=this.host.scrollTop;te<E.top?le=te-E.top+this.host.scrollTop:te>E.bottom&&(le=te-E.bottom+this.host.scrollTop+b.height),this.host.scroll({top:le,left:0})}if(b){const E=b.x-window.scrollX;let te=this.field.scrollLeft;E<y.left?te=E-y.left+this.field.scrollLeft-20:E>y.right&&(te=E-y.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:te})}}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&&we()&&navigator.vibrate(Sp),window.MathfieldElement.playSound("keypress")),a==="\\\\"?Ap(this.model):a==="&"?Ip(this.model):this.model.selectionIsCollapsed?ho.insert(this.model,a,ae({style:this.model.at(this.model.position).computedStyle},y)):ho.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),rs(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 te=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=te;return}const le=this.model.mode,{model:be}=this;be.deferNotifications({content:!!b||!!y,selection:!0,type:"insertText"},()=>{let He=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const Ye=$s(y,{context:this.context,parseMode:a});be.collapseSelection("forward");const nt=be.at(be.position);be.position=be.offsetOf(nt.parent.addChildrenAfter(Ye,nt)),He=!0}if(this.model.mode=a,a==="latex"){let Ye=be.selectionIsCollapsed;pd(this,"accept");let nt,dt=be.at(be.position);if(Ye)nt="\\";else{const Zt=Fs(be.selection);nt=this.model.getValue(Zt,"latex");const sn=this.model.extractAtoms(Zt);sn.length===1&&sn[0].type==="placeholder"&&(nt=y,Ye=!0),dt=be.at(Zt[0])}const Mt=new jd(nt);dt.parent.addChildAfter(Mt,dt),Ye?be.position=be.offsetOf(Mt.lastChild):be.setSelection(be.offsetOf(Mt.firstChild),be.offsetOf(Mt.lastChild))}else Yd(be).forEach(Ye=>{Ye.isError=!1});if(b){const Ye=$s(b,{context:this.context,parseMode:le});be.collapseSelection("forward");const nt=be.at(be.position);be.position=be.offsetOf(nt.parent.addChildrenAfter(Ye,nt)),He=!0}return rs(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),He}),this.model.mode=a,window.mathVirtualKeyboard.update(Zc(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 te={operation:"set",silenceNotifications:!1};od(y)?te.range=y:(y.operation==="toggle"&&(te.operation="toggle"),te.range=y.range,te.silenceNotifications=(b=y.silenceNotifications)!=null?b:!1);const le=Of(this,a),be=(E=te.operation)!=null?E:"set";if(te.range===void 0&&this.model.selectionIsCollapsed){if(be==="set"){this.defaultStyle=ae(ae({},this.defaultStyle),le);return}const He=ae({},this.defaultStyle);for(const Ye of Object.keys(le))He[Ye]===le[Ye]?(Ye==="color"&&delete He.verbatimColor,Ye==="backgroundColor"&&delete He.verbatimBackgroundColor,delete He[Ye]):He[Ye]=le[Ye];this.defaultStyle=He;return}this.model.deferNotifications({content:!te.silenceNotifications,type:"insertText"},()=>{if(te.range===void 0)for(const He of this.model.selection.ranges)Ef(this.model,He,le,{operation:be});else Ef(this.model,te.range,le,{operation:be})}),rs(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=zc(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=rh(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),rs(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),te=this.model.offsetOf(b.lastChild);return this.model.getValue(E,te,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 te=this.model.getBranchRange(this.model.offsetOf(E),"body");this.model.setSelection(te),this.insert(y,se(ae({},b),{insertionMode:"replaceSelection"}))}b!=null&&b.silenceNotifications&&(this.valueOnFocus=this.getValue()),rs(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),rs(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(Zc(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(Zc(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(Zc(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),te=(a=E.mode)!=null?a:Dp(this.options);this.model.mode!==te&&(this.model.mode==="latex"?(pd(this,"accept",{mode:te}),b.position=b.offsetOf(E)):this.switchMode(te))}(y=this.host)==null||y.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Zc(this)),Xh(this)}onContentWillChange(a){var y,b,E;return(E=(b=this.host)==null?void 0:b.dispatchEvent(new InputEvent("beforeinput",se(ae({},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(),Zu(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="",md(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})),rs(this),this.focusBlurInProgress=!1,Ff();const E=new AbortController,te=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Ql(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:te})},{once:!0,signal:te}),setTimeout(()=>E.abort(),100)}onInput(a){Af(this,a)}onKeystroke(a){return jp(this,a)}onCompositionStart(a){this.model.deleteAtoms(Fs(this.model.selection));const y=zc(this.field);y&&requestAnimationFrame(()=>{Zu(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){Lv(this.model,a),rs(this)}onCompositionEnd(a){Dv(this.model),Af(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),ho.onCopy(this,a),Uc(this.model,Fs(this.model.selection),"deleteByCut"),this.snapshot("cut"),rs(this))}onCopy(a){ho.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=ho.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(),Dh(this),Xh(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=>Tn(b,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function v0(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const y of a.children)v0(y)}function Qf(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&&Qf(E)})):(a.classList.remove("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qf(E,y)})))}function f1(a,y){var b;if(!ge())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"}),te={OutputFormat:"json",VoiceId:(b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna",Engine:"standard",Text:y,TextType:"ssml",SpeechMarkTypes:["ssml"]};Du().readAloudElement=a,E.synthesizeSpeech(te,(le,be)=>{if(le){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${le}`);return}if(!(be!=null&&be.AudioStream)){console.log("polly.synthesizeSpeech():",be);return}const He=new TextDecoder("utf-8").decode(new Uint8Array(be.AudioStream));Du().readAloudMarks=He.split(`
`).map(Ye=>Ye?JSON.parse(Ye):{}),Du().readAloudTokens=[];for(const Ye of Du().readAloudMarks)Ye.value&&Du().readAloudTokens.push(Ye.value);Du().readAloudCurrentMark="",te.OutputFormat="mp3",te.SpeechMarkTypes=[],E.synthesizeSpeech(te,(Ye,nt)=>{if(Ye){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${Ye}`);return}if(!(nt!=null&&nt.AudioStream))return;const dt=new Uint8Array(nt.AudioStream),Mt=new Blob([dt.buffer],{type:"audio/mpeg"}),Zt=URL.createObjectURL(Mt),sn=Du();sn.readAloudAudio?sn.readAloudAudio.pause():(sn.readAloudAudio=new Audio,sn.readAloudAudio.addEventListener("ended",()=>{const bn=sn.readAloudMathfield;sn.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),bn?(Zu(bn),sn.readAloudElement=null,sn.readAloudMathfield=null,sn.readAloudTokens=[],sn.readAloudMarks=[],sn.readAloudCurrentMark=""):v0(sn.readAloudElement)}),sn.readAloudAudio.addEventListener("timeupdate",()=>{let bn="";const Gn=sn.readAloudAudio.currentTime*1e3+100;for(const Gr of sn.readAloudMarks)Gr.time<Gn&&(bn=Gr.value);sn.readAloudCurrentMark!==bn&&(sn.readAloudCurrentToken=bn,bn&&bn===sn.readAloudFinalToken?sn.readAloudAudio.pause():(sn.readAloudCurrentMark=bn,Qf(sn.readAloudElement,sn.readAloudCurrentMark)))})),sn.readAloudAudio.src=Zt,sn.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),sn.readAloudAudio.play()})})}ge()||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 ea=new WeakMap,p1=.5,Lu={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 = ..."},Ys=class ed extends HTMLElement{static get formAssociated(){return kd()}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,nv())}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,te;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:(te=y.delete)!=null?te: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 Le.locale}static set locale(y){y==="auto"&&(y=navigator.language.slice(0,5)),Le.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 Le.strings}static set strings(y){Le.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 Au(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 le=yield(yield fetch(yield _p(`${E}/${b}`))).arrayBuffer(),be=yield this.audioContext.decodeAudioData(le);this.audioBuffers[y]=be}catch(te){}})}static playSound(y){return Au(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(Lu[E])if(Lu[E].startsWith("mf."))if(Lu[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${Lu[E]}`);else{const te=Lu[E].match(/([a-zA-Z]+) =/);b.push(`Option \`${E}\` has been renamed \`${te[1]}\``)}else b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${Lu[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(kd()&&(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=[wu("core"),wu("mathfield"),wu("mathfield-element"),wu("ui"),wu("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>"+nu("core")+nu("mathfield")+nu("mathfield-element")+nu("ui")+nu("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(te=>te.nodeType===3?te.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,te;return(te=(E=this._mathfield)==null?void 0:E.getPromptValue(y,b))!=null?te:""}setPromptValue(y,b,E){var te;(te=this._mathfield)==null||te.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 te=(E=(b=ed.computeEngine)==null?void 0:b.box(y).latex)!=null?E:null;te!==null&&this._mathfield.setValue(te),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?Uu(this._mathfield.options,y):ea.has(this)?ae({},Uu(ae(ae({},Fh()),Bh(ea.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?Uu(this._mathfield.options,y):ea.has(this)?Uu(ae(ae({},Fh()),Bh(ea.get(this).options)),y):null}reflectAttributes(){const y=Fh(),b=this._getOptions();Object.keys(ed.optionsAttributes).forEach(E=>{const te=au(E);ed.optionsAttributes[E]==="on/off"?y[te]!==b[te]?this.setAttribute(E,b[te]?"on":"off"):this.removeAttribute(E):y[te]!==b[te]&&(ed.optionsAttributes[E]==="boolean"?b[te]?this.setAttribute(E,""):this.removeAttribute(E):(typeof b[te]=="string"||typeof b[te]=="number")&&this.setAttribute(E,b[te].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(ea.has(this)){const b=ae(ae({},ea.get(this).options),y);ea.set(this,se(ae({},ea.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else ea.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))Lu[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${Lu[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 te,le;if(this._mathfield)return this._mathfield.model.getValue(y,b,E);if(ea.has(this)){let be,He,Ye;if(ad(y)?([be,He]=y.ranges[0],Ye=b):od(y)?([be,He]=y,Ye=b):Nc(y)&&Nc(b)?(be=y,He=b,Ye=E):(be=0,He=-1,Ye=y),(Ye===void 0||Ye==="latex")&&be===0&&He===-1)return(le=(te=ea.get(this).value)!=null?te:this.textContent)!=null?le:""}return""}setValue(y,b){if(this._mathfield&&y!==void 0){b!=null||(b={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(y,b);return}if(ea.has(this)){const te=ea.get(this).options;ea.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:te,menuItems:void 0});return}const E=uh(this);ea.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,te;return(te=(E=this._mathfield)==null?void 0:E.insert(y,b))!=null?te:!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,te;return(te=(E=this._mathfield)==null?void 0:E.setCaretPoint(y,b))!=null?te:!1}offsetFromPoint(y,b,E){return this._mathfield?rh(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=Su(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,te,le;jc.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"&&((te=this._mathfield)==null||te.focus()),y.type==="blur"&&((le=this._mathfield)==null||le.blur()))}connectedCallback(){var y,b,E,te;const le=window.getComputedStyle(this),be=this.shadowRoot,He=le.userSelect!=="none";if(He)be.host.addEventListener("pointerdown",this,!0);else{const dt=be.querySelector("span");dt.style.pointerEvents="none"}be.host.addEventListener("focus",this,!0),be.host.addEventListener("blur",this,!0),kd()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),He&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const Ye=be.querySelector("slot:not([name])");if(Ye)try{this._style=Ye.assignedElements().filter(dt=>dt.tagName.toLowerCase()==="style").map(dt=>dt.textContent).join("")}catch(dt){console.error(dt)}if(this._style){const dt=document.createElement("style");dt.textContent=this._style,be.appendChild(dt)}let nt="";if(this.hasAttribute("value")?nt=this.getAttribute("value"):nt=(y=Ye==null?void 0:Ye.assignedNodes().map(dt=>dt.nodeType===3?dt.textContent:"").join("").trim())!=null?y:"",this._mathfield=new h1(be.querySelector(":host > span"),se(ae({},(E=(b=ea.get(this))==null?void 0:b.options)!=null?E:uh(this)),{eventSink:this,value:nt})),!ea.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const dt of Object.keys(ed.optionsAttributes))this.upgradeProperty(au(dt))}if(!((te=this._mathfield)!=null&&te.model)){this._mathfield=null;return}if(ea.has(this)){const dt=this._mathfield,Mt=ea.get(this),Zt=Mt.menuItems;dt.model.deferNotifications({content:!1,selection:!1},()=>{const sn=Mt.value;sn!==void 0&&dt.setValue(sn),dt.model.selection=Mt.selection,ea.delete(this)}),Zt&&(this.menuItems=Zt)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Ih()}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=Uu(this._mathfield.options,Object.keys(ed.optionsAttributes).map(te=>au(te)));ea.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 te=E!==null;switch(y){case"contenteditable":rs(this._mathfield);break;case"disabled":this.disabled=te;break;case"read-only":case"readonly":this.readOnly=te;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(y){const b=!!y;b?(this.setAttribute("readonly",""),kd()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(kd()?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"),kd()?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,te){return typeof E!="string"?!1:(y._setOptions({registers:se(ae({},y._getOption("registers")),{[E]:te})}),!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(te=>te.menuItem))!=null?y:[]:(E=(b=ea.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}ea.has(this)?ea.set(this,se(ae({},ea.get(this)),{menuItems:y})):ea.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:uh(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 te;(te=this._mathfield)==null||te.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:ea.has(this)?ea.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,rs(this._mathfield);return}if(ea.has(this)){ea.set(this,se(ae({},ea.get(this)),{selection:y}));return}ea.set(this,{value:void 0,selection:y,options:uh(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:ea.has(this)?ea.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,rs(this._mathfield)),ea.has(this)){ea.set(this,se(ae({},ea.get(this)),{selection:{ranges:[[y,y]]}}));return}ea.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:uh(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}};Ys.version="0.98.5",Ys._fontsDirectory="./fonts",Ys._soundsDirectory="./sounds",Ys.keypressVibration=!0,Ys._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},Ys._plonkSound="plonk.wav",Ys.audioBuffers={},Ys.createHTML=a=>a,Ys._speechEngineRate="100%",Ys._speechEngineVoice="Joanna",Ys._textToSpeechMarkup="",Ys._textToSpeechRules="mathlive",Ys._textToSpeechRulesOptions={},Ys.speakHook=r1,Ys.readAloudHook=f1,Ys._decimalSeparator=".",Ys.fractionNavigationOrder="numerator-denominator",Ys._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 ch=Ys;function au(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function uh(a){const y={readOnly:!1},b=ch.optionsAttributes;return Object.keys(b).forEach(E=>{if(a.hasAttribute(E)){const te=a.getAttribute(E);E==="placeholder"?y.contentPlaceholder=te!=null?te:"":b[E]==="boolean"?y[au(E)]=!0:b[E]==="on/off"?te==="on"?y[au(E)]=!0:te==="off"?y[au(E)]=!1:y[au(E)]=void 0:b[E]==="number"?y[au(E)]=Number.parseFloat(te!=null?te:"0"):y[au(E)]=te}}),y}function kd(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var g0=ch,y0,b0,_0,x0;if(ge()&&!((y0=window.customElements)!=null&&y0.get("math-field"))){(_0=window[b0=Symbol.for("io.cortexjs.mathlive")])!=null||(window[b0]={});const a=window[Symbol.for("io.cortexjs.mathlive")];a.version="0.98.5",window.MathfieldElement=ch,(x0=window.customElements)==null||x0.define("math-field",ch)}function m1(a,y,b){let E=b,te=0;const le=a.length;for(;E<y.length;){const be=y[E];if(te<=0&&y.slice(E,E+le)===a)return E;be==="\\"?E++:be==="{"?te++:be==="}"&&te--,E++}return-1}function tf(a,y,b,E,te="latex"){const le=[];for(const be of a)if(be.type==="text"){const He=be.data;let Ye=!0,nt=0,dt;dt=He.indexOf(y),dt!==-1&&(nt=dt,nt>0&&le.push({type:"text",data:He.slice(0,nt)}),Ye=!1);let Mt=!1;for(;!Mt;){if(Ye){if(dt=He.indexOf(y,nt),dt===-1){Mt=!0;break}nt!==dt&&le.push({type:"text",data:He.slice(nt,dt)}),nt=dt}else{if(dt=m1(b,He,nt+y.length),dt===-1){Mt=!0;break}let Zt=He.slice(nt+y.length,dt);te==="ascii-math"&&([,Zt]=$u(Zt,{format:"ascii-math"})),le.push({type:"math",data:Zt,rawData:He.slice(nt,dt+b.length),mathstyle:E}),nt=dt+b.length}Ye=!Ye}nt<He.length&&le.push({type:"text",data:He.slice(nt)})}else le.push(be);return le}function S0(a,y,b){let E=[{type:"text",data:a}];return y!=null&&y.inline&&y.inline.forEach(([te,le])=>{E=tf(E,te,le,"textstyle")}),y!=null&&y.display&&y.display.forEach(([te,le])=>{E=tf(E,te,le,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([te,le])=>{E=tf(E,te,le,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([te,le])=>{E=tf(E,te,le,"displaystyle","ascii-math")}),E}function v1(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 g1(a,y,b,E){try{const te=y.renderToMarkup(a,{mathstyle:b,format:"html"}),le=document.createElement("span");return le.dataset.latex=a,le.style.display=b==="displaystyle"?"flex":"inline-flex",le.setAttribute("aria-hidden","true"),le.setAttribute("translate","no"),le.innerHTML=window.MathfieldElement.createHTML(te),le}catch(te){if(console.error("Could not parse'"+a+"' with ",te),E)return document.createTextNode(a)}return null}function Ld(a,y,b,E){var te;const le=g1(a,b,y||"textstyle",E),be=(te=b.renderAccessibleContent)!=null?te:"";if(le&&/\b(mathml|speakable-text)\b/i.test(be)){const He=document.createElement("span");if(/\bmathml\b/i.test(be)&&b.renderToMathML&&He.append(v1(a,b)),/\bspeakable-text\b/i.test(be)&&b.renderToSpeakableText){const Ye=document.createElement("span");Ye.setAttribute("translate","no");const nt=b.renderToSpeakableText(a);Ye.innerHTML=window.MathfieldElement.createHTML(nt),Ye.className="ML__sr-only",He.append(Ye)}return He.append(le),He}return le}function y1(a,y){var b,E,te;let le=null;if((b=y.TeX)!=null&&b.processEnvironments&&/^\s*\\begin/.test(a)){le=document.createDocumentFragment();const be=Ld(a,"",y,!0);be&&le.appendChild(be)}else{if(!a.trim())return null;const be=S0(a,(E=y.TeX)==null?void 0:E.delimiters,(te=y.asciiMath)==null?void 0:te.delimiters);if(be.length===1&&be[0].type==="text")return null;le=document.createDocumentFragment();for(const He of be)if(He.type==="text")le.appendChild(document.createTextNode(He.data));else{const Ye=Ld(He.data,He.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);Ye&&le.appendChild(Ye)}}return le}function C0(a,y){var b,E,te,le,be,He,Ye,nt,dt,Mt,Zt,sn,bn,Gn,Gr,Wn;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const yr=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(yr)){a.textContent="";const Ir=Ld(yr,"",y,!0);Ir&&a.append(Ir);return}const Qr=S0(yr,(te=y.TeX)==null?void 0:te.delimiters,(le=y.asciiMath)==null?void 0:le.delimiters);if(Qr.length===1&&Qr[0].type==="math"){a.textContent="";const Ir=Ld(Qr[0].data,Qr[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);Ir&&a.append(Ir);return}if(Qr.length===1&&Qr[0].type==="text")return}for(let yr=a.childNodes.length-1;yr>=0;yr--){const Qr=a.childNodes[yr];if(Qr.nodeType===3){const Ir=y1((be=Qr.textContent)!=null?be:"",y);Ir&&(yr+=Ir.childNodes.length-1,Qr.replaceWith(Ir))}else if(Qr.nodeType===1){const Ir=Qr,Ni=Qr.nodeName.toLowerCase();if(Ni==="script"){const Yi=Qr;let $i;if((He=y.processScriptTypePattern)!=null&&He.test(Yi.type))$i=(Ye=Yi.textContent)!=null?Ye:"";else if((nt=y.processMathJSONScriptTypePattern)!=null&&nt.test(Yi.type))try{$i=(Mt=y.serializeToLatex)==null?void 0:Mt.call(y,JSON.parse((dt=Yi.textContent)!=null?dt:""))}catch(Go){console.error(Go)}if($i){let Go="textstyle";for(const ci of Yi.type.split(";")){const[rc,Vc]=ci.toLowerCase().split("=");rc.trim()==="mode"&&(Go=Vc.trim()==="display"?"displaystyle":"textstyle")}const Ca=Ld($i,Go,y,!0);Ca&&Yi.parentNode.replaceChild(Ca,Yi)}}else if(((sn=(Zt=y.processClassPattern)==null?void 0:Zt.test(Ir.className))!=null?sn:!1)||!((Gn=(bn=y.skipTags)==null?void 0:bn.includes(Ni))!=null&&Gn||(Wn=(Gr=y.ignoreClassPattern)==null?void 0:Gr.test(Ir.className))!=null&&Wn))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const $i=a.textContent;a.textContent="";const Go=Ld($i!=null?$i:"","displaystyle",y,!0);Go&&a.append(Go)}else C0(Ir,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 _1(a,y){var b,E,te,le;try{const be=ae(ae({},b1),y);be.ignoreClassPattern=new RegExp((b=be.ignoreClass)!=null?b:""),be.processClassPattern=new RegExp((E=be.processClass)!=null?E:""),be.processScriptTypePattern=new RegExp((te=be.processScriptType)!=null?te:""),be.processMathJSONScriptTypePattern=new RegExp((le=be.processMathJSONScriptType)!=null?le:""),Ih(),Wl("core"),C0(a,be)}catch(be){be instanceof Error?console.error("renderMathInElement(): "+be.message):console.error("renderMathInElement(): Could not render math for element",a)}}function x1(a,y){const b=Mu.singleton;return b?(b.show(),qd(),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}Ul({switchKeyboardLayer:x1,toggleVirtualKeyboard:S1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function Du(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function A1(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function I1(a){w1(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 w1(a,y){var b,E,te,le;const be=C1(a);if(!be)return;const He=y!=null?y:{};(b=He.renderToMarkup)!=null||(He.renderToMarkup=js),(E=He.renderToMathML)!=null||(He.renderToMathML=Ng),(te=He.renderToSpeakableText)!=null||(He.renderToSpeakableText=Bg),(le=He.serializeToLatex)!=null||(He.serializeToLatex=Fg),_1(be,He)}var T1={mathlive:"0.98.5"}},16722:function(gn,kt,ee){"use strict";ee.d(kt,{Z:function(){return ae}});const ne=se=>typeof se=="object"&&se!=null&&se.nodeType===1,xe=(se,ve)=>(!ve||se!=="hidden")&&se!=="visible"&&se!=="clip",Me=(se,ve)=>{if(se.clientHeight<se.scrollHeight||se.clientWidth<se.scrollWidth){const ue=getComputedStyle(se,null);return xe(ue.overflowY,ve)||xe(ue.overflowX,ve)||(pe=>{const oe=(ge=>{if(!ge.ownerDocument||!ge.ownerDocument.defaultView)return null;try{return ge.ownerDocument.defaultView.frameElement}catch(ye){return null}})(pe);return!!oe&&(oe.clientHeight<pe.scrollHeight||oe.clientWidth<pe.scrollWidth)})(se)}return!1},Ce=(se,ve,ue,pe,oe,ge,ye,we)=>ge<se&&ye>ve||ge>se&&ye<ve?0:ge<=se&&we<=ue||ye>=ve&&we>=ue?ge-se-pe:ye>ve&&we<ue||ge<se&&we>ue?ye-ve+oe:0,fe=se=>{const ve=se.parentElement;return ve==null?se.getRootNode().host||null:ve},he=(se,ve)=>{var ue,pe,oe,ge;if(typeof document=="undefined")return[];const{scrollMode:ye,block:we,inline:Be,boundary:ze,skipOverflowHiddenElements:$e}=ve,Le=typeof ze=="function"?ze:Kt=>Kt!==ze;if(!ne(se))throw new TypeError("Invalid target");const Ne=document.scrollingElement||document.documentElement,Re=[];let Se=se;for(;ne(Se)&&Le(Se);){if(Se=fe(Se),Se===Ne){Re.push(Se);break}Se!=null&&Se===document.body&&Me(Se)&&!Me(document.documentElement)||Se!=null&&Me(Se,$e)&&Re.push(Se)}const Ie=(pe=(ue=window.visualViewport)==null?void 0:ue.width)!=null?pe:innerWidth,Ae=(ge=(oe=window.visualViewport)==null?void 0:oe.height)!=null?ge:innerHeight,{scrollX:it,scrollY:Ue}=window,{height:gt,width:Ve,top:Tt,right:ct,bottom:Ot,left:We}=se.getBoundingClientRect(),{top:lt,right:ut,bottom:St,left:qe}=(Kt=>{const _t=window.getComputedStyle(Kt);return{top:parseFloat(_t.scrollMarginTop)||0,right:parseFloat(_t.scrollMarginRight)||0,bottom:parseFloat(_t.scrollMarginBottom)||0,left:parseFloat(_t.scrollMarginLeft)||0}})(se);let Ze=we==="start"||we==="nearest"?Tt-lt:we==="end"?Ot+St:Tt+gt/2-lt+St,wt=Be==="center"?We+Ve/2-qe+ut:Be==="end"?ct+ut:We-qe;const Wt=[];for(let Kt=0;Kt<Re.length;Kt++){const _t=Re[Kt],{height:vt,width:jt,top:yn,right:Xt,bottom:Ln,left:pn}=_t.getBoundingClientRect();if(ye==="if-needed"&&Tt>=0&&We>=0&&Ot<=Ae&&ct<=Ie&&(_t===Ne&&!Me(_t)||Tt>=yn&&Ot<=Ln&&We>=pn&&ct<=Xt))return Wt;const hn=getComputedStyle(_t),un=parseInt(hn.borderLeftWidth,10),Xe=parseInt(hn.borderTopWidth,10),ke=parseInt(hn.borderRightWidth,10),_e=parseInt(hn.borderBottomWidth,10);let Te=0,Fe=0;const me="offsetWidth"in _t?_t.offsetWidth-_t.clientWidth-un-ke:0,at="offsetHeight"in _t?_t.offsetHeight-_t.clientHeight-Xe-_e:0,Pt="offsetWidth"in _t?_t.offsetWidth===0?0:jt/_t.offsetWidth:0,Qe="offsetHeight"in _t?_t.offsetHeight===0?0:vt/_t.offsetHeight:0;if(Ne===_t)Te=we==="start"?Ze:we==="end"?Ze-Ae:we==="nearest"?Ce(Ue,Ue+Ae,Ae,Xe,_e,Ue+Ze,Ue+Ze+gt,gt):Ze-Ae/2,Fe=Be==="start"?wt:Be==="center"?wt-Ie/2:Be==="end"?wt-Ie:Ce(it,it+Ie,Ie,un,ke,it+wt,it+wt+Ve,Ve),Te=Math.max(0,Te+Ue),Fe=Math.max(0,Fe+it);else{Te=we==="start"?Ze-yn-Xe:we==="end"?Ze-Ln+_e+at:we==="nearest"?Ce(yn,Ln,vt,Xe,_e+at,Ze,Ze+gt,gt):Ze-(yn+vt/2)+at/2,Fe=Be==="start"?wt-pn-un:Be==="center"?wt-(pn+jt/2)+me/2:Be==="end"?wt-Xt+ke+me:Ce(pn,Xt,jt,un,ke+me,wt,wt+Ve,Ve);const{scrollLeft:Je,scrollTop:xt}=_t;Te=Qe===0?0:Math.max(0,Math.min(xt+Te/Qe,_t.scrollHeight-vt/Qe+at)),Fe=Pt===0?0:Math.max(0,Math.min(Je+Fe/Pt,_t.scrollWidth-jt/Pt+me)),Ze+=xt-Te,wt+=Je-Fe}Wt.push({el:_t,top:Te,left:Fe})}return Wt},ce=se=>se===!1?{block:"end",inline:"nearest"}:(ve=>ve===Object(ve)&&Object.keys(ve).length!==0)(se)?se:{block:"start",inline:"nearest"};function ae(se,ve){if(!se.isConnected||!(oe=>{let ge=oe;for(;ge&&ge.parentNode;){if(ge.parentNode===document)return!0;ge=ge.parentNode instanceof ShadowRoot?ge.parentNode.host:ge.parentNode}return!1})(se))return;const ue=(oe=>{const ge=window.getComputedStyle(oe);return{top:parseFloat(ge.scrollMarginTop)||0,right:parseFloat(ge.scrollMarginRight)||0,bottom:parseFloat(ge.scrollMarginBottom)||0,left:parseFloat(ge.scrollMarginLeft)||0}})(se);if((oe=>typeof oe=="object"&&typeof oe.behavior=="function")(ve))return ve.behavior(he(se,ve));const pe=typeof ve=="boolean"||ve==null?void 0:ve.behavior;for(const{el:oe,top:ge,left:ye}of he(se,ce(ve))){const we=ge-ue.top+ue.bottom,Be=ye-ue.left+ue.right;oe.scroll({top:we,left:Be,behavior:pe})}}}}]);
}());