|
|
(self.webpackChunk=self.webpackChunk||[]).push([[5230],{40001:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return Ce}});var P=f(67711),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"},W=x,v=f(7657),F=function(y,Me){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},A=O.forwardRef(F),Ce=A},84105:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return Ce}});var P=f(67711),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"},W=x,v=f(7657),F=function(y,Me){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},A=O.forwardRef(F),Ce=A},73331:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return Ce}});var P=f(67711),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"},W=x,v=f(7657),F=function(y,Me){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},A=O.forwardRef(F),Ce=A},15277:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return Ce}});var P=f(67711),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"},W=x,v=f(7657),F=function(y,Me){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},A=O.forwardRef(F),Ce=A},61485:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return Ce}});var P=f(67711),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"},W=x,v=f(7657),F=function(y,Me){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},A=O.forwardRef(F),Ce=A},47472:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return Ce}});var P=f(67711),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"},W=x,v=f(7657),F=function(y,Me){return O.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},A=O.forwardRef(F),Ce=A},66543:function(){"use strict"},59598:function(){"use strict"},84236:function(nn,Te,f){"use strict";f.d(Te,{t:function(){return B}});var P=f(59301),O=f(3113),x={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},W=f(92310),v=f.n(W),F=Object.defineProperty,A=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,y=(xe,Pe,q)=>Pe in xe?F(xe,Pe,{enumerable:!0,configurable:!0,writable:!0,value:q}):xe[Pe]=q,Me=(xe,Pe)=>{for(var q in Pe||(Pe={}))Ce.call(Pe,q)&&y(xe,q,Pe[q]);if(A)for(var q of A(Pe))se.call(Pe,q)&&y(xe,q,Pe[q]);return xe};const B=({cancelText:xe="\u53D6\u6D88",okText:Pe="\u786E\u5B9A",loading:q=!1,hasOkBtn:qe=!0,hasCancelBtn:nt=!0,okButtonProps:bt={},onCancel:Et=()=>{},onOk:ae=()=>{},className:J=""})=>P.createElement("div",{className:v()(x.buttonFixed,J)},P.createElement("div",{className:x.buttonWrap},nt&&P.createElement(O.ZP,{size:"middle",className:`${x.button} mr20`,onClick:Et},xe),qe&&P.createElement(O.ZP,Me({size:"middle",type:"primary",className:`${x.button} mr20`,loading:q,onClick:ae},bt),Pe)))},44905:function(nn,Te,f){"use strict";f.d(Te,{h:function(){return J}});var P=f(59301),O=f(57809),x=f(78241),W=f(3113),v=f(89780),F=f.n(v),A=f(66543),Ce=f(59598),se=Object.defineProperty,y=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,q=(S,c,b)=>c in S?se(S,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):S[c]=b,qe=(S,c)=>{for(var b in c||(c={}))xe.call(c,b)&&q(S,b,c[b]);if(B)for(var b of B(c))Pe.call(c,b)&&q(S,b,c[b]);return S},nt=(S,c)=>y(S,Me(c));const bt=O.default.Option,Et={labelCol:{span:4},wrapperCol:{span:20}},ae={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"]};Te.Z=({callback:S,onCancel:c})=>{const[b,M]=(0,P.useState)("python");function k(Oe){M(ae[Oe][1])}function T(Oe){S(Oe)}return P.createElement(x.default,nt(qe({},Et),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:T,style:{width:500}}),P.createElement(x.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},P.createElement(O.default,{getPopupContainer:Oe=>Oe.parentNode,onChange:k},Object.keys(ae).map(Oe=>P.createElement(bt,{key:Oe,value:Oe},ae[Oe][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(J,{mode:b})),P.createElement("div",{className:"flex-container flex-end"},P.createElement(W.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),P.createElement(W.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function J({value:S,onChange:c,mode:b,options:M={}}){const k=(0,P.useRef)(),[T,Oe]=(0,P.useState)();return(0,P.useEffect)(()=>{if(T){let ke=function(Be){const Ie=Be.getValue();c&&c(Ie)};return T.on("change",ke),()=>{T.off("change",ke)}}},[T,c]),(0,P.useEffect)(()=>{T&&T.setOption("mode",b)},[T,b]),(0,P.useEffect)(()=>{T&&(S!==T.getValue()||S==="")&&setTimeout(()=>{T.setValue(S||"")},300)},[T,S]),(0,P.useEffect)(()=>{if(k.current&&!T){const ke=F().fromTextArea(k.current,qe({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},M));Oe(ke)}},[k.current,T]),P.createElement("div",{className:"my-codemirror-container"},P.createElement("textarea",{ref:k}))}},36741:function(nn,Te,f){"use strict";f.r(Te),f.d(Te,{default:function(){return me}});var P=f(22688),O=f(59301),x=f(76560),W=f(78241),v=f(92832),F=f(44905),A=f(84236),Ce={bg:"bg___RM4en",wrap:"wrap___ne3nd",title:"title___Nr8TZ",path:"path___mVozd",colorBlue:"colorBlue___jBwMu",width240:"width240___XDhtB"},se=Object.defineProperty,y=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,xe=(N,L,G)=>L in N?se(N,L,{enumerable:!0,configurable:!0,writable:!0,value:G}):N[L]=G,Pe=(N,L)=>{for(var G in L||(L={}))Me.call(L,G)&&xe(N,G,L[G]);if(y)for(var G of y(L))B.call(L,G)&&xe(N,G,L[G]);return N},q=(N,L)=>{var G={};for(var Le in N)Me.call(N,Le)&&L.indexOf(Le)<0&&(G[Le]=N[Le]);if(N!=null&&y)for(var Le of y(N))L.indexOf(Le)<0&&B.call(N,Le)&&(G[Le]=N[Le]);return G},qe=(N,L,G)=>new Promise((Le,rt)=>{var Ze=R=>{try{_e(G.next(R))}catch(de){rt(de)}},it=R=>{try{_e(G.throw(R))}catch(de){rt(de)}},_e=R=>R.done?Le(R.value):Promise.resolve(R.value).then(Ze,it);_e((G=G.apply(N,L)).next())});const nt=N=>{var L=N,{shixunsDetail:G,globalSetting:Le,loading:rt,user:Ze,dispatch:it}=L,_e=q(L,["shixunsDetail","globalSetting","loading","user","dispatch"]);const R=(0,x.useLocation)(),[de,ie]=(0,O.useState)({}),U=(0,O.useRef)(),X=(0,O.useRef)(),[oe]=W.default.useForm(),[Y,ce]=(0,O.useState)("");(0,O.useEffect)(()=>(it({type:"globalSetting/footerToggle",payload:!1}),()=>{it({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,O.useEffect)(()=>{const fe=sessionStorage.getItem("pathArray");if(fe){const z=fe.split(",").join("/"),he=z.indexOf("/")===0?z.substr(1):z;ce(he)}},[]),(0,O.useEffect)(()=>{var fe,z,he,Se;X.current=(z=(fe=R.pathname)==null?void 0:fe.split("/"))==null?void 0:z[2],U.current=((Se=(he=R.pathname)==null?void 0:he.split("/"))==null?void 0:Se[3])==="repository"},[]);const Re=(...fe)=>qe(void 0,[...fe],function*(z={}){if(yield it({type:"shixunsDetail/addRepositoryFile",payload:{id:X.current,message:z.commitMessage,content:z.codeMirror,path:`${Y?`${Y}/`:""}${z.path||""}`,secret_repository:U.current?void 0:!0}})){const Se=U.current?`/shixuns/${X.current}/repository${Y?`/master/shixun_show/${Y}`:""}`:`/shixuns/${X.current}/secret_repository`;x.history.replace(Se)}}),ee=()=>{var fe,z;x.history.push(`/shixuns/${X.current}/${(z=(fe=R.pathname)==null?void 0:fe.split("/"))==null?void 0:z[3]}${Y?`/master/shixun_show/${Y}`:""}`)};return O.createElement("section",{className:Ce.bg},O.createElement("div",{className:Ce.wrap},O.createElement("div",{className:Ce.title},"\u65B0\u5EFA\u6587\u4EF6"),O.createElement(W.default,{className:"mt10",form:oe,scrollToFirstError:!0,layout:"vertical",onFinish:Re,onValuesChange:()=>ie(Pe({},oe.getFieldsValue()))},O.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},O.createElement(W.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"},Y?`${Y}/`:""),O.createElement(v.default,{className:Ce.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(W.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(W.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(W.default.Item,{noStyle:!0},O.createElement(A.t,{okButtonProps:{htmlType:"submit"},onCancel:ee})))))};var bt=(0,x.connect)(({shixunsDetail:N,loading:L,globalSetting:G,user:Le})=>({shixunsDetail:N,globalSetting:G,user:Le,loading:L.models.index}))(nt),Et={bg:"bg___hW0a5",wrap:"wrap___qsjmY",title:"title___TYQ3w",path:"path___J3ICf",colorBlue:"colorBlue___r1F5X",width240:"width240___Vbbdg"},ae=Object.defineProperty,J=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,b=(N,L,G)=>L in N?ae(N,L,{enumerable:!0,configurable:!0,writable:!0,value:G}):N[L]=G,M=(N,L)=>{for(var G in L||(L={}))S.call(L,G)&&b(N,G,L[G]);if(J)for(var G of J(L))c.call(L,G)&&b(N,G,L[G]);return N},k=(N,L)=>{var G={};for(var Le in N)S.call(N,Le)&&L.indexOf(Le)<0&&(G[Le]=N[Le]);if(N!=null&&J)for(var Le of J(N))L.indexOf(Le)<0&&c.call(N,Le)&&(G[Le]=N[Le]);return G},T=(N,L,G)=>new Promise((Le,rt)=>{var Ze=R=>{try{_e(G.next(R))}catch(de){rt(de)}},it=R=>{try{_e(G.throw(R))}catch(de){rt(de)}},_e=R=>R.done?Le(R.value):Promise.resolve(R.value).then(Ze,it);_e((G=G.apply(N,L)).next())});const Oe=N=>{var L=N,{shixunsDetail:G,globalSetting:Le,loading:rt,user:Ze,dispatch:it}=L,_e=k(L,["shixunsDetail","globalSetting","loading","user","dispatch"]);const R=(0,x.useLocation)(),[de,ie]=(0,O.useState)({}),U=(0,O.useRef)(),X=(0,O.useRef)(),[oe]=W.default.useForm(),[Y,ce]=(0,O.useState)("");(0,O.useEffect)(()=>(it({type:"globalSetting/footerToggle",payload:!1}),()=>{it({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,O.useEffect)(()=>{const fe=sessionStorage.getItem("pathArray");if(fe){const z=fe.split(",").join("/"),he=z.indexOf("/")===0?z.substr(1):z;ce(he)}},[]),(0,O.useEffect)(()=>{var fe,z,he,Se;X.current=(z=(fe=R.pathname)==null?void 0:fe.split("/"))==null?void 0:z[2],U.current=((Se=(he=R.pathname)==null?void 0:he.split("/"))==null?void 0:Se[3])==="repository"},[]);const Re=(...fe)=>T(void 0,[...fe],function*(z={}){if(yield it({type:"shixunsDetail/addRepositoryFile",payload:{id:X.current,message:z.commitMessage,content:z.codeMirror,path:`${Y?`${Y}/`:""}${z.path||""}`,secret_repository:U.current?void 0:!0}})){const Se=U.current?`/shixuns/${X.current}/repository${Y?`/master/shixun_show/${Y}`:""}`:`/shixuns/${X.current}/secret_repository`;x.history.replace(Se)}}),ee=()=>{var fe,z;x.history.push(`/shixuns/${X.current}/${(z=(fe=R.pathname)==null?void 0:fe.split("/"))==null?void 0:z[3]}${Y?`/master/shixun_show/${Y}`:""}`)};return O.createElement("section",{className:Et.bg},O.createElement("div",{className:Et.wrap},O.createElement("div",{className:Et.title},"\u65B0\u5EFA\u6587\u4EF6"),O.createElement(W.default,{className:"mt10",form:oe,scrollToFirstError:!0,layout:"vertical",onFinish:Re,onValuesChange:()=>ie(M({},oe.getFieldsValue()))},O.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},O.createElement(W.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"},Y?`${Y}/`:""),O.createElement(v.default,{className:Et.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(W.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(W.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(W.default.Item,{noStyle:!0},O.createElement(A.t,{okButtonProps:{htmlType:"submit"},onCancel:ee})))))};var ke=(0,x.connect)(({shixunsDetail:N,loading:L,globalSetting:G,user:Le})=>({shixunsDetail:N,globalSetting:G,user:Le,loading:L.models.index}))(Oe),Be={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},Ie=Object.defineProperty,mt=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,pe=(N,L,G)=>L in N?Ie(N,L,{enumerable:!0,configurable:!0,writable:!0,value:G}):N[L]=G,V=(N,L)=>{for(var G in L||(L={}))Qe.call(L,G)&&pe(N,G,L[G]);if(mt)for(var G of mt(L))Je.call(L,G)&&pe(N,G,L[G]);return N},ge=(N,L)=>{var G={};for(var Le in N)Qe.call(N,Le)&&L.indexOf(Le)<0&&(G[Le]=N[Le]);if(N!=null&&mt)for(var Le of mt(N))L.indexOf(Le)<0&&Je.call(N,Le)&&(G[Le]=N[Le]);return G},ue=(N,L,G)=>new Promise((Le,rt)=>{var Ze=R=>{try{_e(G.next(R))}catch(de){rt(de)}},it=R=>{try{_e(G.throw(R))}catch(de){rt(de)}},_e=R=>R.done?Le(R.value):Promise.resolve(R.value).then(Ze,it);_e((G=G.apply(N,L)).next())});const le=N=>{var L=N,{shixunsDetail:G,globalSetting:Le,loading:rt,user:Ze,dispatch:it}=L,_e=ge(L,["shixunsDetail","globalSetting","loading","user","dispatch"]);const R=(0,x.useLocation)(),[de,ie]=(0,O.useState)({}),U=(0,O.useRef)(),X=(0,O.useRef)(),[oe]=W.default.useForm(),[Y,ce]=(0,O.useState)("");(0,O.useEffect)(()=>(it({type:"globalSetting/footerToggle",payload:!1}),()=>{it({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,O.useEffect)(()=>{const fe=sessionStorage.getItem("pathArray");if(fe){const z=fe.split(",").join("/"),he=z.indexOf("/")===0?z.substr(1):z;ce(he)}},[]),(0,O.useEffect)(()=>{var fe,z,he,Se;X.current=(z=(fe=R.pathname)==null?void 0:fe.split("/"))==null?void 0:z[2],U.current=((Se=(he=R.pathname)==null?void 0:he.split("/"))==null?void 0:Se[3])==="repository"},[]);const Re=(...fe)=>ue(void 0,[...fe],function*(z={}){if(yield it({type:"shixunsDetail/addRepositoryFile",payload:{id:X.current,message:z.commitMessage,content:z.codeMirror,path:`${Y?`${Y}/`:""}${z.path||""}`,secret_repository:U.current?void 0:!0}})){const Se=U.current?`/shixuns/${X.current}/repository${Y?`/master/shixun_show/${Y}`:""}`:`/shixuns/${X.current}/secret_repository`;x.history.replace(Se)}}),ee=()=>{var fe,z;x.history.push(`/shixuns/${X.current}/${(z=(fe=R.pathname)==null?void 0:fe.split("/"))==null?void 0:z[3]}${Y?`/master/shixun_show/${Y}`:""}`)};return O.createElement("section",{className:Be.bg},O.createElement("div",{className:Be.wrap},O.createElement("div",{className:Be.title},"\u65B0\u5EFA\u6587\u4EF6"),O.createElement(W.default,{className:"mt10",form:oe,scrollToFirstError:!0,layout:"vertical",onFinish:Re,onValuesChange:()=>ie(V({},oe.getFieldsValue()))},O.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},O.createElement(W.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"},Y?`${Y}/`:""),O.createElement(v.default,{className:Be.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(W.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(W.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(W.default.Item,{noStyle:!0},O.createElement(A.t,{okButtonProps:{htmlType:"submit"},onCancel:ee})))))};var Ve=(0,x.connect)(({shixunsDetail:N,loading:L,globalSetting:G,user:Le})=>({shixunsDetail:N,globalSetting:G,user:Le,loading:L.models.index}))(le);const ze=({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(bt,null);case P.Fy.THEMETWO:return O.createElement(ke,null);case P.Fy.DEFAULT:default:return O.createElement(Ve,null)}};var me=(0,x.connect)(({globalSetting:N})=>({globalSetting:N}))(ze)},19080:function(nn,Te,f){"use strict";f.d(Te,{F:function(){return v},Z:function(){return W}});var P=f(92310),O=f.n(P);const x=null;function W(F,A,Ce){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`]:Ce})}const v=(F,A)=>A||F},93891:function(nn,Te,f){"use strict";var P=f(59301),O=f(36355),x=f(64165);const W=v=>{const{componentName:F}=v,{getPrefixCls:A}=(0,P.useContext)(O.E_),Ce=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:`${Ce}-small`});default:return P.createElement(x.Z,null)}};Te.Z=W},64165:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return ae}});var P=f(92310),O=f.n(P),x=f(59301),W=f(36355),v=f(9763),F=f(64993),A=f(88088),se=()=>{const[,J]=(0,A.Z)(),c=new F.C(J.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"}))))},Me=()=>{const[,J]=(0,A.Z)(),{colorFill:S,colorFillTertiary:c,colorFillQuaternary:b,colorBgContainer:M}=J,{borderColor:k,shadowColor:T,contentColor:Oe}=(0,x.useMemo)(()=>({borderColor:new F.C(S).onBackground(M).toHexShortString(),shadowColor:new F.C(c).onBackground(M).toHexShortString(),contentColor:new F.C(b).onBackground(M).toHexShortString()}),[S,c,b,M]);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:T,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:Oe}))))},B=f(83116),xe=f(37613);const Pe=J=>{const{componentCls:S,margin:c,marginXS:b,marginXL:M,fontSize:k,lineHeight:T}=J;return{[S]:{marginInline:b,fontSize:k,lineHeight:T,textAlign:"center",[`${S}-image`]:{height:J.emptyImgHeight,marginBottom:b,opacity:J.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${S}-description`]:{color:J.colorText},[`${S}-footer`]:{marginTop:c},"&-normal":{marginBlock:M,color:J.colorTextDisabled,[`${S}-description`]:{color:J.colorTextDisabled},[`${S}-image`]:{height:J.emptyImgHeightMD}},"&-small":{marginBlock:b,color:J.colorTextDisabled,[`${S}-image`]:{height:J.emptyImgHeightSM}}}}};var q=(0,B.Z)("Empty",J=>{const{componentCls:S,controlHeightLG:c}=J,b=(0,xe.TS)(J,{emptyImgCls:`${S}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Pe(b)]}),qe=function(J,S){var c={};for(var b in J)Object.prototype.hasOwnProperty.call(J,b)&&S.indexOf(b)<0&&(c[b]=J[b]);if(J!=null&&typeof Object.getOwnPropertySymbols=="function")for(var M=0,b=Object.getOwnPropertySymbols(J);M<b.length;M++)S.indexOf(b[M])<0&&Object.prototype.propertyIsEnumerable.call(J,b[M])&&(c[b[M]]=J[b[M]]);return c};const nt=x.createElement(se,null),bt=x.createElement(Me,null),Et=J=>{var{className:S,rootClassName:c,prefixCls:b,image:M=nt,description:k,children:T,imageStyle:Oe,style:ke}=J,Be=qe(J,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Ie,direction:mt,empty:Qe}=x.useContext(W.E_),Je=Ie("empty",b),[pe,V]=q(Je),[ge]=(0,v.Z)("Empty"),ue=typeof k!="undefined"?k:ge==null?void 0:ge.description,le=typeof ue=="string"?ue:"empty";let Ve=null;return typeof M=="string"?Ve=x.createElement("img",{alt:le,src:M}):Ve=M,pe(x.createElement("div",Object.assign({className:O()(V,Je,Qe==null?void 0:Qe.className,{[`${Je}-normal`]:M===bt,[`${Je}-rtl`]:mt==="rtl"},S,c),style:Object.assign(Object.assign({},Qe==null?void 0:Qe.style),ke)},Be),x.createElement("div",{className:`${Je}-image`,style:Oe},Ve),ue&&x.createElement("div",{className:`${Je}-description`},ue),T&&x.createElement("div",{className:`${Je}-footer`},T)))};Et.PRESENTED_IMAGE_DEFAULT=nt,Et.PRESENTED_IMAGE_SIMPLE=bt;var ae=Et},78241:function(nn,Te,f){"use strict";f.d(Te,{default:function(){return zt}});var P=f(15142),O=f(92310),x=f.n(O),W=f(77900),v=f(59301),F=f(62892),A=f(32441);function Ce(g){const[$,_]=v.useState(g);return v.useEffect(()=>{const d=setTimeout(()=>{_(g)},g.length?0:10);return()=>{clearTimeout(d)}},[g]),$}var se=f(17313),y=f(29878),Me=f(8378),B=f(37613),xe=f(83116),q=g=>{const{componentCls:$}=g,_=`${$}-show-help`,d=`${$}-show-help-item`;return{[_]:{transition:`opacity ${g.motionDurationSlow} ${g.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[d]:{overflow:"hidden",transition:`height ${g.motionDurationSlow} ${g.motionEaseInOut},
|
|
|
opacity ${g.motionDurationSlow} ${g.motionEaseInOut},
|
|
|
transform ${g.motionDurationSlow} ${g.motionEaseInOut} !important`,[`&${d}-appear, &${d}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${d}-leave-active`]:{transform:"translateY(-5px)"}}}}};const qe=g=>({legend:{display:"block",width:"100%",marginBottom:g.marginLG,padding:0,color:g.colorTextDescription,fontSize:g.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${g.lineWidth}px ${g.lineType} ${g.colorBorder}`},label:{fontSize:g.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 ${g.controlOutlineWidth}px ${g.controlOutline}`},output:{display:"block",paddingTop:15,color:g.colorText,fontSize:g.fontSize,lineHeight:g.lineHeight}}),nt=(g,$)=>{const{formItemCls:_}=g;return{[_]:{[`${_}-label > label`]:{height:$},[`${_}-control-input`]:{minHeight:$}}}},bt=g=>{const{componentCls:$}=g;return{[g.componentCls]:Object.assign(Object.assign(Object.assign({},(0,se.Wf)(g)),qe(g)),{[`${$}-text`]:{display:"inline-block",paddingInlineEnd:g.paddingSM},"&-small":Object.assign({},nt(g,g.controlHeightSM)),"&-large":Object.assign({},nt(g,g.controlHeightLG))})}},Et=g=>{const{formItemCls:$,iconCls:_,componentCls:d,rootPrefixCls:h,labelRequiredMarkColor:C,labelColor:D,labelFontSize:re,labelHeight:K,labelColonMarginInlineStart:H,labelColonMarginInlineEnd:be,itemMarginBottom:ve}=g;return{[$]:Object.assign(Object.assign({},(0,se.Wf)(g)),{marginBottom:ve,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${h}-row`]:{display:"none"},"&-has-warning":{[`${$}-split`]:{color:g.colorError}},"&-has-error":{[`${$}-split`]:{color:g.colorWarning}},[`${$}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${g.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:K,color:D,fontSize:re,[`> ${_}`]:{fontSize:g.fontSize,verticalAlign:"top"},[`&${$}-required:not(${$}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:g.marginXXS,color:C,fontSize:g.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${d}-hide-required-mark &`]:{display:"none"}},[`${$}-optional`]:{display:"inline-block",marginInlineStart:g.marginXXS,color:g.colorTextDescription,[`${d}-hide-required-mark &`]:{display:"none"}},[`${$}-tooltip`]:{color:g.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:g.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:H,marginInlineEnd:be},[`&${$}-no-colon::after`]:{content:'"\\a0"'}}},[`${$}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${h}-col-'"]):not([class*="' ${h}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:g.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[$]:{"&-explain, &-extra":{clear:"both",color:g.colorTextDescription,fontSize:g.fontSize,lineHeight:g.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:g.controlHeightSM,transition:`color ${g.motionDurationMid} ${g.motionEaseOut}`},"&-explain":{"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning}}},[`&-with-help ${$}-explain`]:{height:"auto",opacity:1},[`${$}-feedback-icon`]:{fontSize:g.fontSize,textAlign:"center",visibility:"visible",animationName:y.kr,animationDuration:g.motionDurationMid,animationTimingFunction:g.motionEaseOutBack,pointerEvents:"none","&-success":{color:g.colorSuccess},"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning},"&-validating":{color:g.colorPrimary}}})}},ae=g=>{const{componentCls:$,formItemCls:_}=g;return{[`${$}-horizontal`]:{[`${_}-label`]:{flexGrow:0},[`${_}-control`]:{flex:"1 1 0",minWidth:0},[`${_}-label[class$='-24'], ${_}-label[class*='-24 ']`]:{[`& + ${_}-control`]:{minWidth:"unset"}}}}},J=g=>{const{componentCls:$,formItemCls:_}=g;return{[`${$}-inline`]:{display:"flex",flexWrap:"wrap",[_]:{flex:"none",marginInlineEnd:g.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${_}-label,
|
|
|
> ${_}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${_}-label`]:{flex:"none"},[`${$}-text`]:{display:"inline-block"},[`${_}-has-feedback`]:{display:"inline-block"}}}}},S=g=>({padding:g.verticalLabelPadding,margin:g.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=g=>{const{componentCls:$,formItemCls:_,rootPrefixCls:d}=g;return{[`${_} ${_}-label`]:S(g),[$]:{[_]:{flexWrap:"wrap",[`${_}-label, ${_}-control`]:{[`&:not([class*=" ${d}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},b=g=>{const{componentCls:$,formItemCls:_,rootPrefixCls:d}=g;return{[`${$}-vertical`]:{[_]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${$}-item-control`]:{width:"100%"}}},[`${$}-vertical ${_}-label,
|
|
|
.${d}-col-24${_}-label,
|
|
|
.${d}-col-xl-24${_}-label`]:S(g),[`@media (max-width: ${g.screenXSMax}px)`]:[c(g),{[$]:{[`.${d}-col-xs-24${_}-label`]:S(g)}}],[`@media (max-width: ${g.screenSMMax}px)`]:{[$]:{[`.${d}-col-sm-24${_}-label`]:S(g)}},[`@media (max-width: ${g.screenMDMax}px)`]:{[$]:{[`.${d}-col-md-24${_}-label`]:S(g)}},[`@media (max-width: ${g.screenLGMax}px)`]:{[$]:{[`.${d}-col-lg-24${_}-label`]:S(g)}}}},M=(g,$)=>(0,B.TS)(g,{formItemCls:`${g.componentCls}-item`,rootPrefixCls:$});var k=(0,xe.Z)("Form",(g,$)=>{let{rootPrefixCls:_}=$;const d=M(g,_);return[bt(d),Et(d),q(d),ae(d),J(d),b(d),(0,Me.Z)(d),y.kr]},g=>({labelRequiredMarkColor:g.colorError,labelColor:g.colorTextHeading,labelFontSize:g.fontSize,labelHeight:g.controlHeight,labelColonMarginInlineStart:g.marginXXS/2,labelColonMarginInlineEnd:g.marginXS,itemMarginBottom:g.marginLG,verticalLabelPadding:`0 0 ${g.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const T=[];function Oe(g,$,_){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof g=="string"?g:`${$}-${d}`,error:g,errorStatus:_}}var Be=g=>{let{help:$,helpStatus:_,errors:d=T,warnings:h=T,className:C,fieldId:D,onVisibleChanged:re}=g;const{prefixCls:K}=v.useContext(A.Rk),H=`${K}-item-explain`,[,be]=k(K),ve=(0,v.useMemo)(()=>(0,F.Z)(K),[K]),We=Ce(d),I=Ce(h),j=v.useMemo(()=>$!=null?[Oe($,"help",_)]:[].concat((0,P.Z)(We.map((we,je)=>Oe(we,"error","error",je))),(0,P.Z)(I.map((we,je)=>Oe(we,"warning","warning",je)))),[$,_,We,I]),Ue={};return D&&(Ue.id=`${D}_help`),v.createElement(W.default,{motionDeadline:ve.motionDeadline,motionName:`${K}-show-help`,visible:!!j.length,onVisibleChanged:re},we=>{const{className:je,style:Fe}=we;return v.createElement("div",Object.assign({},Ue,{className:x()(H,je,C,be),style:Fe,role:"alert"}),v.createElement(W.CSSMotionList,Object.assign({keys:j},(0,F.Z)(K),{motionName:`${K}-show-help-item`,component:!1}),dt=>{const{key:ne,error:ye,errorStatus:Ae,className:lt,style:Ge}=dt;return v.createElement("div",{key:ne,className:x()(lt,{[`${H}-${Ae}`]:Ae}),style:Ge},ye)}))})},Ie=f(95013),mt=f(36355),Qe=f(1684),Je=f(52946),pe=f(19716),V=f(16722);const ge=["parentNode"],ue="form_item";function le(g){return g===void 0||g===!1?[]:Array.isArray(g)?g:[g]}function Ve(g,$){if(!g.length)return;const _=g.join("_");return $?`${$}_${_}`:ge.includes(_)?`${ue}_${_}`:_}function ze(g,$,_,d,h,C){let D=d;return C!==void 0?D=C:_.validating?D="validating":g.length?D="error":$.length?D="warning":(_.touched||h&&_.validated)&&(D="success"),D}function me(g){return le(g).join("_")}function N(g){const[$]=(0,Ie.useForm)(),_=v.useRef({}),d=v.useMemo(()=>g!=null?g:Object.assign(Object.assign({},$),{__INTERNAL__:{itemRef:h=>C=>{const D=me(h);C?_.current[D]=C:delete _.current[D]}},scrollToField:function(h){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const D=le(h),re=Ve(D,d.__INTERNAL__.name),K=re?document.getElementById(re):null;K&&(0,V.Z)(K,Object.assign({scrollMode:"if-needed",block:"nearest"},C))},getFieldInstance:h=>{const C=me(h);return _.current[C]}}),[g,$]);return[d]}var L=f(28726),G=function(g,$){var _={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&$.indexOf(d)<0&&(_[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)$.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(_[d[h]]=g[d[h]]);return _};const Le=(g,$)=>{const _=v.useContext(Qe.Z),{getPrefixCls:d,direction:h,form:C}=v.useContext(mt.E_),{prefixCls:D,className:re,rootClassName:K,size:H,disabled:be=_,form:ve,colon:We,labelAlign:I,labelWrap:j,labelCol:Ue,wrapperCol:we,hideRequiredMark:je,layout:Fe="horizontal",scrollToFirstError:dt,requiredMark:ne,onFinishFailed:ye,name:Ae,style:lt,feedbackIcons:Ge}=g,ut=G(g,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Kt=(0,pe.Z)(H),Rt=v.useContext(L.Z),Nt=(0,v.useMemo)(()=>ne!==void 0?ne:C&&C.requiredMark!==void 0?C.requiredMark:!je,[je,ne,C]),$t=We!=null?We:C==null?void 0:C.colon,Ot=d("form",D),[qt,jt]=k(Ot),Ut=x()(Ot,`${Ot}-${Fe}`,{[`${Ot}-hide-required-mark`]:Nt===!1,[`${Ot}-rtl`]:h==="rtl",[`${Ot}-${Kt}`]:Kt},jt,C==null?void 0:C.className,re,K),[kt]=N(ve),{__INTERNAL__:Lt}=kt;Lt.name=Ae;const wt=(0,v.useMemo)(()=>({name:Ae,labelAlign:I,labelCol:Ue,labelWrap:j,wrapperCol:we,vertical:Fe==="vertical",colon:$t,requiredMark:Nt,itemRef:Lt.itemRef,form:kt,feedbackIcons:Ge}),[Ae,I,Ue,we,Fe,$t,Nt,kt,Ge]);v.useImperativeHandle($,()=>kt);const Bt=(fn,Pt)=>{if(fn){let Wt={block:"nearest"};typeof fn=="object"&&(Wt=fn),kt.scrollToField(Pt,Wt)}},It=fn=>{if(ye==null||ye(fn),fn.errorFields.length){const Pt=fn.errorFields[0].name;if(dt!==void 0){Bt(dt,Pt);return}C&&C.scrollToFirstError!==void 0&&Bt(C.scrollToFirstError,Pt)}};return qt(v.createElement(Qe.n,{disabled:be},v.createElement(Je.q,{size:Kt},v.createElement(A.RV,Object.assign({},{validateMessages:Rt}),v.createElement(A.q3.Provider,{value:wt},v.createElement(Ie.default,Object.assign({id:Ae},ut,{name:Ae,onFinishFailed:It,form:kt,style:Object.assign(Object.assign({},C==null?void 0:C.style),lt),className:Ut})))))))};var Ze=v.forwardRef(Le),it=f(41799),_e=f(8654),R=f(92343),de=f(11592);function ie(g){if(typeof g=="function")return g;const $=(0,de.Z)(g);return $.length<=1?$[0]:$}const U=()=>{const{status:g,errors:$=[],warnings:_=[]}=(0,v.useContext)(A.aM);return{status:g,errors:$,warnings:_}};U.Context=A.aM;var X=U,oe=f(16089);function Y(g){const[$,_]=v.useState(g),d=(0,v.useRef)(null),h=(0,v.useRef)([]),C=(0,v.useRef)(!1);v.useEffect(()=>(C.current=!1,()=>{C.current=!0,oe.Z.cancel(d.current),d.current=null}),[]);function D(re){C.current||(d.current===null&&(h.current=[],d.current=(0,oe.Z)(()=>{d.current=null,_(K=>{let H=K;return h.current.forEach(be=>{H=be(H)}),H})})),h.current.push(re))}return[$,D]}function ce(){const{itemRef:g}=v.useContext(A.q3),$=v.useRef({});function _(d,h){const C=h&&typeof h=="object"&&h.ref,D=d.join("_");return($.current.name!==D||$.current.originRef!==C)&&($.current.name=D,$.current.originRef=C,$.current.ref=(0,_e.sQ)(g(d),C)),$.current.ref}return _}var Re=f(29194),ee=f(34280),fe=f(2738),z=f(27382),he=f(37028);const Se=g=>{const{formItemCls:$}=g;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${$}-control`]:{display:"flex"}}}};var De=(0,xe.b)(["Form","item-item"],(g,$)=>{let{rootPrefixCls:_}=$;const d=M(g,_);return[Se(d)]}),Q=g=>{const{prefixCls:$,status:_,wrapperCol:d,children:h,errors:C,warnings:D,_internalItemRender:re,extra:K,help:H,fieldId:be,marginBottom:ve,onErrorVisibleChanged:We}=g,I=`${$}-item`,j=v.useContext(A.q3),Ue=d||j.wrapperCol||{},we=x()(`${I}-control`,Ue.className),je=v.useMemo(()=>Object.assign({},j),[j]);delete je.labelCol,delete je.wrapperCol;const Fe=v.createElement("div",{className:`${I}-control-input`},v.createElement("div",{className:`${I}-control-input-content`},h)),dt=v.useMemo(()=>({prefixCls:$,status:_}),[$,_]),ne=ve!==null||C.length||D.length?v.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},v.createElement(A.Rk.Provider,{value:dt},v.createElement(Be,{fieldId:be,errors:C,warnings:D,help:H,helpStatus:_,className:`${I}-explain-connected`,onVisibleChanged:We})),!!ve&&v.createElement("div",{style:{width:0,height:ve}})):null,ye={};be&&(ye.id=`${be}_extra`);const Ae=K?v.createElement("div",Object.assign({},ye,{className:`${I}-extra`}),K):null,lt=re&&re.mark==="pro_table_render"&&re.render?re.render(g,{input:Fe,errorList:ne,extra:Ae}):v.createElement(v.Fragment,null,Fe,ne,Ae);return v.createElement(A.q3.Provider,{value:je},v.createElement(he.Z,Object.assign({},Ue,{className:we}),lt),v.createElement(De,{prefixCls:$}))},ot=f(61485),Ke=f(31724),ft=f(9763),pt=f(6848),rn=function(g,$){var _={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&$.indexOf(d)<0&&(_[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)$.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(_[d[h]]=g[d[h]]);return _};function Zt(g){return g?typeof g=="object"&&!v.isValidElement(g)?g:{title:g}:null}var Dt=g=>{let{prefixCls:$,label:_,htmlFor:d,labelCol:h,labelAlign:C,colon:D,required:re,requiredMark:K,tooltip:H}=g;var be;const[ve]=(0,ft.Z)("Form"),{vertical:We,labelAlign:I,labelCol:j,labelWrap:Ue,colon:we}=v.useContext(A.q3);if(!_)return null;const je=h||j||{},Fe=C||I,dt=`${$}-item-label`,ne=x()(dt,Fe==="left"&&`${dt}-left`,je.className,{[`${dt}-wrap`]:!!Ue});let ye=_;const Ae=D===!0||we!==!1&&D!==!1;Ae&&!We&&typeof _=="string"&&_.trim()!==""&&(ye=_.replace(/[:|:]\s*$/,""));const Ge=Zt(H);if(Ge){const{icon:Nt=v.createElement(ot.Z,null)}=Ge,$t=rn(Ge,["icon"]),Ot=v.createElement(pt.Z,Object.assign({},$t),v.cloneElement(Nt,{className:`${$}-item-tooltip`,title:""}));ye=v.createElement(v.Fragment,null,ye,Ot)}const ut=K==="optional",Kt=typeof K=="function";Kt?ye=K(ye,{required:!!re}):ut&&!re&&(ye=v.createElement(v.Fragment,null,ye,v.createElement("span",{className:`${$}-item-optional`,title:""},(ve==null?void 0:ve.optional)||((be=Ke.Z.Form)===null||be===void 0?void 0:be.optional))));const Rt=x()({[`${$}-item-required`]:re,[`${$}-item-required-mark-optional`]:ut||Kt,[`${$}-item-no-colon`]:!Ae});return v.createElement(he.Z,Object.assign({},je,{className:ne}),v.createElement("label",{htmlFor:d,className:Rt,title:typeof _=="string"?_:""},ye))},Xt=f(29679),Yt=f(19248),sn=f(96512),xn=f(58617);const un={success:Xt.Z,warning:sn.Z,error:Yt.Z,validating:xn.Z};function $n(g){let{children:$,errors:_,warnings:d,hasFeedback:h,validateStatus:C,prefixCls:D,meta:re,noStyle:K}=g;const H=`${D}-item`,{feedbackIcons:be}=v.useContext(A.q3),ve=ze(_,d,re,null,!!h,C),{isFormItemInput:We,status:I}=v.useContext(A.aM),j=v.useMemo(()=>{var Ue;let we;if(h){const dt=h!==!0&&h.icons||be,ne=ve&&((Ue=dt==null?void 0:dt({status:ve,errors:_,warnings:d}))===null||Ue===void 0?void 0:Ue[ve]),ye=ve&&un[ve];we=ne!==!1&&ye?v.createElement("span",{className:x()(`${H}-feedback-icon`,`${H}-feedback-icon-${ve}`)},ne||v.createElement(ye,null)):null}let je=!0,Fe=ve||"";return K&&(je=We,Fe=(ve!=null?ve:I)||""),{status:Fe,errors:_,warnings:d,hasFeedback:!!h,feedbackIcon:we,isFormItemInput:je}},[ve,h,K,We,I]);return v.createElement(A.aM.Provider,{value:j},$)}var Bn=function(g,$){var _={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&$.indexOf(d)<0&&(_[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)$.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(_[d[h]]=g[d[h]]);return _};function pn(g){const{prefixCls:$,className:_,rootClassName:d,style:h,help:C,errors:D,warnings:re,validateStatus:K,meta:H,hasFeedback:be,hidden:ve,children:We,fieldId:I,required:j,isRequired:Ue,onSubItemMetaChange:we}=g,je=Bn(g,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Fe=`${$}-item`,{requiredMark:dt}=v.useContext(A.q3),ne=v.useRef(null),ye=Ce(D),Ae=Ce(re),lt=C!=null,Ge=!!(lt||D.length||re.length),ut=!!ne.current&&(0,Re.Z)(ne.current),[Kt,Rt]=v.useState(null);(0,ee.Z)(()=>{if(Ge&&ne.current){const jt=getComputedStyle(ne.current);Rt(parseInt(jt.marginBottom,10))}},[Ge,ut]);const Nt=jt=>{jt||Rt(null)},Ot=function(){let jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Ut=jt?ye:H.errors,kt=jt?Ae:H.warnings;return ze(Ut,kt,H,"",!!be,K)}(),qt=x()(Fe,_,d,{[`${Fe}-with-help`]:lt||ye.length||Ae.length,[`${Fe}-has-feedback`]:Ot&&be,[`${Fe}-has-success`]:Ot==="success",[`${Fe}-has-warning`]:Ot==="warning",[`${Fe}-has-error`]:Ot==="error",[`${Fe}-is-validating`]:Ot==="validating",[`${Fe}-hidden`]:ve});return v.createElement("div",{className:qt,style:h,ref:ne},v.createElement(z.Z,Object.assign({className:`${Fe}-row`},(0,fe.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(Dt,Object.assign({htmlFor:I},g,{requiredMark:dt,required:j!=null?j:Ue,prefixCls:$})),v.createElement(Q,Object.assign({},g,H,{errors:ye,warnings:Ae,prefixCls:$,status:Ot,help:C,marginBottom:Kt,onErrorVisibleChanged:Nt}),v.createElement(A.qI.Provider,{value:we},v.createElement($n,{prefixCls:$,meta:H,errors:H.errors,warnings:H.warnings,hasFeedback:be,validateStatus:Ot},We)))),!!Kt&&v.createElement("div",{className:`${Fe}-margin-offset`,style:{marginBottom:-Kt}}))}const Ln="__SPLIT__",wn=null,In=v.memo(g=>{let{children:$}=g;return $},(g,$)=>g.value===$.value&&g.update===$.update&&g.childProps.length===$.childProps.length&&g.childProps.every((_,d)=>_===$.childProps[d]));function Cn(g){return g!=null}function dn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function zn(g){const{name:$,noStyle:_,className:d,dependencies:h,prefixCls:C,shouldUpdate:D,rules:re,children:K,required:H,label:be,messageVariables:ve,trigger:We="onChange",validateTrigger:I,hidden:j,help:Ue}=g,{getPrefixCls:we}=v.useContext(mt.E_),{name:je}=v.useContext(A.q3),Fe=ie(K),dt=typeof Fe=="function",ne=v.useContext(A.qI),{validateTrigger:ye}=v.useContext(Ie.FieldContext),Ae=I!==void 0?I:ye,lt=Cn($),Ge=we("form",C),[ut,Kt]=k(Ge),Rt=v.useContext(Ie.ListContext),Nt=v.useRef(),[$t,Ot]=Y({}),[qt,jt]=(0,it.Z)(()=>dn()),Ut=Pt=>{const Wt=Rt==null?void 0:Rt.getKey(Pt.name);if(jt(Pt.destroy?dn():Pt,!0),_&&Ue!==!1&&ne){let an=Pt.name;if(Pt.destroy)an=Nt.current||an;else if(Wt!==void 0){const[Gt,En]=Wt;an=[Gt].concat((0,P.Z)(En)),Nt.current=an}ne(Pt,an)}},kt=(Pt,Wt)=>{Ot(an=>{const Gt=Object.assign({},an),Un=[].concat((0,P.Z)(Pt.name.slice(0,-1)),(0,P.Z)(Wt)).join(Ln);return Pt.destroy?delete Gt[Un]:Gt[Un]=Pt,Gt})},[Lt,wt]=v.useMemo(()=>{const Pt=(0,P.Z)(qt.errors),Wt=(0,P.Z)(qt.warnings);return Object.values($t).forEach(an=>{Pt.push.apply(Pt,(0,P.Z)(an.errors||[])),Wt.push.apply(Wt,(0,P.Z)(an.warnings||[]))}),[Pt,Wt]},[$t,qt.errors,qt.warnings]),Bt=ce();function It(Pt,Wt,an){return _&&!j?v.createElement($n,{prefixCls:Ge,hasFeedback:g.hasFeedback,validateStatus:g.validateStatus,meta:qt,errors:Lt,warnings:wt,noStyle:!0},Pt):v.createElement(pn,Object.assign({key:"row"},g,{className:x()(d,Kt),prefixCls:Ge,fieldId:Wt,isRequired:an,errors:Lt,warnings:wt,meta:qt,onSubItemMetaChange:kt}),Pt)}if(!lt&&!dt&&!h)return ut(It(Fe));let fn={};return typeof be=="string"?fn.label=be:$&&(fn.label=String($)),ve&&(fn=Object.assign(Object.assign({},fn),ve)),ut(v.createElement(Ie.Field,Object.assign({},g,{messageVariables:fn,trigger:We,validateTrigger:Ae,onMetaChange:Ut}),(Pt,Wt,an)=>{const Gt=le($).length&&Wt?Wt.name:[],En=Ve(Gt,je),Un=H!==void 0?H:!!(re&&re.some(ht=>{if(ht&&typeof ht=="object"&&ht.required&&!ht.warningOnly)return!0;if(typeof ht=="function"){const en=ht(an);return en&&en.required&&!en.warningOnly}return!1})),Mt=Object.assign({},Pt);let ct=null;if(Array.isArray(Fe)&<)ct=Fe;else if(!(dt&&(!(D||h)||lt))){if(!(h&&!dt&&!lt))if((0,R.l$)(Fe)){const ht=Object.assign(Object.assign({},Fe.props),Mt);if(ht.id||(ht.id=En),Ue||Lt.length>0||wt.length>0||g.extra){const Vt=[];(Ue||Lt.length>0)&&Vt.push(`${En}_help`),g.extra&&Vt.push(`${En}_extra`),ht["aria-describedby"]=Vt.join(" ")}Lt.length>0&&(ht["aria-invalid"]="true"),Un&&(ht["aria-required"]="true"),(0,_e.Yr)(Fe)&&(ht.ref=Bt(Gt,Fe)),new Set([].concat((0,P.Z)(le(We)),(0,P.Z)(le(Ae)))).forEach(Vt=>{ht[Vt]=function(){for(var Ft,ln,gn,mn,Tn,Xe=arguments.length,He=new Array(Xe),yt=0;yt<Xe;yt++)He[yt]=arguments[yt];(gn=Mt[Vt])===null||gn===void 0||(Ft=gn).call.apply(Ft,[Mt].concat(He)),(Tn=(mn=Fe.props)[Vt])===null||Tn===void 0||(ln=Tn).call.apply(ln,[mn].concat(He))}});const tn=[ht["aria-required"],ht["aria-invalid"],ht["aria-describedby"]];ct=v.createElement(In,{value:Mt[g.valuePropName||"value"],update:Fe,childProps:tn},(0,R.Tm)(Fe,ht))}else dt&&(D||h)&&!lt?ct=Fe(an):ct=Fe}return It(ct,En,Un)}))}const Qt=zn;Qt.useStatus=X;var Fn=Qt,Wn=function(g,$){var _={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&$.indexOf(d)<0&&(_[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)$.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(_[d[h]]=g[d[h]]);return _},pr=g=>{var{prefixCls:$,children:_}=g,d=Wn(g,["prefixCls","children"]);const{getPrefixCls:h}=v.useContext(mt.E_),C=h("form",$),D=v.useMemo(()=>({prefixCls:C,status:"error"}),[C]);return v.createElement(Ie.List,Object.assign({},d),(re,K,H)=>v.createElement(A.Rk.Provider,{value:D},_(re.map(be=>Object.assign(Object.assign({},be),{fieldKey:be.key})),K,{errors:H.errors,warnings:H.warnings})))};function on(){const{form:g}=(0,v.useContext)(A.q3);return g}const at=Ze;at.Item=Fn,at.List=pr,at.ErrorList=Be,at.useForm=N,at.useFormInstance=on,at.useWatch=Ie.useWatch,at.Provider=A.RV,at.create=()=>{};var zt=at},9432:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return Et},n:function(){return nt}});var P=f(19248),O=f(92310),x=f.n(O),W=f(93681),v=f(8654),F=f(59301),A=f(19080),Ce=f(36355),se=f(1684),y=f(19716),Me=f(32441),B=f(33234),xe=f(59412),Pe=f(9937);function q(ae){return!!(ae.prefix||ae.suffix||ae.allowClear)}var qe=function(ae,J){var S={};for(var c in ae)Object.prototype.hasOwnProperty.call(ae,c)&&J.indexOf(c)<0&&(S[c]=ae[c]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,c=Object.getOwnPropertySymbols(ae);b<c.length;b++)J.indexOf(c[b])<0&&Object.prototype.propertyIsEnumerable.call(ae,c[b])&&(S[c[b]]=ae[c[b]]);return S};function nt(ae,J){if(!ae)return;ae.focus(J);const{cursor:S}=J||{};if(S){const c=ae.value.length;switch(S){case"start":ae.setSelectionRange(0,0);break;case"end":ae.setSelectionRange(c,c);break;default:ae.setSelectionRange(0,c);break}}}var Et=(0,F.forwardRef)((ae,J)=>{var S;const{prefixCls:c,bordered:b=!0,status:M,size:k,disabled:T,onBlur:Oe,onFocus:ke,suffix:Be,allowClear:Ie,addonAfter:mt,addonBefore:Qe,className:Je,style:pe,styles:V,rootClassName:ge,onChange:ue,classNames:le}=ae,Ve=qe(ae,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:ze,direction:me,input:N}=F.useContext(Ce.E_),L=ze("input",c),G=(0,F.useRef)(null),[Le,rt]=(0,Pe.ZP)(L),{compactSize:Ze,compactItemClassnames:it}=(0,B.ri)(L,me),_e=(0,y.Z)(De=>{var et;return(et=k!=null?k:Ze)!==null&&et!==void 0?et:De}),R=F.useContext(se.Z),de=T!=null?T:R,{status:ie,hasFeedback:U,feedbackIcon:X}=(0,F.useContext)(Me.aM),oe=(0,A.F)(ie,M),Y=q(ae)||!!U,ce=(0,F.useRef)(Y);(0,F.useEffect)(()=>{var De;Y&&ce.current,ce.current=Y},[Y]);const Re=(0,xe.Z)(G,!0),ee=De=>{Re(),Oe==null||Oe(De)},fe=De=>{Re(),ke==null||ke(De)},z=De=>{Re(),ue==null||ue(De)},he=(U||Be)&&F.createElement(F.Fragment,null,Be,U&&X);let Se;return typeof Ie=="object"&&(Ie!=null&&Ie.clearIcon)?Se=Ie:Ie&&(Se={clearIcon:F.createElement(P.Z,null)}),Le(F.createElement(W.default,Object.assign({ref:(0,v.sQ)(J,G),prefixCls:L,autoComplete:N==null?void 0:N.autoComplete},Ve,{disabled:de,onBlur:ee,onFocus:fe,style:Object.assign(Object.assign({},N==null?void 0:N.style),pe),styles:Object.assign(Object.assign({},N==null?void 0:N.styles),V),suffix:he,allowClear:Se,className:x()(Je,ge,it,N==null?void 0:N.className),onChange:z,addonAfter:mt&&F.createElement(B.BR,null,F.createElement(Me.Ux,{override:!0,status:!0},mt)),addonBefore:Qe&&F.createElement(B.BR,null,F.createElement(Me.Ux,{override:!0,status:!0},Qe)),classNames:Object.assign(Object.assign(Object.assign({},le),N==null?void 0:N.classNames),{input:x()({[`${L}-sm`]:_e==="small",[`${L}-lg`]:_e==="large",[`${L}-rtl`]:me==="rtl",[`${L}-borderless`]:!b},!Y&&(0,A.Z)(L,oe),le==null?void 0:le.input,(S=N==null?void 0:N.classNames)===null||S===void 0?void 0:S.input,rt)}),classes:{affixWrapper:x()({[`${L}-affix-wrapper-sm`]:_e==="small",[`${L}-affix-wrapper-lg`]:_e==="large",[`${L}-affix-wrapper-rtl`]:me==="rtl",[`${L}-affix-wrapper-borderless`]:!b},(0,A.Z)(`${L}-affix-wrapper`,oe,U),rt),wrapper:x()({[`${L}-group-rtl`]:me==="rtl"},rt),group:x()({[`${L}-group-wrapper-sm`]:_e==="small",[`${L}-group-wrapper-lg`]:_e==="large",[`${L}-group-wrapper-rtl`]:me==="rtl",[`${L}-group-wrapper-disabled`]:de},(0,A.Z)(`${L}-group-wrapper`,oe,U),rt)}})))})},1643:function(nn,Te,f){"use strict";var P=f(19248),O=f(92310),x=f.n(O),W=f(9296),v=f(59301),F=f(19080),A=f(36355),Ce=f(1684),se=f(19716),y=f(32441),Me=f(9432),B=f(9937),xe=function(q,qe){var nt={};for(var bt in q)Object.prototype.hasOwnProperty.call(q,bt)&&qe.indexOf(bt)<0&&(nt[bt]=q[bt]);if(q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,bt=Object.getOwnPropertySymbols(q);Et<bt.length;Et++)qe.indexOf(bt[Et])<0&&Object.prototype.propertyIsEnumerable.call(q,bt[Et])&&(nt[bt[Et]]=q[bt[Et]]);return nt};const Pe=(0,v.forwardRef)((q,qe)=>{const{prefixCls:nt,bordered:bt=!0,size:Et,disabled:ae,status:J,allowClear:S,showCount:c,classNames:b,rootClassName:M,className:k}=q,T=xe(q,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Oe,direction:ke}=v.useContext(A.E_),Be=(0,se.Z)(Et),Ie=v.useContext(Ce.Z),mt=ae!=null?ae:Ie,{status:Qe,hasFeedback:Je,feedbackIcon:pe}=v.useContext(y.aM),V=(0,F.F)(Qe,J),ge=v.useRef(null);v.useImperativeHandle(qe,()=>{var me;return{resizableTextArea:(me=ge.current)===null||me===void 0?void 0:me.resizableTextArea,focus:N=>{var L,G;(0,Me.n)((G=(L=ge.current)===null||L===void 0?void 0:L.resizableTextArea)===null||G===void 0?void 0:G.textArea,N)},blur:()=>{var N;return(N=ge.current)===null||N===void 0?void 0:N.blur()}}});const ue=Oe("input",nt);let le;typeof S=="object"&&(S!=null&&S.clearIcon)?le=S:S&&(le={clearIcon:v.createElement(P.Z,null)});const[Ve,ze]=(0,B.ZP)(ue);return Ve(v.createElement(W.default,Object.assign({},T,{disabled:mt,allowClear:le,className:x()(k,M),classes:{affixWrapper:x()(`${ue}-textarea-affix-wrapper`,{[`${ue}-affix-wrapper-rtl`]:ke==="rtl",[`${ue}-affix-wrapper-borderless`]:!bt,[`${ue}-affix-wrapper-sm`]:Be==="small",[`${ue}-affix-wrapper-lg`]:Be==="large",[`${ue}-textarea-show-count`]:c},(0,F.Z)(`${ue}-affix-wrapper`,V),ze)},classNames:Object.assign(Object.assign({},b),{textarea:x()({[`${ue}-borderless`]:!bt,[`${ue}-sm`]:Be==="small",[`${ue}-lg`]:Be==="large"},(0,F.Z)(ue,V),ze,b==null?void 0:b.textarea)}),prefixCls:ue,suffix:Je&&v.createElement("span",{className:`${ue}-textarea-suffix`},pe),showCount:c,ref:ge})))});Te.Z=Pe},59412:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return O}});var P=f(59301);function O(x,W){const v=(0,P.useRef)([]),F=()=>{v.current.push(setTimeout(()=>{var A,Ce,se,y;!((A=x.current)===null||A===void 0)&&A.input&&((Ce=x.current)===null||Ce===void 0?void 0:Ce.input.getAttribute("type"))==="password"&&(!((se=x.current)===null||se===void 0)&&se.input.hasAttribute("value"))&&((y=x.current)===null||y===void 0||y.input.removeAttribute("value"))}))};return(0,P.useEffect)(()=>(W&&F(),()=>v.current.forEach(A=>{A&&clearTimeout(A)})),[]),F}},92832:function(nn,Te,f){"use strict";f.d(Te,{default:function(){return Be}});var P=f(92310),O=f.n(P),x=f(59301),W=f(36355),v=f(32441),F=f(9937),Ce=Ie=>{const{getPrefixCls:mt,direction:Qe}=(0,x.useContext)(W.E_),{prefixCls:Je,className:pe}=Ie,V=mt("input-group",Je),ge=mt("input"),[ue,le]=(0,F.ZP)(ge),Ve=O()(V,{[`${V}-lg`]:Ie.size==="large",[`${V}-sm`]:Ie.size==="small",[`${V}-compact`]:Ie.compact,[`${V}-rtl`]:Qe==="rtl"},le,pe),ze=(0,x.useContext)(v.aM),me=(0,x.useMemo)(()=>Object.assign(Object.assign({},ze),{isFormItemInput:!1}),[ze]);return ue(x.createElement("span",{className:Ve,style:Ie.style,onMouseEnter:Ie.onMouseEnter,onMouseLeave:Ie.onMouseLeave,onFocus:Ie.onFocus,onBlur:Ie.onBlur},x.createElement(v.aM.Provider,{value:me},Ie.children)))},se=f(9432),y=f(73331),Me=f(15277),B=f(2738),xe=f(8654),Pe=f(59412),q=function(Ie,mt){var Qe={};for(var Je in Ie)Object.prototype.hasOwnProperty.call(Ie,Je)&&mt.indexOf(Je)<0&&(Qe[Je]=Ie[Je]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Je=Object.getOwnPropertySymbols(Ie);pe<Je.length;pe++)mt.indexOf(Je[pe])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Je[pe])&&(Qe[Je[pe]]=Ie[Je[pe]]);return Qe};const qe=Ie=>Ie?x.createElement(Me.Z,null):x.createElement(y.Z,null),nt={click:"onClick",hover:"onMouseOver"};var Et=x.forwardRef((Ie,mt)=>{const{visibilityToggle:Qe=!0}=Ie,Je=typeof Qe=="object"&&Qe.visible!==void 0,[pe,V]=(0,x.useState)(()=>Je?Qe.visible:!1),ge=(0,x.useRef)(null);x.useEffect(()=>{Je&&V(Qe.visible)},[Je,Qe]);const ue=(0,Pe.Z)(ge),le=()=>{const{disabled:de}=Ie;de||(pe&&ue(),V(ie=>{var U;const X=!ie;return typeof Qe=="object"&&((U=Qe.onVisibleChange)===null||U===void 0||U.call(Qe,X)),X}))},Ve=de=>{const{action:ie="click",iconRender:U=qe}=Ie,X=nt[ie]||"",oe=U(pe),Y={[X]:le,className:`${de}-icon`,key:"passwordIcon",onMouseDown:ce=>{ce.preventDefault()},onMouseUp:ce=>{ce.preventDefault()}};return x.cloneElement(x.isValidElement(oe)?oe:x.createElement("span",null,oe),Y)},{className:ze,prefixCls:me,inputPrefixCls:N,size:L}=Ie,G=q(Ie,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Le}=x.useContext(W.E_),rt=Le("input",N),Ze=Le("input-password",me),it=Qe&&Ve(Ze),_e=O()(Ze,ze,{[`${Ze}-${L}`]:!!L}),R=Object.assign(Object.assign({},(0,B.Z)(G,["suffix","iconRender","visibilityToggle"])),{type:pe?"text":"password",className:_e,prefixCls:rt,suffix:it});return L&&(R.size=L),x.createElement(se.Z,Object.assign({ref:(0,xe.sQ)(mt,ge)},R))}),ae=f(47472),J=f(92343),S=f(3113),c=f(19716),b=f(33234),M=function(Ie,mt){var Qe={};for(var Je in Ie)Object.prototype.hasOwnProperty.call(Ie,Je)&&mt.indexOf(Je)<0&&(Qe[Je]=Ie[Je]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Je=Object.getOwnPropertySymbols(Ie);pe<Je.length;pe++)mt.indexOf(Je[pe])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Je[pe])&&(Qe[Je[pe]]=Ie[Je[pe]]);return Qe},T=x.forwardRef((Ie,mt)=>{const{prefixCls:Qe,inputPrefixCls:Je,className:pe,size:V,suffix:ge,enterButton:ue=!1,addonAfter:le,loading:Ve,disabled:ze,onSearch:me,onChange:N,onCompositionStart:L,onCompositionEnd:G}=Ie,Le=M(Ie,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:rt,direction:Ze}=x.useContext(W.E_),it=x.useRef(!1),_e=rt("input-search",Qe),R=rt("input",Je),{compactSize:de}=(0,b.ri)(_e,Ze),ie=(0,c.Z)(Q=>{var ot;return(ot=V!=null?V:de)!==null&&ot!==void 0?ot:Q}),U=x.useRef(null),X=Q=>{Q&&Q.target&&Q.type==="click"&&me&&me(Q.target.value,Q,{source:"clear"}),N&&N(Q)},oe=Q=>{var ot;document.activeElement===((ot=U.current)===null||ot===void 0?void 0:ot.input)&&Q.preventDefault()},Y=Q=>{var ot,Ke;me&&me((Ke=(ot=U.current)===null||ot===void 0?void 0:ot.input)===null||Ke===void 0?void 0:Ke.value,Q,{source:"input"})},ce=Q=>{it.current||Ve||Y(Q)},Re=typeof ue=="boolean"?x.createElement(ae.Z,null):null,ee=`${_e}-button`;let fe;const z=ue||{},he=z.type&&z.type.__ANT_BUTTON===!0;he||z.type==="button"?fe=(0,J.Tm)(z,Object.assign({onMouseDown:oe,onClick:Q=>{var ot,Ke;(Ke=(ot=z==null?void 0:z.props)===null||ot===void 0?void 0:ot.onClick)===null||Ke===void 0||Ke.call(ot,Q),Y(Q)},key:"enterButton"},he?{className:ee,size:ie}:{})):fe=x.createElement(S.ZP,{className:ee,type:ue?"primary":void 0,size:ie,disabled:ze,key:"enterButton",onMouseDown:oe,onClick:Y,loading:Ve,icon:Re},ue),le&&(fe=[fe,(0,J.Tm)(le,{key:"addonAfter"})]);const Se=O()(_e,{[`${_e}-rtl`]:Ze==="rtl",[`${_e}-${ie}`]:!!ie,[`${_e}-with-button`]:!!ue},pe),De=Q=>{it.current=!0,L==null||L(Q)},et=Q=>{it.current=!1,G==null||G(Q)};return x.createElement(se.Z,Object.assign({ref:(0,xe.sQ)(U,mt),onPressEnter:ce},Le,{size:ie,onCompositionStart:De,onCompositionEnd:et,prefixCls:R,addonAfter:fe,suffix:ge,onChange:X,className:Se,disabled:ze}))}),Oe=f(1643);const ke=se.Z;ke.Group=Ce,ke.Search=T,ke.TextArea=Oe.Z,ke.Password=Et;var Be=ke},9937:function(nn,Te,f){"use strict";f.d(Te,{M1:function(){return A},TM:function(){return J},Xy:function(){return Ce},bi:function(){return Me},e5:function(){return ae},ik:function(){return B},nz:function(){return v},pU:function(){return F},s7:function(){return xe},x0:function(){return y}});var P=f(17313),O=f(74207),x=f(37613),W=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}),Ce=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})))}),se=S=>{const{paddingBlockLG:c,fontSizeLG:b,lineHeightLG:M,borderRadiusLG:k,paddingInlineLG:T}=S;return{padding:`${c}px ${T}px`,fontSize:b,lineHeight:M,borderRadius:k}},y=S=>({padding:`${S.paddingBlockSM}px ${S.paddingInlineSM}px`,borderRadius:S.borderRadiusSM}),Me=(S,c)=>{const{componentCls:b,colorError:M,colorWarning:k,errorActiveShadow:T,warningActiveShadow:Oe,colorErrorBorderHover:ke,colorWarningBorderHover:Be}=S;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:M,"&:hover":{borderColor:ke},"&:focus, &-focused":Object.assign({},A((0,x.TS)(S,{activeBorderColor:M,activeShadow:T}))),[`${b}-prefix, ${b}-suffix`]:{color:M}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:k,"&:hover":{borderColor:Be},"&:focus, &-focused":Object.assign({},A((0,x.TS)(S,{activeBorderColor:k,activeShadow:Oe}))),[`${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({},Ce(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({},se(S)),"&-sm":Object.assign({},y(S)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),xe=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({},se(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}}}})}},Pe=S=>{const{componentCls:c,controlHeightSM:b,lineWidth:M}=S,T=(b-M*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,P.Wf)(S)),B(S)),Me(S,c)),{'&[type="color"]':{height:S.controlHeight,[`&${c}-lg`]:{height:S.controlHeightLG},[`&${c}-sm`]:{height:b,paddingTop:T,paddingBottom:T}},'&[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:M,motionDurationSlow:k,colorIcon:T,colorIconHover:Oe,iconCls:ke}=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:M},"&-show-count-has-suffix":{marginInlineEnd:S.paddingXXS},"&-prefix":{marginInlineEnd:b},"&-suffix":{marginInlineStart:b}}}),q(S)),{[`${ke}${c}-password-icon`]:{color:T,cursor:"pointer",transition:`all ${k}`,"&:hover":{color:Oe}}}),Me(S,`${c}-affix-wrapper`))}},nt=S=>{const{componentCls:c,colorError:b,colorWarning:M,borderRadiusLG:k,borderRadiusSM:T}=S;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,P.Wf)(S)),xe(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:T}},"&-status-error":{[`${c}-group-addon`]:{color:b,borderColor:b}},"&-status-warning":{[`${c}-group-addon`]:{color:M,borderColor:M}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},Ce(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}}}})}},bt=S=>{const{componentCls:c,antCls:b}=S,M=`${c}-search`;return{[M]:{[`${c}`]:{"&:hover, &:focus":{borderColor:S.colorPrimaryHover,[`+ ${c}-group-addon ${M}-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,[`${M}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${M}-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}}}},[`${M}-button`]:{height:S.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${M}-button`]:{height:S.controlHeightLG},[`&-small ${M}-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}}}}},Et=S=>{const{componentCls:c,paddingLG:b}=S,M=`${c}-textarea`;return{[M]:{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${M}-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},[`${M}-suffix`]:{position:"absolute",top:0,insetInlineEnd:S.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function ae(S){return(0,x.TS)(S,{inputAffixPadding:S.paddingXXS})}const J=S=>{const{controlHeight:c,fontSize:b,lineHeight:M,lineWidth:k,controlHeightSM:T,controlHeightLG:Oe,fontSizeLG:ke,lineHeightLG:Be,paddingSM:Ie,controlPaddingHorizontalSM:mt,controlPaddingHorizontal:Qe,colorFillAlter:Je,colorPrimaryHover:pe,controlOutlineWidth:V,controlOutline:ge,colorErrorOutline:ue,colorWarningOutline:le}=S;return{paddingBlock:Math.max(Math.round((c-b*M)/2*10)/10-k,3),paddingBlockSM:Math.max(Math.round((T-b*M)/2*10)/10-k,0),paddingBlockLG:Math.ceil((Oe-ke*Be)/2*10)/10-k,paddingInline:Ie-k,paddingInlineSM:mt-k,paddingInlineLG:Qe-k,addonBg:Je,activeBorderColor:pe,hoverBorderColor:pe,activeShadow:`0 0 0 ${V}px ${ge}`,errorActiveShadow:`0 0 0 ${V}px ${ue}`,warningActiveShadow:`0 0 0 ${V}px ${le}`}};Te.ZP=(0,W.Z)("Input",S=>{const c=(0,x.TS)(S,ae(S));return[Pe(c),Et(c),qe(c),nt(c),bt(c),(0,O.c)(c)]},J)},57809:function(nn,Te,f){"use strict";var P=f(92310),O=f.n(P),x=f(77861),W=f(2738),v=f(59301),F=f(53487),A=f(62892),Ce=f(19080),se=f(36355),y=f(1684),Me=f(93891),B=f(19716),xe=f(32441),Pe=f(33234),q=f(14154),qe=f(58582),nt=f(84443),bt=f(66339),Et=function(b,M){var k={};for(var T in b)Object.prototype.hasOwnProperty.call(b,T)&&M.indexOf(T)<0&&(k[T]=b[T]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,T=Object.getOwnPropertySymbols(b);Oe<T.length;Oe++)M.indexOf(T[Oe])<0&&Object.prototype.propertyIsEnumerable.call(b,T[Oe])&&(k[T[Oe]]=b[T[Oe]]);return k};const ae="SECRET_COMBOBOX_MODE_DO_NOT_USE",J=(b,M)=>{var k,{prefixCls:T,bordered:Oe=!0,className:ke,rootClassName:Be,getPopupContainer:Ie,popupClassName:mt,dropdownClassName:Qe,listHeight:Je=256,placement:pe,listItemHeight:V=24,size:ge,disabled:ue,notFoundContent:le,status:Ve,builtinPlacements:ze,dropdownMatchSelectWidth:me,popupMatchSelectWidth:N,direction:L,style:G,allowClear:Le}=b,rt=Et(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:it,renderEmpty:_e,direction:R,virtual:de,popupMatchSelectWidth:ie,popupOverflow:U,select:X}=v.useContext(se.E_),oe=it("select",T),Y=it(),ce=L!=null?L:R,{compactSize:Re,compactItemClassnames:ee}=(0,Pe.ri)(oe,ce),[fe,z]=(0,q.Z)(oe),he=v.useMemo(()=>{const{mode:In}=rt;if(In!=="combobox")return In===ae?"combobox":In},[rt.mode]),Se=he==="multiple"||he==="tags",De=(0,nt.Z)(rt.suffixIcon,rt.showArrow),et=(k=N!=null?N:me)!==null&&k!==void 0?k:ie,{status:Q,hasFeedback:ot,isFormItemInput:Ke,feedbackIcon:ft}=v.useContext(xe.aM),pt=(0,Ce.F)(Q,Ve);let rn;le!==void 0?rn=le:he==="combobox"?rn=null:rn=(_e==null?void 0:_e("Select"))||v.createElement(Me.Z,{componentName:"Select"});const{suffixIcon:Zt,itemIcon:At,removeIcon:Dt,clearIcon:Xt}=(0,bt.Z)(Object.assign(Object.assign({},rt),{multiple:Se,hasFeedback:ot,feedbackIcon:ft,showSuffixIcon:De,prefixCls:oe,showArrow:rt.showArrow,componentName:"Select"})),Yt=Le===!0?{clearIcon:Xt}:Le,sn=(0,W.Z)(rt,["suffixIcon","itemIcon"]),xn=O()(mt||Qe,{[`${oe}-dropdown-${ce}`]:ce==="rtl"},Be,z),un=(0,B.Z)(In=>{var Cn;return(Cn=ge!=null?ge:Re)!==null&&Cn!==void 0?Cn:In}),$n=v.useContext(y.Z),Bn=ue!=null?ue:$n,pn=O()({[`${oe}-lg`]:un==="large",[`${oe}-sm`]:un==="small",[`${oe}-rtl`]:ce==="rtl",[`${oe}-borderless`]:!Oe,[`${oe}-in-form-item`]:Ke},(0,Ce.Z)(oe,pt,ot),ee,X==null?void 0:X.className,ke,Be,z),Ln=v.useMemo(()=>pe!==void 0?pe:ce==="rtl"?"bottomRight":"bottomLeft",[pe,ce]),wn=(0,qe.Z)(ze,U);return fe(v.createElement(x.ZP,Object.assign({ref:M,virtual:de,showSearch:X==null?void 0:X.showSearch},sn,{style:Object.assign(Object.assign({},X==null?void 0:X.style),G),dropdownMatchSelectWidth:et,builtinPlacements:wn,transitionName:(0,A.m)(Y,"slide-up",rt.transitionName),listHeight:Je,listItemHeight:V,mode:he,prefixCls:oe,placement:Ln,direction:ce,suffixIcon:Zt,menuItemSelectedIcon:At,removeIcon:Dt,allowClear:Yt,notFoundContent:rn,className:pn,getPopupContainer:Ie||Ze,dropdownClassName:xn,disabled:Bn})))},S=v.forwardRef(J),c=(0,F.Z)(S);S.SECRET_COMBOBOX_MODE_DO_NOT_USE=ae,S.Option=x.Wx,S.OptGroup=x.Xo,S._InternalPanelDoNotUseOrYouWillBeFired=c,Te.default=S},14154:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return S}});var P=f(17313),O=f(74207),x=f(37613),W=f(83116),v=f(13826),F=f(92899);const A=c=>{const{optionHeight:b,optionFontSize:M,optionLineHeight:k,optionPadding:T}=c;return{position:"relative",display:"block",minHeight:b,padding:T,color:c.colorText,fontWeight:"normal",fontSize:M,lineHeight:k,boxSizing:"border-box"}};var se=c=>{const{antCls:b,componentCls:M}=c,k=`${M}-item`,T=`&${b}-slide-up-enter${b}-slide-up-enter-active`,Oe=`&${b}-slide-up-appear${b}-slide-up-appear-active`,ke=`&${b}-slide-up-leave${b}-slide-up-leave-active`,Be=`${M}-dropdown-placement-`;return[{[`${M}-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,[`
|
|
|
${T}${Be}bottomLeft,
|
|
|
${Oe}${Be}bottomLeft
|
|
|
`]:{animationName:v.fJ},[`
|
|
|
${T}${Be}topLeft,
|
|
|
${Oe}${Be}topLeft,
|
|
|
${T}${Be}topRight,
|
|
|
${Oe}${Be}topRight
|
|
|
`]:{animationName:v.Qt},[`${ke}${Be}bottomLeft`]:{animationName:v.Uw},[`
|
|
|
${ke}${Be}topLeft,
|
|
|
${ke}${Be}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,Me=c=>{let{controlHeightSM:b,controlHeight:M,lineWidth:k}=c;const T=(M-b)/2-k,Oe=Math.ceil(T/2);return[T,Oe]};function B(c,b){const{componentCls:M,iconCls:k}=c,T=`${M}-selection-overflow`,Oe=c.multipleSelectItemHeight,[ke]=Me(c),Be=b?`${M}-${b}`:"";return{[`${M}-multiple${Be}`]:{fontSize:c.fontSize,[T]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${M}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${ke-y}px ${y*2}px`,borderRadius:c.borderRadius,[`${M}-show-search&`]:{cursor:"text"},[`${M}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${y}px 0`,lineHeight:`${Oe}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${M}-show-arrow ${M}-selector,
|
|
|
&${M}-allow-clear ${M}-selector
|
|
|
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${M}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Oe,marginTop:y,marginBottom:y,lineHeight:`${Oe-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,[`${M}-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}})},[`${T}-item + ${T}-item`]:{[`${M}-selection-search`]:{marginInlineStart:0}},[`${M}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-ke,"\n &-input,\n &-mirror\n ":{height:Oe,fontFamily:c.fontFamily,lineHeight:`${Oe}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"}},[`${M}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var Pe=c=>{const{componentCls:b}=c,M=(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}),[,T]=Me(c);return[B(c),B(M,"sm"),{[`${b}-multiple${b}-sm`]:{[`${b}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${b}-selection-search`]:{marginInlineStart:T}}},B(k,"lg")]};function q(c,b){const{componentCls:M,inputPaddingHorizontalBase:k,borderRadius:T}=c,Oe=c.controlHeight-c.lineWidth*2,ke=Math.ceil(c.fontSize*1.25),Be=b?`${M}-${b}`:"";return{[`${M}-single${Be}`]:{fontSize:c.fontSize,[`${M}-selector`]:Object.assign(Object.assign({},(0,P.Wf)(c)),{display:"flex",borderRadius:T,[`${M}-selection-search`]:{position:"absolute",top:0,insetInlineStart:k,insetInlineEnd:k,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${M}-selection-item,
|
|
|
${M}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${Oe}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Oe}px`}},[`${M}-selection-item`]:{position:"relative",userSelect:"none"},[`${M}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${M}-selection-item:after`,`${M}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${M}-show-arrow ${M}-selection-item,
|
|
|
&${M}-show-arrow ${M}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:ke},[`&${M}-open ${M}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${M}-customize-input)`]:{[`${M}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${k}px`,[`${M}-selection-search-input`]:{height:Oe},"&:after":{lineHeight:`${Oe}px`}}},[`&${M}-customize-input`]:{[`${M}-selector`]:{"&:after":{display:"none"},[`${M}-selection-search`]:{position:"static",width:"100%"},[`${M}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${k}px`,"&:after":{display:"none"}}}}}}}function qe(c){const{componentCls:b}=c,M=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:M,insetInlineEnd:M},[`${b}-selector`]:{padding:`0 ${M}px`},[`&${b}-show-arrow ${b}-selection-search`]:{insetInlineEnd:M+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 nt=c=>{const{componentCls:b,selectorBg:M}=c;return{position:"relative",backgroundColor:M,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"}}}},bt=function(c,b){let M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:k,borderHoverColor:T,outlineColor:Oe,antCls:ke}=b,Be=M?{[`${k}-selector`]:{borderColor:T}}:{};return{[c]:{[`&:not(${k}-disabled):not(${k}-customize-input):not(${ke}-pagination-size-changer)`]:Object.assign(Object.assign({},Be),{[`${k}-focused& ${k}-selector`]:{borderColor:T,boxShadow:`0 0 0 ${b.controlOutlineWidth}px ${Oe}`,outline:0},[`&:hover ${k}-selector`]:{borderColor:T}})}}},Et=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"}}}},ae=c=>{const{componentCls:b,inputPaddingHorizontalBase:M,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({},nt(c)),Et(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:M,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:M,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:M+c.fontSize+c.paddingXS}}}},J=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%"}}},ae(c),qe(c),Pe(c),se(c),{[`${b}-rtl`]:{direction:"rtl"}},bt(b,(0,x.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),bt(`${b}-status-error`,(0,x.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),bt(`${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,W.Z)("Select",(c,b)=>{let{rootPrefixCls:M}=b;const k=(0,x.TS)(c,{rootPrefixCls:M,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[J(k)]},c=>{const{fontSize:b,lineHeight:M,controlHeight:k,controlPaddingHorizontal:T,zIndexPopupBase:Oe,colorText:ke,fontWeightStrong:Be,controlItemBgActive:Ie,controlItemBgHover:mt,colorBgContainer:Qe,colorFillSecondary:Je,controlHeightLG:pe,controlHeightSM:V,colorBgContainerDisabled:ge,colorTextDisabled:ue}=c;return{zIndexPopup:Oe+50,optionSelectedColor:ke,optionSelectedFontWeight:Be,optionSelectedBg:Ie,optionActiveBg:mt,optionPadding:`${(k-b*M)/2}px ${T}px`,optionFontSize:b,optionLineHeight:M,optionHeight:k,selectorBg:Qe,clearBg:Qe,singleItemHeightLG:pe,multipleItemBg:Je,multipleItemBorderColor:"transparent",multipleItemHeight:V,multipleItemHeightLG:k,multipleSelectorBgDisabled:ge,multipleItemColorDisabled:ue,multipleItemBorderColorDisabled:"transparent"}})},58582:function(nn,Te,f){"use strict";f.d(Te,{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,W){return x||P(W)}},84443:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return P}});function P(O,x){return x!==void 0?x:O!==null}},66339:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return Ce}});var P=f(40001),O=f(19248),x=f(99267),W=f(84105),v=f(58617),F=f(47472),A=f(59301);function Ce(se){let{suffixIcon:y,clearIcon:Me,menuItemSelectedIcon:B,removeIcon:xe,loading:Pe,multiple:q,hasFeedback:qe,prefixCls:nt,showSuffixIcon:bt,feedbackIcon:Et,showArrow:ae,componentName:J}=se;const S=Me!=null?Me:A.createElement(O.Z,null),c=T=>y===null&&!qe&&!ae?null:A.createElement(A.Fragment,null,bt!==!1&&T,qe&&Et);let b=null;if(y!==void 0)b=c(y);else if(Pe)b=c(A.createElement(v.Z,{spin:!0}));else{const T=`${nt}-suffix`;b=Oe=>{let{open:ke,showSearch:Be}=Oe;return c(ke&&Be?A.createElement(F.Z,{className:T}):A.createElement(W.Z,{className:T}))}}let M=null;B!==void 0?M=B:q?M=A.createElement(P.Z,null):M=null;let k=null;return xe!==void 0?k=xe:k=A.createElement(x.Z,null),{clearIcon:S,suffixIcon:b,itemIcon:M,removeIcon:k}}},8378:function(nn,Te){"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`}}});Te.Z=f},92899:function(nn,Te,f){"use strict";f.d(Te,{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}}),W=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}}),Ce=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}}),se=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}}),Me={"move-up":{inKeyframes:se,outKeyframes:y},"move-down":{inKeyframes:x,outKeyframes:W},"move-left":{inKeyframes:v,outKeyframes:F},"move-right":{inKeyframes:A,outKeyframes:Ce}},B=(xe,Pe)=>{const{antCls:q}=xe,qe=`${q}-${Pe}`,{inKeyframes:nt,outKeyframes:bt}=Me[Pe];return[(0,O.R)(qe,nt,bt,xe.motionDurationMid),{[`
|
|
|
${qe}-enter,
|
|
|
${qe}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:xe.motionEaseOutCirc},[`${qe}-leave`]:{animationTimingFunction:xe.motionEaseInOutCirc}}]}},13826:function(nn,Te,f){"use strict";f.d(Te,{Qt:function(){return v},Uw:function(){return W},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}}),W=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}}),Ce=new P.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),se=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}}),Me={"slide-up":{inKeyframes:x,outKeyframes:W},"slide-down":{inKeyframes:v,outKeyframes:F},"slide-left":{inKeyframes:A,outKeyframes:Ce},"slide-right":{inKeyframes:se,outKeyframes:y}},B=(xe,Pe)=>{const{antCls:q}=xe,qe=`${q}-${Pe}`,{inKeyframes:nt,outKeyframes:bt}=Me[Pe];return[(0,O.R)(qe,nt,bt,xe.motionDurationMid),{[`
|
|
|
${qe}-enter,
|
|
|
${qe}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:xe.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${qe}-leave`]:{animationTimingFunction:xe.motionEaseInQuint}}]}},89780:function(nn){(function(Te,f){nn.exports=f()})(this,function(){"use strict";var Te=navigator.userAgent,f=navigator.platform,P=/gecko\/\d/i.test(Te),O=/MSIE \d/.test(Te),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Te),W=/Edge\/(\d+)/.exec(Te),v=O||x||W,F=v&&(O?document.documentMode||6:+(W||x)[1]),A=!W&&/WebKit\//.test(Te),Ce=A&&/Qt\/\d+\.\d+/.test(Te),se=!W&&/Chrome\//.test(Te),y=/Opera\//.test(Te),Me=/Apple Computer/.test(navigator.vendor),B=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Te),xe=/PhantomJS/.test(Te),Pe=!W&&/AppleWebKit/.test(Te)&&/Mobile\/\w+/.test(Te),q=/Android/.test(Te),qe=Pe||q||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Te),nt=Pe||/Mac/.test(f),bt=/\bCrOS\b/.test(Te),Et=/win/i.test(f),ae=y&&Te.match(/Version\/(\d*\.\d*)/);ae&&(ae=Number(ae[1])),ae&&ae>=15&&(y=!1,A=!0);var J=nt&&(Ce||y&&(ae==null||ae<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 M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function k(e,t){return M(e).appendChild(t)}function T(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 Oe(e,t,r,n){var i=T(e,t,r,n);return i.setAttribute("role","presentation"),i}var ke;document.createRange?ke=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:ke=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 Be(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 Ie(){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 mt(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function Qe(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 Je=function(e){e.select()};Pe?Je=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:v&&(Je=function(e){try{e.select()}catch(t){}});function pe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function V(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 ge(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 ue=function(){this.id=null,this.f=null,this.time=0,this.handler=pe(this.onTimeout,this)};ue.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ue.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 le(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Ve=50,ze={toString:function(){return"CodeMirror.Pass"}},me={scroll:!1},N={origin:"*mouse"},L={origin:"+move"};function G(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 Le=[""];function rt(e){for(;Le.length<=e;)Le.push(Ze(Le)+" ");return Le[e]}function Ze(e){return e[e.length-1]}function it(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 de(e,t){var r;return Object.create?r=Object.create(e):(R.prototype=e,r=new R),t&&V(t,r),r}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function U(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function X(e,t){return t?t.source.indexOf("\\w")>-1&&U(e)?!0:t.test(e):U(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Y=/[\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 ce(e){return e.charCodeAt(0)>=768&&Y.test(e)}function Re(e,t,r){for(;(r<0?t>0:t<e.length)&&ce(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 fe(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 z=null;function he(e,t,r){var n;z=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:z=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:z=i)}return n!=null?n:z}var Se=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,m){this.level=u,this.from=p,this.to=m}return function(u,p){var m=p=="ltr"?"L":"R";if(u.length==0||p=="ltr"&&!n.test(u))return!1;for(var E=u.length,w=[],Z=0;Z<E;++Z)w.push(r(u.charCodeAt(Z)));for(var te=0,Ee=m;te<E;++te){var Ne=w[te];Ne=="m"?w[te]=Ee:Ee=Ne}for(var Ye=0,$e=m;Ye<E;++Ye){var tt=w[Ye];tt=="1"&&$e=="r"?w[Ye]="n":o.test(tt)&&($e=tt,tt=="r"&&(w[Ye]="R"))}for(var Ct=1,gt=w[0];Ct<E-1;++Ct){var _t=w[Ct];_t=="+"&>=="1"&&w[Ct+1]=="1"?w[Ct]="1":_t==","&>==w[Ct+1]&&(gt=="1"||gt=="n")&&(w[Ct]=gt),gt=_t}for(var Sn=0;Sn<E;++Sn){var Qn=w[Sn];if(Qn==",")w[Sn]="N";else if(Qn=="%"){var Dn=void 0;for(Dn=Sn+1;Dn<E&&w[Dn]=="%";++Dn);for(var br=Sn&&w[Sn-1]=="!"||Dn<E&&w[Dn]=="1"?"1":"N",dr=Sn;dr<Dn;++dr)w[dr]=br;Sn=Dn-1}}for(var Hn=0,hr=m;Hn<E;++Hn){var er=w[Hn];hr=="L"&&er=="1"?w[Hn]="L":o.test(er)&&(hr=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 Pn=(jn?w[jn-1]:m)=="L",vr=(Zn<E?w[Zn]:m)=="L",zi=Pn==vr?Pn?"L":"R":m,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 lr=Vr;lr<Jn;)if(l.test(w[lr])){Vr<lr&&(ir.splice(yi,0,new s(1,Vr,lr)),yi+=bi);var Wi=lr;for(++lr;lr<Jn&&l.test(w[lr]);++lr);ir.splice(yi,0,new s(2,Wi,lr)),yi+=bi,Vr=lr}else++lr;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 De(e,t){var r=e.order;return r==null&&(r=e.order=Se(e.text,t)),r}var et=[],Q=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]||et).concat(r)}};function ot(e,t){return e._handlers&&e._handlers[t]||et}function Ke(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=le(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ft(e,t){var r=ot(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 pt(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ft(e,r||t.type,e,t),Yt(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)le(r,t[n])==-1&&r.push(t[n])}function Zt(e,t){return ot(e,t).length>0}function At(e){e.prototype.on=function(t,r){Q(this,t,r)},e.prototype.off=function(t,r){Ke(this,t,r)}}function Dt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Xt(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Yt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function sn(e){Dt(e),Xt(e)}function xn(e){return e.target||e.srcElement}function un(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),nt&&e.ctrlKey&&t==1&&(t=3),t}var $n=function(){if(v&&F<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),Bn;function pn(e){if(Bn==null){var t=T("span","\u200B");k(e,T("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Bn=t.offsetWidth<=1&&t.offsetHeight>2&&!(v&&F<8))}var r=Bn?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Ln;function wn(e){if(Ln!=null)return Ln;var t=k(e,document.createTextNode("A\u062EA")),r=ke(t,0,1).getBoundingClientRect(),n=ke(t,1,2).getBoundingClientRect();return M(e),!r||r.left==r.right?!1:Ln=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/)},Cn=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},dn=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),zn=null;function Qt(e){if(zn!=null)return zn;var t=k(e,T("span","x")),r=t.getBoundingClientRect(),n=ke(t,0,1).getBoundingClientRect();return zn=Math.abs(r.left-n.left)>1}var Fn={},Wn={};function Sr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fn[e]=t}function pr(e,t){Wn[e]=t}function on(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=de(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return on("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return on("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function at(e,t){t=on(t);var r=Fn[t.name];if(!r)return at(e,"text/plain");var n=r(e,t);if(zt.hasOwnProperty(t.name)){var i=zt[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 zt={};function g(e,t){var r=zt.hasOwnProperty(e)?zt[e]:zt[e]={};V(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 _(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 d(e,t,r){return e.startState?e.startState(t,r):!0}var h=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};h.prototype.eol=function(){return this.pos>=this.string.length},h.prototype.sol=function(){return this.pos==this.lineStart},h.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},h.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},h.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},h.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},h.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},h.prototype.skipToEnd=function(){this.pos=this.string.length},h.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},h.prototype.backUp=function(e){this.pos-=e},h.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},h.prototype.indentation=function(){return ge(this.string,null,this.tabSize)-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},h.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)}},h.prototype.current=function(){return this.string.slice(this.start,this.pos)},h.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},h.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},h.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 D(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 re(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function K(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function H(e){if(e.parent==null)return null;for(var t=e.parent,r=le(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 be(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 ve(e,t){return t>=e.first&&t<e.first+e.size}function We(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function I(e,t,r){if(r===void 0&&(r=null),!(this instanceof I))return new I(e,t,r);this.line=e,this.ch=t,this.sticky=r}function j(e,t){return e.line-t.line||e.ch-t.ch}function Ue(e,t){return e.sticky==t.sticky&&j(e,t)==0}function we(e){return I(e.line,e.ch)}function je(e,t){return j(e,t)<0?t:e}function Fe(e,t){return j(e,t)<0?e:t}function dt(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 I(e.first,0);var r=e.first+e.size-1;return t.line>r?I(r,C(e,r).text.length):ye(t,C(e,t.line).text.length)}function ye(e,t){var r=e.ch;return r==null||r>t?I(e.line,t):r<0?I(e.line,0):e}function Ae(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},Ge=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Ge.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ge.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}},Ge.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ge.fromSaved=function(e,t,r){return t instanceof lt?new Ge(e,$(e.mode,t.state),r,t.lookAhead):new Ge(e,$(e.mode,t),r)},Ge.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 ut(e,t,r,n){var i=[e.state.modeGen],o={};kt(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],m=1,E=0;r.state=!0,kt(e,t.text,p.mode,r,function(w,Z){for(var te=m;E<w;){var Ee=i[m];Ee>w&&i.splice(m,1,w,i[m+1],Ee),m+=2,E=Math.min(w,Ee)}if(Z)if(p.opaque)i.splice(te,m-te,w,"overlay "+Z),m=te+2;else for(;te<m;te+=2){var Ne=i[te+1];i[te+1]=(Ne?Ne+" ":"")+"overlay "+Z}},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 Kt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Rt(e,H(t)),i=t.text.length>e.options.maxHighlightLength&&$(e.doc.mode,n.state),o=ut(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 Rt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Ge(n,!0,t);var o=Lt(e,t,r),a=o>n.first&&C(n,o-1).stateAfter,l=a?Ge.fromSaved(n,a,o):new Ge(n,d(n.mode),o);return n.iter(o,t,function(s){Nt(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 Nt(e,t,r,n){var i=e.doc.mode,o=new h(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&$t(i,r.state);!o.eol();)Ot(i,o,r.state),o.start=o.pos}function $t(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=_(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function Ot(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=_(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 qt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function jt(e,t,r,n){var i=e.doc,o=i.mode,a;t=ne(i,t);var l=C(i,t.line),s=Rt(e,t.line,r),u=new h(l.text,e.options.tabSize,s),p;for(n&&(p=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=Ot(o,u,s.state),n&&p.push(new qt(u,a,$(i.mode,s.state)));return n?p:new qt(u,a,s.state)}function Ut(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 kt(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,p=new h(t,e.options.tabSize,n),m,E=e.options.addModeClass&&[null];for(t==""&&Ut($t(r,n.state),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(l=!1,a&&Nt(e,t,n,p.pos),p.pos=t.length,m=null):m=Ut(Ot(r,p,n.state,E),o),E){var w=E[0].name;w&&(m="m-"+(m?w+" "+m:w))}if(!l||u!=m){for(;s<p.start;)s=Math.min(p.start,s+5e3),i(s,u);u=m}p.start=p.pos}for(;s<p.pos;){var Z=Math.min(p.pos,s+5e3);i(Z,u),s=Z}}function Lt(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=ge(s.text,null,e.options.tabSize);(i==null||n>p)&&(i=l-1,n=p)}return i}function wt(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 Bt=!1,It=!1;function fn(){Bt=!0}function Pt(){It=!0}function Wt(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 Gt(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 Wt(a,o.from,s?null:o.to))}}return n}function Mt(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 Wt(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function ct(e,t){if(t.full)return null;var r=ve(e,t.from.line)&&C(e,t.from.line).markedSpans,n=ve(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=j(t.from,t.to)==0,l=Un(r,i,a),s=Mt(n,o,a),u=t.text.length==1,p=Ze(t.text).length+(u?i:0);if(l)for(var m=0;m<l.length;++m){var E=l[m];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 Z=0;Z<s.length;++Z){var te=s[Z];if(te.to!=null&&(te.to+=p),te.from==null){var Ee=an(l,te.marker);Ee||(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 Ne=[l];if(!u){var Ye=t.text.length-2,$e;if(Ye>0&&l)for(var tt=0;tt<l.length;++tt)l[tt].to==null&&($e||($e=[])).push(new Wt(l[tt].marker,null,null));for(var Ct=0;Ct<Ye;++Ct)Ne.push($e);Ne.push(s)}return Ne}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 en(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(w){if(w.markedSpans)for(var Z=0;Z<w.markedSpans.length;++Z){var te=w.markedSpans[Z].marker;te.readOnly&&(!n||le(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(!(j(u.to,l.from)<0||j(u.from,l.to)>0)){var p=[s,1],m=j(u.from,l.from),E=j(u.to,l.to);(m<0||!a.inclusiveLeft&&!m)&&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 Vt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Ft(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=j(n.from,i.from)||Ft(e)-Ft(t);if(o)return-o;var a=j(n.to,i.to)||ln(e)-ln(t);return a||t.id-e.id}function mn(e,t){var r=It&&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 Tn(e){return mn(e,!0)}function Xe(e){return mn(e,!1)}function He(e,t){var r=It&&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 yt(e,t,r,n,i){var o=C(e,t),a=It&&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=j(u.from,r)||Ft(s.marker)-Ft(i),m=j(u.to,n)||ln(s.marker)-ln(i);if(!(p>=0&&m<=0||p<=0&&m>=0)&&(p<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?j(u.to,r)>=0:j(u.to,r)>0)||p>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?j(u.from,n)<=0:j(u.from,n)<0)))return!0}}}function St(e){for(var t;t=Tn(e);)e=t.find(-1,!0).line;return e}function vn(e){for(var t;t=Xe(e);)e=t.find(1,!0).line;return e}function xr(e){for(var t,r;t=Xe(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function _n(e,t){var r=C(e,t),n=St(r);return r==n?t:H(n)}function Kn(e,t){if(t>e.lastLine())return t;var r=C(e,t),n;if(!An(e,r))return t;for(;n=Xe(r);)r=n.find(1,!0).line;return H(r)+1}function An(e,t){var r=It&&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=St(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 sr(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Tn(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Xe(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=sr(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=sr(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var tr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};tr.prototype.lineNo=function(){return H(this)},At(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),Vt(e,r);var i=n?n(e):1;i!=e.height&&K(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=Oe("span",null,null,A?"padding-right: .1px":null),n={pre:Oe("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,wn(e.display.measure)&&(a=De(o,e.doc.direction))&&(n.addToken=si(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&H(o);xi(o,n,Kt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=Qe(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=Qe(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(pn(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 ft(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Qe(n.pre.className,n.textClass||"")),n}function Ir(e){var t=T("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 m=0;;){s.lastIndex=m;var E=s.exec(t),w=E?E.index-m:t.length-m;if(w){var Z=document.createTextNode(l.slice(m,m+w));v&&F<9?p.appendChild(T("span",[Z])):p.appendChild(Z),e.map.push(e.pos,e.pos+w,Z),e.col+=w,e.pos+=w}if(!E)break;m+=w+1;var te=void 0;if(E[0]==" "){var Ee=e.cm.options.tabSize,Ne=Ee-e.col%Ee;te=p.appendChild(T("span",rt(Ne),"cm-tab")),te.setAttribute("role","presentation"),te.setAttribute("cm-text"," "),e.col+=Ne}else E[0]=="\r"||E[0]==`
|
|
|
`?(te=p.appendChild(T("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(T("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 Ye=r||"";n&&(Ye+=n),i&&(Ye+=i);var $e=T("span",[p],Ye,o);if(a)for(var tt in a)a.hasOwnProperty(tt)&&tt!="style"&&tt!="class"&&$e.setAttribute(tt,a[tt]);return e.content.appendChild($e)}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 m=void 0,E=0;E<t.length&&(m=t[E],!(m.to>u&&m.from<=u));E++);if(m.to>=p)return e(r,n,i,o,a,l,s);e(r,n.slice(0,m.to-u),i,o,null,l,s),o=null,n=n.slice(m.to-u),u=m.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="",m,E,w=0,Z,te,Ee,Ne,Ye;;){if(w==s){Z=te=Ee=E="",Ye=null,Ne=null,w=1/0;for(var $e=[],tt=void 0,Ct=0;Ct<n.length;++Ct){var gt=n[Ct],_t=gt.marker;if(_t.type=="bookmark"&>.from==s&&_t.widgetNode)$e.push(_t);else if(gt.from<=s&&(gt.to==null||gt.to>s||_t.collapsed&>.to==s&>.from==s)){if(gt.to!=null&>.to!=s&&w>gt.to&&(w=gt.to,te=""),_t.className&&(Z+=" "+_t.className),_t.css&&(E=(E?E+";":"")+_t.css),_t.startStyle&>.from==s&&(Ee+=" "+_t.startStyle),_t.endStyle&>.to==w&&(tt||(tt=[])).push(_t.endStyle,gt.to),_t.title&&((Ye||(Ye={})).title=_t.title),_t.attributes)for(var Sn in _t.attributes)(Ye||(Ye={}))[Sn]=_t.attributes[Sn];_t.collapsed&&(!Ne||gn(Ne.marker,_t)<0)&&(Ne=gt)}else gt.from>s&&w>gt.from&&(w=gt.from)}if(tt)for(var Qn=0;Qn<tt.length;Qn+=2)tt[Qn+1]==w&&(te+=" "+tt[Qn]);if(!Ne||Ne.from==s)for(var Dn=0;Dn<$e.length;++Dn)Kr(t,0,$e[Dn]);if(Ne&&(Ne.from||0)==s){if(Kr(t,(Ne.to==null?l+1:Ne.to)-s,Ne.marker,Ne.from==null),Ne.to==null)return;Ne.to==s&&(Ne=!1)}}if(s>=l)break;for(var br=Math.min(l,w);;){if(p){var dr=s+p.length;if(!Ne){var Hn=dr>br?p.slice(0,br-s):p;t.addToken(t,Hn,m?m+Z:Z,Ee,s+Hn.length==w?te:"",E,Ye)}if(dr>=br){p=p.slice(br-s),s=br;break}s=dr,Ee=""}p=i.slice(o,o=r[u++]),m=Cr(r[u++],t.cm.options)}}}function Ci(e,t,r){this.line=t,this.rest=xr(t),this.size=this.rest?H(Ze(this.rest))-r+1:1,this.node=this.text=null,this.hidden=An(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 Tt(e,t){var r=e.ownsGroup;if(r)try{vt(r)}finally{Ar=null,t(r)}}var xt=null;function st(e,t){var r=ot(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ar?i=Ar.delayedCallbacks:xt?i=xt:(i=xt=[],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=xt;xt=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 ur(e){return e.node==e.text&&(e.node=T("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=ur(t);t.background=n.insertBefore(T("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?ur(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=ur(t);t.gutterBackground=T("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=ur(t),l=t.gutter=T("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(T("div",We(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(T("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=ur(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=T("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(!Be(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,T("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function $r(e,t){for(var r=xn(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,T("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 Ve-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(H(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function _o(e,t){t=St(t);var r=H(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=H(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=Jt(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 Jt(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&&ce(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&ce(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(ke(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}v&&F<11&&(u=Ht(e.display.measure,u))}else{a>0&&(s=n="right");var m;e.options.lineWrapping&&(m=o.getClientRects()).length>1?u=m[n=="right"?m.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,Z=u.bottom-t.rect.top,te=(w+Z)/2,Ee=t.view.measure.heights,Ne=0;Ne<Ee.length-1&&!(te<Ee[Ne]);Ne++);var Ye=Ne?Ee[Ne-1]:0,$e=Ee[Ne],tt={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:Ye,bottom:$e};return!u.left&&!u.right&&(tt.bogus=!0),e.options.singleCursorHeightPerLine||(tt.rtop=w,tt.rbottom=Z),tt}function Ht(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Qt(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,M(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 or(){return se&&q?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function gr(){return se&&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:gr());var s=l.left+(n=="window"?0:or());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-=or(),i-=gr();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 mr(e,t,r,n,i,o){n=n||C(e.doc,t.line),i||(i=Jr(e,n));function a(Z,te){var Ee=Pr(e,i,Z,te?"right":"left",o);return te?Ee.left=Ee.right:Ee.right=Ee.left,wr(e,n,Ee,r)}var l=De(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(Z,te,Ee){var Ne=l[te],Ye=Ne.level==1;return a(Ee?Z-1:Z,Ye!=Ee)}var m=he(l,s,u),E=z,w=p(s,m,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=I(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=be(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=He(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=De(t,e.doc.direction);if(p){var m=(e.options.lineWrapping?Kl:_l)(e,t,r,o,p,n,i);u=m.level!=1,l=u?m.from:m.to-1,s=u?m.to:m.from-1}var E=null,w=null,Z=ee(function(Ct){var gt=Pr(e,o,Ct);return gt.top+=a,gt.bottom+=a,Uo(gt,n,i,!1)?(gt.top<=i&>.left<=n&&(E=Ct,w=gt),!0):!1},l,s),te,Ee,Ne=!1;if(w){var Ye=n-w.left<w.right-n,$e=Ye==u;Z=E+($e?0:1),Ee=$e?"after":"before",te=Ye?w.left:w.right}else{!u&&(Z==s||Z==l)&&Z++,Ee=Z==0?"after":Z==t.text.length?"before":Pr(e,o,Z-(u?1:0)).bottom+a<=i==u?"after":"before";var tt=mr(e,I(r,Z,Ee),"line",t,o);te=tt.left,Ne=i<tt.top?-1:i>=tt.bottom?1:0}return Z=Re(t.text,Z,1),Ko(r,Z,Ee,Ne,n-te)}function _l(e,t,r,n,i,o,a){var l=ee(function(m){var E=i[m],w=E.level!=1;return Uo(mr(e,I(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=mr(e,I(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,m=null,E=0;E<i.length;E++){var w=i[E];if(!(w.from>=u||w.to<=s)){var Z=w.level!=1,te=Pr(e,n,Z?Math.min(u,w.to)-1:Math.max(s,w.from)).right,Ee=te<o?o-te+1e9:te-o;(!p||m>Ee)&&(p=w,m=Ee)}}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=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)fi.appendChild(document.createTextNode("x")),fi.appendChild(T("br"));fi.appendChild(document.createTextNode("x"))}k(e.measure,fi);var r=fi.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function Oi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),r=T("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(An(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&&K(n,i)})}function di(e,t,r,n){var i=e.display;if(!r&&xn(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(m){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=ge(u,u.length,e.options.tabSize)-u.length;s=I(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 cr(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)It&&_n(e.doc,t)<i.viewTo&&ei(e);else if(r<=i.viewFrom)It&&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=[]);le(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(!It||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=mr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(T("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(T("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($e,tt,Ct,gt){tt<0&&(tt=0),tt=Math.round(tt),gt=Math.round(gt),o.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+$e+`px;
|
|
|
top: `+tt+"px; width: "+(Ct==null?s-$e:Ct)+`px;
|
|
|
height: `+(gt-tt)+"px"))}function m($e,tt,Ct){var gt=C(i,$e),_t=gt.text.length,Sn,Qn;function Dn(Hn,hr){return Fr(e,I($e,Hn),"div",gt,hr)}function br(Hn,hr,er){var jn=wa(e,gt,null,Hn),Zn=hr=="ltr"==(er=="after")?"left":"right",Pn=er=="after"?jn.begin:jn.end-(/\s/.test(gt.text.charAt(jn.end-1))?2:1);return Dn(Pn,Zn)[Zn]}var dr=De(gt,i.direction);return fe(dr,tt||0,Ct==null?_t:Ct,function(Hn,hr,er,jn){var Zn=er=="ltr",Pn=Dn(Hn,Zn?"left":"right"),vr=Dn(hr-1,Zn?"right":"left"),zi=tt==null&&Hn==0,ai=Ct==null&&hr==_t,ir=jn==0,Zr=!dr||jn==dr.length-1;if(vr.top-Pn.top<=3){var Jn=(u?zi:ai)&&ir,ba=(u?ai:zi)&&Zr,Vr=Jn?l:(Zn?Pn:vr).left,yi=ba?s:(Zn?vr:Pn).right;p(Vr,Pn.top,yi-Vr,Pn.bottom)}else{var bi,lr,Wi,Sa;Zn?(bi=u&&zi&&ir?l:Pn.left,lr=u?s:br(Hn,er,"before"),Wi=u?l:br(hr,er,"after"),Sa=u&&ai&&Zr?s:vr.right):(bi=u?br(Hn,er,"before"):l,lr=!u&&zi&&ir?s:Pn.right,Wi=!u&&ai&&Zr?l:vr.left,Sa=u?br(hr,er,"after"):s),p(bi,Pn.top,lr-bi,Pn.bottom),Pn.bottom<vr.top&&p(l,Pn.bottom,null,vr.top),p(Wi,vr.top,Sa-Wi,vr.bottom)}(!Sn||Co(Pn,Sn)<0)&&(Sn=Pn),Co(vr,Sn)<0&&(Sn=vr),(!Qn||Co(Pn,Qn)<0)&&(Qn=Pn),Co(vr,Qn)<0&&(Qn=vr)}),{start:Sn,end:Qn}}var E=t.from(),w=t.to();if(E.line==w.line)m(E.line,E.ch,w.ch);else{var Z=C(i,E.line),te=C(i,w.line),Ee=St(Z)==St(te),Ne=m(E.line,E.ch,Ee?Z.text.length+1:null).end,Ye=m(w.line,Ee?0:null,w.ch).start;Ee&&(Ne.top<Ye.top-2?(p(Ne.right,Ne.top,null,Ne.bottom),p(l,Ye.top,Ye.left,Ye.bottom)):p(Ne.right,Ne.top,Ye.left-Ne.right,Ne.bottom)),Ne.bottom<Ye.top&&p(l,Ne.bottom,null,Ye.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||(ft(e,"focus",e,t),e.state.focused=!0,mt(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&&(ft(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)&&(K(i.line,a),Ta(i.line),i.rest))for(var m=0;m<i.rest.length;m++)Ta(i.rest[m]);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=be(t,n),a=be(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=be(t,Mn(C(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=be(t,Mn(C(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function kl(e,t){if(!pt(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&&!xe){var o=T("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?I(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?I(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=mr(e,t),s=!r||r==t?l:mr(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,m=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-m)>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 m=e.options.fixedGutter?0:r.gutters.offsetWidth,E=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-m,w=Hr(e)-r.gutters.offsetWidth,Z=t.right-t.left>w;return Z&&(t.right=t.left+w),t.left<10?a.scrollLeft=0:t.left<E?a.scrollLeft=Math.max(0,t.left+m-(Z?0:10)):t.right>w+E-3&&(a.scrollLeft=t.right+(Z?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=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),Q(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Q(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=nt&&!B?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ue,this.disableVert=new ue},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),Q(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&&mt(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&&Tt(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==Ie();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||ft(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&ft(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ft(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function yr(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 ar(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,pe(rs,e))}function rs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Rt(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=ut(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 m=!a||a.length!=o.styles.length||u!=p&&(!u||!p||u.bgClass!=p.bgClass||u.textClass!=p.textClass),E=0;!m&&E<a.length;++E)m=a[E]!=o.styles[E];m&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Nt(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&&yr(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){Zt(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ft.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=Ie();if(!t||!Be(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Be(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==Ie())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Be(document.body,e.anchorNode)&&Be(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)),It&&(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),M(r.cursorDiv),M(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(Z){var te=Z.nextSibling;return A&&nt&&e.display.currentWheelTarget==Z?Z.style.display="none":Z.parentNode.removeChild(Z),te}for(var s=n.view,u=n.viewFrom,p=0;p<s.length;p++){var m=s[p];if(!m.hidden)if(!m.node||m.node.parentNode!=o){var E=mo(e,m,u,r);o.insertBefore(E,a)}else{for(;a!=m.node;)a=l(a);var w=i&&t!=null&&t<=u&&m.lineNumber;m.changes&&(le(m.changes,"gutter")>-1&&(w=!1),bn(e,m,u,r)),w&&(M(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(We(e.options,u)))),a=m.node.nextSibling}u+=m.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=We(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(T("div",[T("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;M(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(T("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),cr(e),Ba(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=Oe("div",null,"CodeMirror-code"),i.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=T("div",null,"CodeMirror-cursors"),i.measure=T("div",null,"CodeMirror-measure"),i.lineMeasure=T("div",null,"CodeMirror-measure"),i.lineSpace=Oe("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=Oe("div",[i.lineSpace],"CodeMirror-lines");i.mover=T("div",[o],null,"position: relative"),i.sizer=T("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=T("div",null,null,"position: absolute; height: "+Ve+"px; width: 1px;"),i.gutters=T("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=T("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=T("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:se?Er=-.7:Me&&(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&&nt&&A){e:for(var u=t.target,p=o.view;u!=a;u=u.parentNode)for(var m=0;m<p.length;m++)if(p[m].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)&&Dt(t),o.wheelStartX=null;return}if(i&&Er!=null){var E=i*Er,w=e.doc.scrollTop,Z=w+o.wrapper.clientHeight;E<0?w=Math.max(0,w+E-50):Z=Math.min(e.doc.height,Z+E+50),ea(e,{top:w,bottom:Z})}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,Ee=a.scrollTop-o.wheelStartY,Ne=Ee&&o.wheelDY&&Ee/o.wheelDY||te&&o.wheelDX&&te/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Ne&&(Er=(Er*Mo+Ne)/(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(!Ue(r.anchor,n.anchor)||!Ue(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 cn(we(this.ranges[t].anchor),we(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(j(t,n.from())>=0&&j(e,n.to())<=0)return r}return-1};var cn=function(e,t){this.anchor=e,this.head=t};cn.prototype.from=function(){return Fe(this.anchor,this.head)},cn.prototype.to=function(){return je(this.anchor,this.head)},cn.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 j(E.from(),w.from())}),r=le(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=j(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=Fe(l.from(),a.from()),p=je(l.to(),a.to()),m=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new cn(m?p:u,m?u:p))}}return new Or(t,r)}function ti(e,t){return new Or([new cn(e,t||e)],0)}function ni(e){return e.text?I(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(j(e,t.from)<0)return e;if(j(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),I(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 cn(_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?I(r.line,e.ch-t.ch+r.ch):I(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=I(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],m=j(p.head,p.anchor)<0;n[a]=new cn(m?u:s,m?s:u)}else n[a]=new cn(s,s)}return new Or(n,e.sel.primIndex)}function oa(e){e.doc.mode=at(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&&cr(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(Ye){return r?r[Ye]:null}function o(Ye,$e,tt){_r(Ye,$e,tt,n),st(Ye,"change",Ye,t)}function a(Ye,$e){for(var tt=[],Ct=Ye;Ct<$e;++Ct)tt.push(new tr(u[Ct],i(Ct),n));return tt}var l=t.from,s=t.to,u=t.text,p=C(e,l.line),m=C(e,s.line),E=Ze(u),w=i(u.length-1),Z=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(m,m.text,w),Z&&e.remove(l.line,Z),te.length&&e.insert(l.line,te)}else if(p==m)if(u.length==1)o(p,p.text.slice(0,l.ch)+E+p.text.slice(s.ch),w);else{var Ee=a(1,u.length-1);Ee.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,Ee)}else if(u.length==1)o(p,p.text.slice(0,l.ch)+u[0]+m.text.slice(s.ch),i(0)),e.remove(l.line+1,Z);else{o(p,p.text.slice(0,l.ch)+u[0],i(0)),o(m,E+m.text.slice(s.ch),w);var Ne=a(1,u.length-1);Z>1&&e.remove(l.line+1,Z-1),e.insert(l.line+1,Ne)}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,cr(e)}function ka(e){(e.doc.direction=="rtl"?mt:b)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){yr(e,function(){ka(e),cr(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:we(t.from),to:ni(t),text:D(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),j(t.from,t.to)==0&&j(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||ft(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=ct(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 m in u)(p=m.match(/^spans_(\d+)$/))&&le(t,Number(p[1]))>-1&&(Ze(l)[m]=u[m],delete u[m])}}return n}function sa(e,t,r,n){if(n){var i=e.anchor;if(r){var o=j(t,i)<0;o!=j(r,i)<0?(i=t,t=r):o!=j(t,r)<0&&(t=r)}return new cn(i,t)}else return new cn(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 cn(ne(e,i[o].anchor),ne(e,i[o].head))},origin:r&&r.origin};return ft(e,"beforeSelectionChange",e,n),e.cm&&ft(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){(Zt(e,"beforeSelectionChange")||e.cm&&Zt(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(j(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 cn(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&&(ft(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var m=s.find(n<0?1:-1),E=void 0;if((n<0?p:u)&&(m=rl(e,m,-n,m&&m.line==t.line?o:null)),m&&m.line==t.line&&(E=j(m,r))&&(n<0?E<0:E>0))return Ti(e,m,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,I(e.first,0))}function rl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ne(e,I(t.line-1)):null:r>0&&t.ch==(n||C(e,t.line)).text.length?t.line<e.first+e.size-1?I(t.line+1,0):null:new I(t.line,t.ch+r)}function il(e){e.setSelection(I(e.firstLine(),0),I(e.lastLine()),me)}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)}),ft(e,"beforeChange",e,n),e.cm&&ft(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(!((Zt(e,"beforeChange")||e.cm&&Zt(e.cm,"beforeChange"))&&(t=ol(e,t,!0),!t))){var n=Bt&&!r&&en(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]==""&&j(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,ct(e,t));var n=[];ri(e,function(i,o){!o&&le(n,i.history)==-1&&(cl(i.history,t),n.push(i.history)),ro(i,t,null,ct(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 m=Zt(e,"beforeChange")||e.cm&&Zt(e.cm,"beforeChange"),E=function(te){var Ee=o.changes[te];if(Ee.origin=t,m&&!ol(e,Ee,!1))return l.length=0,{};p.push(la(e,Ee));var Ne=te?ia(e,Ee):Ze(l);ro(e,Ee,Ne,Ya(e,Ee)),!te&&e.cm&&e.cm.scrollIntoView({from:Ee.from,to:ni(Ee)});var Ye=[];ri(e,function($e,tt){!tt&&le(Ye,$e.history)==-1&&(cl($e.history,Ee),Ye.push($e.history)),ro($e,Ee,null,Ya($e,Ee))})},w=o.changes.length-1;w>=0;--w){var Z=E(w);if(Z)return Z.v}}}}function ll(e,t){if(t!=0&&(e.first+=t,e.sel=new Or(it(e.sel.ranges,function(i){return new cn(I(i.anchor.line+t,i.anchor.ch),I(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){cr(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:I(e.first,0),to:I(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:I(o,C(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=D(e,t.from,t.to),r||(r=ia(e,t)),e.cm?ys(e.cm,t,n):aa(e,t,n),Do(e,r,me),e.cantEdit&&Po(e,I(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=H(St(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 Z=sr(w);Z>i.maxLineLength&&(i.maxLine=w,i.maxLineLength=Z,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),wt(n,o.line),eo(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?cr(e):o.line==a.line&&t.text.length==1&&!ja(e.doc,t)?qr(e,o.line,"text"):cr(e,o.line,a.line+1,u);var p=Zt(e,"changes"),m=Zt(e,"change");if(m||p){var E={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};m&&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),j(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=I(u.from.line+n,u.from.ch),u.to=I(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,dt(e,t)):i=H(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=le(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=H(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);K(r,Math.max(0,r.height-o)),e&&(yr(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&&(An(this.doc,n)||K(n,n.height+i),r&&yr(r,function(){r.curOp.forceUpdate=!0,fl(r,n,i),st(r,"lineWidgetChanged",r,e,H(n))}))},At(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&&!An(e,a)){var s=Mn(a)<e.scrollTop;K(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:H(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),Zt(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,H(a),"text"):e&&(l.to!=null&&(i=H(a)),l.from!=null&&(n=H(a))),a.markedSpans=Gt(a.markedSpans,l),l.from==null&&this.collapsed&&!An(this.doc,a)&&e&&K(a,Ei(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=St(this.lines[s]),p=sr(u);p>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=p,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&cr(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=I(t?o:H(o),a.from),e==-1))return r;if(a.to!=null&&(n=I(t?o:H(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||yr(n,function(){var i=t.line,o=H(t.line),a=ki(n,o);if(a&&(Vn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!An(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=Tr(r)-l;s&&K(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||le(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ii.prototype.detachLine=function(e){if(this.lines.splice(le(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},At(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=j(t,r);if(n&&V(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Oe("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(yt(e,t.line,t,r,o)||t.line!=r.line&&yt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pt()}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(m){s&&o.collapsed&&!s.options.lineWrapping&&St(m)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&K(m,0),En(m,new Wt(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(m){An(e,m)&&K(m,0)}),o.clearOnEnter&&Q(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(fn(),(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)cr(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)},At(so);function Ss(e,t,r,n,i){n=V(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(I(e.first,0),e.clipPos(I(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(j(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];le(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var ws=0,fr=function(e,t,r,n,i){if(!(this instanceof fr))return new fr(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=I(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),me)};fr.prototype=de(ao.prototype,{constructor:fr,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=re(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=I(this.first,0),r=this.first+this.size-1;Di(this,{from:t,to:I(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),me)}),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=D(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(ve(this,e))return C(this,e)},getLineNumber:function(e){return H(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=C(this,e)),St(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"?I(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,Ae(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=it(this.sel.ranges,e);Qa(this,Ae(this,r),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new cn(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 cn(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=D(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=D(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&&oe(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,oe(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!ve(this,e)||(t=e,e=C(this,e),!e))return null}else if(t=H(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,I(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 fr(re(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 fr(re(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))})}),fr.prototype.eachLine=fr.prototype.iter;var vl=0;function Es(e){var t=this;if(pl(t),!(pt(t,e)||$r(t.display,e))){Dt(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(Z){return Z!=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,Z){if(t.options.allowDropFileTypes&&le(t.options.allowDropFileTypes,w.type)==-1){l();return}var te=new FileReader;te.onerror=function(){return l()},te.onload=function(){var Ee=te.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ee)){l();return}o[Z]=Ee,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 m;if(t.state.draggingText&&!t.state.draggingText.copy&&(m=t.listSelections()),Do(t.doc,ti(r,r)),m)for(var E=0;E<m.length;++E)Pi(t.doc,"",m[E].anchor,m[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(!(pt(e,t)||$r(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Me)){var r=T("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=T("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;Q(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gl(Ls)},100))}),Q(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=nt?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=it(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),(J?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(J?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&&j(o.from,Ze(n).to)<=0;){var a=n.pop();if(j(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}yr(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=Re(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 I(t.line,n,r<0?"after":"before")}function da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=De(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 m=Pr(t,p,u).top;u=ee(function(E){return Pr(t,p,E).top==m},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 I(n,u,s)}}return new I(n,i<0?r.text.length:0,i<0?"before":"after")}function Ps(e,t,r,n){var i=De(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=he(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(Ne,Ye){return ca(t,Ne instanceof I?Ne.ch:Ne,Ye)},s,u=function(Ne){return e.options.lineWrapping?(s=s||Jr(e,t),wa(e,t,s,Ne)):{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 m=a.level==1==n<0,E=l(r,m?1:-1);if(E!=null&&(m?E<=a.to&&E<=p.end:E>=a.from&&E>=p.begin)){var w=m?"before":"after";return new I(r.line,E,w)}}var Z=function(Ne,Ye,$e){for(var tt=function(Sn,Qn){return Qn?new I(r.line,l(Sn,1),"before"):new I(r.line,Sn,"after")};Ne>=0&&Ne<i.length;Ne+=Ye){var Ct=i[Ne],gt=Ye>0==(Ct.level!=1),_t=gt?$e.begin:l($e.end,-1);if(Ct.from<=_t&&_t<Ct.to||(_t=gt?Ct.from:l(Ct.to,-1),$e.begin<=_t&&_t<$e.end))return tt(_t,gt)}},te=Z(o+n,n,p);if(te)return te;var Ee=n>0?p.end:l(p.begin,-1);return Ee!=null&&!(n>0&&Ee==t.text.length)&&(te=Z(n>0?0:i.length-1,n,u(Ee)),te)?te:null}var fo={selectAll:il,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),me)},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:I(t.head.line+1,0)}:{from:t.head,to:I(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ni(e,function(t){return{from:I(t.from().line,0),to:ne(e.doc,I(t.to().line+1,0))}})},delLineLeft:function(e){return Ni(e,function(t){return{from:I(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(I(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(I(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=ge(e.getLine(o.line),o.ch,n);t.push(rt(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return yr(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 I(i.line,i.ch-1)),i.ch>0)i=new I(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),I(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 I(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),I(i.line-1,a.length-1),i,"+transpose"))}}r.push(new cn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return yr(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=St(r);return n!=r&&(t=H(n)),da(!0,e,n,t,1)}function Fs(e,t){var r=C(e.doc,t),n=vn(r);return n!=r&&(t=H(n)),da(!0,e,r,t,-1)}function Cl(e,t){var r=xl(e,t.line),n=C(e.doc,r.line),i=De(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 I(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)!=ze}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 ue;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")&&(Dt(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=Ie(),!pt(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&&!dn&&(nt?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),P&&!nt&&!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;mt(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(b(t,"CodeMirror-crosshair"),Ke(document,"keyup",r),Ke(document,"mouseover",r))}Q(document,"keyup",r),Q(document,"mouseover",r)}function Il(e){e.keyCode==16&&(this.doc.sel.shift=!1),pt(this,e)}function Ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!($r(t.display,e)||pt(t,e)||e.ctrlKey&&!e.altKey||nt&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(y&&r==ha){ha=null,Dt(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&&j(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(!(pt(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=un(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):xn(e)==r.scroller&&Dt(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)!=ze}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=bt?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=nt?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(nt?r.altKey:r.ctrlKey)),i}function _s(e,t,r,n){v?setTimeout(pe(Ra,e),0):e.curOp.focus=Ie();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&$n&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(j((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(j(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,Ke(i.wrapper.ownerDocument,"mouseup",a),Ke(i.wrapper.ownerDocument,"mousemove",l),Ke(i.scroller,"dragstart",s),Ke(i.scroller,"drop",a),o||(Dt(u),n.addNew||To(e.doc,r,null,null,n.extend),A&&!Me||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(),Q(i.wrapper.ownerDocument,"mouseup",a),Q(i.wrapper.ownerDocument,"mousemove",l),Q(i.scroller,"dragstart",s),Q(i.scroller,"drop",a),La(e),setTimeout(function(){return i.input.focus()},20)}function Ll(e,t,r){if(r=="char")return new cn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new cn(I(t.line,0),ne(e.doc,I(t.line+1,0)));var n=r(e,t);return new cn(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;Dt(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 cn(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new cn(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 m=r;function E($e){if(j(m,$e)!=0)if(m=$e,n.unit=="rectangle"){for(var tt=[],Ct=e.options.tabSize,gt=ge(C(o,r.line).text,r.ch,Ct),_t=ge(C(o,$e.line).text,$e.ch,Ct),Sn=Math.min(gt,_t),Qn=Math.max(gt,_t),Dn=Math.min(r.line,$e.line),br=Math.min(e.lastLine(),Math.max(r.line,$e.line));Dn<=br;Dn++){var dr=C(o,Dn).text,Hn=G(dr,Sn,Ct);Sn==Qn?tt.push(new cn(I(Dn,Hn),I(Dn,Hn))):dr.length>Hn&&tt.push(new cn(I(Dn,Hn),I(Dn,G(dr,Qn,Ct))))}tt.length||tt.push(new cn(r,r)),rr(o,Br(e,s.ranges.slice(0,l).concat(tt),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView($e)}else{var hr=a,er=Ll(e,$e,n.unit),jn=hr.anchor,Zn;j(er.anchor,jn)>0?(Zn=er.head,jn=Fe(hr.from(),er.anchor)):(Zn=er.anchor,jn=je(hr.to(),er.head));var Pn=s.ranges.slice(0);Pn[l]=Us(e,new cn(ne(o,jn),Zn)),rr(o,Br(e,Pn,l),N)}}var w=i.wrapper.getBoundingClientRect(),Z=0;function te($e){var tt=++Z,Ct=di(e,$e,!0,n.unit=="rectangle");if(Ct)if(j(Ct,m)!=0){e.curOp.focus=Ie(),E(Ct);var gt=Eo(i,o);(Ct.line>=gt.to||Ct.line<gt.from)&&setTimeout(Xn(e,function(){Z==tt&&te($e)}),150)}else{var _t=$e.clientY<w.top?-20:$e.clientY>w.bottom?20:0;_t&&setTimeout(Xn(e,function(){Z==tt&&(i.scroller.scrollTop+=_t,te($e))}),50)}}function Ee($e){e.state.selectingText=!1,Z=1/0,$e&&(Dt($e),i.input.focus()),Ke(i.wrapper.ownerDocument,"mousemove",Ne),Ke(i.wrapper.ownerDocument,"mouseup",Ye),o.history.lastSelOrigin=null}var Ne=Xn(e,function($e){$e.buttons===0||!un($e)?Ee($e):te($e)}),Ye=Xn(e,Ee);e.state.selectingText=Ye,Q(i.wrapper.ownerDocument,"mousemove",Ne),Q(i.wrapper.ownerDocument,"mouseup",Ye)}function Us(e,t){var r=t.anchor,n=t.head,i=C(e.doc,r.line);if(j(r,n)==0&&r.sticky==n.sticky)return t;var o=De(i);if(!o)return t;var a=he(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=he(o,n.ch,n.sticky),m=p-a||(n.ch-r.ch)*(l.level==1?-1:1);p==s-1||p==s?u=m<0:u=m>0}var E=o[s+(u?-1:0)],w=u==(E.level==1),Z=w?E.from:E.to,te=w?"after":"before";return r.ch==Z&&r.sticky==te?t:new cn(new I(r.line,Z,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&&Dt(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Zt(e,r))return Yt(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=be(e.doc,o),m=e.display.gutterSpecs[s];return ft(e,r,e,p,m.className,t),Yt(t)}}}function pa(e,t){return Tl(e,t,"gutterClick",!0)}function Dl(e,t){$r(e.display,t)||ks(e,t)||pt(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function ks(e,t){return Zt(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),cr(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(I(a,p))}a++});for(var l=o.length-1;l>=0;l--)Pi(n.doc,i,o[l],I(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",!Et),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?Q:Ke;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?(mt(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),qn(e)),Vo(e),cr(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?V(t):{},V(Fl,t,!1);var n=t.value;typeof n=="string"?n=new fr(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 ue,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;Q(t.scroller,"mousedown",Xn(e,Rl)),v&&F<11?Q(t.scroller,"dblclick",Xn(e,function(s){if(!pt(e,s)){var u=di(e,s);if(!(!u||pa(e,s)||$r(e.display,s))){Dt(s);var p=e.findWordAt(u);To(e.doc,p.anchor,p.head)}}})):Q(t.scroller,"dblclick",function(s){return pt(e,s)||Dt(s)}),Q(t.scroller,"contextmenu",function(s){return Dl(e,s)}),Q(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,m=u.top-s.top;return p*p+m*m>20*20}Q(t.scroller,"touchstart",function(s){if(!pt(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)}}),Q(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Q(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"),m;!u.prev||a(u,u.prev)?m=new cn(p,p):!u.prev.prev||a(u,u.prev.prev)?m=e.findWordAt(p):m=new cn(I(p.line,0),ne(e.doc,I(p.line+1,0))),e.setSelection(m.anchor,m.head),e.focus(),Dt(s)}i()}),Q(t.scroller,"touchcancel",i),Q(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),ft(e,"scroll",e))}),Q(t.scroller,"mousewheel",function(s){return Za(e,s)}),Q(t.scroller,"DOMMouseScroll",function(s){return Za(e,s)}),Q(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){pt(e,s)||sn(s)},over:function(s){pt(e,s)||(Is(e,s),sn(s))},start:function(s){return Os(e,s)},drop:Xn(e,Es),leave:function(s){pt(e,s)||pl(e)}};var l=t.input.getField();Q(l,"keyup",function(s){return Il.call(e,s)}),Q(l,"keydown",Xn(e,Ol)),Q(l,"keypress",Xn(e,Ml)),Q(l,"focus",function(s){return Yo(e,s)}),Q(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=Rt(e,t).state:r="prev");var a=e.options.tabSize,l=C(i,t),s=ge(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==ze||p>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?p=ge(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 m="",E=0;if(e.options.indentWithTabs)for(var w=Math.floor(p/a);w;--w)E+=a,m+=" ";if(E<p&&(m+=rt(p-E)),m!=u)return Pi(i,m,I(t,0),I(t,u.length),"+input"),l.stateAfter=null,!0;for(var Z=0;Z<i.sel.ranges.length;Z++){var te=i.sel.ranges[Z];if(te.head.line==t&&te.head.ch<u.length){var Ee=I(t,u.length);ua(i,Z,new cn(Ee,Ee));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=it(s,function(Ne){return[Ne]}));for(var m=e.curOp.updateInput,E=n.ranges.length-1;E>=0;E--){var w=n.ranges[E],Z=w.from(),te=w.to();w.empty()&&(r&&r>0?Z=I(Z.line,Z.ch-r):e.state.overwrite&&!l?te=I(te.line,Math.min(C(o,te.line).text.length,te.ch+Ze(s).length)):l&&zr&&zr.lineWise&&zr.text.join(`
|
|
|
`)==s.join(`
|
|
|
`)&&(Z=te=I(Z.line,0)));var Ee={from:Z,to:te,text:u?u[E%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Di(e.doc,Ee),st(e,"inputRead",e,Ee)}t&&!l&&Nl(e,t),Mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=m),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&&yr(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:I(i,0),head:I(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=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return A?e.style.width="1000px":e.setAttribute("wrap","off"),Pe&&(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),ft(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:ar(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++,cr(this)}),removeOverlay:ar(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++,cr(this);return}}}),indentLine:ar(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),ve(this.doc,n)&&go(this,n,i,o)}),indentSelection:ar(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 m=p;m<o;++m)go(this,m,n);var E=this.doc.sel.ranges;s.ch==0&&i.length==E.length&&E[a].from().ch>0&&ua(this.doc,a,new cn(s,E[a].to()),me)}}}),getTokenAt:function(n,i){return jt(this,n,i)},getLineTokens:function(n,i){return jt(this,I(n),i,!0)},getTokenTypeAt:function(n){n=ne(this.doc,n);var i=Kt(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 m=a._global[p];m.pred(l,this)&&le(o,m.val)==-1&&o.push(m.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=dt(o,n==null?o.first+o.size-1:n),Rt(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(),mr(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,be(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=mr(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 m=Math.max(s.wrapper.clientHeight,this.doc.height),E=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>m)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=m&&(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:ar(Ol),triggerOnKeyPress:ar(Ml),triggerOnKeyUp:Il,triggerOnMouseDown:ar(Rl),execCommand:function(n){if(fo.hasOwnProperty(n))return fo[n].call(null,this)},triggerElectric:ar(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:ar(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:ar(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 m=mr(this,u,"div");if(s==null?s=m.left:m.left=s,u=Wl(this,m,l,o),u.hitSide)break}return u},moveV:ar(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 m=mr(o,p.head,"div");p.goalColumn!=null&&(m.left=p.goalColumn),l.push(m.left);var E=Wl(o,m,n,i);return i=="page"&&p==a.sel.primary()&&Jo(o,Fr(o,E,"div").top-m.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(m){return X(m,s)}:/\s/.test(u)?function(m){return/\s/.test(m)}:function(m){return!/\s/.test(m)&&!X(m)};a>0&&p(o.charAt(a-1));)--a;for(;l<o.length&&p(o.charAt(l));)++l}return new cn(I(n.line,a),I(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?mt(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),ft(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ie()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ar(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:ar(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:I(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:ar(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,ft(this,"refresh",this)}),operation:function(n){return yr(this,n)},startOperation:function(){return gi(this)},endOperation:function(){return mi(this)},refresh:ar(function(){var n=this.display.cachedTextHeight;cr(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),ft(this,"refresh",this)}),swapDoc:ar(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}},At(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 Ye=t.line+s;return Ye<e.first||Ye>=e.first+e.size?!1:(t=new I(Ye,t.ch,t.sticky),l=C(e,Ye))}function p(Ye){var $e;if(n=="codepoint"){var tt=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(tt)?$e=null:$e=new I(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(tt>=55296&&tt<56320?2:1))),-r)}else i?$e=Ps(e.cm,l,t,r):$e=fa(l,t,r);if($e==null)if(!Ye&&u())t=da(i,e.cm,l,t.line,s);else return!1;else t=$e;return!0}if(n=="char"||n=="codepoint")p();else if(n=="column")p(!0);else if(n=="word"||n=="group")for(var m=null,E=n=="group",w=e.cm&&e.cm.getHelper(t,"wordChars"),Z=!0;!(r<0&&!p(!Z));Z=!1){var te=l.text.charAt(t.ch)||`
|
|
|
`,Ee=X(te,w)?"w":E&&te==`
|
|
|
`?"n":!E||/\s/.test(te)?null:"p";if(E&&!Z&&!Ee&&(Ee="s"),m&&m!=Ee){r<0&&(r=1,p(),t.sticky="after");break}if(Ee&&(m=Ee),r>0&&!p(!Z))break}var Ne=Po(e,t,o,a,!0);return Ue(o,Ne)&&(Ne.hitSide=!0),Ne}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 hn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ue,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};hn.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}Q(i,"paste",function(l){!o(l)||pt(n,l)||Al(l,n)||F<=11&&setTimeout(Xn(n,function(){return t.updateFromDOM()}),20)}),Q(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),Q(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),Q(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Q(i,"touchstart",function(){return r.forceCompositionEnd()}),Q(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||pt(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,me),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(),m=p.firstChild;n.display.lineSpace.insertBefore(p,n.display.lineSpace.firstChild),m.value=zr.text.join(`
|
|
|
`);var E=document.activeElement;Je(m),setTimeout(function(){n.display.lineSpace.removeChild(p),E.focus(),E==i&&r.showPrimarySelection()},50)}}Q(i,"copy",a),Q(i,"cut",a)},hn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var e=Ia(this.cm,!1);return e.focus=document.activeElement==this.div,e},hn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},hn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},hn.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&&j(Fe(o,a),n)==0&&j(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,m=p.maps?p.maps[p.maps.length-1]:p.map;u={node:m[m.length-1],offset:m[m.length-2]-m[m.length-3]}}if(!s||!u){e.removeAllRanges();return}var E=e.rangeCount&&e.getRangeAt(0),w;try{w=ke(s.node,s.offset,u.offset,u.node)}catch(Z){}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()}},hn.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)},hn.prototype.showMultipleSelections=function(e){k(this.cm.display.cursorDiv,e.cursors),k(this.cm.display.selectionDiv,e.selection)},hn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},hn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Be(this.div,t)},hn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},hn.prototype.blur=function(){this.div.blur()},hn.prototype.getField=function(){return this.div},hn.prototype.supportsTouch=function(){return!0},hn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():yr(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)},hn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},hn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(q&&se&&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&&yr(t,function(){rr(t.doc,ti(r,n),me),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},hn.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=I(n.line-1,C(e.doc,n.line-1).length)),i.ch==C(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=I(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=H(t.view[0].line),l=t.view[0].node):(a=H(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=H(t.view[s+1].line)-1,p=t.view[s+1].node.previousSibling),!l)return!1;for(var m=e.doc.splitLines(qs(e,l,p,a,u)),E=D(e.doc,I(a,0),I(u,C(e.doc,u).text.length));m.length>1&&E.length>1;)if(Ze(m)==Ze(E))m.pop(),E.pop(),u--;else if(m[0]==E[0])m.shift(),E.shift(),a++;else break;for(var w=0,Z=0,te=m[0],Ee=E[0],Ne=Math.min(te.length,Ee.length);w<Ne&&te.charCodeAt(w)==Ee.charCodeAt(w);)++w;for(var Ye=Ze(m),$e=Ze(E),tt=Math.min(Ye.length-(m.length==1?w:0),$e.length-(E.length==1?w:0));Z<tt&&Ye.charCodeAt(Ye.length-Z-1)==$e.charCodeAt($e.length-Z-1);)++Z;if(m.length==1&&E.length==1&&a==n.line)for(;w&&w>n.ch&&Ye.charCodeAt(Ye.length-Z-1)==$e.charCodeAt($e.length-Z-1);)w--,Z++;m[m.length-1]=Ye.slice(0,Ye.length-Z).replace(/^\u200b+/,""),m[0]=m[0].slice(w).replace(/\u200b+$/,"");var Ct=I(a,w),gt=I(u,E.length?Ze(E).length-Z:0);if(m.length>1||m[0]||j(Ct,gt))return Pi(e.doc,m,Ct,gt,"+input"),!0},hn.prototype.ensurePolled=function(){this.forceCompositionEnd()},hn.prototype.reset=function(){this.forceCompositionEnd()},hn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},hn.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))},hn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&yr(this.cm,function(){return cr(e.cm)})},hn.prototype.setUneditable=function(e){e.contentEditable="false"},hn.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))},hn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},hn.prototype.onContextMenu=function(){},hn.prototype.resetPosition=function(){},hn.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=De(n,e.doc.direction),a="left";if(o){var l=he(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(Z){return Z.id==w}}function p(){a&&(o+=l,s&&(o+=l),a=s=!1)}function m(w){w&&(p(),o+=w)}function E(w){if(w.nodeType==1){var Z=w.getAttribute("cm-text");if(Z){m(Z);return}var te=w.getAttribute("cm-marker"),Ee;if(te){var Ne=e.findMarks(I(n,0),I(i+1,0),u(+te));Ne.length&&(Ee=Ne[0].find(0))&&m(D(e.doc,Ee.from,Ee.to).join(l));return}if(w.getAttribute("contenteditable")=="false")return;var Ye=/^(pre|div|p|li|table|br)$/i.test(w.nodeName);if(!/^br$/i.test(w.nodeName)&&w.textContent.length==0)return;Ye&&p();for(var $e=0;$e<w.childNodes.length;$e++)E(w.childNodes[$e]);/^(pre|p)$/i.test(w.nodeName)&&(s=!0),Ye&&(a=!0)}else w.nodeType==3&&m(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(I(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||!Be(n,t))return Bi(I(H(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(I(H(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(Ee,Ne,Ye){for(var $e=-1;$e<(u?u.length:0);$e++)for(var tt=$e<0?s.map:u[$e],Ct=0;Ct<tt.length;Ct+=3){var gt=tt[Ct+2];if(gt==Ee||gt==Ne){var _t=H($e<0?e.line:e.rest[$e]),Sn=tt[Ct]+Ye;return(Ye<0||gt!=Ee)&&(Sn=tt[Ct+(Ye?1:0)]),I(_t,Sn)}}}var m=p(a,l,r);if(m)return Bi(m,i);for(var E=l.nextSibling,w=a?a.nodeValue.length-r:0;E;E=E.nextSibling){if(m=p(E,E.firstChild,0),m)return Bi(I(m.line,m.ch-w),i);w+=E.textContent.length}for(var Z=l.previousSibling,te=r;Z;Z=Z.previousSibling){if(m=p(Z,Z.firstChild,-1),m)return Bi(I(m.line,m.ch+te),i);te+=Z.textContent.length}}var Nn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ue,this.hasSelection=!1,this.composing=null};Nn.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),Pe&&(i.style.width="0px"),Q(i,"input",function(){v&&F>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),Q(i,"paste",function(a){pt(n,a)||Al(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!pt(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,me):(r.prevInput="",i.value=l.text.join(`
|
|
|
`),Je(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}Q(i,"cut",o),Q(i,"copy",o),Q(e.scroller,"paste",function(a){if(!($r(e,a)||pt(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)}}),Q(e.lineSpace,"selectstart",function(a){$r(e,a)||Dt(a)}),Q(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"})}}),Q(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Nn.prototype.createField=function(e){this.wrapper=zl(),this.textarea=this.wrapper.firstChild},Nn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Nn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Ia(e);if(e.options.moveInputWithCursor){var i=mr(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},Nn.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")},Nn.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&&Je(this.textarea),v&&F>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",v&&F>=9&&(this.hasSelection=null))}},Nn.prototype.getField=function(){return this.textarea},Nn.prototype.supportsTouch=function(){return!1},Nn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!qe||Ie()!=this.textarea))try{this.textarea.focus()}catch(e){}},Nn.prototype.blur=function(){this.textarea.blur()},Nn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Nn.prototype.receivedFocus=function(){this.slowPoll()},Nn.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Nn.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)},Nn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Cn(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||nt&&/[\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 yr(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},Nn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Nn.prototype.onKeyPress=function(){v&&F>=9&&(this.hasSelection=null),this.fastPoll()},Nn.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),me);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 m;A&&(m=window.scrollY),n.input.focus(),A&&window.scrollTo(null,m),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(),Ee="\u200B"+(te?i.value:"");i.value="\u21DA",i.value=Ee,t.prevInput=te?"":"\u200B",i.selectionStart=1,i.selectionEnd=Ee.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,Ee=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Xn(r,il)(r):te++<10?n.detectingSelectAll=setTimeout(Ee,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Ee,200)}}if(v&&F>=9&&E(),S){sn(e);var Z=function(){Ke(window,"mouseup",Z),setTimeout(w,20)};Q(window,"mouseup",Z)}else setTimeout(w,50)},Nn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Nn.prototype.setUneditable=function(){},Nn.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?V(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=Ie();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(Q(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&&(Ke(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=Ke,e.on=Q,e.wheelEventPixels=us,e.Doc=fr,e.splitLines=In,e.countColumn=ge,e.findColumn=G,e.isWordChar=U,e.Pass=ze,e.signal=ft,e.Line=tr,e.changeEnd=ni,e.scrollbarModel=Aa,e.Pos=I,e.cmpPos=j,e.modes=Fn,e.mimeModes=Wn,e.resolveMode=on,e.getMode=at,e.modeExtensions=zt,e.extendMode=g,e.copyState=$,e.startState=d,e.innerMode=_,e.commands=fo,e.keyMap=Gr,e.keyName=Sl,e.isModifierKey=yl,e.lookupKey=Ai,e.normalizeKeyMap=Ds,e.StringStream=h,e.SharedTextMarker=so,e.TextMarker=ii,e.LineWidget=lo,e.e_preventDefault=Dt,e.e_stopPropagation=Xt,e.e_stop=sn,e.addClass=mt,e.contains=Be,e.rmClass=b,e.keyNames=oi}Gs(Rn),Qs(Rn);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Ho in fr.prototype)fr.prototype.hasOwnProperty(Ho)&&le(ru,Ho)<0&&(Rn.prototype[Ho]=function(e){return function(){return e.apply(this.doc,arguments)}}(fr.prototype[Ho]));return At(fr),Rn.inputStyles={textarea:Nn,contenteditable:hn},Rn.defineMode=function(e){!Rn.defaults.mode&&e!="null"&&(Rn.defaults.mode=e),Sr.apply(this,arguments)},Rn.defineMIME=pr,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){fr.prototype[e]=t},Rn.fromTextArea=tu,nu(Rn),Rn.version="5.58.2",Rn})},93681:function(nn,Te,f){"use strict";f.r(Te),f.d(Te,{BaseInput:function(){return y},default:function(){return Et}});var P=f(67711),O=f(98506),x=f(52873),W=f(26420),v=f(92310),F=f.n(v),A=f(59301),Ce=f(5643),se=function(J){var S,c,b=J.inputElement,M=J.prefixCls,k=J.prefix,T=J.suffix,Oe=J.addonBefore,ke=J.addonAfter,Be=J.className,Ie=J.style,mt=J.disabled,Qe=J.readOnly,Je=J.focused,pe=J.triggerFocus,V=J.allowClear,ge=J.value,ue=J.handleReset,le=J.hidden,Ve=J.classes,ze=J.classNames,me=J.dataAttrs,N=J.styles,L=J.components,G=(L==null?void 0:L.affixWrapper)||"span",Le=(L==null?void 0:L.groupWrapper)||"span",rt=(L==null?void 0:L.wrapper)||"span",Ze=(L==null?void 0:L.groupAddon)||"span",it=(0,A.useRef)(null),_e=function(z){var he;(he=it.current)!==null&&he!==void 0&&he.contains(z.target)&&(pe==null||pe())},R=function(){var z;if(!V)return null;var he=!mt&&!Qe&&ge,Se="".concat(M,"-clear-icon"),De=(0,W.Z)(V)==="object"&&V!==null&&V!==void 0&&V.clearIcon?V.clearIcon:"\u2716";return A.createElement("span",{onClick:ue,onMouseDown:function(Q){return Q.preventDefault()},className:F()(Se,(z={},(0,x.Z)(z,"".concat(Se,"-hidden"),!he),(0,x.Z)(z,"".concat(Se,"-has-suffix"),!!T),z)),role:"button",tabIndex:-1},De)},de=(0,A.cloneElement)(b,{value:ge,hidden:le,className:F()((S=b.props)===null||S===void 0?void 0:S.className,!(0,Ce.X3)(J)&&!(0,Ce.He)(J)&&Be)||null,style:(0,O.Z)((0,O.Z)({},(c=b.props)===null||c===void 0?void 0:c.style),!(0,Ce.X3)(J)&&!(0,Ce.He)(J)?Ie:{})});if((0,Ce.X3)(J)){var ie,U="".concat(M,"-affix-wrapper"),X=F()(U,(ie={},(0,x.Z)(ie,"".concat(U,"-disabled"),mt),(0,x.Z)(ie,"".concat(U,"-focused"),Je),(0,x.Z)(ie,"".concat(U,"-readonly"),Qe),(0,x.Z)(ie,"".concat(U,"-input-with-clear-btn"),T&&V&&ge),ie),!(0,Ce.He)(J)&&Be,Ve==null?void 0:Ve.affixWrapper,ze==null?void 0:ze.affixWrapper),oe=(T||V)&&A.createElement("span",{className:F()("".concat(M,"-suffix"),ze==null?void 0:ze.suffix),style:N==null?void 0:N.suffix},R(),T);de=A.createElement(G,(0,P.Z)({className:X,style:(0,O.Z)((0,O.Z)({},(0,Ce.He)(J)?void 0:Ie),N==null?void 0:N.affixWrapper),hidden:!(0,Ce.He)(J)&&le,onClick:_e},me==null?void 0:me.affixWrapper,{ref:it}),k&&A.createElement("span",{className:F()("".concat(M,"-prefix"),ze==null?void 0:ze.prefix),style:N==null?void 0:N.prefix},k),(0,A.cloneElement)(b,{value:ge,hidden:null}),oe)}if((0,Ce.He)(J)){var Y="".concat(M,"-group"),ce="".concat(Y,"-addon"),Re=F()("".concat(M,"-wrapper"),Y,Ve==null?void 0:Ve.wrapper),ee=F()("".concat(M,"-group-wrapper"),Be,Ve==null?void 0:Ve.group);return A.createElement(Le,{className:ee,style:Ie,hidden:le},A.createElement(rt,{className:Re},Oe&&A.createElement(Ze,{className:ce},Oe),(0,A.cloneElement)(de,{hidden:null}),ke&&A.createElement(Ze,{className:ce},ke)))}return de},y=se,Me=f(15142),B=f(16886),xe=f(33346),Pe=f(18929),q=f(2738),qe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],nt=(0,A.forwardRef)(function(ae,J){var S=ae.autoComplete,c=ae.onChange,b=ae.onFocus,M=ae.onBlur,k=ae.onPressEnter,T=ae.onKeyDown,Oe=ae.prefixCls,ke=Oe===void 0?"rc-input":Oe,Be=ae.disabled,Ie=ae.htmlSize,mt=ae.className,Qe=ae.maxLength,Je=ae.suffix,pe=ae.showCount,V=ae.type,ge=V===void 0?"text":V,ue=ae.classes,le=ae.classNames,Ve=ae.styles,ze=(0,xe.Z)(ae,qe),me=(0,Pe.Z)(ae.defaultValue,{value:ae.value}),N=(0,B.Z)(me,2),L=N[0],G=N[1],Le=(0,A.useState)(!1),rt=(0,B.Z)(Le,2),Ze=rt[0],it=rt[1],_e=(0,A.useRef)(null),R=function(ee){_e.current&&(0,Ce.nH)(_e.current,ee)};(0,A.useImperativeHandle)(J,function(){return{focus:R,blur:function(){var ee;(ee=_e.current)===null||ee===void 0||ee.blur()},setSelectionRange:function(ee,fe,z){var he;(he=_e.current)===null||he===void 0||he.setSelectionRange(ee,fe,z)},select:function(){var ee;(ee=_e.current)===null||ee===void 0||ee.select()},input:_e.current}}),(0,A.useEffect)(function(){it(function(Re){return Re&&Be?!1:Re})},[Be]);var de=function(ee){ae.value===void 0&&G(ee.target.value),_e.current&&(0,Ce.rJ)(_e.current,ee,c)},ie=function(ee){k&&ee.key==="Enter"&&k(ee),T==null||T(ee)},U=function(ee){it(!0),b==null||b(ee)},X=function(ee){it(!1),M==null||M(ee)},oe=function(ee){G(""),R(),_e.current&&(0,Ce.rJ)(_e.current,ee,c)},Y=function(){var ee=(0,q.Z)(ae,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return A.createElement("input",(0,P.Z)({autoComplete:S},ee,{onChange:de,onFocus:U,onBlur:X,onKeyDown:ie,className:F()(ke,(0,x.Z)({},"".concat(ke,"-disabled"),Be),le==null?void 0:le.input),style:Ve==null?void 0:Ve.input,ref:_e,size:Ie,type:ge}))},ce=function(){var ee=Number(Qe)>0;if(Je||pe){var fe=(0,Ce.D7)(L),z=(0,Me.Z)(fe).length,he=(0,W.Z)(pe)==="object"?pe.formatter({value:fe,count:z,maxLength:Qe}):"".concat(z).concat(ee?" / ".concat(Qe):"");return A.createElement(A.Fragment,null,!!pe&&A.createElement("span",{className:F()("".concat(ke,"-show-count-suffix"),(0,x.Z)({},"".concat(ke,"-show-count-has-suffix"),!!Je),le==null?void 0:le.count),style:(0,O.Z)({},Ve==null?void 0:Ve.count)},he),Je)}return null};return A.createElement(y,(0,P.Z)({},ze,{prefixCls:ke,className:mt,inputElement:Y(),handleReset:oe,value:(0,Ce.D7)(L),focused:Ze,triggerFocus:R,suffix:ce(),disabled:Be,classes:ue,classNames:le,styles:Ve}))}),bt=nt,Et=bt},5643:function(nn,Te,f){"use strict";f.d(Te,{D7:function(){return v},He:function(){return P},X3:function(){return O},nH:function(){return W},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,Ce,se){if(Ce){var y=A;if(A.type==="click"){var Me=F.cloneNode(!0);y=Object.create(A,{target:{value:Me},currentTarget:{value:Me}}),Me.value="",Ce(y);return}if(se!==void 0){y=Object.create(A,{target:{value:F},currentTarget:{value:F}}),F.value=se,Ce(y);return}Ce(y)}}function W(F,A){if(F){F.focus(A);var Ce=A||{},se=Ce.cursor;if(se){var y=F.value.length;switch(se){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)}},11780:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return pe}});var P=f(67711),O=f(98506),x=f(16886),W=f(33346),v=f(59301),F=f(92310),A=f.n(F),Ce=f(29301),se=f(34280),y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Me=void 0;function B(V,ge){var ue=V.prefixCls,le=V.invalidate,Ve=V.item,ze=V.renderItem,me=V.responsive,N=V.responsiveDisabled,L=V.registerSize,G=V.itemKey,Le=V.className,rt=V.style,Ze=V.children,it=V.display,_e=V.order,R=V.component,de=R===void 0?"div":R,ie=(0,W.Z)(V,y),U=me&&!it;function X(ee){L(G,ee)}v.useEffect(function(){return function(){X(null)}},[]);var oe=ze&&Ve!==Me?ze(Ve,{index:_e}):Ze,Y;le||(Y={opacity:U?0:1,height:U?0:Me,overflowY:U?"hidden":Me,order:me?_e:Me,pointerEvents:U?"none":Me,position:U?"absolute":Me});var ce={};U&&(ce["aria-hidden"]=!0);var Re=v.createElement(de,(0,P.Z)({className:A()(!le&&ue,Le),style:(0,O.Z)((0,O.Z)({},Y),rt)},ce,ie,{ref:ge}),oe);return me&&(Re=v.createElement(Ce.Z,{onResize:function(fe){var z=fe.offsetWidth;X(z)},disabled:N},Re)),Re}var xe=v.forwardRef(B);xe.displayName="Item";var Pe=xe,q=f(6089),qe=f(4676),nt=f(16089);function bt(V){if(typeof MessageChannel=="undefined")(0,nt.Z)(V);else{var ge=new MessageChannel;ge.port1.onmessage=function(){return V()},ge.port2.postMessage(void 0)}}function Et(){var V=v.useRef(null),ge=function(le){V.current||(V.current=[],bt(function(){(0,qe.unstable_batchedUpdates)(function(){V.current.forEach(function(Ve){Ve()}),V.current=null})})),V.current.push(le)};return ge}function ae(V,ge){var ue=v.useState(ge),le=(0,x.Z)(ue,2),Ve=le[0],ze=le[1],me=(0,q.Z)(function(N){V(function(){ze(N)})});return[Ve,me]}var J=v.createContext(null),S=["component"],c=["className"],b=["className"],M=function(ge,ue){var le=v.useContext(J);if(!le){var Ve=ge.component,ze=Ve===void 0?"div":Ve,me=(0,W.Z)(ge,S);return v.createElement(ze,(0,P.Z)({},me,{ref:ue}))}var N=le.className,L=(0,W.Z)(le,c),G=ge.className,Le=(0,W.Z)(ge,b);return v.createElement(J.Provider,{value:null},v.createElement(Pe,(0,P.Z)({ref:ue,className:A()(N,G)},L,Le)))},k=v.forwardRef(M);k.displayName="RawItem";var T=k,Oe=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],ke="responsive",Be="invalidate";function Ie(V){return"+ ".concat(V.length," ...")}function mt(V,ge){var ue=V.prefixCls,le=ue===void 0?"rc-overflow":ue,Ve=V.data,ze=Ve===void 0?[]:Ve,me=V.renderItem,N=V.renderRawItem,L=V.itemKey,G=V.itemWidth,Le=G===void 0?10:G,rt=V.ssr,Ze=V.style,it=V.className,_e=V.maxCount,R=V.renderRest,de=V.renderRawRest,ie=V.suffix,U=V.component,X=U===void 0?"div":U,oe=V.itemComponent,Y=V.onVisibleChange,ce=(0,W.Z)(V,Oe),Re=rt==="full",ee=Et(),fe=ae(ee,null),z=(0,x.Z)(fe,2),he=z[0],Se=z[1],De=he||0,et=ae(ee,new Map),Q=(0,x.Z)(et,2),ot=Q[0],Ke=Q[1],ft=ae(ee,0),pt=(0,x.Z)(ft,2),rn=pt[0],Zt=pt[1],At=ae(ee,0),Dt=(0,x.Z)(At,2),Xt=Dt[0],Yt=Dt[1],sn=ae(ee,0),xn=(0,x.Z)(sn,2),un=xn[0],$n=xn[1],Bn=(0,v.useState)(null),pn=(0,x.Z)(Bn,2),Ln=pn[0],wn=pn[1],In=(0,v.useState)(null),Cn=(0,x.Z)(In,2),dn=Cn[0],zn=Cn[1],Qt=v.useMemo(function(){return dn===null&&Re?Number.MAX_SAFE_INTEGER:dn||0},[dn,he]),Fn=(0,v.useState)(!1),Wn=(0,x.Z)(Fn,2),Sr=Wn[0],pr=Wn[1],on="".concat(le,"-item"),at=Math.max(rn,Xt),zt=_e===ke,g=ze.length&&zt,$=_e===Be,_=g||typeof _e=="number"&&ze.length>_e,d=(0,v.useMemo)(function(){var ye=ze;return g?he===null&&Re?ye=ze:ye=ze.slice(0,Math.min(ze.length,De/Le)):typeof _e=="number"&&(ye=ze.slice(0,_e)),ye},[ze,Le,he,_e,g]),h=(0,v.useMemo)(function(){return g?ze.slice(Qt+1):ze.slice(d.length)},[ze,d,g,Qt]),C=(0,v.useCallback)(function(ye,Ae){var lt;return typeof L=="function"?L(ye):(lt=L&&(ye==null?void 0:ye[L]))!==null&<!==void 0?lt:Ae},[L]),D=(0,v.useCallback)(me||function(ye){return ye},[me]);function re(ye,Ae,lt){dn===ye&&(Ae===void 0||Ae===Ln)||(zn(ye),lt||(pr(ye<ze.length-1),Y==null||Y(ye)),Ae!==void 0&&wn(Ae))}function K(ye,Ae){Se(Ae.clientWidth)}function H(ye,Ae){Ke(function(lt){var Ge=new Map(lt);return Ae===null?Ge.delete(ye):Ge.set(ye,Ae),Ge})}function be(ye,Ae){Yt(Ae),Zt(Xt)}function ve(ye,Ae){$n(Ae)}function We(ye){return ot.get(C(d[ye],ye))}(0,se.Z)(function(){if(De&&typeof at=="number"&&d){var ye=un,Ae=d.length,lt=Ae-1;if(!Ae){re(0,null);return}for(var Ge=0;Ge<Ae;Ge+=1){var ut=We(Ge);if(Re&&(ut=ut||0),ut===void 0){re(Ge-1,void 0,!0);break}if(ye+=ut,lt===0&&ye<=De||Ge===lt-1&&ye+We(lt)<=De){re(lt,null);break}else if(ye+at>De){re(Ge-1,ye-ut-un+Xt);break}}ie&&We(0)+un>De&&wn(null)}},[De,ot,Xt,un,C,d]);var I=Sr&&!!h.length,j={};Ln!==null&&g&&(j={position:"absolute",left:Ln,top:0});var Ue={prefixCls:on,responsive:g,component:oe,invalidate:$},we=N?function(ye,Ae){var lt=C(ye,Ae);return v.createElement(J.Provider,{key:lt,value:(0,O.Z)((0,O.Z)({},Ue),{},{order:Ae,item:ye,itemKey:lt,registerSize:H,display:Ae<=Qt})},N(ye,Ae))}:function(ye,Ae){var lt=C(ye,Ae);return v.createElement(Pe,(0,P.Z)({},Ue,{order:Ae,key:lt,item:ye,renderItem:D,itemKey:lt,registerSize:H,display:Ae<=Qt}))},je={order:I?Qt:Number.MAX_SAFE_INTEGER,className:"".concat(on,"-rest"),registerSize:be,display:I},Fe=R||Ie,dt=de?v.createElement(J.Provider,{value:(0,O.Z)((0,O.Z)({},Ue),je)},de(h)):v.createElement(Pe,(0,P.Z)({},Ue,je),typeof Fe=="function"?Fe(h):Fe),ne=v.createElement(X,(0,P.Z)({className:A()(!$&&le,it),style:Ze,ref:ge},ce),d.map(we),_?dt:null,ie&&v.createElement(Pe,(0,P.Z)({},Ue,{responsive:zt,responsiveDisabled:!g,order:Qt,className:"".concat(on,"-suffix"),registerSize:ve,display:!0,style:j}),ie));return zt?v.createElement(Ce.Z,{onResize:K,disabled:!g},ne):ne}var Qe=v.forwardRef(mt);Qe.displayName="Overflow",Qe.Item=T,Qe.RESPONSIVE=ke,Qe.INVALIDATE=Be;var Je=Qe,pe=Je},17115:function(nn,Te,f){"use strict";f.d(Te,{ZP:function(){return A}});var P=f(16886),O=f(59301),x=f(47273),W=0,v=(0,x.Z)();function F(){var Ce;return v?(Ce=W,W+=1):Ce="TEST_OR_SSR",Ce}function A(Ce){var se=O.useState(),y=(0,P.Z)(se,2),Me=y[0],B=y[1];return O.useEffect(function(){B("rc_select_".concat(F()))},[]),Ce||Me}},77861:function(nn,Te,f){"use strict";f.d(Te,{Ac:function(){return Se},Xo:function(){return Yt},Wx:function(){return xn},ZP:function(){return _},lk:function(){return J}});var P=f(67711),O=f(15142),x=f(52873),W=f(98506),v=f(16886),F=f(33346),A=f(26420),Ce=f(18929),se=f(48736),y=f(59301),Me=f(92310),B=f.n(Me),xe=f(34280),Pe=f(49658),q=f(10228),qe=f(8654),nt=function(h){var C=h.className,D=h.customizeIcon,re=h.customizeIconProps,K=h.onMouseDown,H=h.onClick,be=h.children,ve;return typeof D=="function"?ve=D(re):ve=D,y.createElement("span",{className:C,onMouseDown:function(I){I.preventDefault(),K&&K(I)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:H,"aria-hidden":!0},ve!==void 0?ve:y.createElement("span",{className:B()(C.split(/\s+/).map(function(We){return"".concat(We,"-icon")}))},be))},bt=nt;function Et(d,h,C,D,re){var K=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,H=arguments.length>6?arguments[6]:void 0,be=arguments.length>7?arguments[7]:void 0,ve=y.useMemo(function(){if((0,A.Z)(D)==="object")return D.clearIcon;if(re)return re},[D,re]),We=y.useMemo(function(){return!!(!K&&D&&(C.length||H)&&!(be==="combobox"&&H===""))},[D,K,C.length,H,be]);return{allowClear:We,clearIcon:y.createElement(bt,{className:"".concat(d,"-clear"),onMouseDown:h,customizeIcon:ve},"\xD7")}}var ae=y.createContext(null);function J(){return y.useContext(ae)}function S(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,h=y.useState(!1),C=(0,v.Z)(h,2),D=C[0],re=C[1],K=y.useRef(null),H=function(){window.clearTimeout(K.current)};y.useEffect(function(){return H},[]);var be=function(We,I){H(),K.current=window.setTimeout(function(){re(We),I&&I()},d)};return[D,be,H]}function c(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,h=y.useRef(null),C=y.useRef(null);y.useEffect(function(){return function(){window.clearTimeout(C.current)}},[]);function D(re){(re||h.current===null)&&(h.current=re),window.clearTimeout(C.current),C.current=window.setTimeout(function(){h.current=null},d)}return[function(){return h.current},D]}function b(d,h,C,D){var re=y.useRef(null);re.current={open:h,triggerOpen:C,customizedTrigger:D},y.useEffect(function(){function K(H){var be;if(!((be=re.current)!==null&&be!==void 0&&be.customizedTrigger)){var ve=H.target;ve.shadowRoot&&H.composed&&(ve=H.composedPath()[0]||ve),re.current.open&&d().filter(function(We){return We}).every(function(We){return!We.contains(ve)&&We!==ve})&&re.current.triggerOpen(!1)}}return window.addEventListener("mousedown",K),function(){return window.removeEventListener("mousedown",K)}},[])}var M=f(26112),k=f(11780),T=function(h,C){var D,re,K=h.prefixCls,H=h.id,be=h.inputElement,ve=h.disabled,We=h.tabIndex,I=h.autoFocus,j=h.autoComplete,Ue=h.editable,we=h.activeDescendantId,je=h.value,Fe=h.maxLength,dt=h.onKeyDown,ne=h.onMouseDown,ye=h.onChange,Ae=h.onPaste,lt=h.onCompositionStart,Ge=h.onCompositionEnd,ut=h.open,Kt=h.attrs,Rt=be||y.createElement("input",null),Nt=Rt,$t=Nt.ref,Ot=Nt.props,qt=Ot.onKeyDown,jt=Ot.onChange,Ut=Ot.onMouseDown,kt=Ot.onCompositionStart,Lt=Ot.onCompositionEnd,wt=Ot.style;return(0,se.Kp)(!("maxLength"in Rt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Rt=y.cloneElement(Rt,(0,W.Z)((0,W.Z)((0,W.Z)({type:"search"},Ot),{},{id:H,ref:(0,qe.sQ)(C,$t),disabled:ve,tabIndex:We,autoComplete:j||"off",autoFocus:I,className:B()("".concat(K,"-selection-search-input"),(D=Rt)===null||D===void 0||(re=D.props)===null||re===void 0?void 0:re.className),role:"combobox","aria-label":"Search","aria-expanded":ut||!1,"aria-haspopup":"listbox","aria-owns":"".concat(H,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(H,"_list"),"aria-activedescendant":ut?we:void 0},Kt),{},{value:Ue?je:"",maxLength:Fe,readOnly:!Ue,unselectable:Ue?null:"on",style:(0,W.Z)((0,W.Z)({},wt),{},{opacity:Ue?null:0}),onKeyDown:function(It){dt(It),qt&&qt(It)},onMouseDown:function(It){ne(It),Ut&&Ut(It)},onChange:function(It){ye(It),jt&&jt(It)},onCompositionStart:function(It){lt(It),kt&&kt(It)},onCompositionEnd:function(It){Ge(It),Lt&&Lt(It)},onPaste:Ae})),Rt},Oe=y.forwardRef(T);Oe.displayName="Input";var ke=Oe;function Be(d){return Array.isArray(d)?d:d!==void 0?[d]:[]}var Ie=typeof window!="undefined"&&window.document&&window.document.documentElement,mt=Ie;function Qe(d){return d!=null}function Je(d){return!d&&d!==0}function pe(d){return["string","number"].includes((0,A.Z)(d))}function V(d){var h=void 0;return d&&(pe(d.title)?h=d.title.toString():pe(d.label)&&(h=d.label.toString())),h}function ge(d,h){mt?y.useLayoutEffect(d,h):y.useEffect(d,h)}function ue(d){var h;return(h=d.key)!==null&&h!==void 0?h:d.value}var le=function(h){h.preventDefault(),h.stopPropagation()},Ve=function(h){var C=h.id,D=h.prefixCls,re=h.values,K=h.open,H=h.searchValue,be=h.autoClearSearchValue,ve=h.inputRef,We=h.placeholder,I=h.disabled,j=h.mode,Ue=h.showSearch,we=h.autoFocus,je=h.autoComplete,Fe=h.activeDescendantId,dt=h.tabIndex,ne=h.removeIcon,ye=h.maxTagCount,Ae=h.maxTagTextLength,lt=h.maxTagPlaceholder,Ge=lt===void 0?function(Ft){return"+ ".concat(Ft.length," ...")}:lt,ut=h.tagRender,Kt=h.onToggleOpen,Rt=h.onRemove,Nt=h.onInputChange,$t=h.onInputPaste,Ot=h.onInputKeyDown,qt=h.onInputMouseDown,jt=h.onInputCompositionStart,Ut=h.onInputCompositionEnd,kt=y.useRef(null),Lt=(0,y.useState)(0),wt=(0,v.Z)(Lt,2),Bt=wt[0],It=wt[1],fn=(0,y.useState)(!1),Pt=(0,v.Z)(fn,2),Wt=Pt[0],an=Pt[1],Gt="".concat(D,"-selection"),En=K||j==="multiple"&&be===!1||j==="tags"?H:"",Un=j==="tags"||j==="multiple"&&be===!1||Ue&&(K||Wt);ge(function(){It(kt.current.scrollWidth)},[En]);function Mt(Ft,ln,gn,mn,Tn){return y.createElement("span",{className:B()("".concat(Gt,"-item"),(0,x.Z)({},"".concat(Gt,"-item-disabled"),gn)),title:V(Ft)},y.createElement("span",{className:"".concat(Gt,"-item-content")},ln),mn&&y.createElement(bt,{className:"".concat(Gt,"-item-remove"),onMouseDown:le,onClick:Tn,customizeIcon:ne},"\xD7"))}function ct(Ft,ln,gn,mn,Tn){var Xe=function(yt){le(yt),Kt(!K)};return y.createElement("span",{onMouseDown:Xe},ut({label:ln,value:Ft,disabled:gn,closable:mn,onClose:Tn}))}function ht(Ft){var ln=Ft.disabled,gn=Ft.label,mn=Ft.value,Tn=!I&&!ln,Xe=gn;if(typeof Ae=="number"&&(typeof gn=="string"||typeof gn=="number")){var He=String(Xe);He.length>Ae&&(Xe="".concat(He.slice(0,Ae),"..."))}var yt=function(vn){vn&&vn.stopPropagation(),Rt(Ft)};return typeof ut=="function"?ct(mn,Xe,ln,Tn,yt):Mt(Ft,Xe,ln,Tn,yt)}function en(Ft){var ln=typeof Ge=="function"?Ge(Ft):Ge;return Mt({title:ln},ln,!1)}var tn=y.createElement("div",{className:"".concat(Gt,"-search"),style:{width:Bt},onFocus:function(){an(!0)},onBlur:function(){an(!1)}},y.createElement(ke,{ref:ve,open:K,prefixCls:D,id:C,inputElement:null,disabled:I,autoFocus:we,autoComplete:je,editable:Un,activeDescendantId:Fe,value:En,onKeyDown:Ot,onMouseDown:qt,onChange:Nt,onPaste:$t,onCompositionStart:jt,onCompositionEnd:Ut,tabIndex:dt,attrs:(0,M.Z)(h,!0)}),y.createElement("span",{ref:kt,className:"".concat(Gt,"-search-mirror"),"aria-hidden":!0},En,"\xA0")),Vt=y.createElement(k.Z,{prefixCls:"".concat(Gt,"-overflow"),data:re,renderItem:ht,renderRest:en,suffix:tn,itemKey:ue,maxCount:ye});return y.createElement(y.Fragment,null,Vt,!re.length&&!En&&y.createElement("span",{className:"".concat(Gt,"-placeholder")},We))},ze=Ve,me=function(h){var C=h.inputElement,D=h.prefixCls,re=h.id,K=h.inputRef,H=h.disabled,be=h.autoFocus,ve=h.autoComplete,We=h.activeDescendantId,I=h.mode,j=h.open,Ue=h.values,we=h.placeholder,je=h.tabIndex,Fe=h.showSearch,dt=h.searchValue,ne=h.activeValue,ye=h.maxLength,Ae=h.onInputKeyDown,lt=h.onInputMouseDown,Ge=h.onInputChange,ut=h.onInputPaste,Kt=h.onInputCompositionStart,Rt=h.onInputCompositionEnd,Nt=h.title,$t=y.useState(!1),Ot=(0,v.Z)($t,2),qt=Ot[0],jt=Ot[1],Ut=I==="combobox",kt=Ut||Fe,Lt=Ue[0],wt=dt||"";Ut&&ne&&!qt&&(wt=ne),y.useEffect(function(){Ut&&jt(!1)},[Ut,ne]);var Bt=I!=="combobox"&&!j&&!Fe?!1:!!wt,It=Nt===void 0?V(Lt):Nt,fn=function(){if(Lt)return null;var Wt=Bt?{visibility:"hidden"}:void 0;return y.createElement("span",{className:"".concat(D,"-selection-placeholder"),style:Wt},we)};return y.createElement(y.Fragment,null,y.createElement("span",{className:"".concat(D,"-selection-search")},y.createElement(ke,{ref:K,prefixCls:D,id:re,open:j,inputElement:C,disabled:H,autoFocus:be,autoComplete:ve,editable:kt,activeDescendantId:We,value:wt,onKeyDown:Ae,onMouseDown:lt,onChange:function(Wt){jt(!0),Ge(Wt)},onPaste:ut,onCompositionStart:Kt,onCompositionEnd:Rt,tabIndex:je,attrs:(0,M.Z)(h,!0),maxLength:Ut?ye:void 0})),!Ut&&Lt?y.createElement("span",{className:"".concat(D,"-selection-item"),title:It,style:Bt?{visibility:"hidden"}:void 0},Lt.label):null,fn())},N=me;function L(d){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(d)}var G=function(h,C){var D=(0,y.useRef)(null),re=(0,y.useRef)(!1),K=h.prefixCls,H=h.open,be=h.mode,ve=h.showSearch,We=h.tokenWithEnter,I=h.autoClearSearchValue,j=h.onSearch,Ue=h.onSearchSubmit,we=h.onToggleOpen,je=h.onInputKeyDown,Fe=h.domRef;y.useImperativeHandle(C,function(){return{focus:function(){D.current.focus()},blur:function(){D.current.blur()}}});var dt=c(0),ne=(0,v.Z)(dt,2),ye=ne[0],Ae=ne[1],lt=function(wt){var Bt=wt.which;(Bt===q.Z.UP||Bt===q.Z.DOWN)&&wt.preventDefault(),je&&je(wt),Bt===q.Z.ENTER&&be==="tags"&&!re.current&&!H&&(Ue==null||Ue(wt.target.value)),L(Bt)&&we(!0)},Ge=function(){Ae(!0)},ut=(0,y.useRef)(null),Kt=function(wt){j(wt,!0,re.current)!==!1&&we(!0)},Rt=function(){re.current=!0},Nt=function(wt){re.current=!1,be!=="combobox"&&Kt(wt.target.value)},$t=function(wt){var Bt=wt.target.value;if(We&&ut.current&&/[\r\n]/.test(ut.current)){var It=ut.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Bt=Bt.replace(It,ut.current)}ut.current=null,Kt(Bt)},Ot=function(wt){var Bt=wt.clipboardData,It=Bt.getData("text");ut.current=It},qt=function(wt){var Bt=wt.target;if(Bt!==D.current){var It=document.body.style.msTouchAction!==void 0;It?setTimeout(function(){D.current.focus()}):D.current.focus()}},jt=function(wt){var Bt=ye();wt.target!==D.current&&!Bt&&be!=="combobox"&&wt.preventDefault(),(be!=="combobox"&&(!ve||!Bt)||!H)&&(H&&I!==!1&&j("",!0,!1),we())},Ut={inputRef:D,onInputKeyDown:lt,onInputMouseDown:Ge,onInputChange:$t,onInputPaste:Ot,onInputCompositionStart:Rt,onInputCompositionEnd:Nt},kt=be==="multiple"||be==="tags"?y.createElement(ze,(0,P.Z)({},h,Ut)):y.createElement(N,(0,P.Z)({},h,Ut));return y.createElement("div",{ref:Fe,className:"".concat(K,"-selector"),onClick:qt,onMouseDown:jt},kt)},Le=y.forwardRef(G);Le.displayName="Selector";var rt=Le,Ze=f(35593),it=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],_e=function(h){var C=h===!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(h,C){var D=h.prefixCls,re=h.disabled,K=h.visible,H=h.children,be=h.popupElement,ve=h.animation,We=h.transitionName,I=h.dropdownStyle,j=h.dropdownClassName,Ue=h.direction,we=Ue===void 0?"ltr":Ue,je=h.placement,Fe=h.builtinPlacements,dt=h.dropdownMatchSelectWidth,ne=h.dropdownRender,ye=h.dropdownAlign,Ae=h.getPopupContainer,lt=h.empty,Ge=h.getTriggerDOMNode,ut=h.onPopupVisibleChange,Kt=h.onPopupMouseEnter,Rt=(0,F.Z)(h,it),Nt="".concat(D,"-dropdown"),$t=be;ne&&($t=ne(be));var Ot=y.useMemo(function(){return Fe||_e(dt)},[Fe,dt]),qt=ve?"".concat(Nt,"-").concat(ve):We,jt=typeof dt=="number",Ut=y.useMemo(function(){return jt?null:dt===!1?"minWidth":"width"},[dt,jt]),kt=I;jt&&(kt=(0,W.Z)((0,W.Z)({},kt),{},{width:dt}));var Lt=y.useRef(null);return y.useImperativeHandle(C,function(){return{getPopupElement:function(){return Lt.current}}}),y.createElement(Ze.Z,(0,P.Z)({},Rt,{showAction:ut?["click"]:[],hideAction:ut?["click"]:[],popupPlacement:je||(we==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ot,prefixCls:Nt,popupTransitionName:qt,popup:y.createElement("div",{ref:Lt,onMouseEnter:Kt},$t),stretch:Ut,popupAlign:ye,popupVisible:K,getPopupContainer:Ae,popupClassName:B()(j,(0,x.Z)({},"".concat(Nt,"-empty"),lt)),popupStyle:kt,getTriggerDOMNode:Ge,onPopupVisibleChange:ut}),H)},de=y.forwardRef(R);de.displayName="SelectTrigger";var ie=de,U=f(57879);function X(d,h){var C=d.key,D;return"value"in d&&(D=d.value),C!=null?C:D!==void 0?D:"rc-index-key-".concat(h)}function oe(d,h){var C=d||{},D=C.label,re=C.value,K=C.options,H=C.groupLabel,be=D||(h?"children":"label");return{label:be,value:re||"value",options:K||"options",groupLabel:H||be}}function Y(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=h.fieldNames,D=h.childrenAsData,re=[],K=oe(C,!1),H=K.label,be=K.value,ve=K.options,We=K.groupLabel;function I(j,Ue){j.forEach(function(we){if(Ue||!(ve in we)){var je=we[be];re.push({key:X(we,re.length),groupOption:Ue,data:we,label:we[H],value:je})}else{var Fe=we[We];Fe===void 0&&D&&(Fe=we.label),re.push({key:X(we,re.length),group:!0,data:we,label:Fe}),I(we[ve],!0)}})}return I(d,!1),re}function ce(d){var h=(0,W.Z)({},d);return"props"in h||Object.defineProperty(h,"props",{get:function(){return(0,se.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),h}}),h}function Re(d,h){if(!h||!h.length)return null;var C=!1;function D(K,H){var be=(0,U.Z)(H),ve=be[0],We=be.slice(1);if(!ve)return[K];var I=K.split(ve);return C=C||I.length>1,I.reduce(function(j,Ue){return[].concat((0,O.Z)(j),(0,O.Z)(D(Ue,We)))},[]).filter(function(j){return j})}var re=D(d,h);return C?re: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"],fe=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function z(d){return d==="tags"||d==="multiple"}var he=y.forwardRef(function(d,h){var C,D,re=d.id,K=d.prefixCls,H=d.className,be=d.showSearch,ve=d.tagRender,We=d.direction,I=d.omitDomProps,j=d.displayValues,Ue=d.onDisplayValuesChange,we=d.emptyOptions,je=d.notFoundContent,Fe=je===void 0?"Not Found":je,dt=d.onClear,ne=d.mode,ye=d.disabled,Ae=d.loading,lt=d.getInputElement,Ge=d.getRawInputElement,ut=d.open,Kt=d.defaultOpen,Rt=d.onDropdownVisibleChange,Nt=d.activeValue,$t=d.onActiveValueChange,Ot=d.activeDescendantId,qt=d.searchValue,jt=d.autoClearSearchValue,Ut=d.onSearch,kt=d.onSearchSplit,Lt=d.tokenSeparators,wt=d.allowClear,Bt=d.suffixIcon,It=d.clearIcon,fn=d.OptionList,Pt=d.animation,Wt=d.transitionName,an=d.dropdownStyle,Gt=d.dropdownClassName,En=d.dropdownMatchSelectWidth,Un=d.dropdownRender,Mt=d.dropdownAlign,ct=d.placement,ht=d.builtinPlacements,en=d.getPopupContainer,tn=d.showAction,Vt=tn===void 0?[]:tn,Ft=d.onFocus,ln=d.onBlur,gn=d.onKeyUp,mn=d.onKeyDown,Tn=d.onMouseDown,Xe=(0,F.Z)(d,ee),He=z(ne),yt=(be!==void 0?be:He)||ne==="combobox",St=(0,W.Z)({},Xe);fe.forEach(function(Jt){delete St[Jt]}),I==null||I.forEach(function(Jt){delete St[Jt]});var vn=y.useState(!1),xr=(0,v.Z)(vn,2),_n=xr[0],Kn=xr[1];y.useEffect(function(){Kn((0,Pe.Z)())},[]);var An=y.useRef(null),kn=y.useRef(null),Mn=y.useRef(null),sr=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(h,function(){var Jt,Ht;return{focus:(Jt=sr.current)===null||Jt===void 0?void 0:Jt.focus,blur:(Ht=sr.current)===null||Ht===void 0?void 0:Ht.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 Jt;if(ne!=="combobox")return qt;var Ht=(Jt=j[0])===null||Jt===void 0?void 0:Jt.value;return typeof Ht=="string"||typeof Ht=="number"?String(Ht):""},[qt,ne,j]),Qr=ne==="combobox"&&typeof lt=="function"&<()||null,Ir=typeof Ge=="function"&&Ge(),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,xe.Z)(function(){xi(!0)},[]);var Ci=(0,Ce.Z)(!1,{defaultValue:Kt,value:ut}),jr=(0,v.Z)(Ci,2),Ar=jr[0],ui=jr[1],vt=Kr?Ar:!1,Tt=!Fe&&we;(ye||Tt&&vt&&ne==="combobox")&&(vt=!1);var xt=Tt?!1:vt,st=y.useCallback(function(Jt){var Ht=Jt!==void 0?Jt:!vt;ye||(ui(Ht),vt!==Ht&&(Rt==null||Rt(Ht)))},[ye,vt,ui,Rt]),yn=y.useMemo(function(){return(Lt||[]).some(function(Jt){return[`
|
|
|
`,`\r
|
|
|
`].includes(Jt)})},[Lt]),bn=function(Ht,Vn,nr){var On=!0,or=Ht;$t==null||$t(null);var gr=nr?null:Re(Ht,Lt);return ne!=="combobox"&&gr&&(or="",kt==null||kt(gr),st(!1),On=!1),Ut&&Cr!==or&&Ut(or,{source:Vn?"typing":"effect"}),On},ur=function(Ht){!Ht||!Ht.trim()||Ut(Ht,{source:"submit"})};y.useEffect(function(){!vt&&!He&&ne!=="combobox"&&bn("",!1,!1)},[vt]),y.useEffect(function(){Ar&&ye&&ui(!1),ye&&li(!1)},[ye]);var Mr=c(),Nr=(0,v.Z)(Mr,2),Gn=Nr[0],Rr=Nr[1],ci=function(Ht){var Vn=Gn(),nr=Ht.which;if(nr===q.Z.ENTER&&(ne!=="combobox"&&Ht.preventDefault(),vt||st(!0)),Rr(!!Cr),nr===q.Z.BACKSPACE&&!Vn&&He&&!Cr&&j.length){for(var On=(0,O.Z)(j),or=null,gr=On.length-1;gr>=0;gr-=1){var Ur=On[gr];if(!Ur.disabled){On.splice(gr,1),or=Ur;break}}or&&Ue(On,{type:"remove",values:[or]})}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 mr;(mr=qn.current).onKeyDown.apply(mr,[Ht].concat(kr))}mn==null||mn.apply(void 0,[Ht].concat(kr))},Zi=function(Ht){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 or;(or=qn.current).onKeyUp.apply(or,[Ht].concat(nr))}gn==null||gn.apply(void 0,[Ht].concat(nr))},mo=function(Ht){var Vn=j.filter(function(nr){return nr!==Ht});Ue(Vn,{type:"remove",values:[Ht]})},Wr=y.useRef(!1),Lr=function(){li(!0),ye||(Ft&&!Wr.current&&Ft.apply(void 0,arguments),Vt.includes("focus")&&st(!0)),Wr.current=!0},Zo=function(){li(!1,function(){Wr.current=!1,st(!1)}),!ye&&(Cr&&(ne==="tags"?Ut(Cr,{source:"submit"}):ne==="multiple"&&Ut("",{source:"blur"})),ln&&ln.apply(void 0,arguments))},Tr=[];y.useEffect(function(){return function(){Tr.forEach(function(Jt){return clearTimeout(Jt)}),Tr.splice(0,Tr.length)}},[]);var $r=function(Ht){var Vn,nr=Ht.target,On=(Vn=Mn.current)===null||Vn===void 0?void 0:Vn.getPopupElement();if(On&&On.contains(nr)){var or=setTimeout(function(){var kr=Tr.indexOf(or);if(kr!==-1&&Tr.splice(kr,1),Yr(),!_n&&!On.contains(document.activeElement)){var Fr;(Fr=sr.current)===null||Fr===void 0||Fr.focus()}});Tr.push(or)}for(var gr=arguments.length,Ur=new Array(gr>1?gr-1:0),wr=1;wr<gr;wr++)Ur[wr-1]=arguments[wr];Tn==null||Tn.apply(void 0,[Ht].concat(Ur))},wi=y.useState({}),_i=(0,v.Z)(wi,2),yo=_i[1];function Dr(){yo({})}var Hr;Ir&&(Hr=function(Ht){st(Ht)}),b(function(){var Jt;return[An.current,(Jt=Mn.current)===null||Jt===void 0?void 0:Jt.getPopupElement()]},xt,st,!!Ir);var Ki=y.useMemo(function(){return(0,W.Z)((0,W.Z)({},d),{},{notFoundContent:Fe,open:vt,triggerOpen:xt,id:re,showSearch:yt,multiple:He,toggleOpen:st})},[d,Fe,xt,vt,re,yt,He,st]),bo=!!Bt||Ae,ji;bo&&(ji=y.createElement(bt,{className:B()("".concat(K,"-arrow"),(0,x.Z)({},"".concat(K,"-arrow-loading"),Ae)),customizeIcon:Bt,customizeIconProps:{loading:Ae,searchValue:Cr,open:vt,focused:Xr,showSearch:yt}}));var _o=function(){var Ht;dt==null||dt(),(Ht=sr.current)===null||Ht===void 0||Ht.focus(),Ue([],{type:"clear",values:j}),bn("",!1,!1)},Ui=Et(K,_o,j,wt,It,ye,Cr,ne),ki=Ui.allowClear,Jr=Ui.clearIcon,Pr=y.createElement(fn,{ref:qn}),So=B()(K,H,(D={},(0,x.Z)(D,"".concat(K,"-focused"),Xr),(0,x.Z)(D,"".concat(K,"-multiple"),He),(0,x.Z)(D,"".concat(K,"-single"),!He),(0,x.Z)(D,"".concat(K,"-allow-clear"),wt),(0,x.Z)(D,"".concat(K,"-show-arrow"),bo),(0,x.Z)(D,"".concat(K,"-disabled"),ye),(0,x.Z)(D,"".concat(K,"-loading"),Ae),(0,x.Z)(D,"".concat(K,"-open"),vt),(0,x.Z)(D,"".concat(K,"-customize-input"),Qr),(0,x.Z)(D,"".concat(K,"-show-search"),yt),D)),Gi=y.createElement(ie,{ref:Mn,disabled:ye,prefixCls:K,visible:xt,popupElement:Pr,animation:Pt,transitionName:Wt,dropdownStyle:an,dropdownClassName:Gt,direction:We,dropdownMatchSelectWidth:En,dropdownRender:Un,dropdownAlign:Mt,placement:ct,builtinPlacements:ht,getPopupContainer:en,empty:we,getTriggerDOMNode:function(){return kn.current},onPopupVisibleChange:Hr,onPopupMouseEnter:Dr},Ir?y.cloneElement(Ir,{ref:Hi}):y.createElement(rt,(0,P.Z)({},d,{domRef:kn,prefixCls:K,inputElement:Qr,ref:sr,id:re,showSearch:yt,autoClearSearchValue:jt,mode:ne,activeDescendantId:Ot,tagRender:ve,values:j,open:vt,onToggleOpen:st,activeValue:Nt,searchValue:Cr,onSearch:bn,onSearchSubmit:ur,onRemove:mo,tokenWithEnter:yn}))),Vi;return Ir?Vi=Gi:Vi=y.createElement("div",(0,P.Z)({className:So},St,{ref:An,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(j.map(function(Jt){var Ht=Jt.label,Vn=Jt.value;return["number","string"].includes((0,A.Z)(Ht))?Ht:Vn}).join(", "))),Gi,ji,ki&&Jr),y.createElement(ae.Provider,{value:Ki},Vi)}),Se=he,De=function(d,h){var C=y.useRef({values:new Map,options:new Map}),D=y.useMemo(function(){var K=C.current,H=K.values,be=K.options,ve=d.map(function(j){if(j.label===void 0){var Ue;return(0,W.Z)((0,W.Z)({},j),{},{label:(Ue=H.get(j.value))===null||Ue===void 0?void 0:Ue.label})}return j}),We=new Map,I=new Map;return ve.forEach(function(j){We.set(j.value,j),I.set(j.value,h.get(j.value)||be.get(j.value))}),C.current.values=We,C.current.options=I,ve},[d,h]),re=y.useCallback(function(K){return h.get(K)||C.current.options.get(K)},[h]);return[D,re]};function et(d,h){return Be(d).join("").toUpperCase().includes(h)}var Q=function(d,h,C,D,re){return y.useMemo(function(){if(!C||D===!1)return d;var K=h.options,H=h.label,be=h.value,ve=[],We=typeof D=="function",I=C.toUpperCase(),j=We?D:function(we,je){return re?et(je[re],I):je[K]?et(je[H!=="children"?H:"label"],I):et(je[be],I)},Ue=We?function(we){return ce(we)}:function(we){return we};return d.forEach(function(we){if(we[K]){var je=j(C,Ue(we));if(je)ve.push(we);else{var Fe=we[K].filter(function(dt){return j(C,Ue(dt))});Fe.length&&ve.push((0,W.Z)((0,W.Z)({},we),{},(0,x.Z)({},K,Fe)))}return}j(C,Ue(we))&&ve.push(we)}),ve},[d,D,re,C,h])},ot=f(17115),Ke=f(11592),ft=["children","value"],pt=["children"];function rn(d){var h=d,C=h.key,D=h.props,re=D.children,K=D.value,H=(0,F.Z)(D,ft);return(0,W.Z)({key:C,value:K!==void 0?K:C,children:re},H)}function Zt(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Ke.Z)(d).map(function(C,D){if(!y.isValidElement(C)||!C.type)return null;var re=C,K=re.type.isSelectOptGroup,H=re.key,be=re.props,ve=be.children,We=(0,F.Z)(be,pt);return h||!K?rn(C):(0,W.Z)((0,W.Z)({key:"__RC_SELECT_GRP__".concat(H===null?D:H,"__"),label:H},We),{},{options:Zt(ve)})}).filter(function(C){return C})}function At(d,h,C,D,re){return y.useMemo(function(){var K=d,H=!d;H&&(K=Zt(h));var be=new Map,ve=new Map,We=function(Ue,we,je){je&&typeof je=="string"&&Ue.set(we[je],we)};function I(j){for(var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,we=0;we<j.length;we+=1){var je=j[we];!je[C.options]||Ue?(be.set(je[C.value],je),We(ve,je,C.label),We(ve,je,D),We(ve,je,re)):I(je[C.options],!0)}}return I(K),{options:K,valueOptions:be,labelOptions:ve}},[d,h,C,D,re])}function Dt(d){var h=y.useRef();h.current=d;var C=y.useCallback(function(){return h.current.apply(h,arguments)},[]);return C}var Xt=function(){return null};Xt.isSelectOptGroup=!0;var Yt=Xt,sn=function(){return null};sn.isSelectOption=!0;var xn=sn,un=f(80547),$n=f(2738),Bn=f(6790),pn=y.createContext(null),Ln=pn;function wn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var In=["disabled","title","children","style","className"];function Cn(d){return typeof d=="string"||typeof d=="number"}var dn=function(h,C){var D=J(),re=D.prefixCls,K=D.id,H=D.open,be=D.multiple,ve=D.mode,We=D.searchValue,I=D.toggleOpen,j=D.notFoundContent,Ue=D.onPopupScroll,we=y.useContext(Ln),je=we.flattenOptions,Fe=we.onActiveValue,dt=we.defaultActiveFirstOption,ne=we.onSelect,ye=we.menuItemSelectedIcon,Ae=we.rawValues,lt=we.fieldNames,Ge=we.virtual,ut=we.direction,Kt=we.listHeight,Rt=we.listItemHeight,Nt="".concat(re,"-item"),$t=(0,un.Z)(function(){return je},[H,je],function(Mt,ct){return ct[0]&&Mt[1]!==ct[1]}),Ot=y.useRef(null),qt=function(ct){ct.preventDefault()},jt=function(ct){Ot.current&&Ot.current.scrollTo(typeof ct=="number"?{index:ct}:ct)},Ut=function(ct){for(var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,en=$t.length,tn=0;tn<en;tn+=1){var Vt=(ct+tn*ht+en)%en,Ft=$t[Vt],ln=Ft.group,gn=Ft.data;if(!ln&&!gn.disabled)return Vt}return-1},kt=y.useState(function(){return Ut(0)}),Lt=(0,v.Z)(kt,2),wt=Lt[0],Bt=Lt[1],It=function(ct){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Bt(ct);var en={source:ht?"keyboard":"mouse"},tn=$t[ct];if(!tn){Fe(null,-1,en);return}Fe(tn.value,ct,en)};(0,y.useEffect)(function(){It(dt!==!1?Ut(0):-1)},[$t.length,We]);var fn=y.useCallback(function(Mt){return Ae.has(Mt)&&ve!=="combobox"},[ve,(0,O.Z)(Ae).toString(),Ae.size]);(0,y.useEffect)(function(){var Mt=setTimeout(function(){if(!be&&H&&Ae.size===1){var ht=Array.from(Ae)[0],en=$t.findIndex(function(tn){var Vt=tn.data;return Vt.value===ht});en!==-1&&(It(en),jt(en))}});if(H){var ct;(ct=Ot.current)===null||ct===void 0||ct.scrollTo(void 0)}return function(){return clearTimeout(Mt)}},[H,We,je.length]);var Pt=function(ct){ct!==void 0&&ne(ct,{selected:!Ae.has(ct)}),be||I(!1)};if(y.useImperativeHandle(C,function(){return{onKeyDown:function(ct){var ht=ct.which,en=ct.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:wn()&&en&&(ht===q.Z.N?tn=1:ht===q.Z.P&&(tn=-1)),tn!==0){var Vt=Ut(wt+tn,tn);jt(Vt),It(Vt,!0)}break}case q.Z.ENTER:{var Ft=$t[wt];Ft&&!Ft.data.disabled?Pt(Ft.value):Pt(void 0),H&&ct.preventDefault();break}case q.Z.ESC:I(!1),H&&ct.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ct){jt(ct)}}}),$t.length===0)return y.createElement("div",{role:"listbox",id:"".concat(K,"_list"),className:"".concat(Nt,"-empty"),onMouseDown:qt},j);var Wt=Object.keys(lt).map(function(Mt){return lt[Mt]}),an=function(ct){return ct.label};function Gt(Mt,ct){var ht=Mt.group;return{role:ht?"presentation":"option",id:"".concat(K,"_list_").concat(ct)}}var En=function(ct){var ht=$t[ct];if(!ht)return null;var en=ht.data||{},tn=en.value,Vt=ht.group,Ft=(0,M.Z)(en,!0),ln=an(ht);return ht?y.createElement("div",(0,P.Z)({"aria-label":typeof ln=="string"&&!Vt?ln:null},Ft,{key:ct},Gt(ht,ct),{"aria-selected":fn(tn)}),tn):null},Un={role:"listbox",id:"".concat(K,"_list")};return y.createElement(y.Fragment,null,Ge&&y.createElement("div",(0,P.Z)({},Un,{style:{height:0,width:0,overflow:"hidden"}}),En(wt-1),En(wt),En(wt+1)),y.createElement(Bn.Z,{itemKey:"key",ref:Ot,data:$t,height:Kt,itemHeight:Rt,fullHeight:!1,onMouseDown:qt,onScroll:Ue,virtual:Ge,direction:ut,innerProps:Ge?null:Un},function(Mt,ct){var ht,en=Mt.group,tn=Mt.groupOption,Vt=Mt.data,Ft=Mt.label,ln=Mt.value,gn=Vt.key;if(en){var mn,Tn=(mn=Vt.title)!==null&&mn!==void 0?mn:Cn(Ft)?Ft.toString():void 0;return y.createElement("div",{className:B()(Nt,"".concat(Nt,"-group")),title:Tn},Ft!==void 0?Ft:gn)}var Xe=Vt.disabled,He=Vt.title,yt=Vt.children,St=Vt.style,vn=Vt.className,xr=(0,F.Z)(Vt,In),_n=(0,$n.Z)(xr,Wt),Kn=fn(ln),An="".concat(Nt,"-option"),kn=B()(Nt,An,vn,(ht={},(0,x.Z)(ht,"".concat(An,"-grouped"),tn),(0,x.Z)(ht,"".concat(An,"-active"),wt===ct&&!Xe),(0,x.Z)(ht,"".concat(An,"-disabled"),Xe),(0,x.Z)(ht,"".concat(An,"-selected"),Kn),ht)),Mn=an(Mt),sr=!ye||typeof ye=="function"||Kn,qn=typeof Mn=="number"?Mn:Mn||ln,tr=Cn(qn)?qn.toString():void 0;return He!==void 0&&(tr=He),y.createElement("div",(0,P.Z)({},(0,M.Z)(_n),Ge?{}:Gt(Mt,ct),{"aria-selected":Kn,className:kn,title:tr,onMouseMove:function(){wt===ct||Xe||It(ct)},onClick:function(){Xe||Pt(ln)},style:St}),y.createElement("div",{className:"".concat(An,"-content")},qn),y.isValidElement(ye)||Kn,sr&&y.createElement(bt,{className:"".concat(Nt,"-option-state"),customizeIcon:ye,customizeIconProps:{isSelected:Kn}},Kn?"\u2713":null))}))},zn=y.forwardRef(dn);zn.displayName="OptionList";var Qt=zn;function Fn(d){var h=d.mode,C=d.options,D=d.children,re=d.backfill,K=d.allowClear,H=d.placeholder,be=d.getInputElement,ve=d.showSearch,We=d.onSearch,I=d.defaultOpen,j=d.autoFocus,Ue=d.labelInValue,we=d.value,je=d.inputValue,Fe=d.optionLabelProp,dt=isMultiple(h),ne=ve!==void 0?ve:dt||h==="combobox",ye=C||convertChildrenToData(D);if(warning(h!=="tags"||ye.every(function(ut){return!ut.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),h==="tags"||h==="combobox"){var Ae=ye.some(function(ut){return ut.options?ut.options.some(function(Kt){return typeof("value"in Kt?Kt.value:Kt.key)=="number"}):typeof("value"in ut?ut.value:ut.key)=="number"});warning(!Ae,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(h!=="combobox"||!Fe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(h==="combobox"||!re,"`backfill` only works with `combobox` mode."),warning(h==="combobox"||!be,"`getInputElement` only work with `combobox` mode."),noteOnce(h!=="combobox"||!be||!K||!H,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),We&&!ne&&h!=="combobox"&&h!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!I||j,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),we!=null){var lt=toArray(we);warning(!Ue||lt.every(function(ut){return _typeof(ut)==="object"&&("key"in ut||"value"in ut)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!dt||Array.isArray(we),"`value` should be array when `mode` is `multiple` or `tags`")}if(D){var Ge=null;toNodeArray(D).some(function(ut){if(!React.isValidElement(ut)||!ut.type)return!1;var Kt=ut,Rt=Kt.type;if(Rt.isSelectOption)return!1;if(Rt.isSelectOptGroup){var Nt=toNodeArray(ut.props.children).every(function($t){return!React.isValidElement($t)||!ut.type||$t.type.isSelectOption?!0:(Ge=$t.type,!1)});return!Nt}return Ge=Rt,!0}),Ge&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ge.displayName||Ge.name||Ge,"`.")),warning(je===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Wn(d,h){if(d){var C=function D(re){for(var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,H=0;H<re.length;H++){var be=re[H];if(be[h==null?void 0:h.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!K&&Array.isArray(be[h==null?void 0:h.options])&&D(be[h==null?void 0:h.options],!0))break}};C(d)}}var Sr=null,pr=["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"],on=["inputValue"];function at(d){return!d||(0,A.Z)(d)!=="object"}var zt=y.forwardRef(function(d,h){var C=d.id,D=d.mode,re=d.prefixCls,K=re===void 0?"rc-select":re,H=d.backfill,be=d.fieldNames,ve=d.inputValue,We=d.searchValue,I=d.onSearch,j=d.autoClearSearchValue,Ue=j===void 0?!0:j,we=d.onSelect,je=d.onDeselect,Fe=d.dropdownMatchSelectWidth,dt=Fe===void 0?!0:Fe,ne=d.filterOption,ye=d.filterSort,Ae=d.optionFilterProp,lt=d.optionLabelProp,Ge=d.options,ut=d.children,Kt=d.defaultActiveFirstOption,Rt=d.menuItemSelectedIcon,Nt=d.virtual,$t=d.direction,Ot=d.listHeight,qt=Ot===void 0?200:Ot,jt=d.listItemHeight,Ut=jt===void 0?20:jt,kt=d.value,Lt=d.defaultValue,wt=d.labelInValue,Bt=d.onChange,It=(0,F.Z)(d,pr),fn=(0,ot.ZP)(C),Pt=z(D),Wt=!!(!Ge&&ut),an=y.useMemo(function(){return ne===void 0&&D==="combobox"?!1:ne},[ne,D]),Gt=y.useMemo(function(){return oe(be,Wt)},[JSON.stringify(be),Wt]),En=(0,Ce.Z)("",{value:We!==void 0?We:ve,postState:function(Tt){return Tt||""}}),Un=(0,v.Z)(En,2),Mt=Un[0],ct=Un[1],ht=At(Ge,ut,Gt,Ae,lt),en=ht.valueOptions,tn=ht.labelOptions,Vt=ht.options,Ft=y.useCallback(function(vt){var Tt=Be(vt);return Tt.map(function(xt){var st,yn,bn,ur,Mr;if(at(xt))st=xt;else{var Nr;bn=xt.key,yn=xt.label,st=(Nr=xt.value)!==null&&Nr!==void 0?Nr:bn}var Gn=en.get(st);if(Gn){var Rr;if(yn===void 0&&(yn=Gn==null?void 0:Gn[lt||Gt.label]),bn===void 0&&(bn=(Rr=Gn==null?void 0:Gn.key)!==null&&Rr!==void 0?Rr:st),ur=Gn==null?void 0:Gn.disabled,Mr=Gn==null?void 0:Gn.title,0)var ci}return{label:yn,value:st,key:bn,disabled:ur,title:Mr}})},[Gt,lt,en]),ln=(0,Ce.Z)(Lt,{value:kt}),gn=(0,v.Z)(ln,2),mn=gn[0],Tn=gn[1],Xe=y.useMemo(function(){var vt,Tt=Ft(mn);return D==="combobox"&&Je((vt=Tt[0])===null||vt===void 0?void 0:vt.value)?[]:Tt},[mn,Ft,D]),He=De(Xe,en),yt=(0,v.Z)(He,2),St=yt[0],vn=yt[1],xr=y.useMemo(function(){if(!D&&St.length===1){var vt=St[0];if(vt.value===null&&(vt.label===null||vt.label===void 0))return[]}return St.map(function(Tt){var xt;return(0,W.Z)((0,W.Z)({},Tt),{},{label:(xt=Tt.label)!==null&&xt!==void 0?xt:Tt.value})})},[D,St]),_n=y.useMemo(function(){return new Set(St.map(function(vt){return vt.value}))},[St]);y.useEffect(function(){if(D==="combobox"){var vt,Tt=(vt=St[0])===null||vt===void 0?void 0:vt.value;ct(Qe(Tt)?String(Tt):"")}},[St]);var Kn=Dt(function(vt,Tt){var xt,st=Tt!=null?Tt:vt;return xt={},(0,x.Z)(xt,Gt.value,vt),(0,x.Z)(xt,Gt.label,st),xt}),An=y.useMemo(function(){if(D!=="tags")return Vt;var vt=(0,O.Z)(Vt),Tt=function(st){return en.has(st)};return(0,O.Z)(St).sort(function(xt,st){return xt.value<st.value?-1:1}).forEach(function(xt){var st=xt.value;Tt(st)||vt.push(Kn(st,xt.label))}),vt},[Kn,Vt,en,St,D]),kn=Q(An,Gt,Mt,an,Ae),Mn=y.useMemo(function(){return D!=="tags"||!Mt||kn.some(function(vt){return vt[Ae||"value"]===Mt})||kn.some(function(vt){return vt[Gt.value]===Mt})?kn:[Kn(Mt)].concat((0,O.Z)(kn))},[Kn,Ae,D,kn,Mt,Gt]),sr=y.useMemo(function(){return ye?(0,O.Z)(Mn).sort(function(vt,Tt){return ye(vt,Tt)}):Mn},[Mn,ye]),qn=y.useMemo(function(){return Y(sr,{fieldNames:Gt,childrenAsData:Wt})},[sr,Gt,Wt]),tr=function(Tt){var xt=Ft(Tt);if(Tn(xt),Bt&&(xt.length!==St.length||xt.some(function(bn,ur){var Mr;return((Mr=St[ur])===null||Mr===void 0?void 0:Mr.value)!==(bn==null?void 0:bn.value)}))){var st=wt?xt:xt.map(function(bn){return bn.value}),yn=xt.map(function(bn){return ce(vn(bn.value))});Bt(Pt?st:st[0],Pt?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=Kt!==void 0?Kt:D!=="combobox",si=y.useCallback(function(vt,Tt){var xt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},st=xt.source,yn=st===void 0?"keyboard":st;Hi(Tt),H&&D==="combobox"&&vt!==null&&yn==="keyboard"&&Yr(String(vt))},[H,D]),Kr=function(Tt,xt,st){var yn=function(){var Wr,Lr=vn(Tt);return[wt?{label:Lr==null?void 0:Lr[Gt.label],value:Tt,key:(Wr=Lr==null?void 0:Lr.key)!==null&&Wr!==void 0?Wr:Tt}:Tt,ce(Lr)]};if(xt&&we){var bn=yn(),ur=(0,v.Z)(bn,2),Mr=ur[0],Nr=ur[1];we(Mr,Nr)}else if(!xt&&je&&st!=="clear"){var Gn=yn(),Rr=(0,v.Z)(Gn,2),ci=Rr[0],Zi=Rr[1];je(ci,Zi)}},xi=Dt(function(vt,Tt){var xt,st=Pt?Tt.selected:!0;st?xt=Pt?[].concat((0,O.Z)(St),[vt]):[vt]:xt=St.filter(function(yn){return yn.value!==vt}),tr(xt),Kr(vt,st),D==="combobox"?Yr(""):(!z||Ue)&&(ct(""),Yr(""))}),Ci=function(Tt,xt){tr(Tt);var st=xt.type,yn=xt.values;(st==="remove"||st==="clear")&&yn.forEach(function(bn){Kr(bn.value,!1,st)})},jr=function(Tt,xt){if(ct(Tt),Yr(null),xt.source==="submit"){var st=(Tt||"").trim();if(st){var yn=Array.from(new Set([].concat((0,O.Z)(_n),[st])));tr(yn),Kr(st,!0),ct("")}return}xt.source!=="blur"&&(D==="combobox"&&tr(Tt),I==null||I(Tt))},Ar=function(Tt){var xt=Tt;D!=="tags"&&(xt=Tt.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)(xt))));tr(st),st.forEach(function(yn){Kr(yn,!0)})},ui=y.useMemo(function(){var vt=Nt!==!1&&dt!==!1;return(0,W.Z)((0,W.Z)({},ht),{},{flattenOptions:qn,onActiveValue:si,defaultActiveFirstOption:Si,onSelect:xi,menuItemSelectedIcon:Rt,rawValues:_n,fieldNames:Gt,virtual:vt,direction:$t,listHeight:qt,listItemHeight:Ut,childrenAsData:Wt})},[ht,qn,si,Si,xi,Rt,_n,Gt,Nt,dt,qt,Ut,Wt]);return y.createElement(Ln.Provider,{value:ui},y.createElement(Se,(0,P.Z)({},It,{id:fn,prefixCls:K,ref:h,omitDomProps:on,mode:D,displayValues:xr,onDisplayValuesChange:Ci,direction:$t,searchValue:Mt,onSearch:jr,autoClearSearchValue:Ue,onSearchSplit:Ar,dropdownMatchSelectWidth:dt,OptionList:Qt,emptyOptions:!qn.length,activeValue:li,activeDescendantId:"".concat(fn,"_list_").concat(Ir)})))}),g=zt;g.Option=xn,g.OptGroup=Yt;var $=g,_=$},9296:function(nn,Te,f){"use strict";f.r(Te),f.d(Te,{ResizableTextArea:function(){return Oe},default:function(){return Je}});var P=f(67711),O=f(98506),x=f(52873),W=f(26420),v=f(16886),F=f(33346),A=f(15142),Ce=f(92310),se=f.n(Ce),y=f(93681),Me=f(5643),B=f(18929),xe=f(59301),Pe=f(29301),q=f(34280),qe=f(16089),nt=`
|
|
|
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;
|
|
|
`,bt=["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"],Et={},ae;function J(pe){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ge=pe.getAttribute("id")||pe.getAttribute("data-reactid")||pe.getAttribute("name");if(V&&Et[ge])return Et[ge];var ue=window.getComputedStyle(pe),le=ue.getPropertyValue("box-sizing")||ue.getPropertyValue("-moz-box-sizing")||ue.getPropertyValue("-webkit-box-sizing"),Ve=parseFloat(ue.getPropertyValue("padding-bottom"))+parseFloat(ue.getPropertyValue("padding-top")),ze=parseFloat(ue.getPropertyValue("border-bottom-width"))+parseFloat(ue.getPropertyValue("border-top-width")),me=bt.map(function(L){return"".concat(L,":").concat(ue.getPropertyValue(L))}).join(";"),N={sizingStyle:me,paddingSize:Ve,borderSize:ze,boxSizing:le};return V&&ge&&(Et[ge]=N),N}function S(pe){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ae||(ae=document.createElement("textarea"),ae.setAttribute("tab-index","-1"),ae.setAttribute("aria-hidden","true"),document.body.appendChild(ae)),pe.getAttribute("wrap")?ae.setAttribute("wrap",pe.getAttribute("wrap")):ae.removeAttribute("wrap");var le=J(pe,V),Ve=le.paddingSize,ze=le.borderSize,me=le.boxSizing,N=le.sizingStyle;ae.setAttribute("style","".concat(N,";").concat(nt)),ae.value=pe.value||pe.placeholder||"";var L=void 0,G=void 0,Le,rt=ae.scrollHeight;if(me==="border-box"?rt+=ze:me==="content-box"&&(rt-=Ve),ge!==null||ue!==null){ae.value=" ";var Ze=ae.scrollHeight-Ve;ge!==null&&(L=Ze*ge,me==="border-box"&&(L=L+Ve+ze),rt=Math.max(L,rt)),ue!==null&&(G=Ze*ue,me==="border-box"&&(G=G+Ve+ze),Le=rt>G?"":"hidden",rt=Math.min(G,rt))}var it={height:rt,overflowY:Le,resize:"none"};return L&&(it.minHeight=L),G&&(it.maxHeight=G),it}var c=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],b=0,M=1,k=2,T=xe.forwardRef(function(pe,V){var ge=pe,ue=ge.prefixCls,le=ge.onPressEnter,Ve=ge.defaultValue,ze=ge.value,me=ge.autoSize,N=ge.onResize,L=ge.className,G=ge.style,Le=ge.disabled,rt=ge.onChange,Ze=ge.onInternalAutoSize,it=(0,F.Z)(ge,c),_e=(0,B.Z)(Ve,{value:ze,postState:function(Yt){return Yt!=null?Yt:""}}),R=(0,v.Z)(_e,2),de=R[0],ie=R[1],U=function(Yt){ie(Yt.target.value),rt==null||rt(Yt)},X=xe.useRef();xe.useImperativeHandle(V,function(){return{textArea:X.current}});var oe=xe.useMemo(function(){return me&&(0,W.Z)(me)==="object"?[me.minRows,me.maxRows]:[]},[me]),Y=(0,v.Z)(oe,2),ce=Y[0],Re=Y[1],ee=!!me,fe=function(){try{if(document.activeElement===X.current){var Yt=X.current,sn=Yt.selectionStart,xn=Yt.selectionEnd,un=Yt.scrollTop;X.current.setSelectionRange(sn,xn),X.current.scrollTop=un}}catch($n){}},z=xe.useState(k),he=(0,v.Z)(z,2),Se=he[0],De=he[1],et=xe.useState(),Q=(0,v.Z)(et,2),ot=Q[0],Ke=Q[1],ft=function(){De(b)};(0,q.Z)(function(){ee&&ft()},[ze,ce,Re,ee]),(0,q.Z)(function(){if(Se===b)De(M);else if(Se===M){var Xt=S(X.current,!1,ce,Re);De(k),Ke(Xt)}else fe()},[Se]);var pt=xe.useRef(),rn=function(){qe.Z.cancel(pt.current)},Zt=function(Yt){Se===k&&(N==null||N(Yt),me&&(rn(),pt.current=(0,qe.Z)(function(){ft()})))};xe.useEffect(function(){return rn},[]);var At=ee?ot:null,Dt=(0,O.Z)((0,O.Z)({},G),At);return(Se===b||Se===M)&&(Dt.overflowY="hidden",Dt.overflowX="hidden"),xe.createElement(Pe.Z,{onResize:Zt,disabled:!(me||N)},xe.createElement("textarea",(0,P.Z)({},it,{ref:X,style:Dt,className:se()(ue,L,(0,x.Z)({},"".concat(ue,"-disabled"),Le)),disabled:Le,value:de,onChange:U})))}),Oe=T,ke=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Be(pe,V){return(0,A.Z)(pe||"").slice(0,V).join("")}function Ie(pe,V,ge,ue){var le=ge;return pe?le=Be(ge,ue):(0,A.Z)(V||"").length<ge.length&&(0,A.Z)(ge||"").length>ue&&(le=V),le}var mt=xe.forwardRef(function(pe,V){var ge,ue=pe.defaultValue,le=pe.value,Ve=pe.onFocus,ze=pe.onBlur,me=pe.onChange,N=pe.allowClear,L=pe.maxLength,G=pe.onCompositionStart,Le=pe.onCompositionEnd,rt=pe.suffix,Ze=pe.prefixCls,it=Ze===void 0?"rc-textarea":Ze,_e=pe.classes,R=pe.showCount,de=pe.className,ie=pe.style,U=pe.disabled,X=pe.hidden,oe=pe.classNames,Y=pe.styles,ce=pe.onResize,Re=(0,F.Z)(pe,ke),ee=(0,B.Z)(ue,{value:le,defaultValue:ue}),fe=(0,v.Z)(ee,2),z=fe[0],he=fe[1],Se=(0,xe.useRef)(null),De=xe.useState(!1),et=(0,v.Z)(De,2),Q=et[0],ot=et[1],Ke=xe.useState(!1),ft=(0,v.Z)(Ke,2),pt=ft[0],rn=ft[1],Zt=xe.useRef(),At=xe.useRef(0),Dt=xe.useState(null),Xt=(0,v.Z)(Dt,2),Yt=Xt[0],sn=Xt[1],xn=function(){var at;(at=Se.current)===null||at===void 0||at.textArea.focus()};(0,xe.useImperativeHandle)(V,function(){return{resizableTextArea:Se.current,focus:xn,blur:function(){var at;(at=Se.current)===null||at===void 0||at.textArea.blur()}}}),(0,xe.useEffect)(function(){ot(function(on){return!U&&on})},[U]);var un=Number(L)>0,$n=function(at){rn(!0),Zt.current=z,At.current=at.currentTarget.selectionStart,G==null||G(at)},Bn=function(at){rn(!1);var zt=at.currentTarget.value;if(un){var g,$=At.current>=L+1||At.current===((g=Zt.current)===null||g===void 0?void 0:g.length);zt=Ie($,Zt.current,zt,L)}zt!==z&&(he(zt),(0,Me.rJ)(at.currentTarget,at,me,zt)),Le==null||Le(at)},pn=function(at){var zt=at.target.value;if(!pt&&un){var g=at.target.selectionStart>=L+1||at.target.selectionStart===zt.length||!at.target.selectionStart;zt=Ie(g,z,zt,L)}he(zt),(0,Me.rJ)(at.currentTarget,at,me,zt)},Ln=function(at){var zt=Re.onPressEnter,g=Re.onKeyDown;at.key==="Enter"&&zt&&zt(at),g==null||g(at)},wn=function(at){ot(!0),Ve==null||Ve(at)},In=function(at){ot(!1),ze==null||ze(at)},Cn=function(at){var zt;he(""),xn(),(0,Me.rJ)((zt=Se.current)===null||zt===void 0?void 0:zt.textArea,at,me)},dn=(0,Me.D7)(z);!pt&&un&&le==null&&(dn=Be(dn,L));var zn=rt,Qt;if(R){var Fn=(0,A.Z)(dn).length;(0,W.Z)(R)==="object"?Qt=R.formatter({value:dn,count:Fn,maxLength:L}):Qt="".concat(Fn).concat(un?" / ".concat(L):""),zn=xe.createElement(xe.Fragment,null,zn,xe.createElement("span",{className:se()("".concat(it,"-data-count"),oe==null?void 0:oe.count),style:Y==null?void 0:Y.count},Qt))}var Wn=function(at){var zt;ce==null||ce(at),(zt=Se.current)!==null&&zt!==void 0&&zt.textArea.style.height&&sn(!0)},Sr=!Re.autoSize&&!R&&!N,pr=xe.createElement(y.BaseInput,{value:dn,allowClear:N,handleReset:Cn,suffix:zn,prefixCls:it,classes:{affixWrapper:se()(_e==null?void 0:_e.affixWrapper,(ge={},(0,x.Z)(ge,"".concat(it,"-show-count"),R),(0,x.Z)(ge,"".concat(it,"-textarea-allow-clear"),N),ge))},disabled:U,focused:Q,className:de,style:(0,O.Z)((0,O.Z)({},ie),Yt&&!Sr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Qt=="string"?Qt:void 0}},hidden:X,inputElement:xe.createElement(Oe,(0,P.Z)({},Re,{onKeyDown:Ln,onChange:pn,onFocus:wn,onBlur:In,onCompositionStart:$n,onCompositionEnd:Bn,className:oe==null?void 0:oe.textarea,style:(0,O.Z)((0,O.Z)({},Y==null?void 0:Y.textarea),{},{resize:ie==null?void 0:ie.resize}),disabled:U,prefixCls:it,onResize:Wn,ref:Se}))});return pr}),Qe=mt,Je=Qe},6790:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return _e}});var P=f(67711),O=f(26420),x=f(98506),W=f(52873),v=f(16886),F=f(33346),A=f(92310),Ce=f.n(A),se=f(29301),y=f(70425),Me=f(34280),B=f(59301),xe=f(4676),Pe=B.forwardRef(function(R,de){var ie=R.height,U=R.offsetY,X=R.offsetX,oe=R.children,Y=R.prefixCls,ce=R.onInnerResize,Re=R.innerProps,ee=R.rtl,fe=R.extra,z={},he={display:"flex",flexDirection:"column"};return U!==void 0&&(z={height:ie,position:"relative",overflow:"hidden"},he=(0,x.Z)((0,x.Z)({},he),{},(0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)({transform:"translateY(".concat(U,"px)")},ee?"marginRight":"marginLeft",-X),"position","absolute"),"left",0),"right",0),"top",0))),B.createElement("div",{style:z},B.createElement(se.Z,{onResize:function(De){var et=De.offsetHeight;et&&ce&&ce()}},B.createElement("div",(0,P.Z)({style:he,className:Ce()((0,W.Z)({},"".concat(Y,"-holder-inner"),Y)),ref:de},Re),oe,fe)))});Pe.displayName="Filler";var q=Pe;function qe(R){var de=R.children,ie=R.setRef,U=B.useCallback(function(X){ie(X)},[]);return B.cloneElement(de,{ref:U})}function nt(R,de,ie,U,X,oe,Y,ce){var Re=ce.getKey;return R.slice(de,ie+1).map(function(ee,fe){var z=de+fe,he=Y(ee,z,{style:{width:U},offsetX:X}),Se=Re(ee);return B.createElement(qe,{key:Se,setRef:function(et){return oe(ee,et)}},he)})}function bt(R,de,ie,U){var X=ie-R,oe=de-ie,Y=Math.min(X,oe)*2;if(U<=Y){var ce=Math.floor(U/2);return U%2?ie+ce+1:ie-ce}return X>oe?ie-(U-oe):ie+(U-X)}function Et(R,de,ie){var U=R.length,X=de.length,oe,Y;if(U===0&&X===0)return null;U<X?(oe=R,Y=de):(oe=de,Y=R);var ce={__EMPTY_ITEM__:!0};function Re(De){return De!==void 0?ie(De):ce}for(var ee=null,fe=Math.abs(U-X)!==1,z=0;z<Y.length;z+=1){var he=Re(oe[z]),Se=Re(Y[z]);if(he!==Se){ee=z,fe=fe||he!==Re(Y[z+1]);break}}return ee===null?null:{index:ee,multiple:fe}}function ae(R,de,ie){var U=B.useState(R),X=(0,v.Z)(U,2),oe=X[0],Y=X[1],ce=B.useState(null),Re=(0,v.Z)(ce,2),ee=Re[0],fe=Re[1];return B.useEffect(function(){var z=Et(oe||[],R||[],de);(z==null?void 0:z.index)!==void 0&&(ie==null||ie(z.index),fe(R[z.index])),Y(R)},[R]),[ee]}var J=f(16089),S=(typeof navigator=="undefined"?"undefined":(0,O.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),c=S,b=function(R,de,ie,U){var X=(0,B.useRef)(!1),oe=(0,B.useRef)(null);function Y(){clearTimeout(oe.current),X.current=!0,oe.current=setTimeout(function(){X.current=!1},50)}var ce=(0,B.useRef)({top:R,bottom:de,left:ie,right:U});return ce.current.top=R,ce.current.bottom=de,ce.current.left=ie,ce.current.right=U,function(Re,ee){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,z=Re?ee<0&&ce.current.left||ee>0&&ce.current.right:ee<0&&ce.current.top||ee>0&&ce.current.bottom;return fe&&z?(clearTimeout(oe.current),X.current=!1):(!z||X.current)&&Y(),!X.current&&z}};function M(R,de,ie,U,X,oe,Y){var ce=(0,B.useRef)(0),Re=(0,B.useRef)(null),ee=(0,B.useRef)(null),fe=(0,B.useRef)(!1),z=b(de,ie,U,X);function he(Ke,ft){if(J.Z.cancel(Re.current),!z(!1,ft)){var pt=Ke;if(!pt._virtualHandled)pt._virtualHandled=!0;else return;ce.current+=ft,ee.current=ft,c||pt.preventDefault(),Re.current=(0,J.Z)(function(){var rn=fe.current?10:1;Y(ce.current*rn,!1),ce.current=0})}}function Se(Ke,ft){Y(ft,!0),c||Ke.preventDefault()}var De=(0,B.useRef)(null),et=(0,B.useRef)(null);function Q(Ke){if(R){J.Z.cancel(et.current),et.current=(0,J.Z)(function(){De.current=null},2);var ft=Ke.deltaX,pt=Ke.deltaY,rn=Ke.shiftKey,Zt=ft,At=pt;(De.current==="sx"||!De.current&&rn&&pt&&!ft)&&(Zt=pt,At=0,De.current="sx");var Dt=Math.abs(Zt),Xt=Math.abs(At);De.current===null&&(De.current=oe&&Dt>Xt?"x":"y"),De.current==="y"?he(Ke,At):Se(Ke,Zt)}}function ot(Ke){R&&(fe.current=Ke.detail===ee.current)}return[Q,ot]}function k(R,de,ie,U){var X=B.useMemo(function(){return[new Map,[]]},[R,ie.id,U]),oe=(0,v.Z)(X,2),Y=oe[0],ce=oe[1],Re=function(fe){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fe,he=Y.get(fe),Se=Y.get(z);if(he===void 0||Se===void 0)for(var De=R.length,et=ce.length;et<De;et+=1){var Q,ot=R[et],Ke=de(ot);Y.set(Ke,et);var ft=(Q=ie.get(Ke))!==null&&Q!==void 0?Q:U;if(ce[et]=(ce[et-1]||0)+ft,Ke===fe&&(he=et),Ke===z&&(Se=et),he!==void 0&&Se!==void 0)break}return{top:ce[he-1]||0,bottom:ce[Se]}};return Re}var T=f(42573),Oe=f(58698),ke=function(){function R(){(0,T.Z)(this,R),(0,W.Z)(this,"maps",void 0),(0,W.Z)(this,"id",0),(0,W.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Oe.Z)(R,[{key:"set",value:function(ie,U){this.diffRecords.set(ie,this.maps[ie]),this.maps[ie]=U,this.id+=1}},{key:"get",value:function(ie){return this.maps[ie]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),R}(),Be=ke;function Ie(R){var de=parseFloat(R);return isNaN(de)?0:de}function mt(R,de,ie){var U=B.useState(0),X=(0,v.Z)(U,2),oe=X[0],Y=X[1],ce=(0,B.useRef)(new Map),Re=(0,B.useRef)(new Be),ee=(0,B.useRef)(0);function fe(){ee.current+=1}function z(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;fe();var De=function(){var ot=!1;ce.current.forEach(function(Ke,ft){if(Ke&&Ke.offsetParent){var pt=Ke.offsetHeight,rn=getComputedStyle(Ke),Zt=rn.marginTop,At=rn.marginBottom,Dt=Ie(Zt),Xt=Ie(At),Yt=pt+Dt+Xt;Re.current.get(ft)!==Yt&&(Re.current.set(ft,Yt),ot=!0)}}),ot&&Y(function(Ke){return Ke+1})};if(Se)De();else{ee.current+=1;var et=ee.current;Promise.resolve().then(function(){et===ee.current&&De()})}}function he(Se,De){var et=R(Se),Q=ce.current.get(et);De?(ce.current.set(et,De),z()):ce.current.delete(et),!Q!=!De&&(De?de==null||de(Se):ie==null||ie(Se))}return(0,B.useEffect)(function(){return fe},[]),[he,z,Re.current,oe]}var Qe=14/15;function Je(R,de,ie){var U=(0,B.useRef)(!1),X=(0,B.useRef)(0),oe=(0,B.useRef)(0),Y=(0,B.useRef)(null),ce=(0,B.useRef)(null),Re,ee=function(Se){if(U.current){var De=Math.ceil(Se.touches[0].pageX),et=Math.ceil(Se.touches[0].pageY),Q=X.current-De,ot=oe.current-et,Ke=Math.abs(Q)>Math.abs(ot);Ke?X.current=De:oe.current=et;var ft=ie(Ke,Ke?Q:ot,!1,Se);ft&&Se.preventDefault(),clearInterval(ce.current),ft&&(ce.current=setInterval(function(){Ke?Q*=Qe:ot*=Qe;var pt=Math.floor(Ke?Q:ot);(!ie(Ke,pt,!0)||Math.abs(pt)<=.1)&&clearInterval(ce.current)},16))}},fe=function(){U.current=!1,Re()},z=function(Se){Re(),Se.touches.length===1&&!U.current&&(U.current=!0,X.current=Math.ceil(Se.touches[0].pageX),oe.current=Math.ceil(Se.touches[0].pageY),Y.current=Se.target,Y.current.addEventListener("touchmove",ee,{passive:!1}),Y.current.addEventListener("touchend",fe,{passive:!0}))};Re=function(){Y.current&&(Y.current.removeEventListener("touchmove",ee),Y.current.removeEventListener("touchend",fe))},(0,Me.Z)(function(){return R&&de.current.addEventListener("touchstart",z,{passive:!0}),function(){var he;(he=de.current)===null||he===void 0||he.removeEventListener("touchstart",z),Re(),clearInterval(ce.current)}},[R])}function pe(R){return Math.floor(Math.pow(R,.5))}function V(R,de){var ie="touches"in R?R.touches[0]:R;return ie[de?"pageX":"pageY"]-window[de?"scrollX":"scrollY"]}function ge(R,de,ie){B.useEffect(function(){var U=de.current;if(R&&U){var X=!1,oe,Y,ce=function(){J.Z.cancel(oe)},Re=function he(){ce(),oe=(0,J.Z)(function(){ie(Y),he()})},ee=function(Se){if(!(Se.target.draggable||Se.button!==0)){var De=Se;De._virtualHandled||(De._virtualHandled=!0,X=!0)}},fe=function(){X=!1,ce()},z=function(Se){if(X){var De=V(Se,!1),et=U.getBoundingClientRect(),Q=et.top,ot=et.bottom;if(De<=Q){var Ke=Q-De;Y=-pe(Ke),Re()}else if(De>=ot){var ft=De-ot;Y=pe(ft),Re()}else ce()}};return U.addEventListener("mousedown",ee),U.ownerDocument.addEventListener("mouseup",fe),U.ownerDocument.addEventListener("mousemove",z),function(){U.removeEventListener("mousedown",ee),U.ownerDocument.removeEventListener("mouseup",fe),U.ownerDocument.removeEventListener("mousemove",z),ce()}}},[R])}var ue=10;function le(R,de,ie,U,X,oe,Y,ce){var Re=B.useRef(),ee=B.useState(null),fe=(0,v.Z)(ee,2),z=fe[0],he=fe[1];return(0,Me.Z)(function(){if(z&&z.times<ue){if(!R.current){he(function(In){return(0,x.Z)({},In)});return}oe();var Se=z.targetAlign,De=z.originAlign,et=z.index,Q=z.offset,ot=R.current.clientHeight,Ke=!1,ft=Se,pt=null;if(ot){for(var rn=Se||De,Zt=0,At=0,Dt=0,Xt=Math.min(de.length-1,et),Yt=0;Yt<=Xt;Yt+=1){var sn=X(de[Yt]);At=Zt;var xn=ie.get(sn);Dt=At+(xn===void 0?U:xn),Zt=Dt}for(var un=rn==="top"?Q:ot-Q,$n=Xt;$n>=0;$n-=1){var Bn=X(de[$n]),pn=ie.get(Bn);if(pn===void 0){Ke=!0;break}if(un-=pn,un<=0)break}switch(rn){case"top":pt=At-Q;break;case"bottom":pt=Dt-ot+Q;break;default:{var Ln=R.current.scrollTop,wn=Ln+ot;At<Ln?ft="top":Dt>wn&&(ft="bottom")}}pt!==null&&Y(pt),pt!==z.lastTop&&(Ke=!0)}Ke&&he((0,x.Z)((0,x.Z)({},z),{},{times:z.times+1,targetAlign:ft,lastTop:pt}))}},[z,R.current]),function(Se){if(Se==null){ce();return}if(J.Z.cancel(Re.current),typeof Se=="number")Y(Se);else if(Se&&(0,O.Z)(Se)==="object"){var De,et=Se.align;"index"in Se?De=Se.index:De=de.findIndex(function(Ke){return X(Ke)===Se.key});var Q=Se.offset,ot=Q===void 0?0:Q;he({times:0,index:De,offset:ot,originAlign:et})}}}var Ve=B.forwardRef(function(R,de){var ie=R.prefixCls,U=R.rtl,X=R.scrollOffset,oe=R.scrollRange,Y=R.onStartMove,ce=R.onStopMove,Re=R.onScroll,ee=R.horizontal,fe=R.spinSize,z=R.containerSize,he=R.style,Se=R.thumbStyle,De=R.showScrollBar,et=B.useState(!1),Q=(0,v.Z)(et,2),ot=Q[0],Ke=Q[1],ft=B.useState(null),pt=(0,v.Z)(ft,2),rn=pt[0],Zt=pt[1],At=B.useState(null),Dt=(0,v.Z)(At,2),Xt=Dt[0],Yt=Dt[1],sn=!U,xn=B.useRef(),un=B.useRef(),$n=B.useState(De),Bn=(0,v.Z)($n,2),pn=Bn[0],Ln=Bn[1],wn=B.useRef(),In=function(){De===!0||De===!1||(clearTimeout(wn.current),Ln(!0),wn.current=setTimeout(function(){Ln(!1)},3e3))},Cn=oe-z||0,dn=z-fe||0,zn=B.useMemo(function(){if(X===0||Cn===0)return 0;var g=X/Cn;return g*dn},[X,Cn,dn]),Qt=function($){$.stopPropagation(),$.preventDefault()},Fn=B.useRef({top:zn,dragging:ot,pageY:rn,startTop:Xt});Fn.current={top:zn,dragging:ot,pageY:rn,startTop:Xt};var Wn=function($){Ke(!0),Zt(V($,ee)),Yt(Fn.current.top),Y(),$.stopPropagation(),$.preventDefault()};B.useEffect(function(){var g=function(h){h.preventDefault()},$=xn.current,_=un.current;return $.addEventListener("touchstart",g,{passive:!1}),_.addEventListener("touchstart",Wn,{passive:!1}),function(){$.removeEventListener("touchstart",g),_.removeEventListener("touchstart",Wn)}},[]);var Sr=B.useRef();Sr.current=Cn;var pr=B.useRef();pr.current=dn,B.useEffect(function(){if(ot){var g,$=function(h){var C=Fn.current,D=C.dragging,re=C.pageY,K=C.startTop;J.Z.cancel(g);var H=xn.current.getBoundingClientRect(),be=z/(ee?H.width:H.height);if(D){var ve=(V(h,ee)-re)*be,We=K;!sn&&ee?We-=ve:We+=ve;var I=Sr.current,j=pr.current,Ue=j?We/j:0,we=Math.ceil(Ue*I);we=Math.max(we,0),we=Math.min(we,I),g=(0,J.Z)(function(){Re(we,ee)})}},_=function(){Ke(!1),ce()};return window.addEventListener("mousemove",$,{passive:!0}),window.addEventListener("touchmove",$,{passive:!0}),window.addEventListener("mouseup",_,{passive:!0}),window.addEventListener("touchend",_,{passive:!0}),function(){window.removeEventListener("mousemove",$),window.removeEventListener("touchmove",$),window.removeEventListener("mouseup",_),window.removeEventListener("touchend",_),J.Z.cancel(g)}}},[ot]),B.useEffect(function(){return In(),function(){clearTimeout(wn.current)}},[X]),B.useImperativeHandle(de,function(){return{delayHidden:In}});var on="".concat(ie,"-scrollbar"),at={position:"absolute",visibility:pn?null:"hidden"},zt={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(at,{height:8,left:0,right:0,bottom:0}),Object.assign(zt,(0,W.Z)({height:"100%",width:fe},sn?"left":"right",zn))):(Object.assign(at,(0,W.Z)({width:8,top:0,bottom:0},sn?"right":"left",0)),Object.assign(zt,{width:"100%",height:fe,top:zn})),B.createElement("div",{ref:xn,className:Ce()(on,(0,W.Z)((0,W.Z)((0,W.Z)({},"".concat(on,"-horizontal"),ee),"".concat(on,"-vertical"),!ee),"".concat(on,"-visible"),pn)),style:(0,x.Z)((0,x.Z)({},at),he),onMouseDown:Qt,onMouseMove:In},B.createElement("div",{ref:un,className:Ce()("".concat(on,"-thumb"),(0,W.Z)({},"".concat(on,"-thumb-moving"),ot)),style:(0,x.Z)((0,x.Z)({},zt),Se),onMouseDown:Wn}))}),ze=Ve,me=20;function N(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ie=R/de*R;return isNaN(ie)&&(ie=0),ie=Math.max(ie,me),Math.floor(ie)}var L=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],G=[],Le={overflowY:"auto",overflowAnchor:"none"};function rt(R,de){var ie=R.prefixCls,U=ie===void 0?"rc-virtual-list":ie,X=R.className,oe=R.height,Y=R.itemHeight,ce=R.fullHeight,Re=ce===void 0?!0:ce,ee=R.style,fe=R.data,z=R.children,he=R.itemKey,Se=R.virtual,De=R.direction,et=R.scrollWidth,Q=R.component,ot=Q===void 0?"div":Q,Ke=R.onScroll,ft=R.onVirtualScroll,pt=R.onVisibleChange,rn=R.innerProps,Zt=R.extraRender,At=R.styles,Dt=R.showScrollBar,Xt=Dt===void 0?"optional":Dt,Yt=(0,F.Z)(R,L),sn=B.useCallback(function(Xe){return typeof he=="function"?he(Xe):Xe==null?void 0:Xe[he]},[he]),xn=mt(sn,null,null),un=(0,v.Z)(xn,4),$n=un[0],Bn=un[1],pn=un[2],Ln=un[3],wn=!!(Se!==!1&&oe&&Y),In=B.useMemo(function(){return Object.values(pn.maps).reduce(function(Xe,He){return Xe+He},0)},[pn.id,pn.maps]),Cn=wn&&fe&&(Math.max(Y*fe.length,In)>oe||!!et),dn=De==="rtl",zn=Ce()(U,(0,W.Z)({},"".concat(U,"-rtl"),dn),X),Qt=fe||G,Fn=(0,B.useRef)(),Wn=(0,B.useRef)(),Sr=(0,B.useRef)(),pr=(0,B.useState)(0),on=(0,v.Z)(pr,2),at=on[0],zt=on[1],g=(0,B.useState)(0),$=(0,v.Z)(g,2),_=$[0],d=$[1],h=(0,B.useState)(!1),C=(0,v.Z)(h,2),D=C[0],re=C[1],K=function(){re(!0)},H=function(){re(!1)},be={getKey:sn};function ve(Xe){zt(function(He){var yt;typeof Xe=="function"?yt=Xe(He):yt=Xe;var St=Ut(yt);return Fn.current.scrollTop=St,St})}var We=(0,B.useRef)({start:0,end:Qt.length}),I=(0,B.useRef)(),j=ae(Qt,sn),Ue=(0,v.Z)(j,1),we=Ue[0];I.current=we;var je=B.useMemo(function(){if(!wn)return{scrollHeight:void 0,start:0,end:Qt.length-1,offset:void 0};if(!Cn){var Xe;return{scrollHeight:((Xe=Wn.current)===null||Xe===void 0?void 0:Xe.offsetHeight)||0,start:0,end:Qt.length-1,offset:void 0}}for(var He=0,yt,St,vn,xr=Qt.length,_n=0;_n<xr;_n+=1){var Kn=Qt[_n],An=sn(Kn),kn=pn.get(An),Mn=He+(kn===void 0?Y:kn);Mn>=at&&yt===void 0&&(yt=_n,St=He),Mn>at+oe&&vn===void 0&&(vn=_n),He=Mn}return yt===void 0&&(yt=0,St=0,vn=Math.ceil(oe/Y)),vn===void 0&&(vn=Qt.length-1),vn=Math.min(vn+1,Qt.length-1),{scrollHeight:He,start:yt,end:vn,offset:St}},[Cn,wn,at,Qt,Ln,oe]),Fe=je.scrollHeight,dt=je.start,ne=je.end,ye=je.offset;We.current.start=dt,We.current.end=ne,B.useLayoutEffect(function(){var Xe=pn.getRecord();if(Xe.size===1){var He=Array.from(Xe.keys())[0],yt=Xe.get(He),St=Qt[dt];if(St&&yt===void 0){var vn=sn(St);if(vn===He){var xr=pn.get(He),_n=xr-Y;ve(function(Kn){return Kn+_n})}}}pn.resetRecord()},[Fe]);var Ae=B.useState({width:0,height:oe}),lt=(0,v.Z)(Ae,2),Ge=lt[0],ut=lt[1],Kt=function(He){ut({width:He.offsetWidth,height:He.offsetHeight})},Rt=(0,B.useRef)(),Nt=(0,B.useRef)(),$t=B.useMemo(function(){return N(Ge.width,et)},[Ge.width,et]),Ot=B.useMemo(function(){return N(Ge.height,Fe)},[Ge.height,Fe]),qt=Fe-oe,jt=(0,B.useRef)(qt);jt.current=qt;function Ut(Xe){var He=Xe;return Number.isNaN(jt.current)||(He=Math.min(He,jt.current)),He=Math.max(He,0),He}var kt=at<=0,Lt=at>=qt,wt=_<=0,Bt=_>=et,It=b(kt,Lt,wt,Bt),fn=function(){return{x:dn?-_:_,y:at}},Pt=(0,B.useRef)(fn()),Wt=(0,y.useEvent)(function(Xe){if(ft){var He=(0,x.Z)((0,x.Z)({},fn()),Xe);(Pt.current.x!==He.x||Pt.current.y!==He.y)&&(ft(He),Pt.current=He)}});function an(Xe,He){var yt=Xe;He?((0,xe.flushSync)(function(){d(yt)}),Wt()):ve(yt)}function Gt(Xe){var He=Xe.currentTarget.scrollTop;He!==at&&ve(He),Ke==null||Ke(Xe),Wt()}var En=function(He){var yt=He,St=et?et-Ge.width:0;return yt=Math.max(yt,0),yt=Math.min(yt,St),yt},Un=(0,y.useEvent)(function(Xe,He){He?((0,xe.flushSync)(function(){d(function(yt){var St=yt+(dn?-Xe:Xe);return En(St)})}),Wt()):ve(function(yt){var St=yt+Xe;return St})}),Mt=M(wn,kt,Lt,wt,Bt,!!et,Un),ct=(0,v.Z)(Mt,2),ht=ct[0],en=ct[1];Je(wn,Fn,function(Xe,He,yt,St){var vn=St;return It(Xe,He,yt)?!1:!vn||!vn._virtualHandled?(vn&&(vn._virtualHandled=!0),ht({preventDefault:function(){},deltaX:Xe?He:0,deltaY:Xe?0:He}),!0):!1}),ge(Cn,Fn,function(Xe){ve(function(He){return He+Xe})}),(0,Me.Z)(function(){function Xe(yt){var St=kt&&yt.detail<0,vn=Lt&&yt.detail>0;wn&&!St&&!vn&&yt.preventDefault()}var He=Fn.current;return He.addEventListener("wheel",ht,{passive:!1}),He.addEventListener("DOMMouseScroll",en,{passive:!0}),He.addEventListener("MozMousePixelScroll",Xe,{passive:!1}),function(){He.removeEventListener("wheel",ht),He.removeEventListener("DOMMouseScroll",en),He.removeEventListener("MozMousePixelScroll",Xe)}},[wn,kt,Lt]),(0,Me.Z)(function(){if(et){var Xe=En(_);d(Xe),Wt({x:Xe})}},[Ge.width,et]);var tn=function(){var He,yt;(He=Rt.current)===null||He===void 0||He.delayHidden(),(yt=Nt.current)===null||yt===void 0||yt.delayHidden()},Vt=le(Fn,Qt,pn,Y,sn,function(){return Bn(!0)},ve,tn);B.useImperativeHandle(de,function(){return{nativeElement:Sr.current,getScrollInfo:fn,scrollTo:function(He){function yt(St){return St&&(0,O.Z)(St)==="object"&&("left"in St||"top"in St)}yt(He)?(He.left!==void 0&&d(En(He.left)),Vt(He.top)):Vt(He)}}}),(0,Me.Z)(function(){if(pt){var Xe=Qt.slice(dt,ne+1);pt(Xe,Qt)}},[dt,ne,Qt]);var Ft=k(Qt,sn,pn,Y),ln=Zt==null?void 0:Zt({start:dt,end:ne,virtual:Cn,offsetX:_,offsetY:ye,rtl:dn,getSize:Ft}),gn=nt(Qt,dt,ne,et,_,$n,z,be),mn=null;oe&&(mn=(0,x.Z)((0,W.Z)({},Re?"height":"maxHeight",oe),Le),wn&&(mn.overflowY="hidden",et&&(mn.overflowX="hidden"),D&&(mn.pointerEvents="none")));var Tn={};return dn&&(Tn.dir="rtl"),B.createElement("div",(0,P.Z)({ref:Sr,style:(0,x.Z)((0,x.Z)({},ee),{},{position:"relative"}),className:zn},Tn,Yt),B.createElement(se.Z,{onResize:Kt},B.createElement(ot,{className:"".concat(U,"-holder"),style:mn,ref:Fn,onScroll:Gt,onMouseEnter:tn},B.createElement(q,{prefixCls:U,height:Fe,offsetX:_,offsetY:ye,scrollWidth:et,onInnerResize:Bn,ref:Wn,innerProps:rn,rtl:dn,extra:ln},gn))),Cn&&Fe>oe&&B.createElement(ze,{ref:Rt,prefixCls:U,scrollOffset:at,scrollRange:Fe,rtl:dn,onScroll:an,onStartMove:K,onStopMove:H,spinSize:Ot,containerSize:Ge.height,style:At==null?void 0:At.verticalScrollBar,thumbStyle:At==null?void 0:At.verticalScrollBarThumb,showScrollBar:Xt}),Cn&&et>Ge.width&&B.createElement(ze,{ref:Nt,prefixCls:U,scrollOffset:_,scrollRange:et,rtl:dn,onScroll:an,onStartMove:K,onStopMove:H,spinSize:$t,containerSize:Ge.width,horizontal:!0,style:At==null?void 0:At.horizontalScrollBar,thumbStyle:At==null?void 0:At.horizontalScrollBarThumb,showScrollBar:Xt}))}var Ze=B.forwardRef(rt);Ze.displayName="List";var it=Ze,_e=it},16722:function(nn,Te,f){"use strict";f.d(Te,{Z:function(){return Ce}});const P=se=>typeof se=="object"&&se!=null&&se.nodeType===1,O=(se,y)=>(!y||se!=="hidden")&&se!=="visible"&&se!=="clip",x=(se,y)=>{if(se.clientHeight<se.scrollHeight||se.clientWidth<se.scrollWidth){const Me=getComputedStyle(se,null);return O(Me.overflowY,y)||O(Me.overflowX,y)||(B=>{const xe=(Pe=>{if(!Pe.ownerDocument||!Pe.ownerDocument.defaultView)return null;try{return Pe.ownerDocument.defaultView.frameElement}catch(q){return null}})(B);return!!xe&&(xe.clientHeight<B.scrollHeight||xe.clientWidth<B.scrollWidth)})(se)}return!1},W=(se,y,Me,B,xe,Pe,q,qe)=>Pe<se&&q>y||Pe>se&&q<y?0:Pe<=se&&qe<=Me||q>=y&&qe>=Me?Pe-se-B:q>y&&qe<Me||Pe<se&&qe>Me?q-y+xe:0,v=se=>{const y=se.parentElement;return y==null?se.getRootNode().host||null:y},F=(se,y)=>{var Me,B,xe,Pe;if(typeof document=="undefined")return[];const{scrollMode:q,block:qe,inline:nt,boundary:bt,skipOverflowHiddenElements:Et}=y,ae=typeof bt=="function"?bt:ze=>ze!==bt;if(!P(se))throw new TypeError("Invalid target");const J=document.scrollingElement||document.documentElement,S=[];let c=se;for(;P(c)&&ae(c);){if(c=v(c),c===J){S.push(c);break}c!=null&&c===document.body&&x(c)&&!x(document.documentElement)||c!=null&&x(c,Et)&&S.push(c)}const b=(B=(Me=window.visualViewport)==null?void 0:Me.width)!=null?B:innerWidth,M=(Pe=(xe=window.visualViewport)==null?void 0:xe.height)!=null?Pe:innerHeight,{scrollX:k,scrollY:T}=window,{height:Oe,width:ke,top:Be,right:Ie,bottom:mt,left:Qe}=se.getBoundingClientRect(),{top:Je,right:pe,bottom:V,left:ge}=(ze=>{const me=window.getComputedStyle(ze);return{top:parseFloat(me.scrollMarginTop)||0,right:parseFloat(me.scrollMarginRight)||0,bottom:parseFloat(me.scrollMarginBottom)||0,left:parseFloat(me.scrollMarginLeft)||0}})(se);let ue=qe==="start"||qe==="nearest"?Be-Je:qe==="end"?mt+V:Be+Oe/2-Je+V,le=nt==="center"?Qe+ke/2-ge+pe:nt==="end"?Ie+pe:Qe-ge;const Ve=[];for(let ze=0;ze<S.length;ze++){const me=S[ze],{height:N,width:L,top:G,right:Le,bottom:rt,left:Ze}=me.getBoundingClientRect();if(q==="if-needed"&&Be>=0&&Qe>=0&&mt<=M&&Ie<=b&&(me===J&&!x(me)||Be>=G&&mt<=rt&&Qe>=Ze&&Ie<=Le))return Ve;const it=getComputedStyle(me),_e=parseInt(it.borderLeftWidth,10),R=parseInt(it.borderTopWidth,10),de=parseInt(it.borderRightWidth,10),ie=parseInt(it.borderBottomWidth,10);let U=0,X=0;const oe="offsetWidth"in me?me.offsetWidth-me.clientWidth-_e-de:0,Y="offsetHeight"in me?me.offsetHeight-me.clientHeight-R-ie:0,ce="offsetWidth"in me?me.offsetWidth===0?0:L/me.offsetWidth:0,Re="offsetHeight"in me?me.offsetHeight===0?0:N/me.offsetHeight:0;if(J===me)U=qe==="start"?ue:qe==="end"?ue-M:qe==="nearest"?W(T,T+M,M,R,ie,T+ue,T+ue+Oe,Oe):ue-M/2,X=nt==="start"?le:nt==="center"?le-b/2:nt==="end"?le-b:W(k,k+b,b,_e,de,k+le,k+le+ke,ke),U=Math.max(0,U+T),X=Math.max(0,X+k);else{U=qe==="start"?ue-G-R:qe==="end"?ue-rt+ie+Y:qe==="nearest"?W(G,rt,N,R,ie+Y,ue,ue+Oe,Oe):ue-(G+N/2)+Y/2,X=nt==="start"?le-Ze-_e:nt==="center"?le-(Ze+L/2)+oe/2:nt==="end"?le-Le+de+oe:W(Ze,Le,L,_e,de+oe,le,le+ke,ke);const{scrollLeft:ee,scrollTop:fe}=me;U=Re===0?0:Math.max(0,Math.min(fe+U/Re,me.scrollHeight-N/Re+Y)),X=ce===0?0:Math.max(0,Math.min(ee+X/ce,me.scrollWidth-L/ce+oe)),ue+=fe-U,le+=ee-X}Ve.push({el:me,top:U,left:X})}return Ve},A=se=>se===!1?{block:"end",inline:"nearest"}:(y=>y===Object(y)&&Object.keys(y).length!==0)(se)?se:{block:"start",inline:"nearest"};function Ce(se,y){if(!se.isConnected||!(xe=>{let Pe=xe;for(;Pe&&Pe.parentNode;){if(Pe.parentNode===document)return!0;Pe=Pe.parentNode instanceof ShadowRoot?Pe.parentNode.host:Pe.parentNode}return!1})(se))return;const Me=(xe=>{const Pe=window.getComputedStyle(xe);return{top:parseFloat(Pe.scrollMarginTop)||0,right:parseFloat(Pe.scrollMarginRight)||0,bottom:parseFloat(Pe.scrollMarginBottom)||0,left:parseFloat(Pe.scrollMarginLeft)||0}})(se);if((xe=>typeof xe=="object"&&typeof xe.behavior=="function")(y))return y.behavior(F(se,y));const B=typeof y=="boolean"||y==null?void 0:y.behavior;for(const{el:xe,top:Pe,left:q}of F(se,A(y))){const qe=Pe-Me.top+Me.bottom,nt=q-Me.left+Me.right;xe.scroll({top:qe,left:nt,behavior:B})}}}}]);
|