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

90 lines
347 KiB

This file contains ambiguous Unicode characters!

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

(self.webpackChunk=self.webpackChunk||[]).push([[5230],{40001:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return xe}});var P=f(54476),O=f(59301),x={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"},z=x,v=f(7657),F=function(y,Ie){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Ie,icon:z}))},A=O.forwardRef(F),xe=A},84105:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return xe}});var P=f(54476),O=f(59301),x={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"},z=x,v=f(7657),F=function(y,Ie){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Ie,icon:z}))},A=O.forwardRef(F),xe=A},73331:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return xe}});var P=f(54476),O=f(59301),x={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"},z=x,v=f(7657),F=function(y,Ie){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Ie,icon:z}))},A=O.forwardRef(F),xe=A},15277:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return xe}});var P=f(54476),O=f(59301),x={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"},z=x,v=f(7657),F=function(y,Ie){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Ie,icon:z}))},A=O.forwardRef(F),xe=A},61485:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return xe}});var P=f(54476),O=f(59301),x={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"},z=x,v=f(7657),F=function(y,Ie){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Ie,icon:z}))},A=O.forwardRef(F),xe=A},47472:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return xe}});var P=f(54476),O=f(59301),x={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"},z=x,v=f(7657),F=function(y,Ie){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Ie,icon:z}))},A=O.forwardRef(F),xe=A},76809:function(){"use strict"},17022:function(){"use strict"},4121:function(nn,Re,f){"use strict";f.d(Re,{t:function(){return B}});var P=f(59301),O=f(3113),x={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},z=f(92310),v=f.n(z),F=Object.defineProperty,A=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,y=(Se,Te,q)=>Te in Se?F(Se,Te,{enumerable:!0,configurable:!0,writable:!0,value:q}):Se[Te]=q,Ie=(Se,Te)=>{for(var q in Te||(Te={}))xe.call(Te,q)&&y(Se,q,Te[q]);if(A)for(var q of A(Te))ce.call(Te,q)&&y(Se,q,Te[q]);return Se};const B=({cancelText:Se="\u53D6\u6D88",okText:Te="\u786E\u5B9A",loading:q=!1,hasOkBtn:qe=!0,hasCancelBtn:rt=!0,okButtonProps:Ct={},onCancel:Mt=()=>{},onOk:oe=()=>{},className:Y=""})=>P.createElement("div",{className:v()(x.buttonFixed,Y)},P.createElement("div",{className:x.buttonWrap},rt&&P.createElement(O.ZP,{size:"middle",className:`${x.button} mr20`,onClick:Mt},Se),qe&&P.createElement(O.ZP,Ie({size:"middle",type:"primary",className:`${x.button} mr20`,loading:q,onClick:oe},Ct),Te)))},62319:function(nn,Re,f){"use strict";f.d(Re,{h:function(){return Y}});var P=f(59301),O=f(57809),x=f(78241),z=f(3113),v=f(89780),F=f.n(v),A=f(76809),xe=f(17022),ce=Object.defineProperty,y=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,q=(S,c,b)=>c in S?ce(S,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):S[c]=b,qe=(S,c)=>{for(var b in c||(c={}))Se.call(c,b)&&q(S,b,c[b]);if(B)for(var b of B(c))Te.call(c,b)&&q(S,b,c[b]);return S},rt=(S,c)=>y(S,Ie(c));const Ct=O.default.Option,Mt={labelCol:{span:4},wrapperCol:{span:20}},oe={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"]};Re.Z=({callback:S,onCancel:c})=>{const[b,I]=(0,P.useState)("python");function k(Ee){I(oe[Ee][1])}function D(Ee){S(Ee)}return P.createElement(x.default,rt(qe({},Mt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:D,style:{width:500}}),P.createElement(x.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},P.createElement(O.default,{getPopupContainer:Ee=>Ee.parentNode,onChange:k},Object.keys(oe).map(Ee=>P.createElement(Ct,{key:Ee,value:Ee},oe[Ee][0])))),P.createElement(x.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},P.createElement(Y,{mode:b})),P.createElement("div",{className:"flex-container flex-end"},P.createElement(z.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),P.createElement(z.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function Y({value:S,onChange:c,mode:b,options:I={}}){const k=(0,P.useRef)(),[D,Ee]=(0,P.useState)();return(0,P.useEffect)(()=>{if(D){let Ue=function($e){const Oe=$e.getValue();c&&c(Oe)};return D.on("change",Ue),()=>{D.off("change",Ue)}}},[D,c]),(0,P.useEffect)(()=>{D&&D.setOption("mode",b)},[D,b]),(0,P.useEffect)(()=>{D&&(S!==D.getValue()||S==="")&&setTimeout(()=>{D.setValue(S||"")},300)},[D,S]),(0,P.useEffect)(()=>{if(k.current&&!D){const Ue=F().fromTextArea(k.current,qe({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},I));Ee(Ue)}},[k.current,D]),P.createElement("div",{className:"my-codemirror-container"},P.createElement("textarea",{ref:k}))}},32301:function(nn,Re,f){"use strict";f.r(Re),f.d(Re,{default:function(){return ye}});var P=f(39587),O=f(59301),x=f(90115),z=f(78241),v=f(92832),F=f(62319),A=f(4121),xe={bg:"bg___RM4en",wrap:"wrap___ne3nd",title:"title___Nr8TZ",path:"path___mVozd",colorBlue:"colorBlue___jBwMu",width240:"width240___XDhtB"},ce=Object.defineProperty,y=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,Se=(N,L,V)=>L in N?ce(N,L,{enumerable:!0,configurable:!0,writable:!0,value:V}):N[L]=V,Te=(N,L)=>{for(var V in L||(L={}))Ie.call(L,V)&&Se(N,V,L[V]);if(y)for(var V of y(L))B.call(L,V)&&Se(N,V,L[V]);return N},q=(N,L)=>{var V={};for(var Me in N)Ie.call(N,Me)&&L.indexOf(Me)<0&&(V[Me]=N[Me]);if(N!=null&&y)for(var Me of y(N))L.indexOf(Me)<0&&B.call(N,Me)&&(V[Me]=N[Me]);return V},qe=(N,L,V)=>new Promise((Me,it)=>{var Ze=R=>{try{_e(V.next(R))}catch(he){it(he)}},ot=R=>{try{_e(V.throw(R))}catch(he){it(he)}},_e=R=>R.done?Me(R.value):Promise.resolve(R.value).then(Ze,ot);_e((V=V.apply(N,L)).next())});const rt=N=>{var L=N,{shixunsDetail:V,globalSetting:Me,loading:it,user:Ze,dispatch:ot}=L,_e=q(L,["shixunsDetail","globalSetting","loading","user","dispatch"]);const R=(0,x.useLocation)(),[he,ae]=(0,O.useState)({}),j=(0,O.useRef)(),X=(0,O.useRef)(),[le]=z.default.useForm(),[Q,ue]=(0,O.useState)("");(0,O.useEffect)(()=>(ot({type:"globalSetting/footerToggle",payload:!1}),()=>{ot({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,O.useEffect)(()=>{const re=sessionStorage.getItem("pathArray");if(re){const W=re.split(",").join("/"),be=W.indexOf("/")===0?W.substr(1):W;ue(be)}},[]),(0,O.useEffect)(()=>{var re,W,be,ve;X.current=(W=(re=R.pathname)==null?void 0:re.split("/"))==null?void 0:W[2],j.current=((ve=(be=R.pathname)==null?void 0:be.split("/"))==null?void 0:ve[3])==="repository"},[]);const Le=(...re)=>qe(void 0,[...re],function*(W={}){if(yield ot({type:"shixunsDetail/addRepositoryFile",payload:{id:X.current,message:W.commitMessage,content:W.codeMirror,path:`${Q?`${Q}/`:""}${W.path||""}`,secret_repository:j.current?void 0:!0}})){const ve=j.current?`/shixuns/${X.current}/repository${Q?`/master/shixun_show/${Q}`:""}`:`/shixuns/${X.current}/secret_repository`;x.history.replace(ve)}}),ee=()=>{var re,W;x.history.push(`/shixuns/${X.current}/${(W=(re=R.pathname)==null?void 0:re.split("/"))==null?void 0:W[3]}${Q?`/master/shixun_show/${Q}`:""}`)};return O.createElement("section",{className:xe.bg},O.createElement("div",{className:xe.wrap},O.createElement("div",{className:xe.title},"\u65B0\u5EFA\u6587\u4EF6"),O.createElement(z.default,{className:"mt10",form:le,scrollToFirstError:!0,layout:"vertical",onFinish:Le,onValuesChange:()=>ae(Te({},le.getFieldsValue()))},O.createElement(z.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},O.createElement(z.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},O.createElement("span",null,O.createElement("span",{className:"mr5"},Q?`${Q}/`:""),O.createElement(v.default,{className:xe.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),O.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),O.createElement(z.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},O.createElement(v.default,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),O.createElement("div",{className:"mt10 mb20"},O.createElement(z.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},O.createElement(F.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),O.createElement(z.default.Item,{noStyle:!0},O.createElement(A.t,{okButtonProps:{htmlType:"submit"},onCancel:ee})))))};var Ct=(0,x.connect)(({shixunsDetail:N,loading:L,globalSetting:V,user:Me})=>({shixunsDetail:N,globalSetting:V,user:Me,loading:L.models.index}))(rt),Mt={bg:"bg___hW0a5",wrap:"wrap___qsjmY",title:"title___TYQ3w",path:"path___J3ICf",colorBlue:"colorBlue___r1F5X",width240:"width240___Vbbdg"},oe=Object.defineProperty,Y=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,b=(N,L,V)=>L in N?oe(N,L,{enumerable:!0,configurable:!0,writable:!0,value:V}):N[L]=V,I=(N,L)=>{for(var V in L||(L={}))S.call(L,V)&&b(N,V,L[V]);if(Y)for(var V of Y(L))c.call(L,V)&&b(N,V,L[V]);return N},k=(N,L)=>{var V={};for(var Me in N)S.call(N,Me)&&L.indexOf(Me)<0&&(V[Me]=N[Me]);if(N!=null&&Y)for(var Me of Y(N))L.indexOf(Me)<0&&c.call(N,Me)&&(V[Me]=N[Me]);return V},D=(N,L,V)=>new Promise((Me,it)=>{var Ze=R=>{try{_e(V.next(R))}catch(he){it(he)}},ot=R=>{try{_e(V.throw(R))}catch(he){it(he)}},_e=R=>R.done?Me(R.value):Promise.resolve(R.value).then(Ze,ot);_e((V=V.apply(N,L)).next())});const Ee=N=>{var L=N,{shixunsDetail:V,globalSetting:Me,loading:it,user:Ze,dispatch:ot}=L,_e=k(L,["shixunsDetail","globalSetting","loading","user","dispatch"]);const R=(0,x.useLocation)(),[he,ae]=(0,O.useState)({}),j=(0,O.useRef)(),X=(0,O.useRef)(),[le]=z.default.useForm(),[Q,ue]=(0,O.useState)("");(0,O.useEffect)(()=>(ot({type:"globalSetting/footerToggle",payload:!1}),()=>{ot({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,O.useEffect)(()=>{const re=sessionStorage.getItem("pathArray");if(re){const W=re.split(",").join("/"),be=W.indexOf("/")===0?W.substr(1):W;ue(be)}},[]),(0,O.useEffect)(()=>{var re,W,be,ve;X.current=(W=(re=R.pathname)==null?void 0:re.split("/"))==null?void 0:W[2],j.current=((ve=(be=R.pathname)==null?void 0:be.split("/"))==null?void 0:ve[3])==="repository"},[]);const Le=(...re)=>D(void 0,[...re],function*(W={}){if(yield ot({type:"shixunsDetail/addRepositoryFile",payload:{id:X.current,message:W.commitMessage,content:W.codeMirror,path:`${Q?`${Q}/`:""}${W.path||""}`,secret_repository:j.current?void 0:!0}})){const ve=j.current?`/shixuns/${X.current}/repository${Q?`/master/shixun_show/${Q}`:""}`:`/shixuns/${X.current}/secret_repository`;x.history.replace(ve)}}),ee=()=>{var re,W;x.history.push(`/shixuns/${X.current}/${(W=(re=R.pathname)==null?void 0:re.split("/"))==null?void 0:W[3]}${Q?`/master/shixun_show/${Q}`:""}`)};return O.createElement("section",{className:Mt.bg},O.createElement("div",{className:Mt.wrap},O.createElement("div",{className:Mt.title},"\u65B0\u5EFA\u6587\u4EF6"),O.createElement(z.default,{className:"mt10",form:le,scrollToFirstError:!0,layout:"vertical",onFinish:Le,onValuesChange:()=>ae(I({},le.getFieldsValue()))},O.createElement(z.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},O.createElement(z.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},O.createElement("span",null,O.createElement("span",{className:"mr5"},Q?`${Q}/`:""),O.createElement(v.default,{className:Mt.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),O.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),O.createElement(z.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},O.createElement(v.default,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),O.createElement("div",{className:"mt10 mb20"},O.createElement(z.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},O.createElement(F.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),O.createElement(z.default.Item,{noStyle:!0},O.createElement(A.t,{okButtonProps:{htmlType:"submit"},onCancel:ee})))))};var Ue=(0,x.connect)(({shixunsDetail:N,loading:L,globalSetting:V,user:Me})=>({shixunsDetail:N,globalSetting:V,user:Me,loading:L.models.index}))(Ee),$e={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},Oe=Object.defineProperty,yt=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,ge=(N,L,V)=>L in N?Oe(N,L,{enumerable:!0,configurable:!0,writable:!0,value:V}):N[L]=V,G=(N,L)=>{for(var V in L||(L={}))Ye.call(L,V)&&ge(N,V,L[V]);if(yt)for(var V of yt(L))Qe.call(L,V)&&ge(N,V,L[V]);return N},me=(N,L)=>{var V={};for(var Me in N)Ye.call(N,Me)&&L.indexOf(Me)<0&&(V[Me]=N[Me]);if(N!=null&&yt)for(var Me of yt(N))L.indexOf(Me)<0&&Qe.call(N,Me)&&(V[Me]=N[Me]);return V},fe=(N,L,V)=>new Promise((Me,it)=>{var Ze=R=>{try{_e(V.next(R))}catch(he){it(he)}},ot=R=>{try{_e(V.throw(R))}catch(he){it(he)}},_e=R=>R.done?Me(R.value):Promise.resolve(R.value).then(Ze,ot);_e((V=V.apply(N,L)).next())});const se=N=>{var L=N,{shixunsDetail:V,globalSetting:Me,loading:it,user:Ze,dispatch:ot}=L,_e=me(L,["shixunsDetail","globalSetting","loading","user","dispatch"]);const R=(0,x.useLocation)(),[he,ae]=(0,O.useState)({}),j=(0,O.useRef)(),X=(0,O.useRef)(),[le]=z.default.useForm(),[Q,ue]=(0,O.useState)("");(0,O.useEffect)(()=>(ot({type:"globalSetting/footerToggle",payload:!1}),()=>{ot({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,O.useEffect)(()=>{const re=sessionStorage.getItem("pathArray");if(re){const W=re.split(",").join("/"),be=W.indexOf("/")===0?W.substr(1):W;ue(be)}},[]),(0,O.useEffect)(()=>{var re,W,be,ve;X.current=(W=(re=R.pathname)==null?void 0:re.split("/"))==null?void 0:W[2],j.current=((ve=(be=R.pathname)==null?void 0:be.split("/"))==null?void 0:ve[3])==="repository"},[]);const Le=(...re)=>fe(void 0,[...re],function*(W={}){if(yield ot({type:"shixunsDetail/addRepositoryFile",payload:{id:X.current,message:W.commitMessage,content:W.codeMirror,path:`${Q?`${Q}/`:""}${W.path||""}`,secret_repository:j.current?void 0:!0}})){const ve=j.current?`/shixuns/${X.current}/repository${Q?`/master/shixun_show/${Q}`:""}`:`/shixuns/${X.current}/secret_repository`;x.history.replace(ve)}}),ee=()=>{var re,W;x.history.push(`/shixuns/${X.current}/${(W=(re=R.pathname)==null?void 0:re.split("/"))==null?void 0:W[3]}${Q?`/master/shixun_show/${Q}`:""}`)};return O.createElement("section",{className:$e.bg},O.createElement("div",{className:$e.wrap},O.createElement("div",{className:$e.title},"\u65B0\u5EFA\u6587\u4EF6"),O.createElement(z.default,{className:"mt10",form:le,scrollToFirstError:!0,layout:"vertical",onFinish:Le,onValuesChange:()=>ae(G({},le.getFieldsValue()))},O.createElement(z.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},O.createElement(z.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},O.createElement("span",null,O.createElement("span",{className:"mr5"},Q?`${Q}/`:""),O.createElement(v.default,{className:$e.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),O.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),O.createElement(z.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},O.createElement(v.default,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),O.createElement("div",{className:"mt10 mb20"},O.createElement(z.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},O.createElement(F.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),O.createElement(z.default.Item,{noStyle:!0},O.createElement(A.t,{okButtonProps:{htmlType:"submit"},onCancel:ee})))))};var ke=(0,x.connect)(({shixunsDetail:N,loading:L,globalSetting:V,user:Me})=>({shixunsDetail:N,globalSetting:V,user:Me,loading:L.models.index}))(se);const Be=({globalSetting:N})=>{var L;switch(Number((L=N==null?void 0:N.setting)==null?void 0:L.theme)){case P.Fy.THEMEONE:return O.createElement(Ct,null);case P.Fy.THEMETWO:return O.createElement(Ue,null);case P.Fy.DEFAULT:default:return O.createElement(ke,null)}};var ye=(0,x.connect)(({globalSetting:N})=>({globalSetting:N}))(Be)},19080:function(nn,Re,f){"use strict";f.d(Re,{F:function(){return v},Z:function(){return z}});var P=f(92310),O=f.n(P);const x=null;function z(F,A,xe){return O()({[`${F}-status-success`]:A==="success",[`${F}-status-warning`]:A==="warning",[`${F}-status-error`]:A==="error",[`${F}-status-validating`]:A==="validating",[`${F}-has-feedback`]:xe})}const v=(F,A)=>A||F},93891:function(nn,Re,f){"use strict";var P=f(59301),O=f(36355),x=f(64165);const z=v=>{const{componentName:F}=v,{getPrefixCls:A}=(0,P.useContext)(O.E_),xe=A("empty");switch(F){case"Table":case"List":return P.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return P.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE,className:`${xe}-small`});default:return P.createElement(x.Z,null)}};Re.Z=z},64165:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return oe}});var P=f(92310),O=f.n(P),x=f(59301),z=f(36355),v=f(9763),F=f(64993),A=f(88088),ce=()=>{const[,Y]=(0,A.Z)(),c=new F.C(Y.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return x.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{fill:"none",fillRule:"evenodd"},x.createElement("g",{transform:"translate(24 31.67)"},x.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),x.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"}),x.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)"}),x.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"}),x.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"})),x.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"}),x.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},x.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),x.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ie=()=>{const[,Y]=(0,A.Z)(),{colorFill:S,colorFillTertiary:c,colorFillQuaternary:b,colorBgContainer:I}=Y,{borderColor:k,shadowColor:D,contentColor:Ee}=(0,x.useMemo)(()=>({borderColor:new F.C(S).onBackground(I).toHexShortString(),shadowColor:new F.C(c).onBackground(I).toHexShortString(),contentColor:new F.C(b).onBackground(I).toHexShortString()}),[S,c,b,I]);return x.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},x.createElement("ellipse",{fill:D,cx:"32",cy:"33",rx:"32",ry:"7"}),x.createElement("g",{fillRule:"nonzero",stroke:k},x.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"}),x.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:Ee}))))},B=f(83116),Se=f(37613);const Te=Y=>{const{componentCls:S,margin:c,marginXS:b,marginXL:I,fontSize:k,lineHeight:D}=Y;return{[S]:{marginInline:b,fontSize:k,lineHeight:D,textAlign:"center",[`${S}-image`]:{height:Y.emptyImgHeight,marginBottom:b,opacity:Y.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${S}-description`]:{color:Y.colorText},[`${S}-footer`]:{marginTop:c},"&-normal":{marginBlock:I,color:Y.colorTextDisabled,[`${S}-description`]:{color:Y.colorTextDisabled},[`${S}-image`]:{height:Y.emptyImgHeightMD}},"&-small":{marginBlock:b,color:Y.colorTextDisabled,[`${S}-image`]:{height:Y.emptyImgHeightSM}}}}};var q=(0,B.Z)("Empty",Y=>{const{componentCls:S,controlHeightLG:c}=Y,b=(0,Se.TS)(Y,{emptyImgCls:`${S}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Te(b)]}),qe=function(Y,S){var c={};for(var b in Y)Object.prototype.hasOwnProperty.call(Y,b)&&S.indexOf(b)<0&&(c[b]=Y[b]);if(Y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,b=Object.getOwnPropertySymbols(Y);I<b.length;I++)S.indexOf(b[I])<0&&Object.prototype.propertyIsEnumerable.call(Y,b[I])&&(c[b[I]]=Y[b[I]]);return c};const rt=x.createElement(ce,null),Ct=x.createElement(Ie,null),Mt=Y=>{var{className:S,rootClassName:c,prefixCls:b,image:I=rt,description:k,children:D,imageStyle:Ee,style:Ue}=Y,$e=qe(Y,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Oe,direction:yt,empty:Ye}=x.useContext(z.E_),Qe=Oe("empty",b),[ge,G]=q(Qe),[me]=(0,v.Z)("Empty"),fe=typeof k!="undefined"?k:me==null?void 0:me.description,se=typeof fe=="string"?fe:"empty";let ke=null;return typeof I=="string"?ke=x.createElement("img",{alt:se,src:I}):ke=I,ge(x.createElement("div",Object.assign({className:O()(G,Qe,Ye==null?void 0:Ye.className,{[`${Qe}-normal`]:I===Ct,[`${Qe}-rtl`]:yt==="rtl"},S,c),style:Object.assign(Object.assign({},Ye==null?void 0:Ye.style),Ue)},$e),x.createElement("div",{className:`${Qe}-image`,style:Ee},ke),fe&&x.createElement("div",{className:`${Qe}-description`},fe),D&&x.createElement("div",{className:`${Qe}-footer`},D)))};Mt.PRESENTED_IMAGE_DEFAULT=rt,Mt.PRESENTED_IMAGE_SIMPLE=Ct;var oe=Mt},78241:function(nn,Re,f){"use strict";f.d(Re,{default:function(){return Kt}});var P=f(94480),O=f(92310),x=f.n(O),z=f(77900),v=f(59301),F=f(62892),A=f(32441);function xe(m){const[$,Z]=v.useState(m);return v.useEffect(()=>{const h=setTimeout(()=>{Z(m)},m.length?0:10);return()=>{clearTimeout(h)}},[m]),$}var ce=f(17313),y=f(29878),Ie=f(8378),B=f(37613),Se=f(83116),q=m=>{const{componentCls:$}=m,Z=`${$}-show-help`,h=`${$}-show-help-item`;return{[Z]:{transition:`opacity ${m.motionDurationSlow} ${m.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[h]:{overflow:"hidden",transition:`height ${m.motionDurationSlow} ${m.motionEaseInOut},
opacity ${m.motionDurationSlow} ${m.motionEaseInOut},
transform ${m.motionDurationSlow} ${m.motionEaseInOut} !important`,[`&${h}-appear, &${h}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${h}-leave-active`]:{transform:"translateY(-5px)"}}}}};const qe=m=>({legend:{display:"block",width:"100%",marginBottom:m.marginLG,padding:0,color:m.colorTextDescription,fontSize:m.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${m.lineWidth}px ${m.lineType} ${m.colorBorder}`},label:{fontSize:m.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 ${m.controlOutlineWidth}px ${m.controlOutline}`},output:{display:"block",paddingTop:15,color:m.colorText,fontSize:m.fontSize,lineHeight:m.lineHeight}}),rt=(m,$)=>{const{formItemCls:Z}=m;return{[Z]:{[`${Z}-label > label`]:{height:$},[`${Z}-control-input`]:{minHeight:$}}}},Ct=m=>{const{componentCls:$}=m;return{[m.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(m)),qe(m)),{[`${$}-text`]:{display:"inline-block",paddingInlineEnd:m.paddingSM},"&-small":Object.assign({},rt(m,m.controlHeightSM)),"&-large":Object.assign({},rt(m,m.controlHeightLG))})}},Mt=m=>{const{formItemCls:$,iconCls:Z,componentCls:h,rootPrefixCls:d,labelRequiredMarkColor:C,labelColor:T,labelFontSize:ie,labelHeight:H,labelColonMarginInlineStart:_,labelColonMarginInlineEnd:de,itemMarginBottom:pe}=m;return{[$]:Object.assign(Object.assign({},(0,ce.Wf)(m)),{marginBottom:pe,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${d}-row`]:{display:"none"},"&-has-warning":{[`${$}-split`]:{color:m.colorError}},"&-has-error":{[`${$}-split`]:{color:m.colorWarning}},[`${$}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${m.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:H,color:T,fontSize:ie,[`> ${Z}`]:{fontSize:m.fontSize,verticalAlign:"top"},[`&${$}-required:not(${$}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:m.marginXXS,color:C,fontSize:m.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${h}-hide-required-mark &`]:{display:"none"}},[`${$}-optional`]:{display:"inline-block",marginInlineStart:m.marginXXS,color:m.colorTextDescription,[`${h}-hide-required-mark &`]:{display:"none"}},[`${$}-tooltip`]:{color:m.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:m.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:_,marginInlineEnd:de},[`&${$}-no-colon::after`]:{content:'"\\a0"'}}},[`${$}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${d}-col-'"]):not([class*="' ${d}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:m.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[$]:{"&-explain, &-extra":{clear:"both",color:m.colorTextDescription,fontSize:m.fontSize,lineHeight:m.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:m.controlHeightSM,transition:`color ${m.motionDurationMid} ${m.motionEaseOut}`},"&-explain":{"&-error":{color:m.colorError},"&-warning":{color:m.colorWarning}}},[`&-with-help ${$}-explain`]:{height:"auto",opacity:1},[`${$}-feedback-icon`]:{fontSize:m.fontSize,textAlign:"center",visibility:"visible",animationName:y.kr,animationDuration:m.motionDurationMid,animationTimingFunction:m.motionEaseOutBack,pointerEvents:"none","&-success":{color:m.colorSuccess},"&-error":{color:m.colorError},"&-warning":{color:m.colorWarning},"&-validating":{color:m.colorPrimary}}})}},oe=m=>{const{componentCls:$,formItemCls:Z}=m;return{[`${$}-horizontal`]:{[`${Z}-label`]:{flexGrow:0},[`${Z}-control`]:{flex:"1 1 0",minWidth:0},[`${Z}-label[class$='-24'], ${Z}-label[class*='-24 ']`]:{[`& + ${Z}-control`]:{minWidth:"unset"}}}}},Y=m=>{const{componentCls:$,formItemCls:Z}=m;return{[`${$}-inline`]:{display:"flex",flexWrap:"wrap",[Z]:{flex:"none",marginInlineEnd:m.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Z}-label,
> ${Z}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Z}-label`]:{flex:"none"},[`${$}-text`]:{display:"inline-block"},[`${Z}-has-feedback`]:{display:"inline-block"}}}}},S=m=>({padding:m.verticalLabelPadding,margin:m.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=m=>{const{componentCls:$,formItemCls:Z,rootPrefixCls:h}=m;return{[`${Z} ${Z}-label`]:S(m),[$]:{[Z]:{flexWrap:"wrap",[`${Z}-label, ${Z}-control`]:{[`&:not([class*=" ${h}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},b=m=>{const{componentCls:$,formItemCls:Z,rootPrefixCls:h}=m;return{[`${$}-vertical`]:{[Z]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${$}-item-control`]:{width:"100%"}}},[`${$}-vertical ${Z}-label,
.${h}-col-24${Z}-label,
.${h}-col-xl-24${Z}-label`]:S(m),[`@media (max-width: ${m.screenXSMax}px)`]:[c(m),{[$]:{[`.${h}-col-xs-24${Z}-label`]:S(m)}}],[`@media (max-width: ${m.screenSMMax}px)`]:{[$]:{[`.${h}-col-sm-24${Z}-label`]:S(m)}},[`@media (max-width: ${m.screenMDMax}px)`]:{[$]:{[`.${h}-col-md-24${Z}-label`]:S(m)}},[`@media (max-width: ${m.screenLGMax}px)`]:{[$]:{[`.${h}-col-lg-24${Z}-label`]:S(m)}}}},I=(m,$)=>(0,B.TS)(m,{formItemCls:`${m.componentCls}-item`,rootPrefixCls:$});var k=(0,Se.Z)("Form",(m,$)=>{let{rootPrefixCls:Z}=$;const h=I(m,Z);return[Ct(h),Mt(h),q(h),oe(h),Y(h),b(h),(0,Ie.Z)(h),y.kr]},m=>({labelRequiredMarkColor:m.colorError,labelColor:m.colorTextHeading,labelFontSize:m.fontSize,labelHeight:m.controlHeight,labelColonMarginInlineStart:m.marginXXS/2,labelColonMarginInlineEnd:m.marginXS,itemMarginBottom:m.marginLG,verticalLabelPadding:`0 0 ${m.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const D=[];function Ee(m,$,Z){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof m=="string"?m:`${$}-${h}`,error:m,errorStatus:Z}}var $e=m=>{let{help:$,helpStatus:Z,errors:h=D,warnings:d=D,className:C,fieldId:T,onVisibleChanged:ie}=m;const{prefixCls:H}=v.useContext(A.Rk),_=`${H}-item-explain`,[,de]=k(H),pe=(0,v.useMemo)(()=>(0,F.Z)(H),[H]),ze=xe(h),M=xe(d),U=v.useMemo(()=>$!=null?[Ee($,"help",Z)]:[].concat((0,P.Z)(ze.map((Ce,je)=>Ee(Ce,"error","error",je))),(0,P.Z)(M.map((Ce,je)=>Ee(Ce,"warning","warning",je)))),[$,Z,ze,M]),Je={};return T&&(Je.id=`${T}_help`),v.createElement(z.default,{motionDeadline:pe.motionDeadline,motionName:`${H}-show-help`,visible:!!U.length,onVisibleChanged:ie},Ce=>{const{className:je,style:Pe}=Ce;return v.createElement("div",Object.assign({},Je,{className:x()(_,je,C,de),style:Pe,role:"alert"}),v.createElement(z.CSSMotionList,Object.assign({keys:U},(0,F.Z)(H),{motionName:`${H}-show-help-item`,component:!1}),ut=>{const{key:ne,error:et,errorStatus:St,className:Lt,style:nt}=ut;return v.createElement("div",{key:ne,className:x()(Lt,{[`${_}-${St}`]:St}),style:nt},et)}))})},Oe=f(95013),yt=f(36355),Ye=f(1684),Qe=f(52946),ge=f(19716),G=f(16722);const me=["parentNode"],fe="form_item";function se(m){return m===void 0||m===!1?[]:Array.isArray(m)?m:[m]}function ke(m,$){if(!m.length)return;const Z=m.join("_");return $?`${$}_${Z}`:me.includes(Z)?`${fe}_${Z}`:Z}function Be(m,$,Z,h,d,C){let T=h;return C!==void 0?T=C:Z.validating?T="validating":m.length?T="error":$.length?T="warning":(Z.touched||d&&Z.validated)&&(T="success"),T}function ye(m){return se(m).join("_")}function N(m){const[$]=(0,Oe.useForm)(),Z=v.useRef({}),h=v.useMemo(()=>m!=null?m:Object.assign(Object.assign({},$),{__INTERNAL__:{itemRef:d=>C=>{const T=ye(d);C?Z.current[T]=C:delete Z.current[T]}},scrollToField:function(d){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const T=se(d),ie=ke(T,h.__INTERNAL__.name),H=ie?document.getElementById(ie):null;H&&(0,G.Z)(H,Object.assign({scrollMode:"if-needed",block:"nearest"},C))},getFieldInstance:d=>{const C=ye(d);return Z.current[C]}}),[m,$]);return[h]}var L=f(28726),V=function(m,$){var Z={};for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&$.indexOf(h)<0&&(Z[h]=m[h]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(m);d<h.length;d++)$.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(m,h[d])&&(Z[h[d]]=m[h[d]]);return Z};const Me=(m,$)=>{const Z=v.useContext(Ye.Z),{getPrefixCls:h,direction:d,form:C}=v.useContext(yt.E_),{prefixCls:T,className:ie,rootClassName:H,size:_,disabled:de=Z,form:pe,colon:ze,labelAlign:M,labelWrap:U,labelCol:Je,wrapperCol:Ce,hideRequiredMark:je,layout:Pe="horizontal",scrollToFirstError:ut,requiredMark:ne,onFinishFailed:et,name:St,style:Lt,feedbackIcons:nt}=m,gt=V(m,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Bt=(0,ge.Z)(_),De=v.useContext(L.Z),Ge=(0,v.useMemo)(()=>ne!==void 0?ne:C&&C.requiredMark!==void 0?C.requiredMark:!je,[je,ne,C]),ct=ze!=null?ze:C==null?void 0:C.colon,pt=h("form",T),[Wt,kt]=k(pt),Gt=x()(pt,`${pt}-${Pe}`,{[`${pt}-hide-required-mark`]:Ge===!1,[`${pt}-rtl`]:d==="rtl",[`${pt}-${Bt}`]:Bt},kt,C==null?void 0:C.className,ie,H),[Vt]=N(pe),{__INTERNAL__:Dt}=Vt;Dt.name=St;const It=(0,v.useMemo)(()=>({name:St,labelAlign:M,labelCol:Je,labelWrap:U,wrapperCol:Ce,vertical:Pe==="vertical",colon:ct,requiredMark:Ge,itemRef:Dt.itemRef,form:Vt,feedbackIcons:nt}),[St,M,Je,Ce,Pe,ct,Ge,Vt,nt]);v.useImperativeHandle($,()=>Vt);const zt=(cn,Ft)=>{if(cn){let Ht={block:"nearest"};typeof cn=="object"&&(Ht=cn),Vt.scrollToField(Ft,Ht)}},Rt=cn=>{if(et==null||et(cn),cn.errorFields.length){const Ft=cn.errorFields[0].name;if(ut!==void 0){zt(ut,Ft);return}C&&C.scrollToFirstError!==void 0&&zt(C.scrollToFirstError,Ft)}};return Wt(v.createElement(Ye.n,{disabled:de},v.createElement(Qe.q,{size:Bt},v.createElement(A.RV,Object.assign({},{validateMessages:De}),v.createElement(A.q3.Provider,{value:It},v.createElement(Oe.default,Object.assign({id:St},gt,{name:St,onFinishFailed:Rt,form:Vt,style:Object.assign(Object.assign({},C==null?void 0:C.style),Lt),className:Gt})))))))};var Ze=v.forwardRef(Me),ot=f(41799),_e=f(8654),R=f(92343),he=f(11592);function ae(m){if(typeof m=="function")return m;const $=(0,he.Z)(m);return $.length<=1?$[0]:$}const j=()=>{const{status:m,errors:$=[],warnings:Z=[]}=(0,v.useContext)(A.aM);return{status:m,errors:$,warnings:Z}};j.Context=A.aM;var X=j,le=f(16089);function Q(m){const[$,Z]=v.useState(m),h=(0,v.useRef)(null),d=(0,v.useRef)([]),C=(0,v.useRef)(!1);v.useEffect(()=>(C.current=!1,()=>{C.current=!0,le.Z.cancel(h.current),h.current=null}),[]);function T(ie){C.current||(h.current===null&&(d.current=[],h.current=(0,le.Z)(()=>{h.current=null,Z(H=>{let _=H;return d.current.forEach(de=>{_=de(_)}),_})})),d.current.push(ie))}return[$,T]}function ue(){const{itemRef:m}=v.useContext(A.q3),$=v.useRef({});function Z(h,d){const C=d&&typeof d=="object"&&d.ref,T=h.join("_");return($.current.name!==T||$.current.originRef!==C)&&($.current.name=T,$.current.originRef=C,$.current.ref=(0,_e.sQ)(m(h),C)),$.current.ref}return Z}var Le=f(29194),ee=f(34280),re=f(2738),W=f(27382),be=f(37028);const ve=m=>{const{formItemCls:$}=m;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${$}-control`]:{display:"flex"}}}};var Ne=(0,Se.b)(["Form","item-item"],(m,$)=>{let{rootPrefixCls:Z}=$;const h=I(m,Z);return[ve(h)]}),J=m=>{const{prefixCls:$,status:Z,wrapperCol:h,children:d,errors:C,warnings:T,_internalItemRender:ie,extra:H,help:_,fieldId:de,marginBottom:pe,onErrorVisibleChanged:ze}=m,M=`${$}-item`,U=v.useContext(A.q3),Je=h||U.wrapperCol||{},Ce=x()(`${M}-control`,Je.className),je=v.useMemo(()=>Object.assign({},U),[U]);delete je.labelCol,delete je.wrapperCol;const Pe=v.createElement("div",{className:`${M}-control-input`},v.createElement("div",{className:`${M}-control-input-content`},d)),ut=v.useMemo(()=>({prefixCls:$,status:Z}),[$,Z]),ne=pe!==null||C.length||T.length?v.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},v.createElement(A.Rk.Provider,{value:ut},v.createElement($e,{fieldId:de,errors:C,warnings:T,help:_,helpStatus:Z,className:`${M}-explain-connected`,onVisibleChanged:ze})),!!pe&&v.createElement("div",{style:{width:0,height:pe}})):null,et={};de&&(et.id=`${de}_extra`);const St=H?v.createElement("div",Object.assign({},et,{className:`${M}-extra`}),H):null,Lt=ie&&ie.mark==="pro_table_render"&&ie.render?ie.render(m,{input:Pe,errorList:ne,extra:St}):v.createElement(v.Fragment,null,Pe,ne,St);return v.createElement(A.q3.Provider,{value:je},v.createElement(be.Z,Object.assign({},Je,{className:Ce}),Lt),v.createElement(Ne,{prefixCls:$}))},at=f(61485),He=f(31724),dt=f(9763),bt=f(6848),rn=function(m,$){var Z={};for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&$.indexOf(h)<0&&(Z[h]=m[h]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(m);d<h.length;d++)$.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(m,h[d])&&(Z[h[d]]=m[h[d]]);return Z};function _t(m){return m?typeof m=="object"&&!v.isValidElement(m)?m:{title:m}:null}var $t=m=>{let{prefixCls:$,label:Z,htmlFor:h,labelCol:d,labelAlign:C,colon:T,required:ie,requiredMark:H,tooltip:_}=m;var de;const[pe]=(0,dt.Z)("Form"),{vertical:ze,labelAlign:M,labelCol:U,labelWrap:Je,colon:Ce}=v.useContext(A.q3);if(!Z)return null;const je=d||U||{},Pe=C||M,ut=`${$}-item-label`,ne=x()(ut,Pe==="left"&&`${ut}-left`,je.className,{[`${ut}-wrap`]:!!Je});let et=Z;const St=T===!0||Ce!==!1&&T!==!1;St&&!ze&&typeof Z=="string"&&Z.trim()!==""&&(et=Z.replace(/[:|]\s*$/,""));const nt=_t(_);if(nt){const{icon:Ge=v.createElement(at.Z,null)}=nt,ct=rn(nt,["icon"]),pt=v.createElement(bt.Z,Object.assign({},ct),v.cloneElement(Ge,{className:`${$}-item-tooltip`,title:""}));et=v.createElement(v.Fragment,null,et,pt)}const gt=H==="optional",Bt=typeof H=="function";Bt?et=H(et,{required:!!ie}):gt&&!ie&&(et=v.createElement(v.Fragment,null,et,v.createElement("span",{className:`${$}-item-optional`,title:""},(pe==null?void 0:pe.optional)||((de=He.Z.Form)===null||de===void 0?void 0:de.optional))));const De=x()({[`${$}-item-required`]:ie,[`${$}-item-required-mark-optional`]:gt||Bt,[`${$}-item-no-colon`]:!St});return v.createElement(be.Z,Object.assign({},je,{className:ne}),v.createElement("label",{htmlFor:h,className:De,title:typeof Z=="string"?Z:""},et))},en=f(29679),Ut=f(19248),sn=f(96512),Cn=f(58617);const fn={success:en.Z,warning:sn.Z,error:Ut.Z,validating:Cn.Z};function An(m){let{children:$,errors:Z,warnings:h,hasFeedback:d,validateStatus:C,prefixCls:T,meta:ie,noStyle:H}=m;const _=`${T}-item`,{feedbackIcons:de}=v.useContext(A.q3),pe=Be(Z,h,ie,null,!!d,C),{isFormItemInput:ze,status:M}=v.useContext(A.aM),U=v.useMemo(()=>{var Je;let Ce;if(d){const ut=d!==!0&&d.icons||de,ne=pe&&((Je=ut==null?void 0:ut({status:pe,errors:Z,warnings:h}))===null||Je===void 0?void 0:Je[pe]),et=pe&&fn[pe];Ce=ne!==!1&&et?v.createElement("span",{className:x()(`${_}-feedback-icon`,`${_}-feedback-icon-${pe}`)},ne||v.createElement(et,null)):null}let je=!0,Pe=pe||"";return H&&(je=ze,Pe=(pe!=null?pe:M)||""),{status:Pe,errors:Z,warnings:h,hasFeedback:!!d,feedbackIcon:Ce,isFormItemInput:je}},[pe,d,H,ze,M]);return v.createElement(A.aM.Provider,{value:U},$)}var zn=function(m,$){var Z={};for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&$.indexOf(h)<0&&(Z[h]=m[h]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(m);d<h.length;d++)$.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(m,h[d])&&(Z[h[d]]=m[h[d]]);return Z};function xn(m){const{prefixCls:$,className:Z,rootClassName:h,style:d,help:C,errors:T,warnings:ie,validateStatus:H,meta:_,hasFeedback:de,hidden:pe,children:ze,fieldId:M,required:U,isRequired:Je,onSubItemMetaChange:Ce}=m,je=zn(m,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Pe=`${$}-item`,{requiredMark:ut}=v.useContext(A.q3),ne=v.useRef(null),et=xe(T),St=xe(ie),Lt=C!=null,nt=!!(Lt||T.length||ie.length),gt=!!ne.current&&(0,Le.Z)(ne.current),[Bt,De]=v.useState(null);(0,ee.Z)(()=>{if(nt&&ne.current){const kt=getComputedStyle(ne.current);De(parseInt(kt.marginBottom,10))}},[nt,gt]);const Ge=kt=>{kt||De(null)},pt=function(){let kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Gt=kt?et:_.errors,Vt=kt?St:_.warnings;return Be(Gt,Vt,_,"",!!de,H)}(),Wt=x()(Pe,Z,h,{[`${Pe}-with-help`]:Lt||et.length||St.length,[`${Pe}-has-feedback`]:pt&&de,[`${Pe}-has-success`]:pt==="success",[`${Pe}-has-warning`]:pt==="warning",[`${Pe}-has-error`]:pt==="error",[`${Pe}-is-validating`]:pt==="validating",[`${Pe}-hidden`]:pe});return v.createElement("div",{className:Wt,style:d,ref:ne},v.createElement(W.Z,Object.assign({className:`${Pe}-row`},(0,re.Z)(je,["_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"])),v.createElement($t,Object.assign({htmlFor:M},m,{requiredMark:ut,required:U!=null?U:Je,prefixCls:$})),v.createElement(J,Object.assign({},m,_,{errors:et,warnings:St,prefixCls:$,status:pt,help:C,marginBottom:Bt,onErrorVisibleChanged:Ge}),v.createElement(A.qI.Provider,{value:Ce},v.createElement(An,{prefixCls:$,meta:_,errors:_.errors,warnings:_.warnings,hasFeedback:de,validateStatus:pt},ze)))),!!Bt&&v.createElement("div",{className:`${Pe}-margin-offset`,style:{marginBottom:-Bt}}))}const Dn="__SPLIT__",vn=null,In=v.memo(m=>{let{children:$}=m;return $},(m,$)=>m.value===$.value&&m.update===$.update&&m.childProps.length===$.childProps.length&&m.childProps.every((Z,h)=>Z===$.childProps[h]));function wn(m){return m!=null}function pn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Pn(m){const{name:$,noStyle:Z,className:h,dependencies:d,prefixCls:C,shouldUpdate:T,rules:ie,children:H,required:_,label:de,messageVariables:pe,trigger:ze="onChange",validateTrigger:M,hidden:U,help:Je}=m,{getPrefixCls:Ce}=v.useContext(yt.E_),{name:je}=v.useContext(A.q3),Pe=ae(H),ut=typeof Pe=="function",ne=v.useContext(A.qI),{validateTrigger:et}=v.useContext(Oe.FieldContext),St=M!==void 0?M:et,Lt=wn($),nt=Ce("form",C),[gt,Bt]=k(nt),De=v.useContext(Oe.ListContext),Ge=v.useRef(),[ct,pt]=Q({}),[Wt,kt]=(0,ot.Z)(()=>pn()),Gt=Ft=>{const Ht=De==null?void 0:De.getKey(Ft.name);if(kt(Ft.destroy?pn():Ft,!0),Z&&Je!==!1&&ne){let an=Ft.name;if(Ft.destroy)an=Ge.current||an;else if(Ht!==void 0){const[Xt,En]=Ht;an=[Xt].concat((0,P.Z)(En)),Ge.current=an}ne(Ft,an)}},Vt=(Ft,Ht)=>{pt(an=>{const Xt=Object.assign({},an),Un=[].concat((0,P.Z)(Ft.name.slice(0,-1)),(0,P.Z)(Ht)).join(Dn);return Ft.destroy?delete Xt[Un]:Xt[Un]=Ft,Xt})},[Dt,It]=v.useMemo(()=>{const Ft=(0,P.Z)(Wt.errors),Ht=(0,P.Z)(Wt.warnings);return Object.values(ct).forEach(an=>{Ft.push.apply(Ft,(0,P.Z)(an.errors||[])),Ht.push.apply(Ht,(0,P.Z)(an.warnings||[]))}),[Ft,Ht]},[ct,Wt.errors,Wt.warnings]),zt=ue();function Rt(Ft,Ht,an){return Z&&!U?v.createElement(An,{prefixCls:nt,hasFeedback:m.hasFeedback,validateStatus:m.validateStatus,meta:Wt,errors:Dt,warnings:It,noStyle:!0},Ft):v.createElement(xn,Object.assign({key:"row"},m,{className:x()(h,Bt),prefixCls:nt,fieldId:Ht,isRequired:an,errors:Dt,warnings:It,meta:Wt,onSubItemMetaChange:Vt}),Ft)}if(!Lt&&!ut&&!d)return gt(Rt(Pe));let cn={};return typeof de=="string"?cn.label=de:$&&(cn.label=String($)),pe&&(cn=Object.assign(Object.assign({},cn),pe)),gt(v.createElement(Oe.Field,Object.assign({},m,{messageVariables:cn,trigger:ze,validateTrigger:St,onMetaChange:Gt}),(Ft,Ht,an)=>{const Xt=se($).length&&Ht?Ht.name:[],En=ke(Xt,je),Un=_!==void 0?_:!!(ie&&ie.some(ht=>{if(ht&&typeof ht=="object"&&ht.required&&!ht.warningOnly)return!0;if(typeof ht=="function"){const qt=ht(an);return qt&&qt.required&&!qt.warningOnly}return!1})),Tt=Object.assign({},Ft);let ft=null;if(Array.isArray(Pe)&&Lt)ft=Pe;else if(!(ut&&(!(T||d)||Lt))){if(!(d&&!ut&&!Lt))if((0,R.l$)(Pe)){const ht=Object.assign(Object.assign({},Pe.props),Tt);if(ht.id||(ht.id=En),Je||Dt.length>0||It.length>0||m.extra){const Yt=[];(Je||Dt.length>0)&&Yt.push(`${En}_help`),m.extra&&Yt.push(`${En}_extra`),ht["aria-describedby"]=Yt.join(" ")}Dt.length>0&&(ht["aria-invalid"]="true"),Un&&(ht["aria-required"]="true"),(0,_e.Yr)(Pe)&&(ht.ref=zt(Xt,Pe)),new Set([].concat((0,P.Z)(se(ze)),(0,P.Z)(se(St)))).forEach(Yt=>{ht[Yt]=function(){for(var At,ln,gn,mn,Ln,Ve=arguments.length,We=new Array(Ve),xt=0;xt<Ve;xt++)We[xt]=arguments[xt];(gn=Tt[Yt])===null||gn===void 0||(At=gn).call.apply(At,[Tt].concat(We)),(Ln=(mn=Pe.props)[Yt])===null||Ln===void 0||(ln=Ln).call.apply(ln,[mn].concat(We))}});const tn=[ht["aria-required"],ht["aria-invalid"],ht["aria-describedby"]];ft=v.createElement(In,{value:Tt[m.valuePropName||"value"],update:Pe,childProps:tn},(0,R.Tm)(Pe,ht))}else ut&&(T||d)&&!Lt?ft=Pe(an):ft=Pe}return Rt(ft,En,Un)}))}const on=Pn;on.useStatus=X;var Nn=on,Wn=function(m,$){var Z={};for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&$.indexOf(h)<0&&(Z[h]=m[h]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(m);d<h.length;d++)$.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(m,h[d])&&(Z[h[d]]=m[h[d]]);return Z},gr=m=>{var{prefixCls:$,children:Z}=m,h=Wn(m,["prefixCls","children"]);const{getPrefixCls:d}=v.useContext(yt.E_),C=d("form",$),T=v.useMemo(()=>({prefixCls:C,status:"error"}),[C]);return v.createElement(Oe.List,Object.assign({},h),(ie,H,_)=>v.createElement(A.Rk.Provider,{value:T},Z(ie.map(de=>Object.assign(Object.assign({},de),{fieldKey:de.key})),H,{errors:_.errors,warnings:_.warnings})))};function Jt(){const{form:m}=(0,v.useContext)(A.q3);return m}const lt=Ze;lt.Item=Nn,lt.List=gr,lt.ErrorList=$e,lt.useForm=N,lt.useFormInstance=Jt,lt.useWatch=Oe.useWatch,lt.Provider=A.RV,lt.create=()=>{};var Kt=lt},9432:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return Mt},n:function(){return rt}});var P=f(19248),O=f(92310),x=f.n(O),z=f(93681),v=f(8654),F=f(59301),A=f(19080),xe=f(36355),ce=f(1684),y=f(19716),Ie=f(32441),B=f(33234),Se=f(59412),Te=f(9937);function q(oe){return!!(oe.prefix||oe.suffix||oe.allowClear)}var qe=function(oe,Y){var S={};for(var c in oe)Object.prototype.hasOwnProperty.call(oe,c)&&Y.indexOf(c)<0&&(S[c]=oe[c]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,c=Object.getOwnPropertySymbols(oe);b<c.length;b++)Y.indexOf(c[b])<0&&Object.prototype.propertyIsEnumerable.call(oe,c[b])&&(S[c[b]]=oe[c[b]]);return S};function rt(oe,Y){if(!oe)return;oe.focus(Y);const{cursor:S}=Y||{};if(S){const c=oe.value.length;switch(S){case"start":oe.setSelectionRange(0,0);break;case"end":oe.setSelectionRange(c,c);break;default:oe.setSelectionRange(0,c);break}}}var Mt=(0,F.forwardRef)((oe,Y)=>{var S;const{prefixCls:c,bordered:b=!0,status:I,size:k,disabled:D,onBlur:Ee,onFocus:Ue,suffix:$e,allowClear:Oe,addonAfter:yt,addonBefore:Ye,className:Qe,style:ge,styles:G,rootClassName:me,onChange:fe,classNames:se}=oe,ke=qe(oe,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Be,direction:ye,input:N}=F.useContext(xe.E_),L=Be("input",c),V=(0,F.useRef)(null),[Me,it]=(0,Te.ZP)(L),{compactSize:Ze,compactItemClassnames:ot}=(0,B.ri)(L,ye),_e=(0,y.Z)(Ne=>{var Ke;return(Ke=k!=null?k:Ze)!==null&&Ke!==void 0?Ke:Ne}),R=F.useContext(ce.Z),he=D!=null?D:R,{status:ae,hasFeedback:j,feedbackIcon:X}=(0,F.useContext)(Ie.aM),le=(0,A.F)(ae,I),Q=q(oe)||!!j,ue=(0,F.useRef)(Q);(0,F.useEffect)(()=>{var Ne;Q&&ue.current,ue.current=Q},[Q]);const Le=(0,Se.Z)(V,!0),ee=Ne=>{Le(),Ee==null||Ee(Ne)},re=Ne=>{Le(),Ue==null||Ue(Ne)},W=Ne=>{Le(),fe==null||fe(Ne)},be=(j||$e)&&F.createElement(F.Fragment,null,$e,j&&X);let ve;return typeof Oe=="object"&&(Oe!=null&&Oe.clearIcon)?ve=Oe:Oe&&(ve={clearIcon:F.createElement(P.Z,null)}),Me(F.createElement(z.default,Object.assign({ref:(0,v.sQ)(Y,V),prefixCls:L,autoComplete:N==null?void 0:N.autoComplete},ke,{disabled:he,onBlur:ee,onFocus:re,style:Object.assign(Object.assign({},N==null?void 0:N.style),ge),styles:Object.assign(Object.assign({},N==null?void 0:N.styles),G),suffix:be,allowClear:ve,className:x()(Qe,me,ot,N==null?void 0:N.className),onChange:W,addonAfter:yt&&F.createElement(B.BR,null,F.createElement(Ie.Ux,{override:!0,status:!0},yt)),addonBefore:Ye&&F.createElement(B.BR,null,F.createElement(Ie.Ux,{override:!0,status:!0},Ye)),classNames:Object.assign(Object.assign(Object.assign({},se),N==null?void 0:N.classNames),{input:x()({[`${L}-sm`]:_e==="small",[`${L}-lg`]:_e==="large",[`${L}-rtl`]:ye==="rtl",[`${L}-borderless`]:!b},!Q&&(0,A.Z)(L,le),se==null?void 0:se.input,(S=N==null?void 0:N.classNames)===null||S===void 0?void 0:S.input,it)}),classes:{affixWrapper:x()({[`${L}-affix-wrapper-sm`]:_e==="small",[`${L}-affix-wrapper-lg`]:_e==="large",[`${L}-affix-wrapper-rtl`]:ye==="rtl",[`${L}-affix-wrapper-borderless`]:!b},(0,A.Z)(`${L}-affix-wrapper`,le,j),it),wrapper:x()({[`${L}-group-rtl`]:ye==="rtl"},it),group:x()({[`${L}-group-wrapper-sm`]:_e==="small",[`${L}-group-wrapper-lg`]:_e==="large",[`${L}-group-wrapper-rtl`]:ye==="rtl",[`${L}-group-wrapper-disabled`]:he},(0,A.Z)(`${L}-group-wrapper`,le,j),it)}})))})},1643:function(nn,Re,f){"use strict";var P=f(19248),O=f(92310),x=f.n(O),z=f(9296),v=f(59301),F=f(19080),A=f(36355),xe=f(1684),ce=f(19716),y=f(32441),Ie=f(9432),B=f(9937),Se=function(q,qe){var rt={};for(var Ct in q)Object.prototype.hasOwnProperty.call(q,Ct)&&qe.indexOf(Ct)<0&&(rt[Ct]=q[Ct]);if(q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mt=0,Ct=Object.getOwnPropertySymbols(q);Mt<Ct.length;Mt++)qe.indexOf(Ct[Mt])<0&&Object.prototype.propertyIsEnumerable.call(q,Ct[Mt])&&(rt[Ct[Mt]]=q[Ct[Mt]]);return rt};const Te=(0,v.forwardRef)((q,qe)=>{const{prefixCls:rt,bordered:Ct=!0,size:Mt,disabled:oe,status:Y,allowClear:S,showCount:c,classNames:b,rootClassName:I,className:k}=q,D=Se(q,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Ee,direction:Ue}=v.useContext(A.E_),$e=(0,ce.Z)(Mt),Oe=v.useContext(xe.Z),yt=oe!=null?oe:Oe,{status:Ye,hasFeedback:Qe,feedbackIcon:ge}=v.useContext(y.aM),G=(0,F.F)(Ye,Y),me=v.useRef(null);v.useImperativeHandle(qe,()=>{var ye;return{resizableTextArea:(ye=me.current)===null||ye===void 0?void 0:ye.resizableTextArea,focus:N=>{var L,V;(0,Ie.n)((V=(L=me.current)===null||L===void 0?void 0:L.resizableTextArea)===null||V===void 0?void 0:V.textArea,N)},blur:()=>{var N;return(N=me.current)===null||N===void 0?void 0:N.blur()}}});const fe=Ee("input",rt);let se;typeof S=="object"&&(S!=null&&S.clearIcon)?se=S:S&&(se={clearIcon:v.createElement(P.Z,null)});const[ke,Be]=(0,B.ZP)(fe);return ke(v.createElement(z.default,Object.assign({},D,{disabled:yt,allowClear:se,className:x()(k,I),classes:{affixWrapper:x()(`${fe}-textarea-affix-wrapper`,{[`${fe}-affix-wrapper-rtl`]:Ue==="rtl",[`${fe}-affix-wrapper-borderless`]:!Ct,[`${fe}-affix-wrapper-sm`]:$e==="small",[`${fe}-affix-wrapper-lg`]:$e==="large",[`${fe}-textarea-show-count`]:c},(0,F.Z)(`${fe}-affix-wrapper`,G),Be)},classNames:Object.assign(Object.assign({},b),{textarea:x()({[`${fe}-borderless`]:!Ct,[`${fe}-sm`]:$e==="small",[`${fe}-lg`]:$e==="large"},(0,F.Z)(fe,G),Be,b==null?void 0:b.textarea)}),prefixCls:fe,suffix:Qe&&v.createElement("span",{className:`${fe}-textarea-suffix`},ge),showCount:c,ref:me})))});Re.Z=Te},59412:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return O}});var P=f(59301);function O(x,z){const v=(0,P.useRef)([]),F=()=>{v.current.push(setTimeout(()=>{var A,xe,ce,y;!((A=x.current)===null||A===void 0)&&A.input&&((xe=x.current)===null||xe===void 0?void 0:xe.input.getAttribute("type"))==="password"&&(!((ce=x.current)===null||ce===void 0)&&ce.input.hasAttribute("value"))&&((y=x.current)===null||y===void 0||y.input.removeAttribute("value"))}))};return(0,P.useEffect)(()=>(z&&F(),()=>v.current.forEach(A=>{A&&clearTimeout(A)})),[]),F}},92832:function(nn,Re,f){"use strict";f.d(Re,{default:function(){return $e}});var P=f(92310),O=f.n(P),x=f(59301),z=f(36355),v=f(32441),F=f(9937),xe=Oe=>{const{getPrefixCls:yt,direction:Ye}=(0,x.useContext)(z.E_),{prefixCls:Qe,className:ge}=Oe,G=yt("input-group",Qe),me=yt("input"),[fe,se]=(0,F.ZP)(me),ke=O()(G,{[`${G}-lg`]:Oe.size==="large",[`${G}-sm`]:Oe.size==="small",[`${G}-compact`]:Oe.compact,[`${G}-rtl`]:Ye==="rtl"},se,ge),Be=(0,x.useContext)(v.aM),ye=(0,x.useMemo)(()=>Object.assign(Object.assign({},Be),{isFormItemInput:!1}),[Be]);return fe(x.createElement("span",{className:ke,style:Oe.style,onMouseEnter:Oe.onMouseEnter,onMouseLeave:Oe.onMouseLeave,onFocus:Oe.onFocus,onBlur:Oe.onBlur},x.createElement(v.aM.Provider,{value:ye},Oe.children)))},ce=f(9432),y=f(73331),Ie=f(15277),B=f(2738),Se=f(8654),Te=f(59412),q=function(Oe,yt){var Ye={};for(var Qe in Oe)Object.prototype.hasOwnProperty.call(Oe,Qe)&&yt.indexOf(Qe)<0&&(Ye[Qe]=Oe[Qe]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ge=0,Qe=Object.getOwnPropertySymbols(Oe);ge<Qe.length;ge++)yt.indexOf(Qe[ge])<0&&Object.prototype.propertyIsEnumerable.call(Oe,Qe[ge])&&(Ye[Qe[ge]]=Oe[Qe[ge]]);return Ye};const qe=Oe=>Oe?x.createElement(Ie.Z,null):x.createElement(y.Z,null),rt={click:"onClick",hover:"onMouseOver"};var Mt=x.forwardRef((Oe,yt)=>{const{visibilityToggle:Ye=!0}=Oe,Qe=typeof Ye=="object"&&Ye.visible!==void 0,[ge,G]=(0,x.useState)(()=>Qe?Ye.visible:!1),me=(0,x.useRef)(null);x.useEffect(()=>{Qe&&G(Ye.visible)},[Qe,Ye]);const fe=(0,Te.Z)(me),se=()=>{const{disabled:he}=Oe;he||(ge&&fe(),G(ae=>{var j;const X=!ae;return typeof Ye=="object"&&((j=Ye.onVisibleChange)===null||j===void 0||j.call(Ye,X)),X}))},ke=he=>{const{action:ae="click",iconRender:j=qe}=Oe,X=rt[ae]||"",le=j(ge),Q={[X]:se,className:`${he}-icon`,key:"passwordIcon",onMouseDown:ue=>{ue.preventDefault()},onMouseUp:ue=>{ue.preventDefault()}};return x.cloneElement(x.isValidElement(le)?le:x.createElement("span",null,le),Q)},{className:Be,prefixCls:ye,inputPrefixCls:N,size:L}=Oe,V=q(Oe,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Me}=x.useContext(z.E_),it=Me("input",N),Ze=Me("input-password",ye),ot=Ye&&ke(Ze),_e=O()(Ze,Be,{[`${Ze}-${L}`]:!!L}),R=Object.assign(Object.assign({},(0,B.Z)(V,["suffix","iconRender","visibilityToggle"])),{type:ge?"text":"password",className:_e,prefixCls:it,suffix:ot});return L&&(R.size=L),x.createElement(ce.Z,Object.assign({ref:(0,Se.sQ)(yt,me)},R))}),oe=f(47472),Y=f(92343),S=f(3113),c=f(19716),b=f(33234),I=function(Oe,yt){var Ye={};for(var Qe in Oe)Object.prototype.hasOwnProperty.call(Oe,Qe)&&yt.indexOf(Qe)<0&&(Ye[Qe]=Oe[Qe]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ge=0,Qe=Object.getOwnPropertySymbols(Oe);ge<Qe.length;ge++)yt.indexOf(Qe[ge])<0&&Object.prototype.propertyIsEnumerable.call(Oe,Qe[ge])&&(Ye[Qe[ge]]=Oe[Qe[ge]]);return Ye},D=x.forwardRef((Oe,yt)=>{const{prefixCls:Ye,inputPrefixCls:Qe,className:ge,size:G,suffix:me,enterButton:fe=!1,addonAfter:se,loading:ke,disabled:Be,onSearch:ye,onChange:N,onCompositionStart:L,onCompositionEnd:V}=Oe,Me=I(Oe,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:it,direction:Ze}=x.useContext(z.E_),ot=x.useRef(!1),_e=it("input-search",Ye),R=it("input",Qe),{compactSize:he}=(0,b.ri)(_e,Ze),ae=(0,c.Z)(J=>{var at;return(at=G!=null?G:he)!==null&&at!==void 0?at:J}),j=x.useRef(null),X=J=>{J&&J.target&&J.type==="click"&&ye&&ye(J.target.value,J,{source:"clear"}),N&&N(J)},le=J=>{var at;document.activeElement===((at=j.current)===null||at===void 0?void 0:at.input)&&J.preventDefault()},Q=J=>{var at,He;ye&&ye((He=(at=j.current)===null||at===void 0?void 0:at.input)===null||He===void 0?void 0:He.value,J,{source:"input"})},ue=J=>{ot.current||ke||Q(J)},Le=typeof fe=="boolean"?x.createElement(oe.Z,null):null,ee=`${_e}-button`;let re;const W=fe||{},be=W.type&&W.type.__ANT_BUTTON===!0;be||W.type==="button"?re=(0,Y.Tm)(W,Object.assign({onMouseDown:le,onClick:J=>{var at,He;(He=(at=W==null?void 0:W.props)===null||at===void 0?void 0:at.onClick)===null||He===void 0||He.call(at,J),Q(J)},key:"enterButton"},be?{className:ee,size:ae}:{})):re=x.createElement(S.ZP,{className:ee,type:fe?"primary":void 0,size:ae,disabled:Be,key:"enterButton",onMouseDown:le,onClick:Q,loading:ke,icon:Le},fe),se&&(re=[re,(0,Y.Tm)(se,{key:"addonAfter"})]);const ve=O()(_e,{[`${_e}-rtl`]:Ze==="rtl",[`${_e}-${ae}`]:!!ae,[`${_e}-with-button`]:!!fe},ge),Ne=J=>{ot.current=!0,L==null||L(J)},Ke=J=>{ot.current=!1,V==null||V(J)};return x.createElement(ce.Z,Object.assign({ref:(0,Se.sQ)(j,yt),onPressEnter:ue},Me,{size:ae,onCompositionStart:Ne,onCompositionEnd:Ke,prefixCls:R,addonAfter:re,suffix:me,onChange:X,className:ve,disabled:Be}))}),Ee=f(1643);const Ue=ce.Z;Ue.Group=xe,Ue.Search=D,Ue.TextArea=Ee.Z,Ue.Password=Mt;var $e=Ue},9937:function(nn,Re,f){"use strict";f.d(Re,{M1:function(){return A},TM:function(){return Y},Xy:function(){return xe},bi:function(){return Ie},e5:function(){return oe},ik:function(){return B},nz:function(){return v},pU:function(){return F},s7:function(){return Se},x0:function(){return y}});var P=f(17313),O=f(74207),x=f(37613),z=f(83116);const v=S=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:S,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),F=S=>({borderColor:S.hoverBorderColor}),A=S=>({borderColor:S.activeBorderColor,boxShadow:S.activeShadow,outline:0}),xe=S=>({color:S.colorTextDisabled,backgroundColor:S.colorBgContainerDisabled,borderColor:S.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},F((0,x.TS)(S,{hoverBorderColor:S.colorBorder})))}),ce=S=>{const{paddingBlockLG:c,fontSizeLG:b,lineHeightLG:I,borderRadiusLG:k,paddingInlineLG:D}=S;return{padding:`${c}px ${D}px`,fontSize:b,lineHeight:I,borderRadius:k}},y=S=>({padding:`${S.paddingBlockSM}px ${S.paddingInlineSM}px`,borderRadius:S.borderRadiusSM}),Ie=(S,c)=>{const{componentCls:b,colorError:I,colorWarning:k,errorActiveShadow:D,warningActiveShadow:Ee,colorErrorBorderHover:Ue,colorWarningBorderHover:$e}=S;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:I,"&:hover":{borderColor:Ue},"&:focus, &-focused":Object.assign({},A((0,x.TS)(S,{activeBorderColor:I,activeShadow:D}))),[`${b}-prefix, ${b}-suffix`]:{color:I}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:k,"&:hover":{borderColor:$e},"&:focus, &-focused":Object.assign({},A((0,x.TS)(S,{activeBorderColor:k,activeShadow:Ee}))),[`${b}-prefix, ${b}-suffix`]:{color:k}}}},B=S=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${S.paddingBlock}px ${S.paddingInline}px`,color:S.colorText,fontSize:S.fontSize,lineHeight:S.lineHeight,backgroundColor:S.colorBgContainer,backgroundImage:"none",borderWidth:S.lineWidth,borderStyle:S.lineType,borderColor:S.colorBorder,borderRadius:S.borderRadius,transition:`all ${S.motionDurationMid}`},v(S.colorTextPlaceholder)),{"&:hover":Object.assign({},F(S)),"&:focus, &-focused":Object.assign({},A(S)),"&-disabled, &[disabled]":Object.assign({},xe(S)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:S.controlHeight,lineHeight:S.lineHeight,verticalAlign:"bottom",transition:`all ${S.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},ce(S)),"&-sm":Object.assign({},y(S)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),Se=S=>{const{componentCls:c,antCls:b}=S;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:S.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${c}, &-lg > ${c}-group-addon`]:Object.assign({},ce(S)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},y(S)),[`&-lg ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightLG},[`&-sm ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightSM},[`> ${c}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${c}-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 ${S.paddingInline}px`,color:S.colorText,fontWeight:"normal",fontSize:S.fontSize,textAlign:"center",backgroundColor:S.colorFillAlter,border:`${S.lineWidth}px ${S.lineType} ${S.colorBorder}`,borderRadius:S.borderRadius,transition:`all ${S.motionDurationSlow}`,lineHeight:1,[`${b}-select`]:{margin:`-${S.paddingBlock+1}px -${S.paddingInline}px`,[`&${b}-select-single:not(${b}-select-customize-input)`]:{[`${b}-select-selector`]:{backgroundColor:"inherit",border:`${S.lineWidth}px ${S.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${b}-select-selector`]:{color:S.colorPrimary}}},[`${b}-cascader-picker`]:{margin:`-9px -${S.paddingInline}px`,backgroundColor:"transparent",[`${b}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${c}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${c}-search-with-button &`]:{zIndex:0}}},[`> ${c}:first-child, ${c}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}-affix-wrapper`]:{[`&:not(:first-child) ${c}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${c}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}:last-child, ${c}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${c}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${c}-search &`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius}},[`&:not(:first-child), ${c}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${c}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,P.dF)()),{[`${c}-group-addon, ${c}-group-wrap, > ${c}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:S.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${c}-affix-wrapper,
& > ${c}-number-affix-wrapper,
& > ${b}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-S.lineWidth,borderInlineEndWidth:S.lineWidth},[`${c}`]:{float:"none"},[`& > ${b}-select > ${b}-select-selector,
& > ${b}-select-auto-complete ${c},
& > ${b}-cascader-picker ${c},
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:S.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${b}-select-focused`]:{zIndex:1},[`& > ${b}-select > ${b}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${b}-select:first-child > ${b}-select-selector,
& > ${b}-select-auto-complete:first-child ${c},
& > ${b}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius},[`& > *:last-child,
& > ${b}-select:last-child > ${b}-select-selector,
& > ${b}-cascader-picker:last-child ${c},
& > ${b}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:S.lineWidth,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius},[`& > ${b}-select-auto-complete ${c}`]:{verticalAlign:"top"},[`${c}-group-wrapper + ${c}-group-wrapper`]:{marginInlineStart:-S.lineWidth,[`${c}-affix-wrapper`]:{borderRadius:0}},[`${c}-group-wrapper:not(:last-child)`]:{[`&${c}-search > ${c}-group`]:{[`& > ${c}-group-addon > ${c}-search-button`]:{borderRadius:0},[`& > ${c}`]:{borderStartStartRadius:S.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:S.borderRadius}}}})}},Te=S=>{const{componentCls:c,controlHeightSM:b,lineWidth:I}=S,D=(b-I*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,P.Wf)(S)),B(S)),Ie(S,c)),{'&[type="color"]':{height:S.controlHeight,[`&${c}-lg`]:{height:S.controlHeightLG},[`&${c}-sm`]:{height:b,paddingTop:D,paddingBottom:D}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},q=S=>{const{componentCls:c}=S;return{[`${c}-clear-icon`]:{margin:0,color:S.colorTextQuaternary,fontSize:S.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${S.motionDurationSlow}`,"&:hover":{color:S.colorTextTertiary},"&:active":{color:S.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${S.inputAffixPadding}px`}}}},qe=S=>{const{componentCls:c,inputAffixPadding:b,colorTextDescription:I,motionDurationSlow:k,colorIcon:D,colorIconHover:Ee,iconCls:Ue}=S;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},B(S)),{display:"inline-flex",[`&:not(${c}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},F(S)),{zIndex:1,[`${c}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${c}[disabled]`]:{background:"transparent"}},[`> input${c}`]:{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"'},[`${c}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:S.paddingXS}},"&-show-count-suffix":{color:I},"&-show-count-has-suffix":{marginInlineEnd:S.paddingXXS},"&-prefix":{marginInlineEnd:b},"&-suffix":{marginInlineStart:b}}}),q(S)),{[`${Ue}${c}-password-icon`]:{color:D,cursor:"pointer",transition:`all ${k}`,"&:hover":{color:Ee}}}),Ie(S,`${c}-affix-wrapper`))}},rt=S=>{const{componentCls:c,colorError:b,colorWarning:I,borderRadiusLG:k,borderRadiusSM:D}=S;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,P.Wf)(S)),Se(S)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:k,fontSize:S.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:D}},"&-status-error":{[`${c}-group-addon`]:{color:b,borderColor:b}},"&-status-warning":{[`${c}-group-addon`]:{color:I,borderColor:I}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},xe(S))},[`&:not(${c}-compact-first-item):not(${c}-compact-last-item)${c}-compact-item`]:{[`${c}, ${c}-group-addon`]:{borderRadius:0}},[`&:not(${c}-compact-last-item)${c}-compact-first-item`]:{[`${c}, ${c}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${c}-compact-first-item)${c}-compact-last-item`]:{[`${c}, ${c}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Ct=S=>{const{componentCls:c,antCls:b}=S,I=`${c}-search`;return{[I]:{[`${c}`]:{"&:hover, &:focus":{borderColor:S.colorPrimaryHover,[`+ ${c}-group-addon ${I}-button:not(${b}-btn-primary)`]:{borderInlineStartColor:S.colorPrimaryHover}}},[`${c}-affix-wrapper`]:{borderRadius:0},[`${c}-lg`]:{lineHeight:S.lineHeightLG-2e-4},[`> ${c}-group`]:{[`> ${c}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${I}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${I}-button:not(${b}-btn-primary)`]:{color:S.colorTextDescription,"&:hover":{color:S.colorPrimaryHover},"&:active":{color:S.colorPrimaryActive},[`&${b}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${I}-button`]:{height:S.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${I}-button`]:{height:S.controlHeightLG},[`&-small ${I}-button`]:{height:S.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${c}-compact-item`]:{[`&:not(${c}-compact-last-item)`]:{[`${c}-group-addon`]:{[`${c}-search-button`]:{marginInlineEnd:-S.lineWidth,borderRadius:0}}},[`&:not(${c}-compact-first-item)`]:{[`${c},${c}-affix-wrapper`]:{borderRadius:0}},[`> ${c}-group-addon ${c}-search-button,
> ${c},
${c}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${c}-affix-wrapper-focused`]:{zIndex:2}}}}},Mt=S=>{const{componentCls:c,paddingLG:b}=S,I=`${c}-textarea`;return{[I]:{position:"relative","&-show-count":{[`> ${c}`]:{height:"100%"},[`${c}-data-count`]:{position:"absolute",bottom:-S.fontSize*S.lineHeight,insetInlineEnd:0,color:S.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${c}`]:{paddingInlineEnd:b}},[`&-affix-wrapper${I}-has-feedback`]:{[`${c}`]:{paddingInlineEnd:b}},[`&-affix-wrapper${c}-affix-wrapper`]:{padding:0,[`> textarea${c}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${c}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${c}-clear-icon`]:{position:"absolute",insetInlineEnd:S.paddingXS,insetBlockStart:S.paddingXS},[`${I}-suffix`]:{position:"absolute",top:0,insetInlineEnd:S.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function oe(S){return(0,x.TS)(S,{inputAffixPadding:S.paddingXXS})}const Y=S=>{const{controlHeight:c,fontSize:b,lineHeight:I,lineWidth:k,controlHeightSM:D,controlHeightLG:Ee,fontSizeLG:Ue,lineHeightLG:$e,paddingSM:Oe,controlPaddingHorizontalSM:yt,controlPaddingHorizontal:Ye,colorFillAlter:Qe,colorPrimaryHover:ge,controlOutlineWidth:G,controlOutline:me,colorErrorOutline:fe,colorWarningOutline:se}=S;return{paddingBlock:Math.max(Math.round((c-b*I)/2*10)/10-k,3),paddingBlockSM:Math.max(Math.round((D-b*I)/2*10)/10-k,0),paddingBlockLG:Math.ceil((Ee-Ue*$e)/2*10)/10-k,paddingInline:Oe-k,paddingInlineSM:yt-k,paddingInlineLG:Ye-k,addonBg:Qe,activeBorderColor:ge,hoverBorderColor:ge,activeShadow:`0 0 0 ${G}px ${me}`,errorActiveShadow:`0 0 0 ${G}px ${fe}`,warningActiveShadow:`0 0 0 ${G}px ${se}`}};Re.ZP=(0,z.Z)("Input",S=>{const c=(0,x.TS)(S,oe(S));return[Te(c),Mt(c),qe(c),rt(c),Ct(c),(0,O.c)(c)]},Y)},57809:function(nn,Re,f){"use strict";var P=f(92310),O=f.n(P),x=f(77861),z=f(2738),v=f(59301),F=f(53487),A=f(62892),xe=f(19080),ce=f(36355),y=f(1684),Ie=f(93891),B=f(19716),Se=f(32441),Te=f(33234),q=f(14154),qe=f(58582),rt=f(84443),Ct=f(66339),Mt=function(b,I){var k={};for(var D in b)Object.prototype.hasOwnProperty.call(b,D)&&I.indexOf(D)<0&&(k[D]=b[D]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,D=Object.getOwnPropertySymbols(b);Ee<D.length;Ee++)I.indexOf(D[Ee])<0&&Object.prototype.propertyIsEnumerable.call(b,D[Ee])&&(k[D[Ee]]=b[D[Ee]]);return k};const oe="SECRET_COMBOBOX_MODE_DO_NOT_USE",Y=(b,I)=>{var k,{prefixCls:D,bordered:Ee=!0,className:Ue,rootClassName:$e,getPopupContainer:Oe,popupClassName:yt,dropdownClassName:Ye,listHeight:Qe=256,placement:ge,listItemHeight:G=24,size:me,disabled:fe,notFoundContent:se,status:ke,builtinPlacements:Be,dropdownMatchSelectWidth:ye,popupMatchSelectWidth:N,direction:L,style:V,allowClear:Me}=b,it=Mt(b,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ze,getPrefixCls:ot,renderEmpty:_e,direction:R,virtual:he,popupMatchSelectWidth:ae,popupOverflow:j,select:X}=v.useContext(ce.E_),le=ot("select",D),Q=ot(),ue=L!=null?L:R,{compactSize:Le,compactItemClassnames:ee}=(0,Te.ri)(le,ue),[re,W]=(0,q.Z)(le),be=v.useMemo(()=>{const{mode:In}=it;if(In!=="combobox")return In===oe?"combobox":In},[it.mode]),ve=be==="multiple"||be==="tags",Ne=(0,rt.Z)(it.suffixIcon,it.showArrow),Ke=(k=N!=null?N:ye)!==null&&k!==void 0?k:ae,{status:J,hasFeedback:at,isFormItemInput:He,feedbackIcon:dt}=v.useContext(Se.aM),bt=(0,xe.F)(J,ke);let rn;se!==void 0?rn=se:be==="combobox"?rn=null:rn=(_e==null?void 0:_e("Select"))||v.createElement(Ie.Z,{componentName:"Select"});const{suffixIcon:_t,itemIcon:Nt,removeIcon:$t,clearIcon:en}=(0,Ct.Z)(Object.assign(Object.assign({},it),{multiple:ve,hasFeedback:at,feedbackIcon:dt,showSuffixIcon:Ne,prefixCls:le,showArrow:it.showArrow,componentName:"Select"})),Ut=Me===!0?{clearIcon:en}:Me,sn=(0,z.Z)(it,["suffixIcon","itemIcon"]),Cn=O()(yt||Ye,{[`${le}-dropdown-${ue}`]:ue==="rtl"},$e,W),fn=(0,B.Z)(In=>{var wn;return(wn=me!=null?me:Le)!==null&&wn!==void 0?wn:In}),An=v.useContext(y.Z),zn=fe!=null?fe:An,xn=O()({[`${le}-lg`]:fn==="large",[`${le}-sm`]:fn==="small",[`${le}-rtl`]:ue==="rtl",[`${le}-borderless`]:!Ee,[`${le}-in-form-item`]:He},(0,xe.Z)(le,bt,at),ee,X==null?void 0:X.className,Ue,$e,W),Dn=v.useMemo(()=>ge!==void 0?ge:ue==="rtl"?"bottomRight":"bottomLeft",[ge,ue]),vn=(0,qe.Z)(Be,j);return re(v.createElement(x.ZP,Object.assign({ref:I,virtual:he,showSearch:X==null?void 0:X.showSearch},sn,{style:Object.assign(Object.assign({},X==null?void 0:X.style),V),dropdownMatchSelectWidth:Ke,builtinPlacements:vn,transitionName:(0,A.m)(Q,"slide-up",it.transitionName),listHeight:Qe,listItemHeight:G,mode:be,prefixCls:le,placement:Dn,direction:ue,suffixIcon:_t,menuItemSelectedIcon:Nt,removeIcon:$t,allowClear:Ut,notFoundContent:rn,className:xn,getPopupContainer:Oe||Ze,dropdownClassName:Cn,disabled:zn})))},S=v.forwardRef(Y),c=(0,F.Z)(S);S.SECRET_COMBOBOX_MODE_DO_NOT_USE=oe,S.Option=x.Wx,S.OptGroup=x.Xo,S._InternalPanelDoNotUseOrYouWillBeFired=c,Re.default=S},14154:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return S}});var P=f(17313),O=f(74207),x=f(37613),z=f(83116),v=f(13826),F=f(92899);const A=c=>{const{optionHeight:b,optionFontSize:I,optionLineHeight:k,optionPadding:D}=c;return{position:"relative",display:"block",minHeight:b,padding:D,color:c.colorText,fontWeight:"normal",fontSize:I,lineHeight:k,boxSizing:"border-box"}};var ce=c=>{const{antCls:b,componentCls:I}=c,k=`${I}-item`,D=`&${b}-slide-up-enter${b}-slide-up-enter-active`,Ee=`&${b}-slide-up-appear${b}-slide-up-appear-active`,Ue=`&${b}-slide-up-leave${b}-slide-up-leave-active`,$e=`${I}-dropdown-placement-`;return[{[`${I}-dropdown`]:Object.assign(Object.assign({},(0,P.Wf)(c)),{position:"absolute",top:-9999,zIndex:c.zIndexPopup,boxSizing:"border-box",padding:c.paddingXXS,overflow:"hidden",fontSize:c.fontSize,fontVariant:"initial",backgroundColor:c.colorBgElevated,borderRadius:c.borderRadiusLG,outline:"none",boxShadow:c.boxShadowSecondary,[`
${D}${$e}bottomLeft,
${Ee}${$e}bottomLeft
`]:{animationName:v.fJ},[`
${D}${$e}topLeft,
${Ee}${$e}topLeft,
${D}${$e}topRight,
${Ee}${$e}topRight
`]:{animationName:v.Qt},[`${Ue}${$e}bottomLeft`]:{animationName:v.Uw},[`
${Ue}${$e}topLeft,
${Ue}${$e}topRight
`]:{animationName:v.ly},"&-hidden":{display:"none"},[`${k}`]:Object.assign(Object.assign({},A(c)),{cursor:"pointer",transition:`background ${c.motionDurationSlow} ease`,borderRadius:c.borderRadiusSM,"&-group":{color:c.colorTextDescription,fontSize:c.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},P.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${k}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${k}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${k}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${k}-option-selected`]:{backgroundColor:c.colorBgContainerDisabled},color:c.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:c.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,v.oN)(c,"slide-up"),(0,v.oN)(c,"slide-down"),(0,F.Fm)(c,"move-up"),(0,F.Fm)(c,"move-down")]};const y=2,Ie=c=>{let{controlHeightSM:b,controlHeight:I,lineWidth:k}=c;const D=(I-b)/2-k,Ee=Math.ceil(D/2);return[D,Ee]};function B(c,b){const{componentCls:I,iconCls:k}=c,D=`${I}-selection-overflow`,Ee=c.multipleSelectItemHeight,[Ue]=Ie(c),$e=b?`${I}-${b}`:"";return{[`${I}-multiple${$e}`]:{fontSize:c.fontSize,[D]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${I}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ue-y}px ${y*2}px`,borderRadius:c.borderRadius,[`${I}-show-search&`]:{cursor:"text"},[`${I}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${y}px 0`,lineHeight:`${Ee}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${I}-show-arrow ${I}-selector,
&${I}-allow-clear ${I}-selector
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${I}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Ee,marginTop:y,marginBottom:y,lineHeight:`${Ee-c.lineWidth*2}px`,background:c.multipleItemBg,border:`${c.lineWidth}px ${c.lineType} ${c.multipleItemBorderColor}`,borderRadius:c.borderRadiusSM,cursor:"default",transition:`font-size ${c.motionDurationSlow}, line-height ${c.motionDurationSlow}, height ${c.motionDurationSlow}`,userSelect:"none",marginInlineEnd:y*2,paddingInlineStart:c.paddingXS,paddingInlineEnd:c.paddingXS/2,[`${I}-disabled&`]:{color:c.multipleItemColorDisabled,borderColor:c.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:c.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,P.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${k}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${D}-item + ${D}-item`]:{[`${I}-selection-search`]:{marginInlineStart:0}},[`${I}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-Ue,"\n &-input,\n &-mirror\n ":{height:Ee,fontFamily:c.fontFamily,lineHeight:`${Ee}px`,transition:`all ${c.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${I}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var Te=c=>{const{componentCls:b}=c,I=(0,x.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),k=(0,x.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,D]=Ie(c);return[B(c),B(I,"sm"),{[`${b}-multiple${b}-sm`]:{[`${b}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${b}-selection-search`]:{marginInlineStart:D}}},B(k,"lg")]};function q(c,b){const{componentCls:I,inputPaddingHorizontalBase:k,borderRadius:D}=c,Ee=c.controlHeight-c.lineWidth*2,Ue=Math.ceil(c.fontSize*1.25),$e=b?`${I}-${b}`:"";return{[`${I}-single${$e}`]:{fontSize:c.fontSize,[`${I}-selector`]:Object.assign(Object.assign({},(0,P.Wf)(c)),{display:"flex",borderRadius:D,[`${I}-selection-search`]:{position:"absolute",top:0,insetInlineStart:k,insetInlineEnd:k,bottom:0,"&-input":{width:"100%"}},[`
${I}-selection-item,
${I}-selection-placeholder
`]:{padding:0,lineHeight:`${Ee}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Ee}px`}},[`${I}-selection-item`]:{position:"relative",userSelect:"none"},[`${I}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${I}-selection-item:after`,`${I}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${I}-show-arrow ${I}-selection-item,
&${I}-show-arrow ${I}-selection-placeholder
`]:{paddingInlineEnd:Ue},[`&${I}-open ${I}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${I}-customize-input)`]:{[`${I}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${k}px`,[`${I}-selection-search-input`]:{height:Ee},"&:after":{lineHeight:`${Ee}px`}}},[`&${I}-customize-input`]:{[`${I}-selector`]:{"&:after":{display:"none"},[`${I}-selection-search`]:{position:"static",width:"100%"},[`${I}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${k}px`,"&:after":{display:"none"}}}}}}}function qe(c){const{componentCls:b}=c,I=c.controlPaddingHorizontalSM-c.lineWidth;return[q(c),q((0,x.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${b}-single${b}-sm`]:{[`&:not(${b}-customize-input)`]:{[`${b}-selection-search`]:{insetInlineStart:I,insetInlineEnd:I},[`${b}-selector`]:{padding:`0 ${I}px`},[`&${b}-show-arrow ${b}-selection-search`]:{insetInlineEnd:I+c.fontSize*1.5},[`
&${b}-show-arrow ${b}-selection-item,
&${b}-show-arrow ${b}-selection-placeholder
`]:{paddingInlineEnd:c.fontSize*1.5}}}},q((0,x.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const rt=c=>{const{componentCls:b,selectorBg:I}=c;return{position:"relative",backgroundColor:I,border:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`,transition:`all ${c.motionDurationMid} ${c.motionEaseInOut}`,input:{cursor:"pointer"},[`${b}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${b}-disabled&`]:{color:c.colorTextDisabled,background:c.colorBgContainerDisabled,cursor:"not-allowed",[`${b}-multiple&`]:{background:c.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},Ct=function(c,b){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:k,borderHoverColor:D,outlineColor:Ee,antCls:Ue}=b,$e=I?{[`${k}-selector`]:{borderColor:D}}:{};return{[c]:{[`&:not(${k}-disabled):not(${k}-customize-input):not(${Ue}-pagination-size-changer)`]:Object.assign(Object.assign({},$e),{[`${k}-focused& ${k}-selector`]:{borderColor:D,boxShadow:`0 0 0 ${b.controlOutlineWidth}px ${Ee}`,outline:0},[`&:hover ${k}-selector`]:{borderColor:D}})}}},Mt=c=>{const{componentCls:b}=c;return{[`${b}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},oe=c=>{const{componentCls:b,inputPaddingHorizontalBase:I,iconCls:k}=c;return{[b]:Object.assign(Object.assign({},(0,P.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${b}-customize-input) ${b}-selector`]:Object.assign(Object.assign({},rt(c)),Mt(c)),[`${b}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},P.vS),[`${b}-selection-placeholder`]:Object.assign(Object.assign({},P.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${b}-arrow`]:Object.assign(Object.assign({},(0,P.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:I,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[k]:{verticalAlign:"top",transition:`transform ${c.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${b}-suffix)`]:{pointerEvents:"auto"}},[`${b}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${b}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:I,zIndex:1,display:"inline-block",width:c.fontSizeIcon,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:c.clearBg,cursor:"pointer",opacity:0,transition:`color ${c.motionDurationMid} ease, opacity ${c.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:c.colorTextTertiary}},"&:hover":{[`${b}-clear`]:{opacity:1}}}),[`${b}-has-feedback`]:{[`${b}-clear`]:{insetInlineEnd:I+c.fontSize+c.paddingXS}}}},Y=c=>{const{componentCls:b}=c;return[{[b]:{[`&-borderless ${b}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${b}-in-form-item`]:{width:"100%"}}},oe(c),qe(c),Te(c),ce(c),{[`${b}-rtl`]:{direction:"rtl"}},Ct(b,(0,x.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),Ct(`${b}-status-error`,(0,x.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),Ct(`${b}-status-warning`,(0,x.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,O.c)(c,{borderElCls:`${b}-selector`,focusElCls:`${b}-focused`})]};var S=(0,z.Z)("Select",(c,b)=>{let{rootPrefixCls:I}=b;const k=(0,x.TS)(c,{rootPrefixCls:I,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[Y(k)]},c=>{const{fontSize:b,lineHeight:I,controlHeight:k,controlPaddingHorizontal:D,zIndexPopupBase:Ee,colorText:Ue,fontWeightStrong:$e,controlItemBgActive:Oe,controlItemBgHover:yt,colorBgContainer:Ye,colorFillSecondary:Qe,controlHeightLG:ge,controlHeightSM:G,colorBgContainerDisabled:me,colorTextDisabled:fe}=c;return{zIndexPopup:Ee+50,optionSelectedColor:Ue,optionSelectedFontWeight:$e,optionSelectedBg:Oe,optionActiveBg:yt,optionPadding:`${(k-b*I)/2}px ${D}px`,optionFontSize:b,optionLineHeight:I,optionHeight:k,selectorBg:Ye,clearBg:Ye,singleItemHeightLG:ge,multipleItemBg:Qe,multipleItemBorderColor:"transparent",multipleItemHeight:G,multipleItemHeightLG:k,multipleSelectorBgDisabled:me,multipleItemColorDisabled:fe,multipleItemBorderColorDisabled:"transparent"}})},58582:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return O}});const P=x=>{const v={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:x==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},v),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},v),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},v),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},v),{points:["br","tr"],offset:[0,-4]})}};function O(x,z){return x||P(z)}},84443:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return P}});function P(O,x){return x!==void 0?x:O!==null}},66339:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return xe}});var P=f(40001),O=f(19248),x=f(99267),z=f(84105),v=f(58617),F=f(47472),A=f(59301);function xe(ce){let{suffixIcon:y,clearIcon:Ie,menuItemSelectedIcon:B,removeIcon:Se,loading:Te,multiple:q,hasFeedback:qe,prefixCls:rt,showSuffixIcon:Ct,feedbackIcon:Mt,showArrow:oe,componentName:Y}=ce;const S=Ie!=null?Ie:A.createElement(O.Z,null),c=D=>y===null&&!qe&&!oe?null:A.createElement(A.Fragment,null,Ct!==!1&&D,qe&&Mt);let b=null;if(y!==void 0)b=c(y);else if(Te)b=c(A.createElement(v.Z,{spin:!0}));else{const D=`${rt}-suffix`;b=Ee=>{let{open:Ue,showSearch:$e}=Ee;return c(Ue&&$e?A.createElement(F.Z,{className:D}):A.createElement(z.Z,{className:D}))}}let I=null;B!==void 0?I=B:q?I=A.createElement(P.Z,null):I=null;let k=null;return Se!==void 0?k=Se:k=A.createElement(x.Z,null),{clearIcon:S,suffixIcon:b,itemIcon:I,removeIcon:k}}},8378:function(nn,Re){"use strict";const f=P=>({[P.componentCls]:{[`${P.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${P.motionDurationMid} ${P.motionEaseInOut},
opacity ${P.motionDurationMid} ${P.motionEaseInOut} !important`}},[`${P.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${P.motionDurationMid} ${P.motionEaseInOut},
opacity ${P.motionDurationMid} ${P.motionEaseInOut} !important`}}});Re.Z=f},92899:function(nn,Re,f){"use strict";f.d(Re,{Fm:function(){return B}});var P=f(36237),O=f(95406);const x=new P.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),z=new P.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),v=new P.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),F=new P.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),A=new P.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),xe=new P.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ce=new P.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),y=new P.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ie={"move-up":{inKeyframes:ce,outKeyframes:y},"move-down":{inKeyframes:x,outKeyframes:z},"move-left":{inKeyframes:v,outKeyframes:F},"move-right":{inKeyframes:A,outKeyframes:xe}},B=(Se,Te)=>{const{antCls:q}=Se,qe=`${q}-${Te}`,{inKeyframes:rt,outKeyframes:Ct}=Ie[Te];return[(0,O.R)(qe,rt,Ct,Se.motionDurationMid),{[`
${qe}-enter,
${qe}-appear
`]:{opacity:0,animationTimingFunction:Se.motionEaseOutCirc},[`${qe}-leave`]:{animationTimingFunction:Se.motionEaseInOutCirc}}]}},13826:function(nn,Re,f){"use strict";f.d(Re,{Qt:function(){return v},Uw:function(){return z},fJ:function(){return x},ly:function(){return F},oN:function(){return B}});var P=f(36237),O=f(95406);const x=new P.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),z=new P.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),v=new P.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),F=new P.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),A=new P.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),xe=new P.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),ce=new P.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),y=new P.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ie={"slide-up":{inKeyframes:x,outKeyframes:z},"slide-down":{inKeyframes:v,outKeyframes:F},"slide-left":{inKeyframes:A,outKeyframes:xe},"slide-right":{inKeyframes:ce,outKeyframes:y}},B=(Se,Te)=>{const{antCls:q}=Se,qe=`${q}-${Te}`,{inKeyframes:rt,outKeyframes:Ct}=Ie[Te];return[(0,O.R)(qe,rt,Ct,Se.motionDurationMid),{[`
${qe}-enter,
${qe}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:Se.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${qe}-leave`]:{animationTimingFunction:Se.motionEaseInQuint}}]}},89780:function(nn){(function(Re,f){nn.exports=f()})(this,function(){"use strict";var Re=navigator.userAgent,f=navigator.platform,P=/gecko\/\d/i.test(Re),O=/MSIE \d/.test(Re),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Re),z=/Edge\/(\d+)/.exec(Re),v=O||x||z,F=v&&(O?document.documentMode||6:+(z||x)[1]),A=!z&&/WebKit\//.test(Re),xe=A&&/Qt\/\d+\.\d+/.test(Re),ce=!z&&/Chrome\//.test(Re),y=/Opera\//.test(Re),Ie=/Apple Computer/.test(navigator.vendor),B=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Re),Se=/PhantomJS/.test(Re),Te=!z&&/AppleWebKit/.test(Re)&&/Mobile\/\w+/.test(Re),q=/Android/.test(Re),qe=Te||q||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Re),rt=Te||/Mac/.test(f),Ct=/\bCrOS\b/.test(Re),Mt=/win/i.test(f),oe=y&&Re.match(/Version\/(\d*\.\d*)/);oe&&(oe=Number(oe[1])),oe&&oe>=15&&(y=!1,A=!0);var Y=rt&&(xe||y&&(oe==null||oe<12.11)),S=P||v&&F>=9;function c(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,t){var r=e.className,n=c(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function I(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function k(e,t){return I(e).appendChild(t)}function D(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Ee(e,t,r,n){var i=D(e,t,r,n);return i.setAttribute("role","presentation"),i}var Ue;document.createRange?Ue=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:Ue=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function $e(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function Oe(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function yt(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function Ye(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!c(r[n]).test(t)&&(t+=" "+r[n]);return t}var Qe=function(e){e.select()};Te?Qe=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:v&&(Qe=function(e){try{e.select()}catch(t){}});function ge(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function G(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function me(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=n||0,a=i||0;;){var l=e.indexOf(" ",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}var fe=function(){this.id=null,this.f=null,this.time=0,this.handler=ge(this.onTimeout,this)};fe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},fe.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function se(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var ke=50,Be={toString:function(){return"CodeMirror.Pass"}},ye={scroll:!1},N={origin:"*mouse"},L={origin:"+move"};function V(e,t,r){for(var n=0,i=0;;){var o=e.indexOf(" ",n);o==-1&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}var Me=[""];function it(e){for(;Me.length<=e;)Me.push(Ze(Me)+" ");return Me[e]}function Ze(e){return e[e.length-1]}function ot(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function _e(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function R(){}function he(e,t){var r;return Object.create?r=Object.create(e):(R.prototype=e,r=new R),t&&G(t,r),r}var ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function j(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ae.test(e))}function X(e,t){return t?t.source.indexOf("\\w")>-1&&j(e)?!0:t.test(e):j(e)}function le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Q=/[\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 ue(e){return e.charCodeAt(0)>=768&&Q.test(e)}function Le(e,t,r){for(;(r<0?t>0:t<e.length)&&ue(e.charAt(t));)t+=r;return t}function ee(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function re(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),a.level==1?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var W=null;function be(e,t,r){var n;W=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&r=="before"?n=i:W=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:W=i)}return n!=null?n:W}var ve=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(u,p,g){this.level=u,this.from=p,this.to=g}return function(u,p){var g=p=="ltr"?"L":"R";if(u.length==0||p=="ltr"&&!n.test(u))return!1;for(var E=u.length,w=[],K=0;K<E;++K)w.push(r(u.charCodeAt(K)));for(var te=0,we=g;te<E;++te){var Fe=w[te];Fe=="m"?w[te]=we:we=Fe}for(var Xe=0,Ae=g;Xe<E;++Xe){var tt=w[Xe];tt=="1"&&Ae=="r"?w[Xe]="n":o.test(tt)&&(Ae=tt,tt=="r"&&(w[Xe]="R"))}for(var Ot=1,mt=w[0];Ot<E-1;++Ot){var jt=w[Ot];jt=="+"&&mt=="1"&&w[Ot+1]=="1"?w[Ot]="1":jt==","&&mt==w[Ot+1]&&(mt=="1"||mt=="n")&&(w[Ot]=mt),mt=jt}for(var Sn=0;Sn<E;++Sn){var Qn=w[Sn];if(Qn==",")w[Sn]="N";else if(Qn=="%"){var Tn=void 0;for(Tn=Sn+1;Tn<E&&w[Tn]=="%";++Tn);for(var Sr=Sn&&w[Sn-1]=="!"||Tn<E&&w[Tn]=="1"?"1":"N",hr=Sn;hr<Tn;++hr)w[hr]=Sr;Sn=Tn-1}}for(var Hn=0,vr=g;Hn<E;++Hn){var er=w[Hn];vr=="L"&&er=="1"?w[Hn]="L":o.test(er)&&(vr=er)}for(var jn=0;jn<E;++jn)if(i.test(w[jn])){var Zn=void 0;for(Zn=jn+1;Zn<E&&i.test(w[Zn]);++Zn);for(var Fn=(jn?w[jn-1]:g)=="L",pr=(Zn<E?w[Zn]:g)=="L",zi=Fn==pr?Fn?"L":"R":g,ai=jn;ai<Zn;++ai)w[ai]=zi;jn=Zn-1}for(var ir=[],Zr,Jn=0;Jn<E;)if(a.test(w[Jn])){var ba=Jn;for(++Jn;Jn<E&&a.test(w[Jn]);++Jn);ir.push(new s(0,ba,Jn))}else{var Vr=Jn,yi=ir.length,bi=p=="rtl"?1:0;for(++Jn;Jn<E&&w[Jn]!="L";++Jn);for(var sr=Vr;sr<Jn;)if(l.test(w[sr])){Vr<sr&&(ir.splice(yi,0,new s(1,Vr,sr)),yi+=bi);var Wi=sr;for(++sr;sr<Jn&&l.test(w[sr]);++sr);ir.splice(yi,0,new s(2,Wi,sr)),yi+=bi,Vr=sr}else++sr;Vr<Jn&&ir.splice(yi,0,new s(1,Vr,Jn))}return p=="ltr"&&(ir[0].level==1&&(Zr=u.match(/^\s+/))&&(ir[0].from=Zr[0].length,ir.unshift(new s(0,0,Zr[0].length))),Ze(ir).level==1&&(Zr=u.match(/\s+$/))&&(Ze(ir).to-=Zr[0].length,ir.push(new s(0,E-Zr[0].length,E)))),p=="rtl"?ir.reverse():ir}}();function Ne(e,t){var r=e.order;return r==null&&(r=e.order=ve(e.text,t)),r}var Ke=[],J=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Ke).concat(r)}};function at(e,t){return e._handlers&&e._handlers[t]||Ke}function He(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=se(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function dt(e,t){var r=at(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function bt(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),dt(e,r||t.type,e,t),Ut(t)||t.codemirrorIgnore}function rn(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)se(r,t[n])==-1&&r.push(t[n])}function _t(e,t){return at(e,t).length>0}function Nt(e){e.prototype.on=function(t,r){J(this,t,r)},e.prototype.off=function(t,r){He(this,t,r)}}function $t(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function en(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ut(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function sn(e){$t(e),en(e)}function Cn(e){return e.target||e.srcElement}function fn(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),rt&&e.ctrlKey&&t==1&&(t=3),t}var An=function(){if(v&&F<9)return!1;var e=D("div");return"draggable"in e||"dragDrop"in e}(),zn;function xn(e){if(zn==null){var t=D("span","\u200B");k(e,D("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(zn=t.offsetWidth<=1&&t.offsetHeight>2&&!(v&&F<8))}var r=zn?D("span","\u200B"):D("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Dn;function vn(e){if(Dn!=null)return Dn;var t=k(e,document.createTextNode("A\u062EA")),r=Ue(t,0,1).getBoundingClientRect(),n=Ue(t,1,2).getBoundingClientRect();return I(e),!r||r.left==r.right?!1:Dn=n.right-r.right<3}var In=`
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},wn=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},pn=function(){var e=D("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Pn=null;function on(e){if(Pn!=null)return Pn;var t=k(e,D("span","x")),r=t.getBoundingClientRect(),n=Ue(t,0,1).getBoundingClientRect();return Pn=Math.abs(r.left-n.left)>1}var Nn={},Wn={};function or(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Nn[e]=t}function gr(e,t){Wn[e]=t}function Jt(e){if(typeof e=="string"&&Wn.hasOwnProperty(e))e=Wn[e];else if(e&&typeof e.name=="string"&&Wn.hasOwnProperty(e.name)){var t=Wn[e.name];typeof t=="string"&&(t={name:t}),e=he(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Jt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Jt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function lt(e,t){t=Jt(t);var r=Nn[t.name];if(!r)return lt(e,"text/plain");var n=r(e,t);if(Kt.hasOwnProperty(t.name)){var i=Kt[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Kt={};function m(e,t){var r=Kt.hasOwnProperty(e)?Kt[e]:Kt[e]={};G(t,r)}function $(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Z(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),!(!r||r.mode==e));)t=r.state,e=r.mode;return r||{mode:e,state:t}}function h(e,t,r){return e.startState?e.startState(t,r):!0}var d=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};d.prototype.eol=function(){return this.pos>=this.string.length},d.prototype.sol=function(){return this.pos==this.lineStart},d.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},d.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},d.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},d.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},d.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},d.prototype.skipToEnd=function(){this.pos=this.string.length},d.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},d.prototype.backUp=function(e){this.pos-=e},d.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=me(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},d.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},d.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(a){return r?a.toLowerCase():a},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},d.prototype.current=function(){return this.string.slice(this.start,this.pos)},d.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},d.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},d.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function C(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function T(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(o){var a=o.text;i==r.line&&(a=a.slice(0,r.ch)),i==t.line&&(a=a.slice(t.ch)),n.push(a),++i}),n}function ie(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function H(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function _(e){if(e.parent==null)return null;for(var t=e.parent,r=se(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function de(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return r+a}function pe(e,t){return t>=e.first&&t<e.first+e.size}function ze(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function M(e,t,r){if(r===void 0&&(r=null),!(this instanceof M))return new M(e,t,r);this.line=e,this.ch=t,this.sticky=r}function U(e,t){return e.line-t.line||e.ch-t.ch}function Je(e,t){return e.sticky==t.sticky&&U(e,t)==0}function Ce(e){return M(e.line,e.ch)}function je(e,t){return U(e,t)<0?t:e}function Pe(e,t){return U(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ne(e,t){if(t.line<e.first)return M(e.first,0);var r=e.first+e.size-1;return t.line>r?M(r,C(e,r).text.length):et(t,C(e,t.line).text.length)}function et(e,t){var r=e.ch;return r==null||r>t?M(e.line,t):r<0?M(e.line,0):e}function St(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ne(e,t[n]);return r}var Lt=function(e,t){this.state=e,this.lookAhead=t},nt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};nt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},nt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},nt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},nt.fromSaved=function(e,t,r){return t instanceof Lt?new nt(e,$(e.mode,t.state),r,t.lookAhead):new nt(e,$(e.mode,t),r)},nt.prototype.save=function(e){var t=e!==!1?$(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Lt(t,this.maxLookAhead):t};function gt(e,t,r,n){var i=[e.state.modeGen],o={};Vt(e,t.text,e.doc.mode,r,function(u,p){return i.push(u,p)},o,n);for(var a=r.state,l=function(u){r.baseTokens=i;var p=e.state.overlays[u],g=1,E=0;r.state=!0,Vt(e,t.text,p.mode,r,function(w,K){for(var te=g;E<w;){var we=i[g];we>w&&i.splice(g,1,w,i[g+1],we),g+=2,E=Math.min(w,we)}if(K)if(p.opaque)i.splice(te,g-te,w,"overlay "+K),g=te+2;else for(;te<g;te+=2){var Fe=i[te+1];i[te+1]=(Fe?Fe+" ":"")+"overlay "+K}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Bt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=De(e,_(t)),i=t.text.length>e.options.maxHighlightLength&&$(e.doc.mode,n.state),o=gt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function De(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new nt(n,!0,t);var o=Dt(e,t,r),a=o>n.first&&C(n,o-1).stateAfter,l=a?nt.fromSaved(n,a,o):new nt(n,h(n.mode),o);return n.iter(o,t,function(s){Ge(e,s.text,l);var u=l.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function Ge(e,t,r,n){var i=e.doc.mode,o=new d(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&ct(i,r.state);!o.eol();)pt(i,o,r.state),o.start=o.pos}function ct(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Z(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function pt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Z(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var Wt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function kt(e,t,r,n){var i=e.doc,o=i.mode,a;t=ne(i,t);var l=C(i,t.line),s=De(e,t.line,r),u=new d(l.text,e.options.tabSize,s),p;for(n&&(p=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=pt(o,u,s.state),n&&p.push(new Wt(u,a,$(i.mode,s.state)));return n?p:new Wt(u,a,s.state)}function Gt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Vt(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,p=new d(t,e.options.tabSize,n),g,E=e.options.addModeClass&&[null];for(t==""&&Gt(ct(r,n.state),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(l=!1,a&&Ge(e,t,n,p.pos),p.pos=t.length,g=null):g=Gt(pt(r,p,n.state,E),o),E){var w=E[0].name;w&&(g="m-"+(g?w+" "+g:w))}if(!l||u!=g){for(;s<p.start;)s=Math.min(p.start,s+5e3),i(s,u);u=g}p.start=p.pos}for(;s<p.pos;){var K=Math.min(p.pos,s+5e3);i(K,u),s=K}}function Dt(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=C(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof Lt?u.lookAhead:0)<=o.modeFrontier))return l;var p=me(s.text,null,e.options.tabSize);(i==null||n>p)&&(i=l-1,n=p)}return i}function It(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=C(e,n).stateAfter;if(i&&(!(i instanceof Lt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var zt=!1,Rt=!1;function cn(){zt=!0}function Ft(){Rt=!0}function Ht(e,t,r){this.marker=e,this.from=t,this.to=r}function an(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Xt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function En(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Un(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&a.type=="bookmark"&&(!r||!o.marker.insertLeft)){var s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Ht(a,o.from,s?null:o.to))}}return n}function Tt(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&a.type=="bookmark"&&(!r||o.marker.insertLeft)){var s=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Ht(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function ft(e,t){if(t.full)return null;var r=pe(e,t.from.line)&&C(e,t.from.line).markedSpans,n=pe(e,t.to.line)&&C(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=U(t.from,t.to)==0,l=Un(r,i,a),s=Tt(n,o,a),u=t.text.length==1,p=Ze(t.text).length+(u?i:0);if(l)for(var g=0;g<l.length;++g){var E=l[g];if(E.to==null){var w=an(s,E.marker);w?u&&(E.to=w.to==null?null:w.to+p):E.to=i}}if(s)for(var K=0;K<s.length;++K){var te=s[K];if(te.to!=null&&(te.to+=p),te.from==null){var we=an(l,te.marker);we||(te.from=p,u&&(l||(l=[])).push(te))}else te.from+=p,u&&(l||(l=[])).push(te)}l&&(l=ht(l)),s&&s!=l&&(s=ht(s));var Fe=[l];if(!u){var Xe=t.text.length-2,Ae;if(Xe>0&&l)for(var tt=0;tt<l.length;++tt)l[tt].to==null&&(Ae||(Ae=[])).push(new Ht(l[tt].marker,null,null));for(var Ot=0;Ot<Xe;++Ot)Fe.push(Ae);Fe.push(s)}return Fe}function ht(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function qt(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(w){if(w.markedSpans)for(var K=0;K<w.markedSpans.length;++K){var te=w.markedSpans[K].marker;te.readOnly&&(!n||se(n,te)==-1)&&(n||(n=[])).push(te)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var u=i[s];if(!(U(u.to,l.from)<0||U(u.from,l.to)>0)){var p=[s,1],g=U(u.from,l.from),E=U(u.to,l.to);(g<0||!a.inclusiveLeft&&!g)&&p.push({from:u.from,to:l.from}),(E>0||!a.inclusiveRight&&!E)&&p.push({from:l.to,to:u.to}),i.splice.apply(i,p),s+=p.length-3}}return i}function tn(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Yt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function At(e){return e.inclusiveLeft?-1:0}function ln(e){return e.inclusiveRight?1:0}function gn(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=U(n.from,i.from)||At(e)-At(t);if(o)return-o;var a=U(n.to,i.to)||ln(e)-ln(t);return a||t.id-e.id}function mn(e,t){var r=Rt&&e.markedSpans,n;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||gn(n,i.marker)<0)&&(n=i.marker);return n}function Ln(e){return mn(e,!0)}function Ve(e){return mn(e,!1)}function We(e,t){var r=Rt&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!n||gn(n,o.marker)<0)&&(n=o.marker)}return n}function xt(e,t,r,n,i){var o=C(e,t),a=Rt&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),p=U(u.from,r)||At(s.marker)-At(i),g=U(u.to,n)||ln(s.marker)-ln(i);if(!(p>=0&&g<=0||p<=0&&g>=0)&&(p<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?U(u.to,r)>=0:U(u.to,r)>0)||p>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?U(u.from,n)<=0:U(u.from,n)<0)))return!0}}}function wt(e){for(var t;t=Ln(e);)e=t.find(-1,!0).line;return e}function hn(e){for(var t;t=Ve(e);)e=t.find(1,!0).line;return e}function xr(e){for(var t,r;t=Ve(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function _n(e,t){var r=C(e,t),n=wt(r);return r==n?t:_(n)}function Kn(e,t){if(t>e.lastLine())return t;var r=C(e,t),n;if(!$n(e,r))return t;for(;n=Ve(r);)r=n.find(1,!0).line;return _(r)+1}function $n(e,t){var r=Rt&&t.markedSpans;if(r){for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&kn(e,t,n))return!0}}}function kn(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return kn(e,n.line,an(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&kn(e,t,i))return!0}function Mn(e){e=wt(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function ur(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ln(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Ve(n);){var o=r.find(0,!0);t-=n.text.length-o.from.ch,n=o.to.line,t+=n.text.length-o.to.ch}return t}function qn(e){var t=e.display,r=e.doc;t.maxLine=C(r,r.first),t.maxLineLength=ur(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=ur(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var tr=function(e,t,r){this.text=e,Yt(this,t),this.height=r?r(this):1};tr.prototype.lineNo=function(){return _(this)},Nt(tr);function _r(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),tn(e),Yt(e,r);var i=n?n(e):1;i!=e.height&&H(e,i)}function Xr(e){e.parent=null,tn(e)}var li={},Yr={};function Cr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yr:li;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Qr(e,t){var r=Ee("span",null,null,A?"padding-right: .1px":null),n={pre:Ee("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Hi,vn(e.display.measure)&&(a=Ne(o,e.doc.direction))&&(n.addToken=si(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&_(o);xi(o,n,Bt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=Ye(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=Ye(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(xn(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(A){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return dt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ye(n.pre.className,n.textClass||"")),n}function Ir(e){var t=D("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Hi(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?Si(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,p;if(!s.test(t))e.col+=t.length,p=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,p),v&&F<9&&(u=!0),e.pos+=t.length;else{p=document.createDocumentFragment();for(var g=0;;){s.lastIndex=g;var E=s.exec(t),w=E?E.index-g:t.length-g;if(w){var K=document.createTextNode(l.slice(g,g+w));v&&F<9?p.appendChild(D("span",[K])):p.appendChild(K),e.map.push(e.pos,e.pos+w,K),e.col+=w,e.pos+=w}if(!E)break;g+=w+1;var te=void 0;if(E[0]==" "){var we=e.cm.options.tabSize,Fe=we-e.col%we;te=p.appendChild(D("span",it(Fe),"cm-tab")),te.setAttribute("role","presentation"),te.setAttribute("cm-text"," "),e.col+=Fe}else E[0]=="\r"||E[0]==`
`?(te=p.appendChild(D("span",E[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),te.setAttribute("cm-text",E[0]),e.col+=1):(te=e.cm.options.specialCharPlaceholder(E[0]),te.setAttribute("cm-text",E[0]),v&&F<9?p.appendChild(D("span",[te])):p.appendChild(te),e.col+=1);e.map.push(e.pos,e.pos+1,te),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var Xe=r||"";n&&(Xe+=n),i&&(Xe+=i);var Ae=D("span",[p],Xe,o);if(a)for(var tt in a)a.hasOwnProperty(tt)&&tt!="style"&&tt!="class"&&Ae.setAttribute(tt,a[tt]);return e.content.appendChild(Ae)}e.content.appendChild(p)}}function Si(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),n+=o,r=o==" "}return n}function si(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,p=u+n.length;;){for(var g=void 0,E=0;E<t.length&&(g=t[E],!(g.to>u&&g.from<=u));E++);if(g.to>=p)return e(r,n,i,o,a,l,s);e(r,n.slice(0,g.to-u),i,o,null,l,s),o=null,n=n.slice(g.to-u),u=g.to}}}function Kr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function xi(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var a=1;a<r.length;a+=2)t.addToken(t,i.slice(o,o=r[a]),Cr(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,p="",g,E,w=0,K,te,we,Fe,Xe;;){if(w==s){K=te=we=E="",Xe=null,Fe=null,w=1/0;for(var Ae=[],tt=void 0,Ot=0;Ot<n.length;++Ot){var mt=n[Ot],jt=mt.marker;if(jt.type=="bookmark"&&mt.from==s&&jt.widgetNode)Ae.push(jt);else if(mt.from<=s&&(mt.to==null||mt.to>s||jt.collapsed&&mt.to==s&&mt.from==s)){if(mt.to!=null&&mt.to!=s&&w>mt.to&&(w=mt.to,te=""),jt.className&&(K+=" "+jt.className),jt.css&&(E=(E?E+";":"")+jt.css),jt.startStyle&&mt.from==s&&(we+=" "+jt.startStyle),jt.endStyle&&mt.to==w&&(tt||(tt=[])).push(jt.endStyle,mt.to),jt.title&&((Xe||(Xe={})).title=jt.title),jt.attributes)for(var Sn in jt.attributes)(Xe||(Xe={}))[Sn]=jt.attributes[Sn];jt.collapsed&&(!Fe||gn(Fe.marker,jt)<0)&&(Fe=mt)}else mt.from>s&&w>mt.from&&(w=mt.from)}if(tt)for(var Qn=0;Qn<tt.length;Qn+=2)tt[Qn+1]==w&&(te+=" "+tt[Qn]);if(!Fe||Fe.from==s)for(var Tn=0;Tn<Ae.length;++Tn)Kr(t,0,Ae[Tn]);if(Fe&&(Fe.from||0)==s){if(Kr(t,(Fe.to==null?l+1:Fe.to)-s,Fe.marker,Fe.from==null),Fe.to==null)return;Fe.to==s&&(Fe=!1)}}if(s>=l)break;for(var Sr=Math.min(l,w);;){if(p){var hr=s+p.length;if(!Fe){var Hn=hr>Sr?p.slice(0,Sr-s):p;t.addToken(t,Hn,g?g+K:K,we,s+Hn.length==w?te:"",E,Xe)}if(hr>=Sr){p=p.slice(Sr-s),s=Sr;break}s=hr,we=""}p=i.slice(o,o=r[u++]),g=Cr(r[u++],t.cm.options)}}}function Ci(e,t,r){this.line=t,this.rest=xr(t),this.size=this.rest?_(Ze(this.rest))-r+1:1,this.node=this.text=null,this.hidden=$n(e,t)}function jr(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new Ci(e.doc,C(e.doc,o),o);i=o+a.size,n.push(a)}return n}var Ar=null;function ui(e){Ar?Ar.ops.push(e):e.ownsGroup=Ar={ops:[e],delayedCallbacks:[]}}function vt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Pt(e,t){var r=e.ownsGroup;if(r)try{vt(r)}finally{Ar=null,t(r)}}var Et=null;function st(e,t){var r=at(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ar?i=Ar.delayedCallbacks:Et?i=Et:(i=Et=[],setTimeout(yn,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function yn(){var e=Et;Et=null;for(var t=0;t<e.length;++t)e[t]()}function bn(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Gn(e,t):o=="gutter"?ci(e,t,r,n):o=="class"?Rr(e,t):o=="widget"&&Zi(e,t,n)}t.changes=null}function cr(e){return e.node==e.text&&(e.node=D("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),v&&F<8&&(e.node.style.zIndex=2)),e.node}function Mr(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=cr(t);t.background=n.insertBefore(D("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Nr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Qr(e,t)}function Gn(e,t){var r=t.text.className,n=Nr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Rr(e,t)):r&&(t.text.className=r)}function Rr(e,t){Mr(e,t),t.line.wrapClass?cr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function ci(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=cr(t);t.gutterBackground=D("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=cr(t),l=t.gutter=D("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(D("div",ze(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,p=o.hasOwnProperty(u)&&o[u];p&&l.appendChild(D("div",[p],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Zi(e,t,r){t.alignable&&(t.alignable=null);for(var n=c("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Wr(e,t,r)}function mo(e,t,r,n){var i=Nr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Rr(e,t),ci(e,t,r,n),Wr(e,t,n),t.node}function Wr(e,t,r){if(Lr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Lr(e,t.rest[n],t,r,!1)}function Lr(e,t,r,n,i){if(t.widgets)for(var o=cr(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=D("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Zo(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),st(s,"redraw")}}function Zo(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Tr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!$e(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),k(t.display.measure,D("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function $r(e,t){for(var r=Cn(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function wi(e){return e.lineSpace.offsetTop}function _i(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function yo(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=k(e.measure,D("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Dr(e){return ke-e.display.nativeBarWidth}function Hr(e){return e.display.scroller.clientWidth-Dr(e)-e.display.barWidth}function Ki(e){return e.display.scroller.clientHeight-Dr(e)-e.display.barHeight}function bo(e,t,r){var n=e.options.lineWrapping,i=n&&Hr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function ji(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(_(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function _o(e,t){t=wt(t);var r=_(t),n=e.display.externalMeasured=new Ci(e.doc,t,r);n.lineN=r;var i=n.built=Qr(e,n);return n.text=i.pre,k(e.display.lineMeasure,i.pre),n}function Ui(e,t,r,n){return Pr(e,Jr(e,t),r,n)}function ki(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[hi(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Jr(e,t){var r=_(t),n=ki(e,r);n&&!n.text?n=null:n&&n.changes&&(bn(e,n,r,ko(e)),e.curOp.forceUpdate=!0),n||(n=_o(e,t));var i=ji(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Pr(e,t,r,n,i){t.before&&(r=-1);var o=r+(n||""),a;return t.cache.hasOwnProperty(o)?a=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(bo(e,t.view,t.rect),t.hasHeights=!0),a=Qt(e,t,r,n),a.bogus||(t.cache[o]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var So={left:0,right:0,top:0,bottom:0};function Gi(e,t,r){for(var n,i,o,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(u==e.length-3||t==s&&e[u+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),i!=null){if(n=e[u+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),r=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],a="left";if(r=="right"&&i==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Vi(e,t){var r=So;if(t=="left")for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function Qt(e,t,r,n){var i=Gi(t.map,r,n),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var p=0;p<4;p++){for(;a&&ue(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&ue(t.line.text.charAt(i.coverStart+l));)++l;if(v&&F<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Vi(Ue(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}v&&F<11&&(u=Zt(e.display.measure,u))}else{a>0&&(s=n="right");var g;e.options.lineWrapping&&(g=o.getClientRects()).length>1?u=g[n=="right"?g.length-1:0]:u=o.getBoundingClientRect()}if(v&&F<9&&!a&&(!u||!u.left&&!u.right)){var E=o.parentNode.getClientRects()[0];E?u={left:E.left,right:E.left+Oi(e.display),top:E.top,bottom:E.bottom}:u=So}for(var w=u.top-t.rect.top,K=u.bottom-t.rect.top,te=(w+K)/2,we=t.view.measure.heights,Fe=0;Fe<we.length-1&&!(te<we[Fe]);Fe++);var Xe=Fe?we[Fe-1]:0,Ae=we[Fe],tt={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:Xe,bottom:Ae};return!u.left&&!u.right&&(tt.bogus=!0),e.options.singleCursorHeightPerLine||(tt.rtop=w,tt.rbottom=K),tt}function Zt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!on(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Vn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function nr(e){e.display.externalMeasure=null,I(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Vn(e.display.view[t])}function On(e){nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ar(){return ce&&q?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function mr(){return ce&&q?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ur(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Tr(e.widgets[r]));return t}function wr(e,t,r,n,i){if(!i){var o=Ur(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Mn(t);if(n=="local"?a+=wi(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(n=="window"?0:mr());var s=l.left+(n=="window"?0:ar());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function kr(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=ar(),i-=mr();else if(r=="local"||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Fr(e,t,r,n,i){return n||(n=C(e.doc,t.line)),wr(e,n,Ui(e,n,t.ch,i),r)}function yr(e,t,r,n,i,o){n=n||C(e.doc,t.line),i||(i=Jr(e,n));function a(K,te){var we=Pr(e,i,K,te?"right":"left",o);return te?we.left=we.right:we.right=we.left,wr(e,n,we,r)}var l=Ne(n,e.doc.direction),s=t.ch,u=t.sticky;if(s>=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a(u=="before"?s-1:s,u=="before");function p(K,te,we){var Fe=l[te],Xe=Fe.level==1;return a(we?K-1:K,Xe!=we)}var g=be(l,s,u),E=W,w=p(s,g,u=="before");return E!=null&&(w.other=p(s,E,u!="before")),w}function xa(e,t){var r=0;t=ne(e.doc,t),e.options.lineWrapping||(r=Oi(e.display)*t.ch);var n=C(e.doc,t.line),i=Mn(n)+wi(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Ko(e,t,r,n,i){var o=M(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function jo(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return Ko(n.first,0,null,-1,-1);var i=de(n,r),o=n.first+n.size-1;if(i>o)return Ko(n.first+n.size-1,C(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=C(n,i);;){var l=Zl(e,a,i,t,r),s=We(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=C(n,i=u.line)}}function Ca(e,t,r,n){n-=Ur(t);var i=t.text.length,o=ee(function(a){return Pr(e,r,a-1).bottom<=n},i,0);return i=ee(function(a){return Pr(e,r,a).top>n},o,i),{begin:o,end:i}}function wa(e,t,r,n){r||(r=Jr(e,t));var i=wr(e,t,Pr(e,r,n),"line").top;return Ca(e,t,r,i)}function Uo(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Zl(e,t,r,n,i){i-=Mn(t);var o=Jr(e,t),a=Ur(t),l=0,s=t.text.length,u=!0,p=Ne(t,e.doc.direction);if(p){var g=(e.options.lineWrapping?Kl:_l)(e,t,r,o,p,n,i);u=g.level!=1,l=u?g.from:g.to-1,s=u?g.to:g.from-1}var E=null,w=null,K=ee(function(Ot){var mt=Pr(e,o,Ot);return mt.top+=a,mt.bottom+=a,Uo(mt,n,i,!1)?(mt.top<=i&&mt.left<=n&&(E=Ot,w=mt),!0):!1},l,s),te,we,Fe=!1;if(w){var Xe=n-w.left<w.right-n,Ae=Xe==u;K=E+(Ae?0:1),we=Ae?"after":"before",te=Xe?w.left:w.right}else{!u&&(K==s||K==l)&&K++,we=K==0?"after":K==t.text.length?"before":Pr(e,o,K-(u?1:0)).bottom+a<=i==u?"after":"before";var tt=yr(e,M(r,K,we),"line",t,o);te=tt.left,Fe=i<tt.top?-1:i>=tt.bottom?1:0}return K=Le(t.text,K,1),Ko(r,K,we,Fe,n-te)}function _l(e,t,r,n,i,o,a){var l=ee(function(g){var E=i[g],w=E.level!=1;return Uo(yr(e,M(r,w?E.to:E.from,w?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,p=yr(e,M(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Uo(p,o,a,!0)&&p.top>a&&(s=i[l-1])}return s}function Kl(e,t,r,n,i,o,a){var l=Ca(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var p=null,g=null,E=0;E<i.length;E++){var w=i[E];if(!(w.from>=u||w.to<=s)){var K=w.level!=1,te=Pr(e,n,K?Math.min(u,w.to)-1:Math.max(s,w.from)).right,we=te<o?o-te+1e9:te-o;(!p||g>we)&&(p=w,g=we)}}return p||(p=i[i.length-1]),p.from<s&&(p={from:s,to:p.to,level:p.level}),p.to>u&&(p={from:p.from,to:u,level:p.level}),p}var fi;function Ei(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(fi==null){fi=D("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)fi.appendChild(document.createTextNode("x")),fi.appendChild(D("br"));fi.appendChild(document.createTextNode("x"))}k(e.measure,fi);var r=fi.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),I(e.measure),r||1}function Oi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=D("span","xxxxxxxxxx"),r=D("pre",[t],"CodeMirror-line-like");k(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ko(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=o.offsetLeft+o.clientLeft+i,n[l]=o.clientWidth}return{fixedPos:Go(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Go(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ea(e){var t=Ei(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Oi(e.display)-3);return function(i){if($n(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Vo(e){var t=e.doc,r=Ea(e);t.iter(function(n){var i=r(n);i!=n.height&&H(n,i)})}function di(e,t,r,n){var i=e.display;if(!r&&Cn(t).getAttribute("cm-not-content")=="true")return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(g){return null}var s=jo(e,o,a),u;if(n&&s.xRel>0&&(u=C(e.doc,s.line).text).length==s.ch){var p=me(u,u.length,e.options.tabSize)-u.length;s=M(s.line,Math.max(0,Math.round((o-yo(e.display).left)/Oi(e.display))-p))}return s}function hi(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function fr(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Rt&&_n(e.doc,t)<i.viewTo&&ei(e);else if(r<=i.viewFrom)Rt&&Kn(e.doc,r+n)>i.viewFrom?ei(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)ei(e);else if(t<=i.viewFrom){var o=xo(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):ei(e)}else if(r>=i.viewTo){var a=xo(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):ei(e)}else{var l=xo(e,t,t,-1),s=xo(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(jr(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):ei(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function qr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[hi(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);se(a,r)==-1&&a.push(r)}}}function ei(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function xo(e,t,r,n){var i=hi(e,t),o,a=e.display.view;if(!Rt||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(n>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,r+=o}for(;_n(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function jl(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=jr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=jr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(hi(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(jr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,hi(e,r)))),n.viewTo=r}function Oa(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function Xi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ia(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(!(!t&&a==r.sel.primIndex)){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Ma(e,l.head,i),s||Ul(e,l,o)}}return n}function Ma(e,t,r){var n=yr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(D("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(D("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Co(e,t){return e.top-t.top||e.left-t.left}function Ul(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=yo(e.display),l=a.left,s=Math.max(n.sizerWidth,Hr(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function p(Ae,tt,Ot,mt){tt<0&&(tt=0),tt=Math.round(tt),mt=Math.round(mt),o.appendChild(D("div",null,"CodeMirror-selected","position: absolute; left: "+Ae+`px;
top: `+tt+"px; width: "+(Ot==null?s-Ae:Ot)+`px;
height: `+(mt-tt)+"px"))}function g(Ae,tt,Ot){var mt=C(i,Ae),jt=mt.text.length,Sn,Qn;function Tn(Hn,vr){return Fr(e,M(Ae,Hn),"div",mt,vr)}function Sr(Hn,vr,er){var jn=wa(e,mt,null,Hn),Zn=vr=="ltr"==(er=="after")?"left":"right",Fn=er=="after"?jn.begin:jn.end-(/\s/.test(mt.text.charAt(jn.end-1))?2:1);return Tn(Fn,Zn)[Zn]}var hr=Ne(mt,i.direction);return re(hr,tt||0,Ot==null?jt:Ot,function(Hn,vr,er,jn){var Zn=er=="ltr",Fn=Tn(Hn,Zn?"left":"right"),pr=Tn(vr-1,Zn?"right":"left"),zi=tt==null&&Hn==0,ai=Ot==null&&vr==jt,ir=jn==0,Zr=!hr||jn==hr.length-1;if(pr.top-Fn.top<=3){var Jn=(u?zi:ai)&&ir,ba=(u?ai:zi)&&Zr,Vr=Jn?l:(Zn?Fn:pr).left,yi=ba?s:(Zn?pr:Fn).right;p(Vr,Fn.top,yi-Vr,Fn.bottom)}else{var bi,sr,Wi,Sa;Zn?(bi=u&&zi&&ir?l:Fn.left,sr=u?s:Sr(Hn,er,"before"),Wi=u?l:Sr(vr,er,"after"),Sa=u&&ai&&Zr?s:pr.right):(bi=u?Sr(Hn,er,"before"):l,sr=!u&&zi&&ir?s:Fn.right,Wi=!u&&ai&&Zr?l:pr.left,Sa=u?Sr(vr,er,"after"):s),p(bi,Fn.top,sr-bi,Fn.bottom),Fn.bottom<pr.top&&p(l,Fn.bottom,null,pr.top),p(Wi,pr.top,Sa-Wi,pr.bottom)}(!Sn||Co(Fn,Sn)<0)&&(Sn=Fn),Co(pr,Sn)<0&&(Sn=pr),(!Qn||Co(Fn,Qn)<0)&&(Qn=Fn),Co(pr,Qn)<0&&(Qn=pr)}),{start:Sn,end:Qn}}var E=t.from(),w=t.to();if(E.line==w.line)g(E.line,E.ch,w.ch);else{var K=C(i,E.line),te=C(i,w.line),we=wt(K)==wt(te),Fe=g(E.line,E.ch,we?K.text.length+1:null).end,Xe=g(w.line,we?0:null,w.ch).start;we&&(Fe.top<Xe.top-2?(p(Fe.right,Fe.top,null,Fe.bottom),p(l,Xe.top,Xe.left,Xe.bottom)):p(Fe.right,Fe.top,Xe.left-Fe.right,Fe.bottom)),Fe.bottom<Xe.top&&p(l,Fe.bottom,null,Xe.top)}r.appendChild(o)}function Xo(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ii(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ra(e){e.state.focused||(e.display.input.focus(),Yo(e))}function La(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ii(e))},100)}function Yo(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(dt(e,"focus",e,t),e.state.focused=!0,yt(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),A&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xo(e))}function Ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(dt(e,"blur",e,t),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function wo(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(v&&F<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-r,r=s}else{var u=i.node.getBoundingClientRect();a=u.bottom-u.top,!o&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-u.left-1)}var p=i.line.height-a;if((p>.005||p<-.005)&&(H(i.line,a),Ta(i.line),i.rest))for(var g=0;g<i.rest.length;g++)Ta(i.rest[g]);if(l>e.display.sizerWidth){var E=Math.ceil(l/Oi(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ta(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Eo(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-wi(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=de(t,n),a=de(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=de(t,Mn(C(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=de(t,Mn(C(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function kl(e,t){if(!bt(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!Se){var o=D("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-wi(e.display))+`px;
height: `+(t.bottom-t.top+Dr(e)+r.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Gl(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?M(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?M(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=yr(e,t),s=!r||r==t?l:yr(e,r);i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n};var u=Qo(e,i),p=e.doc.scrollTop,g=e.doc.scrollLeft;if(u.scrollTop!=null&&(Qi(e,u.scrollTop),Math.abs(e.doc.scrollTop-p)>1&&(a=!0)),u.scrollLeft!=null&&(vi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-g)>1&&(a=!0)),!a)break}return i}function Vl(e,t){var r=Qo(e,t);r.scrollTop!=null&&Qi(e,r.scrollTop),r.scrollLeft!=null&&vi(e,r.scrollLeft)}function Qo(e,t){var r=e.display,n=Ei(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=Ki(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+_i(r),s=t.top<n,u=t.bottom>l-n;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var p=Math.min(t.top,(u?l:t.bottom)-o);p!=i&&(a.scrollTop=p)}var g=e.options.fixedGutter?0:r.gutters.offsetWidth,E=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-g,w=Hr(e)-r.gutters.offsetWidth,K=t.right-t.left>w;return K&&(t.right=t.left+w),t.left<10?a.scrollLeft=0:t.left<E?a.scrollLeft=Math.max(0,t.left+g-(K?0:10)):t.right>w+E-3&&(a.scrollLeft=t.right+(K?0:10)-w),a}function Jo(e,t){t!=null&&(Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mi(e){Oo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yi(e,t,r){(t!=null||r!=null)&&Oo(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Xl(e,t){Oo(e),e.curOp.scrollToPos=t}function Oo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=xa(e,t.from),n=xa(e,t.to);Da(e,r,n,t.margin)}}function Da(e,t,r,n){var i=Qo(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yi(e,i.scrollLeft,i.scrollTop)}function Qi(e,t){Math.abs(e.doc.scrollTop-t)<2||(P||ea(e,{top:t}),Pa(e,t,!0),P&&ea(e),eo(e,100))}function Pa(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function vi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,Ba(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ji(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+_i(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Dr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var pi=function(e,t,r){this.cm=r;var n=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),J(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),J(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,v&&F<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},pi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pi.prototype.zeroWidthHack=function(){var e=rt&&!B?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new fe,this.disableVert=new fe},pi.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),o=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},pi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qi=function(){};qi.prototype.update=function(){return{bottom:0,right:0}},qi.prototype.setScrollLeft=function(){},qi.prototype.setScrollTop=function(){},qi.prototype.clear=function(){};function Ri(e,t){t||(t=Ji(e));var r=e.display.barWidth,n=e.display.barHeight;Fa(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&wo(e),Fa(e,Ji(e)),r=e.display.barWidth,n=e.display.barHeight}function Fa(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Aa={native:pi,null:qi};function Na(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Aa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),J(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?vi(e,t):Qi(e,t)},e),e.display.scrollbars.addClass&&yt(e.display.wrapper,e.display.scrollbars.addClass)}var Yl=0;function gi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Yl},ui(e.curOp)}function mi(e){var t=e.curOp;t&&Pt(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Ql(r)})}function Ql(e){for(var t=e.ops,r=0;r<t.length;r++)Jl(t[r]);for(var n=0;n<t.length;n++)ql(t[n]);for(var i=0;i<t.length;i++)es(t[i]);for(var o=0;o<t.length;o++)ts(t[o]);for(var a=0;a<t.length;a++)ns(t[a])}function Jl(e){var t=e.cm,r=t.display;is(t),e.updateMaxLine&&qn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ql(e){e.updatedDisplay=e.mustUpdate&&qo(e.cm,e.update)}function es(e){var t=e.cm,r=t.display;e.updatedDisplay&&wo(t),e.barMeasure=Ji(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ui(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Dr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Hr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function ts(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&vi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==Oe();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ri(t,e.barMeasure),e.updatedDisplay&&na(t,e.barMeasure),e.selectionChanged&&Xo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Ra(e.cm)}function ns(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&$a(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Pa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&vi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Gl(t,ne(n,e.scrollToPos.from),ne(n,e.scrollToPos.to),e.scrollToPos.margin);kl(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||dt(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&dt(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&dt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function br(e,t){if(e.curOp)return t();gi(e);try{return t()}finally{mi(e)}}function Xn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);gi(e);try{return t.apply(e,arguments)}finally{mi(e)}}}function lr(e){return function(){if(this.curOp)return e.apply(this,arguments);gi(this);try{return e.apply(this,arguments)}finally{mi(this)}}}function Yn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);gi(t);try{return e.apply(this,arguments)}finally{mi(t)}}}function eo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,ge(rs,e))}function rs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=De(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?$(t.mode,n.state):null,s=gt(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,p=s.classes;p?o.styleClasses=p:u&&(o.styleClasses=null);for(var g=!a||a.length!=o.styles.length||u!=p&&(!u||!p||u.bgClass!=p.bgClass||u.textClass!=p.textClass),E=0;!g&&E<a.length;++E)g=a[E]!=o.styles[E];g&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Ge(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return eo(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&br(e,function(){for(var o=0;o<i.length;o++)qr(e,i[o],"text")})}}var Io=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Eo(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Hr(e),this.force=r,this.dims=ko(e),this.events=[]};Io.prototype.signal=function(e,t){_t(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)dt.apply(null,this.events[e])};function is(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Dr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Dr(e)+"px",t.scrollbarsClipped=!0)}function os(e){if(e.hasFocus())return null;var t=Oe();if(!t||!$e(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&$e(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function as(e){if(!(!e||!e.activeElt||e.activeElt==Oe())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&$e(document.body,e.anchorNode)&&$e(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function qo(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return ei(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&Oa(e)==0)return!1;za(e)&&(ei(e),t.dims=ko(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Rt&&(o=_n(e.doc,o),a=Kn(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jl(e,o,a),r.viewOffset=Mn(C(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Oa(e);if(!l&&s==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=os(e);return s>4&&(r.lineDiv.style.display="none"),ls(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,as(u),I(r.cursorDiv),I(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,eo(e,400)),r.updateLineNumbers=null,!0}function $a(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Hr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+_i(e.display)-Ki(e),r.top)}),t.visible=Eo(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Eo(e.display,e.doc,r));if(!qo(e,t))break;wo(e);var i=Ji(e);Xi(e),Ri(e,i),na(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ea(e,t){var r=new Io(e,t);if(qo(e,r)){wo(e),$a(e,r);var n=Ji(e);Xi(e),Ri(e,n),na(e,n),r.finish()}}function ls(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function l(K){var te=K.nextSibling;return A&&rt&&e.display.currentWheelTarget==K?K.style.display="none":K.parentNode.removeChild(K),te}for(var s=n.view,u=n.viewFrom,p=0;p<s.length;p++){var g=s[p];if(!g.hidden)if(!g.node||g.node.parentNode!=o){var E=mo(e,g,u,r);o.insertBefore(E,a)}else{for(;a!=g.node;)a=l(a);var w=i&&t!=null&&t<=u&&g.lineNumber;g.changes&&(se(g.changes,"gutter")>-1&&(w=!1),bn(e,g,u,r)),w&&(I(g.lineNumber),g.lineNumber.appendChild(document.createTextNode(ze(e.options,u)))),a=g.node.nextSibling}u+=g.size}for(;a;)a=l(a)}function ta(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function na(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Dr(e)+"px"}function Ba(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=Go(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function za(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=ze(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(D("div",[D("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ta(e.display),!0}return!1}function ra(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null;if(typeof o!="string"&&(a=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Wa(e){var t=e.gutters,r=e.gutterSpecs;I(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,l=t.appendChild(D("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),o=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ta(e)}function to(e){Wa(e.display),fr(e),Ba(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=D("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=D("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=Ee("div",null,"CodeMirror-code"),i.selectionDiv=D("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=D("div",null,"CodeMirror-cursors"),i.measure=D("div",null,"CodeMirror-measure"),i.lineMeasure=D("div",null,"CodeMirror-measure"),i.lineSpace=Ee("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=Ee("div",[i.lineSpace],"CodeMirror-lines");i.mover=D("div",[o],null,"position: relative"),i.sizer=D("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=D("div",null,null,"position: absolute; height: "+ke+"px; width: 1px;"),i.gutters=D("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=D("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=D("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),v&&F<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!A&&!(P&&qe)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=ra(n.gutters,n.lineNumbers),Wa(i),r.init(i)}var Mo=0,Er=null;v?Er=-.53:P?Er=15:ce?Er=-.7:Ie&&(Er=-1/3);function Ha(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function us(e){var t=Ha(e);return t.x*=Er,t.y*=Er,t}function Za(e,t){var r=Ha(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&rt&&A){e:for(var u=t.target,p=o.view;u!=a;u=u.parentNode)for(var g=0;g<p.length;g++)if(p[g].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!P&&!y&&Er!=null){i&&s&&Qi(e,Math.max(0,a.scrollTop+i*Er)),vi(e,Math.max(0,a.scrollLeft+n*Er)),(!i||i&&s)&&$t(t),o.wheelStartX=null;return}if(i&&Er!=null){var E=i*Er,w=e.doc.scrollTop,K=w+o.wrapper.clientHeight;E<0?w=Math.max(0,w+E-50):K=Math.min(e.doc.height,K+E+50),ea(e,{top:w,bottom:K})}Mo<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(o.wheelStartX!=null){var te=a.scrollLeft-o.wheelStartX,we=a.scrollTop-o.wheelStartY,Fe=we&&o.wheelDY&&we/o.wheelDY||te&&o.wheelDX&&te/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Fe&&(Er=(Er*Mo+Fe)/(Mo+1),++Mo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Or=function(e,t){this.ranges=e,this.primIndex=t};Or.prototype.primary=function(){return this.ranges[this.primIndex]},Or.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Je(r.anchor,n.anchor)||!Je(r.head,n.head))return!1}return!0},Or.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new un(Ce(this.ranges[t].anchor),Ce(this.ranges[t].head));return new Or(e,this.primIndex)},Or.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Or.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(U(t,n.from())>=0&&U(e,n.to())<=0)return r}return-1};var un=function(e,t){this.anchor=e,this.head=t};un.prototype.from=function(){return Pe(this.anchor,this.head)},un.prototype.to=function(){return je(this.anchor,this.head)},un.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Br(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(E,w){return U(E.from(),w.from())}),r=se(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=U(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=Pe(l.from(),a.from()),p=je(l.to(),a.to()),g=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new un(g?p:u,g?u:p))}}return new Or(t,r)}function ti(e,t){return new Or([new un(e,t||e)],0)}function ni(e){return e.text?M(e.from.line+e.text.length-1,Ze(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function _a(e,t){if(U(e,t.from)<0)return e;if(U(e,t.to)<=0)return ni(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ni(t).ch-t.to.ch),M(r,n)}function ia(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new un(_a(i.anchor,t),_a(i.head,t)))}return Br(e.cm,r,e.sel.primIndex)}function Ka(e,t,r){return e.line==t.line?M(r.line,e.ch-t.ch+r.ch):M(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=M(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ka(l.from,i,o),u=Ka(ni(l),i,o);if(i=l.to,o=u,r=="around"){var p=e.sel.ranges[a],g=U(p.head,p.anchor)<0;n[a]=new un(g?u:s,g?s:u)}else n[a]=new un(s,s)}return new Or(n,e.sel.primIndex)}function oa(e){e.doc.mode=lt(e.options,e.doc.modeOption),no(e)}function no(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,eo(e,100),e.state.modeGen++,e.curOp&&fr(e)}function ja(e,t){return t.from.ch==0&&t.to.ch==0&&Ze(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function aa(e,t,r,n){function i(Xe){return r?r[Xe]:null}function o(Xe,Ae,tt){_r(Xe,Ae,tt,n),st(Xe,"change",Xe,t)}function a(Xe,Ae){for(var tt=[],Ot=Xe;Ot<Ae;++Ot)tt.push(new tr(u[Ot],i(Ot),n));return tt}var l=t.from,s=t.to,u=t.text,p=C(e,l.line),g=C(e,s.line),E=Ze(u),w=i(u.length-1),K=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(ja(e,t)){var te=a(0,u.length-1);o(g,g.text,w),K&&e.remove(l.line,K),te.length&&e.insert(l.line,te)}else if(p==g)if(u.length==1)o(p,p.text.slice(0,l.ch)+E+p.text.slice(s.ch),w);else{var we=a(1,u.length-1);we.push(new tr(E+p.text.slice(s.ch),w,n)),o(p,p.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,we)}else if(u.length==1)o(p,p.text.slice(0,l.ch)+u[0]+g.text.slice(s.ch),i(0)),e.remove(l.line+1,K);else{o(p,p.text.slice(0,l.ch)+u[0],i(0)),o(g,E+g.text.slice(s.ch),w);var Fe=a(1,u.length-1);K>1&&e.remove(l.line+1,K-1),e.insert(l.line+1,Fe)}st(e,"change",e,t)}function ri(e,t,r){function n(i,o,a){if(i.linked)for(var l=0;l<i.linked.length;++l){var s=i.linked[l];if(s.doc!=o){var u=a&&s.sharedHist;r&&!u||(t(s.doc,u),n(s.doc,i,u))}}}n(e,null,!0)}function Ua(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Vo(e),oa(e),ka(e),e.options.lineWrapping||qn(e),e.options.mode=t.modeOption,fr(e)}function ka(e){(e.doc.direction=="rtl"?yt:b)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){br(e,function(){ka(e),fr(e)})}function Ro(e){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=e||1}function la(e,t){var r={from:Ce(t.from),to:ni(t),text:T(e,t.from,t.to)};return Xa(e,r,t.from.line,t.to.line+1),ri(e,function(n){return Xa(n,r,t.from.line,t.to.line+1)},!0),r}function Ga(e){for(;e.length;){var t=Ze(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return Ga(e.done),Ze(e.done);if(e.done.length&&!Ze(e.done).ranges)return Ze(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ze(e.done)}function Va(e,t,r,n){var i=e.history;i.undone.length=0;var o=+new Date,a,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(a=ds(i,i.lastOp==n)))l=Ze(a.changes),U(t.from,t.to)==0&&U(t.from,l.to)==0?l.to=ni(t):a.changes.push(la(e,t));else{var s=Ze(i.done);for((!s||!s.ranges)&&Lo(e.sel,i.done),a={changes:[la(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||dt(e,"historyAdded")}function hs(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vs(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||hs(e,o,Ze(i.done),t))?i.done[i.done.length-1]=t:Lo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Ga(i.undone)}function Lo(e,t){var r=Ze(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Xa(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function ps(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function gs(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ps(r[i]));return n}function Ya(e,t){var r=gs(e,t),n=ft(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function Li(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?Or.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],p=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var g in u)(p=g.match(/^spans_(\d+)$/))&&se(t,Number(p[1]))>-1&&(Ze(l)[g]=u[g],delete u[g])}}return n}function sa(e,t,r,n){if(n){var i=e.anchor;if(r){var o=U(t,i)<0;o!=U(r,i)<0?(i=t,t=r):o!=U(t,r)<0&&(t=r)}return new un(i,t)}else return new un(r||t,t)}function To(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),rr(e,new Or([sa(e.sel.primary(),t,r,i)],0),n)}function Qa(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=sa(e.sel.ranges[o],t[o],null,i);var a=Br(e.cm,n,e.sel.primIndex);rr(e,a,r)}function ua(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,rr(e,Br(e.cm,i,e.sel.primIndex),n)}function Ja(e,t,r,n){rr(e,ti(t,r),n)}function ms(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new un(ne(e,i[o].anchor),ne(e,i[o].head))},origin:r&&r.origin};return dt(e,"beforeSelectionChange",e,n),e.cm&&dt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Br(e.cm,n.ranges,n.ranges.length-1):t}function qa(e,t,r){var n=e.history.done,i=Ze(n);i&&i.ranges?(n[n.length-1]=t,Do(e,t,r)):rr(e,t,r)}function rr(e,t,r){Do(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Do(e,t,r){(_t(e,"beforeSelectionChange")||e.cm&&_t(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(U(t.primary().head,e.sel.primary().head)<0?-1:1);el(e,nl(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Mi(e.cm)}function el(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,rn(e.cm)),st(e,"cursorActivity",e))}function tl(e){el(e,nl(e,e.sel,null,!1))}function nl(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Po(e,a.anchor,l&&l.anchor,r,n),u=Po(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new un(s,u))}return i?Br(e.cm,i,t.primIndex):t}function Ti(e,t,r,n,i){var o=C(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,p="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(p?l.to>=t.ch:l.to>t.ch))){if(i&&(dt(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var g=s.find(n<0?1:-1),E=void 0;if((n<0?p:u)&&(g=rl(e,g,-n,g&&g.line==t.line?o:null)),g&&g.line==t.line&&(E=U(g,r))&&(n<0?E<0:E>0))return Ti(e,g,t,n,i)}var w=s.find(n<0?-1:1);return(n<0?u:p)&&(w=rl(e,w,n,w.line==t.line?o:null)),w?Ti(e,w,t,n,i):null}}return t}function Po(e,t,r,n,i){var o=n||1,a=Ti(e,t,r,o,i)||!i&&Ti(e,t,r,o,!0)||Ti(e,t,r,-o,i)||!i&&Ti(e,t,r,-o,!0);return a||(e.cantEdit=!0,M(e.first,0))}function rl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ne(e,M(t.line-1)):null:r>0&&t.ch==(n||C(e,t.line)).text.length?t.line<e.first+e.size-1?M(t.line+1,0):null:new M(t.line,t.ch+r)}function il(e){e.setSelection(M(e.firstLine(),0),M(e.lastLine()),ye)}function ol(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,o,a,l){i&&(n.from=ne(e,i)),o&&(n.to=ne(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),dt(e,"beforeChange",e,n),e.cm&&dt(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Di(e,t,r){if(e.cm){if(!e.cm.curOp)return Xn(e.cm,Di)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((_t(e,"beforeChange")||e.cm&&_t(e.cm,"beforeChange"))&&(t=ol(e,t,!0),!t))){var n=zt&&!r&&qt(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)al(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else al(e,t)}}function al(e,t){if(!(t.text.length==1&&t.text[0]==""&&U(t.from,t.to)==0)){var r=ia(e,t);Va(e,t,r,e.cm?e.cm.curOp.id:NaN),ro(e,t,r,ft(e,t));var n=[];ri(e,function(i,o){!o&&se(n,i.history)==-1&&(cl(i.history,t),n.push(i.history)),ro(i,t,null,ft(i,t))})}}function Fo(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!r)){for(var i=e.history,o,a=e.sel,l=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u<l.length&&(o=l[u],!(r?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=l.pop(),o.ranges){if(Lo(o,s),r&&!o.equals(e.sel)){rr(e,o,{clearRedo:!1});return}a=o}else if(n){l.push(o);return}else break;var p=[];Lo(a,s),s.push({changes:p,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var g=_t(e,"beforeChange")||e.cm&&_t(e.cm,"beforeChange"),E=function(te){var we=o.changes[te];if(we.origin=t,g&&!ol(e,we,!1))return l.length=0,{};p.push(la(e,we));var Fe=te?ia(e,we):Ze(l);ro(e,we,Fe,Ya(e,we)),!te&&e.cm&&e.cm.scrollIntoView({from:we.from,to:ni(we)});var Xe=[];ri(e,function(Ae,tt){!tt&&se(Xe,Ae.history)==-1&&(cl(Ae.history,we),Xe.push(Ae.history)),ro(Ae,we,null,Ya(Ae,we))})},w=o.changes.length-1;w>=0;--w){var K=E(w);if(K)return K.v}}}}function ll(e,t){if(t!=0&&(e.first+=t,e.sel=new Or(ot(e.sel.ranges,function(i){return new un(M(i.anchor.line+t,i.anchor.ch),M(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){fr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)qr(e.cm,n,"gutter")}}function ro(e,t,r,n){if(e.cm&&!e.cm.curOp)return Xn(e.cm,ro)(e,t,r,n);if(t.to.line<e.first){ll(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ll(e,i),t={from:M(e.first,0),to:M(t.to.line+i,t.to.ch),text:[Ze(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:M(o,C(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=T(e,t.from,t.to),r||(r=ia(e,t)),e.cm?ys(e.cm,t,n):aa(e,t,n),Do(e,r,ye),e.cantEdit&&Po(e,M(e.firstLine(),0))&&(e.cantEdit=!1)}}function ys(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=_(wt(C(n,o.line))),n.iter(s,a.line+1,function(w){if(w==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&rn(e),aa(n,t,r,Ea(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(w){var K=ur(w);K>i.maxLineLength&&(i.maxLine=w,i.maxLineLength=K,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),It(n,o.line),eo(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?fr(e):o.line==a.line&&t.text.length==1&&!ja(e.doc,t)?qr(e,o.line,"text"):fr(e,o.line,a.line+1,u);var p=_t(e,"changes"),g=_t(e,"change");if(g||p){var E={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};g&&st(e,"change",e,E),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(E)}e.display.selForContextMenu=null}function Pi(e,t,r,n,i){var o;n||(n=r),U(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Di(e,{from:r,to:n,text:t,origin:i})}function sl(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ul(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)sl(o.ranges[l].anchor,t,r,n),sl(o.ranges[l].head,t,r,n);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(r<u.from.line)u.from=M(u.from.line+n,u.from.ch),u.to=M(u.to.line+n,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function cl(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ul(e.done,r,n,i),ul(e.undone,r,n,i)}function io(e,t,r,n){var i=t,o=t;return typeof t=="number"?o=C(e,ut(e,t)):i=_(t),i==null?null:(n(o,i)&&e.cm&&qr(e.cm,i,r),o)}function oo(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}oo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Xr(i),st(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function ao(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}ao.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof oo))){var l=[];this.collapse(l),this.children=[new oo(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new oo(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new ao(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=se(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ao(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if((t-=a)==0)break;e=0}else e-=o}}};var lo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};lo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=_(r);if(!(n==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Tr(this);H(r,Math.max(0,r.height-o)),e&&(br(e,function(){fl(e,r,-o),qr(e,n,"widget")}),st(e,"lineWidgetCleared",e,this,n))}},lo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Tr(this)-t;i&&($n(this.doc,n)||H(n,n.height+i),r&&br(r,function(){r.curOp.forceUpdate=!0,fl(r,n,i),st(r,"lineWidgetChanged",r,e,_(n))}))},Nt(lo);function fl(e,t,r){Mn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Jo(e,r)}function bs(e,t,r,n){var i=new lo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),io(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!$n(e,a)){var s=Mn(a)<e.scrollTop;H(a,a.height+Tr(i)),s&&Jo(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&st(o,"lineWidgetAdded",o,i,typeof t=="number"?t:_(t)),i}var dl=0,ii=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++dl};ii.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&gi(e),_t(this,"clear")){var r=this.find();r&&st(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=an(a.markedSpans,this);e&&!this.collapsed?qr(e,_(a),"text"):e&&(l.to!=null&&(i=_(a)),l.from!=null&&(n=_(a))),a.markedSpans=Xt(a.markedSpans,l),l.from==null&&this.collapsed&&!$n(this.doc,a)&&e&&H(a,Ei(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=wt(this.lines[s]),p=ur(u);p>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=p,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&fr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&tl(e.doc)),e&&st(e,"markerCleared",e,this,n,i),t&&mi(e),this.parent&&this.parent.clear()}},ii.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=an(o.markedSpans,this);if(a.from!=null&&(r=M(t?o:_(o),a.from),e==-1))return r;if(a.to!=null&&(n=M(t?o:_(o),a.to),e==1))return n}return r&&{from:r,to:n}},ii.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||br(n,function(){var i=t.line,o=_(t.line),a=ki(n,o);if(a&&(Vn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!$n(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=Tr(r)-l;s&&H(i,i.height+s)}st(n,"markerChanged",n,e)})},ii.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||se(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ii.prototype.detachLine=function(e){if(this.lines.splice(se(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Nt(ii);function Fi(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Xn(e.cm,Fi)(e,t,r,n,i);var o=new ii(e,i),a=U(t,r);if(n&&G(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Ee("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(xt(e,t.line,t,r,o)||t.line!=r.line&&xt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ft()}o.addToHistory&&Va(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,u;if(e.iter(l,r.line+1,function(g){s&&o.collapsed&&!s.options.lineWrapping&&wt(g)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&H(g,0),En(g,new Ht(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(g){$n(e,g)&&H(g,0)}),o.clearOnEnter&&J(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(cn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++dl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)fr(s,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var p=t.line;p<=r.line;p++)qr(s,p,"text");o.atomic&&tl(s.doc),st(s,"markerAdded",s,o)}return o}var so=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};so.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();st(this,"clear")}},so.prototype.find=function(e,t){return this.primary.find(e,t)},Nt(so);function Ss(e,t,r,n,i){n=G(n),n.shared=!1;var o=[Fi(e,t,r,n,i)],a=o[0],l=n.widgetNode;return ri(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Fi(s,ne(s,t),ne(s,r),n,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=Ze(o)}),new so(o,a)}function hl(e){return e.findMarks(M(e.first,0),e.clipPos(M(e.lastLine())),function(t){return t.parent})}function xs(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(U(o,a)){var l=Fi(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Cs(e){for(var t=function(n){var i=e[n],o=[i.primary.doc];ri(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];se(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var ws=0,dr=function(e,t,r,n,i){if(!(this instanceof dr))return new dr(e,t,r,n,i);r==null&&(r=0),ao.call(this,[new oo([new tr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=M(r,0);this.sel=ti(o),this.history=new Ro(null),this.id=++ws,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),aa(this,{from:o,to:o,text:e}),rr(this,ti(o),ye)};dr.prototype=he(ao.prototype,{constructor:dr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ie(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=M(this.first,0),r=this.first+this.size-1;Di(this,{from:t,to:M(r,C(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yi(this.cm,0,0),rr(this,ti(t),ye)}),replaceRange:function(e,t,r,n){t=ne(this,t),r=r?ne(this,r):t,Pi(this,e,t,r,n)},getRange:function(e,t,r){var n=T(this,ne(this,e),ne(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pe(this,e))return C(this,e)},getLineNumber:function(e){return _(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=C(this,e)),wt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ne(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yn(function(e,t,r){Ja(this,ne(this,typeof e=="number"?M(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ja(this,ne(this,e),ne(this,t||e),r)}),extendSelection:Yn(function(e,t,r){To(this,ne(this,e),t&&ne(this,t),r)}),extendSelections:Yn(function(e,t){Qa(this,St(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=ot(this.sel.ranges,e);Qa(this,St(this,r),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new un(ne(this,e[i].anchor),ne(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),rr(this,Br(this.cm,n,t),r)}}),addSelection:Yn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new un(ne(this,e),ne(this,t||e))),rr(this,Br(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=T(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=T(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Yn(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&t!="end"&&cs(this,n,t),s=n.length-1;s>=0;s--)Di(this,n[s]);l?qa(this,l):this.cm&&Mi(this.cm)}),undo:Yn(function(){Fo(this,"undo")}),redo:Yn(function(){Fo(this,"redo")}),undoSelection:Yn(function(){Fo(this,"undo",!0)}),redoSelection:Yn(function(){Fo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ro(this.history.maxGeneration),ri(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Li(this.history.done),undone:Li(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history.maxGeneration);t.done=Li(e.done.slice(0),null,!0),t.undone=Li(e.undone.slice(0),null,!0)},setGutterMarker:Yn(function(e,t,r){return io(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&le(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Yn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&io(t,r,"gutter",function(){return r.gutterMarkers[e]=null,le(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!pe(this,e)||(t=e,e=C(this,e),!e))return null}else if(t=_(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(c(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=n[i];if(o)if(r==null)n[i]=null;else{var a=o.match(c(r));if(!a)return!1;var l=a.index+a[0].length;n[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:Yn(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Fi(this,ne(this,e),ne(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ne(this,e),Fi(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ne(this,e);var t=[],r=C(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=ne(this,e),t=ne(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];!(s.to!=null&&i==e.line&&e.ch>=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!r||r(s.marker))&&n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),ne(this,M(r,t))},indexFromPos:function(e){e=ne(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new dr(ie(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new dr(ie(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],xs(n,hl(this)),n},unlinkDoc:function(e){if(e instanceof Rn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Cs(hl(this));break}}if(e.history==this.history){var n=[e.id];ri(e,function(i){return n.push(i.id)},!0),e.history=new Ro(null),e.history.done=Li(this.history.done,n),e.history.undone=Li(this.history.undone,n)}},iterLinkedDocs:function(e){ri(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):In(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Yn(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fs(this.cm))})}),dr.prototype.eachLine=dr.prototype.iter;var vl=0;function Es(e){var t=this;if(pl(t),!(bt(t,e)||$r(t.display,e))){$t(e),v&&(vl=+new Date);var r=di(t,e,!0),n=e.dataTransfer.files;if(!(!r||t.isReadOnly()))if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(){++a==i&&Xn(t,function(){r=ne(t.doc,r);var w={from:r,to:r,text:t.doc.splitLines(o.filter(function(K){return K!=null}).join(t.doc.lineSeparator())),origin:"paste"};Di(t.doc,w),qa(t.doc,ti(ne(t.doc,r),ne(t.doc,ni(w))))})()},s=function(w,K){if(t.options.allowDropFileTypes&&se(t.options.allowDropFileTypes,w.type)==-1){l();return}var te=new FileReader;te.onerror=function(){return l()},te.onload=function(){var we=te.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(we)){l();return}o[K]=we,l()},te.readAsText(w)},u=0;u<n.length;u++)s(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var p=e.dataTransfer.getData("Text");if(p){var g;if(t.state.draggingText&&!t.state.draggingText.copy&&(g=t.listSelections()),Do(t.doc,ti(r,r)),g)for(var E=0;E<g.length;++E)Pi(t.doc,"",g[E].anchor,g[E].head,"drag");t.replaceSelection(p,"around","paste"),t.display.input.focus()}}catch(w){}}}}function Os(e,t){if(v&&(!e.state.draggingText||+new Date-vl<100)){sn(t);return}if(!(bt(e,t)||$r(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ie)){var r=D("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",y&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),y&&r.parentNode.removeChild(r)}}function Is(e,t){var r=di(e,t);if(r){var n=document.createDocumentFragment();Ma(e,r,n),e.display.dragCursor||(e.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),k(e.display.dragCursor,n)}}function pl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function gl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var o=0;o<r.length;o++)e(r[o])})}}var ml=!1;function Ms(){ml||(Rs(),ml=!0)}function Rs(){var e;J(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gl(Ls)},100))}),J(window,"blur",function(){return gl(Ii)})}function Ls(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var oi={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"},uo=0;uo<10;uo++)oi[uo+48]=oi[uo+96]=String(uo);for(var Ao=65;Ao<=90;Ao++)oi[Ao]=String.fromCharCode(Ao);for(var co=1;co<=12;co++)oi[co+111]=oi[co+63235]="F"+co;var Gr={};Gr.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"},Gr.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"},Gr.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"},Gr.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"]},Gr.default=rt?Gr.macDefault:Gr.pcDefault;function Ts(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Ds(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=ot(r.split(" "),Ts),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(!s)t[l]=a;else if(s!=a)throw new Error("Inconsistent bindings for "+l)}delete e[r]}for(var u in t)e[u]=t[u];return e}function Ai(e,t,r,n){t=No(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ai(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Ai(e,t.fallthrough[o],r,n);if(a)return a}}}function yl(e){var t=typeof e=="string"?e:oi[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function bl(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Y?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Y?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Sl(e,t){if(y&&e.keyCode==34&&e.char)return!1;var r=oi[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),bl(r,e,t))}function No(e){return typeof e=="string"?Gr[e]:e}function Ni(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&U(o.from,Ze(n).to)<=0;){var a=n.pop();if(U(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}br(e,function(){for(var l=n.length-1;l>=0;l--)Pi(e.doc,"",n[l].from,n[l].to,"+delete");Mi(e)})}function ca(e,t,r){var n=Le(e.text,t+r,r);return n<0||n>e.text.length?null:n}function fa(e,t,r){var n=ca(e,t.ch,r);return n==null?null:new M(t.line,n,r<0?"after":"before")}function da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Ne(r,t.doc.direction);if(o){var a=i<0?Ze(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var p=Jr(t,r);u=i<0?r.text.length-1:0;var g=Pr(t,p,u).top;u=ee(function(E){return Pr(t,p,E).top==g},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=ca(r,u,1))}else u=i<0?a.to:a.from;return new M(n,u,s)}}return new M(n,i<0?r.text.length:0,i<0?"before":"after")}function Ps(e,t,r,n){var i=Ne(t,e.doc.direction);if(!i)return fa(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=be(i,r.ch,r.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return fa(t,r,n);var l=function(Fe,Xe){return ca(t,Fe instanceof M?Fe.ch:Fe,Xe)},s,u=function(Fe){return e.options.lineWrapping?(s=s||Jr(e,t),wa(e,t,s,Fe)):{begin:0,end:t.text.length}},p=u(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var g=a.level==1==n<0,E=l(r,g?1:-1);if(E!=null&&(g?E<=a.to&&E<=p.end:E>=a.from&&E>=p.begin)){var w=g?"before":"after";return new M(r.line,E,w)}}var K=function(Fe,Xe,Ae){for(var tt=function(Sn,Qn){return Qn?new M(r.line,l(Sn,1),"before"):new M(r.line,Sn,"after")};Fe>=0&&Fe<i.length;Fe+=Xe){var Ot=i[Fe],mt=Xe>0==(Ot.level!=1),jt=mt?Ae.begin:l(Ae.end,-1);if(Ot.from<=jt&&jt<Ot.to||(jt=mt?Ot.from:l(Ot.to,-1),Ae.begin<=jt&&jt<Ae.end))return tt(jt,mt)}},te=K(o+n,n,p);if(te)return te;var we=n>0?p.end:l(p.begin,-1);return we!=null&&!(n>0&&we==t.text.length)&&(te=K(n>0?0:i.length-1,n,u(we)),te)?te:null}var fo={selectAll:il,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ye)},killLine:function(e){return Ni(e,function(t){if(t.empty()){var r=C(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:M(t.head.line+1,0)}:{from:t.head,to:M(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ni(e,function(t){return{from:M(t.from().line,0),to:ne(e.doc,M(t.to().line+1,0))}})},delLineLeft:function(e){return Ni(e,function(t){return{from:M(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Ni(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Ni(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(M(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(M(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return xl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Cl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Fs(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},L)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},L)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Cl(e,t.head):n},L)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=me(e.getLine(o.line),o.ch,n);t.push(it(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return br(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=C(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new M(i.line,i.ch-1)),i.ch>0)i=new M(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),M(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=C(e.doc,i.line-1).text;a&&(i=new M(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),M(i.line-1,a.length-1),i,"+transpose"))}}r.push(new un(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return br(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Mi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function xl(e,t){var r=C(e.doc,t),n=wt(r);return n!=r&&(t=_(n)),da(!0,e,n,t,1)}function Fs(e,t){var r=C(e.doc,t),n=hn(r);return n!=r&&(t=_(n)),da(!0,e,r,t,-1)}function Cl(e,t){var r=xl(e,t.line),n=C(e.doc,r.line),i=Ne(n,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return M(r.line,a?0:o,r.sticky)}return r}function $o(e,t,r){if(typeof t=="string"&&(t=fo[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Be}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function As(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ai(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ai(t,e.options.extraKeys,r,e)||Ai(t,e.options.keyMap,r,e)}var Ns=new fe;function ho(e,t,r,n){var i=e.state.keySeq;if(i){if(yl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ns.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),wl(e,i+" "+t,r,n))return!0}return wl(e,t,r,n)}function wl(e,t,r,n){var i=As(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&st(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&($t(r),Xo(e)),!!i}function El(e,t){var r=Sl(t,!0);return r?t.shiftKey&&!e.state.keySeq?ho(e,"Shift-"+r,t,function(n){return $o(e,n,!0)})||ho(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return $o(e,n)}):ho(e,r,t,function(n){return $o(e,n)}):!1}function $s(e,t,r){return ho(e,"'"+r+"'",t,function(n){return $o(e,n,!0)})}var ha=null;function Ol(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=Oe(),!bt(t,e))){v&&F<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=El(t,e);y&&(ha=n?r:null,!n&&r==88&&!pn&&(rt?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),P&&!rt&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bs(t)}}function Bs(e){var t=e.display.lineDiv;yt(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(b(t,"CodeMirror-crosshair"),He(document,"keyup",r),He(document,"mouseover",r))}J(document,"keyup",r),J(document,"mouseover",r)}function Il(e){e.keyCode==16&&(this.doc.sel.shift=!1),bt(this,e)}function Ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!($r(t.display,e)||bt(t,e)||e.ctrlKey&&!e.altKey||rt&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(y&&r==ha){ha=null,$t(e);return}if(!(y&&(!e.which||e.which<10)&&El(t,e))){var i=String.fromCharCode(n==null?r:n);i!="\b"&&($s(t,e,i)||t.display.input.onKeyPress(e))}}}var zs=400,va=function(e,t,r){this.time=e,this.pos=t,this.button=r};va.prototype.compare=function(e,t,r){return this.time+zs>e&&U(t,this.pos)==0&&r==this.button};var vo,po;function Ws(e,t){var r=+new Date;return po&&po.compare(r,e,t)?(vo=po=null,"triple"):vo&&vo.compare(r,e,t)?(po=new va(r,e,t),vo=null,"double"):(vo=new va(r,e,t),po=null,"single")}function Rl(e){var t=this,r=t.display;if(!(bt(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,$r(r,e)){A||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!pa(t,e)){var n=di(t,e),i=fn(e),o=n?Ws(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Hs(t,i,n,o,e))&&(i==1?n?_s(t,n,o,e):Cn(e)==r.scroller&&$t(e):i==2?(n&&To(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(S?t.display.input.onContextMenu(e):La(t)))}}}function Hs(e,t,r,n,i){var o="Click";return n=="double"?o="Double"+o:n=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,ho(e,bl(o,i),i,function(a){if(typeof a=="string"&&(a=fo[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,r)!=Be}finally{e.state.suppressEdits=!1}return l})}function Zs(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var o=Ct?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=rt?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(rt?r.altKey:r.ctrlKey)),i}function _s(e,t,r,n){v?setTimeout(ge(Ra,e),0):e.curOp.focus=Oe();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&An&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(U((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(U(a.to(),t)>0||t.xRel<0)?Ks(e,n,t,i):js(e,n,t,i)}function Ks(e,t,r,n){var i=e.display,o=!1,a=Xn(e,function(u){A&&(i.scroller.draggable=!1),e.state.draggingText=!1,He(i.wrapper.ownerDocument,"mouseup",a),He(i.wrapper.ownerDocument,"mousemove",l),He(i.scroller,"dragstart",s),He(i.scroller,"drop",a),o||($t(u),n.addNew||To(e.doc,r,null,null,n.extend),A&&!Ie||v&&F==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};A&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),J(i.wrapper.ownerDocument,"mouseup",a),J(i.wrapper.ownerDocument,"mousemove",l),J(i.scroller,"dragstart",s),J(i.scroller,"drop",a),La(e),setTimeout(function(){return i.input.focus()},20)}function Ll(e,t,r){if(r=="char")return new un(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new un(M(t.line,0),ne(e.doc,M(t.line+1,0)));var n=r(e,t);return new un(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;$t(t);var a,l,s=o.sel,u=s.ranges;if(n.addNew&&!n.extend?(l=o.sel.contains(r),l>-1?a=u[l]:a=new un(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new un(r,r)),r=di(e,t,!0,!0),l=-1;else{var p=Ll(e,r,n.unit);n.extend?a=sa(a,p.anchor,p.head,n.extend):a=p}n.addNew?l==-1?(l=u.length,rr(o,Br(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(rr(o,Br(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):ua(o,l,a,N):(l=0,rr(o,new Or([a],0),N),s=o.sel);var g=r;function E(Ae){if(U(g,Ae)!=0)if(g=Ae,n.unit=="rectangle"){for(var tt=[],Ot=e.options.tabSize,mt=me(C(o,r.line).text,r.ch,Ot),jt=me(C(o,Ae.line).text,Ae.ch,Ot),Sn=Math.min(mt,jt),Qn=Math.max(mt,jt),Tn=Math.min(r.line,Ae.line),Sr=Math.min(e.lastLine(),Math.max(r.line,Ae.line));Tn<=Sr;Tn++){var hr=C(o,Tn).text,Hn=V(hr,Sn,Ot);Sn==Qn?tt.push(new un(M(Tn,Hn),M(Tn,Hn))):hr.length>Hn&&tt.push(new un(M(Tn,Hn),M(Tn,V(hr,Qn,Ot))))}tt.length||tt.push(new un(r,r)),rr(o,Br(e,s.ranges.slice(0,l).concat(tt),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ae)}else{var vr=a,er=Ll(e,Ae,n.unit),jn=vr.anchor,Zn;U(er.anchor,jn)>0?(Zn=er.head,jn=Pe(vr.from(),er.anchor)):(Zn=er.anchor,jn=je(vr.to(),er.head));var Fn=s.ranges.slice(0);Fn[l]=Us(e,new un(ne(o,jn),Zn)),rr(o,Br(e,Fn,l),N)}}var w=i.wrapper.getBoundingClientRect(),K=0;function te(Ae){var tt=++K,Ot=di(e,Ae,!0,n.unit=="rectangle");if(Ot)if(U(Ot,g)!=0){e.curOp.focus=Oe(),E(Ot);var mt=Eo(i,o);(Ot.line>=mt.to||Ot.line<mt.from)&&setTimeout(Xn(e,function(){K==tt&&te(Ae)}),150)}else{var jt=Ae.clientY<w.top?-20:Ae.clientY>w.bottom?20:0;jt&&setTimeout(Xn(e,function(){K==tt&&(i.scroller.scrollTop+=jt,te(Ae))}),50)}}function we(Ae){e.state.selectingText=!1,K=1/0,Ae&&($t(Ae),i.input.focus()),He(i.wrapper.ownerDocument,"mousemove",Fe),He(i.wrapper.ownerDocument,"mouseup",Xe),o.history.lastSelOrigin=null}var Fe=Xn(e,function(Ae){Ae.buttons===0||!fn(Ae)?we(Ae):te(Ae)}),Xe=Xn(e,we);e.state.selectingText=Xe,J(i.wrapper.ownerDocument,"mousemove",Fe),J(i.wrapper.ownerDocument,"mouseup",Xe)}function Us(e,t){var r=t.anchor,n=t.head,i=C(e.doc,r.line);if(U(r,n)==0&&r.sticky==n.sticky)return t;var o=Ne(i);if(!o)return t;var a=be(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s=a+(l.from==r.ch==(l.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var p=be(o,n.ch,n.sticky),g=p-a||(n.ch-r.ch)*(l.level==1?-1:1);p==s-1||p==s?u=g<0:u=g>0}var E=o[s+(u?-1:0)],w=u==(E.level==1),K=w?E.from:E.to,te=w?"after":"before";return r.ch==K&&r.sticky==te?t:new un(new M(r.line,K,te),n)}function Tl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(E){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&$t(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!_t(e,r))return Ut(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){var p=de(e.doc,o),g=e.display.gutterSpecs[s];return dt(e,r,e,p,g.className,t),Ut(t)}}}function pa(e,t){return Tl(e,t,"gutterClick",!0)}function Dl(e,t){$r(e.display,t)||ks(e,t)||bt(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function ks(e,t){return _t(e,"gutterContextMenu")?Tl(e,t,"gutterContextMenu",!1):!1}function Pl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),On(e)}var $i={toString:function(){return"CodeMirror.Init"}},Fl={},Bo={};function Gs(e){var t=e.optionHandlers;function r(n,i,o,a){e.defaults[n]=i,o&&(t[n]=a?function(l,s,u){u!=$i&&o(l,s,u)}:o)}e.defineOption=r,e.Init=$i,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,oa(n)},!0),r("indentUnit",2,oa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){no(n),On(n),fr(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!!i){var o=[],a=n.doc.first;n.doc.iter(function(s){for(var u=0;;){var p=s.text.indexOf(i,u);if(p==-1)break;u=p+i.length,o.push(M(a,p))}a++});for(var l=o.length-1;l>=0;l--)Pi(n.doc,i,o[l],M(o[l].line,o[l].ch+i.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,o){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=$i&&n.refresh()}),r("specialCharPlaceholder",Ir,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",qe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!Mt),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Pl(n),to(n)},!0),r("keyMap","default",function(n,i,o){var a=No(i),l=o!=$i&&No(o);l&&l.detach&&l.detach(n,a),a.attach&&a.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Xs,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=ra(i,n.options.lineNumbers),to(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?Go(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Ri(n)},!0),r("scrollbarStyle","native",function(n){Na(n),Ri(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=ra(n.options.gutters,i),to(n)},!0),r("firstLineNumber",1,to,!0),r("lineNumberFormatter",function(n){return n},to,!0),r("showCursorWhenSelecting",!1,Xi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Ii(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Vs),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Xi,!0),r("singleCursorHeightPerLine",!0,Xi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,no,!0),r("addModeClass",!1,no,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,no,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Vs(e,t,r){var n=r&&r!=$i;if(!t!=!n){var i=e.display.dragFunctions,o=t?J:He;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Xs(e){e.options.lineWrapping?(yt(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),qn(e)),Vo(e),fr(e),On(e),setTimeout(function(){return Ri(e)},100)}function Rn(e,t){var r=this;if(!(this instanceof Rn))return new Rn(e,t);this.options=t=t?G(t):{},G(Fl,t,!1);var n=t.value;typeof n=="string"?n=new dr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Rn.inputStyles[t.inputStyle](this),o=this.display=new ss(e,n,i,t);o.wrapper.CodeMirror=this,Pl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Na(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new fe,keySeq:null,specialChars:null},t.autofocus&&!qe&&o.input.focus(),v&&F<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Ms(),gi(this),this.curOp.forceUpdate=!0,Ua(this,n),t.autofocus&&!qe||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Yo(r)},20):Ii(this);for(var a in Bo)Bo.hasOwnProperty(a)&&Bo[a](this,t[a],$i);za(this),t.finishInit&&t.finishInit(this);for(var l=0;l<ga.length;++l)ga[l](this);mi(this),A&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Rn.defaults=Fl,Rn.optionHandlers=Bo;function Ys(e){var t=e.display;J(t.scroller,"mousedown",Xn(e,Rl)),v&&F<11?J(t.scroller,"dblclick",Xn(e,function(s){if(!bt(e,s)){var u=di(e,s);if(!(!u||pa(e,s)||$r(e.display,s))){$t(s);var p=e.findWordAt(u);To(e.doc,p.anchor,p.head)}}})):J(t.scroller,"dblclick",function(s){return bt(e,s)||$t(s)}),J(t.scroller,"contextmenu",function(s){return Dl(e,s)}),J(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Dl(e,s)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function o(s){if(s.touches.length!=1)return!1;var u=s.touches[0];return u.radiusX<=1&&u.radiusY<=1}function a(s,u){if(u.left==null)return!0;var p=u.left-s.left,g=u.top-s.top;return p*p+g*g>20*20}J(t.scroller,"touchstart",function(s){if(!bt(e,s)&&!o(s)&&!pa(e,s)){t.input.ensurePolled(),clearTimeout(r);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-n.end<=300?n:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),J(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),J(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!$r(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var p=e.coordsChar(t.activeTouch,"page"),g;!u.prev||a(u,u.prev)?g=new un(p,p):!u.prev.prev||a(u,u.prev.prev)?g=e.findWordAt(p):g=new un(M(p.line,0),ne(e.doc,M(p.line+1,0))),e.setSelection(g.anchor,g.head),e.focus(),$t(s)}i()}),J(t.scroller,"touchcancel",i),J(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),dt(e,"scroll",e))}),J(t.scroller,"mousewheel",function(s){return Za(e,s)}),J(t.scroller,"DOMMouseScroll",function(s){return Za(e,s)}),J(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){bt(e,s)||sn(s)},over:function(s){bt(e,s)||(Is(e,s),sn(s))},start:function(s){return Os(e,s)},drop:Xn(e,Es),leave:function(s){bt(e,s)||pl(e)}};var l=t.input.getField();J(l,"keyup",function(s){return Il.call(e,s)}),J(l,"keydown",Xn(e,Ol)),J(l,"keypress",Xn(e,Ml)),J(l,"focus",function(s){return Yo(e,s)}),J(l,"blur",function(s){return Ii(e,s)})}var ga=[];Rn.defineInitHook=function(e){return ga.push(e)};function go(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=De(e,t).state:r="prev");var a=e.options.tabSize,l=C(i,t),s=me(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],p;if(!n&&!/\S/.test(l.text))p=0,r="not";else if(r=="smart"&&(p=i.mode.indent(o,l.text.slice(u.length),l.text),p==Be||p>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?p=me(C(i,t-1).text,null,a):p=0:r=="add"?p=s+e.options.indentUnit:r=="subtract"?p=s-e.options.indentUnit:typeof r=="number"&&(p=s+r),p=Math.max(0,p);var g="",E=0;if(e.options.indentWithTabs)for(var w=Math.floor(p/a);w;--w)E+=a,g+=" ";if(E<p&&(g+=it(p-E)),g!=u)return Pi(i,g,M(t,0),M(t,u.length),"+input"),l.stateAfter=null,!0;for(var K=0;K<i.sel.ranges.length;K++){var te=i.sel.ranges[K];if(te.head.line==t&&te.head.ch<u.length){var we=M(t,u.length);ua(i,K,new un(we,we));break}}}var zr=null;function zo(e){zr=e}function ma(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=In(t),u=null;if(l&&n.ranges.length>1)if(zr&&zr.text.join(`
`)==t){if(n.ranges.length%zr.text.length==0){u=[];for(var p=0;p<zr.text.length;p++)u.push(o.splitLines(zr.text[p]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=ot(s,function(Fe){return[Fe]}));for(var g=e.curOp.updateInput,E=n.ranges.length-1;E>=0;E--){var w=n.ranges[E],K=w.from(),te=w.to();w.empty()&&(r&&r>0?K=M(K.line,K.ch-r):e.state.overwrite&&!l?te=M(te.line,Math.min(C(o,te.line).text.length,te.ch+Ze(s).length)):l&&zr&&zr.lineWise&&zr.text.join(`
`)==s.join(`
`)&&(K=te=M(K.line,0)));var we={from:K,to:te,text:u?u[E%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Di(e.doc,we),st(e,"inputRead",e,we)}t&&!l&&Nl(e,t),Mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=g),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Al(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&br(t,function(){return ma(t,r,0,null,"paste")}),!0}function Nl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=go(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(C(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=go(e,i.head.line,"smart"));a&&st(e,"electricInput",e,i.head.line)}}}function $l(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:M(i,0),head:M(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Bl(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function zl(){var e=D("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=D("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return A?e.style.width="1000px":e.setAttribute("wrap","off"),Te&&(e.style.border="1px solid black"),Bl(e),t}function Qs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var o=this.options,a=o[n];o[n]==i&&n!="mode"||(o[n]=i,t.hasOwnProperty(n)&&Xn(this,t[n])(this,i,a),dt(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](No(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==n||i[o].name==n)return i.splice(o,1),!0},addOverlay:lr(function(n,i){var o=n.token?n:e.getMode(this.options,n);if(o.startState)throw new Error("Overlays may not be stateful.");_e(this.state.overlays,{mode:o,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,fr(this)}),removeOverlay:lr(function(n){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==n||typeof n=="string"&&a.name==n){i.splice(o,1),this.state.modeGen++,fr(this);return}}}),indentLine:lr(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),pe(this.doc,n)&&go(this,n,i,o)}),indentSelection:lr(function(n){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(go(this,l.head.line,n,!0),o=l.head.line,a==this.doc.sel.primIndex&&Mi(this));else{var s=l.from(),u=l.to(),p=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var g=p;g<o;++g)go(this,g,n);var E=this.doc.sel.ranges;s.ch==0&&i.length==E.length&&E[a].from().ch>0&&ua(this.doc,a,new un(s,E[a].to()),ye)}}}),getTokenAt:function(n,i){return kt(this,n,i)},getLineTokens:function(n,i){return kt(this,M(n),i,!0)},getTokenTypeAt:function(n){n=ne(this.doc,n);var i=Bt(this,C(this.doc,n.line)),o=0,a=(i.length-1)/2,l=n.ch,s;if(l==0)s=i[2];else for(;;){var u=o+a>>1;if((u?i[u*2-1]:0)>=l)a=u;else if(i[u*2+1]<l)o=u+1;else{s=i[u*2+2];break}}var p=s?s.indexOf("overlay "):-1;return p<0?s:p==0?null:s.slice(0,p-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var o=[];if(!r.hasOwnProperty(i))return o;var a=r[i],l=this.getModeAt(n);if(typeof l[i]=="string")a[l[i]]&&o.push(a[l[i]]);else if(l[i])for(var s=0;s<l[i].length;s++){var u=a[l[i][s]];u&&o.push(u)}else l.helperType&&a[l.helperType]?o.push(a[l.helperType]):a[l.name]&&o.push(a[l.name]);for(var p=0;p<a._global.length;p++){var g=a._global[p];g.pred(l,this)&&se(o,g.val)==-1&&o.push(g.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=ut(o,n==null?o.first+o.size-1:n),De(this,n+1,i).state},cursorCoords:function(n,i){var o,a=this.doc.sel.primary();return n==null?o=a.head:typeof n=="object"?o=ne(this.doc,n):o=n?a.from():a.to(),yr(this,o,i||"page")},charCoords:function(n,i){return Fr(this,ne(this.doc,n),i||"page")},coordsChar:function(n,i){return n=kr(this,n,i||"page"),jo(this,n.left,n.top)},lineAtHeight:function(n,i){return n=kr(this,{top:n,left:0},i||"page").top,de(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,o){var a=!1,l;if(typeof n=="number"){var s=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>s&&(n=s,a=!0),l=C(this.doc,n)}else l=n;return wr(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Mn(l):0)},defaultTextHeight:function(){return Ei(this.display)},defaultCharWidth:function(){return Oi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,o,a,l){var s=this.display;n=yr(this,ne(this.doc,n));var u=n.bottom,p=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")u=n.top;else if(a=="above"||a=="near"){var g=Math.max(s.wrapper.clientHeight,this.doc.height),E=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>g)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=g&&(u=n.bottom),p+i.offsetWidth>E&&(p=E-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(p=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?p=0:l=="middle"&&(p=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=p+"px"),o&&Vl(this,{left:p,top:u,right:p+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:lr(Ol),triggerOnKeyPress:lr(Ml),triggerOnKeyUp:Il,triggerOnMouseDown:lr(Rl),execCommand:function(n){if(fo.hasOwnProperty(n))return fo[n].call(null,this)},triggerElectric:lr(function(n){Nl(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=ne(this.doc,n),u=0;u<i&&(s=ya(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:lr(function(n,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?ya(o.doc,a.head,n,i,o.options.rtlMoveVisually):n<0?a.from():a.to()},L)}),deleteH:lr(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Ni(this,function(l){var s=ya(a,l.head,n,i,!1);return n<0?{from:s,to:l.head}:{from:l.head,to:s}})}),findPosV:function(n,i,o,a){var l=1,s=a;i<0&&(l=-1,i=-i);for(var u=ne(this.doc,n),p=0;p<i;++p){var g=yr(this,u,"div");if(s==null?s=g.left:g.left=s,u=Wl(this,g,l,o),u.hitSide)break}return u},moveV:lr(function(n,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(p){if(s)return n<0?p.from():p.to();var g=yr(o,p.head,"div");p.goalColumn!=null&&(g.left=p.goalColumn),l.push(g.left);var E=Wl(o,g,n,i);return i=="page"&&p==a.sel.primary()&&Jo(o,Fr(o,E,"div").top-g.top),E},L),l.length)for(var u=0;u<a.sel.ranges.length;u++)a.sel.ranges[u].goalColumn=l[u]}),findWordAt:function(n){var i=this.doc,o=C(i,n.line).text,a=n.ch,l=n.ch;if(o){var s=this.getHelper(n,"wordChars");(n.sticky=="before"||l==o.length)&&a?--a:++l;for(var u=o.charAt(a),p=X(u,s)?function(g){return X(g,s)}:/\s/.test(u)?function(g){return/\s/.test(g)}:function(g){return!/\s/.test(g)&&!X(g)};a>0&&p(o.charAt(a-1));)--a;for(;l<o.length&&p(o.charAt(l));)++l}return new un(M(n.line,a),M(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?yt(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),dt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Oe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:lr(function(n,i){Yi(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Dr(this)-this.display.barHeight,width:n.scrollWidth-Dr(this)-this.display.barWidth,clientHeight:Ki(this),clientWidth:Hr(this)}},scrollIntoView:lr(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:M(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Xl(this,n):Da(this,n.from,n.to,n.margin)}),setSize:lr(function(n,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};n!=null&&(this.display.wrapper.style.width=a(n)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&nr(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){qr(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,dt(this,"refresh",this)}),operation:function(n){return br(this,n)},startOperation:function(){return gi(this)},endOperation:function(){return mi(this)},refresh:lr(function(){var n=this.display.cachedTextHeight;fr(this),this.curOp.forceUpdate=!0,On(this),Yi(this,this.doc.scrollLeft,this.doc.scrollTop),ta(this.display),(n==null||Math.abs(n-Ei(this.display))>.5||this.options.lineWrapping)&&Vo(this),dt(this,"refresh",this)}),swapDoc:lr(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Ua(this,n),On(this),this.display.input.reset(),Yi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,st(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},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}},Nt(e),e.registerHelper=function(n,i,o){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=o},e.registerGlobalHelper=function(n,i,o,a){e.registerHelper(n,i,a),r[n]._global.push({pred:o,val:a})}}function ya(e,t,r,n,i){var o=t,a=r,l=C(e,t.line),s=i&&e.direction=="rtl"?-r:r;function u(){var Xe=t.line+s;return Xe<e.first||Xe>=e.first+e.size?!1:(t=new M(Xe,t.ch,t.sticky),l=C(e,Xe))}function p(Xe){var Ae;if(n=="codepoint"){var tt=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(tt)?Ae=null:Ae=new M(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(tt>=55296&&tt<56320?2:1))),-r)}else i?Ae=Ps(e.cm,l,t,r):Ae=fa(l,t,r);if(Ae==null)if(!Xe&&u())t=da(i,e.cm,l,t.line,s);else return!1;else t=Ae;return!0}if(n=="char"||n=="codepoint")p();else if(n=="column")p(!0);else if(n=="word"||n=="group")for(var g=null,E=n=="group",w=e.cm&&e.cm.getHelper(t,"wordChars"),K=!0;!(r<0&&!p(!K));K=!1){var te=l.text.charAt(t.ch)||`
`,we=X(te,w)?"w":E&&te==`
`?"n":!E||/\s/.test(te)?null:"p";if(E&&!K&&!we&&(we="s"),g&&g!=we){r<0&&(r=1,p(),t.sticky="after");break}if(we&&(g=we),r>0&&!p(!K))break}var Fe=Po(e,t,o,a,!0);return Je(o,Fe)&&(Fe.hitSide=!0),Fe}function Wl(e,t,r,n){var i=e.doc,o=t.left,a;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*Ei(e.display),3);a=(r>0?t.bottom:t.top)+r*s}else n=="line"&&(a=r>0?t.bottom+3:t.top-3);for(var u;u=jo(e,o,a),!!u.outside;){if(r<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=r*5}return u}var dn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new fe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};dn.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;Bl(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function o(l){for(var s=l.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}J(i,"paste",function(l){!o(l)||bt(n,l)||Al(l,n)||F<=11&&setTimeout(Xn(n,function(){return t.updateFromDOM()}),20)}),J(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),J(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),J(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),J(i,"touchstart",function(){return r.forceCompositionEnd()}),J(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||bt(n,l))){if(n.somethingSelected())zo({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var s=$l(n);zo({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,ye),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=zr.text.join(`
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var p=zl(),g=p.firstChild;n.display.lineSpace.insertBefore(p,n.display.lineSpace.firstChild),g.value=zr.text.join(`
`);var E=document.activeElement;Qe(g),setTimeout(function(){n.display.lineSpace.removeChild(p),E.focus(),E==i&&r.showPrimarySelection()},50)}}J(i,"copy",a),J(i,"cut",a)},dn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},dn.prototype.prepareSelection=function(){var e=Ia(this.cm,!1);return e.focus=document.activeElement==this.div,e},dn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},dn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},dn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=Wo(t,e.anchorNode,e.anchorOffset),a=Wo(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&U(Pe(o,a),n)==0&&U(je(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Hl(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Hl(t,i);if(!u){var p=l[l.length-1].measure,g=p.maps?p.maps[p.maps.length-1]:p.map;u={node:g[g.length-1],offset:g[g.length-2]-g[g.length-3]}}if(!s||!u){e.removeAllRanges();return}var E=e.rangeCount&&e.getRangeAt(0),w;try{w=Ue(s.node,s.offset,u.offset,u.node)}catch(K){}w&&(!P&&t.state.focused?(e.collapse(s.node,s.offset),w.collapsed||(e.removeAllRanges(),e.addRange(w))):(e.removeAllRanges(),e.addRange(w)),E&&e.anchorNode==null?e.addRange(E):P&&this.startGracePeriod()),this.rememberSelection()}},dn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},dn.prototype.showMultipleSelections=function(e){k(this.cm.display.cursorDiv,e.cursors),k(this.cm.display.selectionDiv,e.selection)},dn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},dn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return $e(this.div,t)},dn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},dn.prototype.blur=function(){this.div.blur()},dn.prototype.getField=function(){return this.div},dn.prototype.supportsTouch=function(){return!0},dn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():br(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},dn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},dn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(q&&ce&&this.cm.display.gutterSpecs.length&&Js(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var r=Wo(t,e.anchorNode,e.anchorOffset),n=Wo(t,e.focusNode,e.focusOffset);r&&n&&br(t,function(){rr(t.doc,ti(r,n),ye),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},dn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=M(n.line-1,C(e.doc,n.line-1).length)),i.ch==C(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=M(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||(o=hi(e,n.line))==0?(a=_(t.view[0].line),l=t.view[0].node):(a=_(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=hi(e,i.line),u,p;if(s==t.view.length-1?(u=t.viewTo-1,p=t.lineDiv.lastChild):(u=_(t.view[s+1].line)-1,p=t.view[s+1].node.previousSibling),!l)return!1;for(var g=e.doc.splitLines(qs(e,l,p,a,u)),E=T(e.doc,M(a,0),M(u,C(e.doc,u).text.length));g.length>1&&E.length>1;)if(Ze(g)==Ze(E))g.pop(),E.pop(),u--;else if(g[0]==E[0])g.shift(),E.shift(),a++;else break;for(var w=0,K=0,te=g[0],we=E[0],Fe=Math.min(te.length,we.length);w<Fe&&te.charCodeAt(w)==we.charCodeAt(w);)++w;for(var Xe=Ze(g),Ae=Ze(E),tt=Math.min(Xe.length-(g.length==1?w:0),Ae.length-(E.length==1?w:0));K<tt&&Xe.charCodeAt(Xe.length-K-1)==Ae.charCodeAt(Ae.length-K-1);)++K;if(g.length==1&&E.length==1&&a==n.line)for(;w&&w>n.ch&&Xe.charCodeAt(Xe.length-K-1)==Ae.charCodeAt(Ae.length-K-1);)w--,K++;g[g.length-1]=Xe.slice(0,Xe.length-K).replace(/^\u200b+/,""),g[0]=g[0].slice(w).replace(/\u200b+$/,"");var Ot=M(a,w),mt=M(u,E.length?Ze(E).length-K:0);if(g.length>1||g[0]||U(Ot,mt))return Pi(e.doc,g,Ot,mt,"+input"),!0},dn.prototype.ensurePolled=function(){this.forceCompositionEnd()},dn.prototype.reset=function(){this.forceCompositionEnd()},dn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},dn.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},dn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&br(this.cm,function(){return fr(e.cm)})},dn.prototype.setUneditable=function(e){e.contentEditable="false"},dn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Xn(this.cm,ma)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},dn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},dn.prototype.onContextMenu=function(){},dn.prototype.resetPosition=function(){},dn.prototype.needsContentAttribute=!0;function Hl(e,t){var r=ki(e,t.line);if(!r||r.hidden)return null;var n=C(e.doc,t.line),i=ji(r,n,t.line),o=Ne(n,e.doc.direction),a="left";if(o){var l=be(o,t.ch);a=l%2?"right":"left"}var s=Gi(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function Js(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Bi(e,t){return t&&(e.bad=!0),e}function qs(e,t,r,n,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(w){return function(K){return K.id==w}}function p(){a&&(o+=l,s&&(o+=l),a=s=!1)}function g(w){w&&(p(),o+=w)}function E(w){if(w.nodeType==1){var K=w.getAttribute("cm-text");if(K){g(K);return}var te=w.getAttribute("cm-marker"),we;if(te){var Fe=e.findMarks(M(n,0),M(i+1,0),u(+te));Fe.length&&(we=Fe[0].find(0))&&g(T(e.doc,we.from,we.to).join(l));return}if(w.getAttribute("contenteditable")=="false")return;var Xe=/^(pre|div|p|li|table|br)$/i.test(w.nodeName);if(!/^br$/i.test(w.nodeName)&&w.textContent.length==0)return;Xe&&p();for(var Ae=0;Ae<w.childNodes.length;Ae++)E(w.childNodes[Ae]);/^(pre|p)$/i.test(w.nodeName)&&(s=!0),Xe&&(a=!0)}else w.nodeType==3&&g(w.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;E(t),t!=r;)t=t.nextSibling,s=!1;return o}function Wo(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Bi(e.clipPos(M(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return eu(o,t,r)}}function eu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!$e(n,t))return Bi(M(_(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?Ze(e.rest):e.line;return Bi(M(_(o),o.text.length),i)}var a=t.nodeType==3?t:null,l=t;for(!a&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(a=t.firstChild,r&&(r=a.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var s=e.measure,u=s.maps;function p(we,Fe,Xe){for(var Ae=-1;Ae<(u?u.length:0);Ae++)for(var tt=Ae<0?s.map:u[Ae],Ot=0;Ot<tt.length;Ot+=3){var mt=tt[Ot+2];if(mt==we||mt==Fe){var jt=_(Ae<0?e.line:e.rest[Ae]),Sn=tt[Ot]+Xe;return(Xe<0||mt!=we)&&(Sn=tt[Ot+(Xe?1:0)]),M(jt,Sn)}}}var g=p(a,l,r);if(g)return Bi(g,i);for(var E=l.nextSibling,w=a?a.nodeValue.length-r:0;E;E=E.nextSibling){if(g=p(E,E.firstChild,0),g)return Bi(M(g.line,g.ch-w),i);w+=E.textContent.length}for(var K=l.previousSibling,te=r;K;K=K.previousSibling){if(g=p(K,K.firstChild,-1),g)return Bi(M(g.line,g.ch+te),i);te+=K.textContent.length}}var Bn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new fe,this.hasSelection=!1,this.composing=null};Bn.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),Te&&(i.style.width="0px"),J(i,"input",function(){v&&F>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),J(i,"paste",function(a){bt(n,a)||Al(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!bt(n,a)){if(n.somethingSelected())zo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=$l(n);zo({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,ye):(r.prevInput="",i.value=l.text.join(`
`),Qe(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}J(i,"cut",o),J(i,"copy",o),J(e.scroller,"paste",function(a){if(!($r(e,a)||bt(n,a))){if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=a.clipboardData,i.dispatchEvent(l)}}),J(e.lineSpace,"selectstart",function(a){$r(e,a)||$t(a)}),J(i,"compositionstart",function(){var a=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:a,range:n.markText(a,n.getCursor("to"),{className:"CodeMirror-composing"})}}),J(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Bn.prototype.createField=function(e){this.wrapper=zl(),this.textarea=this.wrapper.firstChild},Bn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Bn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Ia(e);if(e.options.moveInputWithCursor){var i=yr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},Bn.prototype.showSelection=function(e){var t=this.cm,r=t.display;k(r.cursorDiv,e.cursors),k(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Bn.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&Qe(this.textarea),v&&F>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",v&&F>=9&&(this.hasSelection=null))}},Bn.prototype.getField=function(){return this.textarea},Bn.prototype.supportsTouch=function(){return!1},Bn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!qe||Oe()!=this.textarea))try{this.textarea.focus()}catch(e){}},Bn.prototype.blur=function(){this.textarea.blur()},Bn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Bn.prototype.receivedFocus=function(){this.slowPoll()},Bn.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Bn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Bn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||wn(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(v&&F>=9&&this.hasSelection===i||rt&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!n&&(n="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return br(t,function(){ma(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Bn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Bn.prototype.onKeyPress=function(){v&&F>=9&&(this.hasSelection=null),this.fastPoll()},Bn.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=di(r,e),a=n.scroller.scrollTop;if(!o||y)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Xn(r,rr)(r.doc,ti(o),ye);var s=i.style.cssText,u=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+`px;
z-index: 1000; background: `+(v?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var g;A&&(g=window.scrollY),n.input.focus(),A&&window.scrollTo(null,g),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=w,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function E(){if(i.selectionStart!=null){var te=r.somethingSelected(),we="\u200B"+(te?i.value:"");i.value="\u21DA",i.value=we,t.prevInput=te?"":"\u200B",i.selectionStart=1,i.selectionEnd=we.length,n.selForContextMenu=r.doc.sel}}function w(){if(t.contextMenuPending==w&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,v&&F<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!v||v&&F<9)&&E();var te=0,we=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Xn(r,il)(r):te++<10?n.detectingSelectAll=setTimeout(we,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(we,200)}}if(v&&F>=9&&E(),S){sn(e);var K=function(){He(window,"mouseup",K),setTimeout(w,20)};J(window,"mouseup",K)}else setTimeout(w,50)},Bn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Bn.prototype.setUneditable=function(){},Bn.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?G(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=Oe();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(J(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(s){}}t.finishInit=function(s){s.save=n,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,n(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(He(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Rn(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=He,e.on=J,e.wheelEventPixels=us,e.Doc=dr,e.splitLines=In,e.countColumn=me,e.findColumn=V,e.isWordChar=j,e.Pass=Be,e.signal=dt,e.Line=tr,e.changeEnd=ni,e.scrollbarModel=Aa,e.Pos=M,e.cmpPos=U,e.modes=Nn,e.mimeModes=Wn,e.resolveMode=Jt,e.getMode=lt,e.modeExtensions=Kt,e.extendMode=m,e.copyState=$,e.startState=h,e.innerMode=Z,e.commands=fo,e.keyMap=Gr,e.keyName=Sl,e.isModifierKey=yl,e.lookupKey=Ai,e.normalizeKeyMap=Ds,e.StringStream=d,e.SharedTextMarker=so,e.TextMarker=ii,e.LineWidget=lo,e.e_preventDefault=$t,e.e_stopPropagation=en,e.e_stop=sn,e.addClass=yt,e.contains=$e,e.rmClass=b,e.keyNames=oi}Gs(Rn),Qs(Rn);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Ho in dr.prototype)dr.prototype.hasOwnProperty(Ho)&&se(ru,Ho)<0&&(Rn.prototype[Ho]=function(e){return function(){return e.apply(this.doc,arguments)}}(dr.prototype[Ho]));return Nt(dr),Rn.inputStyles={textarea:Bn,contenteditable:dn},Rn.defineMode=function(e){!Rn.defaults.mode&&e!="null"&&(Rn.defaults.mode=e),or.apply(this,arguments)},Rn.defineMIME=gr,Rn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Rn.defineMIME("text/plain","null"),Rn.defineExtension=function(e,t){Rn.prototype[e]=t},Rn.defineDocExtension=function(e,t){dr.prototype[e]=t},Rn.fromTextArea=tu,nu(Rn),Rn.version="5.58.2",Rn})},93681:function(nn,Re,f){"use strict";f.r(Re),f.d(Re,{BaseInput:function(){return y},default:function(){return Mt}});var P=f(54476),O=f(33885),x=f(20068),z=f(76190),v=f(92310),F=f.n(v),A=f(59301),xe=f(5643),ce=function(Y){var S,c,b=Y.inputElement,I=Y.prefixCls,k=Y.prefix,D=Y.suffix,Ee=Y.addonBefore,Ue=Y.addonAfter,$e=Y.className,Oe=Y.style,yt=Y.disabled,Ye=Y.readOnly,Qe=Y.focused,ge=Y.triggerFocus,G=Y.allowClear,me=Y.value,fe=Y.handleReset,se=Y.hidden,ke=Y.classes,Be=Y.classNames,ye=Y.dataAttrs,N=Y.styles,L=Y.components,V=(L==null?void 0:L.affixWrapper)||"span",Me=(L==null?void 0:L.groupWrapper)||"span",it=(L==null?void 0:L.wrapper)||"span",Ze=(L==null?void 0:L.groupAddon)||"span",ot=(0,A.useRef)(null),_e=function(W){var be;(be=ot.current)!==null&&be!==void 0&&be.contains(W.target)&&(ge==null||ge())},R=function(){var W;if(!G)return null;var be=!yt&&!Ye&&me,ve="".concat(I,"-clear-icon"),Ne=(0,z.Z)(G)==="object"&&G!==null&&G!==void 0&&G.clearIcon?G.clearIcon:"\u2716";return A.createElement("span",{onClick:fe,onMouseDown:function(J){return J.preventDefault()},className:F()(ve,(W={},(0,x.Z)(W,"".concat(ve,"-hidden"),!be),(0,x.Z)(W,"".concat(ve,"-has-suffix"),!!D),W)),role:"button",tabIndex:-1},Ne)},he=(0,A.cloneElement)(b,{value:me,hidden:se,className:F()((S=b.props)===null||S===void 0?void 0:S.className,!(0,xe.X3)(Y)&&!(0,xe.He)(Y)&&$e)||null,style:(0,O.Z)((0,O.Z)({},(c=b.props)===null||c===void 0?void 0:c.style),!(0,xe.X3)(Y)&&!(0,xe.He)(Y)?Oe:{})});if((0,xe.X3)(Y)){var ae,j="".concat(I,"-affix-wrapper"),X=F()(j,(ae={},(0,x.Z)(ae,"".concat(j,"-disabled"),yt),(0,x.Z)(ae,"".concat(j,"-focused"),Qe),(0,x.Z)(ae,"".concat(j,"-readonly"),Ye),(0,x.Z)(ae,"".concat(j,"-input-with-clear-btn"),D&&G&&me),ae),!(0,xe.He)(Y)&&$e,ke==null?void 0:ke.affixWrapper,Be==null?void 0:Be.affixWrapper),le=(D||G)&&A.createElement("span",{className:F()("".concat(I,"-suffix"),Be==null?void 0:Be.suffix),style:N==null?void 0:N.suffix},R(),D);he=A.createElement(V,(0,P.Z)({className:X,style:(0,O.Z)((0,O.Z)({},(0,xe.He)(Y)?void 0:Oe),N==null?void 0:N.affixWrapper),hidden:!(0,xe.He)(Y)&&se,onClick:_e},ye==null?void 0:ye.affixWrapper,{ref:ot}),k&&A.createElement("span",{className:F()("".concat(I,"-prefix"),Be==null?void 0:Be.prefix),style:N==null?void 0:N.prefix},k),(0,A.cloneElement)(b,{value:me,hidden:null}),le)}if((0,xe.He)(Y)){var Q="".concat(I,"-group"),ue="".concat(Q,"-addon"),Le=F()("".concat(I,"-wrapper"),Q,ke==null?void 0:ke.wrapper),ee=F()("".concat(I,"-group-wrapper"),$e,ke==null?void 0:ke.group);return A.createElement(Me,{className:ee,style:Oe,hidden:se},A.createElement(it,{className:Le},Ee&&A.createElement(Ze,{className:ue},Ee),(0,A.cloneElement)(he,{hidden:null}),Ue&&A.createElement(Ze,{className:ue},Ue)))}return he},y=ce,Ie=f(94480),B=f(42978),Se=f(75931),Te=f(18929),q=f(2738),qe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],rt=(0,A.forwardRef)(function(oe,Y){var S=oe.autoComplete,c=oe.onChange,b=oe.onFocus,I=oe.onBlur,k=oe.onPressEnter,D=oe.onKeyDown,Ee=oe.prefixCls,Ue=Ee===void 0?"rc-input":Ee,$e=oe.disabled,Oe=oe.htmlSize,yt=oe.className,Ye=oe.maxLength,Qe=oe.suffix,ge=oe.showCount,G=oe.type,me=G===void 0?"text":G,fe=oe.classes,se=oe.classNames,ke=oe.styles,Be=(0,Se.Z)(oe,qe),ye=(0,Te.Z)(oe.defaultValue,{value:oe.value}),N=(0,B.Z)(ye,2),L=N[0],V=N[1],Me=(0,A.useState)(!1),it=(0,B.Z)(Me,2),Ze=it[0],ot=it[1],_e=(0,A.useRef)(null),R=function(ee){_e.current&&(0,xe.nH)(_e.current,ee)};(0,A.useImperativeHandle)(Y,function(){return{focus:R,blur:function(){var ee;(ee=_e.current)===null||ee===void 0||ee.blur()},setSelectionRange:function(ee,re,W){var be;(be=_e.current)===null||be===void 0||be.setSelectionRange(ee,re,W)},select:function(){var ee;(ee=_e.current)===null||ee===void 0||ee.select()},input:_e.current}}),(0,A.useEffect)(function(){ot(function(Le){return Le&&$e?!1:Le})},[$e]);var he=function(ee){oe.value===void 0&&V(ee.target.value),_e.current&&(0,xe.rJ)(_e.current,ee,c)},ae=function(ee){k&&ee.key==="Enter"&&k(ee),D==null||D(ee)},j=function(ee){ot(!0),b==null||b(ee)},X=function(ee){ot(!1),I==null||I(ee)},le=function(ee){V(""),R(),_e.current&&(0,xe.rJ)(_e.current,ee,c)},Q=function(){var ee=(0,q.Z)(oe,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return A.createElement("input",(0,P.Z)({autoComplete:S},ee,{onChange:he,onFocus:j,onBlur:X,onKeyDown:ae,className:F()(Ue,(0,x.Z)({},"".concat(Ue,"-disabled"),$e),se==null?void 0:se.input),style:ke==null?void 0:ke.input,ref:_e,size:Oe,type:me}))},ue=function(){var ee=Number(Ye)>0;if(Qe||ge){var re=(0,xe.D7)(L),W=(0,Ie.Z)(re).length,be=(0,z.Z)(ge)==="object"?ge.formatter({value:re,count:W,maxLength:Ye}):"".concat(W).concat(ee?" / ".concat(Ye):"");return A.createElement(A.Fragment,null,!!ge&&A.createElement("span",{className:F()("".concat(Ue,"-show-count-suffix"),(0,x.Z)({},"".concat(Ue,"-show-count-has-suffix"),!!Qe),se==null?void 0:se.count),style:(0,O.Z)({},ke==null?void 0:ke.count)},be),Qe)}return null};return A.createElement(y,(0,P.Z)({},Be,{prefixCls:Ue,className:yt,inputElement:Q(),handleReset:le,value:(0,xe.D7)(L),focused:Ze,triggerFocus:R,suffix:ue(),disabled:$e,classes:fe,classNames:se,styles:ke}))}),Ct=rt,Mt=Ct},5643:function(nn,Re,f){"use strict";f.d(Re,{D7:function(){return v},He:function(){return P},X3:function(){return O},nH:function(){return z},rJ:function(){return x}});function P(F){return!!(F.addonBefore||F.addonAfter)}function O(F){return!!(F.prefix||F.suffix||F.allowClear)}function x(F,A,xe,ce){if(xe){var y=A;if(A.type==="click"){var Ie=F.cloneNode(!0);y=Object.create(A,{target:{value:Ie},currentTarget:{value:Ie}}),Ie.value="",xe(y);return}if(ce!==void 0){y=Object.create(A,{target:{value:F},currentTarget:{value:F}}),F.value=ce,xe(y);return}xe(y)}}function z(F,A){if(F){F.focus(A);var xe=A||{},ce=xe.cursor;if(ce){var y=F.value.length;switch(ce){case"start":F.setSelectionRange(0,0);break;case"end":F.setSelectionRange(y,y);break;default:F.setSelectionRange(0,y)}}}}function v(F){return typeof F=="undefined"||F===null?"":String(F)}},83836:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return ge}});var P=f(54476),O=f(33885),x=f(42978),z=f(75931),v=f(59301),F=f(92310),A=f.n(F),xe=f(29301),ce=f(34280),y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ie=void 0;function B(G,me){var fe=G.prefixCls,se=G.invalidate,ke=G.item,Be=G.renderItem,ye=G.responsive,N=G.responsiveDisabled,L=G.registerSize,V=G.itemKey,Me=G.className,it=G.style,Ze=G.children,ot=G.display,_e=G.order,R=G.component,he=R===void 0?"div":R,ae=(0,z.Z)(G,y),j=ye&&!ot;function X(ee){L(V,ee)}v.useEffect(function(){return function(){X(null)}},[]);var le=Be&&ke!==Ie?Be(ke,{index:_e}):Ze,Q;se||(Q={opacity:j?0:1,height:j?0:Ie,overflowY:j?"hidden":Ie,order:ye?_e:Ie,pointerEvents:j?"none":Ie,position:j?"absolute":Ie});var ue={};j&&(ue["aria-hidden"]=!0);var Le=v.createElement(he,(0,P.Z)({className:A()(!se&&fe,Me),style:(0,O.Z)((0,O.Z)({},Q),it)},ue,ae,{ref:me}),le);return ye&&(Le=v.createElement(xe.Z,{onResize:function(re){var W=re.offsetWidth;X(W)},disabled:N},Le)),Le}var Se=v.forwardRef(B);Se.displayName="Item";var Te=Se,q=f(6089),qe=f(4676),rt=f(16089);function Ct(G){if(typeof MessageChannel=="undefined")(0,rt.Z)(G);else{var me=new MessageChannel;me.port1.onmessage=function(){return G()},me.port2.postMessage(void 0)}}function Mt(){var G=v.useRef(null),me=function(se){G.current||(G.current=[],Ct(function(){(0,qe.unstable_batchedUpdates)(function(){G.current.forEach(function(ke){ke()}),G.current=null})})),G.current.push(se)};return me}function oe(G,me){var fe=v.useState(me),se=(0,x.Z)(fe,2),ke=se[0],Be=se[1],ye=(0,q.Z)(function(N){G(function(){Be(N)})});return[ke,ye]}var Y=v.createContext(null),S=["component"],c=["className"],b=["className"],I=function(me,fe){var se=v.useContext(Y);if(!se){var ke=me.component,Be=ke===void 0?"div":ke,ye=(0,z.Z)(me,S);return v.createElement(Be,(0,P.Z)({},ye,{ref:fe}))}var N=se.className,L=(0,z.Z)(se,c),V=me.className,Me=(0,z.Z)(me,b);return v.createElement(Y.Provider,{value:null},v.createElement(Te,(0,P.Z)({ref:fe,className:A()(N,V)},L,Me)))},k=v.forwardRef(I);k.displayName="RawItem";var D=k,Ee=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],Ue="responsive",$e="invalidate";function Oe(G){return"+ ".concat(G.length," ...")}function yt(G,me){var fe=G.prefixCls,se=fe===void 0?"rc-overflow":fe,ke=G.data,Be=ke===void 0?[]:ke,ye=G.renderItem,N=G.renderRawItem,L=G.itemKey,V=G.itemWidth,Me=V===void 0?10:V,it=G.ssr,Ze=G.style,ot=G.className,_e=G.maxCount,R=G.renderRest,he=G.renderRawRest,ae=G.prefix,j=G.suffix,X=G.component,le=X===void 0?"div":X,Q=G.itemComponent,ue=G.onVisibleChange,Le=(0,z.Z)(G,Ee),ee=it==="full",re=Mt(),W=oe(re,null),be=(0,x.Z)(W,2),ve=be[0],Ne=be[1],Ke=ve||0,J=oe(re,new Map),at=(0,x.Z)(J,2),He=at[0],dt=at[1],bt=oe(re,0),rn=(0,x.Z)(bt,2),_t=rn[0],Nt=rn[1],$t=oe(re,0),en=(0,x.Z)($t,2),Ut=en[0],sn=en[1],Cn=oe(re,0),fn=(0,x.Z)(Cn,2),An=fn[0],zn=fn[1],xn=oe(re,0),Dn=(0,x.Z)(xn,2),vn=Dn[0],In=Dn[1],wn=(0,v.useState)(null),pn=(0,x.Z)(wn,2),Pn=pn[0],on=pn[1],Nn=(0,v.useState)(null),Wn=(0,x.Z)(Nn,2),or=Wn[0],gr=Wn[1],Jt=v.useMemo(function(){return or===null&&ee?Number.MAX_SAFE_INTEGER:or||0},[or,ve]),lt=(0,v.useState)(!1),Kt=(0,x.Z)(lt,2),m=Kt[0],$=Kt[1],Z="".concat(se,"-item"),h=Math.max(_t,Ut),d=_e===Ue,C=Be.length&&d,T=_e===$e,ie=C||typeof _e=="number"&&Be.length>_e,H=(0,v.useMemo)(function(){var De=Be;return C?ve===null&&ee?De=Be:De=Be.slice(0,Math.min(Be.length,Ke/Me)):typeof _e=="number"&&(De=Be.slice(0,_e)),De},[Be,Me,ve,_e,C]),_=(0,v.useMemo)(function(){return C?Be.slice(Jt+1):Be.slice(H.length)},[Be,H,C,Jt]),de=(0,v.useCallback)(function(De,Ge){var ct;return typeof L=="function"?L(De):(ct=L&&(De==null?void 0:De[L]))!==null&&ct!==void 0?ct:Ge},[L]),pe=(0,v.useCallback)(ye||function(De){return De},[ye]);function ze(De,Ge,ct){or===De&&(Ge===void 0||Ge===Pn)||(gr(De),ct||($(De<Be.length-1),ue==null||ue(De)),Ge!==void 0&&on(Ge))}function M(De,Ge){Ne(Ge.clientWidth)}function U(De,Ge){dt(function(ct){var pt=new Map(ct);return Ge===null?pt.delete(De):pt.set(De,Ge),pt})}function Je(De,Ge){sn(Ge),Nt(Ut)}function Ce(De,Ge){zn(Ge)}function je(De,Ge){In(Ge)}function Pe(De){return He.get(de(H[De],De))}(0,ce.Z)(function(){if(Ke&&typeof h=="number"&&H){var De=An+vn,Ge=H.length,ct=Ge-1;if(!Ge){ze(0,null);return}for(var pt=0;pt<Ge;pt+=1){var Wt=Pe(pt);if(ee&&(Wt=Wt||0),Wt===void 0){ze(pt-1,void 0,!0);break}if(De+=Wt,ct===0&&De<=Ke||pt===ct-1&&De+Pe(ct)<=Ke){ze(ct,null);break}else if(De+h>Ke){ze(pt-1,De-Wt-vn+Ut);break}}j&&Pe(0)+vn>Ke&&on(null)}},[Ke,He,Ut,An,vn,de,H]);var ut=m&&!!_.length,ne={};Pn!==null&&C&&(ne={position:"absolute",left:Pn,top:0});var et={prefixCls:Z,responsive:C,component:Q,invalidate:T},St=N?function(De,Ge){var ct=de(De,Ge);return v.createElement(Y.Provider,{key:ct,value:(0,O.Z)((0,O.Z)({},et),{},{order:Ge,item:De,itemKey:ct,registerSize:U,display:Ge<=Jt})},N(De,Ge))}:function(De,Ge){var ct=de(De,Ge);return v.createElement(Te,(0,P.Z)({},et,{order:Ge,key:ct,item:De,renderItem:pe,itemKey:ct,registerSize:U,display:Ge<=Jt}))},Lt={order:ut?Jt:Number.MAX_SAFE_INTEGER,className:"".concat(Z,"-rest"),registerSize:Je,display:ut},nt=R||Oe,gt=he?v.createElement(Y.Provider,{value:(0,O.Z)((0,O.Z)({},et),Lt)},he(_)):v.createElement(Te,(0,P.Z)({},et,Lt),typeof nt=="function"?nt(_):nt),Bt=v.createElement(le,(0,P.Z)({className:A()(!T&&se,ot),style:Ze,ref:me},Le),ae&&v.createElement(Te,(0,P.Z)({},et,{responsive:d,responsiveDisabled:!C,order:-1,className:"".concat(Z,"-prefix"),registerSize:Ce,display:!0}),ae),H.map(St),ie?gt:null,j&&v.createElement(Te,(0,P.Z)({},et,{responsive:d,responsiveDisabled:!C,order:Jt,className:"".concat(Z,"-suffix"),registerSize:je,display:!0,style:ne}),j));return d?v.createElement(xe.Z,{onResize:M,disabled:!C},Bt):Bt}var Ye=v.forwardRef(yt);Ye.displayName="Overflow",Ye.Item=D,Ye.RESPONSIVE=Ue,Ye.INVALIDATE=$e;var Qe=Ye,ge=Qe},17115:function(nn,Re,f){"use strict";f.d(Re,{ZP:function(){return A}});var P=f(42978),O=f(59301),x=f(47273),z=0,v=(0,x.Z)();function F(){var xe;return v?(xe=z,z+=1):xe="TEST_OR_SSR",xe}function A(xe){var ce=O.useState(),y=(0,P.Z)(ce,2),Ie=y[0],B=y[1];return O.useEffect(function(){B("rc_select_".concat(F()))},[]),xe||Ie}},77861:function(nn,Re,f){"use strict";f.d(Re,{Ac:function(){return ve},Xo:function(){return Ut},Wx:function(){return Cn},ZP:function(){return Z},lk:function(){return Y}});var P=f(54476),O=f(94480),x=f(20068),z=f(33885),v=f(42978),F=f(75931),A=f(76190),xe=f(18929),ce=f(48736),y=f(59301),Ie=f(92310),B=f.n(Ie),Se=f(34280),Te=f(49658),q=f(10228),qe=f(8654),rt=function(d){var C=d.className,T=d.customizeIcon,ie=d.customizeIconProps,H=d.onMouseDown,_=d.onClick,de=d.children,pe;return typeof T=="function"?pe=T(ie):pe=T,y.createElement("span",{className:C,onMouseDown:function(M){M.preventDefault(),H&&H(M)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:_,"aria-hidden":!0},pe!==void 0?pe:y.createElement("span",{className:B()(C.split(/\s+/).map(function(ze){return"".concat(ze,"-icon")}))},de))},Ct=rt;function Mt(h,d,C,T,ie){var H=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,_=arguments.length>6?arguments[6]:void 0,de=arguments.length>7?arguments[7]:void 0,pe=y.useMemo(function(){if((0,A.Z)(T)==="object")return T.clearIcon;if(ie)return ie},[T,ie]),ze=y.useMemo(function(){return!!(!H&&T&&(C.length||_)&&!(de==="combobox"&&_===""))},[T,H,C.length,_,de]);return{allowClear:ze,clearIcon:y.createElement(Ct,{className:"".concat(h,"-clear"),onMouseDown:d,customizeIcon:pe},"\xD7")}}var oe=y.createContext(null);function Y(){return y.useContext(oe)}function S(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,d=y.useState(!1),C=(0,v.Z)(d,2),T=C[0],ie=C[1],H=y.useRef(null),_=function(){window.clearTimeout(H.current)};y.useEffect(function(){return _},[]);var de=function(ze,M){_(),H.current=window.setTimeout(function(){ie(ze),M&&M()},h)};return[T,de,_]}function c(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,d=y.useRef(null),C=y.useRef(null);y.useEffect(function(){return function(){window.clearTimeout(C.current)}},[]);function T(ie){(ie||d.current===null)&&(d.current=ie),window.clearTimeout(C.current),C.current=window.setTimeout(function(){d.current=null},h)}return[function(){return d.current},T]}function b(h,d,C,T){var ie=y.useRef(null);ie.current={open:d,triggerOpen:C,customizedTrigger:T},y.useEffect(function(){function H(_){var de;if(!((de=ie.current)!==null&&de!==void 0&&de.customizedTrigger)){var pe=_.target;pe.shadowRoot&&_.composed&&(pe=_.composedPath()[0]||pe),ie.current.open&&h().filter(function(ze){return ze}).every(function(ze){return!ze.contains(pe)&&ze!==pe})&&ie.current.triggerOpen(!1)}}return window.addEventListener("mousedown",H),function(){return window.removeEventListener("mousedown",H)}},[])}var I=f(26112),k=f(83836),D=function(d,C){var T,ie,H=d.prefixCls,_=d.id,de=d.inputElement,pe=d.disabled,ze=d.tabIndex,M=d.autoFocus,U=d.autoComplete,Je=d.editable,Ce=d.activeDescendantId,je=d.value,Pe=d.maxLength,ut=d.onKeyDown,ne=d.onMouseDown,et=d.onChange,St=d.onPaste,Lt=d.onCompositionStart,nt=d.onCompositionEnd,gt=d.open,Bt=d.attrs,De=de||y.createElement("input",null),Ge=De,ct=Ge.ref,pt=Ge.props,Wt=pt.onKeyDown,kt=pt.onChange,Gt=pt.onMouseDown,Vt=pt.onCompositionStart,Dt=pt.onCompositionEnd,It=pt.style;return(0,ce.Kp)(!("maxLength"in De.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),De=y.cloneElement(De,(0,z.Z)((0,z.Z)((0,z.Z)({type:"search"},pt),{},{id:_,ref:(0,qe.sQ)(C,ct),disabled:pe,tabIndex:ze,autoComplete:U||"off",autoFocus:M,className:B()("".concat(H,"-selection-search-input"),(T=De)===null||T===void 0||(ie=T.props)===null||ie===void 0?void 0:ie.className),role:"combobox","aria-label":"Search","aria-expanded":gt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(_,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(_,"_list"),"aria-activedescendant":gt?Ce:void 0},Bt),{},{value:Je?je:"",maxLength:Pe,readOnly:!Je,unselectable:Je?null:"on",style:(0,z.Z)((0,z.Z)({},It),{},{opacity:Je?null:0}),onKeyDown:function(Rt){ut(Rt),Wt&&Wt(Rt)},onMouseDown:function(Rt){ne(Rt),Gt&&Gt(Rt)},onChange:function(Rt){et(Rt),kt&&kt(Rt)},onCompositionStart:function(Rt){Lt(Rt),Vt&&Vt(Rt)},onCompositionEnd:function(Rt){nt(Rt),Dt&&Dt(Rt)},onPaste:St})),De},Ee=y.forwardRef(D);Ee.displayName="Input";var Ue=Ee;function $e(h){return Array.isArray(h)?h:h!==void 0?[h]:[]}var Oe=typeof window!="undefined"&&window.document&&window.document.documentElement,yt=Oe;function Ye(h){return h!=null}function Qe(h){return!h&&h!==0}function ge(h){return["string","number"].includes((0,A.Z)(h))}function G(h){var d=void 0;return h&&(ge(h.title)?d=h.title.toString():ge(h.label)&&(d=h.label.toString())),d}function me(h,d){yt?y.useLayoutEffect(h,d):y.useEffect(h,d)}function fe(h){var d;return(d=h.key)!==null&&d!==void 0?d:h.value}var se=function(d){d.preventDefault(),d.stopPropagation()},ke=function(d){var C=d.id,T=d.prefixCls,ie=d.values,H=d.open,_=d.searchValue,de=d.autoClearSearchValue,pe=d.inputRef,ze=d.placeholder,M=d.disabled,U=d.mode,Je=d.showSearch,Ce=d.autoFocus,je=d.autoComplete,Pe=d.activeDescendantId,ut=d.tabIndex,ne=d.removeIcon,et=d.maxTagCount,St=d.maxTagTextLength,Lt=d.maxTagPlaceholder,nt=Lt===void 0?function(At){return"+ ".concat(At.length," ...")}:Lt,gt=d.tagRender,Bt=d.onToggleOpen,De=d.onRemove,Ge=d.onInputChange,ct=d.onInputPaste,pt=d.onInputKeyDown,Wt=d.onInputMouseDown,kt=d.onInputCompositionStart,Gt=d.onInputCompositionEnd,Vt=y.useRef(null),Dt=(0,y.useState)(0),It=(0,v.Z)(Dt,2),zt=It[0],Rt=It[1],cn=(0,y.useState)(!1),Ft=(0,v.Z)(cn,2),Ht=Ft[0],an=Ft[1],Xt="".concat(T,"-selection"),En=H||U==="multiple"&&de===!1||U==="tags"?_:"",Un=U==="tags"||U==="multiple"&&de===!1||Je&&(H||Ht);me(function(){Rt(Vt.current.scrollWidth)},[En]);function Tt(At,ln,gn,mn,Ln){return y.createElement("span",{className:B()("".concat(Xt,"-item"),(0,x.Z)({},"".concat(Xt,"-item-disabled"),gn)),title:G(At)},y.createElement("span",{className:"".concat(Xt,"-item-content")},ln),mn&&y.createElement(Ct,{className:"".concat(Xt,"-item-remove"),onMouseDown:se,onClick:Ln,customizeIcon:ne},"\xD7"))}function ft(At,ln,gn,mn,Ln){var Ve=function(xt){se(xt),Bt(!H)};return y.createElement("span",{onMouseDown:Ve},gt({label:ln,value:At,disabled:gn,closable:mn,onClose:Ln}))}function ht(At){var ln=At.disabled,gn=At.label,mn=At.value,Ln=!M&&!ln,Ve=gn;if(typeof St=="number"&&(typeof gn=="string"||typeof gn=="number")){var We=String(Ve);We.length>St&&(Ve="".concat(We.slice(0,St),"..."))}var xt=function(hn){hn&&hn.stopPropagation(),De(At)};return typeof gt=="function"?ft(mn,Ve,ln,Ln,xt):Tt(At,Ve,ln,Ln,xt)}function qt(At){var ln=typeof nt=="function"?nt(At):nt;return Tt({title:ln},ln,!1)}var tn=y.createElement("div",{className:"".concat(Xt,"-search"),style:{width:zt},onFocus:function(){an(!0)},onBlur:function(){an(!1)}},y.createElement(Ue,{ref:pe,open:H,prefixCls:T,id:C,inputElement:null,disabled:M,autoFocus:Ce,autoComplete:je,editable:Un,activeDescendantId:Pe,value:En,onKeyDown:pt,onMouseDown:Wt,onChange:Ge,onPaste:ct,onCompositionStart:kt,onCompositionEnd:Gt,tabIndex:ut,attrs:(0,I.Z)(d,!0)}),y.createElement("span",{ref:Vt,className:"".concat(Xt,"-search-mirror"),"aria-hidden":!0},En,"\xA0")),Yt=y.createElement(k.Z,{prefixCls:"".concat(Xt,"-overflow"),data:ie,renderItem:ht,renderRest:qt,suffix:tn,itemKey:fe,maxCount:et});return y.createElement(y.Fragment,null,Yt,!ie.length&&!En&&y.createElement("span",{className:"".concat(Xt,"-placeholder")},ze))},Be=ke,ye=function(d){var C=d.inputElement,T=d.prefixCls,ie=d.id,H=d.inputRef,_=d.disabled,de=d.autoFocus,pe=d.autoComplete,ze=d.activeDescendantId,M=d.mode,U=d.open,Je=d.values,Ce=d.placeholder,je=d.tabIndex,Pe=d.showSearch,ut=d.searchValue,ne=d.activeValue,et=d.maxLength,St=d.onInputKeyDown,Lt=d.onInputMouseDown,nt=d.onInputChange,gt=d.onInputPaste,Bt=d.onInputCompositionStart,De=d.onInputCompositionEnd,Ge=d.title,ct=y.useState(!1),pt=(0,v.Z)(ct,2),Wt=pt[0],kt=pt[1],Gt=M==="combobox",Vt=Gt||Pe,Dt=Je[0],It=ut||"";Gt&&ne&&!Wt&&(It=ne),y.useEffect(function(){Gt&&kt(!1)},[Gt,ne]);var zt=M!=="combobox"&&!U&&!Pe?!1:!!It,Rt=Ge===void 0?G(Dt):Ge,cn=function(){if(Dt)return null;var Ht=zt?{visibility:"hidden"}:void 0;return y.createElement("span",{className:"".concat(T,"-selection-placeholder"),style:Ht},Ce)};return y.createElement(y.Fragment,null,y.createElement("span",{className:"".concat(T,"-selection-search")},y.createElement(Ue,{ref:H,prefixCls:T,id:ie,open:U,inputElement:C,disabled:_,autoFocus:de,autoComplete:pe,editable:Vt,activeDescendantId:ze,value:It,onKeyDown:St,onMouseDown:Lt,onChange:function(Ht){kt(!0),nt(Ht)},onPaste:gt,onCompositionStart:Bt,onCompositionEnd:De,tabIndex:je,attrs:(0,I.Z)(d,!0),maxLength:Gt?et:void 0})),!Gt&&Dt?y.createElement("span",{className:"".concat(T,"-selection-item"),title:Rt,style:zt?{visibility:"hidden"}:void 0},Dt.label):null,cn())},N=ye;function L(h){return![q.Z.ESC,q.Z.SHIFT,q.Z.BACKSPACE,q.Z.TAB,q.Z.WIN_KEY,q.Z.ALT,q.Z.META,q.Z.WIN_KEY_RIGHT,q.Z.CTRL,q.Z.SEMICOLON,q.Z.EQUALS,q.Z.CAPS_LOCK,q.Z.CONTEXT_MENU,q.Z.F1,q.Z.F2,q.Z.F3,q.Z.F4,q.Z.F5,q.Z.F6,q.Z.F7,q.Z.F8,q.Z.F9,q.Z.F10,q.Z.F11,q.Z.F12].includes(h)}var V=function(d,C){var T=(0,y.useRef)(null),ie=(0,y.useRef)(!1),H=d.prefixCls,_=d.open,de=d.mode,pe=d.showSearch,ze=d.tokenWithEnter,M=d.autoClearSearchValue,U=d.onSearch,Je=d.onSearchSubmit,Ce=d.onToggleOpen,je=d.onInputKeyDown,Pe=d.domRef;y.useImperativeHandle(C,function(){return{focus:function(){T.current.focus()},blur:function(){T.current.blur()}}});var ut=c(0),ne=(0,v.Z)(ut,2),et=ne[0],St=ne[1],Lt=function(It){var zt=It.which;(zt===q.Z.UP||zt===q.Z.DOWN)&&It.preventDefault(),je&&je(It),zt===q.Z.ENTER&&de==="tags"&&!ie.current&&!_&&(Je==null||Je(It.target.value)),L(zt)&&Ce(!0)},nt=function(){St(!0)},gt=(0,y.useRef)(null),Bt=function(It){U(It,!0,ie.current)!==!1&&Ce(!0)},De=function(){ie.current=!0},Ge=function(It){ie.current=!1,de!=="combobox"&&Bt(It.target.value)},ct=function(It){var zt=It.target.value;if(ze&&gt.current&&/[\r\n]/.test(gt.current)){var Rt=gt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");zt=zt.replace(Rt,gt.current)}gt.current=null,Bt(zt)},pt=function(It){var zt=It.clipboardData,Rt=zt.getData("text");gt.current=Rt},Wt=function(It){var zt=It.target;if(zt!==T.current){var Rt=document.body.style.msTouchAction!==void 0;Rt?setTimeout(function(){T.current.focus()}):T.current.focus()}},kt=function(It){var zt=et();It.target!==T.current&&!zt&&de!=="combobox"&&It.preventDefault(),(de!=="combobox"&&(!pe||!zt)||!_)&&(_&&M!==!1&&U("",!0,!1),Ce())},Gt={inputRef:T,onInputKeyDown:Lt,onInputMouseDown:nt,onInputChange:ct,onInputPaste:pt,onInputCompositionStart:De,onInputCompositionEnd:Ge},Vt=de==="multiple"||de==="tags"?y.createElement(Be,(0,P.Z)({},d,Gt)):y.createElement(N,(0,P.Z)({},d,Gt));return y.createElement("div",{ref:Pe,className:"".concat(H,"-selector"),onClick:Wt,onMouseDown:kt},Vt)},Me=y.forwardRef(V);Me.displayName="Selector";var it=Me,Ze=f(35593),ot=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],_e=function(d){var C=d===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"}}},R=function(d,C){var T=d.prefixCls,ie=d.disabled,H=d.visible,_=d.children,de=d.popupElement,pe=d.animation,ze=d.transitionName,M=d.dropdownStyle,U=d.dropdownClassName,Je=d.direction,Ce=Je===void 0?"ltr":Je,je=d.placement,Pe=d.builtinPlacements,ut=d.dropdownMatchSelectWidth,ne=d.dropdownRender,et=d.dropdownAlign,St=d.getPopupContainer,Lt=d.empty,nt=d.getTriggerDOMNode,gt=d.onPopupVisibleChange,Bt=d.onPopupMouseEnter,De=(0,F.Z)(d,ot),Ge="".concat(T,"-dropdown"),ct=de;ne&&(ct=ne(de));var pt=y.useMemo(function(){return Pe||_e(ut)},[Pe,ut]),Wt=pe?"".concat(Ge,"-").concat(pe):ze,kt=typeof ut=="number",Gt=y.useMemo(function(){return kt?null:ut===!1?"minWidth":"width"},[ut,kt]),Vt=M;kt&&(Vt=(0,z.Z)((0,z.Z)({},Vt),{},{width:ut}));var Dt=y.useRef(null);return y.useImperativeHandle(C,function(){return{getPopupElement:function(){return Dt.current}}}),y.createElement(Ze.Z,(0,P.Z)({},De,{showAction:gt?["click"]:[],hideAction:gt?["click"]:[],popupPlacement:je||(Ce==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:pt,prefixCls:Ge,popupTransitionName:Wt,popup:y.createElement("div",{ref:Dt,onMouseEnter:Bt},ct),stretch:Gt,popupAlign:et,popupVisible:H,getPopupContainer:St,popupClassName:B()(U,(0,x.Z)({},"".concat(Ge,"-empty"),Lt)),popupStyle:Vt,getTriggerDOMNode:nt,onPopupVisibleChange:gt}),_)},he=y.forwardRef(R);he.displayName="SelectTrigger";var ae=he,j=f(66712);function X(h,d){var C=h.key,T;return"value"in h&&(T=h.value),C!=null?C:T!==void 0?T:"rc-index-key-".concat(d)}function le(h,d){var C=h||{},T=C.label,ie=C.value,H=C.options,_=C.groupLabel,de=T||(d?"children":"label");return{label:de,value:ie||"value",options:H||"options",groupLabel:_||de}}function Q(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=d.fieldNames,T=d.childrenAsData,ie=[],H=le(C,!1),_=H.label,de=H.value,pe=H.options,ze=H.groupLabel;function M(U,Je){U.forEach(function(Ce){if(Je||!(pe in Ce)){var je=Ce[de];ie.push({key:X(Ce,ie.length),groupOption:Je,data:Ce,label:Ce[_],value:je})}else{var Pe=Ce[ze];Pe===void 0&&T&&(Pe=Ce.label),ie.push({key:X(Ce,ie.length),group:!0,data:Ce,label:Pe}),M(Ce[pe],!0)}})}return M(h,!1),ie}function ue(h){var d=(0,z.Z)({},h);return"props"in d||Object.defineProperty(d,"props",{get:function(){return(0,ce.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),d}}),d}function Le(h,d){if(!d||!d.length)return null;var C=!1;function T(H,_){var de=(0,j.Z)(_),pe=de[0],ze=de.slice(1);if(!pe)return[H];var M=H.split(pe);return C=C||M.length>1,M.reduce(function(U,Je){return[].concat((0,O.Z)(U),(0,O.Z)(T(Je,ze)))},[]).filter(function(U){return U})}var ie=T(h,d);return C?ie:null}var ee=["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"],re=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function W(h){return h==="tags"||h==="multiple"}var be=y.forwardRef(function(h,d){var C,T,ie=h.id,H=h.prefixCls,_=h.className,de=h.showSearch,pe=h.tagRender,ze=h.direction,M=h.omitDomProps,U=h.displayValues,Je=h.onDisplayValuesChange,Ce=h.emptyOptions,je=h.notFoundContent,Pe=je===void 0?"Not Found":je,ut=h.onClear,ne=h.mode,et=h.disabled,St=h.loading,Lt=h.getInputElement,nt=h.getRawInputElement,gt=h.open,Bt=h.defaultOpen,De=h.onDropdownVisibleChange,Ge=h.activeValue,ct=h.onActiveValueChange,pt=h.activeDescendantId,Wt=h.searchValue,kt=h.autoClearSearchValue,Gt=h.onSearch,Vt=h.onSearchSplit,Dt=h.tokenSeparators,It=h.allowClear,zt=h.suffixIcon,Rt=h.clearIcon,cn=h.OptionList,Ft=h.animation,Ht=h.transitionName,an=h.dropdownStyle,Xt=h.dropdownClassName,En=h.dropdownMatchSelectWidth,Un=h.dropdownRender,Tt=h.dropdownAlign,ft=h.placement,ht=h.builtinPlacements,qt=h.getPopupContainer,tn=h.showAction,Yt=tn===void 0?[]:tn,At=h.onFocus,ln=h.onBlur,gn=h.onKeyUp,mn=h.onKeyDown,Ln=h.onMouseDown,Ve=(0,F.Z)(h,ee),We=W(ne),xt=(de!==void 0?de:We)||ne==="combobox",wt=(0,z.Z)({},Ve);re.forEach(function(Qt){delete wt[Qt]}),M==null||M.forEach(function(Qt){delete wt[Qt]});var hn=y.useState(!1),xr=(0,v.Z)(hn,2),_n=xr[0],Kn=xr[1];y.useEffect(function(){Kn((0,Te.Z)())},[]);var $n=y.useRef(null),kn=y.useRef(null),Mn=y.useRef(null),ur=y.useRef(null),qn=y.useRef(null),tr=S(),_r=(0,v.Z)(tr,3),Xr=_r[0],li=_r[1],Yr=_r[2];y.useImperativeHandle(d,function(){var Qt,Zt;return{focus:(Qt=ur.current)===null||Qt===void 0?void 0:Qt.focus,blur:(Zt=ur.current)===null||Zt===void 0?void 0:Zt.blur,scrollTo:function(nr){var On;return(On=qn.current)===null||On===void 0?void 0:On.scrollTo(nr)}}});var Cr=y.useMemo(function(){var Qt;if(ne!=="combobox")return Wt;var Zt=(Qt=U[0])===null||Qt===void 0?void 0:Qt.value;return typeof Zt=="string"||typeof Zt=="number"?String(Zt):""},[Wt,ne,U]),Qr=ne==="combobox"&&typeof Lt=="function"&&Lt()||null,Ir=typeof nt=="function"&&nt(),Hi=(0,qe.x1)(kn,Ir==null||(C=Ir.props)===null||C===void 0?void 0:C.ref),Si=y.useState(!1),si=(0,v.Z)(Si,2),Kr=si[0],xi=si[1];(0,Se.Z)(function(){xi(!0)},[]);var Ci=(0,xe.Z)(!1,{defaultValue:Bt,value:gt}),jr=(0,v.Z)(Ci,2),Ar=jr[0],ui=jr[1],vt=Kr?Ar:!1,Pt=!Pe&&Ce;(et||Pt&&vt&&ne==="combobox")&&(vt=!1);var Et=Pt?!1:vt,st=y.useCallback(function(Qt){var Zt=Qt!==void 0?Qt:!vt;et||(ui(Zt),vt!==Zt&&(De==null||De(Zt)))},[et,vt,ui,De]),yn=y.useMemo(function(){return(Dt||[]).some(function(Qt){return[`
`,`\r
`].includes(Qt)})},[Dt]),bn=function(Zt,Vn,nr){var On=!0,ar=Zt;ct==null||ct(null);var mr=nr?null:Le(Zt,Dt);return ne!=="combobox"&&mr&&(ar="",Vt==null||Vt(mr),st(!1),On=!1),Gt&&Cr!==ar&&Gt(ar,{source:Vn?"typing":"effect"}),On},cr=function(Zt){!Zt||!Zt.trim()||Gt(Zt,{source:"submit"})};y.useEffect(function(){!vt&&!We&&ne!=="combobox"&&bn("",!1,!1)},[vt]),y.useEffect(function(){Ar&&et&&ui(!1),et&&li(!1)},[et]);var Mr=c(),Nr=(0,v.Z)(Mr,2),Gn=Nr[0],Rr=Nr[1],ci=function(Zt){var Vn=Gn(),nr=Zt.which;if(nr===q.Z.ENTER&&(ne!=="combobox"&&Zt.preventDefault(),vt||st(!0)),Rr(!!Cr),nr===q.Z.BACKSPACE&&!Vn&&We&&!Cr&&U.length){for(var On=(0,O.Z)(U),ar=null,mr=On.length-1;mr>=0;mr-=1){var Ur=On[mr];if(!Ur.disabled){On.splice(mr,1),ar=Ur;break}}ar&&Je(On,{type:"remove",values:[ar]})}for(var wr=arguments.length,kr=new Array(wr>1?wr-1:0),Fr=1;Fr<wr;Fr++)kr[Fr-1]=arguments[Fr];if(vt&&qn.current){var yr;(yr=qn.current).onKeyDown.apply(yr,[Zt].concat(kr))}mn==null||mn.apply(void 0,[Zt].concat(kr))},Zi=function(Zt){for(var Vn=arguments.length,nr=new Array(Vn>1?Vn-1:0),On=1;On<Vn;On++)nr[On-1]=arguments[On];if(vt&&qn.current){var ar;(ar=qn.current).onKeyUp.apply(ar,[Zt].concat(nr))}gn==null||gn.apply(void 0,[Zt].concat(nr))},mo=function(Zt){var Vn=U.filter(function(nr){return nr!==Zt});Je(Vn,{type:"remove",values:[Zt]})},Wr=y.useRef(!1),Lr=function(){li(!0),et||(At&&!Wr.current&&At.apply(void 0,arguments),Yt.includes("focus")&&st(!0)),Wr.current=!0},Zo=function(){li(!1,function(){Wr.current=!1,st(!1)}),!et&&(Cr&&(ne==="tags"?Gt(Cr,{source:"submit"}):ne==="multiple"&&Gt("",{source:"blur"})),ln&&ln.apply(void 0,arguments))},Tr=[];y.useEffect(function(){return function(){Tr.forEach(function(Qt){return clearTimeout(Qt)}),Tr.splice(0,Tr.length)}},[]);var $r=function(Zt){var Vn,nr=Zt.target,On=(Vn=Mn.current)===null||Vn===void 0?void 0:Vn.getPopupElement();if(On&&On.contains(nr)){var ar=setTimeout(function(){var kr=Tr.indexOf(ar);if(kr!==-1&&Tr.splice(kr,1),Yr(),!_n&&!On.contains(document.activeElement)){var Fr;(Fr=ur.current)===null||Fr===void 0||Fr.focus()}});Tr.push(ar)}for(var mr=arguments.length,Ur=new Array(mr>1?mr-1:0),wr=1;wr<mr;wr++)Ur[wr-1]=arguments[wr];Ln==null||Ln.apply(void 0,[Zt].concat(Ur))},wi=y.useState({}),_i=(0,v.Z)(wi,2),yo=_i[1];function Dr(){yo({})}var Hr;Ir&&(Hr=function(Zt){st(Zt)}),b(function(){var Qt;return[$n.current,(Qt=Mn.current)===null||Qt===void 0?void 0:Qt.getPopupElement()]},Et,st,!!Ir);var Ki=y.useMemo(function(){return(0,z.Z)((0,z.Z)({},h),{},{notFoundContent:Pe,open:vt,triggerOpen:Et,id:ie,showSearch:xt,multiple:We,toggleOpen:st})},[h,Pe,Et,vt,ie,xt,We,st]),bo=!!zt||St,ji;bo&&(ji=y.createElement(Ct,{className:B()("".concat(H,"-arrow"),(0,x.Z)({},"".concat(H,"-arrow-loading"),St)),customizeIcon:zt,customizeIconProps:{loading:St,searchValue:Cr,open:vt,focused:Xr,showSearch:xt}}));var _o=function(){var Zt;ut==null||ut(),(Zt=ur.current)===null||Zt===void 0||Zt.focus(),Je([],{type:"clear",values:U}),bn("",!1,!1)},Ui=Mt(H,_o,U,It,Rt,et,Cr,ne),ki=Ui.allowClear,Jr=Ui.clearIcon,Pr=y.createElement(cn,{ref:qn}),So=B()(H,_,(T={},(0,x.Z)(T,"".concat(H,"-focused"),Xr),(0,x.Z)(T,"".concat(H,"-multiple"),We),(0,x.Z)(T,"".concat(H,"-single"),!We),(0,x.Z)(T,"".concat(H,"-allow-clear"),It),(0,x.Z)(T,"".concat(H,"-show-arrow"),bo),(0,x.Z)(T,"".concat(H,"-disabled"),et),(0,x.Z)(T,"".concat(H,"-loading"),St),(0,x.Z)(T,"".concat(H,"-open"),vt),(0,x.Z)(T,"".concat(H,"-customize-input"),Qr),(0,x.Z)(T,"".concat(H,"-show-search"),xt),T)),Gi=y.createElement(ae,{ref:Mn,disabled:et,prefixCls:H,visible:Et,popupElement:Pr,animation:Ft,transitionName:Ht,dropdownStyle:an,dropdownClassName:Xt,direction:ze,dropdownMatchSelectWidth:En,dropdownRender:Un,dropdownAlign:Tt,placement:ft,builtinPlacements:ht,getPopupContainer:qt,empty:Ce,getTriggerDOMNode:function(){return kn.current},onPopupVisibleChange:Hr,onPopupMouseEnter:Dr},Ir?y.cloneElement(Ir,{ref:Hi}):y.createElement(it,(0,P.Z)({},h,{domRef:kn,prefixCls:H,inputElement:Qr,ref:ur,id:ie,showSearch:xt,autoClearSearchValue:kt,mode:ne,activeDescendantId:pt,tagRender:pe,values:U,open:vt,onToggleOpen:st,activeValue:Ge,searchValue:Cr,onSearch:bn,onSearchSubmit:cr,onRemove:mo,tokenWithEnter:yn}))),Vi;return Ir?Vi=Gi:Vi=y.createElement("div",(0,P.Z)({className:So},wt,{ref:$n,onMouseDown:$r,onKeyDown:ci,onKeyUp:Zi,onFocus:Lr,onBlur:Zo}),Xr&&!vt&&y.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(U.map(function(Qt){var Zt=Qt.label,Vn=Qt.value;return["number","string"].includes((0,A.Z)(Zt))?Zt:Vn}).join(", "))),Gi,ji,ki&&Jr),y.createElement(oe.Provider,{value:Ki},Vi)}),ve=be,Ne=function(h,d){var C=y.useRef({values:new Map,options:new Map}),T=y.useMemo(function(){var H=C.current,_=H.values,de=H.options,pe=h.map(function(U){if(U.label===void 0){var Je;return(0,z.Z)((0,z.Z)({},U),{},{label:(Je=_.get(U.value))===null||Je===void 0?void 0:Je.label})}return U}),ze=new Map,M=new Map;return pe.forEach(function(U){ze.set(U.value,U),M.set(U.value,d.get(U.value)||de.get(U.value))}),C.current.values=ze,C.current.options=M,pe},[h,d]),ie=y.useCallback(function(H){return d.get(H)||C.current.options.get(H)},[d]);return[T,ie]};function Ke(h,d){return $e(h).join("").toUpperCase().includes(d)}var J=function(h,d,C,T,ie){return y.useMemo(function(){if(!C||T===!1)return h;var H=d.options,_=d.label,de=d.value,pe=[],ze=typeof T=="function",M=C.toUpperCase(),U=ze?T:function(Ce,je){return ie?Ke(je[ie],M):je[H]?Ke(je[_!=="children"?_:"label"],M):Ke(je[de],M)},Je=ze?function(Ce){return ue(Ce)}:function(Ce){return Ce};return h.forEach(function(Ce){if(Ce[H]){var je=U(C,Je(Ce));if(je)pe.push(Ce);else{var Pe=Ce[H].filter(function(ut){return U(C,Je(ut))});Pe.length&&pe.push((0,z.Z)((0,z.Z)({},Ce),{},(0,x.Z)({},H,Pe)))}return}U(C,Je(Ce))&&pe.push(Ce)}),pe},[h,T,ie,C,d])},at=f(17115),He=f(11592),dt=["children","value"],bt=["children"];function rn(h){var d=h,C=d.key,T=d.props,ie=T.children,H=T.value,_=(0,F.Z)(T,dt);return(0,z.Z)({key:C,value:H!==void 0?H:C,children:ie},_)}function _t(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,He.Z)(h).map(function(C,T){if(!y.isValidElement(C)||!C.type)return null;var ie=C,H=ie.type.isSelectOptGroup,_=ie.key,de=ie.props,pe=de.children,ze=(0,F.Z)(de,bt);return d||!H?rn(C):(0,z.Z)((0,z.Z)({key:"__RC_SELECT_GRP__".concat(_===null?T:_,"__"),label:_},ze),{},{options:_t(pe)})}).filter(function(C){return C})}function Nt(h,d,C,T,ie){return y.useMemo(function(){var H=h,_=!h;_&&(H=_t(d));var de=new Map,pe=new Map,ze=function(Je,Ce,je){je&&typeof je=="string"&&Je.set(Ce[je],Ce)};function M(U){for(var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=0;Ce<U.length;Ce+=1){var je=U[Ce];!je[C.options]||Je?(de.set(je[C.value],je),ze(pe,je,C.label),ze(pe,je,T),ze(pe,je,ie)):M(je[C.options],!0)}}return M(H),{options:H,valueOptions:de,labelOptions:pe}},[h,d,C,T,ie])}function $t(h){var d=y.useRef();d.current=h;var C=y.useCallback(function(){return d.current.apply(d,arguments)},[]);return C}var en=function(){return null};en.isSelectOptGroup=!0;var Ut=en,sn=function(){return null};sn.isSelectOption=!0;var Cn=sn,fn=f(80547),An=f(2738),zn=f(48911),xn=y.createContext(null),Dn=xn;function vn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var In=["disabled","title","children","style","className"];function wn(h){return typeof h=="string"||typeof h=="number"}var pn=function(d,C){var T=Y(),ie=T.prefixCls,H=T.id,_=T.open,de=T.multiple,pe=T.mode,ze=T.searchValue,M=T.toggleOpen,U=T.notFoundContent,Je=T.onPopupScroll,Ce=y.useContext(Dn),je=Ce.flattenOptions,Pe=Ce.onActiveValue,ut=Ce.defaultActiveFirstOption,ne=Ce.onSelect,et=Ce.menuItemSelectedIcon,St=Ce.rawValues,Lt=Ce.fieldNames,nt=Ce.virtual,gt=Ce.direction,Bt=Ce.listHeight,De=Ce.listItemHeight,Ge="".concat(ie,"-item"),ct=(0,fn.Z)(function(){return je},[_,je],function(Tt,ft){return ft[0]&&Tt[1]!==ft[1]}),pt=y.useRef(null),Wt=function(ft){ft.preventDefault()},kt=function(ft){pt.current&&pt.current.scrollTo(typeof ft=="number"?{index:ft}:ft)},Gt=function(ft){for(var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,qt=ct.length,tn=0;tn<qt;tn+=1){var Yt=(ft+tn*ht+qt)%qt,At=ct[Yt],ln=At.group,gn=At.data;if(!ln&&!gn.disabled)return Yt}return-1},Vt=y.useState(function(){return Gt(0)}),Dt=(0,v.Z)(Vt,2),It=Dt[0],zt=Dt[1],Rt=function(ft){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;zt(ft);var qt={source:ht?"keyboard":"mouse"},tn=ct[ft];if(!tn){Pe(null,-1,qt);return}Pe(tn.value,ft,qt)};(0,y.useEffect)(function(){Rt(ut!==!1?Gt(0):-1)},[ct.length,ze]);var cn=y.useCallback(function(Tt){return St.has(Tt)&&pe!=="combobox"},[pe,(0,O.Z)(St).toString(),St.size]);(0,y.useEffect)(function(){var Tt=setTimeout(function(){if(!de&&_&&St.size===1){var ht=Array.from(St)[0],qt=ct.findIndex(function(tn){var Yt=tn.data;return Yt.value===ht});qt!==-1&&(Rt(qt),kt(qt))}});if(_){var ft;(ft=pt.current)===null||ft===void 0||ft.scrollTo(void 0)}return function(){return clearTimeout(Tt)}},[_,ze,je.length]);var Ft=function(ft){ft!==void 0&&ne(ft,{selected:!St.has(ft)}),de||M(!1)};if(y.useImperativeHandle(C,function(){return{onKeyDown:function(ft){var ht=ft.which,qt=ft.ctrlKey;switch(ht){case q.Z.N:case q.Z.P:case q.Z.UP:case q.Z.DOWN:{var tn=0;if(ht===q.Z.UP?tn=-1:ht===q.Z.DOWN?tn=1:vn()&&qt&&(ht===q.Z.N?tn=1:ht===q.Z.P&&(tn=-1)),tn!==0){var Yt=Gt(It+tn,tn);kt(Yt),Rt(Yt,!0)}break}case q.Z.ENTER:{var At=ct[It];At&&!At.data.disabled?Ft(At.value):Ft(void 0),_&&ft.preventDefault();break}case q.Z.ESC:M(!1),_&&ft.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ft){kt(ft)}}}),ct.length===0)return y.createElement("div",{role:"listbox",id:"".concat(H,"_list"),className:"".concat(Ge,"-empty"),onMouseDown:Wt},U);var Ht=Object.keys(Lt).map(function(Tt){return Lt[Tt]}),an=function(ft){return ft.label};function Xt(Tt,ft){var ht=Tt.group;return{role:ht?"presentation":"option",id:"".concat(H,"_list_").concat(ft)}}var En=function(ft){var ht=ct[ft];if(!ht)return null;var qt=ht.data||{},tn=qt.value,Yt=ht.group,At=(0,I.Z)(qt,!0),ln=an(ht);return ht?y.createElement("div",(0,P.Z)({"aria-label":typeof ln=="string"&&!Yt?ln:null},At,{key:ft},Xt(ht,ft),{"aria-selected":cn(tn)}),tn):null},Un={role:"listbox",id:"".concat(H,"_list")};return y.createElement(y.Fragment,null,nt&&y.createElement("div",(0,P.Z)({},Un,{style:{height:0,width:0,overflow:"hidden"}}),En(It-1),En(It),En(It+1)),y.createElement(zn.Z,{itemKey:"key",ref:pt,data:ct,height:Bt,itemHeight:De,fullHeight:!1,onMouseDown:Wt,onScroll:Je,virtual:nt,direction:gt,innerProps:nt?null:Un},function(Tt,ft){var ht,qt=Tt.group,tn=Tt.groupOption,Yt=Tt.data,At=Tt.label,ln=Tt.value,gn=Yt.key;if(qt){var mn,Ln=(mn=Yt.title)!==null&&mn!==void 0?mn:wn(At)?At.toString():void 0;return y.createElement("div",{className:B()(Ge,"".concat(Ge,"-group")),title:Ln},At!==void 0?At:gn)}var Ve=Yt.disabled,We=Yt.title,xt=Yt.children,wt=Yt.style,hn=Yt.className,xr=(0,F.Z)(Yt,In),_n=(0,An.Z)(xr,Ht),Kn=cn(ln),$n="".concat(Ge,"-option"),kn=B()(Ge,$n,hn,(ht={},(0,x.Z)(ht,"".concat($n,"-grouped"),tn),(0,x.Z)(ht,"".concat($n,"-active"),It===ft&&!Ve),(0,x.Z)(ht,"".concat($n,"-disabled"),Ve),(0,x.Z)(ht,"".concat($n,"-selected"),Kn),ht)),Mn=an(Tt),ur=!et||typeof et=="function"||Kn,qn=typeof Mn=="number"?Mn:Mn||ln,tr=wn(qn)?qn.toString():void 0;return We!==void 0&&(tr=We),y.createElement("div",(0,P.Z)({},(0,I.Z)(_n),nt?{}:Xt(Tt,ft),{"aria-selected":Kn,className:kn,title:tr,onMouseMove:function(){It===ft||Ve||Rt(ft)},onClick:function(){Ve||Ft(ln)},style:wt}),y.createElement("div",{className:"".concat($n,"-content")},qn),y.isValidElement(et)||Kn,ur&&y.createElement(Ct,{className:"".concat(Ge,"-option-state"),customizeIcon:et,customizeIconProps:{isSelected:Kn}},Kn?"\u2713":null))}))},Pn=y.forwardRef(pn);Pn.displayName="OptionList";var on=Pn;function Nn(h){var d=h.mode,C=h.options,T=h.children,ie=h.backfill,H=h.allowClear,_=h.placeholder,de=h.getInputElement,pe=h.showSearch,ze=h.onSearch,M=h.defaultOpen,U=h.autoFocus,Je=h.labelInValue,Ce=h.value,je=h.inputValue,Pe=h.optionLabelProp,ut=isMultiple(d),ne=pe!==void 0?pe:ut||d==="combobox",et=C||convertChildrenToData(T);if(warning(d!=="tags"||et.every(function(gt){return!gt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),d==="tags"||d==="combobox"){var St=et.some(function(gt){return gt.options?gt.options.some(function(Bt){return typeof("value"in Bt?Bt.value:Bt.key)=="number"}):typeof("value"in gt?gt.value:gt.key)=="number"});warning(!St,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(d!=="combobox"||!Pe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(d==="combobox"||!ie,"`backfill` only works with `combobox` mode."),warning(d==="combobox"||!de,"`getInputElement` only work with `combobox` mode."),noteOnce(d!=="combobox"||!de||!H||!_,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ze&&!ne&&d!=="combobox"&&d!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!M||U,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ce!=null){var Lt=toArray(Ce);warning(!Je||Lt.every(function(gt){return _typeof(gt)==="object"&&("key"in gt||"value"in gt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ut||Array.isArray(Ce),"`value` should be array when `mode` is `multiple` or `tags`")}if(T){var nt=null;toNodeArray(T).some(function(gt){if(!React.isValidElement(gt)||!gt.type)return!1;var Bt=gt,De=Bt.type;if(De.isSelectOption)return!1;if(De.isSelectOptGroup){var Ge=toNodeArray(gt.props.children).every(function(ct){return!React.isValidElement(ct)||!gt.type||ct.type.isSelectOption?!0:(nt=ct.type,!1)});return!Ge}return nt=De,!0}),nt&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(nt.displayName||nt.name||nt,"`.")),warning(je===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Wn(h,d){if(h){var C=function T(ie){for(var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=0;_<ie.length;_++){var de=ie[_];if(de[d==null?void 0:d.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!H&&Array.isArray(de[d==null?void 0:d.options])&&T(de[d==null?void 0:d.options],!0))break}};C(h)}}var or=null,gr=["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"],Jt=["inputValue"];function lt(h){return!h||(0,A.Z)(h)!=="object"}var Kt=y.forwardRef(function(h,d){var C=h.id,T=h.mode,ie=h.prefixCls,H=ie===void 0?"rc-select":ie,_=h.backfill,de=h.fieldNames,pe=h.inputValue,ze=h.searchValue,M=h.onSearch,U=h.autoClearSearchValue,Je=U===void 0?!0:U,Ce=h.onSelect,je=h.onDeselect,Pe=h.dropdownMatchSelectWidth,ut=Pe===void 0?!0:Pe,ne=h.filterOption,et=h.filterSort,St=h.optionFilterProp,Lt=h.optionLabelProp,nt=h.options,gt=h.children,Bt=h.defaultActiveFirstOption,De=h.menuItemSelectedIcon,Ge=h.virtual,ct=h.direction,pt=h.listHeight,Wt=pt===void 0?200:pt,kt=h.listItemHeight,Gt=kt===void 0?20:kt,Vt=h.value,Dt=h.defaultValue,It=h.labelInValue,zt=h.onChange,Rt=(0,F.Z)(h,gr),cn=(0,at.ZP)(C),Ft=W(T),Ht=!!(!nt&&gt),an=y.useMemo(function(){return ne===void 0&&T==="combobox"?!1:ne},[ne,T]),Xt=y.useMemo(function(){return le(de,Ht)},[JSON.stringify(de),Ht]),En=(0,xe.Z)("",{value:ze!==void 0?ze:pe,postState:function(Pt){return Pt||""}}),Un=(0,v.Z)(En,2),Tt=Un[0],ft=Un[1],ht=Nt(nt,gt,Xt,St,Lt),qt=ht.valueOptions,tn=ht.labelOptions,Yt=ht.options,At=y.useCallback(function(vt){var Pt=$e(vt);return Pt.map(function(Et){var st,yn,bn,cr,Mr;if(lt(Et))st=Et;else{var Nr;bn=Et.key,yn=Et.label,st=(Nr=Et.value)!==null&&Nr!==void 0?Nr:bn}var Gn=qt.get(st);if(Gn){var Rr;if(yn===void 0&&(yn=Gn==null?void 0:Gn[Lt||Xt.label]),bn===void 0&&(bn=(Rr=Gn==null?void 0:Gn.key)!==null&&Rr!==void 0?Rr:st),cr=Gn==null?void 0:Gn.disabled,Mr=Gn==null?void 0:Gn.title,0)var ci}return{label:yn,value:st,key:bn,disabled:cr,title:Mr}})},[Xt,Lt,qt]),ln=(0,xe.Z)(Dt,{value:Vt}),gn=(0,v.Z)(ln,2),mn=gn[0],Ln=gn[1],Ve=y.useMemo(function(){var vt,Pt=At(mn);return T==="combobox"&&Qe((vt=Pt[0])===null||vt===void 0?void 0:vt.value)?[]:Pt},[mn,At,T]),We=Ne(Ve,qt),xt=(0,v.Z)(We,2),wt=xt[0],hn=xt[1],xr=y.useMemo(function(){if(!T&&wt.length===1){var vt=wt[0];if(vt.value===null&&(vt.label===null||vt.label===void 0))return[]}return wt.map(function(Pt){var Et;return(0,z.Z)((0,z.Z)({},Pt),{},{label:(Et=Pt.label)!==null&&Et!==void 0?Et:Pt.value})})},[T,wt]),_n=y.useMemo(function(){return new Set(wt.map(function(vt){return vt.value}))},[wt]);y.useEffect(function(){if(T==="combobox"){var vt,Pt=(vt=wt[0])===null||vt===void 0?void 0:vt.value;ft(Ye(Pt)?String(Pt):"")}},[wt]);var Kn=$t(function(vt,Pt){var Et,st=Pt!=null?Pt:vt;return Et={},(0,x.Z)(Et,Xt.value,vt),(0,x.Z)(Et,Xt.label,st),Et}),$n=y.useMemo(function(){if(T!=="tags")return Yt;var vt=(0,O.Z)(Yt),Pt=function(st){return qt.has(st)};return(0,O.Z)(wt).sort(function(Et,st){return Et.value<st.value?-1:1}).forEach(function(Et){var st=Et.value;Pt(st)||vt.push(Kn(st,Et.label))}),vt},[Kn,Yt,qt,wt,T]),kn=J($n,Xt,Tt,an,St),Mn=y.useMemo(function(){return T!=="tags"||!Tt||kn.some(function(vt){return vt[St||"value"]===Tt})||kn.some(function(vt){return vt[Xt.value]===Tt})?kn:[Kn(Tt)].concat((0,O.Z)(kn))},[Kn,St,T,kn,Tt,Xt]),ur=y.useMemo(function(){return et?(0,O.Z)(Mn).sort(function(vt,Pt){return et(vt,Pt)}):Mn},[Mn,et]),qn=y.useMemo(function(){return Q(ur,{fieldNames:Xt,childrenAsData:Ht})},[ur,Xt,Ht]),tr=function(Pt){var Et=At(Pt);if(Ln(Et),zt&&(Et.length!==wt.length||Et.some(function(bn,cr){var Mr;return((Mr=wt[cr])===null||Mr===void 0?void 0:Mr.value)!==(bn==null?void 0:bn.value)}))){var st=It?Et:Et.map(function(bn){return bn.value}),yn=Et.map(function(bn){return ue(hn(bn.value))});zt(Ft?st:st[0],Ft?yn:yn[0])}},_r=y.useState(null),Xr=(0,v.Z)(_r,2),li=Xr[0],Yr=Xr[1],Cr=y.useState(0),Qr=(0,v.Z)(Cr,2),Ir=Qr[0],Hi=Qr[1],Si=Bt!==void 0?Bt:T!=="combobox",si=y.useCallback(function(vt,Pt){var Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},st=Et.source,yn=st===void 0?"keyboard":st;Hi(Pt),_&&T==="combobox"&&vt!==null&&yn==="keyboard"&&Yr(String(vt))},[_,T]),Kr=function(Pt,Et,st){var yn=function(){var Wr,Lr=hn(Pt);return[It?{label:Lr==null?void 0:Lr[Xt.label],value:Pt,key:(Wr=Lr==null?void 0:Lr.key)!==null&&Wr!==void 0?Wr:Pt}:Pt,ue(Lr)]};if(Et&&Ce){var bn=yn(),cr=(0,v.Z)(bn,2),Mr=cr[0],Nr=cr[1];Ce(Mr,Nr)}else if(!Et&&je&&st!=="clear"){var Gn=yn(),Rr=(0,v.Z)(Gn,2),ci=Rr[0],Zi=Rr[1];je(ci,Zi)}},xi=$t(function(vt,Pt){var Et,st=Ft?Pt.selected:!0;st?Et=Ft?[].concat((0,O.Z)(wt),[vt]):[vt]:Et=wt.filter(function(yn){return yn.value!==vt}),tr(Et),Kr(vt,st),T==="combobox"?Yr(""):(!W||Je)&&(ft(""),Yr(""))}),Ci=function(Pt,Et){tr(Pt);var st=Et.type,yn=Et.values;(st==="remove"||st==="clear")&&yn.forEach(function(bn){Kr(bn.value,!1,st)})},jr=function(Pt,Et){if(ft(Pt),Yr(null),Et.source==="submit"){var st=(Pt||"").trim();if(st){var yn=Array.from(new Set([].concat((0,O.Z)(_n),[st])));tr(yn),Kr(st,!0),ft("")}return}Et.source!=="blur"&&(T==="combobox"&&tr(Pt),M==null||M(Pt))},Ar=function(Pt){var Et=Pt;T!=="tags"&&(Et=Pt.map(function(yn){var bn=tn.get(yn);return bn==null?void 0:bn.value}).filter(function(yn){return yn!==void 0}));var st=Array.from(new Set([].concat((0,O.Z)(_n),(0,O.Z)(Et))));tr(st),st.forEach(function(yn){Kr(yn,!0)})},ui=y.useMemo(function(){var vt=Ge!==!1&&ut!==!1;return(0,z.Z)((0,z.Z)({},ht),{},{flattenOptions:qn,onActiveValue:si,defaultActiveFirstOption:Si,onSelect:xi,menuItemSelectedIcon:De,rawValues:_n,fieldNames:Xt,virtual:vt,direction:ct,listHeight:Wt,listItemHeight:Gt,childrenAsData:Ht})},[ht,qn,si,Si,xi,De,_n,Xt,Ge,ut,Wt,Gt,Ht]);return y.createElement(Dn.Provider,{value:ui},y.createElement(ve,(0,P.Z)({},Rt,{id:cn,prefixCls:H,ref:d,omitDomProps:Jt,mode:T,displayValues:xr,onDisplayValuesChange:Ci,direction:ct,searchValue:Tt,onSearch:jr,autoClearSearchValue:Je,onSearchSplit:Ar,dropdownMatchSelectWidth:ut,OptionList:on,emptyOptions:!qn.length,activeValue:li,activeDescendantId:"".concat(cn,"_list_").concat(Ir)})))}),m=Kt;m.Option=Cn,m.OptGroup=Ut;var $=m,Z=$},9296:function(nn,Re,f){"use strict";f.r(Re),f.d(Re,{ResizableTextArea:function(){return Ee},default:function(){return Qe}});var P=f(54476),O=f(33885),x=f(20068),z=f(76190),v=f(42978),F=f(75931),A=f(94480),xe=f(92310),ce=f.n(xe),y=f(93681),Ie=f(5643),B=f(18929),Se=f(59301),Te=f(29301),q=f(34280),qe=f(16089),rt=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,Ct=["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"],Mt={},oe;function Y(ge){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=ge.getAttribute("id")||ge.getAttribute("data-reactid")||ge.getAttribute("name");if(G&&Mt[me])return Mt[me];var fe=window.getComputedStyle(ge),se=fe.getPropertyValue("box-sizing")||fe.getPropertyValue("-moz-box-sizing")||fe.getPropertyValue("-webkit-box-sizing"),ke=parseFloat(fe.getPropertyValue("padding-bottom"))+parseFloat(fe.getPropertyValue("padding-top")),Be=parseFloat(fe.getPropertyValue("border-bottom-width"))+parseFloat(fe.getPropertyValue("border-top-width")),ye=Ct.map(function(L){return"".concat(L,":").concat(fe.getPropertyValue(L))}).join(";"),N={sizingStyle:ye,paddingSize:ke,borderSize:Be,boxSizing:se};return G&&me&&(Mt[me]=N),N}function S(ge){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,fe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;oe||(oe=document.createElement("textarea"),oe.setAttribute("tab-index","-1"),oe.setAttribute("aria-hidden","true"),document.body.appendChild(oe)),ge.getAttribute("wrap")?oe.setAttribute("wrap",ge.getAttribute("wrap")):oe.removeAttribute("wrap");var se=Y(ge,G),ke=se.paddingSize,Be=se.borderSize,ye=se.boxSizing,N=se.sizingStyle;oe.setAttribute("style","".concat(N,";").concat(rt)),oe.value=ge.value||ge.placeholder||"";var L=void 0,V=void 0,Me,it=oe.scrollHeight;if(ye==="border-box"?it+=Be:ye==="content-box"&&(it-=ke),me!==null||fe!==null){oe.value=" ";var Ze=oe.scrollHeight-ke;me!==null&&(L=Ze*me,ye==="border-box"&&(L=L+ke+Be),it=Math.max(L,it)),fe!==null&&(V=Ze*fe,ye==="border-box"&&(V=V+ke+Be),Me=it>V?"":"hidden",it=Math.min(V,it))}var ot={height:it,overflowY:Me,resize:"none"};return L&&(ot.minHeight=L),V&&(ot.maxHeight=V),ot}var c=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],b=0,I=1,k=2,D=Se.forwardRef(function(ge,G){var me=ge,fe=me.prefixCls,se=me.onPressEnter,ke=me.defaultValue,Be=me.value,ye=me.autoSize,N=me.onResize,L=me.className,V=me.style,Me=me.disabled,it=me.onChange,Ze=me.onInternalAutoSize,ot=(0,F.Z)(me,c),_e=(0,B.Z)(ke,{value:Be,postState:function(Ut){return Ut!=null?Ut:""}}),R=(0,v.Z)(_e,2),he=R[0],ae=R[1],j=function(Ut){ae(Ut.target.value),it==null||it(Ut)},X=Se.useRef();Se.useImperativeHandle(G,function(){return{textArea:X.current}});var le=Se.useMemo(function(){return ye&&(0,z.Z)(ye)==="object"?[ye.minRows,ye.maxRows]:[]},[ye]),Q=(0,v.Z)(le,2),ue=Q[0],Le=Q[1],ee=!!ye,re=function(){try{if(document.activeElement===X.current){var Ut=X.current,sn=Ut.selectionStart,Cn=Ut.selectionEnd,fn=Ut.scrollTop;X.current.setSelectionRange(sn,Cn),X.current.scrollTop=fn}}catch(An){}},W=Se.useState(k),be=(0,v.Z)(W,2),ve=be[0],Ne=be[1],Ke=Se.useState(),J=(0,v.Z)(Ke,2),at=J[0],He=J[1],dt=function(){Ne(b)};(0,q.Z)(function(){ee&&dt()},[Be,ue,Le,ee]),(0,q.Z)(function(){if(ve===b)Ne(I);else if(ve===I){var en=S(X.current,!1,ue,Le);Ne(k),He(en)}else re()},[ve]);var bt=Se.useRef(),rn=function(){qe.Z.cancel(bt.current)},_t=function(Ut){ve===k&&(N==null||N(Ut),ye&&(rn(),bt.current=(0,qe.Z)(function(){dt()})))};Se.useEffect(function(){return rn},[]);var Nt=ee?at:null,$t=(0,O.Z)((0,O.Z)({},V),Nt);return(ve===b||ve===I)&&($t.overflowY="hidden",$t.overflowX="hidden"),Se.createElement(Te.Z,{onResize:_t,disabled:!(ye||N)},Se.createElement("textarea",(0,P.Z)({},ot,{ref:X,style:$t,className:ce()(fe,L,(0,x.Z)({},"".concat(fe,"-disabled"),Me)),disabled:Me,value:he,onChange:j})))}),Ee=D,Ue=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function $e(ge,G){return(0,A.Z)(ge||"").slice(0,G).join("")}function Oe(ge,G,me,fe){var se=me;return ge?se=$e(me,fe):(0,A.Z)(G||"").length<me.length&&(0,A.Z)(me||"").length>fe&&(se=G),se}var yt=Se.forwardRef(function(ge,G){var me,fe=ge.defaultValue,se=ge.value,ke=ge.onFocus,Be=ge.onBlur,ye=ge.onChange,N=ge.allowClear,L=ge.maxLength,V=ge.onCompositionStart,Me=ge.onCompositionEnd,it=ge.suffix,Ze=ge.prefixCls,ot=Ze===void 0?"rc-textarea":Ze,_e=ge.classes,R=ge.showCount,he=ge.className,ae=ge.style,j=ge.disabled,X=ge.hidden,le=ge.classNames,Q=ge.styles,ue=ge.onResize,Le=(0,F.Z)(ge,Ue),ee=(0,B.Z)(fe,{value:se,defaultValue:fe}),re=(0,v.Z)(ee,2),W=re[0],be=re[1],ve=(0,Se.useRef)(null),Ne=Se.useState(!1),Ke=(0,v.Z)(Ne,2),J=Ke[0],at=Ke[1],He=Se.useState(!1),dt=(0,v.Z)(He,2),bt=dt[0],rn=dt[1],_t=Se.useRef(),Nt=Se.useRef(0),$t=Se.useState(null),en=(0,v.Z)($t,2),Ut=en[0],sn=en[1],Cn=function(){var lt;(lt=ve.current)===null||lt===void 0||lt.textArea.focus()};(0,Se.useImperativeHandle)(G,function(){return{resizableTextArea:ve.current,focus:Cn,blur:function(){var lt;(lt=ve.current)===null||lt===void 0||lt.textArea.blur()}}}),(0,Se.useEffect)(function(){at(function(Jt){return!j&&Jt})},[j]);var fn=Number(L)>0,An=function(lt){rn(!0),_t.current=W,Nt.current=lt.currentTarget.selectionStart,V==null||V(lt)},zn=function(lt){rn(!1);var Kt=lt.currentTarget.value;if(fn){var m,$=Nt.current>=L+1||Nt.current===((m=_t.current)===null||m===void 0?void 0:m.length);Kt=Oe($,_t.current,Kt,L)}Kt!==W&&(be(Kt),(0,Ie.rJ)(lt.currentTarget,lt,ye,Kt)),Me==null||Me(lt)},xn=function(lt){var Kt=lt.target.value;if(!bt&&fn){var m=lt.target.selectionStart>=L+1||lt.target.selectionStart===Kt.length||!lt.target.selectionStart;Kt=Oe(m,W,Kt,L)}be(Kt),(0,Ie.rJ)(lt.currentTarget,lt,ye,Kt)},Dn=function(lt){var Kt=Le.onPressEnter,m=Le.onKeyDown;lt.key==="Enter"&&Kt&&Kt(lt),m==null||m(lt)},vn=function(lt){at(!0),ke==null||ke(lt)},In=function(lt){at(!1),Be==null||Be(lt)},wn=function(lt){var Kt;be(""),Cn(),(0,Ie.rJ)((Kt=ve.current)===null||Kt===void 0?void 0:Kt.textArea,lt,ye)},pn=(0,Ie.D7)(W);!bt&&fn&&se==null&&(pn=$e(pn,L));var Pn=it,on;if(R){var Nn=(0,A.Z)(pn).length;(0,z.Z)(R)==="object"?on=R.formatter({value:pn,count:Nn,maxLength:L}):on="".concat(Nn).concat(fn?" / ".concat(L):""),Pn=Se.createElement(Se.Fragment,null,Pn,Se.createElement("span",{className:ce()("".concat(ot,"-data-count"),le==null?void 0:le.count),style:Q==null?void 0:Q.count},on))}var Wn=function(lt){var Kt;ue==null||ue(lt),(Kt=ve.current)!==null&&Kt!==void 0&&Kt.textArea.style.height&&sn(!0)},or=!Le.autoSize&&!R&&!N,gr=Se.createElement(y.BaseInput,{value:pn,allowClear:N,handleReset:wn,suffix:Pn,prefixCls:ot,classes:{affixWrapper:ce()(_e==null?void 0:_e.affixWrapper,(me={},(0,x.Z)(me,"".concat(ot,"-show-count"),R),(0,x.Z)(me,"".concat(ot,"-textarea-allow-clear"),N),me))},disabled:j,focused:J,className:he,style:(0,O.Z)((0,O.Z)({},ae),Ut&&!or?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof on=="string"?on:void 0}},hidden:X,inputElement:Se.createElement(Ee,(0,P.Z)({},Le,{onKeyDown:Dn,onChange:xn,onFocus:vn,onBlur:In,onCompositionStart:An,onCompositionEnd:zn,className:le==null?void 0:le.textarea,style:(0,O.Z)((0,O.Z)({},Q==null?void 0:Q.textarea),{},{resize:ae==null?void 0:ae.resize}),disabled:j,prefixCls:ot,onResize:Wn,ref:ve}))});return gr}),Ye=yt,Qe=Ye},48911:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return _e}});var P=f(54476),O=f(76190),x=f(33885),z=f(20068),v=f(42978),F=f(75931),A=f(92310),xe=f.n(A),ce=f(29301),y=f(70425),Ie=f(34280),B=f(59301),Se=f(4676),Te=B.forwardRef(function(R,he){var ae=R.height,j=R.offsetY,X=R.offsetX,le=R.children,Q=R.prefixCls,ue=R.onInnerResize,Le=R.innerProps,ee=R.rtl,re=R.extra,W={},be={display:"flex",flexDirection:"column"};return j!==void 0&&(W={height:ae,position:"relative",overflow:"hidden"},be=(0,x.Z)((0,x.Z)({},be),{},(0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)({transform:"translateY(".concat(j,"px)")},ee?"marginRight":"marginLeft",-X),"position","absolute"),"left",0),"right",0),"top",0))),B.createElement("div",{style:W},B.createElement(ce.Z,{onResize:function(Ne){var Ke=Ne.offsetHeight;Ke&&ue&&ue()}},B.createElement("div",(0,P.Z)({style:be,className:xe()((0,z.Z)({},"".concat(Q,"-holder-inner"),Q)),ref:he},Le),le,re)))});Te.displayName="Filler";var q=Te;function qe(R){var he=R.children,ae=R.setRef,j=B.useCallback(function(X){ae(X)},[]);return B.cloneElement(he,{ref:j})}function rt(R,he,ae,j,X,le,Q,ue){var Le=ue.getKey;return R.slice(he,ae+1).map(function(ee,re){var W=he+re,be=Q(ee,W,{style:{width:j},offsetX:X}),ve=Le(ee);return B.createElement(qe,{key:ve,setRef:function(Ke){return le(ee,Ke)}},be)})}function Ct(R,he,ae,j){var X=ae-R,le=he-ae,Q=Math.min(X,le)*2;if(j<=Q){var ue=Math.floor(j/2);return j%2?ae+ue+1:ae-ue}return X>le?ae-(j-le):ae+(j-X)}function Mt(R,he,ae){var j=R.length,X=he.length,le,Q;if(j===0&&X===0)return null;j<X?(le=R,Q=he):(le=he,Q=R);var ue={__EMPTY_ITEM__:!0};function Le(Ne){return Ne!==void 0?ae(Ne):ue}for(var ee=null,re=Math.abs(j-X)!==1,W=0;W<Q.length;W+=1){var be=Le(le[W]),ve=Le(Q[W]);if(be!==ve){ee=W,re=re||be!==Le(Q[W+1]);break}}return ee===null?null:{index:ee,multiple:re}}function oe(R,he,ae){var j=B.useState(R),X=(0,v.Z)(j,2),le=X[0],Q=X[1],ue=B.useState(null),Le=(0,v.Z)(ue,2),ee=Le[0],re=Le[1];return B.useEffect(function(){var W=Mt(le||[],R||[],he);(W==null?void 0:W.index)!==void 0&&(ae==null||ae(W.index),re(R[W.index])),Q(R)},[R]),[ee]}var Y=f(16089),S=(typeof navigator=="undefined"?"undefined":(0,O.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),c=S,b=function(R,he,ae,j){var X=(0,B.useRef)(!1),le=(0,B.useRef)(null);function Q(){clearTimeout(le.current),X.current=!0,le.current=setTimeout(function(){X.current=!1},50)}var ue=(0,B.useRef)({top:R,bottom:he,left:ae,right:j});return ue.current.top=R,ue.current.bottom=he,ue.current.left=ae,ue.current.right=j,function(Le,ee){var re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,W=Le?ee<0&&ue.current.left||ee>0&&ue.current.right:ee<0&&ue.current.top||ee>0&&ue.current.bottom;return re&&W?(clearTimeout(le.current),X.current=!1):(!W||X.current)&&Q(),!X.current&&W}};function I(R,he,ae,j,X,le,Q){var ue=(0,B.useRef)(0),Le=(0,B.useRef)(null),ee=(0,B.useRef)(null),re=(0,B.useRef)(!1),W=b(he,ae,j,X);function be(He,dt){if(Y.Z.cancel(Le.current),!W(!1,dt)){var bt=He;if(!bt._virtualHandled)bt._virtualHandled=!0;else return;ue.current+=dt,ee.current=dt,c||bt.preventDefault(),Le.current=(0,Y.Z)(function(){var rn=re.current?10:1;Q(ue.current*rn,!1),ue.current=0})}}function ve(He,dt){Q(dt,!0),c||He.preventDefault()}var Ne=(0,B.useRef)(null),Ke=(0,B.useRef)(null);function J(He){if(R){Y.Z.cancel(Ke.current),Ke.current=(0,Y.Z)(function(){Ne.current=null},2);var dt=He.deltaX,bt=He.deltaY,rn=He.shiftKey,_t=dt,Nt=bt;(Ne.current==="sx"||!Ne.current&&rn&&bt&&!dt)&&(_t=bt,Nt=0,Ne.current="sx");var $t=Math.abs(_t),en=Math.abs(Nt);Ne.current===null&&(Ne.current=le&&$t>en?"x":"y"),Ne.current==="y"?be(He,Nt):ve(He,_t)}}function at(He){R&&(re.current=He.detail===ee.current)}return[J,at]}function k(R,he,ae,j){var X=B.useMemo(function(){return[new Map,[]]},[R,ae.id,j]),le=(0,v.Z)(X,2),Q=le[0],ue=le[1],Le=function(re){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re,be=Q.get(re),ve=Q.get(W);if(be===void 0||ve===void 0)for(var Ne=R.length,Ke=ue.length;Ke<Ne;Ke+=1){var J,at=R[Ke],He=he(at);Q.set(He,Ke);var dt=(J=ae.get(He))!==null&&J!==void 0?J:j;if(ue[Ke]=(ue[Ke-1]||0)+dt,He===re&&(be=Ke),He===W&&(ve=Ke),be!==void 0&&ve!==void 0)break}return{top:ue[be-1]||0,bottom:ue[ve]}};return Le}var D=f(67732),Ee=f(83652),Ue=function(){function R(){(0,D.Z)(this,R),(0,z.Z)(this,"maps",void 0),(0,z.Z)(this,"id",0),(0,z.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Ee.Z)(R,[{key:"set",value:function(ae,j){this.diffRecords.set(ae,this.maps[ae]),this.maps[ae]=j,this.id+=1}},{key:"get",value:function(ae){return this.maps[ae]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),R}(),$e=Ue;function Oe(R){var he=parseFloat(R);return isNaN(he)?0:he}function yt(R,he,ae){var j=B.useState(0),X=(0,v.Z)(j,2),le=X[0],Q=X[1],ue=(0,B.useRef)(new Map),Le=(0,B.useRef)(new $e),ee=(0,B.useRef)(0);function re(){ee.current+=1}function W(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;re();var Ne=function(){var at=!1;ue.current.forEach(function(He,dt){if(He&&He.offsetParent){var bt=He.offsetHeight,rn=getComputedStyle(He),_t=rn.marginTop,Nt=rn.marginBottom,$t=Oe(_t),en=Oe(Nt),Ut=bt+$t+en;Le.current.get(dt)!==Ut&&(Le.current.set(dt,Ut),at=!0)}}),at&&Q(function(He){return He+1})};if(ve)Ne();else{ee.current+=1;var Ke=ee.current;Promise.resolve().then(function(){Ke===ee.current&&Ne()})}}function be(ve,Ne){var Ke=R(ve),J=ue.current.get(Ke);Ne?(ue.current.set(Ke,Ne),W()):ue.current.delete(Ke),!J!=!Ne&&(Ne?he==null||he(ve):ae==null||ae(ve))}return(0,B.useEffect)(function(){return re},[]),[be,W,Le.current,le]}var Ye=14/15;function Qe(R,he,ae){var j=(0,B.useRef)(!1),X=(0,B.useRef)(0),le=(0,B.useRef)(0),Q=(0,B.useRef)(null),ue=(0,B.useRef)(null),Le,ee=function(ve){if(j.current){var Ne=Math.ceil(ve.touches[0].pageX),Ke=Math.ceil(ve.touches[0].pageY),J=X.current-Ne,at=le.current-Ke,He=Math.abs(J)>Math.abs(at);He?X.current=Ne:le.current=Ke;var dt=ae(He,He?J:at,!1,ve);dt&&ve.preventDefault(),clearInterval(ue.current),dt&&(ue.current=setInterval(function(){He?J*=Ye:at*=Ye;var bt=Math.floor(He?J:at);(!ae(He,bt,!0)||Math.abs(bt)<=.1)&&clearInterval(ue.current)},16))}},re=function(){j.current=!1,Le()},W=function(ve){Le(),ve.touches.length===1&&!j.current&&(j.current=!0,X.current=Math.ceil(ve.touches[0].pageX),le.current=Math.ceil(ve.touches[0].pageY),Q.current=ve.target,Q.current.addEventListener("touchmove",ee,{passive:!1}),Q.current.addEventListener("touchend",re,{passive:!0}))};Le=function(){Q.current&&(Q.current.removeEventListener("touchmove",ee),Q.current.removeEventListener("touchend",re))},(0,Ie.Z)(function(){return R&&he.current.addEventListener("touchstart",W,{passive:!0}),function(){var be;(be=he.current)===null||be===void 0||be.removeEventListener("touchstart",W),Le(),clearInterval(ue.current)}},[R])}function ge(R){return Math.floor(Math.pow(R,.5))}function G(R,he){var ae="touches"in R?R.touches[0]:R;return ae[he?"pageX":"pageY"]-window[he?"scrollX":"scrollY"]}function me(R,he,ae){B.useEffect(function(){var j=he.current;if(R&&j){var X=!1,le,Q,ue=function(){Y.Z.cancel(le)},Le=function be(){ue(),le=(0,Y.Z)(function(){ae(Q),be()})},ee=function(){X=!1,ue()},re=function(ve){if(!(ve.target.draggable||ve.button!==0)){var Ne=ve;Ne._virtualHandled||(Ne._virtualHandled=!0,X=!0)}},W=function(ve){if(X){var Ne=G(ve,!1),Ke=j.getBoundingClientRect(),J=Ke.top,at=Ke.bottom;if(Ne<=J){var He=J-Ne;Q=-ge(He),Le()}else if(Ne>=at){var dt=Ne-at;Q=ge(dt),Le()}else ue()}};return j.addEventListener("mousedown",re),j.ownerDocument.addEventListener("mouseup",ee),j.ownerDocument.addEventListener("mousemove",W),j.ownerDocument.addEventListener("dragend",ee),function(){j.removeEventListener("mousedown",re),j.ownerDocument.removeEventListener("mouseup",ee),j.ownerDocument.removeEventListener("mousemove",W),j.ownerDocument.removeEventListener("dragend",ee),ue()}}},[R])}var fe=10;function se(R,he,ae,j,X,le,Q,ue){var Le=B.useRef(),ee=B.useState(null),re=(0,v.Z)(ee,2),W=re[0],be=re[1];return(0,Ie.Z)(function(){if(W&&W.times<fe){if(!R.current){be(function(In){return(0,x.Z)({},In)});return}le();var ve=W.targetAlign,Ne=W.originAlign,Ke=W.index,J=W.offset,at=R.current.clientHeight,He=!1,dt=ve,bt=null;if(at){for(var rn=ve||Ne,_t=0,Nt=0,$t=0,en=Math.min(he.length-1,Ke),Ut=0;Ut<=en;Ut+=1){var sn=X(he[Ut]);Nt=_t;var Cn=ae.get(sn);$t=Nt+(Cn===void 0?j:Cn),_t=$t}for(var fn=rn==="top"?J:at-J,An=en;An>=0;An-=1){var zn=X(he[An]),xn=ae.get(zn);if(xn===void 0){He=!0;break}if(fn-=xn,fn<=0)break}switch(rn){case"top":bt=Nt-J;break;case"bottom":bt=$t-at+J;break;default:{var Dn=R.current.scrollTop,vn=Dn+at;Nt<Dn?dt="top":$t>vn&&(dt="bottom")}}bt!==null&&Q(bt),bt!==W.lastTop&&(He=!0)}He&&be((0,x.Z)((0,x.Z)({},W),{},{times:W.times+1,targetAlign:dt,lastTop:bt}))}},[W,R.current]),function(ve){if(ve==null){ue();return}if(Y.Z.cancel(Le.current),typeof ve=="number")Q(ve);else if(ve&&(0,O.Z)(ve)==="object"){var Ne,Ke=ve.align;"index"in ve?Ne=ve.index:Ne=he.findIndex(function(He){return X(He)===ve.key});var J=ve.offset,at=J===void 0?0:J;be({times:0,index:Ne,offset:at,originAlign:Ke})}}}var ke=B.forwardRef(function(R,he){var ae=R.prefixCls,j=R.rtl,X=R.scrollOffset,le=R.scrollRange,Q=R.onStartMove,ue=R.onStopMove,Le=R.onScroll,ee=R.horizontal,re=R.spinSize,W=R.containerSize,be=R.style,ve=R.thumbStyle,Ne=R.showScrollBar,Ke=B.useState(!1),J=(0,v.Z)(Ke,2),at=J[0],He=J[1],dt=B.useState(null),bt=(0,v.Z)(dt,2),rn=bt[0],_t=bt[1],Nt=B.useState(null),$t=(0,v.Z)(Nt,2),en=$t[0],Ut=$t[1],sn=!j,Cn=B.useRef(),fn=B.useRef(),An=B.useState(Ne),zn=(0,v.Z)(An,2),xn=zn[0],Dn=zn[1],vn=B.useRef(),In=function(){Ne===!0||Ne===!1||(clearTimeout(vn.current),Dn(!0),vn.current=setTimeout(function(){Dn(!1)},3e3))},wn=le-W||0,pn=W-re||0,Pn=B.useMemo(function(){if(X===0||wn===0)return 0;var m=X/wn;return m*pn},[X,wn,pn]),on=function($){$.stopPropagation(),$.preventDefault()},Nn=B.useRef({top:Pn,dragging:at,pageY:rn,startTop:en});Nn.current={top:Pn,dragging:at,pageY:rn,startTop:en};var Wn=function($){He(!0),_t(G($,ee)),Ut(Nn.current.top),Q(),$.stopPropagation(),$.preventDefault()};B.useEffect(function(){var m=function(d){d.preventDefault()},$=Cn.current,Z=fn.current;return $.addEventListener("touchstart",m,{passive:!1}),Z.addEventListener("touchstart",Wn,{passive:!1}),function(){$.removeEventListener("touchstart",m),Z.removeEventListener("touchstart",Wn)}},[]);var or=B.useRef();or.current=wn;var gr=B.useRef();gr.current=pn,B.useEffect(function(){if(at){var m,$=function(d){var C=Nn.current,T=C.dragging,ie=C.pageY,H=C.startTop;Y.Z.cancel(m);var _=Cn.current.getBoundingClientRect(),de=W/(ee?_.width:_.height);if(T){var pe=(G(d,ee)-ie)*de,ze=H;!sn&&ee?ze-=pe:ze+=pe;var M=or.current,U=gr.current,Je=U?ze/U:0,Ce=Math.ceil(Je*M);Ce=Math.max(Ce,0),Ce=Math.min(Ce,M),m=(0,Y.Z)(function(){Le(Ce,ee)})}},Z=function(){He(!1),ue()};return window.addEventListener("mousemove",$,{passive:!0}),window.addEventListener("touchmove",$,{passive:!0}),window.addEventListener("mouseup",Z,{passive:!0}),window.addEventListener("touchend",Z,{passive:!0}),function(){window.removeEventListener("mousemove",$),window.removeEventListener("touchmove",$),window.removeEventListener("mouseup",Z),window.removeEventListener("touchend",Z),Y.Z.cancel(m)}}},[at]),B.useEffect(function(){return In(),function(){clearTimeout(vn.current)}},[X]),B.useImperativeHandle(he,function(){return{delayHidden:In}});var Jt="".concat(ae,"-scrollbar"),lt={position:"absolute",visibility:xn?null:"hidden"},Kt={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return ee?(Object.assign(lt,{height:8,left:0,right:0,bottom:0}),Object.assign(Kt,(0,z.Z)({height:"100%",width:re},sn?"left":"right",Pn))):(Object.assign(lt,(0,z.Z)({width:8,top:0,bottom:0},sn?"right":"left",0)),Object.assign(Kt,{width:"100%",height:re,top:Pn})),B.createElement("div",{ref:Cn,className:xe()(Jt,(0,z.Z)((0,z.Z)((0,z.Z)({},"".concat(Jt,"-horizontal"),ee),"".concat(Jt,"-vertical"),!ee),"".concat(Jt,"-visible"),xn)),style:(0,x.Z)((0,x.Z)({},lt),be),onMouseDown:on,onMouseMove:In},B.createElement("div",{ref:fn,className:xe()("".concat(Jt,"-thumb"),(0,z.Z)({},"".concat(Jt,"-thumb-moving"),at)),style:(0,x.Z)((0,x.Z)({},Kt),ve),onMouseDown:Wn}))}),Be=ke,ye=20;function N(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ae=R/he*R;return isNaN(ae)&&(ae=0),ae=Math.max(ae,ye),Math.floor(ae)}var L=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],V=[],Me={overflowY:"auto",overflowAnchor:"none"};function it(R,he){var ae=R.prefixCls,j=ae===void 0?"rc-virtual-list":ae,X=R.className,le=R.height,Q=R.itemHeight,ue=R.fullHeight,Le=ue===void 0?!0:ue,ee=R.style,re=R.data,W=R.children,be=R.itemKey,ve=R.virtual,Ne=R.direction,Ke=R.scrollWidth,J=R.component,at=J===void 0?"div":J,He=R.onScroll,dt=R.onVirtualScroll,bt=R.onVisibleChange,rn=R.innerProps,_t=R.extraRender,Nt=R.styles,$t=R.showScrollBar,en=$t===void 0?"optional":$t,Ut=(0,F.Z)(R,L),sn=B.useCallback(function(Ve){return typeof be=="function"?be(Ve):Ve==null?void 0:Ve[be]},[be]),Cn=yt(sn,null,null),fn=(0,v.Z)(Cn,4),An=fn[0],zn=fn[1],xn=fn[2],Dn=fn[3],vn=!!(ve!==!1&&le&&Q),In=B.useMemo(function(){return Object.values(xn.maps).reduce(function(Ve,We){return Ve+We},0)},[xn.id,xn.maps]),wn=vn&&re&&(Math.max(Q*re.length,In)>le||!!Ke),pn=Ne==="rtl",Pn=xe()(j,(0,z.Z)({},"".concat(j,"-rtl"),pn),X),on=re||V,Nn=(0,B.useRef)(),Wn=(0,B.useRef)(),or=(0,B.useRef)(),gr=(0,B.useState)(0),Jt=(0,v.Z)(gr,2),lt=Jt[0],Kt=Jt[1],m=(0,B.useState)(0),$=(0,v.Z)(m,2),Z=$[0],h=$[1],d=(0,B.useState)(!1),C=(0,v.Z)(d,2),T=C[0],ie=C[1],H=function(){ie(!0)},_=function(){ie(!1)},de={getKey:sn};function pe(Ve){Kt(function(We){var xt;typeof Ve=="function"?xt=Ve(We):xt=Ve;var wt=Gt(xt);return Nn.current.scrollTop=wt,wt})}var ze=(0,B.useRef)({start:0,end:on.length}),M=(0,B.useRef)(),U=oe(on,sn),Je=(0,v.Z)(U,1),Ce=Je[0];M.current=Ce;var je=B.useMemo(function(){if(!vn)return{scrollHeight:void 0,start:0,end:on.length-1,offset:void 0};if(!wn){var Ve;return{scrollHeight:((Ve=Wn.current)===null||Ve===void 0?void 0:Ve.offsetHeight)||0,start:0,end:on.length-1,offset:void 0}}for(var We=0,xt,wt,hn,xr=on.length,_n=0;_n<xr;_n+=1){var Kn=on[_n],$n=sn(Kn),kn=xn.get($n),Mn=We+(kn===void 0?Q:kn);Mn>=lt&&xt===void 0&&(xt=_n,wt=We),Mn>lt+le&&hn===void 0&&(hn=_n),We=Mn}return xt===void 0&&(xt=0,wt=0,hn=Math.ceil(le/Q)),hn===void 0&&(hn=on.length-1),hn=Math.min(hn+1,on.length-1),{scrollHeight:We,start:xt,end:hn,offset:wt}},[wn,vn,lt,on,Dn,le]),Pe=je.scrollHeight,ut=je.start,ne=je.end,et=je.offset;ze.current.start=ut,ze.current.end=ne,B.useLayoutEffect(function(){var Ve=xn.getRecord();if(Ve.size===1){var We=Array.from(Ve.keys())[0],xt=Ve.get(We),wt=on[ut];if(wt&&xt===void 0){var hn=sn(wt);if(hn===We){var xr=xn.get(We),_n=xr-Q;pe(function(Kn){return Kn+_n})}}}xn.resetRecord()},[Pe]);var St=B.useState({width:0,height:le}),Lt=(0,v.Z)(St,2),nt=Lt[0],gt=Lt[1],Bt=function(We){gt({width:We.offsetWidth,height:We.offsetHeight})},De=(0,B.useRef)(),Ge=(0,B.useRef)(),ct=B.useMemo(function(){return N(nt.width,Ke)},[nt.width,Ke]),pt=B.useMemo(function(){return N(nt.height,Pe)},[nt.height,Pe]),Wt=Pe-le,kt=(0,B.useRef)(Wt);kt.current=Wt;function Gt(Ve){var We=Ve;return Number.isNaN(kt.current)||(We=Math.min(We,kt.current)),We=Math.max(We,0),We}var Vt=lt<=0,Dt=lt>=Wt,It=Z<=0,zt=Z>=Ke,Rt=b(Vt,Dt,It,zt),cn=function(){return{x:pn?-Z:Z,y:lt}},Ft=(0,B.useRef)(cn()),Ht=(0,y.useEvent)(function(Ve){if(dt){var We=(0,x.Z)((0,x.Z)({},cn()),Ve);(Ft.current.x!==We.x||Ft.current.y!==We.y)&&(dt(We),Ft.current=We)}});function an(Ve,We){var xt=Ve;We?((0,Se.flushSync)(function(){h(xt)}),Ht()):pe(xt)}function Xt(Ve){var We=Ve.currentTarget.scrollTop;We!==lt&&pe(We),He==null||He(Ve),Ht()}var En=function(We){var xt=We,wt=Ke?Ke-nt.width:0;return xt=Math.max(xt,0),xt=Math.min(xt,wt),xt},Un=(0,y.useEvent)(function(Ve,We){We?((0,Se.flushSync)(function(){h(function(xt){var wt=xt+(pn?-Ve:Ve);return En(wt)})}),Ht()):pe(function(xt){var wt=xt+Ve;return wt})}),Tt=I(vn,Vt,Dt,It,zt,!!Ke,Un),ft=(0,v.Z)(Tt,2),ht=ft[0],qt=ft[1];Qe(vn,Nn,function(Ve,We,xt,wt){var hn=wt;return Rt(Ve,We,xt)?!1:!hn||!hn._virtualHandled?(hn&&(hn._virtualHandled=!0),ht({preventDefault:function(){},deltaX:Ve?We:0,deltaY:Ve?0:We}),!0):!1}),me(wn,Nn,function(Ve){pe(function(We){return We+Ve})}),(0,Ie.Z)(function(){function Ve(xt){var wt=Vt&&xt.detail<0,hn=Dt&&xt.detail>0;vn&&!wt&&!hn&&xt.preventDefault()}var We=Nn.current;return We.addEventListener("wheel",ht,{passive:!1}),We.addEventListener("DOMMouseScroll",qt,{passive:!0}),We.addEventListener("MozMousePixelScroll",Ve,{passive:!1}),function(){We.removeEventListener("wheel",ht),We.removeEventListener("DOMMouseScroll",qt),We.removeEventListener("MozMousePixelScroll",Ve)}},[vn,Vt,Dt]),(0,Ie.Z)(function(){if(Ke){var Ve=En(Z);h(Ve),Ht({x:Ve})}},[nt.width,Ke]);var tn=function(){var We,xt;(We=De.current)===null||We===void 0||We.delayHidden(),(xt=Ge.current)===null||xt===void 0||xt.delayHidden()},Yt=se(Nn,on,xn,Q,sn,function(){return zn(!0)},pe,tn);B.useImperativeHandle(he,function(){return{nativeElement:or.current,getScrollInfo:cn,scrollTo:function(We){function xt(wt){return wt&&(0,O.Z)(wt)==="object"&&("left"in wt||"top"in wt)}xt(We)?(We.left!==void 0&&h(En(We.left)),Yt(We.top)):Yt(We)}}}),(0,Ie.Z)(function(){if(bt){var Ve=on.slice(ut,ne+1);bt(Ve,on)}},[ut,ne,on]);var At=k(on,sn,xn,Q),ln=_t==null?void 0:_t({start:ut,end:ne,virtual:wn,offsetX:Z,offsetY:et,rtl:pn,getSize:At}),gn=rt(on,ut,ne,Ke,Z,An,W,de),mn=null;le&&(mn=(0,x.Z)((0,z.Z)({},Le?"height":"maxHeight",le),Me),vn&&(mn.overflowY="hidden",Ke&&(mn.overflowX="hidden"),T&&(mn.pointerEvents="none")));var Ln={};return pn&&(Ln.dir="rtl"),B.createElement("div",(0,P.Z)({ref:or,style:(0,x.Z)((0,x.Z)({},ee),{},{position:"relative"}),className:Pn},Ln,Ut),B.createElement(ce.Z,{onResize:Bt},B.createElement(at,{className:"".concat(j,"-holder"),style:mn,ref:Nn,onScroll:Xt,onMouseEnter:tn},B.createElement(q,{prefixCls:j,height:Pe,offsetX:Z,offsetY:et,scrollWidth:Ke,onInnerResize:zn,ref:Wn,innerProps:rn,rtl:pn,extra:ln},gn))),wn&&Pe>le&&B.createElement(Be,{ref:De,prefixCls:j,scrollOffset:lt,scrollRange:Pe,rtl:pn,onScroll:an,onStartMove:H,onStopMove:_,spinSize:pt,containerSize:nt.height,style:Nt==null?void 0:Nt.verticalScrollBar,thumbStyle:Nt==null?void 0:Nt.verticalScrollBarThumb,showScrollBar:en}),wn&&Ke>nt.width&&B.createElement(Be,{ref:Ge,prefixCls:j,scrollOffset:Z,scrollRange:Ke,rtl:pn,onScroll:an,onStartMove:H,onStopMove:_,spinSize:ct,containerSize:nt.width,horizontal:!0,style:Nt==null?void 0:Nt.horizontalScrollBar,thumbStyle:Nt==null?void 0:Nt.horizontalScrollBarThumb,showScrollBar:en}))}var Ze=B.forwardRef(it);Ze.displayName="List";var ot=Ze,_e=ot},16722:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return xe}});const P=ce=>typeof ce=="object"&&ce!=null&&ce.nodeType===1,O=(ce,y)=>(!y||ce!=="hidden")&&ce!=="visible"&&ce!=="clip",x=(ce,y)=>{if(ce.clientHeight<ce.scrollHeight||ce.clientWidth<ce.scrollWidth){const Ie=getComputedStyle(ce,null);return O(Ie.overflowY,y)||O(Ie.overflowX,y)||(B=>{const Se=(Te=>{if(!Te.ownerDocument||!Te.ownerDocument.defaultView)return null;try{return Te.ownerDocument.defaultView.frameElement}catch(q){return null}})(B);return!!Se&&(Se.clientHeight<B.scrollHeight||Se.clientWidth<B.scrollWidth)})(ce)}return!1},z=(ce,y,Ie,B,Se,Te,q,qe)=>Te<ce&&q>y||Te>ce&&q<y?0:Te<=ce&&qe<=Ie||q>=y&&qe>=Ie?Te-ce-B:q>y&&qe<Ie||Te<ce&&qe>Ie?q-y+Se:0,v=ce=>{const y=ce.parentElement;return y==null?ce.getRootNode().host||null:y},F=(ce,y)=>{var Ie,B,Se,Te;if(typeof document=="undefined")return[];const{scrollMode:q,block:qe,inline:rt,boundary:Ct,skipOverflowHiddenElements:Mt}=y,oe=typeof Ct=="function"?Ct:Be=>Be!==Ct;if(!P(ce))throw new TypeError("Invalid target");const Y=document.scrollingElement||document.documentElement,S=[];let c=ce;for(;P(c)&&oe(c);){if(c=v(c),c===Y){S.push(c);break}c!=null&&c===document.body&&x(c)&&!x(document.documentElement)||c!=null&&x(c,Mt)&&S.push(c)}const b=(B=(Ie=window.visualViewport)==null?void 0:Ie.width)!=null?B:innerWidth,I=(Te=(Se=window.visualViewport)==null?void 0:Se.height)!=null?Te:innerHeight,{scrollX:k,scrollY:D}=window,{height:Ee,width:Ue,top:$e,right:Oe,bottom:yt,left:Ye}=ce.getBoundingClientRect(),{top:Qe,right:ge,bottom:G,left:me}=(Be=>{const ye=window.getComputedStyle(Be);return{top:parseFloat(ye.scrollMarginTop)||0,right:parseFloat(ye.scrollMarginRight)||0,bottom:parseFloat(ye.scrollMarginBottom)||0,left:parseFloat(ye.scrollMarginLeft)||0}})(ce);let fe=qe==="start"||qe==="nearest"?$e-Qe:qe==="end"?yt+G:$e+Ee/2-Qe+G,se=rt==="center"?Ye+Ue/2-me+ge:rt==="end"?Oe+ge:Ye-me;const ke=[];for(let Be=0;Be<S.length;Be++){const ye=S[Be],{height:N,width:L,top:V,right:Me,bottom:it,left:Ze}=ye.getBoundingClientRect();if(q==="if-needed"&&$e>=0&&Ye>=0&&yt<=I&&Oe<=b&&(ye===Y&&!x(ye)||$e>=V&&yt<=it&&Ye>=Ze&&Oe<=Me))return ke;const ot=getComputedStyle(ye),_e=parseInt(ot.borderLeftWidth,10),R=parseInt(ot.borderTopWidth,10),he=parseInt(ot.borderRightWidth,10),ae=parseInt(ot.borderBottomWidth,10);let j=0,X=0;const le="offsetWidth"in ye?ye.offsetWidth-ye.clientWidth-_e-he:0,Q="offsetHeight"in ye?ye.offsetHeight-ye.clientHeight-R-ae:0,ue="offsetWidth"in ye?ye.offsetWidth===0?0:L/ye.offsetWidth:0,Le="offsetHeight"in ye?ye.offsetHeight===0?0:N/ye.offsetHeight:0;if(Y===ye)j=qe==="start"?fe:qe==="end"?fe-I:qe==="nearest"?z(D,D+I,I,R,ae,D+fe,D+fe+Ee,Ee):fe-I/2,X=rt==="start"?se:rt==="center"?se-b/2:rt==="end"?se-b:z(k,k+b,b,_e,he,k+se,k+se+Ue,Ue),j=Math.max(0,j+D),X=Math.max(0,X+k);else{j=qe==="start"?fe-V-R:qe==="end"?fe-it+ae+Q:qe==="nearest"?z(V,it,N,R,ae+Q,fe,fe+Ee,Ee):fe-(V+N/2)+Q/2,X=rt==="start"?se-Ze-_e:rt==="center"?se-(Ze+L/2)+le/2:rt==="end"?se-Me+he+le:z(Ze,Me,L,_e,he+le,se,se+Ue,Ue);const{scrollLeft:ee,scrollTop:re}=ye;j=Le===0?0:Math.max(0,Math.min(re+j/Le,ye.scrollHeight-N/Le+Q)),X=ue===0?0:Math.max(0,Math.min(ee+X/ue,ye.scrollWidth-L/ue+le)),fe+=re-j,se+=ee-X}ke.push({el:ye,top:j,left:X})}return ke},A=ce=>ce===!1?{block:"end",inline:"nearest"}:(y=>y===Object(y)&&Object.keys(y).length!==0)(ce)?ce:{block:"start",inline:"nearest"};function xe(ce,y){if(!ce.isConnected||!(Se=>{let Te=Se;for(;Te&&Te.parentNode;){if(Te.parentNode===document)return!0;Te=Te.parentNode instanceof ShadowRoot?Te.parentNode.host:Te.parentNode}return!1})(ce))return;const Ie=(Se=>{const Te=window.getComputedStyle(Se);return{top:parseFloat(Te.scrollMarginTop)||0,right:parseFloat(Te.scrollMarginRight)||0,bottom:parseFloat(Te.scrollMarginBottom)||0,left:parseFloat(Te.scrollMarginLeft)||0}})(ce);if((Se=>typeof Se=="object"&&typeof Se.behavior=="function")(y))return y.behavior(F(ce,y));const B=typeof y=="boolean"||y==null?void 0:y.behavior;for(const{el:Se,top:Te,left:q}of F(ce,A(y))){const qe=Te-Ie.top+Ie.bottom,rt=q-Ie.left+Ie.right;Se.scroll({top:qe,left:rt,behavior:B})}}}}]);