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

107 lines
369 KiB

This file contains ambiguous Unicode characters!

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

(self.webpackChunk=self.webpackChunk||[]).push([[5230],{18299:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return y}});var T=f(87462),x=f(67294),E={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"},B=E,b=f(74643),M=function(V,h){return x.createElement(b.Z,(0,T.Z)({},V,{ref:h,icon:B}))},y=x.forwardRef(M)},42922:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return y}});var T=f(87462),x=f(67294),E={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"},B=E,b=f(74643),M=function(V,h){return x.createElement(b.Z,(0,T.Z)({},V,{ref:h,icon:B}))},y=x.forwardRef(M)},63237:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return y}});var T=f(87462),x=f(67294),E={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"},B=E,b=f(74643),M=function(V,h){return x.createElement(b.Z,(0,T.Z)({},V,{ref:h,icon:B}))},y=x.forwardRef(M)},99569:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return y}});var T=f(87462),x=f(67294),E={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"},B=E,b=f(74643),M=function(V,h){return x.createElement(b.Z,(0,T.Z)({},V,{ref:h,icon:B}))},y=x.forwardRef(M)},17663:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return y}});var T=f(87462),x=f(67294),E={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"},B=E,b=f(74643),M=function(V,h){return x.createElement(b.Z,(0,T.Z)({},V,{ref:h,icon:B}))},y=x.forwardRef(M)},72395:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return y}});var T=f(87462),x=f(67294),E={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"},B=E,b=f(74643),M=function(V,h){return x.createElement(b.Z,(0,T.Z)({},V,{ref:h,icon:B}))},y=x.forwardRef(M)},71749:function(){"use strict"},30483:function(){"use strict"},96670:function(sn,ve,f){"use strict";f.d(ve,{t:function(){return He}});var T=f(67294),x=f(71577),E={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},B=f(94184),b=f.n(B),M=f(35973),y=Object.defineProperty,ue=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,Se=(Ie,we,fe)=>we in Ie?y(Ie,we,{enumerable:!0,configurable:!0,writable:!0,value:fe}):Ie[we]=fe,ce=(Ie,we)=>{for(var fe in we||(we={}))V.call(we,fe)&&Se(Ie,fe,we[fe]);if(ue)for(var fe of ue(we))h.call(we,fe)&&Se(Ie,fe,we[fe]);return Ie};const He=({cancelText:Ie,okText:we,loading:fe=!1,hasOkBtn:k=!0,hasCancelBtn:qe=!0,okButtonProps:wt={},onCancel:te=()=>{},onOk:ne=()=>{},className:g=""})=>{const c=(0,M.useIntl)();return T.createElement("div",{className:b()(E.buttonFixed,g)},T.createElement("div",{className:E.buttonWrap},qe&&T.createElement(x.ZP,{size:"middle",className:`${E.button} mr20`,onClick:te},Ie||c.formatMessage({id:"classrooms.cancel",defaultMessage:"\u53D6\u6D88"})),k&&T.createElement(x.ZP,ce({size:"middle",type:"primary",className:`${E.button} mr20`,loading:fe,onClick:ne},wt),we||c.formatMessage({id:"classrooms.confirm",defaultMessage:"\u786E\u5B9A"}))))}},57444:function(sn,ve,f){"use strict";f.d(ve,{h:function(){return g}});var T=f(67294),x=f(11713),E=f(22150),B=f(71577),b=f(4631),M=f.n(b),y=f(71749),ue=f(30483),V=f(35973),h=Object.defineProperty,Se=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,fe=(c,C,L)=>C in c?h(c,C,{enumerable:!0,configurable:!0,writable:!0,value:L}):c[C]=L,k=(c,C)=>{for(var L in C||(C={}))Ie.call(C,L)&&fe(c,L,C[L]);if(He)for(var L of He(C))we.call(C,L)&&fe(c,L,C[L]);return c},qe=(c,C)=>Se(c,ce(C));const wt=x.default.Option,te={labelCol:{span:4},wrapperCol:{span:20}},ne={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"]};ve.Z=({callback:c,onCancel:C})=>{const[L,J]=(0,T.useState)("python");function z(Me){J(ne[Me][1])}function K(Me){c(Me)}const ee=(0,V.useIntl)();return T.createElement(E.default,qe(k({},te),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:K,style:{width:500}}),T.createElement(E.default.Item,{label:ee.formatMessage({id:"markdownEditor.codeLanguage",defaultMessage:"\u4EE3\u7801\u8BED\u8A00"}),name:"language"},T.createElement(x.default,{getPopupContainer:Me=>Me.parentNode,onChange:z},Object.keys(ne).map(Me=>T.createElement(wt,{key:Me,value:Me},ne[Me][0])))),T.createElement(E.default.Item,{label:ee.formatMessage({id:"markdownEditor.codeContent",defaultMessage:"\u4EE3\u7801\u5185\u5BB9"}),name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},T.createElement(g,{mode:L})),T.createElement("div",{className:"flex-container flex-end"},T.createElement(B.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},ee.formatMessage({id:"markdownEditor.confirm",defaultMessage:"\u786E\u5B9A"})),T.createElement(B.ZP,{type:"ghost",onClick:C},ee.formatMessage({id:"markdownEditor.cancel",defaultMessage:"\u53D6\u6D88"}))))};function g({value:c,onChange:C,mode:L,options:J={}}){const z=(0,T.useRef)(),[K,ee]=(0,T.useState)();return(0,T.useEffect)(()=>{if(K){let Me=function(me){const Qe=me.getValue();C&&C(Qe)};return K.on("change",Me),()=>{K.off("change",Me)}}},[K,C]),(0,T.useEffect)(()=>{K&&K.setOption("mode",L)},[K,L]),(0,T.useEffect)(()=>{K&&(c!==K.getValue()||c==="")&&setTimeout(()=>{K.setValue(c||"")},300)},[K,c]),(0,T.useEffect)(()=>{if(z.current&&!K){const Me=M().fromTextArea(z.current,k({mode:L,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},J));ee(Me)}},[z.current,K]),T.createElement("div",{className:"my-codemirror-container"},T.createElement("textarea",{ref:z}))}},63794:function(sn,ve,f){"use strict";f.r(ve),f.d(ve,{default:function(){return dt}});var T=f(52810),x=f(67294),E=f(35973),B=f(22150),b=f(69677),M=f(57444),y=f(96670),ue={bg:"bg___RM4en",wrap:"wrap___ne3nd",title:"title___Nr8TZ",path:"path___mVozd",colorBlue:"colorBlue___jBwMu",width240:"width240___XDhtB"},V=Object.defineProperty,h=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,He=(P,W,H)=>W in P?V(P,W,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[W]=H,Ie=(P,W)=>{for(var H in W||(W={}))Se.call(W,H)&&He(P,H,W[H]);if(h)for(var H of h(W))ce.call(W,H)&&He(P,H,W[H]);return P},we=(P,W)=>{var H={};for(var ie in P)Se.call(P,ie)&&W.indexOf(ie)<0&&(H[ie]=P[ie]);if(P!=null&&h)for(var ie of h(P))W.indexOf(ie)<0&&ce.call(P,ie)&&(H[ie]=P[ie]);return H},fe=(P,W,H)=>new Promise((ie,yt)=>{var lt=be=>{try{ht(H.next(be))}catch(Je){yt(Je)}},De=be=>{try{ht(H.throw(be))}catch(Je){yt(Je)}},ht=be=>be.done?ie(be.value):Promise.resolve(be.value).then(lt,De);ht((H=H.apply(P,W)).next())});const k=P=>{var W=P,{shixunsDetail:H,globalSetting:ie,loading:yt,user:lt,dispatch:De}=W,ht=we(W,["shixunsDetail","globalSetting","loading","user","dispatch"]);const be=(0,E.useLocation)(),[Je,Tn]=(0,x.useState)({}),Tt=(0,x.useRef)(),Zt=(0,x.useRef)(),[re]=B.default.useForm(),[it,It]=(0,x.useState)("");(0,x.useEffect)(()=>(De({type:"globalSetting/footerToggle",payload:!1}),()=>{De({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,x.useEffect)(()=>{const Dt=sessionStorage.getItem("pathArray");if(Dt){const We=Dt.split(",").join("/"),$t=We.indexOf("/")===0?We.substr(1):We;It($t)}},[]),(0,x.useEffect)(()=>{var Dt,We,$t,Ht;Zt.current=(We=(Dt=be.pathname)==null?void 0:Dt.split("/"))==null?void 0:We[2],Tt.current=((Ht=($t=be.pathname)==null?void 0:$t.split("/"))==null?void 0:Ht[3])==="repository"},[]);const Qt=(...Dt)=>fe(void 0,[...Dt],function*(We={}){if(yield De({type:"shixunsDetail/addRepositoryFile",payload:{id:Zt.current,message:We.commitMessage,content:We.codeMirror,path:`${it?`${it}/`:""}${We.path||""}`,secret_repository:Tt.current?void 0:!0}})){const Ht=Tt.current?`/shixuns/${Zt.current}/repository${it?`/master/shixun_show/${it}`:""}`:`/shixuns/${Zt.current}/secret_repository`;E.history.replace(Ht)}}),Jt=()=>{var Dt,We;E.history.push(`/shixuns/${Zt.current}/${(We=(Dt=be.pathname)==null?void 0:Dt.split("/"))==null?void 0:We[3]}${it?`/master/shixun_show/${it}`:""}`)};return x.createElement("section",{className:ue.bg},x.createElement("div",{className:ue.wrap},x.createElement("div",{className:ue.title},"\u65B0\u5EFA\u6587\u4EF6"),x.createElement(B.default,{className:"mt10",form:re,scrollToFirstError:!0,layout:"vertical",onFinish:Qt,onValuesChange:()=>Tn(Ie({},re.getFieldsValue()))},x.createElement(B.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},x.createElement(B.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},x.createElement("span",null,x.createElement("span",{className:"mr5"},it?`${it}/`:""),x.createElement(b.default,{className:ue.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),x.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")),x.createElement(B.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"}]},x.createElement(b.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"})),x.createElement("div",{className:"mt10 mb20"},x.createElement(B.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},x.createElement(M.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"]}}))),x.createElement(B.default.Item,{noStyle:!0},x.createElement(y.t,{okButtonProps:{htmlType:"submit"},onCancel:Jt})))))};var qe=(0,E.connect)(({shixunsDetail:P,loading:W,globalSetting:H,user:ie})=>({shixunsDetail:P,globalSetting:H,user:ie,loading:W.models.index}))(k),wt={bg:"bg___hW0a5",wrap:"wrap___qsjmY",title:"title___TYQ3w",path:"path___J3ICf",colorBlue:"colorBlue___r1F5X",width240:"width240___Vbbdg"},te=Object.defineProperty,ne=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,C=(P,W,H)=>W in P?te(P,W,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[W]=H,L=(P,W)=>{for(var H in W||(W={}))g.call(W,H)&&C(P,H,W[H]);if(ne)for(var H of ne(W))c.call(W,H)&&C(P,H,W[H]);return P},J=(P,W)=>{var H={};for(var ie in P)g.call(P,ie)&&W.indexOf(ie)<0&&(H[ie]=P[ie]);if(P!=null&&ne)for(var ie of ne(P))W.indexOf(ie)<0&&c.call(P,ie)&&(H[ie]=P[ie]);return H},z=(P,W,H)=>new Promise((ie,yt)=>{var lt=be=>{try{ht(H.next(be))}catch(Je){yt(Je)}},De=be=>{try{ht(H.throw(be))}catch(Je){yt(Je)}},ht=be=>be.done?ie(be.value):Promise.resolve(be.value).then(lt,De);ht((H=H.apply(P,W)).next())});const K=P=>{var W=P,{shixunsDetail:H,globalSetting:ie,loading:yt,user:lt,dispatch:De}=W,ht=J(W,["shixunsDetail","globalSetting","loading","user","dispatch"]);const be=(0,E.useLocation)(),[Je,Tn]=(0,x.useState)({}),Tt=(0,x.useRef)(),Zt=(0,x.useRef)(),[re]=B.default.useForm(),[it,It]=(0,x.useState)("");(0,x.useEffect)(()=>(De({type:"globalSetting/footerToggle",payload:!1}),()=>{De({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,x.useEffect)(()=>{const Dt=sessionStorage.getItem("pathArray");if(Dt){const We=Dt.split(",").join("/"),$t=We.indexOf("/")===0?We.substr(1):We;It($t)}},[]),(0,x.useEffect)(()=>{var Dt,We,$t,Ht;Zt.current=(We=(Dt=be.pathname)==null?void 0:Dt.split("/"))==null?void 0:We[2],Tt.current=((Ht=($t=be.pathname)==null?void 0:$t.split("/"))==null?void 0:Ht[3])==="repository"},[]);const Qt=(...Dt)=>z(void 0,[...Dt],function*(We={}){if(yield De({type:"shixunsDetail/addRepositoryFile",payload:{id:Zt.current,message:We.commitMessage,content:We.codeMirror,path:`${it?`${it}/`:""}${We.path||""}`,secret_repository:Tt.current?void 0:!0}})){const Ht=Tt.current?`/shixuns/${Zt.current}/repository${it?`/master/shixun_show/${it}`:""}`:`/shixuns/${Zt.current}/secret_repository`;E.history.replace(Ht)}}),Jt=()=>{var Dt,We;E.history.push(`/shixuns/${Zt.current}/${(We=(Dt=be.pathname)==null?void 0:Dt.split("/"))==null?void 0:We[3]}${it?`/master/shixun_show/${it}`:""}`)};return x.createElement("section",{className:wt.bg},x.createElement("div",{className:wt.wrap},x.createElement("div",{className:wt.title},"\u65B0\u5EFA\u6587\u4EF6"),x.createElement(B.default,{className:"mt10",form:re,scrollToFirstError:!0,layout:"vertical",onFinish:Qt,onValuesChange:()=>Tn(L({},re.getFieldsValue()))},x.createElement(B.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},x.createElement(B.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},x.createElement("span",null,x.createElement("span",{className:"mr5"},it?`${it}/`:""),x.createElement(b.default,{className:wt.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),x.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")),x.createElement(B.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"}]},x.createElement(b.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"})),x.createElement("div",{className:"mt10 mb20"},x.createElement(B.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},x.createElement(M.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"]}}))),x.createElement(B.default.Item,{noStyle:!0},x.createElement(y.t,{okButtonProps:{htmlType:"submit"},onCancel:Jt})))))};var ee=(0,E.connect)(({shixunsDetail:P,loading:W,globalSetting:H,user:ie})=>({shixunsDetail:P,globalSetting:H,user:ie,loading:W.models.index}))(K),Me={bg:"bg___mZRyL",wrap:"wrap___PZp9Q",title:"title___k98J0",path:"path___rTXhN",colorBlue:"colorBlue___Jn7qR",width240:"width240___RvfYr"},me=Object.defineProperty,Qe=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,gt=(P,W,H)=>W in P?me(P,W,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[W]=H,mt=(P,W)=>{for(var H in W||(W={}))et.call(W,H)&&gt(P,H,W[H]);if(Qe)for(var H of Qe(W))_e.call(W,H)&&gt(P,H,W[H]);return P},at=(P,W)=>{var H={};for(var ie in P)et.call(P,ie)&&W.indexOf(ie)<0&&(H[ie]=P[ie]);if(P!=null&&Qe)for(var ie of Qe(P))W.indexOf(ie)<0&&_e.call(P,ie)&&(H[ie]=P[ie]);return H},Ke=(P,W,H)=>new Promise((ie,yt)=>{var lt=be=>{try{ht(H.next(be))}catch(Je){yt(Je)}},De=be=>{try{ht(H.throw(be))}catch(Je){yt(Je)}},ht=be=>be.done?ie(be.value):Promise.resolve(be.value).then(lt,De);ht((H=H.apply(P,W)).next())});const je=P=>{var W=P,{shixunsDetail:H,globalSetting:ie,loading:yt,user:lt,dispatch:De}=W,ht=at(W,["shixunsDetail","globalSetting","loading","user","dispatch"]);const be=(0,E.useLocation)(),[Je,Tn]=(0,x.useState)({}),Tt=(0,x.useRef)(),Zt=(0,x.useRef)(),[re]=B.default.useForm(),[it,It]=(0,x.useState)("");(0,x.useEffect)(()=>(De({type:"globalSetting/footerToggle",payload:!1}),()=>{De({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,x.useEffect)(()=>{const Dt=sessionStorage.getItem("pathArray");if(Dt){const We=Dt.split(",").join("/"),$t=We.indexOf("/")===0?We.substr(1):We;It($t)}},[]),(0,x.useEffect)(()=>{var Dt,We,$t,Ht;Zt.current=(We=(Dt=be.pathname)==null?void 0:Dt.split("/"))==null?void 0:We[2],Tt.current=((Ht=($t=be.pathname)==null?void 0:$t.split("/"))==null?void 0:Ht[3])==="repository"},[]);const Qt=(...Dt)=>Ke(void 0,[...Dt],function*(We={}){if(yield De({type:"shixunsDetail/addRepositoryFile",payload:{id:Zt.current,message:We.commitMessage,content:We.codeMirror,path:`${it?`${it}/`:""}${We.path||""}`,secret_repository:Tt.current?void 0:!0}})){const Ht=Tt.current?`/shixuns/${Zt.current}/repository${it?`/master/shixun_show/${it}`:""}`:`/shixuns/${Zt.current}/secret_repository`;E.history.replace(Ht)}}),Jt=()=>{var Dt,We;E.history.push(`/shixuns/${Zt.current}/${(We=(Dt=be.pathname)==null?void 0:Dt.split("/"))==null?void 0:We[3]}${it?`/master/shixun_show/${it}`:""}`)};return x.createElement("section",{className:Me.bg},x.createElement("div",{className:Me.wrap},x.createElement("div",{className:Me.title},"\u65B0\u5EFA\u6587\u4EF6"),x.createElement(B.default,{className:"mt10",form:re,scrollToFirstError:!0,layout:"vertical",onFinish:Qt,onValuesChange:()=>Tn(mt({},re.getFieldsValue()))},x.createElement(B.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},x.createElement(B.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},x.createElement("span",null,x.createElement("span",{className:"mr5"},it?`${it}/`:""),x.createElement(b.default,{className:Me.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),x.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")),x.createElement(B.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"}]},x.createElement(b.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"})),x.createElement("div",{className:"mt10 mb20"},x.createElement(B.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},x.createElement(M.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"]}}))),x.createElement(B.default.Item,{noStyle:!0},x.createElement(y.t,{okButtonProps:{htmlType:"submit"},onCancel:Jt})))))};var Ot=(0,E.connect)(({shixunsDetail:P,loading:W,globalSetting:H,user:ie})=>({shixunsDetail:P,globalSetting:H,user:ie,loading:W.models.index}))(je),Nt={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},Ve=Object.defineProperty,rt=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,Wn=(P,W,H)=>W in P?Ve(P,W,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[W]=H,xe=(P,W)=>{for(var H in W||(W={}))Xe.call(W,H)&&Wn(P,H,W[H]);if(rt)for(var H of rt(W))vn.call(W,H)&&Wn(P,H,W[H]);return P},he=(P,W)=>{var H={};for(var ie in P)Xe.call(P,ie)&&W.indexOf(ie)<0&&(H[ie]=P[ie]);if(P!=null&&rt)for(var ie of rt(P))W.indexOf(ie)<0&&vn.call(P,ie)&&(H[ie]=P[ie]);return H},ze=(P,W,H)=>new Promise((ie,yt)=>{var lt=be=>{try{ht(H.next(be))}catch(Je){yt(Je)}},De=be=>{try{ht(H.throw(be))}catch(Je){yt(Je)}},ht=be=>be.done?ie(be.value):Promise.resolve(be.value).then(lt,De);ht((H=H.apply(P,W)).next())});const ye=P=>{var W=P,{shixunsDetail:H,globalSetting:ie,loading:yt,user:lt,dispatch:De}=W,ht=he(W,["shixunsDetail","globalSetting","loading","user","dispatch"]);const be=(0,E.useIntl)(),Je=(0,E.useLocation)(),[Tn,Tt]=(0,x.useState)({}),Zt=(0,x.useRef)(),re=(0,x.useRef)(),[it]=B.default.useForm(),[It,Qt]=(0,x.useState)("");(0,x.useEffect)(()=>(De({type:"globalSetting/footerToggle",payload:!1}),()=>{De({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,x.useEffect)(()=>{const We=sessionStorage.getItem("pathArray");if(We){const $t=We.split(",").join("/"),Ht=$t.indexOf("/")===0?$t.substr(1):$t;Qt(Ht)}},[]),(0,x.useEffect)(()=>{var We,$t,Ht,An;re.current=($t=(We=Je.pathname)==null?void 0:We.split("/"))==null?void 0:$t[2],Zt.current=((An=(Ht=Je.pathname)==null?void 0:Ht.split("/"))==null?void 0:An[3])==="repository"},[]);const Jt=(...We)=>ze(void 0,[...We],function*($t={}){if(yield De({type:"shixunsDetail/addRepositoryFile",payload:{id:re.current,message:$t.commitMessage,content:$t.codeMirror,path:`${It?`${It}/`:""}${$t.path||""}`,secret_repository:Zt.current?void 0:!0}})){const An=Zt.current?`/shixuns/${re.current}/repository${It?`/master/shixun_show/${It}`:""}`:`/shixuns/${re.current}/secret_repository`;E.history.replace(An)}}),Dt=()=>{var We,$t;E.history.push(`/shixuns/${re.current}/${($t=(We=Je.pathname)==null?void 0:We.split("/"))==null?void 0:$t[3]}${It?`/master/shixun_show/${It}`:""}`)};return x.createElement("section",{className:Nt.bg},x.createElement("div",{className:Nt.wrap},x.createElement("div",{className:Nt.title},be.formatMessage({id:"shixuns.newFile",defaultMessage:"\u65B0\u5EFA\u6587\u4EF6"})),x.createElement(B.default,{className:"mt10",form:it,scrollToFirstError:!0,layout:"vertical",onFinish:Jt,onValuesChange:()=>Tt(xe({},it.getFieldsValue()))},x.createElement(B.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},x.createElement(B.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:be.formatMessage({id:"paths.noSpaces",defaultMessage:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"})}],noStyle:!0},x.createElement("span",null,x.createElement("span",{className:"mr5"},It?`${It}/`:""),x.createElement(b.default,{className:Nt.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),x.createElement("span",{className:"ml5"},be.formatMessage({id:"shixuns.prompt",defaultMessage:"\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")),x.createElement(B.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:be.formatMessage({id:"paths.noSpaces",defaultMessage:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"})}]},x.createElement(b.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"})),x.createElement("div",{className:"mt10 mb20"},x.createElement(B.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},x.createElement(M.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"]}}))),x.createElement(B.default.Item,{noStyle:!0},x.createElement(y.t,{okButtonProps:{htmlType:"submit"},onCancel:Dt})))))};var ut=(0,E.connect)(({shixunsDetail:P,loading:W,globalSetting:H,user:ie})=>({shixunsDetail:P,globalSetting:H,user:ie,loading:W.models.index}))(ye);const Mt=({globalSetting:P})=>{var W;switch(Number((W=P==null?void 0:P.setting)==null?void 0:W.theme)){case T.Fy.THEMEONE:return x.createElement(qe,null);case T.Fy.THEMETWO:return x.createElement(ee,null);case T.Fy.THEMETHREE:return x.createElement(Ot,null);case T.Fy.DEFAULT:default:return x.createElement(ut,null)}};var dt=(0,E.connect)(({globalSetting:P})=>({globalSetting:P}))(Mt)},9708:function(sn,ve,f){"use strict";f.d(ve,{F:function(){return b},Z:function(){return B}});var T=f(94184),x=f.n(T);const E=null;function B(M,y,ue){return x()({[`${M}-status-success`]:y==="success",[`${M}-status-warning`]:y==="warning",[`${M}-status-error`]:y==="error",[`${M}-status-validating`]:y==="validating",[`${M}-has-feedback`]:ue})}const b=(M,y)=>y||M},88258:function(sn,ve,f){"use strict";var T=f(67294),x=f(53124),E=f(32983);const B=b=>{const{componentName:M}=b,{getPrefixCls:y}=(0,T.useContext)(x.E_),ue=y("empty");switch(M){case"Table":case"List":return T.createElement(E.Z,{image:E.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return T.createElement(E.Z,{image:E.Z.PRESENTED_IMAGE_SIMPLE,className:`${ue}-small`});default:return T.createElement(E.Z,null)}};ve.Z=B},32983:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return te}});var T=f(94184),x=f.n(T),E=f(67294),B=f(53124),b=f(10110),M=f(84780),y=f(46605),V=()=>{const[,ne]=(0,y.Z)(),c=new M.C(ne.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return E.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},E.createElement("g",{fill:"none",fillRule:"evenodd"},E.createElement("g",{transform:"translate(24 31.67)"},E.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),E.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"}),E.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)"}),E.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"}),E.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"})),E.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"}),E.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},E.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),E.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Se=()=>{const[,ne]=(0,y.Z)(),{colorFill:g,colorFillTertiary:c,colorFillQuaternary:C,colorBgContainer:L}=ne,{borderColor:J,shadowColor:z,contentColor:K}=(0,E.useMemo)(()=>({borderColor:new M.C(g).onBackground(L).toHexShortString(),shadowColor:new M.C(c).onBackground(L).toHexShortString(),contentColor:new M.C(C).onBackground(L).toHexShortString()}),[g,c,C,L]);return E.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},E.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},E.createElement("ellipse",{fill:z,cx:"32",cy:"33",rx:"32",ry:"7"}),E.createElement("g",{fillRule:"nonzero",stroke:J},E.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"}),E.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:K}))))},ce=f(67968),He=f(45503);const Ie=ne=>{const{componentCls:g,margin:c,marginXS:C,marginXL:L,fontSize:J,lineHeight:z}=ne;return{[g]:{marginInline:C,fontSize:J,lineHeight:z,textAlign:"center",[`${g}-image`]:{height:ne.emptyImgHeight,marginBottom:C,opacity:ne.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${g}-description`]:{color:ne.colorText},[`${g}-footer`]:{marginTop:c},"&-normal":{marginBlock:L,color:ne.colorTextDisabled,[`${g}-description`]:{color:ne.colorTextDisabled},[`${g}-image`]:{height:ne.emptyImgHeightMD}},"&-small":{marginBlock:C,color:ne.colorTextDisabled,[`${g}-image`]:{height:ne.emptyImgHeightSM}}}}};var we=(0,ce.Z)("Empty",ne=>{const{componentCls:g,controlHeightLG:c}=ne,C=(0,He.TS)(ne,{emptyImgCls:`${g}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Ie(C)]}),fe=function(ne,g){var c={};for(var C in ne)Object.prototype.hasOwnProperty.call(ne,C)&&g.indexOf(C)<0&&(c[C]=ne[C]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,C=Object.getOwnPropertySymbols(ne);L<C.length;L++)g.indexOf(C[L])<0&&Object.prototype.propertyIsEnumerable.call(ne,C[L])&&(c[C[L]]=ne[C[L]]);return c};const k=E.createElement(V,null),qe=E.createElement(Se,null),wt=ne=>{var{className:g,rootClassName:c,prefixCls:C,image:L=k,description:J,children:z,imageStyle:K,style:ee}=ne,Me=fe(ne,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:me,direction:Qe,empty:et}=E.useContext(B.E_),_e=me("empty",C),[gt,mt]=we(_e),[at]=(0,b.Z)("Empty"),Ke=typeof J!="undefined"?J:at==null?void 0:at.description,je=typeof Ke=="string"?Ke:"empty";let Ot=null;return typeof L=="string"?Ot=E.createElement("img",{alt:je,src:L}):Ot=L,gt(E.createElement("div",Object.assign({className:x()(mt,_e,et==null?void 0:et.className,{[`${_e}-normal`]:L===qe,[`${_e}-rtl`]:Qe==="rtl"},g,c),style:Object.assign(Object.assign({},et==null?void 0:et.style),ee)},Me),E.createElement("div",{className:`${_e}-image`,style:K},Ot),Ke&&E.createElement("div",{className:`${_e}-description`},Ke),z&&E.createElement("div",{className:`${_e}-footer`},z)))};wt.PRESENTED_IMAGE_DEFAULT=k,wt.PRESENTED_IMAGE_SIMPLE=qe;var te=wt},22150:function(sn,ve,f){"use strict";f.d(ve,{default:function(){return Ye}});var T=f(74902),x=f(94184),E=f.n(x),B=f(38379),b=f(67294),M=f(33603),y=f(65223);function ue(m){const[F,N]=b.useState(m);return b.useEffect(()=>{const A=setTimeout(()=>{N(m)},m.length?0:10);return()=>{clearTimeout(A)}},[m]),F}var V=f(14747),h=f(50438),Se=f(33507),ce=f(45503),He=f(67968),we=m=>{const{componentCls:F}=m,N=`${F}-show-help`,A=`${F}-show-help-item`;return{[N]:{transition:`opacity ${m.motionDurationSlow} ${m.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[A]:{overflow:"hidden",transition:`height ${m.motionDurationSlow} ${m.motionEaseInOut},
opacity ${m.motionDurationSlow} ${m.motionEaseInOut},
transform ${m.motionDurationSlow} ${m.motionEaseInOut} !important`,[`&${A}-appear, &${A}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${A}-leave-active`]:{transform:"translateY(-5px)"}}}}};const fe=m=>({legend:{display:"block",width:"100%",marginBottom:m.marginLG,padding:0,color:m.colorTextDescription,fontSize:m.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${m.lineWidth}px ${m.lineType} ${m.colorBorder}`},label:{fontSize:m.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${m.controlOutlineWidth}px ${m.controlOutline}`},output:{display:"block",paddingTop:15,color:m.colorText,fontSize:m.fontSize,lineHeight:m.lineHeight}}),k=(m,F)=>{const{formItemCls:N}=m;return{[N]:{[`${N}-label > label`]:{height:F},[`${N}-control-input`]:{minHeight:F}}}},qe=m=>{const{componentCls:F}=m;return{[m.componentCls]:Object.assign(Object.assign(Object.assign({},(0,V.Wf)(m)),fe(m)),{[`${F}-text`]:{display:"inline-block",paddingInlineEnd:m.paddingSM},"&-small":Object.assign({},k(m,m.controlHeightSM)),"&-large":Object.assign({},k(m,m.controlHeightLG))})}},wt=m=>{const{formItemCls:F,iconCls:N,componentCls:A,rootPrefixCls:Z,labelRequiredMarkColor:$,labelColor:$e,labelFontSize:St,labelHeight:tt,labelColonMarginInlineStart:Ce,labelColonMarginInlineEnd:Te,itemMarginBottom:Pe}=m;return{[F]:Object.assign(Object.assign({},(0,V.Wf)(m)),{marginBottom:Pe,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${Z}-row`]:{display:"none"},"&-has-warning":{[`${F}-split`]:{color:m.colorError}},"&-has-error":{[`${F}-split`]:{color:m.colorWarning}},[`${F}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${m.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:tt,color:$e,fontSize:St,[`> ${N}`]:{fontSize:m.fontSize,verticalAlign:"top"},[`&${F}-required:not(${F}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:m.marginXXS,color:$,fontSize:m.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${A}-hide-required-mark &`]:{display:"none"}},[`${F}-optional`]:{display:"inline-block",marginInlineStart:m.marginXXS,color:m.colorTextDescription,[`${A}-hide-required-mark &`]:{display:"none"}},[`${F}-tooltip`]:{color:m.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:m.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Ce,marginInlineEnd:Te},[`&${F}-no-colon::after`]:{content:'"\\a0"'}}},[`${F}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Z}-col-'"]):not([class*="' ${Z}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:m.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[F]:{"&-explain, &-extra":{clear:"both",color:m.colorTextDescription,fontSize:m.fontSize,lineHeight:m.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:m.controlHeightSM,transition:`color ${m.motionDurationMid} ${m.motionEaseOut}`},"&-explain":{"&-error":{color:m.colorError},"&-warning":{color:m.colorWarning}}},[`&-with-help ${F}-explain`]:{height:"auto",opacity:1},[`${F}-feedback-icon`]:{fontSize:m.fontSize,textAlign:"center",visibility:"visible",animationName:h.kr,animationDuration:m.motionDurationMid,animationTimingFunction:m.motionEaseOutBack,pointerEvents:"none","&-success":{color:m.colorSuccess},"&-error":{color:m.colorError},"&-warning":{color:m.colorWarning},"&-validating":{color:m.colorPrimary}}})}},te=m=>{const{componentCls:F,formItemCls:N}=m;return{[`${F}-horizontal`]:{[`${N}-label`]:{flexGrow:0},[`${N}-control`]:{flex:"1 1 0",minWidth:0},[`${N}-label[class$='-24'], ${N}-label[class*='-24 ']`]:{[`& + ${N}-control`]:{minWidth:"unset"}}}}},ne=m=>{const{componentCls:F,formItemCls:N}=m;return{[`${F}-inline`]:{display:"flex",flexWrap:"wrap",[N]:{flex:"none",marginInlineEnd:m.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${N}-label,
> ${N}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${N}-label`]:{flex:"none"},[`${F}-text`]:{display:"inline-block"},[`${N}-has-feedback`]:{display:"inline-block"}}}}},g=m=>({padding:m.verticalLabelPadding,margin:m.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=m=>{const{componentCls:F,formItemCls:N,rootPrefixCls:A}=m;return{[`${N} ${N}-label`]:g(m),[F]:{[N]:{flexWrap:"wrap",[`${N}-label, ${N}-control`]:{[`&:not([class*=" ${A}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},C=m=>{const{componentCls:F,formItemCls:N,rootPrefixCls:A}=m;return{[`${F}-vertical`]:{[N]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${F}-item-control`]:{width:"100%"}}},[`${F}-vertical ${N}-label,
.${A}-col-24${N}-label,
.${A}-col-xl-24${N}-label`]:g(m),[`@media (max-width: ${m.screenXSMax}px)`]:[c(m),{[F]:{[`.${A}-col-xs-24${N}-label`]:g(m)}}],[`@media (max-width: ${m.screenSMMax}px)`]:{[F]:{[`.${A}-col-sm-24${N}-label`]:g(m)}},[`@media (max-width: ${m.screenMDMax}px)`]:{[F]:{[`.${A}-col-md-24${N}-label`]:g(m)}},[`@media (max-width: ${m.screenLGMax}px)`]:{[F]:{[`.${A}-col-lg-24${N}-label`]:g(m)}}}},L=(m,F)=>(0,ce.TS)(m,{formItemCls:`${m.componentCls}-item`,rootPrefixCls:F});var J=(0,He.Z)("Form",(m,F)=>{let{rootPrefixCls:N}=F;const A=L(m,N);return[qe(A),wt(A),we(A),te(A),ne(A),C(A),(0,Se.Z)(A),h.kr]},m=>({labelRequiredMarkColor:m.colorError,labelColor:m.colorTextHeading,labelFontSize:m.fontSize,labelHeight:m.controlHeight,labelColonMarginInlineStart:m.marginXXS/2,labelColonMarginInlineEnd:m.marginXS,itemMarginBottom:m.marginLG,verticalLabelPadding:`0 0 ${m.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const z=[];function K(m,F,N){let A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof m=="string"?m:`${F}-${A}`,error:m,errorStatus:N}}var Me=m=>{let{help:F,helpStatus:N,errors:A=z,warnings:Z=z,className:$,fieldId:$e,onVisibleChanged:St}=m;const{prefixCls:tt}=b.useContext(y.Rk),Ce=`${tt}-item-explain`,[,Te]=J(tt),Pe=(0,b.useMemo)(()=>(0,M.Z)(tt),[tt]),Gt=ue(A),U=ue(Z),Be=b.useMemo(()=>F!=null?[K(F,"help",N)]:[].concat((0,T.Z)(Gt.map((xn,At)=>K(xn,"error","error",At))),(0,T.Z)(U.map((xn,At)=>K(xn,"warning","warning",At)))),[F,N,Gt,U]),rn={};return $e&&(rn.id=`${$e}_help`),b.createElement(B.default,{motionDeadline:Pe.motionDeadline,motionName:`${tt}-show-help`,visible:!!Be.length,onVisibleChanged:St},xn=>{const{className:At,style:Ct}=xn;return b.createElement("div",Object.assign({},rn,{className:E()(Ce,At,$,Te),style:Ct,role:"alert"}),b.createElement(B.CSSMotionList,Object.assign({keys:Be},(0,M.Z)(tt),{motionName:`${tt}-show-help-item`,component:!1}),Mn=>{const{key:Ne,error:cn,errorStatus:on,className:In,style:Sn}=Mn;return b.createElement("div",{key:Ne,className:E()(In,{[`${Ce}-${on}`]:on}),style:Sn},cn)}))})},me=f(58083),Qe=f(53124),et=f(98866),_e=f(97647),gt=f(98675),mt=f(17423);const at=["parentNode"],Ke="form_item";function je(m){return m===void 0||m===!1?[]:Array.isArray(m)?m:[m]}function Ot(m,F){if(!m.length)return;const N=m.join("_");return F?`${F}_${N}`:at.includes(N)?`${Ke}_${N}`:N}function Nt(m,F,N,A,Z,$){let $e=A;return $!==void 0?$e=$:N.validating?$e="validating":m.length?$e="error":F.length?$e="warning":(N.touched||Z&&N.validated)&&($e="success"),$e}function Ve(m){return je(m).join("_")}function rt(m){const[F]=(0,me.useForm)(),N=b.useRef({}),A=b.useMemo(()=>m!=null?m:Object.assign(Object.assign({},F),{__INTERNAL__:{itemRef:Z=>$=>{const $e=Ve(Z);$?N.current[$e]=$:delete N.current[$e]}},scrollToField:function(Z){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const $e=je(Z),St=Ot($e,A.__INTERNAL__.name),tt=St?document.getElementById(St):null;tt&&(0,mt.Z)(tt,Object.assign({scrollMode:"if-needed",block:"nearest"},$))},getFieldInstance:Z=>{const $=Ve(Z);return N.current[$]}}),[m,F]);return[A]}var Xe=f(37920),vn=function(m,F){var N={};for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&F.indexOf(A)<0&&(N[A]=m[A]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,A=Object.getOwnPropertySymbols(m);Z<A.length;Z++)F.indexOf(A[Z])<0&&Object.prototype.propertyIsEnumerable.call(m,A[Z])&&(N[A[Z]]=m[A[Z]]);return N};const Wn=(m,F)=>{const N=b.useContext(et.Z),{getPrefixCls:A,direction:Z,form:$}=b.useContext(Qe.E_),{prefixCls:$e,className:St,rootClassName:tt,size:Ce,disabled:Te=N,form:Pe,colon:Gt,labelAlign:U,labelWrap:Be,labelCol:rn,wrapperCol:xn,hideRequiredMark:At,layout:Ct="horizontal",scrollToFirstError:Mn,requiredMark:Ne,onFinishFailed:cn,name:on,style:In,feedbackIcons:Sn}=m,Sr=vn(m,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Gn=(0,gt.Z)(Ce),Zn=b.useContext(Xe.Z),Rr=(0,b.useMemo)(()=>Ne!==void 0?Ne:$&&$.requiredMark!==void 0?$.requiredMark:!At,[At,Ne,$]),Fr=Gt!=null?Gt:$==null?void 0:$.colon,Nn=A("form",$e),[Cr,dr]=J(Nn),xr=E()(Nn,`${Nn}-${Ct}`,{[`${Nn}-hide-required-mark`]:Rr===!1,[`${Nn}-rtl`]:Z==="rtl",[`${Nn}-${Gn}`]:Gn},dr,$==null?void 0:$.className,St,tt),[On]=rt(Pe),{__INTERNAL__:ar}=On;ar.name=on;const Xn=(0,b.useMemo)(()=>({name:on,labelAlign:U,labelCol:rn,labelWrap:Be,wrapperCol:xn,vertical:Ct==="vertical",colon:Fr,requiredMark:Rr,itemRef:ar.itemRef,form:On,feedbackIcons:Sn}),[on,U,rn,xn,Ct,Fr,Rr,On,Sn]);b.useImperativeHandle(F,()=>On);const Yn=(hr,En)=>{if(hr){let Un={block:"nearest"};typeof hr=="object"&&(Un=hr),On.scrollToField(En,Un)}},tr=hr=>{if(cn==null||cn(hr),hr.errorFields.length){const En=hr.errorFields[0].name;if(Mn!==void 0){Yn(Mn,En);return}$&&$.scrollToFirstError!==void 0&&Yn($.scrollToFirstError,En)}};return Cr(b.createElement(et.n,{disabled:Te},b.createElement(_e.q,{size:Gn},b.createElement(y.RV,Object.assign({},{validateMessages:Zn}),b.createElement(y.q3.Provider,{value:Xn},b.createElement(me.default,Object.assign({id:on},Sr,{name:on,onFinishFailed:tr,form:On,style:Object.assign(Object.assign({},$==null?void 0:$.style),In),className:xr})))))))};var he=b.forwardRef(Wn),ze=f(9475),ye=f(17799),ut=f(96159),Mt=f(37419);function dt(m){if(typeof m=="function")return m;const F=(0,Mt.Z)(m);return F.length<=1?F[0]:F}const P=()=>{const{status:m,errors:F=[],warnings:N=[]}=(0,b.useContext)(y.aM);return{status:m,errors:F,warnings:N}};P.Context=y.aM;var W=P,H=f(96523);function ie(m){const[F,N]=b.useState(m),A=(0,b.useRef)(null),Z=(0,b.useRef)([]),$=(0,b.useRef)(!1);b.useEffect(()=>($.current=!1,()=>{$.current=!0,H.Z.cancel(A.current),A.current=null}),[]);function $e(St){$.current||(A.current===null&&(Z.current=[],A.current=(0,H.Z)(()=>{A.current=null,N(tt=>{let Ce=tt;return Z.current.forEach(Te=>{Ce=Te(Ce)}),Ce})})),Z.current.push(St))}return[F,$e]}function yt(){const{itemRef:m}=b.useContext(y.q3),F=b.useRef({});function N(A,Z){const $=Z&&typeof Z=="object"&&Z.ref,$e=A.join("_");return(F.current.name!==$e||F.current.originRef!==$)&&(F.current.name=$e,F.current.originRef=$,F.current.ref=(0,ye.sQ)(m(A),$)),F.current.ref}return N}var lt=f(48130),De=f(14075),ht=f(10366),be=f(92820),Je=f(21584);const Tn=m=>{const{formItemCls:F}=m;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${F}-control`]:{display:"flex"}}}};var Tt=(0,He.b)(["Form","item-item"],(m,F)=>{let{rootPrefixCls:N}=F;const A=L(m,N);return[Tn(A)]}),re=m=>{const{prefixCls:F,status:N,wrapperCol:A,children:Z,errors:$,warnings:$e,_internalItemRender:St,extra:tt,help:Ce,fieldId:Te,marginBottom:Pe,onErrorVisibleChanged:Gt}=m,U=`${F}-item`,Be=b.useContext(y.q3),rn=A||Be.wrapperCol||{},xn=E()(`${U}-control`,rn.className),At=b.useMemo(()=>Object.assign({},Be),[Be]);delete At.labelCol,delete At.wrapperCol;const Ct=b.createElement("div",{className:`${U}-control-input`},b.createElement("div",{className:`${U}-control-input-content`},Z)),Mn=b.useMemo(()=>({prefixCls:F,status:N}),[F,N]),Ne=Pe!==null||$.length||$e.length?b.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},b.createElement(y.Rk.Provider,{value:Mn},b.createElement(Me,{fieldId:Te,errors:$,warnings:$e,help:Ce,helpStatus:N,className:`${U}-explain-connected`,onVisibleChanged:Gt})),!!Pe&&b.createElement("div",{style:{width:0,height:Pe}})):null,cn={};Te&&(cn.id=`${Te}_extra`);const on=tt?b.createElement("div",Object.assign({},cn,{className:`${U}-extra`}),tt):null,In=St&&St.mark==="pro_table_render"&&St.render?St.render(m,{input:Ct,errorList:Ne,extra:on}):b.createElement(b.Fragment,null,Ct,Ne,on);return b.createElement(y.q3.Provider,{value:At},b.createElement(Je.Z,Object.assign({},rn,{className:xn}),In),b.createElement(Tt,{prefixCls:F}))},it=f(17663),It=f(24457),Qt=f(10110),Jt=f(83062),Dt=function(m,F){var N={};for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&F.indexOf(A)<0&&(N[A]=m[A]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,A=Object.getOwnPropertySymbols(m);Z<A.length;Z++)F.indexOf(A[Z])<0&&Object.prototype.propertyIsEnumerable.call(m,A[Z])&&(N[A[Z]]=m[A[Z]]);return N};function We(m){return m?typeof m=="object"&&!b.isValidElement(m)?m:{title:m}:null}var Ht=m=>{let{prefixCls:F,label:N,htmlFor:A,labelCol:Z,labelAlign:$,colon:$e,required:St,requiredMark:tt,tooltip:Ce}=m;var Te;const[Pe]=(0,Qt.Z)("Form"),{vertical:Gt,labelAlign:U,labelCol:Be,labelWrap:rn,colon:xn}=b.useContext(y.q3);if(!N)return null;const At=Z||Be||{},Ct=$||U,Mn=`${F}-item-label`,Ne=E()(Mn,Ct==="left"&&`${Mn}-left`,At.className,{[`${Mn}-wrap`]:!!rn});let cn=N;const on=$e===!0||xn!==!1&&$e!==!1;on&&!Gt&&typeof N=="string"&&N.trim()!==""&&(cn=N.replace(/[:|]\s*$/,""));const Sn=We(Ce);if(Sn){const{icon:Rr=b.createElement(it.Z,null)}=Sn,Fr=Dt(Sn,["icon"]),Nn=b.createElement(Jt.Z,Object.assign({},Fr),b.cloneElement(Rr,{className:`${F}-item-tooltip`,title:""}));cn=b.createElement(b.Fragment,null,cn,Nn)}const Sr=tt==="optional",Gn=typeof tt=="function";Gn?cn=tt(cn,{required:!!St}):Sr&&!St&&(cn=b.createElement(b.Fragment,null,cn,b.createElement("span",{className:`${F}-item-optional`,title:""},(Pe==null?void 0:Pe.optional)||((Te=It.Z.Form)===null||Te===void 0?void 0:Te.optional))));const Zn=E()({[`${F}-item-required`]:St,[`${F}-item-required-mark-optional`]:Sr||Gn,[`${F}-item-no-colon`]:!on});return b.createElement(Je.Z,Object.assign({},At,{className:Ne}),b.createElement("label",{htmlFor:A,className:Zn,title:typeof N=="string"?N:""},cn))},An=f(87725),jr=f(16646),kr=f(87995),Si=f(3407);const li={success:An.Z,warning:kr.Z,error:jr.Z,validating:Si.Z};function Oi(m){let{children:F,errors:N,warnings:A,hasFeedback:Z,validateStatus:$,prefixCls:$e,meta:St,noStyle:tt}=m;const Ce=`${$e}-item`,{feedbackIcons:Te}=b.useContext(y.q3),Pe=Nt(N,A,St,null,!!Z,$),{isFormItemInput:Gt,status:U}=b.useContext(y.aM),Be=b.useMemo(()=>{var rn;let xn;if(Z){const Mn=Z!==!0&&Z.icons||Te,Ne=Pe&&((rn=Mn==null?void 0:Mn({status:Pe,errors:N,warnings:A}))===null||rn===void 0?void 0:rn[Pe]),cn=Pe&&li[Pe];xn=Ne!==!1&&cn?b.createElement("span",{className:E()(`${Ce}-feedback-icon`,`${Ce}-feedback-icon-${Pe}`)},Ne||b.createElement(cn,null)):null}let At=!0,Ct=Pe||"";return tt&&(At=Gt,Ct=(Pe!=null?Pe:U)||""),{status:Ct,errors:N,warnings:A,hasFeedback:!!Z,feedbackIcon:xn,isFormItemInput:At}},[Pe,Z,tt,Gt,U]);return b.createElement(y.aM.Provider,{value:Be},F)}var _r=function(m,F){var N={};for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&F.indexOf(A)<0&&(N[A]=m[A]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,A=Object.getOwnPropertySymbols(m);Z<A.length;Z++)F.indexOf(A[Z])<0&&Object.prototype.propertyIsEnumerable.call(m,A[Z])&&(N[A[Z]]=m[A[Z]]);return N};function Ci(m){const{prefixCls:F,className:N,rootClassName:A,style:Z,help:$,errors:$e,warnings:St,validateStatus:tt,meta:Ce,hasFeedback:Te,hidden:Pe,children:Gt,fieldId:U,required:Be,isRequired:rn,onSubItemMetaChange:xn}=m,At=_r(m,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Ct=`${F}-item`,{requiredMark:Mn}=b.useContext(y.q3),Ne=b.useRef(null),cn=ue($e),on=ue(St),In=$!=null,Sn=!!(In||$e.length||St.length),Sr=!!Ne.current&&(0,lt.Z)(Ne.current),[Gn,Zn]=b.useState(null);(0,De.Z)(()=>{if(Sn&&Ne.current){const dr=getComputedStyle(Ne.current);Zn(parseInt(dr.marginBottom,10))}},[Sn,Sr]);const Rr=dr=>{dr||Zn(null)},Nn=function(){let dr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const xr=dr?cn:Ce.errors,On=dr?on:Ce.warnings;return Nt(xr,On,Ce,"",!!Te,tt)}(),Cr=E()(Ct,N,A,{[`${Ct}-with-help`]:In||cn.length||on.length,[`${Ct}-has-feedback`]:Nn&&Te,[`${Ct}-has-success`]:Nn==="success",[`${Ct}-has-warning`]:Nn==="warning",[`${Ct}-has-error`]:Nn==="error",[`${Ct}-is-validating`]:Nn==="validating",[`${Ct}-hidden`]:Pe});return b.createElement("div",{className:Cr,style:Z,ref:Ne},b.createElement(be.Z,Object.assign({className:`${Ct}-row`},(0,ht.Z)(At,["_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"])),b.createElement(Ht,Object.assign({htmlFor:U},m,{requiredMark:Mn,required:Be!=null?Be:rn,prefixCls:F})),b.createElement(re,Object.assign({},m,Ce,{errors:cn,warnings:on,prefixCls:F,status:Nn,help:$,marginBottom:Gn,onErrorVisibleChanged:Rr}),b.createElement(y.qI.Provider,{value:xn},b.createElement(Oi,{prefixCls:F,meta:Ce,errors:Ce.errors,warnings:Ce.warnings,hasFeedback:Te,validateStatus:Nn},Gt)))),!!Gn&&b.createElement("div",{className:`${Ct}-margin-offset`,style:{marginBottom:-Gn}}))}const si="__SPLIT__",Pi=null,I=b.memo(m=>{let{children:F}=m;return F},(m,F)=>m.value===F.value&&m.update===F.update&&m.childProps.length===F.childProps.length&&m.childProps.every((N,A)=>N===F.childProps[A]));function Y(m){return m!=null}function _(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function X(m){const{name:F,noStyle:N,className:A,dependencies:Z,prefixCls:$,shouldUpdate:$e,rules:St,children:tt,required:Ce,label:Te,messageVariables:Pe,trigger:Gt="onChange",validateTrigger:U,hidden:Be,help:rn}=m,{getPrefixCls:xn}=b.useContext(Qe.E_),{name:At}=b.useContext(y.q3),Ct=dt(tt),Mn=typeof Ct=="function",Ne=b.useContext(y.qI),{validateTrigger:cn}=b.useContext(me.FieldContext),on=U!==void 0?U:cn,In=Y(F),Sn=xn("form",$),[Sr,Gn]=J(Sn),Zn=b.useContext(me.ListContext),Rr=b.useRef(),[Fr,Nn]=ie({}),[Cr,dr]=(0,ze.Z)(()=>_()),xr=En=>{const Un=Zn==null?void 0:Zn.getKey(En.name);if(dr(En.destroy?_():En,!0),N&&rn!==!1&&Ne){let Qn=En.name;if(En.destroy)Qn=Rr.current||Qn;else if(Un!==void 0){const[Lr,ui]=Un;Qn=[Lr].concat((0,T.Z)(ui)),Rr.current=Qn}Ne(En,Qn)}},On=(En,Un)=>{Nn(Qn=>{const Lr=Object.assign({},Qn),Vr=[].concat((0,T.Z)(En.name.slice(0,-1)),(0,T.Z)(Un)).join(si);return En.destroy?delete Lr[Vr]:Lr[Vr]=En,Lr})},[ar,Xn]=b.useMemo(()=>{const En=(0,T.Z)(Cr.errors),Un=(0,T.Z)(Cr.warnings);return Object.values(Fr).forEach(Qn=>{En.push.apply(En,(0,T.Z)(Qn.errors||[])),Un.push.apply(Un,(0,T.Z)(Qn.warnings||[]))}),[En,Un]},[Fr,Cr.errors,Cr.warnings]),Yn=yt();function tr(En,Un,Qn){return N&&!Be?b.createElement(Oi,{prefixCls:Sn,hasFeedback:m.hasFeedback,validateStatus:m.validateStatus,meta:Cr,errors:ar,warnings:Xn,noStyle:!0},En):b.createElement(Ci,Object.assign({key:"row"},m,{className:E()(A,Gn),prefixCls:Sn,fieldId:Un,isRequired:Qn,errors:ar,warnings:Xn,meta:Cr,onSubItemMetaChange:On}),En)}if(!In&&!Mn&&!Z)return Sr(tr(Ct));let hr={};return typeof Te=="string"?hr.label=Te:F&&(hr.label=String(F)),Pe&&(hr=Object.assign(Object.assign({},hr),Pe)),Sr(b.createElement(me.Field,Object.assign({},m,{messageVariables:hr,trigger:Gt,validateTrigger:on,onMetaChange:xr}),(En,Un,Qn)=>{const Lr=je(F).length&&Un?Un.name:[],ui=Ot(Lr,At),Vr=Ce!==void 0?Ce:!!(St&&St.some(zn=>{if(zn&&typeof zn=="object"&&zn.required&&!zn.warningOnly)return!0;if(typeof zn=="function"){const Xr=zn(Qn);return Xr&&Xr.required&&!Xr.warningOnly}return!1})),Gr=Object.assign({},En);let ci=null;if(Array.isArray(Ct)&&In)ci=Ct;else if(!(Mn&&(!($e||Z)||In))){if(!(Z&&!Mn&&!In))if((0,ut.l$)(Ct)){const zn=Object.assign(Object.assign({},Ct.props),Gr);if(zn.id||(zn.id=ui),rn||ar.length>0||Xn.length>0||m.extra){const Br=[];(rn||ar.length>0)&&Br.push(`${ui}_help`),m.extra&&Br.push(`${ui}_extra`),zn["aria-describedby"]=Br.join(" ")}ar.length>0&&(zn["aria-invalid"]="true"),Vr&&(zn["aria-required"]="true"),(0,ye.Yr)(Ct)&&(zn.ref=Yn(Lr,Ct)),new Set([].concat((0,T.Z)(je(Gt)),(0,T.Z)(je(on)))).forEach(Br=>{zn[Br]=function(){for(var Ai,zi,xi,Yr,_i,Hi=arguments.length,Vi=new Array(Hi),Ni=0;Ni<Hi;Ni++)Vi[Ni]=arguments[Ni];(xi=Gr[Br])===null||xi===void 0||(Ai=xi).call.apply(Ai,[Gr].concat(Vi)),(_i=(Yr=Ct.props)[Br])===null||_i===void 0||(zi=_i).call.apply(zi,[Yr].concat(Vi))}});const $r=[zn["aria-required"],zn["aria-invalid"],zn["aria-describedby"]];ci=b.createElement(I,{value:Gr[m.valuePropName||"value"],update:Ct,childProps:$r},(0,ut.Tm)(Ct,zn))}else Mn&&($e||Z)&&!In?ci=Ct(Qn):ci=Ct}return tr(ci,ui,Vr)}))}const Ze=X;Ze.useStatus=W;var Ee=Ze,Re=function(m,F){var N={};for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&F.indexOf(A)<0&&(N[A]=m[A]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,A=Object.getOwnPropertySymbols(m);Z<A.length;Z++)F.indexOf(A[Z])<0&&Object.prototype.propertyIsEnumerable.call(m,A[Z])&&(N[A[Z]]=m[A[Z]]);return N},Pt=m=>{var{prefixCls:F,children:N}=m,A=Re(m,["prefixCls","children"]);const{getPrefixCls:Z}=b.useContext(Qe.E_),$=Z("form",F),$e=b.useMemo(()=>({prefixCls:$,status:"error"}),[$]);return b.createElement(me.List,Object.assign({},A),(St,tt,Ce)=>b.createElement(y.Rk.Provider,{value:$e},N(St.map(Te=>Object.assign(Object.assign({},Te),{fieldKey:Te.key})),tt,{errors:Ce.errors,warnings:Ce.warnings})))};function jt(){const{form:m}=(0,b.useContext)(y.q3);return m}const vt=he;vt.Item=Ee,vt.List=Pt,vt.ErrorList=Me,vt.useForm=rt,vt.useFormInstance=jt,vt.useWatch=me.useWatch,vt.Provider=y.RV,vt.create=()=>{};var Ye=vt},82586:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return wt},n:function(){return k}});var T=f(16646),x=f(94184),E=f.n(x),B=f(67656),b=f(17799),M=f(67294),y=f(9708),ue=f(53124),V=f(98866),h=f(98675),Se=f(65223),ce=f(4173),He=f(72922),Ie=f(47673);function we(te){return!!(te.prefix||te.suffix||te.allowClear)}var fe=function(te,ne){var g={};for(var c in te)Object.prototype.hasOwnProperty.call(te,c)&&ne.indexOf(c)<0&&(g[c]=te[c]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var C=0,c=Object.getOwnPropertySymbols(te);C<c.length;C++)ne.indexOf(c[C])<0&&Object.prototype.propertyIsEnumerable.call(te,c[C])&&(g[c[C]]=te[c[C]]);return g};function k(te,ne){if(!te)return;te.focus(ne);const{cursor:g}=ne||{};if(g){const c=te.value.length;switch(g){case"start":te.setSelectionRange(0,0);break;case"end":te.setSelectionRange(c,c);break;default:te.setSelectionRange(0,c);break}}}var wt=(0,M.forwardRef)((te,ne)=>{var g;const{prefixCls:c,bordered:C=!0,status:L,size:J,disabled:z,onBlur:K,onFocus:ee,suffix:Me,allowClear:me,addonAfter:Qe,addonBefore:et,className:_e,style:gt,styles:mt,rootClassName:at,onChange:Ke,classNames:je}=te,Ot=fe(te,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Nt,direction:Ve,input:rt}=M.useContext(ue.E_),Xe=Nt("input",c),vn=(0,M.useRef)(null),[Wn,xe]=(0,Ie.ZP)(Xe),{compactSize:he,compactItemClassnames:ze}=(0,ce.ri)(Xe,Ve),ye=(0,h.Z)(Tt=>{var Zt;return(Zt=J!=null?J:he)!==null&&Zt!==void 0?Zt:Tt}),ut=M.useContext(V.Z),Mt=z!=null?z:ut,{status:dt,hasFeedback:P,feedbackIcon:W}=(0,M.useContext)(Se.aM),H=(0,y.F)(dt,L),ie=we(te)||!!P,yt=(0,M.useRef)(ie);(0,M.useEffect)(()=>{var Tt;ie&&yt.current,yt.current=ie},[ie]);const lt=(0,He.Z)(vn,!0),De=Tt=>{lt(),K==null||K(Tt)},ht=Tt=>{lt(),ee==null||ee(Tt)},be=Tt=>{lt(),Ke==null||Ke(Tt)},Je=(P||Me)&&M.createElement(M.Fragment,null,Me,P&&W);let Tn;return typeof me=="object"&&(me!=null&&me.clearIcon)?Tn=me:me&&(Tn={clearIcon:M.createElement(T.Z,null)}),Wn(M.createElement(B.default,Object.assign({ref:(0,b.sQ)(ne,vn),prefixCls:Xe,autoComplete:rt==null?void 0:rt.autoComplete},Ot,{disabled:Mt,onBlur:De,onFocus:ht,style:Object.assign(Object.assign({},rt==null?void 0:rt.style),gt),styles:Object.assign(Object.assign({},rt==null?void 0:rt.styles),mt),suffix:Je,allowClear:Tn,className:E()(_e,at,ze,rt==null?void 0:rt.className),onChange:be,addonAfter:Qe&&M.createElement(ce.BR,null,M.createElement(Se.Ux,{override:!0,status:!0},Qe)),addonBefore:et&&M.createElement(ce.BR,null,M.createElement(Se.Ux,{override:!0,status:!0},et)),classNames:Object.assign(Object.assign(Object.assign({},je),rt==null?void 0:rt.classNames),{input:E()({[`${Xe}-sm`]:ye==="small",[`${Xe}-lg`]:ye==="large",[`${Xe}-rtl`]:Ve==="rtl",[`${Xe}-borderless`]:!C},!ie&&(0,y.Z)(Xe,H),je==null?void 0:je.input,(g=rt==null?void 0:rt.classNames)===null||g===void 0?void 0:g.input,xe)}),classes:{affixWrapper:E()({[`${Xe}-affix-wrapper-sm`]:ye==="small",[`${Xe}-affix-wrapper-lg`]:ye==="large",[`${Xe}-affix-wrapper-rtl`]:Ve==="rtl",[`${Xe}-affix-wrapper-borderless`]:!C},(0,y.Z)(`${Xe}-affix-wrapper`,H,P),xe),wrapper:E()({[`${Xe}-group-rtl`]:Ve==="rtl"},xe),group:E()({[`${Xe}-group-wrapper-sm`]:ye==="small",[`${Xe}-group-wrapper-lg`]:ye==="large",[`${Xe}-group-wrapper-rtl`]:Ve==="rtl",[`${Xe}-group-wrapper-disabled`]:Mt},(0,y.Z)(`${Xe}-group-wrapper`,H,P),xe)}})))})},96330:function(sn,ve,f){"use strict";var T=f(16646),x=f(94184),E=f.n(x),B=f(64701),b=f(67294),M=f(9708),y=f(53124),ue=f(98866),V=f(98675),h=f(65223),Se=f(82586),ce=f(47673),He=function(we,fe){var k={};for(var qe in we)Object.prototype.hasOwnProperty.call(we,qe)&&fe.indexOf(qe)<0&&(k[qe]=we[qe]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var wt=0,qe=Object.getOwnPropertySymbols(we);wt<qe.length;wt++)fe.indexOf(qe[wt])<0&&Object.prototype.propertyIsEnumerable.call(we,qe[wt])&&(k[qe[wt]]=we[qe[wt]]);return k};const Ie=(0,b.forwardRef)((we,fe)=>{const{prefixCls:k,bordered:qe=!0,size:wt,disabled:te,status:ne,allowClear:g,showCount:c,classNames:C,rootClassName:L,className:J}=we,z=He(we,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:K,direction:ee}=b.useContext(y.E_),Me=(0,V.Z)(wt),me=b.useContext(ue.Z),Qe=te!=null?te:me,{status:et,hasFeedback:_e,feedbackIcon:gt}=b.useContext(h.aM),mt=(0,M.F)(et,ne),at=b.useRef(null);b.useImperativeHandle(fe,()=>{var Ve;return{resizableTextArea:(Ve=at.current)===null||Ve===void 0?void 0:Ve.resizableTextArea,focus:rt=>{var Xe,vn;(0,Se.n)((vn=(Xe=at.current)===null||Xe===void 0?void 0:Xe.resizableTextArea)===null||vn===void 0?void 0:vn.textArea,rt)},blur:()=>{var rt;return(rt=at.current)===null||rt===void 0?void 0:rt.blur()}}});const Ke=K("input",k);let je;typeof g=="object"&&(g!=null&&g.clearIcon)?je=g:g&&(je={clearIcon:b.createElement(T.Z,null)});const[Ot,Nt]=(0,ce.ZP)(Ke);return Ot(b.createElement(B.default,Object.assign({},z,{disabled:Qe,allowClear:je,className:E()(J,L),classes:{affixWrapper:E()(`${Ke}-textarea-affix-wrapper`,{[`${Ke}-affix-wrapper-rtl`]:ee==="rtl",[`${Ke}-affix-wrapper-borderless`]:!qe,[`${Ke}-affix-wrapper-sm`]:Me==="small",[`${Ke}-affix-wrapper-lg`]:Me==="large",[`${Ke}-textarea-show-count`]:c},(0,M.Z)(`${Ke}-affix-wrapper`,mt),Nt)},classNames:Object.assign(Object.assign({},C),{textarea:E()({[`${Ke}-borderless`]:!qe,[`${Ke}-sm`]:Me==="small",[`${Ke}-lg`]:Me==="large"},(0,M.Z)(Ke,mt),Nt,C==null?void 0:C.textarea)}),prefixCls:Ke,suffix:_e&&b.createElement("span",{className:`${Ke}-textarea-suffix`},gt),showCount:c,ref:at})))});ve.Z=Ie},72922:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return x}});var T=f(67294);function x(E,B){const b=(0,T.useRef)([]),M=()=>{b.current.push(setTimeout(()=>{var y,ue,V,h;!((y=E.current)===null||y===void 0)&&y.input&&((ue=E.current)===null||ue===void 0?void 0:ue.input.getAttribute("type"))==="password"&&(!((V=E.current)===null||V===void 0)&&V.input.hasAttribute("value"))&&((h=E.current)===null||h===void 0||h.input.removeAttribute("value"))}))};return(0,T.useEffect)(()=>(B&&M(),()=>b.current.forEach(y=>{y&&clearTimeout(y)})),[]),M}},69677:function(sn,ve,f){"use strict";f.d(ve,{default:function(){return Me}});var T=f(94184),x=f.n(T),E=f(67294),B=f(53124),b=f(65223),M=f(47673),ue=me=>{const{getPrefixCls:Qe,direction:et}=(0,E.useContext)(B.E_),{prefixCls:_e,className:gt}=me,mt=Qe("input-group",_e),at=Qe("input"),[Ke,je]=(0,M.ZP)(at),Ot=x()(mt,{[`${mt}-lg`]:me.size==="large",[`${mt}-sm`]:me.size==="small",[`${mt}-compact`]:me.compact,[`${mt}-rtl`]:et==="rtl"},je,gt),Nt=(0,E.useContext)(b.aM),Ve=(0,E.useMemo)(()=>Object.assign(Object.assign({},Nt),{isFormItemInput:!1}),[Nt]);return Ke(E.createElement("span",{className:Ot,style:me.style,onMouseEnter:me.onMouseEnter,onMouseLeave:me.onMouseLeave,onFocus:me.onFocus,onBlur:me.onBlur},E.createElement(b.aM.Provider,{value:Ve},me.children)))},V=f(82586),h=f(63237),Se=f(99569),ce=f(10366),He=f(17799),Ie=f(72922),we=function(me,Qe){var et={};for(var _e in me)Object.prototype.hasOwnProperty.call(me,_e)&&Qe.indexOf(_e)<0&&(et[_e]=me[_e]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,_e=Object.getOwnPropertySymbols(me);gt<_e.length;gt++)Qe.indexOf(_e[gt])<0&&Object.prototype.propertyIsEnumerable.call(me,_e[gt])&&(et[_e[gt]]=me[_e[gt]]);return et};const fe=me=>me?E.createElement(Se.Z,null):E.createElement(h.Z,null),k={click:"onClick",hover:"onMouseOver"};var wt=E.forwardRef((me,Qe)=>{const{visibilityToggle:et=!0}=me,_e=typeof et=="object"&&et.visible!==void 0,[gt,mt]=(0,E.useState)(()=>_e?et.visible:!1),at=(0,E.useRef)(null);E.useEffect(()=>{_e&&mt(et.visible)},[_e,et]);const Ke=(0,Ie.Z)(at),je=()=>{const{disabled:Mt}=me;Mt||(gt&&Ke(),mt(dt=>{var P;const W=!dt;return typeof et=="object"&&((P=et.onVisibleChange)===null||P===void 0||P.call(et,W)),W}))},Ot=Mt=>{const{action:dt="click",iconRender:P=fe}=me,W=k[dt]||"",H=P(gt),ie={[W]:je,className:`${Mt}-icon`,key:"passwordIcon",onMouseDown:yt=>{yt.preventDefault()},onMouseUp:yt=>{yt.preventDefault()}};return E.cloneElement(E.isValidElement(H)?H:E.createElement("span",null,H),ie)},{className:Nt,prefixCls:Ve,inputPrefixCls:rt,size:Xe}=me,vn=we(me,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Wn}=E.useContext(B.E_),xe=Wn("input",rt),he=Wn("input-password",Ve),ze=et&&Ot(he),ye=x()(he,Nt,{[`${he}-${Xe}`]:!!Xe}),ut=Object.assign(Object.assign({},(0,ce.Z)(vn,["suffix","iconRender","visibilityToggle"])),{type:gt?"text":"password",className:ye,prefixCls:xe,suffix:ze});return Xe&&(ut.size=Xe),E.createElement(V.Z,Object.assign({ref:(0,He.sQ)(Qe,at)},ut))}),te=f(72395),ne=f(96159),g=f(71577),c=f(98675),C=f(4173),L=function(me,Qe){var et={};for(var _e in me)Object.prototype.hasOwnProperty.call(me,_e)&&Qe.indexOf(_e)<0&&(et[_e]=me[_e]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,_e=Object.getOwnPropertySymbols(me);gt<_e.length;gt++)Qe.indexOf(_e[gt])<0&&Object.prototype.propertyIsEnumerable.call(me,_e[gt])&&(et[_e[gt]]=me[_e[gt]]);return et},z=E.forwardRef((me,Qe)=>{const{prefixCls:et,inputPrefixCls:_e,className:gt,size:mt,suffix:at,enterButton:Ke=!1,addonAfter:je,loading:Ot,disabled:Nt,onSearch:Ve,onChange:rt,onCompositionStart:Xe,onCompositionEnd:vn}=me,Wn=L(me,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:xe,direction:he}=E.useContext(B.E_),ze=E.useRef(!1),ye=xe("input-search",et),ut=xe("input",_e),{compactSize:Mt}=(0,C.ri)(ye,he),dt=(0,c.Z)(re=>{var it;return(it=mt!=null?mt:Mt)!==null&&it!==void 0?it:re}),P=E.useRef(null),W=re=>{re&&re.target&&re.type==="click"&&Ve&&Ve(re.target.value,re,{source:"clear"}),rt&&rt(re)},H=re=>{var it;document.activeElement===((it=P.current)===null||it===void 0?void 0:it.input)&&re.preventDefault()},ie=re=>{var it,It;Ve&&Ve((It=(it=P.current)===null||it===void 0?void 0:it.input)===null||It===void 0?void 0:It.value,re,{source:"input"})},yt=re=>{ze.current||Ot||ie(re)},lt=typeof Ke=="boolean"?E.createElement(te.Z,null):null,De=`${ye}-button`;let ht;const be=Ke||{},Je=be.type&&be.type.__ANT_BUTTON===!0;Je||be.type==="button"?ht=(0,ne.Tm)(be,Object.assign({onMouseDown:H,onClick:re=>{var it,It;(It=(it=be==null?void 0:be.props)===null||it===void 0?void 0:it.onClick)===null||It===void 0||It.call(it,re),ie(re)},key:"enterButton"},Je?{className:De,size:dt}:{})):ht=E.createElement(g.ZP,{className:De,type:Ke?"primary":void 0,size:dt,disabled:Nt,key:"enterButton",onMouseDown:H,onClick:ie,loading:Ot,icon:lt},Ke),je&&(ht=[ht,(0,ne.Tm)(je,{key:"addonAfter"})]);const Tn=x()(ye,{[`${ye}-rtl`]:he==="rtl",[`${ye}-${dt}`]:!!dt,[`${ye}-with-button`]:!!Ke},gt),Tt=re=>{ze.current=!0,Xe==null||Xe(re)},Zt=re=>{ze.current=!1,vn==null||vn(re)};return E.createElement(V.Z,Object.assign({ref:(0,He.sQ)(P,Qe),onPressEnter:yt},Wn,{size:dt,onCompositionStart:Tt,onCompositionEnd:Zt,prefixCls:ut,addonAfter:ht,suffix:at,onChange:W,className:Tn,disabled:Nt}))}),K=f(96330);const ee=V.Z;ee.Group=ue,ee.Search=z,ee.TextArea=K.Z,ee.Password=wt;var Me=ee},47673:function(sn,ve,f){"use strict";f.d(ve,{M1:function(){return y},TM:function(){return ne},Xy:function(){return ue},bi:function(){return Se},e5:function(){return te},ik:function(){return ce},nz:function(){return b},pU:function(){return M},s7:function(){return He},x0:function(){return h}});var T=f(14747),x=f(80110),E=f(45503),B=f(67968);const b=g=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:g,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),M=g=>({borderColor:g.hoverBorderColor}),y=g=>({borderColor:g.activeBorderColor,boxShadow:g.activeShadow,outline:0}),ue=g=>({color:g.colorTextDisabled,backgroundColor:g.colorBgContainerDisabled,borderColor:g.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},M((0,E.TS)(g,{hoverBorderColor:g.colorBorder})))}),V=g=>{const{paddingBlockLG:c,fontSizeLG:C,lineHeightLG:L,borderRadiusLG:J,paddingInlineLG:z}=g;return{padding:`${c}px ${z}px`,fontSize:C,lineHeight:L,borderRadius:J}},h=g=>({padding:`${g.paddingBlockSM}px ${g.paddingInlineSM}px`,borderRadius:g.borderRadiusSM}),Se=(g,c)=>{const{componentCls:C,colorError:L,colorWarning:J,errorActiveShadow:z,warningActiveShadow:K,colorErrorBorderHover:ee,colorWarningBorderHover:Me}=g;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:L,"&:hover":{borderColor:ee},"&:focus, &-focused":Object.assign({},y((0,E.TS)(g,{activeBorderColor:L,activeShadow:z}))),[`${C}-prefix, ${C}-suffix`]:{color:L}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:J,"&:hover":{borderColor:Me},"&:focus, &-focused":Object.assign({},y((0,E.TS)(g,{activeBorderColor:J,activeShadow:K}))),[`${C}-prefix, ${C}-suffix`]:{color:J}}}},ce=g=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${g.paddingBlock}px ${g.paddingInline}px`,color:g.colorText,fontSize:g.fontSize,lineHeight:g.lineHeight,backgroundColor:g.colorBgContainer,backgroundImage:"none",borderWidth:g.lineWidth,borderStyle:g.lineType,borderColor:g.colorBorder,borderRadius:g.borderRadius,transition:`all ${g.motionDurationMid}`},b(g.colorTextPlaceholder)),{"&:hover":Object.assign({},M(g)),"&:focus, &-focused":Object.assign({},y(g)),"&-disabled, &[disabled]":Object.assign({},ue(g)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:g.controlHeight,lineHeight:g.lineHeight,verticalAlign:"bottom",transition:`all ${g.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},V(g)),"&-sm":Object.assign({},h(g)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),He=g=>{const{componentCls:c,antCls:C}=g;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:g.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${c}, &-lg > ${c}-group-addon`]:Object.assign({},V(g)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},h(g)),[`&-lg ${C}-select-single ${C}-select-selector`]:{height:g.controlHeightLG},[`&-sm ${C}-select-single ${C}-select-selector`]:{height:g.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 ${g.paddingInline}px`,color:g.colorText,fontWeight:"normal",fontSize:g.fontSize,textAlign:"center",backgroundColor:g.colorFillAlter,border:`${g.lineWidth}px ${g.lineType} ${g.colorBorder}`,borderRadius:g.borderRadius,transition:`all ${g.motionDurationSlow}`,lineHeight:1,[`${C}-select`]:{margin:`-${g.paddingBlock+1}px -${g.paddingInline}px`,[`&${C}-select-single:not(${C}-select-customize-input)`]:{[`${C}-select-selector`]:{backgroundColor:"inherit",border:`${g.lineWidth}px ${g.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${C}-select-selector`]:{color:g.colorPrimary}}},[`${C}-cascader-picker`]:{margin:`-9px -${g.paddingInline}px`,backgroundColor:"transparent",[`${C}-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,[`${C}-select ${C}-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,[`${C}-select ${C}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${c}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${c}-search &`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius}},[`&:not(:first-child), ${c}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${c}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,T.dF)()),{[`${c}-group-addon, ${c}-group-wrap, > ${c}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:g.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${c}-affix-wrapper,
& > ${c}-number-affix-wrapper,
& > ${C}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-g.lineWidth,borderInlineEndWidth:g.lineWidth},[`${c}`]:{float:"none"},[`& > ${C}-select > ${C}-select-selector,
& > ${C}-select-auto-complete ${c},
& > ${C}-cascader-picker ${c},
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:g.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${C}-select-focused`]:{zIndex:1},[`& > ${C}-select > ${C}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${C}-select:first-child > ${C}-select-selector,
& > ${C}-select-auto-complete:first-child ${c},
& > ${C}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius},[`& > *:last-child,
& > ${C}-select:last-child > ${C}-select-selector,
& > ${C}-cascader-picker:last-child ${c},
& > ${C}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:g.lineWidth,borderStartEndRadius:g.borderRadius,borderEndEndRadius:g.borderRadius},[`& > ${C}-select-auto-complete ${c}`]:{verticalAlign:"top"},[`${c}-group-wrapper + ${c}-group-wrapper`]:{marginInlineStart:-g.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:g.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:g.borderRadius}}}})}},Ie=g=>{const{componentCls:c,controlHeightSM:C,lineWidth:L}=g,z=(C-L*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,T.Wf)(g)),ce(g)),Se(g,c)),{'&[type="color"]':{height:g.controlHeight,[`&${c}-lg`]:{height:g.controlHeightLG},[`&${c}-sm`]:{height:C,paddingTop:z,paddingBottom:z}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},we=g=>{const{componentCls:c}=g;return{[`${c}-clear-icon`]:{margin:0,color:g.colorTextQuaternary,fontSize:g.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${g.motionDurationSlow}`,"&:hover":{color:g.colorTextTertiary},"&:active":{color:g.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${g.inputAffixPadding}px`}}}},fe=g=>{const{componentCls:c,inputAffixPadding:C,colorTextDescription:L,motionDurationSlow:J,colorIcon:z,colorIconHover:K,iconCls:ee}=g;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ce(g)),{display:"inline-flex",[`&:not(${c}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},M(g)),{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:g.paddingXS}},"&-show-count-suffix":{color:L},"&-show-count-has-suffix":{marginInlineEnd:g.paddingXXS},"&-prefix":{marginInlineEnd:C},"&-suffix":{marginInlineStart:C}}}),we(g)),{[`${ee}${c}-password-icon`]:{color:z,cursor:"pointer",transition:`all ${J}`,"&:hover":{color:K}}}),Se(g,`${c}-affix-wrapper`))}},k=g=>{const{componentCls:c,colorError:C,colorWarning:L,borderRadiusLG:J,borderRadiusSM:z}=g;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,T.Wf)(g)),He(g)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:J,fontSize:g.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:z}},"&-status-error":{[`${c}-group-addon`]:{color:C,borderColor:C}},"&-status-warning":{[`${c}-group-addon`]:{color:L,borderColor:L}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},ue(g))},[`&: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}}}})}},qe=g=>{const{componentCls:c,antCls:C}=g,L=`${c}-search`;return{[L]:{[`${c}`]:{"&:hover, &:focus":{borderColor:g.colorPrimaryHover,[`+ ${c}-group-addon ${L}-button:not(${C}-btn-primary)`]:{borderInlineStartColor:g.colorPrimaryHover}}},[`${c}-affix-wrapper`]:{borderRadius:0},[`${c}-lg`]:{lineHeight:g.lineHeightLG-2e-4},[`> ${c}-group`]:{[`> ${c}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${L}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:g.borderRadius,borderEndEndRadius:g.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${L}-button:not(${C}-btn-primary)`]:{color:g.colorTextDescription,"&:hover":{color:g.colorPrimaryHover},"&:active":{color:g.colorPrimaryActive},[`&${C}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${L}-button`]:{height:g.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${L}-button`]:{height:g.controlHeightLG},[`&-small ${L}-button`]:{height:g.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${c}-compact-item`]:{[`&:not(${c}-compact-last-item)`]:{[`${c}-group-addon`]:{[`${c}-search-button`]:{marginInlineEnd:-g.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}}}}},wt=g=>{const{componentCls:c,paddingLG:C}=g,L=`${c}-textarea`;return{[L]:{position:"relative","&-show-count":{[`> ${c}`]:{height:"100%"},[`${c}-data-count`]:{position:"absolute",bottom:-g.fontSize*g.lineHeight,insetInlineEnd:0,color:g.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${c}`]:{paddingInlineEnd:C}},[`&-affix-wrapper${L}-has-feedback`]:{[`${c}`]:{paddingInlineEnd:C}},[`&-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:g.paddingXS,insetBlockStart:g.paddingXS},[`${L}-suffix`]:{position:"absolute",top:0,insetInlineEnd:g.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function te(g){return(0,E.TS)(g,{inputAffixPadding:g.paddingXXS})}const ne=g=>{const{controlHeight:c,fontSize:C,lineHeight:L,lineWidth:J,controlHeightSM:z,controlHeightLG:K,fontSizeLG:ee,lineHeightLG:Me,paddingSM:me,controlPaddingHorizontalSM:Qe,controlPaddingHorizontal:et,colorFillAlter:_e,colorPrimaryHover:gt,controlOutlineWidth:mt,controlOutline:at,colorErrorOutline:Ke,colorWarningOutline:je}=g;return{paddingBlock:Math.max(Math.round((c-C*L)/2*10)/10-J,3),paddingBlockSM:Math.max(Math.round((z-C*L)/2*10)/10-J,0),paddingBlockLG:Math.ceil((K-ee*Me)/2*10)/10-J,paddingInline:me-J,paddingInlineSM:Qe-J,paddingInlineLG:et-J,addonBg:_e,activeBorderColor:gt,hoverBorderColor:gt,activeShadow:`0 0 0 ${mt}px ${at}`,errorActiveShadow:`0 0 0 ${mt}px ${Ke}`,warningActiveShadow:`0 0 0 ${mt}px ${je}`}};ve.ZP=(0,B.Z)("Input",g=>{const c=(0,E.TS)(g,te(g));return[Ie(c),wt(c),fe(c),k(c),qe(c),(0,x.c)(c)]},ne)},11713:function(sn,ve,f){"use strict";f.d(ve,{default:function(){return Eo}});var T=f(94184),x=f.n(T),E=f(87462),B=f(74902),b=f(4942),M=f(1413),y=f(97685),ue=f(45987),V=f(71002),h=f(67294);function Se(d){var v=h.useRef();v.current=d;var D=h.useCallback(function(){for(var O,G=arguments.length,Q=new Array(G),pe=0;pe<G;pe++)Q[pe]=arguments[pe];return(O=v.current)===null||O===void 0?void 0:O.call.apply(O,[v].concat(Q))},[]);return D}function ce(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var He=ce()?h.useLayoutEffect:h.useEffect,Ie=He,we=function(v,D){var O=h.useRef(!0);He(function(){if(!O.current)return v()},D),He(function(){return O.current=!1,function(){O.current=!0}},[])};function fe(d){var v=h.useRef(!1),D=h.useState(d),O=(0,y.Z)(D,2),G=O[0],Q=O[1];h.useEffect(function(){return v.current=!1,function(){v.current=!0}},[]);function pe(Oe,Ae){Ae&&v.current||Q(Oe)}return[G,pe]}function k(d){return d!==void 0}function qe(d,v){var D=v||{},O=D.defaultValue,G=D.value,Q=D.onChange,pe=D.postState,Oe=fe(function(){return k(G)?G:k(O)?typeof O=="function"?O():O:typeof d=="function"?d():d}),Ae=(0,y.Z)(Oe,2),oe=Ae[0],ae=Ae[1],le=G!==void 0?G:oe,ke=pe?pe(le):le,se=Se(Q),st=fe([le]),Bt=(0,y.Z)(st,2),Ut=Bt[0],Wt=Bt[1];we(function(){var zt=Ut[0];oe!==zt&&se(oe,zt)},[Ut]),we(function(){k(G)||ae(G)},[G]);var Rt=Se(function(zt,pn){ae(zt,pn),Wt([le],pn)});return[ke,Rt]}var wt={};function te(d,v){}function ne(d,v){}function g(){wt={}}function c(d,v,D){!v&&!wt[D]&&(d(!1,D),wt[D]=!0)}function C(d,v){c(te,d,v)}function L(d,v){c(ne,d,v)}var J=C,z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var d=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(d)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(d==null?void 0:d.substr(0,4))},K={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(v){var D=v.keyCode;if(v.altKey&&!v.ctrlKey||v.metaKey||D>=K.F1&&D<=K.F12)return!1;switch(D){case K.ALT:case K.CAPS_LOCK:case K.CONTEXT_MENU:case K.CTRL:case K.DOWN:case K.END:case K.ESC:case K.HOME:case K.INSERT:case K.LEFT:case K.MAC_FF_META:case K.META:case K.NUMLOCK:case K.NUM_CENTER:case K.PAGE_DOWN:case K.PAGE_UP:case K.PAUSE:case K.PRINT_SCREEN:case K.RIGHT:case K.SHIFT:case K.UP:case K.WIN_KEY:case K.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(v){if(v>=K.ZERO&&v<=K.NINE||v>=K.NUM_ZERO&&v<=K.NUM_MULTIPLY||v>=K.A&&v<=K.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&v===0)return!0;switch(v){case K.SPACE:case K.QUESTION_MARK:case K.NUM_PLUS:case K.NUM_MINUS:case K.NUM_PERIOD:case K.NUM_DIVISION:case K.SEMICOLON:case K.DASH:case K.EQUALS:case K.COMMA:case K.PERIOD:case K.SLASH:case K.APOSTROPHE:case K.SINGLE_QUOTE:case K.OPEN_SQUARE_BRACKET:case K.BACKSLASH:case K.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ee=K,Me=f(47655);function me(d,v,D){var O=h.useRef({});return(!("value"in O.current)||D(O.current.condition,v))&&(O.current.value=d(),O.current.condition=v),O.current.value}function Qe(d,v){typeof d=="function"?d(v):(0,V.Z)(d)==="object"&&d&&"current"in d&&(d.current=v)}function et(){for(var d=arguments.length,v=new Array(d),D=0;D<d;D++)v[D]=arguments[D];var O=v.filter(function(G){return G});return O.length<=1?O[0]:function(G){v.forEach(function(Q){Qe(Q,G)})}}function _e(){for(var d=arguments.length,v=new Array(d),D=0;D<d;D++)v[D]=arguments[D];return me(function(){return et.apply(void 0,v)},v,function(O,G){return O.length===G.length&&O.every(function(Q,pe){return Q===G[pe]})})}function gt(d){var v,D,O=isMemo(d)?d.type.type:d.type;return!(typeof O=="function"&&!((v=O.prototype)!==null&&v!==void 0&&v.render)||typeof d=="function"&&!((D=d.prototype)!==null&&D!==void 0&&D.render))}var mt=function(v){var D=v.className,O=v.customizeIcon,G=v.customizeIconProps,Q=v.onMouseDown,pe=v.onClick,Oe=v.children,Ae;return typeof O=="function"?Ae=O(G):Ae=O,h.createElement("span",{className:D,onMouseDown:function(ae){ae.preventDefault(),Q&&Q(ae)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:pe,"aria-hidden":!0},Ae!==void 0?Ae:h.createElement("span",{className:x()(D.split(/\s+/).map(function(oe){return"".concat(oe,"-icon")}))},Oe))},at=mt;function Ke(d,v,D,O,G){var Q=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,pe=arguments.length>6?arguments[6]:void 0,Oe=arguments.length>7?arguments[7]:void 0,Ae=h.useMemo(function(){if((0,V.Z)(O)==="object")return O.clearIcon;if(G)return G},[O,G]),oe=h.useMemo(function(){return!!(!Q&&O&&(D.length||pe)&&!(Oe==="combobox"&&pe===""))},[O,Q,D.length,pe,Oe]);return{allowClear:oe,clearIcon:h.createElement(at,{className:"".concat(d,"-clear"),onMouseDown:v,customizeIcon:Ae},"\xD7")}}var je=h.createContext(null);function Ot(){return h.useContext(je)}function Nt(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,v=h.useState(!1),D=(0,y.Z)(v,2),O=D[0],G=D[1],Q=h.useRef(null),pe=function(){window.clearTimeout(Q.current)};h.useEffect(function(){return pe},[]);var Oe=function(oe,ae){pe(),Q.current=window.setTimeout(function(){G(oe),ae&&ae()},d)};return[O,Oe,pe]}function Ve(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,v=h.useRef(null),D=h.useRef(null);h.useEffect(function(){return function(){window.clearTimeout(D.current)}},[]);function O(G){(G||v.current===null)&&(v.current=G),window.clearTimeout(D.current),D.current=window.setTimeout(function(){v.current=null},d)}return[function(){return v.current},O]}function rt(d,v,D,O){var G=h.useRef(null);G.current={open:v,triggerOpen:D,customizedTrigger:O},h.useEffect(function(){function Q(pe){var Oe;if(!((Oe=G.current)!==null&&Oe!==void 0&&Oe.customizedTrigger)){var Ae=pe.target;Ae.shadowRoot&&pe.composed&&(Ae=pe.composedPath()[0]||Ae),G.current.open&&d().filter(function(oe){return oe}).every(function(oe){return!oe.contains(Ae)&&oe!==Ae})&&G.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Q),function(){return window.removeEventListener("mousedown",Q)}},[])}var Xe=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,vn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Wn="".concat(Xe," ").concat(vn).split(/[\s\n]+/),xe="aria-",he="data-";function ze(d,v){return d.indexOf(v)===0}function ye(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D;v===!1?D={aria:!0,data:!0,attr:!0}:v===!0?D={aria:!0}:D=(0,M.Z)({},v);var O={};return Object.keys(d).forEach(function(G){(D.aria&&(G==="role"||ze(G,xe))||D.data&&ze(G,he)||D.attr&&Wn.includes(G))&&(O[G]=d[G])}),O}var ut=f(48555),Mt=f(14075),dt=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],P=void 0;function W(d,v){var D=d.prefixCls,O=d.invalidate,G=d.item,Q=d.renderItem,pe=d.responsive,Oe=d.responsiveDisabled,Ae=d.registerSize,oe=d.itemKey,ae=d.className,le=d.style,ke=d.children,se=d.display,st=d.order,Bt=d.component,Ut=Bt===void 0?"div":Bt,Wt=(0,ue.Z)(d,dt),Rt=pe&&!se;function zt(en){Ae(oe,en)}h.useEffect(function(){return function(){zt(null)}},[]);var pn=Q&&G!==P?Q(G):ke,an;O||(an={opacity:Rt?0:1,height:Rt?0:P,overflowY:Rt?"hidden":P,order:pe?st:P,pointerEvents:Rt?"none":P,position:Rt?"absolute":P});var Ft={};Rt&&(Ft["aria-hidden"]=!0);var qt=h.createElement(Ut,(0,E.Z)({className:x()(!O&&D,ae),style:(0,M.Z)((0,M.Z)({},an),le)},Ft,Wt,{ref:v}),pn);return pe&&(qt=h.createElement(ut.Z,{onResize:function(gn){var tn=gn.offsetWidth;zt(tn)},disabled:Oe},qt)),qt}var H=h.forwardRef(W);H.displayName="Item";var ie=H,yt=f(77527),lt=f(73935),De=f(96523);function ht(d){if(typeof MessageChannel=="undefined")(0,De.Z)(d);else{var v=new MessageChannel;v.port1.onmessage=function(){return d()},v.port2.postMessage(void 0)}}function be(){var d=h.useRef(null),v=function(O){d.current||(d.current=[],ht(function(){(0,lt.unstable_batchedUpdates)(function(){d.current.forEach(function(G){G()}),d.current=null})})),d.current.push(O)};return v}function Je(d,v){var D=h.useState(v),O=(0,y.Z)(D,2),G=O[0],Q=O[1],pe=(0,yt.Z)(function(Oe){d(function(){Q(Oe)})});return[G,pe]}var Tn=h.createContext(null),Tt=["component"],Zt=["className"],re=["className"],it=function(v,D){var O=h.useContext(Tn);if(!O){var G=v.component,Q=G===void 0?"div":G,pe=(0,ue.Z)(v,Tt);return h.createElement(Q,(0,E.Z)({},pe,{ref:D}))}var Oe=O.className,Ae=(0,ue.Z)(O,Zt),oe=v.className,ae=(0,ue.Z)(v,re);return h.createElement(Tn.Provider,{value:null},h.createElement(ie,(0,E.Z)({ref:D,className:x()(Oe,oe)},Ae,ae)))},It=h.forwardRef(it);It.displayName="RawItem";var Qt=It,Jt=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Dt="responsive",We="invalidate";function $t(d){return"+ ".concat(d.length," ...")}function Ht(d,v){var D=d.prefixCls,O=D===void 0?"rc-overflow":D,G=d.data,Q=G===void 0?[]:G,pe=d.renderItem,Oe=d.renderRawItem,Ae=d.itemKey,oe=d.itemWidth,ae=oe===void 0?10:oe,le=d.ssr,ke=d.style,se=d.className,st=d.maxCount,Bt=d.renderRest,Ut=d.renderRawRest,Wt=d.suffix,Rt=d.component,zt=Rt===void 0?"div":Rt,pn=d.itemComponent,an=d.onVisibleChange,Ft=(0,ue.Z)(d,Jt),qt=le==="full",en=be(),gn=Je(en,null),tn=(0,y.Z)(gn,2),fn=tn[0],Rn=tn[1],mn=fn||0,yn=Je(en,new Map),bn=(0,y.Z)(yn,2),bt=bn[0],Lt=bn[1],kt=Je(en,0),un=(0,y.Z)(kt,2),zr=un[0],Er=un[1],lr=Je(en,0),wr=(0,y.Z)(lr,2),ln=wr[0],Jn=wr[1],Qr=Je(en,0),Kt=(0,y.Z)(Qr,2),ft=Kt[0],Xt=Kt[1],Fn=(0,h.useState)(null),Cn=(0,y.Z)(Fn,2),dn=Cn[0],_t=Cn[1],$n=(0,h.useState)(null),nr=(0,y.Z)($n,2),qn=nr[0],cr=nr[1],er=h.useMemo(function(){return qn===null&&qt?Number.MAX_SAFE_INTEGER:qn||0},[qn,fn]),sr=(0,h.useState)(!1),Dn=(0,y.Z)(sr,2),kn=Dn[0],Zr=Dn[1],Jr="".concat(O,"-item"),qr=Math.max(zr,ln),vr=st===Dt,Bn=Q.length&&vr,Mr=st===We,di=Bn||typeof st=="number"&&Q.length>st,Tr=(0,h.useMemo)(function(){var Vt=Q;return Bn?fn===null&&qt?Vt=Q:Vt=Q.slice(0,Math.min(Q.length,mn/ae)):typeof st=="number"&&(Vt=Q.slice(0,st)),Vt},[Q,ae,fn,st,Bn]),rr=(0,h.useMemo)(function(){return Bn?Q.slice(er+1):Q.slice(Tr.length)},[Q,Tr,Bn,er]),pr=(0,h.useCallback)(function(Vt,ge){var nt;return typeof Ae=="function"?Ae(Vt):(nt=Ae&&(Vt==null?void 0:Vt[Ae]))!==null&&nt!==void 0?nt:ge},[Ae]),ei=(0,h.useCallback)(pe||function(Vt){return Vt},[pe]);function hi(Vt,ge,nt){qn===Vt&&(ge===void 0||ge===dn)||(cr(Vt),nt||(Zr(Vt<Q.length-1),an==null||an(Vt)),ge!==void 0&&_t(ge))}function Wi(Vt,ge){Rn(ge.clientWidth)}function Bi(Vt,ge){Lt(function(nt){var ot=new Map(nt);return ge===null?ot.delete(Vt):ot.set(Vt,ge),ot})}function ti(Vt,ge){Jn(ge),Er(ln)}function vi(Vt,ge){Xt(ge)}function gr(Vt){return bt.get(pr(Tr[Vt],Vt))}(0,Mt.Z)(function(){if(mn&&typeof qr=="number"&&Tr){var Vt=ft,ge=Tr.length,nt=ge-1;if(!ge){hi(0,null);return}for(var ot=0;ot<ge;ot+=1){var xt=gr(ot);if(qt&&(xt=xt||0),xt===void 0){hi(ot-1,void 0,!0);break}if(Vt+=xt,nt===0&&Vt<=mn||ot===nt-1&&Vt+gr(nt)<=mn){hi(nt,null);break}else if(Vt+qr>mn){hi(ot-1,Vt-xt-ft+ln);break}}Wt&&gr(0)+ft>mn&&_t(null)}},[mn,bt,ln,ft,pr,Tr]);var mr=kn&&!!rr.length,ni={};dn!==null&&Bn&&(ni={position:"absolute",left:dn,top:0});var Dr={prefixCls:Jr,responsive:Bn,component:pn,invalidate:Mr},Fi=Oe?function(Vt,ge){var nt=pr(Vt,ge);return h.createElement(Tn.Provider,{key:nt,value:(0,M.Z)((0,M.Z)({},Dr),{},{order:ge,item:Vt,itemKey:nt,registerSize:Bi,display:ge<=er})},Oe(Vt,ge))}:function(Vt,ge){var nt=pr(Vt,ge);return h.createElement(ie,(0,E.Z)({},Dr,{order:ge,key:nt,item:Vt,renderItem:ei,itemKey:nt,registerSize:Bi,display:ge<=er}))},Yi,to={order:mr?er:Number.MAX_SAFE_INTEGER,className:"".concat(Jr,"-rest"),registerSize:ti,display:mr};if(Ut)Ut&&(Yi=h.createElement(Tn.Provider,{value:(0,M.Z)((0,M.Z)({},Dr),to)},Ut(rr)));else{var Ei=Bt||$t;Yi=h.createElement(ie,(0,E.Z)({},Dr,to),typeof Ei=="function"?Ei(rr):Ei)}var Zi=h.createElement(zt,(0,E.Z)({className:x()(!Mr&&O,se),style:ke,ref:v},Ft),Tr.map(Fi),di?Yi:null,Wt&&h.createElement(ie,(0,E.Z)({},Dr,{responsive:vr,responsiveDisabled:!Bn,order:er,className:"".concat(Jr,"-suffix"),registerSize:vi,display:!0,style:ni}),Wt));return vr&&(Zi=h.createElement(ut.Z,{onResize:Wi,disabled:!Bn},Zi)),Zi}var An=h.forwardRef(Ht);An.displayName="Overflow",An.Item=Qt,An.RESPONSIVE=Dt,An.INVALIDATE=We;var jr=An,kr=jr,Si=function(v,D){var O,G,Q=v.prefixCls,pe=v.id,Oe=v.inputElement,Ae=v.disabled,oe=v.tabIndex,ae=v.autoFocus,le=v.autoComplete,ke=v.editable,se=v.activeDescendantId,st=v.value,Bt=v.maxLength,Ut=v.onKeyDown,Wt=v.onMouseDown,Rt=v.onChange,zt=v.onPaste,pn=v.onCompositionStart,an=v.onCompositionEnd,Ft=v.open,qt=v.attrs,en=Oe||h.createElement("input",null),gn=en,tn=gn.ref,fn=gn.props,Rn=fn.onKeyDown,mn=fn.onChange,yn=fn.onMouseDown,bn=fn.onCompositionStart,bt=fn.onCompositionEnd,Lt=fn.style;return"maxLength"in en.props,en=h.cloneElement(en,(0,M.Z)((0,M.Z)((0,M.Z)({type:"search"},fn),{},{id:pe,ref:et(D,tn),disabled:Ae,tabIndex:oe,autoComplete:le||"off",autoFocus:ae,className:x()("".concat(Q,"-selection-search-input"),(O=en)===null||O===void 0||(G=O.props)===null||G===void 0?void 0:G.className),role:"combobox","aria-label":"Search","aria-expanded":Ft||!1,"aria-haspopup":"listbox","aria-owns":"".concat(pe,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(pe,"_list"),"aria-activedescendant":Ft?se:void 0},qt),{},{value:ke?st:"",maxLength:Bt,readOnly:!ke,unselectable:ke?null:"on",style:(0,M.Z)((0,M.Z)({},Lt),{},{opacity:ke?null:0}),onKeyDown:function(un){Ut(un),Rn&&Rn(un)},onMouseDown:function(un){Wt(un),yn&&yn(un)},onChange:function(un){Rt(un),mn&&mn(un)},onCompositionStart:function(un){pn(un),bn&&bn(un)},onCompositionEnd:function(un){an(un),bt&&bt(un)},onPaste:zt})),en},li=h.forwardRef(Si);li.displayName="Input";var Oi=li;function _r(d){return Array.isArray(d)?d:d!==void 0?[d]:[]}var Ci=typeof window!="undefined"&&window.document&&window.document.documentElement,si=Ci;function Pi(d){return d!=null}function I(d){return!d&&d!==0}function Y(d){return["string","number"].includes((0,V.Z)(d))}function _(d){var v=void 0;return d&&(Y(d.title)?v=d.title.toString():Y(d.label)&&(v=d.label.toString())),v}function X(d,v){si?h.useLayoutEffect(d,v):h.useEffect(d,v)}function Ze(d){var v;return(v=d.key)!==null&&v!==void 0?v:d.value}var Ee=function(v){v.preventDefault(),v.stopPropagation()},Re=function(v){var D=v.id,O=v.prefixCls,G=v.values,Q=v.open,pe=v.searchValue,Oe=v.autoClearSearchValue,Ae=v.inputRef,oe=v.placeholder,ae=v.disabled,le=v.mode,ke=v.showSearch,se=v.autoFocus,st=v.autoComplete,Bt=v.activeDescendantId,Ut=v.tabIndex,Wt=v.removeIcon,Rt=v.maxTagCount,zt=v.maxTagTextLength,pn=v.maxTagPlaceholder,an=pn===void 0?function(_t){return"+ ".concat(_t.length," ...")}:pn,Ft=v.tagRender,qt=v.onToggleOpen,en=v.onRemove,gn=v.onInputChange,tn=v.onInputPaste,fn=v.onInputKeyDown,Rn=v.onInputMouseDown,mn=v.onInputCompositionStart,yn=v.onInputCompositionEnd,bn=h.useRef(null),bt=(0,h.useState)(0),Lt=(0,y.Z)(bt,2),kt=Lt[0],un=Lt[1],zr=(0,h.useState)(!1),Er=(0,y.Z)(zr,2),lr=Er[0],wr=Er[1],ln="".concat(O,"-selection"),Jn=Q||le==="multiple"&&Oe===!1||le==="tags"?pe:"",Qr=le==="tags"||le==="multiple"&&Oe===!1||ke&&(Q||lr);X(function(){un(bn.current.scrollWidth)},[Jn]);function Kt(_t,$n,nr,qn,cr){return h.createElement("span",{className:x()("".concat(ln,"-item"),(0,b.Z)({},"".concat(ln,"-item-disabled"),nr)),title:_(_t)},h.createElement("span",{className:"".concat(ln,"-item-content")},$n),qn&&h.createElement(at,{className:"".concat(ln,"-item-remove"),onMouseDown:Ee,onClick:cr,customizeIcon:Wt},"\xD7"))}function ft(_t,$n,nr,qn,cr){var er=function(Dn){Ee(Dn),qt(!Q)};return h.createElement("span",{onMouseDown:er},Ft({label:$n,value:_t,disabled:nr,closable:qn,onClose:cr}))}function Xt(_t){var $n=_t.disabled,nr=_t.label,qn=_t.value,cr=!ae&&!$n,er=nr;if(typeof zt=="number"&&(typeof nr=="string"||typeof nr=="number")){var sr=String(er);sr.length>zt&&(er="".concat(sr.slice(0,zt),"..."))}var Dn=function(Zr){Zr&&Zr.stopPropagation(),en(_t)};return typeof Ft=="function"?ft(qn,er,$n,cr,Dn):Kt(_t,er,$n,cr,Dn)}function Fn(_t){var $n=typeof an=="function"?an(_t):an;return Kt({title:$n},$n,!1)}var Cn=h.createElement("div",{className:"".concat(ln,"-search"),style:{width:kt},onFocus:function(){wr(!0)},onBlur:function(){wr(!1)}},h.createElement(Oi,{ref:Ae,open:Q,prefixCls:O,id:D,inputElement:null,disabled:ae,autoFocus:se,autoComplete:st,editable:Qr,activeDescendantId:Bt,value:Jn,onKeyDown:fn,onMouseDown:Rn,onChange:gn,onPaste:tn,onCompositionStart:mn,onCompositionEnd:yn,tabIndex:Ut,attrs:ye(v,!0)}),h.createElement("span",{ref:bn,className:"".concat(ln,"-search-mirror"),"aria-hidden":!0},Jn,"\xA0")),dn=h.createElement(kr,{prefixCls:"".concat(ln,"-overflow"),data:G,renderItem:Xt,renderRest:Fn,suffix:Cn,itemKey:Ze,maxCount:Rt});return h.createElement(h.Fragment,null,dn,!G.length&&!Jn&&h.createElement("span",{className:"".concat(ln,"-placeholder")},oe))},ct=Re,Pt=function(v){var D=v.inputElement,O=v.prefixCls,G=v.id,Q=v.inputRef,pe=v.disabled,Oe=v.autoFocus,Ae=v.autoComplete,oe=v.activeDescendantId,ae=v.mode,le=v.open,ke=v.values,se=v.placeholder,st=v.tabIndex,Bt=v.showSearch,Ut=v.searchValue,Wt=v.activeValue,Rt=v.maxLength,zt=v.onInputKeyDown,pn=v.onInputMouseDown,an=v.onInputChange,Ft=v.onInputPaste,qt=v.onInputCompositionStart,en=v.onInputCompositionEnd,gn=v.title,tn=h.useState(!1),fn=(0,y.Z)(tn,2),Rn=fn[0],mn=fn[1],yn=ae==="combobox",bn=yn||Bt,bt=ke[0],Lt=Ut||"";yn&&Wt&&!Rn&&(Lt=Wt),h.useEffect(function(){yn&&mn(!1)},[yn,Wt]);var kt=ae!=="combobox"&&!le&&!Bt?!1:!!Lt,un=gn===void 0?_(bt):gn,zr=function(){if(bt)return null;var lr=kt?{visibility:"hidden"}:void 0;return h.createElement("span",{className:"".concat(O,"-selection-placeholder"),style:lr},se)};return h.createElement(h.Fragment,null,h.createElement("span",{className:"".concat(O,"-selection-search")},h.createElement(Oi,{ref:Q,prefixCls:O,id:G,open:le,inputElement:D,disabled:pe,autoFocus:Oe,autoComplete:Ae,editable:bn,activeDescendantId:oe,value:Lt,onKeyDown:zt,onMouseDown:pn,onChange:function(lr){mn(!0),an(lr)},onPaste:Ft,onCompositionStart:qt,onCompositionEnd:en,tabIndex:st,attrs:ye(v,!0),maxLength:yn?Rt:void 0})),!yn&&bt?h.createElement("span",{className:"".concat(O,"-selection-item"),title:un,style:kt?{visibility:"hidden"}:void 0},bt.label):null,zr())},jt=Pt;function vt(d){return![ee.ESC,ee.SHIFT,ee.BACKSPACE,ee.TAB,ee.WIN_KEY,ee.ALT,ee.META,ee.WIN_KEY_RIGHT,ee.CTRL,ee.SEMICOLON,ee.EQUALS,ee.CAPS_LOCK,ee.CONTEXT_MENU,ee.F1,ee.F2,ee.F3,ee.F4,ee.F5,ee.F6,ee.F7,ee.F8,ee.F9,ee.F10,ee.F11,ee.F12].includes(d)}var Ye=function(v,D){var O=(0,h.useRef)(null),G=(0,h.useRef)(!1),Q=v.prefixCls,pe=v.open,Oe=v.mode,Ae=v.showSearch,oe=v.tokenWithEnter,ae=v.autoClearSearchValue,le=v.onSearch,ke=v.onSearchSubmit,se=v.onToggleOpen,st=v.onInputKeyDown,Bt=v.domRef;h.useImperativeHandle(D,function(){return{focus:function(){O.current.focus()},blur:function(){O.current.blur()}}});var Ut=Ve(0),Wt=(0,y.Z)(Ut,2),Rt=Wt[0],zt=Wt[1],pn=function(Lt){var kt=Lt.which;(kt===ee.UP||kt===ee.DOWN)&&Lt.preventDefault(),st&&st(Lt),kt===ee.ENTER&&Oe==="tags"&&!G.current&&!pe&&(ke==null||ke(Lt.target.value)),vt(kt)&&se(!0)},an=function(){zt(!0)},Ft=(0,h.useRef)(null),qt=function(Lt){le(Lt,!0,G.current)!==!1&&se(!0)},en=function(){G.current=!0},gn=function(Lt){G.current=!1,Oe!=="combobox"&&qt(Lt.target.value)},tn=function(Lt){var kt=Lt.target.value;if(oe&&Ft.current&&/[\r\n]/.test(Ft.current)){var un=Ft.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");kt=kt.replace(un,Ft.current)}Ft.current=null,qt(kt)},fn=function(Lt){var kt=Lt.clipboardData,un=kt.getData("text");Ft.current=un},Rn=function(Lt){var kt=Lt.target;if(kt!==O.current){var un=document.body.style.msTouchAction!==void 0;un?setTimeout(function(){O.current.focus()}):O.current.focus()}},mn=function(Lt){var kt=Rt();Lt.target!==O.current&&!kt&&Oe!=="combobox"&&Lt.preventDefault(),(Oe!=="combobox"&&(!Ae||!kt)||!pe)&&(pe&&ae!==!1&&le("",!0,!1),se())},yn={inputRef:O,onInputKeyDown:pn,onInputMouseDown:an,onInputChange:tn,onInputPaste:fn,onInputCompositionStart:en,onInputCompositionEnd:gn},bn=Oe==="multiple"||Oe==="tags"?h.createElement(ct,(0,E.Z)({},v,yn)):h.createElement(jt,(0,E.Z)({},v,yn));return h.createElement("div",{ref:Bt,className:"".concat(Q,"-selector"),onClick:Rn,onMouseDown:mn},bn)},m=h.forwardRef(Ye);m.displayName="Selector";var F=m,N=f(62709),A=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Z=function(v){var D=v===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:D,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:D,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:D,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:D,adjustY:1},htmlRegion:"scroll"}}},$=function(v,D){var O=v.prefixCls,G=v.disabled,Q=v.visible,pe=v.children,Oe=v.popupElement,Ae=v.animation,oe=v.transitionName,ae=v.dropdownStyle,le=v.dropdownClassName,ke=v.direction,se=ke===void 0?"ltr":ke,st=v.placement,Bt=v.builtinPlacements,Ut=v.dropdownMatchSelectWidth,Wt=v.dropdownRender,Rt=v.dropdownAlign,zt=v.getPopupContainer,pn=v.empty,an=v.getTriggerDOMNode,Ft=v.onPopupVisibleChange,qt=v.onPopupMouseEnter,en=(0,ue.Z)(v,A),gn="".concat(O,"-dropdown"),tn=Oe;Wt&&(tn=Wt(Oe));var fn=h.useMemo(function(){return Bt||Z(Ut)},[Bt,Ut]),Rn=Ae?"".concat(gn,"-").concat(Ae):oe,mn=typeof Ut=="number",yn=h.useMemo(function(){return mn?null:Ut===!1?"minWidth":"width"},[Ut,mn]),bn=ae;mn&&(bn=(0,M.Z)((0,M.Z)({},bn),{},{width:Ut}));var bt=h.useRef(null);return h.useImperativeHandle(D,function(){return{getPopupElement:function(){return bt.current}}}),h.createElement(N.Z,(0,E.Z)({},en,{showAction:Ft?["click"]:[],hideAction:Ft?["click"]:[],popupPlacement:st||(se==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:fn,prefixCls:gn,popupTransitionName:Rn,popup:h.createElement("div",{ref:bt,onMouseEnter:qt},tn),stretch:yn,popupAlign:Rt,popupVisible:Q,getPopupContainer:zt,popupClassName:x()(le,(0,b.Z)({},"".concat(gn,"-empty"),pn)),popupStyle:bn,getTriggerDOMNode:an,onPopupVisibleChange:Ft}),pe)},$e=h.forwardRef($);$e.displayName="SelectTrigger";var St=$e,tt=f(84506);function Ce(d,v){var D=d.key,O;return"value"in d&&(O=d.value),D!=null?D:O!==void 0?O:"rc-index-key-".concat(v)}function Te(d,v){var D=d||{},O=D.label,G=D.value,Q=D.options,pe=D.groupLabel,Oe=O||(v?"children":"label");return{label:Oe,value:G||"value",options:Q||"options",groupLabel:pe||Oe}}function Pe(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=v.fieldNames,O=v.childrenAsData,G=[],Q=Te(D,!1),pe=Q.label,Oe=Q.value,Ae=Q.options,oe=Q.groupLabel;function ae(le,ke){le.forEach(function(se){if(ke||!(Ae in se)){var st=se[Oe];G.push({key:Ce(se,G.length),groupOption:ke,data:se,label:se[pe],value:st})}else{var Bt=se[oe];Bt===void 0&&O&&(Bt=se.label),G.push({key:Ce(se,G.length),group:!0,data:se,label:Bt}),ae(se[Ae],!0)}})}return ae(d,!1),G}function Gt(d){var v=(0,M.Z)({},d);return"props"in v||Object.defineProperty(v,"props",{get:function(){return J(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),v}}),v}function U(d,v){if(!v||!v.length)return null;var D=!1;function O(Q,pe){var Oe=(0,tt.Z)(pe),Ae=Oe[0],oe=Oe.slice(1);if(!Ae)return[Q];var ae=Q.split(Ae);return D=D||ae.length>1,ae.reduce(function(le,ke){return[].concat((0,B.Z)(le),(0,B.Z)(O(ke,oe)))},[]).filter(function(le){return le})}var G=O(d,v);return D?G:null}var Be=["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"],rn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function xn(d){return d==="tags"||d==="multiple"}var At=h.forwardRef(function(d,v){var D,O,G=d.id,Q=d.prefixCls,pe=d.className,Oe=d.showSearch,Ae=d.tagRender,oe=d.direction,ae=d.omitDomProps,le=d.displayValues,ke=d.onDisplayValuesChange,se=d.emptyOptions,st=d.notFoundContent,Bt=st===void 0?"Not Found":st,Ut=d.onClear,Wt=d.mode,Rt=d.disabled,zt=d.loading,pn=d.getInputElement,an=d.getRawInputElement,Ft=d.open,qt=d.defaultOpen,en=d.onDropdownVisibleChange,gn=d.activeValue,tn=d.onActiveValueChange,fn=d.activeDescendantId,Rn=d.searchValue,mn=d.autoClearSearchValue,yn=d.onSearch,bn=d.onSearchSplit,bt=d.tokenSeparators,Lt=d.allowClear,kt=d.suffixIcon,un=d.clearIcon,zr=d.OptionList,Er=d.animation,lr=d.transitionName,wr=d.dropdownStyle,ln=d.dropdownClassName,Jn=d.dropdownMatchSelectWidth,Qr=d.dropdownRender,Kt=d.dropdownAlign,ft=d.placement,Xt=d.builtinPlacements,Fn=d.getPopupContainer,Cn=d.showAction,dn=Cn===void 0?[]:Cn,_t=d.onFocus,$n=d.onBlur,nr=d.onKeyUp,qn=d.onKeyDown,cr=d.onMouseDown,er=(0,ue.Z)(d,Be),sr=xn(Wt),Dn=(Oe!==void 0?Oe:sr)||Wt==="combobox",kn=(0,M.Z)({},er);rn.forEach(function(hn){delete kn[hn]}),ae==null||ae.forEach(function(hn){delete kn[hn]});var Zr=h.useState(!1),Jr=(0,y.Z)(Zr,2),qr=Jr[0],vr=Jr[1];h.useEffect(function(){vr(z())},[]);var Bn=h.useRef(null),Mr=h.useRef(null),di=h.useRef(null),Tr=h.useRef(null),rr=h.useRef(null),pr=Nt(),ei=(0,y.Z)(pr,3),hi=ei[0],Wi=ei[1],Bi=ei[2];h.useImperativeHandle(v,function(){var hn,Yt;return{focus:(hn=Tr.current)===null||hn===void 0?void 0:hn.focus,blur:(Yt=Tr.current)===null||Yt===void 0?void 0:Yt.blur,scrollTo:function(oi){var wn;return(wn=rr.current)===null||wn===void 0?void 0:wn.scrollTo(oi)}}});var ti=h.useMemo(function(){var hn;if(Wt!=="combobox")return Rn;var Yt=(hn=le[0])===null||hn===void 0?void 0:hn.value;return typeof Yt=="string"||typeof Yt=="number"?String(Yt):""},[Rn,Wt,le]),vi=Wt==="combobox"&&typeof pn=="function"&&pn()||null,gr=typeof an=="function"&&an(),mr=_e(Mr,gr==null||(D=gr.props)===null||D===void 0?void 0:D.ref),ni=h.useState(!1),Dr=(0,y.Z)(ni,2),Fi=Dr[0],Yi=Dr[1];Ie(function(){Yi(!0)},[]);var to=qe(!1,{defaultValue:qt,value:Ft}),Ei=(0,y.Z)(to,2),Zi=Ei[0],Vt=Ei[1],ge=Fi?Zi:!1,nt=!Bt&&se;(Rt||nt&&ge&&Wt==="combobox")&&(ge=!1);var ot=nt?!1:ge,xt=h.useCallback(function(hn){var Yt=hn!==void 0?hn:!ge;Rt||(Vt(Yt),ge!==Yt&&(en==null||en(Yt)))},[Rt,ge,Vt,en]),Kn=h.useMemo(function(){return(bt||[]).some(function(hn){return[`
`,`\r
`].includes(hn)})},[bt]),jn=function(Yt,Hr,oi){var wn=!0,Ln=Yt;tn==null||tn(null);var _n=oi?null:U(Yt,bt);return Wt!=="combobox"&&_n&&(Ln="",bn==null||bn(_n),xt(!1),wn=!1),yn&&ti!==Ln&&yn(Ln,{source:Hr?"typing":"effect"}),wn},ri=function(Yt){!Yt||!Yt.trim()||yn(Yt,{source:"submit"})};h.useEffect(function(){!ge&&!sr&&Wt!=="combobox"&&jn("",!1,!1)},[ge]),h.useEffect(function(){Zi&&Rt&&Vt(!1),Rt&&Wi(!1)},[Rt]);var pi=Ve(),Ui=(0,y.Z)(pi,2),yr=Ui[0],Qi=Ui[1],Do=function(Yt){var Hr=yr(),oi=Yt.which;if(oi===ee.ENTER&&(Wt!=="combobox"&&Yt.preventDefault(),ge||xt(!0)),Qi(!!ti),oi===ee.BACKSPACE&&!Hr&&sr&&!ti&&le.length){for(var wn=(0,B.Z)(le),Ln=null,_n=wn.length-1;_n>=0;_n-=1){var ir=wn[_n];if(!ir.disabled){wn.splice(_n,1),Ln=ir;break}}Ln&&ke(wn,{type:"remove",values:[Ln]})}for(var wi=arguments.length,vo=new Array(wi>1?wi-1:0),Li=1;Li<wi;Li++)vo[Li-1]=arguments[Li];if(ge&&rr.current){var ga;(ga=rr.current).onKeyDown.apply(ga,[Yt].concat(vo))}qn==null||qn.apply(void 0,[Yt].concat(vo))},Vo=function(Yt){for(var Hr=arguments.length,oi=new Array(Hr>1?Hr-1:0),wn=1;wn<Hr;wn++)oi[wn-1]=arguments[wn];if(ge&&rr.current){var Ln;(Ln=rr.current).onKeyUp.apply(Ln,[Yt].concat(oi))}nr==null||nr.apply(void 0,[Yt].concat(oi))},Po=function(Yt){var Hr=le.filter(function(oi){return oi!==Yt});ke(Hr,{type:"remove",values:[Yt]})},Ki=h.useRef(!1),ii=function(){Wi(!0),Rt||(_t&&!Ki.current&&_t.apply(void 0,arguments),dn.includes("focus")&&xt(!0)),Ki.current=!0},wo=function(){Wi(!1,function(){Ki.current=!1,xt(!1)}),!Rt&&(ti&&(Wt==="tags"?yn(ti,{source:"submit"}):Wt==="multiple"&&yn("",{source:"blur"})),$n&&$n.apply(void 0,arguments))},co=[];h.useEffect(function(){return function(){co.forEach(function(hn){return clearTimeout(hn)}),co.splice(0,co.length)}},[]);var Ao=function(Yt){var Hr,oi=Yt.target,wn=(Hr=di.current)===null||Hr===void 0?void 0:Hr.getPopupElement();if(wn&&wn.contains(oi)){var Ln=setTimeout(function(){var vo=co.indexOf(Ln);if(vo!==-1&&co.splice(vo,1),Bi(),!qr&&!wn.contains(document.activeElement)){var Li;(Li=Tr.current)===null||Li===void 0||Li.focus()}});co.push(Ln)}for(var _n=arguments.length,ir=new Array(_n>1?_n-1:0),wi=1;wi<_n;wi++)ir[wi-1]=arguments[wi];cr==null||cr.apply(void 0,[Yt].concat(ir))},fa=h.useState({}),Mo=(0,y.Z)(fa,2),da=Mo[1];function no(){da({})}var fo;gr&&(fo=function(Yt){xt(Yt)}),rt(function(){var hn;return[Bn.current,(hn=di.current)===null||hn===void 0?void 0:hn.getPopupElement()]},ot,xt,!!gr);var ro=h.useMemo(function(){return(0,M.Z)((0,M.Z)({},d),{},{notFoundContent:Bt,open:ge,triggerOpen:ot,id:G,showSearch:Dn,multiple:sr,toggleOpen:xt})},[d,Bt,ot,ge,G,Dn,sr,xt]),ho=!!kt||zt,io;ho&&(io=h.createElement(at,{className:x()("".concat(Q,"-arrow"),(0,b.Z)({},"".concat(Q,"-arrow-loading"),zt)),customizeIcon:kt,customizeIconProps:{loading:zt,searchValue:ti,open:ge,focused:hi,showSearch:Dn}}));var ha=function(){var Yt;Ut==null||Ut(),(Yt=Tr.current)===null||Yt===void 0||Yt.focus(),ke([],{type:"clear",values:le}),jn("",!1,!1)},Go=Ke(Q,ha,le,Lt,un,Rt,ti,Wt),va=Go.allowClear,Ta=Go.clearIcon,oo=h.createElement(zr,{ref:rr}),ao=x()(Q,pe,(O={},(0,b.Z)(O,"".concat(Q,"-focused"),hi),(0,b.Z)(O,"".concat(Q,"-multiple"),sr),(0,b.Z)(O,"".concat(Q,"-single"),!sr),(0,b.Z)(O,"".concat(Q,"-allow-clear"),Lt),(0,b.Z)(O,"".concat(Q,"-show-arrow"),ho),(0,b.Z)(O,"".concat(Q,"-disabled"),Rt),(0,b.Z)(O,"".concat(Q,"-loading"),zt),(0,b.Z)(O,"".concat(Q,"-open"),ge),(0,b.Z)(O,"".concat(Q,"-customize-input"),vi),(0,b.Z)(O,"".concat(Q,"-show-search"),Dn),O)),pa=h.createElement(St,{ref:di,disabled:Rt,prefixCls:Q,visible:ot,popupElement:oo,animation:Er,transitionName:lr,dropdownStyle:wr,dropdownClassName:ln,direction:oe,dropdownMatchSelectWidth:Jn,dropdownRender:Qr,dropdownAlign:Kt,placement:ft,builtinPlacements:Xt,getPopupContainer:Fn,empty:se,getTriggerDOMNode:function(){return Mr.current},onPopupVisibleChange:fo,onPopupMouseEnter:no},gr?h.cloneElement(gr,{ref:mr}):h.createElement(F,(0,E.Z)({},d,{domRef:Mr,prefixCls:Q,inputElement:vi,ref:Tr,id:G,showSearch:Dn,autoClearSearchValue:mn,mode:Wt,activeDescendantId:fn,tagRender:Ae,values:le,open:ge,onToggleOpen:xt,activeValue:gn,searchValue:ti,onSearch:jn,onSearchSubmit:ri,onRemove:Po,tokenWithEnter:Kn}))),Xo;return gr?Xo=pa:Xo=h.createElement("div",(0,E.Z)({className:ao},kn,{ref:Bn,onMouseDown:Ao,onKeyDown:Do,onKeyUp:Vo,onFocus:ii,onBlur:wo}),hi&&!ge&&h.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(le.map(function(hn){var Yt=hn.label,Hr=hn.value;return["number","string"].includes((0,V.Z)(Yt))?Yt:Hr}).join(", "))),pa,io,va&&Ta),h.createElement(je.Provider,{value:ro},Xo)}),Ct=At,Mn=function(d,v){var D=h.useRef({values:new Map,options:new Map}),O=h.useMemo(function(){var Q=D.current,pe=Q.values,Oe=Q.options,Ae=d.map(function(le){if(le.label===void 0){var ke;return(0,M.Z)((0,M.Z)({},le),{},{label:(ke=pe.get(le.value))===null||ke===void 0?void 0:ke.label})}return le}),oe=new Map,ae=new Map;return Ae.forEach(function(le){oe.set(le.value,le),ae.set(le.value,v.get(le.value)||Oe.get(le.value))}),D.current.values=oe,D.current.options=ae,Ae},[d,v]),G=h.useCallback(function(Q){return v.get(Q)||D.current.options.get(Q)},[v]);return[O,G]};function Ne(d,v){return _r(d).join("").toUpperCase().includes(v)}var cn=function(d,v,D,O,G){return h.useMemo(function(){if(!D||O===!1)return d;var Q=v.options,pe=v.label,Oe=v.value,Ae=[],oe=typeof O=="function",ae=D.toUpperCase(),le=oe?O:function(se,st){return G?Ne(st[G],ae):st[Q]?Ne(st[pe!=="children"?pe:"label"],ae):Ne(st[Oe],ae)},ke=oe?function(se){return Gt(se)}:function(se){return se};return d.forEach(function(se){if(se[Q]){var st=le(D,ke(se));if(st)Ae.push(se);else{var Bt=se[Q].filter(function(Ut){return le(D,ke(Ut))});Bt.length&&Ae.push((0,M.Z)((0,M.Z)({},se),{},(0,b.Z)({},Q,Bt)))}return}le(D,ke(se))&&Ae.push(se)}),Ae},[d,O,G,D,v])},on=0,In=ce();function Sn(){var d;return In?(d=on,on+=1):d="TEST_OR_SSR",d}function Sr(d){var v=h.useState(),D=(0,y.Z)(v,2),O=D[0],G=D[1];return h.useEffect(function(){G("rc_select_".concat(Sn()))},[]),d||O}function Gn(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=[];return h.Children.forEach(d,function(O){O==null&&!v.keepEmpty||(Array.isArray(O)?D=D.concat(Gn(O)):(0,Me.isFragment)(O)&&O.props?D=D.concat(Gn(O.props.children,v)):D.push(O))}),D}var Zn=["children","value"],Rr=["children"];function Fr(d){var v=d,D=v.key,O=v.props,G=O.children,Q=O.value,pe=(0,ue.Z)(O,Zn);return(0,M.Z)({key:D,value:Q!==void 0?Q:D,children:G},pe)}function Nn(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Gn(d).map(function(D,O){if(!h.isValidElement(D)||!D.type)return null;var G=D,Q=G.type.isSelectOptGroup,pe=G.key,Oe=G.props,Ae=Oe.children,oe=(0,ue.Z)(Oe,Rr);return v||!Q?Fr(D):(0,M.Z)((0,M.Z)({key:"__RC_SELECT_GRP__".concat(pe===null?O:pe,"__"),label:pe},oe),{},{options:Nn(Ae)})}).filter(function(D){return D})}function Cr(d,v,D,O,G){return h.useMemo(function(){var Q=d,pe=!d;pe&&(Q=Nn(v));var Oe=new Map,Ae=new Map,oe=function(ke,se,st){st&&typeof st=="string"&&ke.set(se[st],se)};function ae(le){for(var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,se=0;se<le.length;se+=1){var st=le[se];!st[D.options]||ke?(Oe.set(st[D.value],st),oe(Ae,st,D.label),oe(Ae,st,O),oe(Ae,st,G)):ae(st[D.options],!0)}}return ae(Q),{options:Q,valueOptions:Oe,labelOptions:Ae}},[d,v,D,O,G])}function dr(d){var v=h.useRef();v.current=d;var D=h.useCallback(function(){return v.current.apply(v,arguments)},[]);return D}var xr=function(){return null};xr.isSelectOptGroup=!0;var On=xr,ar=function(){return null};ar.isSelectOption=!0;var Xn=ar;function Yn(d,v){var D=(0,M.Z)({},d);return Array.isArray(v)&&v.forEach(function(O){delete D[O]}),D}var tr=f(73299),hr=h.createContext(null),En=hr;function Un(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Qn=["disabled","title","children","style","className"];function Lr(d){return typeof d=="string"||typeof d=="number"}var ui=function(v,D){var O=Ot(),G=O.prefixCls,Q=O.id,pe=O.open,Oe=O.multiple,Ae=O.mode,oe=O.searchValue,ae=O.toggleOpen,le=O.notFoundContent,ke=O.onPopupScroll,se=h.useContext(En),st=se.flattenOptions,Bt=se.onActiveValue,Ut=se.defaultActiveFirstOption,Wt=se.onSelect,Rt=se.menuItemSelectedIcon,zt=se.rawValues,pn=se.fieldNames,an=se.virtual,Ft=se.direction,qt=se.listHeight,en=se.listItemHeight,gn="".concat(G,"-item"),tn=me(function(){return st},[pe,st],function(Kt,ft){return ft[0]&&Kt[1]!==ft[1]}),fn=h.useRef(null),Rn=function(ft){ft.preventDefault()},mn=function(ft){fn.current&&fn.current.scrollTo(typeof ft=="number"?{index:ft}:ft)},yn=function(ft){for(var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Fn=tn.length,Cn=0;Cn<Fn;Cn+=1){var dn=(ft+Cn*Xt+Fn)%Fn,_t=tn[dn],$n=_t.group,nr=_t.data;if(!$n&&!nr.disabled)return dn}return-1},bn=h.useState(function(){return yn(0)}),bt=(0,y.Z)(bn,2),Lt=bt[0],kt=bt[1],un=function(ft){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;kt(ft);var Fn={source:Xt?"keyboard":"mouse"},Cn=tn[ft];if(!Cn){Bt(null,-1,Fn);return}Bt(Cn.value,ft,Fn)};(0,h.useEffect)(function(){un(Ut!==!1?yn(0):-1)},[tn.length,oe]);var zr=h.useCallback(function(Kt){return zt.has(Kt)&&Ae!=="combobox"},[Ae,(0,B.Z)(zt).toString(),zt.size]);(0,h.useEffect)(function(){var Kt=setTimeout(function(){if(!Oe&&pe&&zt.size===1){var Xt=Array.from(zt)[0],Fn=tn.findIndex(function(Cn){var dn=Cn.data;return dn.value===Xt});Fn!==-1&&(un(Fn),mn(Fn))}});if(pe){var ft;(ft=fn.current)===null||ft===void 0||ft.scrollTo(void 0)}return function(){return clearTimeout(Kt)}},[pe,oe,st.length]);var Er=function(ft){ft!==void 0&&Wt(ft,{selected:!zt.has(ft)}),Oe||ae(!1)};if(h.useImperativeHandle(D,function(){return{onKeyDown:function(ft){var Xt=ft.which,Fn=ft.ctrlKey;switch(Xt){case ee.N:case ee.P:case ee.UP:case ee.DOWN:{var Cn=0;if(Xt===ee.UP?Cn=-1:Xt===ee.DOWN?Cn=1:Un()&&Fn&&(Xt===ee.N?Cn=1:Xt===ee.P&&(Cn=-1)),Cn!==0){var dn=yn(Lt+Cn,Cn);mn(dn),un(dn,!0)}break}case ee.ENTER:{var _t=tn[Lt];_t&&!_t.data.disabled?Er(_t.value):Er(void 0),pe&&ft.preventDefault();break}case ee.ESC:ae(!1),pe&&ft.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ft){mn(ft)}}}),tn.length===0)return h.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),className:"".concat(gn,"-empty"),onMouseDown:Rn},le);var lr=Object.keys(pn).map(function(Kt){return pn[Kt]}),wr=function(ft){return ft.label};function ln(Kt,ft){var Xt=Kt.group;return{role:Xt?"presentation":"option",id:"".concat(Q,"_list_").concat(ft)}}var Jn=function(ft){var Xt=tn[ft];if(!Xt)return null;var Fn=Xt.data||{},Cn=Fn.value,dn=Xt.group,_t=ye(Fn,!0),$n=wr(Xt);return Xt?h.createElement("div",(0,E.Z)({"aria-label":typeof $n=="string"&&!dn?$n:null},_t,{key:ft},ln(Xt,ft),{"aria-selected":zr(Cn)}),Cn):null},Qr={role:"listbox",id:"".concat(Q,"_list")};return h.createElement(h.Fragment,null,an&&h.createElement("div",(0,E.Z)({},Qr,{style:{height:0,width:0,overflow:"hidden"}}),Jn(Lt-1),Jn(Lt),Jn(Lt+1)),h.createElement(tr.Z,{itemKey:"key",ref:fn,data:tn,height:qt,itemHeight:en,fullHeight:!1,onMouseDown:Rn,onScroll:ke,virtual:an,direction:Ft,innerProps:an?null:Qr},function(Kt,ft){var Xt,Fn=Kt.group,Cn=Kt.groupOption,dn=Kt.data,_t=Kt.label,$n=Kt.value,nr=dn.key;if(Fn){var qn,cr=(qn=dn.title)!==null&&qn!==void 0?qn:Lr(_t)?_t.toString():void 0;return h.createElement("div",{className:x()(gn,"".concat(gn,"-group")),title:cr},_t!==void 0?_t:nr)}var er=dn.disabled,sr=dn.title,Dn=dn.children,kn=dn.style,Zr=dn.className,Jr=(0,ue.Z)(dn,Qn),qr=Yn(Jr,lr),vr=zr($n),Bn="".concat(gn,"-option"),Mr=x()(gn,Bn,Zr,(Xt={},(0,b.Z)(Xt,"".concat(Bn,"-grouped"),Cn),(0,b.Z)(Xt,"".concat(Bn,"-active"),Lt===ft&&!er),(0,b.Z)(Xt,"".concat(Bn,"-disabled"),er),(0,b.Z)(Xt,"".concat(Bn,"-selected"),vr),Xt)),di=wr(Kt),Tr=!Rt||typeof Rt=="function"||vr,rr=typeof di=="number"?di:di||$n,pr=Lr(rr)?rr.toString():void 0;return sr!==void 0&&(pr=sr),h.createElement("div",(0,E.Z)({},ye(qr),an?{}:ln(Kt,ft),{"aria-selected":vr,className:Mr,title:pr,onMouseMove:function(){Lt===ft||er||un(ft)},onClick:function(){er||Er($n)},style:kn}),h.createElement("div",{className:"".concat(Bn,"-content")},rr),h.isValidElement(Rt)||vr,Tr&&h.createElement(at,{className:"".concat(gn,"-option-state"),customizeIcon:Rt,customizeIconProps:{isSelected:vr}},vr?"\u2713":null))}))},Vr=h.forwardRef(ui);Vr.displayName="OptionList";var Gr=Vr;function ci(d){var v=d.mode,D=d.options,O=d.children,G=d.backfill,Q=d.allowClear,pe=d.placeholder,Oe=d.getInputElement,Ae=d.showSearch,oe=d.onSearch,ae=d.defaultOpen,le=d.autoFocus,ke=d.labelInValue,se=d.value,st=d.inputValue,Bt=d.optionLabelProp,Ut=isMultiple(v),Wt=Ae!==void 0?Ae:Ut||v==="combobox",Rt=D||convertChildrenToData(O);if(warning(v!=="tags"||Rt.every(function(Ft){return!Ft.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),v==="tags"||v==="combobox"){var zt=Rt.some(function(Ft){return Ft.options?Ft.options.some(function(qt){return typeof("value"in qt?qt.value:qt.key)=="number"}):typeof("value"in Ft?Ft.value:Ft.key)=="number"});warning(!zt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(v!=="combobox"||!Bt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(v==="combobox"||!G,"`backfill` only works with `combobox` mode."),warning(v==="combobox"||!Oe,"`getInputElement` only work with `combobox` mode."),noteOnce(v!=="combobox"||!Oe||!Q||!pe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),oe&&!Wt&&v!=="combobox"&&v!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!ae||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),se!=null){var pn=toArray(se);warning(!ke||pn.every(function(Ft){return _typeof(Ft)==="object"&&("key"in Ft||"value"in Ft)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ut||Array.isArray(se),"`value` should be array when `mode` is `multiple` or `tags`")}if(O){var an=null;toNodeArray(O).some(function(Ft){if(!React.isValidElement(Ft)||!Ft.type)return!1;var qt=Ft,en=qt.type;if(en.isSelectOption)return!1;if(en.isSelectOptGroup){var gn=toNodeArray(Ft.props.children).every(function(tn){return!React.isValidElement(tn)||!Ft.type||tn.type.isSelectOption?!0:(an=tn.type,!1)});return!gn}return an=en,!0}),an&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(an.displayName||an.name||an,"`.")),warning(st===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function zn(d,v){if(d){var D=function O(G){for(var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=0;pe<G.length;pe++){var Oe=G[pe];if(Oe[v==null?void 0:v.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Q&&Array.isArray(Oe[v==null?void 0:v.options])&&O(Oe[v==null?void 0:v.options],!0))break}};D(d)}}var Xr=null,$r=["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"],Br=["inputValue"];function Ai(d){return!d||(0,V.Z)(d)!=="object"}var zi=h.forwardRef(function(d,v){var D=d.id,O=d.mode,G=d.prefixCls,Q=G===void 0?"rc-select":G,pe=d.backfill,Oe=d.fieldNames,Ae=d.inputValue,oe=d.searchValue,ae=d.onSearch,le=d.autoClearSearchValue,ke=le===void 0?!0:le,se=d.onSelect,st=d.onDeselect,Bt=d.dropdownMatchSelectWidth,Ut=Bt===void 0?!0:Bt,Wt=d.filterOption,Rt=d.filterSort,zt=d.optionFilterProp,pn=d.optionLabelProp,an=d.options,Ft=d.children,qt=d.defaultActiveFirstOption,en=d.menuItemSelectedIcon,gn=d.virtual,tn=d.direction,fn=d.listHeight,Rn=fn===void 0?200:fn,mn=d.listItemHeight,yn=mn===void 0?20:mn,bn=d.value,bt=d.defaultValue,Lt=d.labelInValue,kt=d.onChange,un=(0,ue.Z)(d,$r),zr=Sr(D),Er=xn(O),lr=!!(!an&&Ft),wr=h.useMemo(function(){return Wt===void 0&&O==="combobox"?!1:Wt},[Wt,O]),ln=h.useMemo(function(){return Te(Oe,lr)},[JSON.stringify(Oe),lr]),Jn=qe("",{value:oe!==void 0?oe:Ae,postState:function(nt){return nt||""}}),Qr=(0,y.Z)(Jn,2),Kt=Qr[0],ft=Qr[1],Xt=Cr(an,Ft,ln,zt,pn),Fn=Xt.valueOptions,Cn=Xt.labelOptions,dn=Xt.options,_t=h.useCallback(function(ge){var nt=_r(ge);return nt.map(function(ot){var xt,Kn,jn,ri,pi;if(Ai(ot))xt=ot;else{var Ui;jn=ot.key,Kn=ot.label,xt=(Ui=ot.value)!==null&&Ui!==void 0?Ui:jn}var yr=Fn.get(xt);if(yr){var Qi;if(Kn===void 0&&(Kn=yr==null?void 0:yr[pn||ln.label]),jn===void 0&&(jn=(Qi=yr==null?void 0:yr.key)!==null&&Qi!==void 0?Qi:xt),ri=yr==null?void 0:yr.disabled,pi=yr==null?void 0:yr.title,0)var Do}return{label:Kn,value:xt,key:jn,disabled:ri,title:pi}})},[ln,pn,Fn]),$n=qe(bt,{value:bn}),nr=(0,y.Z)($n,2),qn=nr[0],cr=nr[1],er=h.useMemo(function(){var ge,nt=_t(qn);return O==="combobox"&&I((ge=nt[0])===null||ge===void 0?void 0:ge.value)?[]:nt},[qn,_t,O]),sr=Mn(er,Fn),Dn=(0,y.Z)(sr,2),kn=Dn[0],Zr=Dn[1],Jr=h.useMemo(function(){if(!O&&kn.length===1){var ge=kn[0];if(ge.value===null&&(ge.label===null||ge.label===void 0))return[]}return kn.map(function(nt){var ot;return(0,M.Z)((0,M.Z)({},nt),{},{label:(ot=nt.label)!==null&&ot!==void 0?ot:nt.value})})},[O,kn]),qr=h.useMemo(function(){return new Set(kn.map(function(ge){return ge.value}))},[kn]);h.useEffect(function(){if(O==="combobox"){var ge,nt=(ge=kn[0])===null||ge===void 0?void 0:ge.value;ft(Pi(nt)?String(nt):"")}},[kn]);var vr=dr(function(ge,nt){var ot,xt=nt!=null?nt:ge;return ot={},(0,b.Z)(ot,ln.value,ge),(0,b.Z)(ot,ln.label,xt),ot}),Bn=h.useMemo(function(){if(O!=="tags")return dn;var ge=(0,B.Z)(dn),nt=function(xt){return Fn.has(xt)};return(0,B.Z)(kn).sort(function(ot,xt){return ot.value<xt.value?-1:1}).forEach(function(ot){var xt=ot.value;nt(xt)||ge.push(vr(xt,ot.label))}),ge},[vr,dn,Fn,kn,O]),Mr=cn(Bn,ln,Kt,wr,zt),di=h.useMemo(function(){return O!=="tags"||!Kt||Mr.some(function(ge){return ge[zt||"value"]===Kt})||Mr.some(function(ge){return ge[ln.value]===Kt})?Mr:[vr(Kt)].concat((0,B.Z)(Mr))},[vr,zt,O,Mr,Kt,ln]),Tr=h.useMemo(function(){return Rt?(0,B.Z)(di).sort(function(ge,nt){return Rt(ge,nt)}):di},[di,Rt]),rr=h.useMemo(function(){return Pe(Tr,{fieldNames:ln,childrenAsData:lr})},[Tr,ln,lr]),pr=function(nt){var ot=_t(nt);if(cr(ot),kt&&(ot.length!==kn.length||ot.some(function(jn,ri){var pi;return((pi=kn[ri])===null||pi===void 0?void 0:pi.value)!==(jn==null?void 0:jn.value)}))){var xt=Lt?ot:ot.map(function(jn){return jn.value}),Kn=ot.map(function(jn){return Gt(Zr(jn.value))});kt(Er?xt:xt[0],Er?Kn:Kn[0])}},ei=h.useState(null),hi=(0,y.Z)(ei,2),Wi=hi[0],Bi=hi[1],ti=h.useState(0),vi=(0,y.Z)(ti,2),gr=vi[0],mr=vi[1],ni=qt!==void 0?qt:O!=="combobox",Dr=h.useCallback(function(ge,nt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},xt=ot.source,Kn=xt===void 0?"keyboard":xt;mr(nt),pe&&O==="combobox"&&ge!==null&&Kn==="keyboard"&&Bi(String(ge))},[pe,O]),Fi=function(nt,ot,xt){var Kn=function(){var Ki,ii=Zr(nt);return[Lt?{label:ii==null?void 0:ii[ln.label],value:nt,key:(Ki=ii==null?void 0:ii.key)!==null&&Ki!==void 0?Ki:nt}:nt,Gt(ii)]};if(ot&&se){var jn=Kn(),ri=(0,y.Z)(jn,2),pi=ri[0],Ui=ri[1];se(pi,Ui)}else if(!ot&&st&&xt!=="clear"){var yr=Kn(),Qi=(0,y.Z)(yr,2),Do=Qi[0],Vo=Qi[1];st(Do,Vo)}},Yi=dr(function(ge,nt){var ot,xt=Er?nt.selected:!0;xt?ot=Er?[].concat((0,B.Z)(kn),[ge]):[ge]:ot=kn.filter(function(Kn){return Kn.value!==ge}),pr(ot),Fi(ge,xt),O==="combobox"?Bi(""):(!xn||ke)&&(ft(""),Bi(""))}),to=function(nt,ot){pr(nt);var xt=ot.type,Kn=ot.values;(xt==="remove"||xt==="clear")&&Kn.forEach(function(jn){Fi(jn.value,!1,xt)})},Ei=function(nt,ot){if(ft(nt),Bi(null),ot.source==="submit"){var xt=(nt||"").trim();if(xt){var Kn=Array.from(new Set([].concat((0,B.Z)(qr),[xt])));pr(Kn),Fi(xt,!0),ft("")}return}ot.source!=="blur"&&(O==="combobox"&&pr(nt),ae==null||ae(nt))},Zi=function(nt){var ot=nt;O!=="tags"&&(ot=nt.map(function(Kn){var jn=Cn.get(Kn);return jn==null?void 0:jn.value}).filter(function(Kn){return Kn!==void 0}));var xt=Array.from(new Set([].concat((0,B.Z)(qr),(0,B.Z)(ot))));pr(xt),xt.forEach(function(Kn){Fi(Kn,!0)})},Vt=h.useMemo(function(){var ge=gn!==!1&&Ut!==!1;return(0,M.Z)((0,M.Z)({},Xt),{},{flattenOptions:rr,onActiveValue:Dr,defaultActiveFirstOption:ni,onSelect:Yi,menuItemSelectedIcon:en,rawValues:qr,fieldNames:ln,virtual:ge,direction:tn,listHeight:Rn,listItemHeight:yn,childrenAsData:lr})},[Xt,rr,Dr,ni,Yi,en,qr,ln,gn,Ut,Rn,yn,lr]);return h.createElement(En.Provider,{value:Vt},h.createElement(Ct,(0,E.Z)({},un,{id:zr,prefixCls:Q,ref:v,omitDomProps:Br,mode:O,displayValues:Jr,onDisplayValuesChange:to,direction:tn,searchValue:Kt,onSearch:Ei,autoClearSearchValue:ke,onSearchSplit:Zi,dropdownMatchSelectWidth:Ut,OptionList:Gr,emptyOptions:!rr.length,activeValue:Wi,activeDescendantId:"".concat(zr,"_list_").concat(gr)})))}),xi=zi;xi.Option=Xn,xi.OptGroup=On;var Yr=xi,_i=Yr,Hi=f(10366),Vi=f(8745),Ni=f(33603),fi=f(9708),_o=f(53124),Co=f(98866),qi=f(88258),Ro=f(98675),Ii=f(65223),uo=f(4173),Ri=f(87244),Gi=f(13458),eo=f(78642),$i=f(46163),Fo=function(d,v){var D={};for(var O in d)Object.prototype.hasOwnProperty.call(d,O)&&v.indexOf(O)<0&&(D[O]=d[O]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,O=Object.getOwnPropertySymbols(d);G<O.length;G++)v.indexOf(O[G])<0&&Object.prototype.propertyIsEnumerable.call(d,O[G])&&(D[O[G]]=d[O[G]]);return D};const Lo="SECRET_COMBOBOX_MODE_DO_NOT_USE",xo=(d,v)=>{var D,{prefixCls:O,bordered:G=!0,className:Q,rootClassName:pe,getPopupContainer:Oe,popupClassName:Ae,dropdownClassName:oe,listHeight:ae=256,placement:le,listItemHeight:ke=24,size:se,disabled:st,notFoundContent:Bt,status:Ut,builtinPlacements:Wt,dropdownMatchSelectWidth:Rt,popupMatchSelectWidth:zt,direction:pn,style:an,allowClear:Ft}=d,qt=Fo(d,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:en,getPrefixCls:gn,renderEmpty:tn,direction:fn,virtual:Rn,popupMatchSelectWidth:mn,popupOverflow:yn,select:bn}=h.useContext(_o.E_),bt=gn("select",O),Lt=gn(),kt=pn!=null?pn:fn,{compactSize:un,compactItemClassnames:zr}=(0,uo.ri)(bt,kt),[Er,lr]=(0,Ri.Z)(bt),wr=h.useMemo(()=>{const{mode:Bn}=qt;if(Bn!=="combobox")return Bn===Lo?"combobox":Bn},[qt.mode]),ln=wr==="multiple"||wr==="tags",Jn=(0,eo.Z)(qt.suffixIcon,qt.showArrow),Qr=(D=zt!=null?zt:Rt)!==null&&D!==void 0?D:mn,{status:Kt,hasFeedback:ft,isFormItemInput:Xt,feedbackIcon:Fn}=h.useContext(Ii.aM),Cn=(0,fi.F)(Kt,Ut);let dn;Bt!==void 0?dn=Bt:wr==="combobox"?dn=null:dn=(tn==null?void 0:tn("Select"))||h.createElement(qi.Z,{componentName:"Select"});const{suffixIcon:_t,itemIcon:$n,removeIcon:nr,clearIcon:qn}=(0,$i.Z)(Object.assign(Object.assign({},qt),{multiple:ln,hasFeedback:ft,feedbackIcon:Fn,showSuffixIcon:Jn,prefixCls:bt,showArrow:qt.showArrow,componentName:"Select"})),cr=Ft===!0?{clearIcon:qn}:Ft,er=(0,Hi.Z)(qt,["suffixIcon","itemIcon"]),sr=x()(Ae||oe,{[`${bt}-dropdown-${kt}`]:kt==="rtl"},pe,lr),Dn=(0,Ro.Z)(Bn=>{var Mr;return(Mr=se!=null?se:un)!==null&&Mr!==void 0?Mr:Bn}),kn=h.useContext(Co.Z),Zr=st!=null?st:kn,Jr=x()({[`${bt}-lg`]:Dn==="large",[`${bt}-sm`]:Dn==="small",[`${bt}-rtl`]:kt==="rtl",[`${bt}-borderless`]:!G,[`${bt}-in-form-item`]:Xt},(0,fi.Z)(bt,Cn,ft),zr,bn==null?void 0:bn.className,Q,pe,lr),qr=h.useMemo(()=>le!==void 0?le:kt==="rtl"?"bottomRight":"bottomLeft",[le,kt]),vr=(0,Gi.Z)(Wt,yn);return Er(h.createElement(_i,Object.assign({ref:v,virtual:Rn,showSearch:bn==null?void 0:bn.showSearch},er,{style:Object.assign(Object.assign({},bn==null?void 0:bn.style),an),dropdownMatchSelectWidth:Qr,builtinPlacements:vr,transitionName:(0,Ni.m)(Lt,"slide-up",qt.transitionName),listHeight:ae,listItemHeight:ke,mode:wr,prefixCls:bt,placement:qr,direction:kt,suffixIcon:_t,menuItemSelectedIcon:$n,removeIcon:nr,allowClear:cr,notFoundContent:dn,className:Jr,getPopupContainer:Oe||en,dropdownClassName:sr,disabled:Zr})))},Xi=h.forwardRef(xo),To=(0,Vi.Z)(Xi);Xi.SECRET_COMBOBOX_MODE_DO_NOT_USE=Lo,Xi.Option=Xn,Xi.OptGroup=On,Xi._InternalPanelDoNotUseOrYouWillBeFired=To;var Eo=Xi},87244:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return g}});var T=f(14747),x=f(80110),E=f(45503),B=f(67968),b=f(67771),M=f(33297);const y=c=>{const{optionHeight:C,optionFontSize:L,optionLineHeight:J,optionPadding:z}=c;return{position:"relative",display:"block",minHeight:C,padding:z,color:c.colorText,fontWeight:"normal",fontSize:L,lineHeight:J,boxSizing:"border-box"}};var V=c=>{const{antCls:C,componentCls:L}=c,J=`${L}-item`,z=`&${C}-slide-up-enter${C}-slide-up-enter-active`,K=`&${C}-slide-up-appear${C}-slide-up-appear-active`,ee=`&${C}-slide-up-leave${C}-slide-up-leave-active`,Me=`${L}-dropdown-placement-`;return[{[`${L}-dropdown`]:Object.assign(Object.assign({},(0,T.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,[`
${z}${Me}bottomLeft,
${K}${Me}bottomLeft
`]:{animationName:b.fJ},[`
${z}${Me}topLeft,
${K}${Me}topLeft,
${z}${Me}topRight,
${K}${Me}topRight
`]:{animationName:b.Qt},[`${ee}${Me}bottomLeft`]:{animationName:b.Uw},[`
${ee}${Me}topLeft,
${ee}${Me}topRight
`]:{animationName:b.ly},"&-hidden":{display:"none"},[`${J}`]:Object.assign(Object.assign({},y(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"},T.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${J}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${J}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${J}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${J}-option-selected`]:{backgroundColor:c.colorBgContainerDisabled},color:c.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:c.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,b.oN)(c,"slide-up"),(0,b.oN)(c,"slide-down"),(0,M.Fm)(c,"move-up"),(0,M.Fm)(c,"move-down")]};const h=2,Se=c=>{let{controlHeightSM:C,controlHeight:L,lineWidth:J}=c;const z=(L-C)/2-J,K=Math.ceil(z/2);return[z,K]};function ce(c,C){const{componentCls:L,iconCls:J}=c,z=`${L}-selection-overflow`,K=c.multipleSelectItemHeight,[ee]=Se(c),Me=C?`${L}-${C}`:"";return{[`${L}-multiple${Me}`]:{fontSize:c.fontSize,[z]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${L}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${ee-h}px ${h*2}px`,borderRadius:c.borderRadius,[`${L}-show-search&`]:{cursor:"text"},[`${L}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${h}px 0`,lineHeight:`${K}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${L}-show-arrow ${L}-selector,
&${L}-allow-clear ${L}-selector
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${L}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:K,marginTop:h,marginBottom:h,lineHeight:`${K-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:h*2,paddingInlineStart:c.paddingXS,paddingInlineEnd:c.paddingXS/2,[`${L}-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,T.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${J}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${z}-item + ${z}-item`]:{[`${L}-selection-search`]:{marginInlineStart:0}},[`${L}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-ee,"\n &-input,\n &-mirror\n ":{height:K,fontFamily:c.fontFamily,lineHeight:`${K}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"}},[`${L}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var Ie=c=>{const{componentCls:C}=c,L=(0,E.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),J=(0,E.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,z]=Se(c);return[ce(c),ce(L,"sm"),{[`${C}-multiple${C}-sm`]:{[`${C}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${C}-selection-search`]:{marginInlineStart:z}}},ce(J,"lg")]};function we(c,C){const{componentCls:L,inputPaddingHorizontalBase:J,borderRadius:z}=c,K=c.controlHeight-c.lineWidth*2,ee=Math.ceil(c.fontSize*1.25),Me=C?`${L}-${C}`:"";return{[`${L}-single${Me}`]:{fontSize:c.fontSize,[`${L}-selector`]:Object.assign(Object.assign({},(0,T.Wf)(c)),{display:"flex",borderRadius:z,[`${L}-selection-search`]:{position:"absolute",top:0,insetInlineStart:J,insetInlineEnd:J,bottom:0,"&-input":{width:"100%"}},[`
${L}-selection-item,
${L}-selection-placeholder
`]:{padding:0,lineHeight:`${K}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${K}px`}},[`${L}-selection-item`]:{position:"relative",userSelect:"none"},[`${L}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${L}-selection-item:after`,`${L}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${L}-show-arrow ${L}-selection-item,
&${L}-show-arrow ${L}-selection-placeholder
`]:{paddingInlineEnd:ee},[`&${L}-open ${L}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${L}-customize-input)`]:{[`${L}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${J}px`,[`${L}-selection-search-input`]:{height:K},"&:after":{lineHeight:`${K}px`}}},[`&${L}-customize-input`]:{[`${L}-selector`]:{"&:after":{display:"none"},[`${L}-selection-search`]:{position:"static",width:"100%"},[`${L}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${J}px`,"&:after":{display:"none"}}}}}}}function fe(c){const{componentCls:C}=c,L=c.controlPaddingHorizontalSM-c.lineWidth;return[we(c),we((0,E.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${C}-single${C}-sm`]:{[`&:not(${C}-customize-input)`]:{[`${C}-selection-search`]:{insetInlineStart:L,insetInlineEnd:L},[`${C}-selector`]:{padding:`0 ${L}px`},[`&${C}-show-arrow ${C}-selection-search`]:{insetInlineEnd:L+c.fontSize*1.5},[`
&${C}-show-arrow ${C}-selection-item,
&${C}-show-arrow ${C}-selection-placeholder
`]:{paddingInlineEnd:c.fontSize*1.5}}}},we((0,E.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const k=c=>{const{componentCls:C,selectorBg:L}=c;return{position:"relative",backgroundColor:L,border:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`,transition:`all ${c.motionDurationMid} ${c.motionEaseInOut}`,input:{cursor:"pointer"},[`${C}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${C}-disabled&`]:{color:c.colorTextDisabled,background:c.colorBgContainerDisabled,cursor:"not-allowed",[`${C}-multiple&`]:{background:c.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},qe=function(c,C){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:J,borderHoverColor:z,outlineColor:K,antCls:ee}=C,Me=L?{[`${J}-selector`]:{borderColor:z}}:{};return{[c]:{[`&:not(${J}-disabled):not(${J}-customize-input):not(${ee}-pagination-size-changer)`]:Object.assign(Object.assign({},Me),{[`${J}-focused& ${J}-selector`]:{borderColor:z,boxShadow:`0 0 0 ${C.controlOutlineWidth}px ${K}`,outline:0},[`&:hover ${J}-selector`]:{borderColor:z}})}}},wt=c=>{const{componentCls:C}=c;return{[`${C}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},te=c=>{const{componentCls:C,inputPaddingHorizontalBase:L,iconCls:J}=c;return{[C]:Object.assign(Object.assign({},(0,T.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${C}-customize-input) ${C}-selector`]:Object.assign(Object.assign({},k(c)),wt(c)),[`${C}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},T.vS),[`${C}-selection-placeholder`]:Object.assign(Object.assign({},T.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${C}-arrow`]:Object.assign(Object.assign({},(0,T.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:L,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[J]:{verticalAlign:"top",transition:`transform ${c.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${C}-suffix)`]:{pointerEvents:"auto"}},[`${C}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${C}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:L,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":{[`${C}-clear`]:{opacity:1}}}),[`${C}-has-feedback`]:{[`${C}-clear`]:{insetInlineEnd:L+c.fontSize+c.paddingXS}}}},ne=c=>{const{componentCls:C}=c;return[{[C]:{[`&-borderless ${C}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${C}-in-form-item`]:{width:"100%"}}},te(c),fe(c),Ie(c),V(c),{[`${C}-rtl`]:{direction:"rtl"}},qe(C,(0,E.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),qe(`${C}-status-error`,(0,E.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),qe(`${C}-status-warning`,(0,E.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,x.c)(c,{borderElCls:`${C}-selector`,focusElCls:`${C}-focused`})]};var g=(0,B.Z)("Select",(c,C)=>{let{rootPrefixCls:L}=C;const J=(0,E.TS)(c,{rootPrefixCls:L,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[ne(J)]},c=>{const{fontSize:C,lineHeight:L,controlHeight:J,controlPaddingHorizontal:z,zIndexPopupBase:K,colorText:ee,fontWeightStrong:Me,controlItemBgActive:me,controlItemBgHover:Qe,colorBgContainer:et,colorFillSecondary:_e,controlHeightLG:gt,controlHeightSM:mt,colorBgContainerDisabled:at,colorTextDisabled:Ke}=c;return{zIndexPopup:K+50,optionSelectedColor:ee,optionSelectedFontWeight:Me,optionSelectedBg:me,optionActiveBg:Qe,optionPadding:`${(J-C*L)/2}px ${z}px`,optionFontSize:C,optionLineHeight:L,optionHeight:J,selectorBg:et,clearBg:et,singleItemHeightLG:gt,multipleItemBg:_e,multipleItemBorderColor:"transparent",multipleItemHeight:mt,multipleItemHeightLG:J,multipleSelectorBgDisabled:at,multipleItemColorDisabled:Ke,multipleItemBorderColorDisabled:"transparent"}})},13458:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return x}});const T=E=>{const b={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:E==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},b),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},b),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},b),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},b),{points:["br","tr"],offset:[0,-4]})}};function x(E,B){return E||T(B)}},78642:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return T}});function T(x,E){return E!==void 0?E:x!==null}},46163:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return ue}});var T=f(18299),x=f(16646),E=f(73475),B=f(42922),b=f(3407),M=f(72395),y=f(67294);function ue(V){let{suffixIcon:h,clearIcon:Se,menuItemSelectedIcon:ce,removeIcon:He,loading:Ie,multiple:we,hasFeedback:fe,prefixCls:k,showSuffixIcon:qe,feedbackIcon:wt,showArrow:te,componentName:ne}=V;const g=Se!=null?Se:y.createElement(x.Z,null),c=z=>h===null&&!fe&&!te?null:y.createElement(y.Fragment,null,qe!==!1&&z,fe&&wt);let C=null;if(h!==void 0)C=c(h);else if(Ie)C=c(y.createElement(b.Z,{spin:!0}));else{const z=`${k}-suffix`;C=K=>{let{open:ee,showSearch:Me}=K;return c(ee&&Me?y.createElement(M.Z,{className:z}):y.createElement(B.Z,{className:z}))}}let L=null;ce!==void 0?L=ce:we?L=y.createElement(T.Z,null):L=null;let J=null;return He!==void 0?J=He:J=y.createElement(E.Z,null),{clearIcon:g,suffixIcon:C,itemIcon:L,removeIcon:J}}},33507:function(sn,ve){"use strict";const f=T=>({[T.componentCls]:{[`${T.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${T.motionDurationMid} ${T.motionEaseInOut},
opacity ${T.motionDurationMid} ${T.motionEaseInOut} !important`}},[`${T.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${T.motionDurationMid} ${T.motionEaseInOut},
opacity ${T.motionDurationMid} ${T.motionEaseInOut} !important`}}});ve.Z=f},33297:function(sn,ve,f){"use strict";f.d(ve,{Fm:function(){return ce}});var T=f(45930),x=f(93590);const E=new T.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),B=new T.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),b=new T.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),M=new T.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),y=new T.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ue=new T.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),V=new T.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),h=new T.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Se={"move-up":{inKeyframes:V,outKeyframes:h},"move-down":{inKeyframes:E,outKeyframes:B},"move-left":{inKeyframes:b,outKeyframes:M},"move-right":{inKeyframes:y,outKeyframes:ue}},ce=(He,Ie)=>{const{antCls:we}=He,fe=`${we}-${Ie}`,{inKeyframes:k,outKeyframes:qe}=Se[Ie];return[(0,x.R)(fe,k,qe,He.motionDurationMid),{[`
${fe}-enter,
${fe}-appear
`]:{opacity:0,animationTimingFunction:He.motionEaseOutCirc},[`${fe}-leave`]:{animationTimingFunction:He.motionEaseInOutCirc}}]}},67771:function(sn,ve,f){"use strict";f.d(ve,{Qt:function(){return b},Uw:function(){return B},fJ:function(){return E},ly:function(){return M},oN:function(){return ce}});var T=f(45930),x=f(93590);const E=new T.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),B=new T.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),b=new T.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),M=new T.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),y=new T.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ue=new T.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),V=new T.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),h=new T.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Se={"slide-up":{inKeyframes:E,outKeyframes:B},"slide-down":{inKeyframes:b,outKeyframes:M},"slide-left":{inKeyframes:y,outKeyframes:ue},"slide-right":{inKeyframes:V,outKeyframes:h}},ce=(He,Ie)=>{const{antCls:we}=He,fe=`${we}-${Ie}`,{inKeyframes:k,outKeyframes:qe}=Se[Ie];return[(0,x.R)(fe,k,qe,He.motionDurationMid),{[`
${fe}-enter,
${fe}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:He.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${fe}-leave`]:{animationTimingFunction:He.motionEaseInQuint}}]}},41771:function(sn,ve){"use strict";var f;var T=typeof Symbol=="function"&&Symbol.for,x=T?Symbol.for("react.element"):60103,E=T?Symbol.for("react.portal"):60106,B=T?Symbol.for("react.fragment"):60107,b=T?Symbol.for("react.strict_mode"):60108,M=T?Symbol.for("react.profiler"):60114,y=T?Symbol.for("react.provider"):60109,ue=T?Symbol.for("react.context"):60110,V=T?Symbol.for("react.async_mode"):60111,h=T?Symbol.for("react.concurrent_mode"):60111,Se=T?Symbol.for("react.forward_ref"):60112,ce=T?Symbol.for("react.suspense"):60113,He=T?Symbol.for("react.suspense_list"):60120,Ie=T?Symbol.for("react.memo"):60115,we=T?Symbol.for("react.lazy"):60116,fe=T?Symbol.for("react.block"):60121,k=T?Symbol.for("react.fundamental"):60117,qe=T?Symbol.for("react.responder"):60118,wt=T?Symbol.for("react.scope"):60119;function te(g){if(typeof g=="object"&&g!==null){var c=g.$$typeof;switch(c){case x:switch(g=g.type,g){case V:case h:case B:case M:case b:case ce:return g;default:switch(g=g&&g.$$typeof,g){case ue:case Se:case we:case Ie:case y:return g;default:return c}}case E:return c}}}function ne(g){return te(g)===h}f=V,f=h,f=ue,f=y,f=x,f=Se,f=B,f=we,f=Ie,f=E,f=M,f=b,f=ce,f=function(g){return ne(g)||te(g)===V},f=ne,f=function(g){return te(g)===ue},f=function(g){return te(g)===y},f=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===x},f=function(g){return te(g)===Se},ve.isFragment=function(g){return te(g)===B},f=function(g){return te(g)===we},f=function(g){return te(g)===Ie},f=function(g){return te(g)===E},f=function(g){return te(g)===M},f=function(g){return te(g)===b},f=function(g){return te(g)===ce},f=function(g){return typeof g=="string"||typeof g=="function"||g===B||g===h||g===M||g===b||g===ce||g===He||typeof g=="object"&&g!==null&&(g.$$typeof===we||g.$$typeof===Ie||g.$$typeof===y||g.$$typeof===ue||g.$$typeof===Se||g.$$typeof===k||g.$$typeof===qe||g.$$typeof===wt||g.$$typeof===fe)},f=te},47655:function(sn,ve,f){"use strict";sn.exports=f(41771)},64701:function(sn,ve,f){"use strict";f.r(ve),f.d(ve,{ResizableTextArea:function(){return Ot},default:function(){return Wn}});var T=f(87462),x=f(1413),E=f(4942),B=f(71002),b=f(97685),M=f(45987),y=f(74902),ue=f(94184),V=f.n(ue),h=f(67656),Se=f(87887),ce=f(67294);function He(xe){var he=ce.useRef();he.current=xe;var ze=ce.useCallback(function(){for(var ye,ut=arguments.length,Mt=new Array(ut),dt=0;dt<ut;dt++)Mt[dt]=arguments[dt];return(ye=he.current)===null||ye===void 0?void 0:ye.call.apply(ye,[he].concat(Mt))},[]);return ze}function Ie(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var we=Ie()?ce.useLayoutEffect:ce.useEffect,fe=we,k=function(he,ze){var ye=ce.useRef(!0);we(function(){if(!ye.current)return he()},ze),we(function(){return ye.current=!1,function(){ye.current=!0}},[])};function qe(xe){var he=ce.useRef(!1),ze=ce.useState(xe),ye=(0,b.Z)(ze,2),ut=ye[0],Mt=ye[1];ce.useEffect(function(){return he.current=!1,function(){he.current=!0}},[]);function dt(P,W){W&&he.current||Mt(P)}return[ut,dt]}function wt(xe){return xe!==void 0}function te(xe,he){var ze=he||{},ye=ze.defaultValue,ut=ze.value,Mt=ze.onChange,dt=ze.postState,P=qe(function(){return wt(ut)?ut:wt(ye)?typeof ye=="function"?ye():ye:typeof xe=="function"?xe():xe}),W=(0,b.Z)(P,2),H=W[0],ie=W[1],yt=ut!==void 0?ut:H,lt=dt?dt(yt):yt,De=He(Mt),ht=qe([yt]),be=(0,b.Z)(ht,2),Je=be[0],Tn=be[1];k(function(){var Zt=Je[0];H!==Zt&&De(H,Zt)},[Je]),k(function(){wt(ut)||ie(ut)},[ut]);var Tt=He(function(Zt,re){ie(Zt,re),Tn([yt],re)});return[lt,Tt]}var ne=f(48555),g=function(he){return+setTimeout(he,16)},c=function(he){return clearTimeout(he)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(g=function(he){return window.requestAnimationFrame(he)},c=function(he){return window.cancelAnimationFrame(he)});var C=0,L=new Map;function J(xe){L.delete(xe)}var z=function(he){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;C+=1;var ye=C;function ut(Mt){if(Mt===0)J(ye),he();else{var dt=g(function(){ut(Mt-1)});L.set(ye,dt)}}return ut(ze),ye};z.cancel=function(xe){var he=L.get(xe);return J(he),c(he)};var K=z,ee=`
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;
`,Me=["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"],me={},Qe;function et(xe){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ze=xe.getAttribute("id")||xe.getAttribute("data-reactid")||xe.getAttribute("name");if(he&&me[ze])return me[ze];var ye=window.getComputedStyle(xe),ut=ye.getPropertyValue("box-sizing")||ye.getPropertyValue("-moz-box-sizing")||ye.getPropertyValue("-webkit-box-sizing"),Mt=parseFloat(ye.getPropertyValue("padding-bottom"))+parseFloat(ye.getPropertyValue("padding-top")),dt=parseFloat(ye.getPropertyValue("border-bottom-width"))+parseFloat(ye.getPropertyValue("border-top-width")),P=Me.map(function(H){return"".concat(H,":").concat(ye.getPropertyValue(H))}).join(";"),W={sizingStyle:P,paddingSize:Mt,borderSize:dt,boxSizing:ut};return he&&ze&&(me[ze]=W),W}function _e(xe){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Qe||(Qe=document.createElement("textarea"),Qe.setAttribute("tab-index","-1"),Qe.setAttribute("aria-hidden","true"),document.body.appendChild(Qe)),xe.getAttribute("wrap")?Qe.setAttribute("wrap",xe.getAttribute("wrap")):Qe.removeAttribute("wrap");var ut=et(xe,he),Mt=ut.paddingSize,dt=ut.borderSize,P=ut.boxSizing,W=ut.sizingStyle;Qe.setAttribute("style","".concat(W,";").concat(ee)),Qe.value=xe.value||xe.placeholder||"";var H=void 0,ie=void 0,yt,lt=Qe.scrollHeight;if(P==="border-box"?lt+=dt:P==="content-box"&&(lt-=Mt),ze!==null||ye!==null){Qe.value=" ";var De=Qe.scrollHeight-Mt;ze!==null&&(H=De*ze,P==="border-box"&&(H=H+Mt+dt),lt=Math.max(H,lt)),ye!==null&&(ie=De*ye,P==="border-box"&&(ie=ie+Mt+dt),yt=lt>ie?"":"hidden",lt=Math.min(ie,lt))}var ht={height:lt,overflowY:yt,resize:"none"};return H&&(ht.minHeight=H),ie&&(ht.maxHeight=ie),ht}var gt=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],mt=0,at=1,Ke=2,je=ce.forwardRef(function(xe,he){var ze=xe,ye=ze.prefixCls,ut=ze.onPressEnter,Mt=ze.defaultValue,dt=ze.value,P=ze.autoSize,W=ze.onResize,H=ze.className,ie=ze.style,yt=ze.disabled,lt=ze.onChange,De=ze.onInternalAutoSize,ht=(0,M.Z)(ze,gt),be=te(Mt,{value:dt,postState:function(X){return X!=null?X:""}}),Je=(0,b.Z)(be,2),Tn=Je[0],Tt=Je[1],Zt=function(X){Tt(X.target.value),lt==null||lt(X)},re=ce.useRef();ce.useImperativeHandle(he,function(){return{textArea:re.current}});var it=ce.useMemo(function(){return P&&(0,B.Z)(P)==="object"?[P.minRows,P.maxRows]:[]},[P]),It=(0,b.Z)(it,2),Qt=It[0],Jt=It[1],Dt=!!P,We=function(){try{if(document.activeElement===re.current){var X=re.current,Ze=X.selectionStart,Ee=X.selectionEnd,Re=X.scrollTop;re.current.setSelectionRange(Ze,Ee),re.current.scrollTop=Re}}catch(ct){}},$t=ce.useState(Ke),Ht=(0,b.Z)($t,2),An=Ht[0],jr=Ht[1],kr=ce.useState(),Si=(0,b.Z)(kr,2),li=Si[0],Oi=Si[1],_r=function(){jr(mt)};fe(function(){Dt&&_r()},[dt,Qt,Jt,Dt]),fe(function(){if(An===mt)jr(at);else if(An===at){var _=_e(re.current,!1,Qt,Jt);jr(Ke),Oi(_)}else We()},[An]);var Ci=ce.useRef(),si=function(){K.cancel(Ci.current)},Pi=function(X){An===Ke&&(W==null||W(X),P&&(si(),Ci.current=K(function(){_r()})))};ce.useEffect(function(){return si},[]);var I=Dt?li:null,Y=(0,x.Z)((0,x.Z)({},ie),I);return(An===mt||An===at)&&(Y.overflowY="hidden",Y.overflowX="hidden"),ce.createElement(ne.Z,{onResize:Pi,disabled:!(P||W)},ce.createElement("textarea",(0,T.Z)({},ht,{ref:re,style:Y,className:V()(ye,H,(0,E.Z)({},"".concat(ye,"-disabled"),yt)),disabled:yt,value:Tn,onChange:Zt})))}),Ot=je,Nt=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ve(xe,he){return(0,y.Z)(xe||"").slice(0,he).join("")}function rt(xe,he,ze,ye){var ut=ze;return xe?ut=Ve(ze,ye):(0,y.Z)(he||"").length<ze.length&&(0,y.Z)(ze||"").length>ye&&(ut=he),ut}var Xe=ce.forwardRef(function(xe,he){var ze,ye=xe.defaultValue,ut=xe.value,Mt=xe.onFocus,dt=xe.onBlur,P=xe.onChange,W=xe.allowClear,H=xe.maxLength,ie=xe.onCompositionStart,yt=xe.onCompositionEnd,lt=xe.suffix,De=xe.prefixCls,ht=De===void 0?"rc-textarea":De,be=xe.classes,Je=xe.showCount,Tn=xe.className,Tt=xe.style,Zt=xe.disabled,re=xe.hidden,it=xe.classNames,It=xe.styles,Qt=xe.onResize,Jt=(0,M.Z)(xe,Nt),Dt=te(ye,{value:ut,defaultValue:ye}),We=(0,b.Z)(Dt,2),$t=We[0],Ht=We[1],An=(0,ce.useRef)(null),jr=ce.useState(!1),kr=(0,b.Z)(jr,2),Si=kr[0],li=kr[1],Oi=ce.useState(!1),_r=(0,b.Z)(Oi,2),Ci=_r[0],si=_r[1],Pi=ce.useRef(),I=ce.useRef(0),Y=ce.useState(null),_=(0,b.Z)(Y,2),X=_[0],Ze=_[1],Ee=function(){var Te;(Te=An.current)===null||Te===void 0||Te.textArea.focus()};(0,ce.useImperativeHandle)(he,function(){return{resizableTextArea:An.current,focus:Ee,blur:function(){var Te;(Te=An.current)===null||Te===void 0||Te.textArea.blur()}}}),(0,ce.useEffect)(function(){li(function(Ce){return!Zt&&Ce})},[Zt]);var Re=Number(H)>0,ct=function(Te){si(!0),Pi.current=$t,I.current=Te.currentTarget.selectionStart,ie==null||ie(Te)},Pt=function(Te){si(!1);var Pe=Te.currentTarget.value;if(Re){var Gt,U=I.current>=H+1||I.current===((Gt=Pi.current)===null||Gt===void 0?void 0:Gt.length);Pe=rt(U,Pi.current,Pe,H)}Pe!==$t&&(Ht(Pe),(0,Se.rJ)(Te.currentTarget,Te,P,Pe)),yt==null||yt(Te)},jt=function(Te){var Pe=Te.target.value;if(!Ci&&Re){var Gt=Te.target.selectionStart>=H+1||Te.target.selectionStart===Pe.length||!Te.target.selectionStart;Pe=rt(Gt,$t,Pe,H)}Ht(Pe),(0,Se.rJ)(Te.currentTarget,Te,P,Pe)},vt=function(Te){var Pe=Jt.onPressEnter,Gt=Jt.onKeyDown;Te.key==="Enter"&&Pe&&Pe(Te),Gt==null||Gt(Te)},Ye=function(Te){li(!0),Mt==null||Mt(Te)},m=function(Te){li(!1),dt==null||dt(Te)},F=function(Te){var Pe;Ht(""),Ee(),(0,Se.rJ)((Pe=An.current)===null||Pe===void 0?void 0:Pe.textArea,Te,P)},N=(0,Se.D7)($t);!Ci&&Re&&ut==null&&(N=Ve(N,H));var A=lt,Z;if(Je){var $=(0,y.Z)(N).length;(0,B.Z)(Je)==="object"?Z=Je.formatter({value:N,count:$,maxLength:H}):Z="".concat($).concat(Re?" / ".concat(H):""),A=ce.createElement(ce.Fragment,null,A,ce.createElement("span",{className:V()("".concat(ht,"-data-count"),it==null?void 0:it.count),style:It==null?void 0:It.count},Z))}var $e=function(Te){var Pe;Qt==null||Qt(Te),(Pe=An.current)!==null&&Pe!==void 0&&Pe.textArea.style.height&&Ze(!0)},St=!Jt.autoSize&&!Je&&!W,tt=ce.createElement(h.BaseInput,{value:N,allowClear:W,handleReset:F,suffix:A,prefixCls:ht,classes:{affixWrapper:V()(be==null?void 0:be.affixWrapper,(ze={},(0,E.Z)(ze,"".concat(ht,"-show-count"),Je),(0,E.Z)(ze,"".concat(ht,"-textarea-allow-clear"),W),ze))},disabled:Zt,focused:Si,className:Tn,style:(0,x.Z)((0,x.Z)({},Tt),X&&!St?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Z=="string"?Z:void 0}},hidden:re,inputElement:ce.createElement(Ot,(0,T.Z)({},Jt,{onKeyDown:vt,onChange:jt,onFocus:Ye,onBlur:m,onCompositionStart:ct,onCompositionEnd:Pt,className:it==null?void 0:it.textarea,style:(0,x.Z)((0,x.Z)({},It==null?void 0:It.textarea),{},{resize:Tt==null?void 0:Tt.resize}),disabled:Zt,prefixCls:ht,onResize:$e,ref:An}))});return tt}),vn=Xe,Wn=vn},4631:function(sn){(function(ve,f){sn.exports=f()})(this,function(){"use strict";var ve=navigator.userAgent,f=navigator.platform,T=/gecko\/\d/i.test(ve),x=/MSIE \d/.test(ve),E=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ve),B=/Edge\/(\d+)/.exec(ve),b=x||E||B,M=b&&(x?document.documentMode||6:+(B||E)[1]),y=!B&&/WebKit\//.test(ve),ue=y&&/Qt\/\d+\.\d+/.test(ve),V=!B&&/Chrome\//.test(ve),h=/Opera\//.test(ve),Se=/Apple Computer/.test(navigator.vendor),ce=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ve),He=/PhantomJS/.test(ve),Ie=!B&&/AppleWebKit/.test(ve)&&/Mobile\/\w+/.test(ve),we=/Android/.test(ve),fe=Ie||we||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ve),k=Ie||/Mac/.test(f),qe=/\bCrOS\b/.test(ve),wt=/win/i.test(f),te=h&&ve.match(/Version\/(\d*\.\d*)/);te&&(te=Number(te[1])),te&&te>=15&&(h=!1,y=!0);var ne=k&&(ue||h&&(te==null||te<12.11)),g=T||b&&M>=9;function c(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C=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 L(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return L(e).appendChild(t)}function z(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 K(e,t,r,n){var i=z(e,t,r,n);return i.setAttribute("role","presentation"),i}var ee;document.createRange?ee=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:ee=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 Me(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 me(){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 Qe(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function et(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 _e=function(e){e.select()};Ie?_e=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:b&&(_e=function(e){try{e.select()}catch(t){}});function gt(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function mt(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 at(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 Ke=function(){this.id=null,this.f=null,this.time=0,this.handler=gt(this.onTimeout,this)};Ke.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ke.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 je(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Ot=50,Nt={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},rt={origin:"*mouse"},Xe={origin:"+move"};function vn(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 Wn=[""];function xe(e){for(;Wn.length<=e;)Wn.push(he(Wn)+" ");return Wn[e]}function he(e){return e[e.length-1]}function ze(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function ye(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function ut(){}function Mt(e,t){var r;return Object.create?r=Object.create(e):(ut.prototype=e,r=new ut),t&&mt(t,r),r}var dt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function P(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||dt.test(e))}function W(e,t){return t?t.source.indexOf("\\w")>-1&&P(e)?!0:t.test(e):P(e)}function H(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\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 yt(e){return e.charCodeAt(0)>=768&&ie.test(e)}function lt(e,t,r){for(;(r<0?t>0:t<e.length)&&yt(e.charAt(t));)t+=r;return t}function De(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 ht(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 be=null;function Je(e,t,r){var n;be=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:be=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:be=i)}return n!=null?n:be}var Tn=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,S){this.level=u,this.from=p,this.to=S}return function(u,p){var S=p=="ltr"?"L":"R";if(u.length==0||p=="ltr"&&!n.test(u))return!1;for(var R=u.length,w=[],j=0;j<R;++j)w.push(r(u.charCodeAt(j)));for(var q=0,de=S;q<R;++q){var Fe=w[q];Fe=="m"?w[q]=de:de=Fe}for(var Ue=0,Le=S;Ue<R;++Ue){var Ge=w[Ue];Ge=="1"&&Le=="r"?w[Ue]="n":o.test(Ge)&&(Le=Ge,Ge=="r"&&(w[Ue]="R"))}for(var Et=1,pt=w[0];Et<R-1;++Et){var nn=w[Et];nn=="+"&&pt=="1"&&w[Et+1]=="1"?w[Et]="1":nn==","&&pt==w[Et+1]&&(pt=="1"||pt=="n")&&(w[Et]=pt),pt=nn}for(var Vn=0;Vn<R;++Vn){var Ar=w[Vn];if(Ar==",")w[Vn]="N";else if(Ar=="%"){var ur=void 0;for(ur=Vn+1;ur<R&&w[ur]=="%";++ur);for(var Mi=Vn&&w[Vn-1]=="!"||ur<R&&w[ur]=="1"?"1":"N",mi=Vn;mi<ur;++mi)w[mi]=Mi;Vn=ur-1}}for(var Or=0,yi=S;Or<R;++Or){var Wr=w[Or];yi=="L"&&Wr=="1"?w[Or]="L":o.test(Wr)&&(yi=Wr)}for(var Pr=0;Pr<R;++Pr)if(i.test(w[Pr])){var Ir=void 0;for(Ir=Pr+1;Ir<R&&i.test(w[Ir]);++Ir);for(var fr=(Pr?w[Pr-1]:S)=="L",bi=(Ir<R?w[Ir]:S)=="L",jo=fr==bi?fr?"L":"R":S,So=Pr;So<Ir;++So)w[So]=jo;Pr=Ir-1}for(var Kr=[],Ji,Nr=0;Nr<R;)if(a.test(w[Nr])){var Ja=Nr;for(++Nr;Nr<R&&a.test(w[Nr]);++Nr);Kr.push(new s(0,Ja,Nr))}else{var so=Nr,Oo=Kr.length,Io=p=="rtl"?1:0;for(++Nr;Nr<R&&w[Nr]!="L";++Nr);for(var ai=so;ai<Nr;)if(l.test(w[ai])){so<ai&&(Kr.splice(Oo,0,new s(1,so,ai)),Oo+=Io);var ko=ai;for(++ai;ai<Nr&&l.test(w[ai]);++ai);Kr.splice(Oo,0,new s(2,ko,ai)),Oo+=Io,so=ai}else++ai;so<Nr&&Kr.splice(Oo,0,new s(1,so,Nr))}return p=="ltr"&&(Kr[0].level==1&&(Ji=u.match(/^\s+/))&&(Kr[0].from=Ji[0].length,Kr.unshift(new s(0,0,Ji[0].length))),he(Kr).level==1&&(Ji=u.match(/\s+$/))&&(he(Kr).to-=Ji[0].length,Kr.push(new s(0,R-Ji[0].length,R)))),p=="rtl"?Kr.reverse():Kr}}();function Tt(e,t){var r=e.order;return r==null&&(r=e.order=Tn(e.text,t)),r}var Zt=[],re=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]||Zt).concat(r)}};function it(e,t){return e._handlers&&e._handlers[t]||Zt}function It(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=je(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Qt(e,t){var r=it(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 Jt(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Qt(e,r||t.type,e,t),jr(t)||t.codemirrorIgnore}function Dt(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)je(r,t[n])==-1&&r.push(t[n])}function We(e,t){return it(e,t).length>0}function $t(e){e.prototype.on=function(t,r){re(this,t,r)},e.prototype.off=function(t,r){It(this,t,r)}}function Ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function An(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function jr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function kr(e){Ht(e),An(e)}function Si(e){return e.target||e.srcElement}function li(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),k&&e.ctrlKey&&t==1&&(t=3),t}var Oi=function(){if(b&&M<9)return!1;var e=z("div");return"draggable"in e||"dragDrop"in e}(),_r;function Ci(e){if(_r==null){var t=z("span","\u200B");J(e,z("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(_r=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&M<8))}var r=_r?z("span","\u200B"):z("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var si;function Pi(e){if(si!=null)return si;var t=J(e,document.createTextNode("A\u062EA")),r=ee(t,0,1).getBoundingClientRect(),n=ee(t,1,2).getBoundingClientRect();return L(e),!r||r.left==r.right?!1:si=n.right-r.right<3}var I=`
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/)},Y=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},_=function(){var e=z("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),X=null;function Ze(e){if(X!=null)return X;var t=J(e,z("span","x")),r=t.getBoundingClientRect(),n=ee(t,0,1).getBoundingClientRect();return X=Math.abs(r.left-n.left)>1}var Ee={},Re={};function ct(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ee[e]=t}function Pt(e,t){Re[e]=t}function jt(e){if(typeof e=="string"&&Re.hasOwnProperty(e))e=Re[e];else if(e&&typeof e.name=="string"&&Re.hasOwnProperty(e.name)){var t=Re[e.name];typeof t=="string"&&(t={name:t}),e=Mt(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return jt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return jt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function vt(e,t){t=jt(t);var r=Ee[t.name];if(!r)return vt(e,"text/plain");var n=r(e,t);if(Ye.hasOwnProperty(t.name)){var i=Ye[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 Ye={};function m(e,t){var r=Ye.hasOwnProperty(e)?Ye[e]:Ye[e]={};mt(t,r)}function F(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 N(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 A(e,t,r){return e.startState?e.startState(t,r):!0}var Z=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};Z.prototype.eol=function(){return this.pos>=this.string.length},Z.prototype.sol=function(){return this.pos==this.lineStart},Z.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Z.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Z.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},Z.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Z.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Z.prototype.skipToEnd=function(){this.pos=this.string.length},Z.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Z.prototype.backUp=function(e){this.pos-=e},Z.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=at(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?at(this.string,this.lineStart,this.tabSize):0)},Z.prototype.indentation=function(){return at(this.string,null,this.tabSize)-(this.lineStart?at(this.string,this.lineStart,this.tabSize):0)},Z.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)}},Z.prototype.current=function(){return this.string.slice(this.start,this.pos)},Z.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Z.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Z.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function $(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 $e(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 St(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function tt(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Ce(e){if(e.parent==null)return null;for(var t=e.parent,r=je(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 Te(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return r+a}function Pe(e,t){return t>=e.first&&t<e.first+e.size}function Gt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function U(e,t,r){if(r===void 0&&(r=null),!(this instanceof U))return new U(e,t,r);this.line=e,this.ch=t,this.sticky=r}function Be(e,t){return e.line-t.line||e.ch-t.ch}function rn(e,t){return e.sticky==t.sticky&&Be(e,t)==0}function xn(e){return U(e.line,e.ch)}function At(e,t){return Be(e,t)<0?t:e}function Ct(e,t){return Be(e,t)<0?e:t}function Mn(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 U(e.first,0);var r=e.first+e.size-1;return t.line>r?U(r,$(e,r).text.length):cn(t,$(e,t.line).text.length)}function cn(e,t){var r=e.ch;return r==null||r>t?U(e.line,t):r<0?U(e.line,0):e}function on(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Ne(e,t[n]);return r}var In=function(e,t){this.state=e,this.lookAhead=t},Sn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Sn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Sn.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}},Sn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Sn.fromSaved=function(e,t,r){return t instanceof In?new Sn(e,F(e.mode,t.state),r,t.lookAhead):new Sn(e,F(e.mode,t),r)},Sn.prototype.save=function(e){var t=e!==!1?F(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new In(t,this.maxLookAhead):t};function Sr(e,t,r,n){var i=[e.state.modeGen],o={};On(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],S=1,R=0;r.state=!0,On(e,t.text,p.mode,r,function(w,j){for(var q=S;R<w;){var de=i[S];de>w&&i.splice(S,1,w,i[S+1],de),S+=2,R=Math.min(w,de)}if(j)if(p.opaque)i.splice(q,S-q,w,"overlay "+j),S=q+2;else for(;q<S;q+=2){var Fe=i[q+1];i[q+1]=(Fe?Fe+" ":"")+"overlay "+j}},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 Gn(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Zn(e,Ce(t)),i=t.text.length>e.options.maxHighlightLength&&F(e.doc.mode,n.state),o=Sr(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 Zn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Sn(n,!0,t);var o=ar(e,t,r),a=o>n.first&&$(n,o-1).stateAfter,l=a?Sn.fromSaved(n,a,o):new Sn(n,A(n.mode),o);return n.iter(o,t,function(s){Rr(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 Rr(e,t,r,n){var i=e.doc.mode,o=new Z(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&Fr(i,r.state);!o.eol();)Nn(i,o,r.state),o.start=o.pos}function Fr(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=N(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function Nn(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=N(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 Cr=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function dr(e,t,r,n){var i=e.doc,o=i.mode,a;t=Ne(i,t);var l=$(i,t.line),s=Zn(e,t.line,r),u=new Z(l.text,e.options.tabSize,s),p;for(n&&(p=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=Nn(o,u,s.state),n&&p.push(new Cr(u,a,F(i.mode,s.state)));return n?p:new Cr(u,a,s.state)}function xr(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 On(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,p=new Z(t,e.options.tabSize,n),S,R=e.options.addModeClass&&[null];for(t==""&&xr(Fr(r,n.state),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(l=!1,a&&Rr(e,t,n,p.pos),p.pos=t.length,S=null):S=xr(Nn(r,p,n.state,R),o),R){var w=R[0].name;w&&(S="m-"+(S?w+" "+S:w))}if(!l||u!=S){for(;s<p.start;)s=Math.min(p.start,s+5e3),i(s,u);u=S}p.start=p.pos}for(;s<p.pos;){var j=Math.min(p.pos,s+5e3);i(j,u),s=j}}function ar(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=$(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof In?u.lookAhead:0)<=o.modeFrontier))return l;var p=at(s.text,null,e.options.tabSize);(i==null||n>p)&&(i=l-1,n=p)}return i}function Xn(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=$(e,n).stateAfter;if(i&&(!(i instanceof In)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Yn=!1,tr=!1;function hr(){Yn=!0}function En(){tr=!0}function Un(e,t,r){this.marker=e,this.from=t,this.to=r}function Qn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Lr(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function ui(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Vr(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 Un(a,o.from,s?null:o.to))}}return n}function Gr(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 Un(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function ci(e,t){if(t.full)return null;var r=Pe(e,t.from.line)&&$(e,t.from.line).markedSpans,n=Pe(e,t.to.line)&&$(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=Be(t.from,t.to)==0,l=Vr(r,i,a),s=Gr(n,o,a),u=t.text.length==1,p=he(t.text).length+(u?i:0);if(l)for(var S=0;S<l.length;++S){var R=l[S];if(R.to==null){var w=Qn(s,R.marker);w?u&&(R.to=w.to==null?null:w.to+p):R.to=i}}if(s)for(var j=0;j<s.length;++j){var q=s[j];if(q.to!=null&&(q.to+=p),q.from==null){var de=Qn(l,q.marker);de||(q.from=p,u&&(l||(l=[])).push(q))}else q.from+=p,u&&(l||(l=[])).push(q)}l&&(l=zn(l)),s&&s!=l&&(s=zn(s));var Fe=[l];if(!u){var Ue=t.text.length-2,Le;if(Ue>0&&l)for(var Ge=0;Ge<l.length;++Ge)l[Ge].to==null&&(Le||(Le=[])).push(new Un(l[Ge].marker,null,null));for(var Et=0;Et<Ue;++Et)Fe.push(Le);Fe.push(s)}return Fe}function zn(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 Xr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(w){if(w.markedSpans)for(var j=0;j<w.markedSpans.length;++j){var q=w.markedSpans[j].marker;q.readOnly&&(!n||je(n,q)==-1)&&(n||(n=[])).push(q)}}),!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(!(Be(u.to,l.from)<0||Be(u.from,l.to)>0)){var p=[s,1],S=Be(u.from,l.from),R=Be(u.to,l.to);(S<0||!a.inclusiveLeft&&!S)&&p.push({from:u.from,to:l.from}),(R>0||!a.inclusiveRight&&!R)&&p.push({from:l.to,to:u.to}),i.splice.apply(i,p),s+=p.length-3}}return i}function $r(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Br(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Ai(e){return e.inclusiveLeft?-1:0}function zi(e){return e.inclusiveRight?1:0}function xi(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=Be(n.from,i.from)||Ai(e)-Ai(t);if(o)return-o;var a=Be(n.to,i.to)||zi(e)-zi(t);return a||t.id-e.id}function Yr(e,t){var r=tr&&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||xi(n,i.marker)<0)&&(n=i.marker);return n}function _i(e){return Yr(e,!0)}function Hi(e){return Yr(e,!1)}function Vi(e,t){var r=tr&&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||xi(n,o.marker)<0)&&(n=o.marker)}return n}function Ni(e,t,r,n,i){var o=$(e,t),a=tr&&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=Be(u.from,r)||Ai(s.marker)-Ai(i),S=Be(u.to,n)||zi(s.marker)-zi(i);if(!(p>=0&&S<=0||p<=0&&S>=0)&&(p<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Be(u.to,r)>=0:Be(u.to,r)>0)||p>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Be(u.from,n)<=0:Be(u.from,n)<0)))return!0}}}function fi(e){for(var t;t=_i(e);)e=t.find(-1,!0).line;return e}function _o(e){for(var t;t=Hi(e);)e=t.find(1,!0).line;return e}function Co(e){for(var t,r;t=Hi(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function qi(e,t){var r=$(e,t),n=fi(r);return r==n?t:Ce(n)}function Ro(e,t){if(t>e.lastLine())return t;var r=$(e,t),n;if(!Ii(e,r))return t;for(;n=Hi(r);)r=n.find(1,!0).line;return Ce(r)+1}function Ii(e,t){var r=tr&&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&&uo(e,t,n))return!0}}}function uo(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return uo(e,n.line,Qn(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)&&uo(e,t,i))return!0}function Ri(e){e=fi(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 Gi(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=_i(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Hi(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 eo(e){var t=e.display,r=e.doc;t.maxLine=$(r,r.first),t.maxLineLength=Gi(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Gi(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var $i=function(e,t,r){this.text=e,Br(this,t),this.height=r?r(this):1};$i.prototype.lineNo=function(){return Ce(this)},$t($i);function Fo(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),$r(e),Br(e,r);var i=n?n(e):1;i!=e.height&&tt(e,i)}function Lo(e){e.parent=null,$r(e)}var xo={},Xi={};function To(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Xi:xo;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Eo(e,t){var r=K("span",null,null,y?"padding-right: .1px":null),n={pre:K("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=v,Pi(e.display.measure)&&(a=Tt(o,e.doc.direction))&&(n.addToken=O(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&Ce(o);Q(o,n,Gn(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=et(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=et(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Ci(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(y){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 Qt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=et(n.pre.className,n.textClass||"")),n}function d(e){var t=z("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function v(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?D(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),b&&M<9&&(u=!0),e.pos+=t.length;else{p=document.createDocumentFragment();for(var S=0;;){s.lastIndex=S;var R=s.exec(t),w=R?R.index-S:t.length-S;if(w){var j=document.createTextNode(l.slice(S,S+w));b&&M<9?p.appendChild(z("span",[j])):p.appendChild(j),e.map.push(e.pos,e.pos+w,j),e.col+=w,e.pos+=w}if(!R)break;S+=w+1;var q=void 0;if(R[0]==" "){var de=e.cm.options.tabSize,Fe=de-e.col%de;q=p.appendChild(z("span",xe(Fe),"cm-tab")),q.setAttribute("role","presentation"),q.setAttribute("cm-text"," "),e.col+=Fe}else R[0]=="\r"||R[0]==`
`?(q=p.appendChild(z("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),q.setAttribute("cm-text",R[0]),e.col+=1):(q=e.cm.options.specialCharPlaceholder(R[0]),q.setAttribute("cm-text",R[0]),b&&M<9?p.appendChild(z("span",[q])):p.appendChild(q),e.col+=1);e.map.push(e.pos,e.pos+1,q),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var Ue=r||"";n&&(Ue+=n),i&&(Ue+=i);var Le=z("span",[p],Ue,o);if(a)for(var Ge in a)a.hasOwnProperty(Ge)&&Ge!="style"&&Ge!="class"&&Le.setAttribute(Ge,a[Ge]);return e.content.appendChild(Le)}e.content.appendChild(p)}}function D(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 O(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 S=void 0,R=0;R<t.length&&(S=t[R],!(S.to>u&&S.from<=u));R++);if(S.to>=p)return e(r,n,i,o,a,l,s);e(r,n.slice(0,S.to-u),i,o,null,l,s),o=null,n=n.slice(S.to-u),u=S.to}}}function G(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 Q(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]),To(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,p="",S,R,w=0,j,q,de,Fe,Ue;;){if(w==s){j=q=de=R="",Ue=null,Fe=null,w=1/0;for(var Le=[],Ge=void 0,Et=0;Et<n.length;++Et){var pt=n[Et],nn=pt.marker;if(nn.type=="bookmark"&&pt.from==s&&nn.widgetNode)Le.push(nn);else if(pt.from<=s&&(pt.to==null||pt.to>s||nn.collapsed&&pt.to==s&&pt.from==s)){if(pt.to!=null&&pt.to!=s&&w>pt.to&&(w=pt.to,q=""),nn.className&&(j+=" "+nn.className),nn.css&&(R=(R?R+";":"")+nn.css),nn.startStyle&&pt.from==s&&(de+=" "+nn.startStyle),nn.endStyle&&pt.to==w&&(Ge||(Ge=[])).push(nn.endStyle,pt.to),nn.title&&((Ue||(Ue={})).title=nn.title),nn.attributes)for(var Vn in nn.attributes)(Ue||(Ue={}))[Vn]=nn.attributes[Vn];nn.collapsed&&(!Fe||xi(Fe.marker,nn)<0)&&(Fe=pt)}else pt.from>s&&w>pt.from&&(w=pt.from)}if(Ge)for(var Ar=0;Ar<Ge.length;Ar+=2)Ge[Ar+1]==w&&(q+=" "+Ge[Ar]);if(!Fe||Fe.from==s)for(var ur=0;ur<Le.length;++ur)G(t,0,Le[ur]);if(Fe&&(Fe.from||0)==s){if(G(t,(Fe.to==null?l+1:Fe.to)-s,Fe.marker,Fe.from==null),Fe.to==null)return;Fe.to==s&&(Fe=!1)}}if(s>=l)break;for(var Mi=Math.min(l,w);;){if(p){var mi=s+p.length;if(!Fe){var Or=mi>Mi?p.slice(0,Mi-s):p;t.addToken(t,Or,S?S+j:j,de,s+Or.length==w?q:"",R,Ue)}if(mi>=Mi){p=p.slice(Mi-s),s=Mi;break}s=mi,de=""}p=i.slice(o,o=r[u++]),S=To(r[u++],t.cm.options)}}}function pe(e,t,r){this.line=t,this.rest=Co(t),this.size=this.rest?Ce(he(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ii(e,t)}function Oe(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new pe(e.doc,$(e.doc,o),o);i=o+a.size,n.push(a)}return n}var Ae=null;function oe(e){Ae?Ae.ops.push(e):e.ownsGroup=Ae={ops:[e],delayedCallbacks:[]}}function ae(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 le(e,t){var r=e.ownsGroup;if(r)try{ae(r)}finally{Ae=null,t(r)}}var ke=null;function se(e,t){var r=it(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ae?i=Ae.delayedCallbacks:ke?i=ke:(i=ke=[],setTimeout(st,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function st(){var e=ke;ke=null;for(var t=0;t<e.length;++t)e[t]()}function Bt(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?zt(e,t):o=="gutter"?an(e,t,r,n):o=="class"?pn(e,t):o=="widget"&&Ft(e,t,n)}t.changes=null}function Ut(e){return e.node==e.text&&(e.node=z("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),b&&M<8&&(e.node.style.zIndex=2)),e.node}function Wt(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=Ut(t);t.background=n.insertBefore(z("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Rt(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Eo(e,t)}function zt(e,t){var r=t.text.className,n=Rt(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,pn(e,t)):r&&(t.text.className=r)}function pn(e,t){Wt(e,t),t.line.wrapClass?Ut(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 an(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=Ut(t);t.gutterBackground=z("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=Ut(t),l=t.gutter=z("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(z("div",Gt(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(z("div",[p],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Ft(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);en(e,t,r)}function qt(e,t,r,n){var i=Rt(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),pn(e,t),an(e,t,r,n),en(e,t,n),t.node}function en(e,t,r){if(gn(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)gn(e,t.rest[n],t,r,!1)}function gn(e,t,r,n,i){if(t.widgets)for(var o=Ut(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=z("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),tn(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),se(s,"redraw")}}function tn(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 fn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Me(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;"),J(t.display.measure,z("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Rn(e,t){for(var r=Si(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 mn(e){return e.lineSpace.offsetTop}function yn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function bn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=J(e.measure,z("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 bt(e){return Ot-e.display.nativeBarWidth}function Lt(e){return e.display.scroller.clientWidth-bt(e)-e.display.barWidth}function kt(e){return e.display.scroller.clientHeight-bt(e)-e.display.barHeight}function un(e,t,r){var n=e.options.lineWrapping,i=n&&Lt(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 zr(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(Ce(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Er(e,t){t=fi(t);var r=Ce(t),n=e.display.externalMeasured=new pe(e.doc,t,r);n.lineN=r;var i=n.built=Eo(e,n);return n.text=i.pre,J(e.display.lineMeasure,i.pre),n}function lr(e,t,r,n){return Jn(e,ln(e,t),r,n)}function wr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[gr(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function ln(e,t){var r=Ce(t),n=wr(e,r);n&&!n.text?n=null:n&&n.changes&&(Bt(e,n,r,hi(e)),e.curOp.forceUpdate=!0),n||(n=Er(e,t));var i=zr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Jn(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||(un(e,t.view,t.rect),t.hasHeights=!0),a=Xt(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 Qr={left:0,right:0,top:0,bottom:0};function Kt(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 ft(e,t){var r=Qr;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 Xt(e,t,r,n){var i=Kt(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&&yt(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&yt(t.line.text.charAt(i.coverStart+l));)++l;if(b&&M<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=ft(ee(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}b&&M<11&&(u=Fn(e.display.measure,u))}else{a>0&&(s=n="right");var S;e.options.lineWrapping&&(S=o.getClientRects()).length>1?u=S[n=="right"?S.length-1:0]:u=o.getBoundingClientRect()}if(b&&M<9&&!a&&(!u||!u.left&&!u.right)){var R=o.parentNode.getClientRects()[0];R?u={left:R.left,right:R.left+ei(e.display),top:R.top,bottom:R.bottom}:u=Qr}for(var w=u.top-t.rect.top,j=u.bottom-t.rect.top,q=(w+j)/2,de=t.view.measure.heights,Fe=0;Fe<de.length-1&&!(q<de[Fe]);Fe++);var Ue=Fe?de[Fe-1]:0,Le=de[Fe],Ge={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:Ue,bottom:Le};return!u.left&&!u.right&&(Ge.bogus=!0),e.options.singleCursorHeightPerLine||(Ge.rtop=w,Ge.rbottom=j),Ge}function Fn(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ze(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 Cn(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 dn(e){e.display.externalMeasure=null,L(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Cn(e.display.view[t])}function _t(e){dn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function $n(){return V&&we?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function nr(){return V&&we?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function qn(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=fn(e.widgets[r]));return t}function cr(e,t,r,n,i){if(!i){var o=qn(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Ri(t);if(n=="local"?a+=mn(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(n=="window"?0:nr());var s=l.left+(n=="window"?0:$n());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function er(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=$n(),i-=nr();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 sr(e,t,r,n,i){return n||(n=$(e.doc,t.line)),cr(e,n,lr(e,n,t.ch,i),r)}function Dn(e,t,r,n,i,o){n=n||$(e.doc,t.line),i||(i=ln(e,n));function a(j,q){var de=Jn(e,i,j,q?"right":"left",o);return q?de.left=de.right:de.right=de.left,cr(e,n,de,r)}var l=Tt(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(j,q,de){var Fe=l[q],Ue=Fe.level==1;return a(de?j-1:j,Ue!=de)}var S=Je(l,s,u),R=be,w=p(s,S,u=="before");return R!=null&&(w.other=p(s,R,u!="before")),w}function kn(e,t){var r=0;t=Ne(e.doc,t),e.options.lineWrapping||(r=ei(e.display)*t.ch);var n=$(e.doc,t.line),i=Ri(n)+mn(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Zr(e,t,r,n,i){var o=U(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Jr(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return Zr(n.first,0,null,-1,-1);var i=Te(n,r),o=n.first+n.size-1;if(i>o)return Zr(n.first+n.size-1,$(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=$(n,i);;){var l=Mr(e,a,i,t,r),s=Vi(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=$(n,i=u.line)}}function qr(e,t,r,n){n-=qn(t);var i=t.text.length,o=De(function(a){return Jn(e,r,a-1).bottom<=n},i,0);return i=De(function(a){return Jn(e,r,a).top>n},o,i),{begin:o,end:i}}function vr(e,t,r,n){r||(r=ln(e,t));var i=cr(e,t,Jn(e,r,n),"line").top;return qr(e,t,r,i)}function Bn(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Mr(e,t,r,n,i){i-=Ri(t);var o=ln(e,t),a=qn(t),l=0,s=t.text.length,u=!0,p=Tt(t,e.doc.direction);if(p){var S=(e.options.lineWrapping?Tr:di)(e,t,r,o,p,n,i);u=S.level!=1,l=u?S.from:S.to-1,s=u?S.to:S.from-1}var R=null,w=null,j=De(function(Et){var pt=Jn(e,o,Et);return pt.top+=a,pt.bottom+=a,Bn(pt,n,i,!1)?(pt.top<=i&&pt.left<=n&&(R=Et,w=pt),!0):!1},l,s),q,de,Fe=!1;if(w){var Ue=n-w.left<w.right-n,Le=Ue==u;j=R+(Le?0:1),de=Le?"after":"before",q=Ue?w.left:w.right}else{!u&&(j==s||j==l)&&j++,de=j==0?"after":j==t.text.length?"before":Jn(e,o,j-(u?1:0)).bottom+a<=i==u?"after":"before";var Ge=Dn(e,U(r,j,de),"line",t,o);q=Ge.left,Fe=i<Ge.top?-1:i>=Ge.bottom?1:0}return j=lt(t.text,j,1),Zr(r,j,de,Fe,n-q)}function di(e,t,r,n,i,o,a){var l=De(function(S){var R=i[S],w=R.level!=1;return Bn(Dn(e,U(r,w?R.to:R.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=Dn(e,U(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Bn(p,o,a,!0)&&p.top>a&&(s=i[l-1])}return s}function Tr(e,t,r,n,i,o,a){var l=qr(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var p=null,S=null,R=0;R<i.length;R++){var w=i[R];if(!(w.from>=u||w.to<=s)){var j=w.level!=1,q=Jn(e,n,j?Math.min(u,w.to)-1:Math.max(s,w.from)).right,de=q<o?o-q+1e9:q-o;(!p||S>de)&&(p=w,S=de)}}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 rr;function pr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(rr==null){rr=z("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rr.appendChild(document.createTextNode("x")),rr.appendChild(z("br"));rr.appendChild(document.createTextNode("x"))}J(e.measure,rr);var r=rr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),L(e.measure),r||1}function ei(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=z("span","xxxxxxxxxx"),r=z("pre",[t],"CodeMirror-line-like");J(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function hi(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:Wi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Wi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Bi(e){var t=pr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/ei(e.display)-3);return function(i){if(Ii(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 ti(e){var t=e.doc,r=Bi(e);t.iter(function(n){var i=r(n);i!=n.height&&tt(n,i)})}function vi(e,t,r,n){var i=e.display;if(!r&&Si(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(S){return null}var s=Jr(e,o,a),u;if(n&&s.xRel>0&&(u=$(e.doc,s.line).text).length==s.ch){var p=at(u,u.length,e.options.tabSize)-u.length;s=U(s.line,Math.max(0,Math.round((o-bn(e.display).left)/ei(e.display))-p))}return s}function gr(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 mr(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)tr&&qi(e.doc,t)<i.viewTo&&Dr(e);else if(r<=i.viewFrom)tr&&Ro(e.doc,r+n)>i.viewFrom?Dr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Dr(e);else if(t<=i.viewFrom){var o=Fi(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Dr(e)}else if(r>=i.viewTo){var a=Fi(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Dr(e)}else{var l=Fi(e,t,t,-1),s=Fi(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Oe(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Dr(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function ni(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[gr(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);je(a,r)==-1&&a.push(r)}}}function Dr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fi(e,t,r,n){var i=gr(e,t),o,a=e.display.view;if(!tr||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(;qi(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 Yi(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Oe(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Oe(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(gr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Oe(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,gr(e,r)))),n.viewTo=r}function to(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 Ei(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Zi(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)&&Vt(e,l.head,i),s||nt(e,l,o)}}return n}function Vt(e,t,r){var n=Dn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(z("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(z("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 ge(e,t){return e.top-t.top||e.left-t.left}function nt(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=bn(e.display),l=a.left,s=Math.max(n.sizerWidth,Lt(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function p(Le,Ge,Et,pt){Ge<0&&(Ge=0),Ge=Math.round(Ge),pt=Math.round(pt),o.appendChild(z("div",null,"CodeMirror-selected","position: absolute; left: "+Le+`px;
top: `+Ge+"px; width: "+(Et==null?s-Le:Et)+`px;
height: `+(pt-Ge)+"px"))}function S(Le,Ge,Et){var pt=$(i,Le),nn=pt.text.length,Vn,Ar;function ur(Or,yi){return sr(e,U(Le,Or),"div",pt,yi)}function Mi(Or,yi,Wr){var Pr=vr(e,pt,null,Or),Ir=yi=="ltr"==(Wr=="after")?"left":"right",fr=Wr=="after"?Pr.begin:Pr.end-(/\s/.test(pt.text.charAt(Pr.end-1))?2:1);return ur(fr,Ir)[Ir]}var mi=Tt(pt,i.direction);return ht(mi,Ge||0,Et==null?nn:Et,function(Or,yi,Wr,Pr){var Ir=Wr=="ltr",fr=ur(Or,Ir?"left":"right"),bi=ur(yi-1,Ir?"right":"left"),jo=Ge==null&&Or==0,So=Et==null&&yi==nn,Kr=Pr==0,Ji=!mi||Pr==mi.length-1;if(bi.top-fr.top<=3){var Nr=(u?jo:So)&&Kr,Ja=(u?So:jo)&&Ji,so=Nr?l:(Ir?fr:bi).left,Oo=Ja?s:(Ir?bi:fr).right;p(so,fr.top,Oo-so,fr.bottom)}else{var Io,ai,ko,qa;Ir?(Io=u&&jo&&Kr?l:fr.left,ai=u?s:Mi(Or,Wr,"before"),ko=u?l:Mi(yi,Wr,"after"),qa=u&&So&&Ji?s:bi.right):(Io=u?Mi(Or,Wr,"before"):l,ai=!u&&jo&&Kr?s:fr.right,ko=!u&&So&&Ji?l:bi.left,qa=u?Mi(yi,Wr,"after"):s),p(Io,fr.top,ai-Io,fr.bottom),fr.bottom<bi.top&&p(l,fr.bottom,null,bi.top),p(ko,bi.top,qa-ko,bi.bottom)}(!Vn||ge(fr,Vn)<0)&&(Vn=fr),ge(bi,Vn)<0&&(Vn=bi),(!Ar||ge(fr,Ar)<0)&&(Ar=fr),ge(bi,Ar)<0&&(Ar=bi)}),{start:Vn,end:Ar}}var R=t.from(),w=t.to();if(R.line==w.line)S(R.line,R.ch,w.ch);else{var j=$(i,R.line),q=$(i,w.line),de=fi(j)==fi(q),Fe=S(R.line,R.ch,de?j.text.length+1:null).end,Ue=S(w.line,de?0:null,w.ch).start;de&&(Fe.top<Ue.top-2?(p(Fe.right,Fe.top,null,Fe.bottom),p(l,Ue.top,Ue.left,Ue.bottom)):p(Fe.right,Fe.top,Ue.left-Fe.right,Fe.bottom)),Fe.bottom<Ue.top&&p(l,Fe.bottom,null,Ue.top)}r.appendChild(o)}function ot(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()||ri(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function xt(e){e.state.focused||(e.display.input.focus(),jn(e))}function Kn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ri(e))},100)}function jn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Qt(e,"focus",e,t),e.state.focused=!0,Qe(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),y&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ot(e))}function ri(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Qt(e,"blur",e,t),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function pi(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(b&&M<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)&&(tt(i.line,a),Ui(i.line),i.rest))for(var S=0;S<i.rest.length;S++)Ui(i.rest[S]);if(l>e.display.sizerWidth){var R=Math.ceil(l/ei(e.display));R>e.display.maxLineLength&&(e.display.maxLineLength=R,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ui(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 yr(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-mn(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=Te(t,n),a=Te(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=Te(t,Ri($(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=Te(t,Ri($(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Qi(e,t){if(!Jt(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&&!He){var o=z("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-mn(e.display))+`px;
height: `+(t.bottom-t.top+bt(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 Do(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?U(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?U(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Dn(e,t),s=!r||r==t?l:Dn(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=Po(e,i),p=e.doc.scrollTop,S=e.doc.scrollLeft;if(u.scrollTop!=null&&(Mo(e,u.scrollTop),Math.abs(e.doc.scrollTop-p)>1&&(a=!0)),u.scrollLeft!=null&&(no(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-S)>1&&(a=!0)),!a)break}return i}function Vo(e,t){var r=Po(e,t);r.scrollTop!=null&&Mo(e,r.scrollTop),r.scrollLeft!=null&&no(e,r.scrollLeft)}function Po(e,t){var r=e.display,n=pr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=kt(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+yn(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 S=e.options.fixedGutter?0:r.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-S,w=Lt(e)-r.gutters.offsetWidth,j=t.right-t.left>w;return j&&(t.right=t.left+w),t.left<10?a.scrollLeft=0:t.left<R?a.scrollLeft=Math.max(0,t.left+S-(j?0:10)):t.right>w+R-3&&(a.scrollLeft=t.right+(j?0:10)-w),a}function Ki(e,t){t!=null&&(Ao(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ii(e){Ao(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function wo(e,t,r){(t!=null||r!=null)&&Ao(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function co(e,t){Ao(e),e.curOp.scrollToPos=t}function Ao(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=kn(e,t.from),n=kn(e,t.to);fa(e,r,n,t.margin)}}function fa(e,t,r,n){var i=Po(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});wo(e,i.scrollLeft,i.scrollTop)}function Mo(e,t){Math.abs(e.doc.scrollTop-t)<2||(T||Pa(e,{top:t}),da(e,t,!0),T&&Pa(e),wi(e,100))}function da(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 no(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,tl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function fo(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+yn(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+bt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var ro=function(e,t,r){this.cm=r;var n=this.vert=z("div",[z("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=z("div",[z("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),re(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),re(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&M<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ro.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}},ro.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ro.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ro.prototype.zeroWidthHack=function(){var e=k&&!ce?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ke,this.disableVert=new Ke},ro.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)},ro.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ho=function(){};ho.prototype.update=function(){return{bottom:0,right:0}},ho.prototype.setScrollLeft=function(){},ho.prototype.setScrollTop=function(){},ho.prototype.clear=function(){};function io(e,t){t||(t=fo(e));var r=e.display.barWidth,n=e.display.barHeight;ha(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&pi(e),ha(e,fo(e)),r=e.display.barWidth,n=e.display.barHeight}function ha(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 Go={native:ro,null:ho};function va(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Go[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),re(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"?no(e,t):Mo(e,t)},e),e.display.scrollbars.addClass&&Qe(e.display.wrapper,e.display.scrollbars.addClass)}var Ta=0;function oo(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:++Ta},oe(e.curOp)}function ao(e){var t=e.curOp;t&&le(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;pa(r)})}function pa(e){for(var t=e.ops,r=0;r<t.length;r++)Xo(t[r]);for(var n=0;n<t.length;n++)hn(t[n]);for(var i=0;i<t.length;i++)Yt(t[i]);for(var o=0;o<t.length;o++)Hr(t[o]);for(var a=0;a<t.length;a++)oi(t[a])}function Xo(e){var t=e.cm,r=t.display;ga(t),e.updateMaxLine&&eo(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 Li(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function hn(e){e.updatedDisplay=e.mustUpdate&&Da(e.cm,e.update)}function Yt(e){var t=e.cm,r=t.display;e.updatedDisplay&&pi(t),e.barMeasure=fo(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=lr(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+bt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Lt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Hr(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&no(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==me();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&io(t,e.barMeasure),e.updatedDisplay&&Na(t,e.barMeasure),e.selectionChanged&&ot(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&xt(e.cm)}function oi(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&el(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&da(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&no(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Do(t,Ne(n,e.scrollToPos.from),Ne(n,e.scrollToPos.to),e.scrollToPos.margin);Qi(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||Qt(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Qt(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Qt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function wn(e,t){if(e.curOp)return t();oo(e);try{return t()}finally{ao(e)}}function Ln(e,t){return function(){if(e.curOp)return t.apply(e,arguments);oo(e);try{return t.apply(e,arguments)}finally{ao(e)}}}function _n(e){return function(){if(this.curOp)return e.apply(this,arguments);oo(this);try{return e.apply(this,arguments)}finally{ao(this)}}}function ir(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);oo(t);try{return e.apply(this,arguments)}finally{ao(t)}}}function wi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,gt(vo,e))}function vo(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Zn(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?F(t.mode,n.state):null,s=Sr(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 S=!a||a.length!=o.styles.length||u!=p&&(!u||!p||u.bgClass!=p.bgClass||u.textClass!=p.textClass),R=0;!S&&R<a.length;++R)S=a[R]!=o.styles[R];S&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Rr(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return wi(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&wn(e,function(){for(var o=0;o<i.length;o++)ni(e,i[o],"text")})}}var Li=function(e,t,r){var n=e.display;this.viewport=t,this.visible=yr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Lt(e),this.force=r,this.dims=hi(e),this.events=[]};Li.prototype.signal=function(e,t){We(e,t)&&this.events.push(arguments)},Li.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Qt.apply(null,this.events[e])};function ga(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=bt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=bt(e)+"px",t.scrollbarsClipped=!0)}function os(e){if(e.hasFocus())return null;var t=me();if(!t||!Me(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Me(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==me())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Me(document.body,e.anchorNode)&&Me(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 Da(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Dr(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&&to(e)==0)return!1;nl(e)&&(Dr(e),t.dims=hi(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)),tr&&(o=qi(e.doc,o),a=Ro(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Yi(e,o,a),r.viewOffset=Ri($(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=to(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),L(r.cursorDiv),L(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,wi(e,400)),r.updateLineNumbers=null,!0}function el(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Lt(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+yn(e.display)-kt(e),r.top)}),t.visible=yr(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=yr(e.display,e.doc,r));if(!Da(e,t))break;pi(e);var i=fo(e);Ei(e),io(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 Pa(e,t){var r=new Li(e,t);if(Da(e,r)){pi(e),el(e,r);var n=fo(e);Ei(e),io(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(j){var q=j.nextSibling;return y&&k&&e.display.currentWheelTarget==j?j.style.display="none":j.parentNode.removeChild(j),q}for(var s=n.view,u=n.viewFrom,p=0;p<s.length;p++){var S=s[p];if(!S.hidden)if(!S.node||S.node.parentNode!=o){var R=qt(e,S,u,r);o.insertBefore(R,a)}else{for(;a!=S.node;)a=l(a);var w=i&&t!=null&&t<=u&&S.lineNumber;S.changes&&(je(S.changes,"gutter")>-1&&(w=!1),Bt(e,S,u,r)),w&&(L(S.lineNumber),S.lineNumber.appendChild(document.createTextNode(Gt(e.options,u)))),a=S.node.nextSibling}u+=S.size}for(;a;)a=l(a)}function Aa(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+bt(e)+"px"}function tl(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=Wi(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 nl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Gt(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(z("div",[z("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",Aa(e.display),!0}return!1}function $a(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 rl(e){var t=e.gutters,r=e.gutterSpecs;L(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(z("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",Aa(e)}function Yo(e){rl(e.display),mr(e),tl(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=z("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=z("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=K("div",null,"CodeMirror-code"),i.selectionDiv=z("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=z("div",null,"CodeMirror-cursors"),i.measure=z("div",null,"CodeMirror-measure"),i.lineMeasure=z("div",null,"CodeMirror-measure"),i.lineSpace=K("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=K("div",[i.lineSpace],"CodeMirror-lines");i.mover=z("div",[o],null,"position: relative"),i.sizer=z("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=z("div",null,null,"position: absolute; height: "+Ot+"px; width: 1px;"),i.gutters=z("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=z("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=z("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),b&&M<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!y&&!(T&&fe)&&(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=$a(n.gutters,n.lineNumbers),rl(i),r.init(i)}var ma=0,Ti=null;b?Ti=-.53:T?Ti=15:V?Ti=-.7:Se&&(Ti=-1/3);function il(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=il(e);return t.x*=Ti,t.y*=Ti,t}function ol(e,t){var r=il(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&&k&&y){e:for(var u=t.target,p=o.view;u!=a;u=u.parentNode)for(var S=0;S<p.length;S++)if(p[S].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!T&&!h&&Ti!=null){i&&s&&Mo(e,Math.max(0,a.scrollTop+i*Ti)),no(e,Math.max(0,a.scrollLeft+n*Ti)),(!i||i&&s)&&Ht(t),o.wheelStartX=null;return}if(i&&Ti!=null){var R=i*Ti,w=e.doc.scrollTop,j=w+o.wrapper.clientHeight;R<0?w=Math.max(0,w+R-50):j=Math.min(e.doc.height,j+R+50),Pa(e,{top:w,bottom:j})}ma<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 q=a.scrollLeft-o.wheelStartX,de=a.scrollTop-o.wheelStartY,Fe=de&&o.wheelDY&&de/o.wheelDY||q&&o.wheelDX&&q/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Fe&&(Ti=(Ti*ma+Fe)/(ma+1),++ma)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Di=function(e,t){this.ranges=e,this.primIndex=t};Di.prototype.primary=function(){return this.ranges[this.primIndex]},Di.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(!rn(r.anchor,n.anchor)||!rn(r.head,n.head))return!1}return!0},Di.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Pn(xn(this.ranges[t].anchor),xn(this.ranges[t].head));return new Di(e,this.primIndex)},Di.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Di.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Be(t,n.from())>=0&&Be(e,n.to())<=0)return r}return-1};var Pn=function(e,t){this.anchor=e,this.head=t};Pn.prototype.from=function(){return Ct(this.anchor,this.head)},Pn.prototype.to=function(){return At(this.anchor,this.head)},Pn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ji(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(R,w){return Be(R.from(),w.from())}),r=je(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=Be(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=Ct(l.from(),a.from()),p=At(l.to(),a.to()),S=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new Pn(S?p:u,S?u:p))}}return new Di(t,r)}function po(e,t){return new Di([new Pn(e,t||e)],0)}function go(e){return e.text?U(e.from.line+e.text.length-1,he(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function al(e,t){if(Be(e,t.from)<0)return e;if(Be(e,t.to)<=0)return go(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+=go(t).ch-t.to.ch),U(r,n)}function Ba(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new Pn(al(i.anchor,t),al(i.head,t)))}return ji(e.cm,r,e.sel.primIndex)}function ll(e,t,r){return e.line==t.line?U(r.line,e.ch-t.ch+r.ch):U(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=U(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=ll(l.from,i,o),u=ll(go(l),i,o);if(i=l.to,o=u,r=="around"){var p=e.sel.ranges[a],S=Be(p.head,p.anchor)<0;n[a]=new Pn(S?u:s,S?s:u)}else n[a]=new Pn(s,s)}return new Di(n,e.sel.primIndex)}function za(e){e.doc.mode=vt(e.options,e.doc.modeOption),Qo(e)}function Qo(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,wi(e,100),e.state.modeGen++,e.curOp&&mr(e)}function sl(e,t){return t.from.ch==0&&t.to.ch==0&&he(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ha(e,t,r,n){function i(Ue){return r?r[Ue]:null}function o(Ue,Le,Ge){Fo(Ue,Le,Ge,n),se(Ue,"change",Ue,t)}function a(Ue,Le){for(var Ge=[],Et=Ue;Et<Le;++Et)Ge.push(new $i(u[Et],i(Et),n));return Ge}var l=t.from,s=t.to,u=t.text,p=$(e,l.line),S=$(e,s.line),R=he(u),w=i(u.length-1),j=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(sl(e,t)){var q=a(0,u.length-1);o(S,S.text,w),j&&e.remove(l.line,j),q.length&&e.insert(l.line,q)}else if(p==S)if(u.length==1)o(p,p.text.slice(0,l.ch)+R+p.text.slice(s.ch),w);else{var de=a(1,u.length-1);de.push(new $i(R+p.text.slice(s.ch),w,n)),o(p,p.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,de)}else if(u.length==1)o(p,p.text.slice(0,l.ch)+u[0]+S.text.slice(s.ch),i(0)),e.remove(l.line+1,j);else{o(p,p.text.slice(0,l.ch)+u[0],i(0)),o(S,R+S.text.slice(s.ch),w);var Fe=a(1,u.length-1);j>1&&e.remove(l.line+1,j-1),e.insert(l.line+1,Fe)}se(e,"change",e,t)}function mo(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 ul(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ti(e),za(e),cl(e),e.options.lineWrapping||eo(e),e.options.mode=t.modeOption,mr(e)}function cl(e){(e.doc.direction=="rtl"?Qe:C)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){wn(e,function(){cl(e),mr(e)})}function ya(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 Wa(e,t){var r={from:xn(t.from),to:go(t),text:$e(e,t.from,t.to)};return hl(e,r,t.from.line,t.to.line+1),mo(e,function(n){return hl(n,r,t.from.line,t.to.line+1)},!0),r}function fl(e){for(;e.length;){var t=he(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return fl(e.done),he(e.done);if(e.done.length&&!he(e.done).ranges)return he(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),he(e.done)}function dl(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=he(a.changes),Be(t.from,t.to)==0&&Be(t.from,l.to)==0?l.to=go(t):a.changes.push(Wa(e,t));else{var s=he(i.done);for((!s||!s.ranges)&&ba(e.sel,i.done),a={changes:[Wa(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||Qt(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,he(i.done),t))?i.done[i.done.length-1]=t:ba(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&fl(i.undone)}function ba(e,t){var r=he(t);r&&r.ranges&&r.equals(e)||t.push(e)}function hl(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 vl(e,t){var r=gs(e,t),n=ci(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 No(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?Di.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 S in u)(p=S.match(/^spans_(\d+)$/))&&je(t,Number(p[1]))>-1&&(he(l)[S]=u[S],delete u[S])}}return n}function Za(e,t,r,n){if(n){var i=e.anchor;if(r){var o=Be(t,i)<0;o!=Be(r,i)<0?(i=t,t=r):o!=Be(t,r)<0&&(t=r)}return new Pn(i,t)}else return new Pn(r||t,t)}function Sa(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ur(e,new Di([Za(e.sel.primary(),t,r,i)],0),n)}function pl(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]=Za(e.sel.ranges[o],t[o],null,i);var a=ji(e.cm,n,e.sel.primIndex);Ur(e,a,r)}function Ua(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Ur(e,ji(e.cm,i,e.sel.primIndex),n)}function gl(e,t,r,n){Ur(e,po(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 Pn(Ne(e,i[o].anchor),Ne(e,i[o].head))},origin:r&&r.origin};return Qt(e,"beforeSelectionChange",e,n),e.cm&&Qt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?ji(e.cm,n.ranges,n.ranges.length-1):t}function ml(e,t,r){var n=e.history.done,i=he(n);i&&i.ranges?(n[n.length-1]=t,Ca(e,t,r)):Ur(e,t,r)}function Ur(e,t,r){Ca(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Ca(e,t,r){(We(e,"beforeSelectionChange")||e.cm&&We(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(Be(t.primary().head,e.sel.primary().head)<0?-1:1);yl(e,Sl(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&ii(e.cm)}function yl(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Dt(e.cm)),se(e,"cursorActivity",e))}function bl(e){yl(e,Sl(e,e.sel,null,!1))}function Sl(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=xa(e,a.anchor,l&&l.anchor,r,n),u=xa(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 Pn(s,u))}return i?ji(e.cm,i,t.primIndex):t}function $o(e,t,r,n,i){var o=$(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&&(Qt(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var S=s.find(n<0?1:-1),R=void 0;if((n<0?p:u)&&(S=Cl(e,S,-n,S&&S.line==t.line?o:null)),S&&S.line==t.line&&(R=Be(S,r))&&(n<0?R<0:R>0))return $o(e,S,t,n,i)}var w=s.find(n<0?-1:1);return(n<0?u:p)&&(w=Cl(e,w,n,w.line==t.line?o:null)),w?$o(e,w,t,n,i):null}}return t}function xa(e,t,r,n,i){var o=n||1,a=$o(e,t,r,o,i)||!i&&$o(e,t,r,o,!0)||$o(e,t,r,-o,i)||!i&&$o(e,t,r,-o,!0);return a||(e.cantEdit=!0,U(e.first,0))}function Cl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?Ne(e,U(t.line-1)):null:r>0&&t.ch==(n||$(e,t.line)).text.length?t.line<e.first+e.size-1?U(t.line+1,0):null:new U(t.line,t.ch+r)}function xl(e){e.setSelection(U(e.firstLine(),0),U(e.lastLine()),Ve)}function El(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)}),Qt(e,"beforeChange",e,n),e.cm&&Qt(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 Bo(e,t,r){if(e.cm){if(!e.cm.curOp)return Ln(e.cm,Bo)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"))&&(t=El(e,t,!0),!t))){var n=Yn&&!r&&Xr(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)wl(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else wl(e,t)}}function wl(e,t){if(!(t.text.length==1&&t.text[0]==""&&Be(t.from,t.to)==0)){var r=Ba(e,t);dl(e,t,r,e.cm?e.cm.curOp.id:NaN),Jo(e,t,r,ci(e,t));var n=[];mo(e,function(i,o){!o&&je(n,i.history)==-1&&(Rl(i.history,t),n.push(i.history)),Jo(i,t,null,ci(i,t))})}}function Ea(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(ba(o,s),r&&!o.equals(e.sel)){Ur(e,o,{clearRedo:!1});return}a=o}else if(n){l.push(o);return}else break;var p=[];ba(a,s),s.push({changes:p,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var S=We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"),R=function(q){var de=o.changes[q];if(de.origin=t,S&&!El(e,de,!1))return l.length=0,{};p.push(Wa(e,de));var Fe=q?Ba(e,de):he(l);Jo(e,de,Fe,vl(e,de)),!q&&e.cm&&e.cm.scrollIntoView({from:de.from,to:go(de)});var Ue=[];mo(e,function(Le,Ge){!Ge&&je(Ue,Le.history)==-1&&(Rl(Le.history,de),Ue.push(Le.history)),Jo(Le,de,null,vl(Le,de))})},w=o.changes.length-1;w>=0;--w){var j=R(w);if(j)return j.v}}}}function Ml(e,t){if(t!=0&&(e.first+=t,e.sel=new Di(ze(e.sel.ranges,function(i){return new Pn(U(i.anchor.line+t,i.anchor.ch),U(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){mr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)ni(e.cm,n,"gutter")}}function Jo(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ln(e.cm,Jo)(e,t,r,n);if(t.to.line<e.first){Ml(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);Ml(e,i),t={from:U(e.first,0),to:U(t.to.line+i,t.to.ch),text:[he(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:U(o,$(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=$e(e,t.from,t.to),r||(r=Ba(e,t)),e.cm?ys(e.cm,t,n):Ha(e,t,n),Ca(e,r,Ve),e.cantEdit&&xa(e,U(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=Ce(fi($(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&&Dt(e),Ha(n,t,r,Bi(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(w){var j=Gi(w);j>i.maxLineLength&&(i.maxLine=w,i.maxLineLength=j,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Xn(n,o.line),wi(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?mr(e):o.line==a.line&&t.text.length==1&&!sl(e.doc,t)?ni(e,o.line,"text"):mr(e,o.line,a.line+1,u);var p=We(e,"changes"),S=We(e,"change");if(S||p){var R={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};S&&se(e,"change",e,R),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function zo(e,t,r,n,i){var o;n||(n=r),Be(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Bo(e,{from:r,to:n,text:t,origin:i})}function Ol(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Il(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++)Ol(o.ranges[l].anchor,t,r,n),Ol(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=U(u.from.line+n,u.from.ch),u.to=U(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 Rl(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Il(e.done,r,n,i),Il(e.undone,r,n,i)}function qo(e,t,r,n){var i=t,o=t;return typeof t=="number"?o=$(e,Mn(e,t)):i=Ce(t),i==null?null:(n(o,i)&&e.cm&&ni(e.cm,i,r),o)}function ea(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}ea.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,Lo(i),se(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 ta(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}ta.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 ea))){var l=[];this.collapse(l),this.children=[new ea(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 ea(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 ta(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=je(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ta(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 na=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};na.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=Ce(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=fn(this);tt(r,Math.max(0,r.height-o)),e&&(wn(e,function(){Fl(e,r,-o),ni(e,n,"widget")}),se(e,"lineWidgetCleared",e,this,n))}},na.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=fn(this)-t;i&&(Ii(this.doc,n)||tt(n,n.height+i),r&&wn(r,function(){r.curOp.forceUpdate=!0,Fl(r,n,i),se(r,"lineWidgetChanged",r,e,Ce(n))}))},$t(na);function Fl(e,t,r){Ri(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ki(e,r)}function bs(e,t,r,n){var i=new na(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),qo(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&&!Ii(e,a)){var s=Ri(a)<e.scrollTop;tt(a,a.height+fn(i)),s&&Ki(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&se(o,"lineWidgetAdded",o,i,typeof t=="number"?t:Ce(t)),i}var Ll=0,yo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ll};yo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&oo(e),We(this,"clear")){var r=this.find();r&&se(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=Qn(a.markedSpans,this);e&&!this.collapsed?ni(e,Ce(a),"text"):e&&(l.to!=null&&(i=Ce(a)),l.from!=null&&(n=Ce(a))),a.markedSpans=Lr(a.markedSpans,l),l.from==null&&this.collapsed&&!Ii(this.doc,a)&&e&&tt(a,pr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=fi(this.lines[s]),p=Gi(u);p>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=p,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&mr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&bl(e.doc)),e&&se(e,"markerCleared",e,this,n,i),t&&ao(e),this.parent&&this.parent.clear()}},yo.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=Qn(o.markedSpans,this);if(a.from!=null&&(r=U(t?o:Ce(o),a.from),e==-1))return r;if(a.to!=null&&(n=U(t?o:Ce(o),a.to),e==1))return n}return r&&{from:r,to:n}},yo.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||wn(n,function(){var i=t.line,o=Ce(t.line),a=wr(n,o);if(a&&(Cn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ii(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=fn(r)-l;s&&tt(i,i.height+s)}se(n,"markerChanged",n,e)})},yo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||je(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},yo.prototype.detachLine=function(e){if(this.lines.splice(je(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},$t(yo);function Ho(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ln(e.cm,Ho)(e,t,r,n,i);var o=new yo(e,i),a=Be(t,r);if(n&&mt(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=K("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ni(e,t.line,t,r,o)||t.line!=r.line&&Ni(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");En()}o.addToHistory&&dl(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(S){s&&o.collapsed&&!s.options.lineWrapping&&fi(S)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&tt(S,0),ui(S,new Un(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(S){Ii(e,S)&&tt(S,0)}),o.clearOnEnter&&re(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(hr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Ll,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)mr(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++)ni(s,p,"text");o.atomic&&bl(s.doc),se(s,"markerAdded",s,o)}return o}var ra=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};ra.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();se(this,"clear")}},ra.prototype.find=function(e,t){return this.primary.find(e,t)},$t(ra);function Ss(e,t,r,n,i){n=mt(n),n.shared=!1;var o=[Ho(e,t,r,n,i)],a=o[0],l=n.widgetNode;return mo(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Ho(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=he(o)}),new ra(o,a)}function Tl(e){return e.findMarks(U(e.first,0),e.clipPos(U(e.lastLine())),function(t){return t.parent})}function Cs(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(Be(o,a)){var l=Ho(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function xs(e){for(var t=function(n){var i=e[n],o=[i.primary.doc];mo(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];je(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var Es=0,gi=function(e,t,r,n,i){if(!(this instanceof gi))return new gi(e,t,r,n,i);r==null&&(r=0),ta.call(this,[new ea([new $i("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=U(r,0);this.sel=po(o),this.history=new ya(null),this.id=++Es,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ha(this,{from:o,to:o,text:e}),Ur(this,po(o),Ve)};gi.prototype=Mt(ta.prototype,{constructor:gi,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=St(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:ir(function(e){var t=U(this.first,0),r=this.first+this.size-1;Bo(this,{from:t,to:U(r,$(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&wo(this.cm,0,0),Ur(this,po(t),Ve)}),replaceRange:function(e,t,r,n){t=Ne(this,t),r=r?Ne(this,r):t,zo(this,e,t,r,n)},getRange:function(e,t,r){var n=$e(this,Ne(this,e),Ne(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Pe(this,e))return $(this,e)},getLineNumber:function(e){return Ce(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=$(this,e)),fi(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:ir(function(e,t,r){gl(this,Ne(this,typeof e=="number"?U(e,t||0):e),null,r)}),setSelection:ir(function(e,t,r){gl(this,Ne(this,e),Ne(this,t||e),r)}),extendSelection:ir(function(e,t,r){Sa(this,Ne(this,e),t&&Ne(this,t),r)}),extendSelections:ir(function(e,t){pl(this,on(this,e),t)}),extendSelectionsBy:ir(function(e,t){var r=ze(this.sel.ranges,e);pl(this,on(this,r),t)}),setSelections:ir(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new Pn(Ne(this,e[i].anchor),Ne(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Ur(this,ji(this.cm,n,t),r)}}),addSelection:ir(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Pn(Ne(this,e),Ne(this,t||e))),Ur(this,ji(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=$e(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=$e(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:ir(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--)Bo(this,n[s]);l?ml(this,l):this.cm&&ii(this.cm)}),undo:ir(function(){Ea(this,"undo")}),redo:ir(function(){Ea(this,"redo")}),undoSelection:ir(function(){Ea(this,"undo",!0)}),redoSelection:ir(function(){Ea(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 ya(this.history.maxGeneration),mo(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:No(this.history.done),undone:No(this.history.undone)}},setHistory:function(e){var t=this.history=new ya(this.history.maxGeneration);t.done=No(e.done.slice(0),null,!0),t.undone=No(e.undone.slice(0),null,!0)},setGutterMarker:ir(function(e,t,r){return qo(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&H(i)&&(n.gutterMarkers=null),!0})}),clearGutter:ir(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&qo(t,r,"gutter",function(){return r.gutterMarkers[e]=null,H(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Pe(this,e)||(t=e,e=$(this,e),!e))return null}else if(t=Ce(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:ir(function(e,t,r){return qo(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:ir(function(e,t,r){return qo(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:ir(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ho(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),Ho(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Ne(this,e);var t=[],r=$(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,U(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 gi(St(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 gi(St(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}],Cs(n,Tl(this)),n},unlinkDoc:function(e){if(e instanceof or&&(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),xs(Tl(this));break}}if(e.history==this.history){var n=[e.id];mo(e,function(i){return n.push(i.id)},!0),e.history=new ya(null),e.history.done=No(this.history.done,n),e.history.undone=No(this.history.undone,n)}},iterLinkedDocs:function(e){mo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):I(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ir(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))})}),gi.prototype.eachLine=gi.prototype.iter;var Dl=0;function ws(e){var t=this;if(Pl(t),!(Jt(t,e)||Rn(t.display,e))){Ht(e),b&&(Dl=+new Date);var r=vi(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&&Ln(t,function(){r=Ne(t.doc,r);var w={from:r,to:r,text:t.doc.splitLines(o.filter(function(j){return j!=null}).join(t.doc.lineSeparator())),origin:"paste"};Bo(t.doc,w),ml(t.doc,po(Ne(t.doc,r),Ne(t.doc,go(w))))})()},s=function(w,j){if(t.options.allowDropFileTypes&&je(t.options.allowDropFileTypes,w.type)==-1){l();return}var q=new FileReader;q.onerror=function(){return l()},q.onload=function(){var de=q.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(de)){l();return}o[j]=de,l()},q.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 S;if(t.state.draggingText&&!t.state.draggingText.copy&&(S=t.listSelections()),Ca(t.doc,po(r,r)),S)for(var R=0;R<S.length;++R)zo(t.doc,"",S[R].anchor,S[R].head,"drag");t.replaceSelection(p,"around","paste"),t.display.input.focus()}}catch(w){}}}}function Ms(e,t){if(b&&(!e.state.draggingText||+new Date-Dl<100)){kr(t);return}if(!(Jt(e,t)||Rn(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Se)){var r=z("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}function Os(e,t){var r=vi(e,t);if(r){var n=document.createDocumentFragment();Vt(e,r,n),e.display.dragCursor||(e.display.dragCursor=z("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),J(e.display.dragCursor,n)}}function Pl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Al(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 Nl=!1;function Is(){Nl||(Rs(),Nl=!0)}function Rs(){var e;re(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Al(Fs)},100))}),re(window,"blur",function(){return Al(ri)})}function Fs(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var bo={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"},ia=0;ia<10;ia++)bo[ia+48]=bo[ia+96]=String(ia);for(var wa=65;wa<=90;wa++)bo[wa]=String.fromCharCode(wa);for(var oa=1;oa<=12;oa++)bo[oa+111]=bo[oa+63235]="F"+oa;var lo={};lo.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"},lo.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"},lo.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"},lo.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"]},lo.default=k?lo.macDefault:lo.pcDefault;function Ls(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 Ts(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=ze(r.split(" "),Ls),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 Wo(e,t,r,n){t=Ma(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 Wo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Wo(e,t.fallthrough[o],r,n);if(a)return a}}}function $l(e){var t=typeof e=="string"?e:bo[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),(ne?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(ne?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function zl(e,t){if(h&&e.keyCode==34&&e.char)return!1;var r=bo[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),Bl(r,e,t))}function Ma(e){return typeof e=="string"?lo[e]:e}function Zo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&Be(o.from,he(n).to)<=0;){var a=n.pop();if(Be(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}wn(e,function(){for(var l=n.length-1;l>=0;l--)zo(e.doc,"",n[l].from,n[l].to,"+delete");ii(e)})}function Ka(e,t,r){var n=lt(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ja(e,t,r){var n=Ka(e,t.ch,r);return n==null?null:new U(t.line,n,r<0?"after":"before")}function ka(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Tt(r,t.doc.direction);if(o){var a=i<0?he(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var p=ln(t,r);u=i<0?r.text.length-1:0;var S=Jn(t,p,u).top;u=De(function(R){return Jn(t,p,R).top==S},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=Ka(r,u,1))}else u=i<0?a.to:a.from;return new U(n,u,s)}}return new U(n,i<0?r.text.length:0,i<0?"before":"after")}function Ds(e,t,r,n){var i=Tt(t,e.doc.direction);if(!i)return ja(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=Je(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 ja(t,r,n);var l=function(Fe,Ue){return Ka(t,Fe instanceof U?Fe.ch:Fe,Ue)},s,u=function(Fe){return e.options.lineWrapping?(s=s||ln(e,t),vr(e,t,s,Fe)):{begin:0,end:t.text.length}},p=u(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var S=a.level==1==n<0,R=l(r,S?1:-1);if(R!=null&&(S?R<=a.to&&R<=p.end:R>=a.from&&R>=p.begin)){var w=S?"before":"after";return new U(r.line,R,w)}}var j=function(Fe,Ue,Le){for(var Ge=function(Vn,Ar){return Ar?new U(r.line,l(Vn,1),"before"):new U(r.line,Vn,"after")};Fe>=0&&Fe<i.length;Fe+=Ue){var Et=i[Fe],pt=Ue>0==(Et.level!=1),nn=pt?Le.begin:l(Le.end,-1);if(Et.from<=nn&&nn<Et.to||(nn=pt?Et.from:l(Et.to,-1),Le.begin<=nn&&nn<Le.end))return Ge(nn,pt)}},q=j(o+n,n,p);if(q)return q;var de=n>0?p.end:l(p.begin,-1);return de!=null&&!(n>0&&de==t.text.length)&&(q=j(n>0?0:i.length-1,n,u(de)),q)?q:null}var aa={selectAll:xl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ve)},killLine:function(e){return Zo(e,function(t){if(t.empty()){var r=$(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:U(t.head.line+1,0)}:{from:t.head,to:U(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Zo(e,function(t){return{from:U(t.from().line,0),to:Ne(e.doc,U(t.to().line+1,0))}})},delLineLeft:function(e){return Zo(e,function(t){return{from:U(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Zo(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 Zo(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(U(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(U(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Hl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Wl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ps(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")},Xe)},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")},Xe)},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/)?Wl(e,t.head):n},Xe)},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=at(e.getLine(o.line),o.ch,n);t.push(xe(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=$(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new U(i.line,i.ch-1)),i.ch>0)i=new U(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),U(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=$(e.doc,i.line-1).text;a&&(i=new U(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),U(i.line-1,a.length-1),i,"+transpose"))}}r.push(new Pn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return wn(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);ii(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Hl(e,t){var r=$(e.doc,t),n=fi(r);return n!=r&&(t=Ce(n)),ka(!0,e,n,t,1)}function Ps(e,t){var r=$(e.doc,t),n=_o(r);return n!=r&&(t=Ce(n)),ka(!0,e,r,t,-1)}function Wl(e,t){var r=Hl(e,t.line),n=$(e.doc,r.line),i=Tt(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 U(r.line,a?0:o,r.sticky)}return r}function Oa(e,t,r){if(typeof t=="string"&&(t=aa[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)!=Nt}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=Wo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Wo(t,e.options.extraKeys,r,e)||Wo(t,e.options.keyMap,r,e)}var Ns=new Ke;function la(e,t,r,n){var i=e.state.keySeq;if(i){if($l(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())}),Zl(e,i+" "+t,r,n))return!0}return Zl(e,t,r,n)}function Zl(e,t,r,n){var i=As(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&se(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(Ht(r),ot(e)),!!i}function Ul(e,t){var r=zl(t,!0);return r?t.shiftKey&&!e.state.keySeq?la(e,"Shift-"+r,t,function(n){return Oa(e,n,!0)})||la(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Oa(e,n)}):la(e,r,t,function(n){return Oa(e,n)}):!1}function $s(e,t,r){return la(e,"'"+r+"'",t,function(n){return Oa(e,n,!0)})}var _a=null;function Kl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=me(),!Jt(t,e))){b&&M<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=Ul(t,e);h&&(_a=n?r:null,!n&&r==88&&!_&&(k?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),T&&!k&&!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;Qe(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(C(t,"CodeMirror-crosshair"),It(document,"keyup",r),It(document,"mouseover",r))}re(document,"keyup",r),re(document,"mouseover",r)}function jl(e){e.keyCode==16&&(this.doc.sel.shift=!1),Jt(this,e)}function kl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Rn(t.display,e)||Jt(t,e)||e.ctrlKey&&!e.altKey||k&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(h&&r==_a){_a=null,Ht(e);return}if(!(h&&(!e.which||e.which<10)&&Ul(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&&Be(t,this.pos)==0&&r==this.button};var sa,ua;function Hs(e,t){var r=+new Date;return ua&&ua.compare(r,e,t)?(sa=ua=null,"triple"):sa&&sa.compare(r,e,t)?(ua=new Va(r,e,t),sa=null,"double"):(sa=new Va(r,e,t),ua=null,"single")}function _l(e){var t=this,r=t.display;if(!(Jt(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,Rn(r,e)){y||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!Ga(t,e)){var n=vi(t,e),i=li(e),o=n?Hs(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Ws(t,i,n,o,e))&&(i==1?n?Us(t,n,o,e):Si(e)==r.scroller&&Ht(e):i==2?(n&&Sa(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(g?t.display.input.onContextMenu(e):Kn(t)))}}}function Ws(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,la(e,Bl(o,i),i,function(a){if(typeof a=="string"&&(a=aa[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,r)!=Nt}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=qe?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=k?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(k?r.altKey:r.ctrlKey)),i}function Us(e,t,r,n){b?setTimeout(gt(xt,e),0):e.curOp.focus=me();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&Oi&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(Be((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(Be(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=Ln(e,function(u){y&&(i.scroller.draggable=!1),e.state.draggingText=!1,It(i.wrapper.ownerDocument,"mouseup",a),It(i.wrapper.ownerDocument,"mousemove",l),It(i.scroller,"dragstart",s),It(i.scroller,"drop",a),o||(Ht(u),n.addNew||Sa(e.doc,r,null,null,n.extend),y&&!Se||b&&M==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};y&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),re(i.wrapper.ownerDocument,"mouseup",a),re(i.wrapper.ownerDocument,"mousemove",l),re(i.scroller,"dragstart",s),re(i.scroller,"drop",a),Kn(e),setTimeout(function(){return i.input.focus()},20)}function Vl(e,t,r){if(r=="char")return new Pn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Pn(U(t.line,0),Ne(e.doc,U(t.line+1,0)));var n=r(e,t);return new Pn(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;Ht(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 Pn(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new Pn(r,r)),r=vi(e,t,!0,!0),l=-1;else{var p=Vl(e,r,n.unit);n.extend?a=Za(a,p.anchor,p.head,n.extend):a=p}n.addNew?l==-1?(l=u.length,Ur(o,ji(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(Ur(o,ji(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):Ua(o,l,a,rt):(l=0,Ur(o,new Di([a],0),rt),s=o.sel);var S=r;function R(Le){if(Be(S,Le)!=0)if(S=Le,n.unit=="rectangle"){for(var Ge=[],Et=e.options.tabSize,pt=at($(o,r.line).text,r.ch,Et),nn=at($(o,Le.line).text,Le.ch,Et),Vn=Math.min(pt,nn),Ar=Math.max(pt,nn),ur=Math.min(r.line,Le.line),Mi=Math.min(e.lastLine(),Math.max(r.line,Le.line));ur<=Mi;ur++){var mi=$(o,ur).text,Or=vn(mi,Vn,Et);Vn==Ar?Ge.push(new Pn(U(ur,Or),U(ur,Or))):mi.length>Or&&Ge.push(new Pn(U(ur,Or),U(ur,vn(mi,Ar,Et))))}Ge.length||Ge.push(new Pn(r,r)),Ur(o,ji(e,s.ranges.slice(0,l).concat(Ge),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Le)}else{var yi=a,Wr=Vl(e,Le,n.unit),Pr=yi.anchor,Ir;Be(Wr.anchor,Pr)>0?(Ir=Wr.head,Pr=Ct(yi.from(),Wr.anchor)):(Ir=Wr.anchor,Pr=At(yi.to(),Wr.head));var fr=s.ranges.slice(0);fr[l]=ks(e,new Pn(Ne(o,Pr),Ir)),Ur(o,ji(e,fr,l),rt)}}var w=i.wrapper.getBoundingClientRect(),j=0;function q(Le){var Ge=++j,Et=vi(e,Le,!0,n.unit=="rectangle");if(Et)if(Be(Et,S)!=0){e.curOp.focus=me(),R(Et);var pt=yr(i,o);(Et.line>=pt.to||Et.line<pt.from)&&setTimeout(Ln(e,function(){j==Ge&&q(Le)}),150)}else{var nn=Le.clientY<w.top?-20:Le.clientY>w.bottom?20:0;nn&&setTimeout(Ln(e,function(){j==Ge&&(i.scroller.scrollTop+=nn,q(Le))}),50)}}function de(Le){e.state.selectingText=!1,j=1/0,Le&&(Ht(Le),i.input.focus()),It(i.wrapper.ownerDocument,"mousemove",Fe),It(i.wrapper.ownerDocument,"mouseup",Ue),o.history.lastSelOrigin=null}var Fe=Ln(e,function(Le){Le.buttons===0||!li(Le)?de(Le):q(Le)}),Ue=Ln(e,de);e.state.selectingText=Ue,re(i.wrapper.ownerDocument,"mousemove",Fe),re(i.wrapper.ownerDocument,"mouseup",Ue)}function ks(e,t){var r=t.anchor,n=t.head,i=$(e.doc,r.line);if(Be(r,n)==0&&r.sticky==n.sticky)return t;var o=Tt(i);if(!o)return t;var a=Je(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=Je(o,n.ch,n.sticky),S=p-a||(n.ch-r.ch)*(l.level==1?-1:1);p==s-1||p==s?u=S<0:u=S>0}var R=o[s+(u?-1:0)],w=u==(R.level==1),j=w?R.from:R.to,q=w?"after":"before";return r.ch==j&&r.sticky==q?t:new Pn(new U(r.line,j,q),n)}function Gl(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(R){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ht(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!We(e,r))return jr(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=Te(e.doc,o),S=e.display.gutterSpecs[s];return Qt(e,r,e,p,S.className,t),jr(t)}}}function Ga(e,t){return Gl(e,t,"gutterClick",!0)}function Xl(e,t){Rn(e.display,t)||_s(e,t)||Jt(e,t,"contextmenu")||g||e.display.input.onContextMenu(t)}function _s(e,t){return We(e,"gutterContextMenu")?Gl(e,t,"gutterContextMenu",!1):!1}function Yl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),_t(e)}var Uo={toString:function(){return"CodeMirror.Init"}},Ql={},Ia={};function Vs(e){var t=e.optionHandlers;function r(n,i,o,a){e.defaults[n]=i,o&&(t[n]=a?function(l,s,u){u!=Uo&&o(l,s,u)}:o)}e.defineOption=r,e.Init=Uo,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,za(n)},!0),r("indentUnit",2,za,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){Qo(n),_t(n),mr(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(U(a,p))}a++});for(var l=o.length-1;l>=0;l--)zo(n.doc,i,o[l],U(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!=Uo&&n.refresh()}),r("specialCharPlaceholder",d,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",fe?"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",!wt),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Yl(n),Yo(n)},!0),r("keyMap","default",function(n,i,o){var a=Ma(i),l=o!=Uo&&Ma(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=$a(i,n.options.lineNumbers),Yo(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?Wi(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return io(n)},!0),r("scrollbarStyle","native",function(n){va(n),io(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=$a(n.options.gutters,i),Yo(n)},!0),r("firstLineNumber",1,Yo,!0),r("lineNumberFormatter",function(n){return n},Yo,!0),r("showCursorWhenSelecting",!1,Ei,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(ri(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,Gs),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Ei,!0),r("singleCursorHeightPerLine",!0,Ei,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Qo,!0),r("addModeClass",!1,Qo,!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,Qo,!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 Gs(e,t,r){var n=r&&r!=Uo;if(!t!=!n){var i=e.display.dragFunctions,o=t?re:It;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?(Qe(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),eo(e)),ti(e),mr(e),_t(e),setTimeout(function(){return io(e)},100)}function or(e,t){var r=this;if(!(this instanceof or))return new or(e,t);this.options=t=t?mt(t):{},mt(Ql,t,!1);var n=t.value;typeof n=="string"?n=new gi(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new or.inputStyles[t.inputStyle](this),o=this.display=new ss(e,n,i,t);o.wrapper.CodeMirror=this,Yl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),va(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 Ke,keySeq:null,specialChars:null},t.autofocus&&!fe&&o.input.focus(),b&&M<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Is(),oo(this),this.curOp.forceUpdate=!0,ul(this,n),t.autofocus&&!fe||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&jn(r)},20):ri(this);for(var a in Ia)Ia.hasOwnProperty(a)&&Ia[a](this,t[a],Uo);nl(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Xa.length;++l)Xa[l](this);ao(this),y&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}or.defaults=Ql,or.optionHandlers=Ia;function Ys(e){var t=e.display;re(t.scroller,"mousedown",Ln(e,_l)),b&&M<11?re(t.scroller,"dblclick",Ln(e,function(s){if(!Jt(e,s)){var u=vi(e,s);if(!(!u||Ga(e,s)||Rn(e.display,s))){Ht(s);var p=e.findWordAt(u);Sa(e.doc,p.anchor,p.head)}}})):re(t.scroller,"dblclick",function(s){return Jt(e,s)||Ht(s)}),re(t.scroller,"contextmenu",function(s){return Xl(e,s)}),re(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Xl(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,S=u.top-s.top;return p*p+S*S>20*20}re(t.scroller,"touchstart",function(s){if(!Jt(e,s)&&!o(s)&&!Ga(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)}}),re(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),re(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!Rn(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var p=e.coordsChar(t.activeTouch,"page"),S;!u.prev||a(u,u.prev)?S=new Pn(p,p):!u.prev.prev||a(u,u.prev.prev)?S=e.findWordAt(p):S=new Pn(U(p.line,0),Ne(e.doc,U(p.line+1,0))),e.setSelection(S.anchor,S.head),e.focus(),Ht(s)}i()}),re(t.scroller,"touchcancel",i),re(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Mo(e,t.scroller.scrollTop),no(e,t.scroller.scrollLeft,!0),Qt(e,"scroll",e))}),re(t.scroller,"mousewheel",function(s){return ol(e,s)}),re(t.scroller,"DOMMouseScroll",function(s){return ol(e,s)}),re(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Jt(e,s)||kr(s)},over:function(s){Jt(e,s)||(Os(e,s),kr(s))},start:function(s){return Ms(e,s)},drop:Ln(e,ws),leave:function(s){Jt(e,s)||Pl(e)}};var l=t.input.getField();re(l,"keyup",function(s){return jl.call(e,s)}),re(l,"keydown",Ln(e,Kl)),re(l,"keypress",Ln(e,kl)),re(l,"focus",function(s){return jn(e,s)}),re(l,"blur",function(s){return ri(e,s)})}var Xa=[];or.defineInitHook=function(e){return Xa.push(e)};function ca(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=Zn(e,t).state:r="prev");var a=e.options.tabSize,l=$(i,t),s=at(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==Nt||p>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?p=at($(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 S="",R=0;if(e.options.indentWithTabs)for(var w=Math.floor(p/a);w;--w)R+=a,S+=" ";if(R<p&&(S+=xe(p-R)),S!=u)return zo(i,S,U(t,0),U(t,u.length),"+input"),l.stateAfter=null,!0;for(var j=0;j<i.sel.ranges.length;j++){var q=i.sel.ranges[j];if(q.head.line==t&&q.head.ch<u.length){var de=U(t,u.length);Ua(i,j,new Pn(de,de));break}}}var ki=null;function Ra(e){ki=e}function Ya(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=I(t),u=null;if(l&&n.ranges.length>1)if(ki&&ki.text.join(`
`)==t){if(n.ranges.length%ki.text.length==0){u=[];for(var p=0;p<ki.text.length;p++)u.push(o.splitLines(ki.text[p]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=ze(s,function(Fe){return[Fe]}));for(var S=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var w=n.ranges[R],j=w.from(),q=w.to();w.empty()&&(r&&r>0?j=U(j.line,j.ch-r):e.state.overwrite&&!l?q=U(q.line,Math.min($(o,q.line).text.length,q.ch+he(s).length)):l&&ki&&ki.lineWise&&ki.text.join(`
`)==s.join(`
`)&&(j=q=U(j.line,0)));var de={from:j,to:q,text:u?u[R%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Bo(e.doc,de),se(e,"inputRead",e,de)}t&&!l&&ql(e,t),ii(e),e.curOp.updateInput<2&&(e.curOp.updateInput=S),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Jl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&wn(t,function(){return Ya(t,r,0,null,"paste")}),!0}function ql(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=ca(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test($(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=ca(e,i.head.line,"smart"));a&&se(e,"electricInput",e,i.head.line)}}}function es(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:U(i,0),head:U(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function ts(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function ns(){var e=z("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=z("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return y?e.style.width="1000px":e.setAttribute("wrap","off"),Ie&&(e.style.border="1px solid black"),ts(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)&&Ln(this,t[n])(this,i,a),Qt(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"](Ma(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:_n(function(n,i){var o=n.token?n:e.getMode(this.options,n);if(o.startState)throw new Error("Overlays may not be stateful.");ye(this.state.overlays,{mode:o,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,mr(this)}),removeOverlay:_n(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++,mr(this);return}}}),indentLine:_n(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Pe(this.doc,n)&&ca(this,n,i,o)}),indentSelection:_n(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&&(ca(this,l.head.line,n,!0),o=l.head.line,a==this.doc.sel.primIndex&&ii(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 S=p;S<o;++S)ca(this,S,n);var R=this.doc.sel.ranges;s.ch==0&&i.length==R.length&&R[a].from().ch>0&&Ua(this.doc,a,new Pn(s,R[a].to()),Ve)}}}),getTokenAt:function(n,i){return dr(this,n,i)},getLineTokens:function(n,i){return dr(this,U(n),i,!0)},getTokenTypeAt:function(n){n=Ne(this.doc,n);var i=Gn(this,$(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 S=a._global[p];S.pred(l,this)&&je(o,S.val)==-1&&o.push(S.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=Mn(o,n==null?o.first+o.size-1:n),Zn(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(),Dn(this,o,i||"page")},charCoords:function(n,i){return sr(this,Ne(this.doc,n),i||"page")},coordsChar:function(n,i){return n=er(this,n,i||"page"),Jr(this,n.left,n.top)},lineAtHeight:function(n,i){return n=er(this,{top:n,left:0},i||"page").top,Te(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=$(this.doc,n)}else l=n;return cr(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Ri(l):0)},defaultTextHeight:function(){return pr(this.display)},defaultCharWidth:function(){return ei(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=Dn(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 S=Math.max(s.wrapper.clientHeight,this.doc.height),R=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>S)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=S&&(u=n.bottom),p+i.offsetWidth>R&&(p=R-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&&Vo(this,{left:p,top:u,right:p+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:_n(Kl),triggerOnKeyPress:_n(kl),triggerOnKeyUp:jl,triggerOnMouseDown:_n(_l),execCommand:function(n){if(aa.hasOwnProperty(n))return aa[n].call(null,this)},triggerElectric:_n(function(n){ql(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=Qa(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:_n(function(n,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?Qa(o.doc,a.head,n,i,o.options.rtlMoveVisually):n<0?a.from():a.to()},Xe)}),deleteH:_n(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Zo(this,function(l){var s=Qa(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 S=Dn(this,u,"div");if(s==null?s=S.left:S.left=s,u=rs(this,S,l,o),u.hitSide)break}return u},moveV:_n(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 S=Dn(o,p.head,"div");p.goalColumn!=null&&(S.left=p.goalColumn),l.push(S.left);var R=rs(o,S,n,i);return i=="page"&&p==a.sel.primary()&&Ki(o,sr(o,R,"div").top-S.top),R},Xe),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=$(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=W(u,s)?function(S){return W(S,s)}:/\s/.test(u)?function(S){return/\s/.test(S)}:function(S){return!/\s/.test(S)&&!W(S)};a>0&&p(o.charAt(a-1));)--a;for(;l<o.length&&p(o.charAt(l));)++l}return new Pn(U(n.line,a),U(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Qe(this.display.cursorDiv,"CodeMirror-overwrite"):C(this.display.cursorDiv,"CodeMirror-overwrite"),Qt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==me()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:_n(function(n,i){wo(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-bt(this)-this.display.barHeight,width:n.scrollWidth-bt(this)-this.display.barWidth,clientHeight:kt(this),clientWidth:Lt(this)}},scrollIntoView:_n(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:U(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?co(this,n):fa(this,n.from,n.to,n.margin)}),setSize:_n(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&&dn(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){ni(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,Qt(this,"refresh",this)}),operation:function(n){return wn(this,n)},startOperation:function(){return oo(this)},endOperation:function(){return ao(this)},refresh:_n(function(){var n=this.display.cachedTextHeight;mr(this),this.curOp.forceUpdate=!0,_t(this),wo(this,this.doc.scrollLeft,this.doc.scrollTop),Aa(this.display),(n==null||Math.abs(n-pr(this.display))>.5||this.options.lineWrapping)&&ti(this),Qt(this,"refresh",this)}),swapDoc:_n(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ul(this,n),_t(this),this.display.input.reset(),wo(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,se(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}},$t(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 Qa(e,t,r,n,i){var o=t,a=r,l=$(e,t.line),s=i&&e.direction=="rtl"?-r:r;function u(){var Ue=t.line+s;return Ue<e.first||Ue>=e.first+e.size?!1:(t=new U(Ue,t.ch,t.sticky),l=$(e,Ue))}function p(Ue){var Le;if(n=="codepoint"){var Ge=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Ge)?Le=null:Le=new U(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(Ge>=55296&&Ge<56320?2:1))),-r)}else i?Le=Ds(e.cm,l,t,r):Le=ja(l,t,r);if(Le==null)if(!Ue&&u())t=ka(i,e.cm,l,t.line,s);else return!1;else t=Le;return!0}if(n=="char"||n=="codepoint")p();else if(n=="column")p(!0);else if(n=="word"||n=="group")for(var S=null,R=n=="group",w=e.cm&&e.cm.getHelper(t,"wordChars"),j=!0;!(r<0&&!p(!j));j=!1){var q=l.text.charAt(t.ch)||`
`,de=W(q,w)?"w":R&&q==`
`?"n":!R||/\s/.test(q)?null:"p";if(R&&!j&&!de&&(de="s"),S&&S!=de){r<0&&(r=1,p(),t.sticky="after");break}if(de&&(S=de),r>0&&!p(!j))break}var Fe=xa(e,t,o,a,!0);return rn(o,Fe)&&(Fe.hitSide=!0),Fe}function rs(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*pr(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=Jr(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 Ke,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;ts(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}re(i,"paste",function(l){!o(l)||Jt(n,l)||Jl(l,n)||M<=11&&setTimeout(Ln(n,function(){return t.updateFromDOM()}),20)}),re(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),re(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),re(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),re(i,"touchstart",function(){return r.forceCompositionEnd()}),re(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||Jt(n,l))){if(n.somethingSelected())Ra({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var s=es(n);Ra({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,Ve),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=ki.text.join(`
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var p=ns(),S=p.firstChild;n.display.lineSpace.insertBefore(p,n.display.lineSpace.firstChild),S.value=ki.text.join(`
`);var R=document.activeElement;_e(S),setTimeout(function(){n.display.lineSpace.removeChild(p),R.focus(),R==i&&r.showPrimarySelection()},50)}}re(i,"copy",a),re(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=Zi(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=Fa(t,e.anchorNode,e.anchorOffset),a=Fa(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&Be(Ct(o,a),n)==0&&Be(At(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&is(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&is(t,i);if(!u){var p=l[l.length-1].measure,S=p.maps?p.maps[p.maps.length-1]:p.map;u={node:S[S.length-1],offset:S[S.length-2]-S[S.length-3]}}if(!s||!u){e.removeAllRanges();return}var R=e.rangeCount&&e.getRangeAt(0),w;try{w=ee(s.node,s.offset,u.offset,u.node)}catch(j){}w&&(!T&&t.state.focused?(e.collapse(s.node,s.offset),w.collapsed||(e.removeAllRanges(),e.addRange(w))):(e.removeAllRanges(),e.addRange(w)),R&&e.anchorNode==null?e.addRange(R):T&&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){J(this.cm.display.cursorDiv,e.cursors),J(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 Me(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():wn(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(we&&V&&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=Fa(t,e.anchorNode,e.anchorOffset),n=Fa(t,e.focusNode,e.focusOffset);r&&n&&wn(t,function(){Ur(t.doc,po(r,n),Ve),(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=U(n.line-1,$(e.doc,n.line-1).length)),i.ch==$(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=U(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||(o=gr(e,n.line))==0?(a=Ce(t.view[0].line),l=t.view[0].node):(a=Ce(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=gr(e,i.line),u,p;if(s==t.view.length-1?(u=t.viewTo-1,p=t.lineDiv.lastChild):(u=Ce(t.view[s+1].line)-1,p=t.view[s+1].node.previousSibling),!l)return!1;for(var S=e.doc.splitLines(qs(e,l,p,a,u)),R=$e(e.doc,U(a,0),U(u,$(e.doc,u).text.length));S.length>1&&R.length>1;)if(he(S)==he(R))S.pop(),R.pop(),u--;else if(S[0]==R[0])S.shift(),R.shift(),a++;else break;for(var w=0,j=0,q=S[0],de=R[0],Fe=Math.min(q.length,de.length);w<Fe&&q.charCodeAt(w)==de.charCodeAt(w);)++w;for(var Ue=he(S),Le=he(R),Ge=Math.min(Ue.length-(S.length==1?w:0),Le.length-(R.length==1?w:0));j<Ge&&Ue.charCodeAt(Ue.length-j-1)==Le.charCodeAt(Le.length-j-1);)++j;if(S.length==1&&R.length==1&&a==n.line)for(;w&&w>n.ch&&Ue.charCodeAt(Ue.length-j-1)==Le.charCodeAt(Le.length-j-1);)w--,j++;S[S.length-1]=Ue.slice(0,Ue.length-j).replace(/^\u200b+/,""),S[0]=S[0].slice(w).replace(/\u200b+$/,"");var Et=U(a,w),pt=U(u,R.length?he(R).length-j:0);if(S.length>1||S[0]||Be(Et,pt))return zo(e.doc,S,Et,pt,"+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())&&wn(this.cm,function(){return mr(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()||Ln(this.cm,Ya)(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 is(e,t){var r=wr(e,t.line);if(!r||r.hidden)return null;var n=$(e.doc,t.line),i=zr(r,n,t.line),o=Tt(n,e.doc.direction),a="left";if(o){var l=Je(o,t.ch);a=l%2?"right":"left"}var s=Kt(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 Ko(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(j){return j.id==w}}function p(){a&&(o+=l,s&&(o+=l),a=s=!1)}function S(w){w&&(p(),o+=w)}function R(w){if(w.nodeType==1){var j=w.getAttribute("cm-text");if(j){S(j);return}var q=w.getAttribute("cm-marker"),de;if(q){var Fe=e.findMarks(U(n,0),U(i+1,0),u(+q));Fe.length&&(de=Fe[0].find(0))&&S($e(e.doc,de.from,de.to).join(l));return}if(w.getAttribute("contenteditable")=="false")return;var Ue=/^(pre|div|p|li|table|br)$/i.test(w.nodeName);if(!/^br$/i.test(w.nodeName)&&w.textContent.length==0)return;Ue&&p();for(var Le=0;Le<w.childNodes.length;Le++)R(w.childNodes[Le]);/^(pre|p)$/i.test(w.nodeName)&&(s=!0),Ue&&(a=!0)}else w.nodeType==3&&S(w.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;R(t),t!=r;)t=t.nextSibling,s=!1;return o}function Fa(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Ko(e.clipPos(U(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||!Me(n,t))return Ko(U(Ce(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?he(e.rest):e.line;return Ko(U(Ce(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(de,Fe,Ue){for(var Le=-1;Le<(u?u.length:0);Le++)for(var Ge=Le<0?s.map:u[Le],Et=0;Et<Ge.length;Et+=3){var pt=Ge[Et+2];if(pt==de||pt==Fe){var nn=Ce(Le<0?e.line:e.rest[Le]),Vn=Ge[Et]+Ue;return(Ue<0||pt!=de)&&(Vn=Ge[Et+(Ue?1:0)]),U(nn,Vn)}}}var S=p(a,l,r);if(S)return Ko(S,i);for(var R=l.nextSibling,w=a?a.nodeValue.length-r:0;R;R=R.nextSibling){if(S=p(R,R.firstChild,0),S)return Ko(U(S.line,S.ch-w),i);w+=R.textContent.length}for(var j=l.previousSibling,q=r;j;j=j.previousSibling){if(S=p(j,j.firstChild,-1),S)return Ko(U(S.line,S.ch+q),i);q+=j.textContent.length}}var br=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ke,this.hasSelection=!1,this.composing=null};br.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),Ie&&(i.style.width="0px"),re(i,"input",function(){b&&M>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),re(i,"paste",function(a){Jt(n,a)||Jl(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!Jt(n,a)){if(n.somethingSelected())Ra({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=es(n);Ra({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,Ve):(r.prevInput="",i.value=l.text.join(`
`),_e(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}re(i,"cut",o),re(i,"copy",o),re(e.scroller,"paste",function(a){if(!(Rn(e,a)||Jt(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)}}),re(e.lineSpace,"selectstart",function(a){Rn(e,a)||Ht(a)}),re(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"})}}),re(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},br.prototype.createField=function(e){this.wrapper=ns(),this.textarea=this.wrapper.firstChild},br.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},br.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Zi(e);if(e.options.moveInputWithCursor){var i=Dn(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},br.prototype.showSelection=function(e){var t=this.cm,r=t.display;J(r.cursorDiv,e.cursors),J(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},br.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&&_e(this.textarea),b&&M>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",b&&M>=9&&(this.hasSelection=null))}},br.prototype.getField=function(){return this.textarea},br.prototype.supportsTouch=function(){return!1},br.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!fe||me()!=this.textarea))try{this.textarea.focus()}catch(e){}},br.prototype.blur=function(){this.textarea.blur()},br.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},br.prototype.receivedFocus=function(){this.slowPoll()},br.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},br.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)},br.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Y(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(b&&M>=9&&this.hasSelection===i||k&&/[\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 wn(t,function(){Ya(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},br.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},br.prototype.onKeyPress=function(){b&&M>=9&&(this.hasSelection=null),this.fastPoll()},br.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=vi(r,e),a=n.scroller.scrollTop;if(!o||h)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Ln(r,Ur)(r.doc,po(o),Ve);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: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var S;y&&(S=window.scrollY),n.input.focus(),y&&window.scrollTo(null,S),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=w,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(i.selectionStart!=null){var q=r.somethingSelected(),de="\u200B"+(q?i.value:"");i.value="\u21DA",i.value=de,t.prevInput=q?"":"\u200B",i.selectionStart=1,i.selectionEnd=de.length,n.selForContextMenu=r.doc.sel}}function w(){if(t.contextMenuPending==w&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&M<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!b||b&&M<9)&&R();var q=0,de=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Ln(r,xl)(r):q++<10?n.detectingSelectAll=setTimeout(de,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(de,200)}}if(b&&M>=9&&R(),g){kr(e);var j=function(){It(window,"mouseup",j),setTimeout(w,20)};re(window,"mouseup",j)}else setTimeout(w,50)},br.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},br.prototype.setUneditable=function(){},br.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?mt(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=me();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(re(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&&(It(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=or(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=It,e.on=re,e.wheelEventPixels=us,e.Doc=gi,e.splitLines=I,e.countColumn=at,e.findColumn=vn,e.isWordChar=P,e.Pass=Nt,e.signal=Qt,e.Line=$i,e.changeEnd=go,e.scrollbarModel=Go,e.Pos=U,e.cmpPos=Be,e.modes=Ee,e.mimeModes=Re,e.resolveMode=jt,e.getMode=vt,e.modeExtensions=Ye,e.extendMode=m,e.copyState=F,e.startState=A,e.innerMode=N,e.commands=aa,e.keyMap=lo,e.keyName=zl,e.isModifierKey=$l,e.lookupKey=Wo,e.normalizeKeyMap=Ts,e.StringStream=Z,e.SharedTextMarker=ra,e.TextMarker=yo,e.LineWidget=na,e.e_preventDefault=Ht,e.e_stopPropagation=An,e.e_stop=kr,e.addClass=Qe,e.contains=Me,e.rmClass=C,e.keyNames=bo}Vs(or),Qs(or);var ru="iter insert remove copy getEditor constructor".split(" ");for(var La in gi.prototype)gi.prototype.hasOwnProperty(La)&&je(ru,La)<0&&(or.prototype[La]=function(e){return function(){return e.apply(this.doc,arguments)}}(gi.prototype[La]));return $t(gi),or.inputStyles={textarea:br,contenteditable:Hn},or.defineMode=function(e){!or.defaults.mode&&e!="null"&&(or.defaults.mode=e),ct.apply(this,arguments)},or.defineMIME=Pt,or.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),or.defineMIME("text/plain","null"),or.defineExtension=function(e,t){or.prototype[e]=t},or.defineDocExtension=function(e,t){gi.prototype[e]=t},or.fromTextArea=tu,nu(or),or.version="5.58.2",or})},67656:function(sn,ve,f){"use strict";f.r(ve),f.d(ve,{BaseInput:function(){return h},default:function(){return wt}});var T=f(87462),x=f(1413),E=f(4942),B=f(71002),b=f(94184),M=f.n(b),y=f(67294),ue=f(87887),V=function(ne){var g,c,C=ne.inputElement,L=ne.prefixCls,J=ne.prefix,z=ne.suffix,K=ne.addonBefore,ee=ne.addonAfter,Me=ne.className,me=ne.style,Qe=ne.disabled,et=ne.readOnly,_e=ne.focused,gt=ne.triggerFocus,mt=ne.allowClear,at=ne.value,Ke=ne.handleReset,je=ne.hidden,Ot=ne.classes,Nt=ne.classNames,Ve=ne.dataAttrs,rt=ne.styles,Xe=ne.components,vn=(Xe==null?void 0:Xe.affixWrapper)||"span",Wn=(Xe==null?void 0:Xe.groupWrapper)||"span",xe=(Xe==null?void 0:Xe.wrapper)||"span",he=(Xe==null?void 0:Xe.groupAddon)||"span",ze=(0,y.useRef)(null),ye=function(be){var Je;(Je=ze.current)!==null&&Je!==void 0&&Je.contains(be.target)&&(gt==null||gt())},ut=function(){var be;if(!mt)return null;var Je=!Qe&&!et&&at,Tn="".concat(L,"-clear-icon"),Tt=(0,B.Z)(mt)==="object"&&mt!==null&&mt!==void 0&&mt.clearIcon?mt.clearIcon:"\u2716";return y.createElement("span",{onClick:Ke,onMouseDown:function(re){return re.preventDefault()},className:M()(Tn,(be={},(0,E.Z)(be,"".concat(Tn,"-hidden"),!Je),(0,E.Z)(be,"".concat(Tn,"-has-suffix"),!!z),be)),role:"button",tabIndex:-1},Tt)},Mt=(0,y.cloneElement)(C,{value:at,hidden:je,className:M()((g=C.props)===null||g===void 0?void 0:g.className,!(0,ue.X3)(ne)&&!(0,ue.He)(ne)&&Me)||null,style:(0,x.Z)((0,x.Z)({},(c=C.props)===null||c===void 0?void 0:c.style),!(0,ue.X3)(ne)&&!(0,ue.He)(ne)?me:{})});if((0,ue.X3)(ne)){var dt,P="".concat(L,"-affix-wrapper"),W=M()(P,(dt={},(0,E.Z)(dt,"".concat(P,"-disabled"),Qe),(0,E.Z)(dt,"".concat(P,"-focused"),_e),(0,E.Z)(dt,"".concat(P,"-readonly"),et),(0,E.Z)(dt,"".concat(P,"-input-with-clear-btn"),z&&mt&&at),dt),!(0,ue.He)(ne)&&Me,Ot==null?void 0:Ot.affixWrapper,Nt==null?void 0:Nt.affixWrapper),H=(z||mt)&&y.createElement("span",{className:M()("".concat(L,"-suffix"),Nt==null?void 0:Nt.suffix),style:rt==null?void 0:rt.suffix},ut(),z);Mt=y.createElement(vn,(0,T.Z)({className:W,style:(0,x.Z)((0,x.Z)({},(0,ue.He)(ne)?void 0:me),rt==null?void 0:rt.affixWrapper),hidden:!(0,ue.He)(ne)&&je,onClick:ye},Ve==null?void 0:Ve.affixWrapper,{ref:ze}),J&&y.createElement("span",{className:M()("".concat(L,"-prefix"),Nt==null?void 0:Nt.prefix),style:rt==null?void 0:rt.prefix},J),(0,y.cloneElement)(C,{value:at,hidden:null}),H)}if((0,ue.He)(ne)){var ie="".concat(L,"-group"),yt="".concat(ie,"-addon"),lt=M()("".concat(L,"-wrapper"),ie,Ot==null?void 0:Ot.wrapper),De=M()("".concat(L,"-group-wrapper"),Me,Ot==null?void 0:Ot.group);return y.createElement(Wn,{className:De,style:me,hidden:je},y.createElement(xe,{className:lt},K&&y.createElement(he,{className:yt},K),(0,y.cloneElement)(Mt,{hidden:null}),ee&&y.createElement(he,{className:yt},ee)))}return Mt},h=V,Se=f(74902),ce=f(97685),He=f(45987),Ie=f(21770),we=f(98423),fe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],k=(0,y.forwardRef)(function(te,ne){var g=te.autoComplete,c=te.onChange,C=te.onFocus,L=te.onBlur,J=te.onPressEnter,z=te.onKeyDown,K=te.prefixCls,ee=K===void 0?"rc-input":K,Me=te.disabled,me=te.htmlSize,Qe=te.className,et=te.maxLength,_e=te.suffix,gt=te.showCount,mt=te.type,at=mt===void 0?"text":mt,Ke=te.classes,je=te.classNames,Ot=te.styles,Nt=(0,He.Z)(te,fe),Ve=(0,Ie.Z)(te.defaultValue,{value:te.value}),rt=(0,ce.Z)(Ve,2),Xe=rt[0],vn=rt[1],Wn=(0,y.useState)(!1),xe=(0,ce.Z)(Wn,2),he=xe[0],ze=xe[1],ye=(0,y.useRef)(null),ut=function(De){ye.current&&(0,ue.nH)(ye.current,De)};(0,y.useImperativeHandle)(ne,function(){return{focus:ut,blur:function(){var De;(De=ye.current)===null||De===void 0||De.blur()},setSelectionRange:function(De,ht,be){var Je;(Je=ye.current)===null||Je===void 0||Je.setSelectionRange(De,ht,be)},select:function(){var De;(De=ye.current)===null||De===void 0||De.select()},input:ye.current}}),(0,y.useEffect)(function(){ze(function(lt){return lt&&Me?!1:lt})},[Me]);var Mt=function(De){te.value===void 0&&vn(De.target.value),ye.current&&(0,ue.rJ)(ye.current,De,c)},dt=function(De){J&&De.key==="Enter"&&J(De),z==null||z(De)},P=function(De){ze(!0),C==null||C(De)},W=function(De){ze(!1),L==null||L(De)},H=function(De){vn(""),ut(),ye.current&&(0,ue.rJ)(ye.current,De,c)},ie=function(){var De=(0,we.Z)(te,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return y.createElement("input",(0,T.Z)({autoComplete:g},De,{onChange:Mt,onFocus:P,onBlur:W,onKeyDown:dt,className:M()(ee,(0,E.Z)({},"".concat(ee,"-disabled"),Me),je==null?void 0:je.input),style:Ot==null?void 0:Ot.input,ref:ye,size:me,type:at}))},yt=function(){var De=Number(et)>0;if(_e||gt){var ht=(0,ue.D7)(Xe),be=(0,Se.Z)(ht).length,Je=(0,B.Z)(gt)==="object"?gt.formatter({value:ht,count:be,maxLength:et}):"".concat(be).concat(De?" / ".concat(et):"");return y.createElement(y.Fragment,null,!!gt&&y.createElement("span",{className:M()("".concat(ee,"-show-count-suffix"),(0,E.Z)({},"".concat(ee,"-show-count-has-suffix"),!!_e),je==null?void 0:je.count),style:(0,x.Z)({},Ot==null?void 0:Ot.count)},Je),_e)}return null};return y.createElement(h,(0,T.Z)({},Nt,{prefixCls:ee,className:Qe,inputElement:ie(),handleReset:H,value:(0,ue.D7)(Xe),focused:he,triggerFocus:ut,suffix:yt(),disabled:Me,classes:Ke,classNames:je,styles:Ot}))}),qe=k,wt=qe},87887:function(sn,ve,f){"use strict";f.d(ve,{D7:function(){return b},He:function(){return T},X3:function(){return x},nH:function(){return B},rJ:function(){return E}});function T(M){return!!(M.addonBefore||M.addonAfter)}function x(M){return!!(M.prefix||M.suffix||M.allowClear)}function E(M,y,ue,V){if(ue){var h=y;if(y.type==="click"){var Se=M.cloneNode(!0);h=Object.create(y,{target:{value:Se},currentTarget:{value:Se}}),Se.value="",ue(h);return}if(V!==void 0){h=Object.create(y,{target:{value:M},currentTarget:{value:M}}),M.value=V,ue(h);return}ue(h)}}function B(M,y){if(M){M.focus(y);var ue=y||{},V=ue.cursor;if(V){var h=M.value.length;switch(V){case"start":M.setSelectionRange(0,0);break;case"end":M.setSelectionRange(h,h);break;default:M.setSelectionRange(0,h)}}}}function b(M){return typeof M=="undefined"||M===null?"":String(M)}},66680:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return x}});var T=f(67294);function x(E){var B=T.useRef();B.current=E;var b=T.useCallback(function(){for(var M,y=arguments.length,ue=new Array(y),V=0;V<y;V++)ue[V]=arguments[V];return(M=B.current)===null||M===void 0?void 0:M.call.apply(M,[B].concat(ue))},[]);return b}},21770:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return M}});var T=f(97685),x=f(66680),E=f(8410),B=f(63896);function b(y){return y!==void 0}function M(y,ue){var V=ue||{},h=V.defaultValue,Se=V.value,ce=V.onChange,He=V.postState,Ie=(0,B.Z)(function(){return b(Se)?Se:b(h)?typeof h=="function"?h():h:typeof y=="function"?y():y}),we=(0,T.Z)(Ie,2),fe=we[0],k=we[1],qe=Se!==void 0?Se:fe,wt=He?He(qe):qe,te=(0,x.Z)(ce),ne=(0,B.Z)([qe]),g=(0,T.Z)(ne,2),c=g[0],C=g[1];(0,E.o)(function(){var J=c[0];fe!==J&&te(fe,J)},[c]),(0,E.o)(function(){b(Se)||k(Se)},[Se]);var L=(0,x.Z)(function(J,z){k(J,z),C([qe],z)});return[wt,L]}},98423:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return x}});var T=f(1413);function x(E,B){var b=(0,T.Z)({},E);return Array.isArray(B)&&B.forEach(function(M){delete b[M]}),b}},73299:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return Pi}});var T=f(87462),x=f(1413),E=f(71002),B=f(97685),b=f(4942),M=f(45987),y=f(67294),ue=f(73935),V=f(94184),h=f.n(V),Se=f(48555),ce=y.forwardRef(function(I,Y){var _=I.height,X=I.offsetY,Ze=I.offsetX,Ee=I.children,Re=I.prefixCls,ct=I.onInnerResize,Pt=I.innerProps,jt=I.rtl,vt=I.extra,Ye={},m={display:"flex",flexDirection:"column"};if(X!==void 0){var F;Ye={height:_,position:"relative",overflow:"hidden"},m=(0,x.Z)((0,x.Z)({},m),{},(F={transform:"translateY(".concat(X,"px)")},(0,b.Z)(F,jt?"marginRight":"marginLeft",-Ze),(0,b.Z)(F,"position","absolute"),(0,b.Z)(F,"left",0),(0,b.Z)(F,"right",0),(0,b.Z)(F,"top",0),F))}return y.createElement("div",{style:Ye},y.createElement(Se.Z,{onResize:function(A){var Z=A.offsetHeight;Z&&ct&&ct()}},y.createElement("div",(0,T.Z)({style:m,className:h()((0,b.Z)({},"".concat(Re,"-holder-inner"),Re)),ref:Y},Pt),Ee,vt)))});ce.displayName="Filler";var He=ce,Ie=function(Y){return+setTimeout(Y,16)},we=function(Y){return clearTimeout(Y)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ie=function(Y){return window.requestAnimationFrame(Y)},we=function(Y){return window.cancelAnimationFrame(Y)});var fe=0,k=new Map;function qe(I){k.delete(I)}var wt=function(Y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;fe+=1;var X=fe;function Ze(Ee){if(Ee===0)qe(X),Y();else{var Re=Ie(function(){Ze(Ee-1)});k.set(X,Re)}}return Ze(_),X};wt.cancel=function(I){var Y=k.get(I);return qe(Y),we(Y)};var te=wt;function ne(I,Y){var _="touches"in I?I.touches[0]:I;return _[Y?"pageX":"pageY"]}var g=y.forwardRef(function(I,Y){var _,X=I.prefixCls,Ze=I.rtl,Ee=I.scrollOffset,Re=I.scrollRange,ct=I.onStartMove,Pt=I.onStopMove,jt=I.onScroll,vt=I.horizontal,Ye=I.spinSize,m=I.containerSize,F=I.style,N=I.thumbStyle,A=y.useState(!1),Z=(0,B.Z)(A,2),$=Z[0],$e=Z[1],St=y.useState(null),tt=(0,B.Z)(St,2),Ce=tt[0],Te=tt[1],Pe=y.useState(null),Gt=(0,B.Z)(Pe,2),U=Gt[0],Be=Gt[1],rn=!Ze,xn=y.useRef(),At=y.useRef(),Ct=y.useState(!1),Mn=(0,B.Z)(Ct,2),Ne=Mn[0],cn=Mn[1],on=y.useRef(),In=function(){clearTimeout(on.current),cn(!0),on.current=setTimeout(function(){cn(!1)},3e3)},Sn=Re-m||0,Sr=m-Ye||0,Gn=Sn>0,Zn=y.useMemo(function(){if(Ee===0||Sn===0)return 0;var Xn=Ee/Sn;return Xn*Sr},[Ee,Sn,Sr]),Rr=function(Yn){Yn.stopPropagation(),Yn.preventDefault()},Fr=y.useRef({top:Zn,dragging:$,pageY:Ce,startTop:U});Fr.current={top:Zn,dragging:$,pageY:Ce,startTop:U};var Nn=function(Yn){$e(!0),Te(ne(Yn,vt)),Be(Fr.current.top),ct(),Yn.stopPropagation(),Yn.preventDefault()};y.useEffect(function(){var Xn=function(En){En.preventDefault()},Yn=xn.current,tr=At.current;return Yn.addEventListener("touchstart",Xn),tr.addEventListener("touchstart",Nn),function(){Yn.removeEventListener("touchstart",Xn),tr.removeEventListener("touchstart",Nn)}},[]);var Cr=y.useRef();Cr.current=Sn;var dr=y.useRef();dr.current=Sr,y.useEffect(function(){if($){var Xn,Yn=function(En){var Un=Fr.current,Qn=Un.dragging,Lr=Un.pageY,ui=Un.startTop;if(te.cancel(Xn),Qn){var Vr=ne(En,vt)-Lr,Gr=ui;!rn&&vt?Gr-=Vr:Gr+=Vr;var ci=Cr.current,zn=dr.current,Xr=zn?Gr/zn:0,$r=Math.ceil(Xr*ci);$r=Math.max($r,0),$r=Math.min($r,ci),Xn=te(function(){jt($r,vt)})}},tr=function(){$e(!1),Pt()};return window.addEventListener("mousemove",Yn),window.addEventListener("touchmove",Yn),window.addEventListener("mouseup",tr),window.addEventListener("touchend",tr),function(){window.removeEventListener("mousemove",Yn),window.removeEventListener("touchmove",Yn),window.removeEventListener("mouseup",tr),window.removeEventListener("touchend",tr),te.cancel(Xn)}}},[$]),y.useEffect(function(){In()},[Ee]),y.useImperativeHandle(Y,function(){return{delayHidden:In}});var xr="".concat(X,"-scrollbar"),On={position:"absolute",visibility:Ne&&Gn?null:"hidden"},ar={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return vt?(On.height=8,On.left=0,On.right=0,On.bottom=0,ar.height="100%",ar.width=Ye,rn?ar.left=Zn:ar.right=Zn):(On.width=8,On.top=0,On.bottom=0,rn?On.right=0:On.left=0,ar.width="100%",ar.height=Ye,ar.top=Zn),y.createElement("div",{ref:xn,className:h()(xr,(_={},(0,b.Z)(_,"".concat(xr,"-horizontal"),vt),(0,b.Z)(_,"".concat(xr,"-vertical"),!vt),(0,b.Z)(_,"".concat(xr,"-visible"),Ne),_)),style:(0,x.Z)((0,x.Z)({},On),F),onMouseDown:Rr,onMouseMove:In},y.createElement("div",{ref:At,className:h()("".concat(xr,"-thumb"),(0,b.Z)({},"".concat(xr,"-thumb-moving"),$)),style:(0,x.Z)((0,x.Z)({},ar),N),onMouseDown:Nn}))}),c=g;function C(I){var Y=I.children,_=I.setRef,X=y.useCallback(function(Ze){_(Ze)},[]);return y.cloneElement(Y,{ref:X})}function L(I,Y,_,X,Ze,Ee,Re){var ct=Re.getKey;return I.slice(Y,_+1).map(function(Pt,jt){var vt=Y+jt,Ye=Ee(Pt,vt,{style:{width:X}}),m=ct(Pt);return y.createElement(C,{key:m,setRef:function(N){return Ze(Pt,N)}},Ye)})}function J(I){return I instanceof HTMLElement||I instanceof SVGElement}function z(I){return J(I)?I:I instanceof y.Component?ue.findDOMNode(I):null}var K=f(15671),ee=f(43144),Me=function(){function I(){(0,K.Z)(this,I),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,ee.Z)(I,[{key:"set",value:function(_,X){this.maps[_]=X,this.id+=1}},{key:"get",value:function(_){return this.maps[_]}}]),I}(),me=Me;function Qe(I,Y,_){var X=y.useState(0),Ze=(0,B.Z)(X,2),Ee=Ze[0],Re=Ze[1],ct=(0,y.useRef)(new Map),Pt=(0,y.useRef)(new me),jt=(0,y.useRef)();function vt(){te.cancel(jt.current)}function Ye(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;vt();var N=function(){ct.current.forEach(function(Z,$){if(Z&&Z.offsetParent){var $e=z(Z),St=$e.offsetHeight;Pt.current.get($)!==St&&Pt.current.set($,$e.offsetHeight)}}),Re(function(Z){return Z+1})};F?N():jt.current=te(N)}function m(F,N){var A=I(F),Z=ct.current.get(A);N?(ct.current.set(A,N),Ye()):ct.current.delete(A),!Z!=!N&&(N?Y==null||Y(F):_==null||_(F))}return(0,y.useEffect)(function(){return vt},[]),[m,Ye,Pt.current,Ee]}function et(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var _e=et()?y.useLayoutEffect:y.useEffect,gt=function(Y,_){var X=y.useRef(!0);_e(function(){return Y(X.current)},_),_e(function(){return X.current=!1,function(){X.current=!0}},[])},mt=function(Y,_){gt(function(X){if(!X)return Y()},_)},at=gt;function Ke(I){var Y=y.useRef();Y.current=I;var _=y.useCallback(function(){for(var X,Ze=arguments.length,Ee=new Array(Ze),Re=0;Re<Ze;Re++)Ee[Re]=arguments[Re];return(X=Y.current)===null||X===void 0?void 0:X.call.apply(X,[Y].concat(Ee))},[]);return _}function je(I){var Y=React.useRef(!1),_=React.useState(I),X=_slicedToArray(_,2),Ze=X[0],Ee=X[1];React.useEffect(function(){return Y.current=!1,function(){Y.current=!0}},[]);function Re(ct,Pt){Pt&&Y.current||Ee(ct)}return[Ze,Re]}function Ot(I){return I!==void 0}function Nt(I,Y){var _=Y||{},X=_.defaultValue,Ze=_.value,Ee=_.onChange,Re=_.postState,ct=useState(function(){return Ot(Ze)?Ze:Ot(X)?typeof X=="function"?X():X:typeof I=="function"?I():I}),Pt=_slicedToArray(ct,2),jt=Pt[0],vt=Pt[1],Ye=Ze!==void 0?Ze:jt,m=Re?Re(Ye):Ye,F=useEvent(Ee),N=useState([Ye]),A=_slicedToArray(N,2),Z=A[0],$=A[1];useLayoutUpdateEffect(function(){var St=Z[0];jt!==St&&F(jt,St)},[Z]),useLayoutUpdateEffect(function(){Ot(Ze)||vt(Ze)},[Ze]);var $e=useEvent(function(St,tt){vt(St,tt),$([Ye],tt)});return[m,$e]}var Ve=f(31461);function rt(I,Y,_){var X=React.useRef({});return(!("value"in X.current)||_(X.current.condition,Y))&&(X.current.value=I(),X.current.condition=Y),X.current.value}function Xe(I,Y){typeof I=="function"?I(Y):_typeof(I)==="object"&&I&&"current"in I&&(I.current=Y)}function vn(){for(var I=arguments.length,Y=new Array(I),_=0;_<I;_++)Y[_]=arguments[_];var X=Y.filter(function(Ze){return Ze});return X.length<=1?X[0]:function(Ze){Y.forEach(function(Ee){Xe(Ee,Ze)})}}function Wn(){for(var I=arguments.length,Y=new Array(I),_=0;_<I;_++)Y[_]=arguments[_];return useMemo(function(){return vn.apply(void 0,Y)},Y,function(X,Ze){return X.length!==Ze.length||X.every(function(Ee,Re){return Ee!==Ze[Re]})})}function xe(I){var Y,_,X=isMemo(I)?I.type.type:I.type;return!(typeof X=="function"&&!((Y=X.prototype)!==null&&Y!==void 0&&Y.render)||typeof I=="function"&&!((_=I.prototype)!==null&&_!==void 0&&_.render))}function he(I){return!isValidElement(I)||isFragment(I)?!1:xe(I)}function ze(I,Y,_,X){if(!Y.length)return _;var Ze=_toArray(Y),Ee=Ze[0],Re=Ze.slice(1),ct;return!I&&typeof Ee=="number"?ct=[]:Array.isArray(I)?ct=_toConsumableArray(I):ct=_objectSpread({},I),X&&_===void 0&&Re.length===1?delete ct[Ee][Re[0]]:ct[Ee]=ze(ct[Ee],Re,_,X),ct}function ye(I,Y,_){var X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Y.length&&X&&_===void 0&&!get(I,Y.slice(0,-1))?I:ze(I,Y,_,X)}function ut(I){return _typeof(I)==="object"&&I!==null&&Object.getPrototypeOf(I)===Object.prototype}function Mt(I){return Array.isArray(I)?[]:{}}var dt=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function P(){for(var I=arguments.length,Y=new Array(I),_=0;_<I;_++)Y[_]=arguments[_];var X=Mt(Y[0]);return Y.forEach(function(Ze){function Ee(Re,ct){var Pt=new Set(ct),jt=get(Ze,Re),vt=Array.isArray(jt);if(vt||ut(jt)){if(!Pt.has(jt)){Pt.add(jt);var Ye=get(X,Re);vt?X=ye(X,Re,[]):(!Ye||_typeof(Ye)!=="object")&&(X=ye(X,Re,Mt(jt))),dt(jt).forEach(function(m){Ee([].concat(_toConsumableArray(Re),[m]),Pt)})}}else X=ye(X,Re,jt)}Ee([])}),X}var W={},H=[],ie=function(Y){H.push(Y)};function yt(I,Y){if(0)var _}function lt(I,Y){if(0)var _}function De(){W={}}function ht(I,Y,_){!Y&&!W[_]&&(I(!1,_),W[_]=!0)}function be(I,Y){ht(yt,I,Y)}function Je(I,Y){ht(lt,I,Y)}be.preMessage=ie,be.resetWarned=De,be.noteOnce=Je;var Tn=null,Tt=10;function Zt(I,Y,_,X,Ze,Ee,Re,ct){var Pt=y.useRef(),jt=y.useState(null),vt=(0,B.Z)(jt,2),Ye=vt[0],m=vt[1];return at(function(){if(Ye&&Ye.times<Tt){if(!I.current){m(function(In){return(0,x.Z)({},In)});return}Ee();var F=Ye.targetAlign,N=Ye.originAlign,A=Ye.index,Z=Ye.offset,$=I.current.clientHeight,$e=!1,St=F,tt=null;if($){for(var Ce=F||N,Te=0,Pe=0,Gt=0,U=Math.min(Y.length-1,A),Be=0;Be<=U;Be+=1){var rn=Ze(Y[Be]);Pe=Te;var xn=_.get(rn);Gt=Pe+(xn===void 0?X:xn),Te=Gt}for(var At=Ce==="top"?Z:$-Z,Ct=U;Ct>=0;Ct-=1){var Mn=Ze(Y[Ct]),Ne=_.get(Mn);if(Ne===void 0){$e=!0;break}if(At-=Ne,At<=0)break}switch(Ce){case"top":tt=Pe-Z;break;case"bottom":tt=Gt-$+Z;break;default:{var cn=I.current.scrollTop,on=cn+$;Pe<cn?St="top":Gt>on&&(St="bottom")}}tt!==null&&Re(tt),tt!==Ye.lastTop&&($e=!0)}$e&&m(function(In){return(0,x.Z)((0,x.Z)({},In),{},{times:In.times+1,targetAlign:St,lastTop:tt})})}},[Ye,I.current]),function(F){if(F==null){ct();return}if(te.cancel(Pt.current),typeof F=="number")Re(F);else if(F&&(0,E.Z)(F)==="object"){var N,A=F.align;"index"in F?N=F.index:N=Y.findIndex(function($e){return Ze($e)===F.key});var Z=F.offset,$=Z===void 0?0:Z;m({times:0,index:N,offset:$,originAlign:A})}}}function re(I,Y,_,X){var Ze=_-I,Ee=Y-_,Re=Math.min(Ze,Ee)*2;if(X<=Re){var ct=Math.floor(X/2);return X%2?_+ct+1:_-ct}return Ze>Ee?_-(X-Ee):_+(X-Ze)}function it(I,Y,_){var X=I.length,Ze=Y.length,Ee,Re;if(X===0&&Ze===0)return null;X<Ze?(Ee=I,Re=Y):(Ee=Y,Re=I);var ct={__EMPTY_ITEM__:!0};function Pt(N){return N!==void 0?_(N):ct}for(var jt=null,vt=Math.abs(X-Ze)!==1,Ye=0;Ye<Re.length;Ye+=1){var m=Pt(Ee[Ye]),F=Pt(Re[Ye]);if(m!==F){jt=Ye,vt=vt||m!==Pt(Re[Ye+1]);break}}return jt===null?null:{index:jt,multiple:vt}}function It(I,Y,_){var X=y.useState(I),Ze=(0,B.Z)(X,2),Ee=Ze[0],Re=Ze[1],ct=y.useState(null),Pt=(0,B.Z)(ct,2),jt=Pt[0],vt=Pt[1];return y.useEffect(function(){var Ye=it(Ee||[],I||[],Y);(Ye==null?void 0:Ye.index)!==void 0&&(_==null||_(Ye.index),vt(I[Ye.index])),Re(I)},[I]),[jt]}var Qt=(typeof navigator=="undefined"?"undefined":(0,E.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Jt=Qt,Dt=function(I,Y){var _=(0,y.useRef)(!1),X=(0,y.useRef)(null);function Ze(){clearTimeout(X.current),_.current=!0,X.current=setTimeout(function(){_.current=!1},50)}var Ee=(0,y.useRef)({top:I,bottom:Y});return Ee.current.top=I,Ee.current.bottom=Y,function(Re){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pt=Re<0&&Ee.current.top||Re>0&&Ee.current.bottom;return ct&&Pt?(clearTimeout(X.current),_.current=!1):(!Pt||_.current)&&Ze(),!_.current&&Pt}};function We(I,Y,_,X,Ze){var Ee=(0,y.useRef)(0),Re=(0,y.useRef)(null),ct=(0,y.useRef)(null),Pt=(0,y.useRef)(!1),jt=Dt(Y,_);function vt(Z,$){te.cancel(Re.current),Ee.current+=$,ct.current=$,!jt($)&&(Jt||Z.preventDefault(),Re.current=te(function(){var $e=Pt.current?10:1;Ze(Ee.current*$e),Ee.current=0}))}function Ye(Z,$){Ze($,!0),Jt||Z.preventDefault()}var m=(0,y.useRef)(null),F=(0,y.useRef)(null);function N(Z){if(I){te.cancel(F.current),F.current=te(function(){m.current=null},2);var $=Z.deltaX,$e=Z.deltaY,St=Z.shiftKey,tt=$,Ce=$e;(m.current==="sx"||!m.current&&St&&$e&&!$)&&(tt=$e,Ce=0,m.current="sx");var Te=Math.abs(tt),Pe=Math.abs(Ce);m.current===null&&(m.current=X&&Te>Pe?"x":"y"),m.current==="y"?vt(Z,Ce):Ye(Z,tt)}}function A(Z){I&&(Pt.current=Z.detail===ct.current)}return[N,A]}var $t=14/15;function Ht(I,Y,_){var X=(0,y.useRef)(!1),Ze=(0,y.useRef)(0),Ee=(0,y.useRef)(null),Re=(0,y.useRef)(null),ct,Pt=function(m){if(X.current){var F=Math.ceil(m.touches[0].pageY),N=Ze.current-F;Ze.current=F,_(N)&&m.preventDefault(),clearInterval(Re.current),Re.current=setInterval(function(){N*=$t,(!_(N,!0)||Math.abs(N)<=.1)&&clearInterval(Re.current)},16)}},jt=function(){X.current=!1,ct()},vt=function(m){ct(),m.touches.length===1&&!X.current&&(X.current=!0,Ze.current=Math.ceil(m.touches[0].pageY),Ee.current=m.target,Ee.current.addEventListener("touchmove",Pt),Ee.current.addEventListener("touchend",jt))};ct=function(){Ee.current&&(Ee.current.removeEventListener("touchmove",Pt),Ee.current.removeEventListener("touchend",jt))},at(function(){return I&&Y.current.addEventListener("touchstart",vt),function(){var Ye;(Ye=Y.current)===null||Ye===void 0||Ye.removeEventListener("touchstart",vt),ct(),clearInterval(Re.current)}},[I])}var An=20;function jr(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_=I/Y*100;return isNaN(_)&&(_=0),_=Math.max(_,An),_=Math.min(_,I/2),Math.floor(_)}function kr(I,Y,_,X){var Ze=y.useMemo(function(){return[new Map,[]]},[I,_.id,X]),Ee=(0,B.Z)(Ze,2),Re=Ee[0],ct=Ee[1],Pt=function(vt){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vt,m=Re.get(vt),F=Re.get(Ye);if(m===void 0||F===void 0)for(var N=I.length,A=ct.length;A<N;A+=1){var Z,$=I[A],$e=Y($);Re.set($e,A);var St=(Z=_.get($e))!==null&&Z!==void 0?Z:X;if(ct[A]=(ct[A-1]||0)+St,$e===vt&&(m=A),$e===Ye&&(F=A),m!==void 0&&F!==void 0)break}return{top:ct[m-1]||0,bottom:ct[F]}};return Pt}var Si=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],li=[],Oi={overflowY:"auto",overflowAnchor:"none"};function _r(I,Y){var _=I.prefixCls,X=_===void 0?"rc-virtual-list":_,Ze=I.className,Ee=I.height,Re=I.itemHeight,ct=I.fullHeight,Pt=ct===void 0?!0:ct,jt=I.style,vt=I.data,Ye=I.children,m=I.itemKey,F=I.virtual,N=I.direction,A=I.scrollWidth,Z=I.component,$=Z===void 0?"div":Z,$e=I.onScroll,St=I.onVirtualScroll,tt=I.onVisibleChange,Ce=I.innerProps,Te=I.extraRender,Pe=I.styles,Gt=(0,M.Z)(I,Si),U=!!(F!==!1&&Ee&&Re),Be=U&&vt&&(Re*vt.length>Ee||!!A),rn=N==="rtl",xn=h()(X,(0,b.Z)({},"".concat(X,"-rtl"),rn),Ze),At=vt||li,Ct=(0,y.useRef)(),Mn=(0,y.useRef)(),Ne=(0,y.useState)(0),cn=(0,B.Z)(Ne,2),on=cn[0],In=cn[1],Sn=(0,y.useState)(0),Sr=(0,B.Z)(Sn,2),Gn=Sr[0],Zn=Sr[1],Rr=(0,y.useState)(!1),Fr=(0,B.Z)(Rr,2),Nn=Fr[0],Cr=Fr[1],dr=function(){Cr(!0)},xr=function(){Cr(!1)},On=y.useCallback(function(oe){return typeof m=="function"?m(oe):oe==null?void 0:oe[m]},[m]),ar={getKey:On};function Xn(oe){In(function(ae){var le;typeof oe=="function"?le=oe(ae):le=oe;var ke=Ro(le);return Ct.current.scrollTop=ke,ke})}var Yn=(0,y.useRef)({start:0,end:At.length}),tr=(0,y.useRef)(),hr=It(At,On),En=(0,B.Z)(hr,1),Un=En[0];tr.current=Un;var Qn=Qe(On,null,null),Lr=(0,B.Z)(Qn,4),ui=Lr[0],Vr=Lr[1],Gr=Lr[2],ci=Lr[3],zn=y.useMemo(function(){if(!U)return{scrollHeight:void 0,start:0,end:At.length-1,offset:void 0};if(!Be){var oe;return{scrollHeight:((oe=Mn.current)===null||oe===void 0?void 0:oe.offsetHeight)||0,start:0,end:At.length-1,offset:void 0}}for(var ae=0,le,ke,se,st=At.length,Bt=0;Bt<st;Bt+=1){var Ut=At[Bt],Wt=On(Ut),Rt=Gr.get(Wt),zt=ae+(Rt===void 0?Re:Rt);zt>=on&&le===void 0&&(le=Bt,ke=ae),zt>on+Ee&&se===void 0&&(se=Bt),ae=zt}return le===void 0&&(le=0,ke=0,se=Math.ceil(Ee/Re)),se===void 0&&(se=At.length-1),se=Math.min(se+1,At.length-1),{scrollHeight:ae,start:le,end:se,offset:ke}},[Be,U,on,At,ci,Ee]),Xr=zn.scrollHeight,$r=zn.start,Br=zn.end,Ai=zn.offset;Yn.current.start=$r,Yn.current.end=Br;var zi=y.useState({width:0,height:Ee}),xi=(0,B.Z)(zi,2),Yr=xi[0],_i=xi[1],Hi=function(ae){_i({width:ae.width||ae.offsetWidth,height:ae.height||ae.offsetHeight})},Vi=(0,y.useRef)(),Ni=(0,y.useRef)(),fi=y.useMemo(function(){return jr(Yr.width,A)},[Yr.width,A]),_o=y.useMemo(function(){return jr(Yr.height,Xr)},[Yr.height,Xr]),Co=Xr-Ee,qi=(0,y.useRef)(Co);qi.current=Co;function Ro(oe){var ae=oe;return Number.isNaN(qi.current)||(ae=Math.min(ae,qi.current)),ae=Math.max(ae,0),ae}var Ii=on<=0,uo=on>=Co,Ri=Dt(Ii,uo),Gi=function(){return{x:rn?-Gn:Gn,y:on}},eo=(0,y.useRef)(Gi()),$i=Ke(function(){if(St){var oe=Gi();(eo.current.x!==oe.x||eo.current.y!==oe.y)&&(St(oe),eo.current=oe)}});function Fo(oe,ae){var le=oe;ae?((0,ue.flushSync)(function(){Zn(le)}),$i()):Xn(le)}function Lo(oe){var ae=oe.currentTarget.scrollTop;ae!==on&&Xn(ae),$e==null||$e(oe),$i()}var xo=function(ae){var le=ae,ke=A-Yr.width;return le=Math.max(le,0),le=Math.min(le,ke),le},Xi=Ke(function(oe,ae){ae?((0,ue.flushSync)(function(){Zn(function(le){var ke=le+(rn?-oe:oe);return xo(ke)})}),$i()):Xn(function(le){var ke=le+oe;return ke})}),To=We(U,Ii,uo,!!A,Xi),Eo=(0,B.Z)(To,2),d=Eo[0],v=Eo[1];Ht(U,Ct,function(oe,ae){return Ri(oe,ae)?!1:(d({preventDefault:function(){},deltaY:oe}),!0)}),at(function(){function oe(le){U&&le.preventDefault()}var ae=Ct.current;return ae.addEventListener("wheel",d),ae.addEventListener("DOMMouseScroll",v),ae.addEventListener("MozMousePixelScroll",oe),function(){ae.removeEventListener("wheel",d),ae.removeEventListener("DOMMouseScroll",v),ae.removeEventListener("MozMousePixelScroll",oe)}},[U]),at(function(){A&&Zn(function(oe){return xo(oe)})},[Yr.width,A]);var D=function(){var ae,le;(ae=Vi.current)===null||ae===void 0||ae.delayHidden(),(le=Ni.current)===null||le===void 0||le.delayHidden()},O=Zt(Ct,At,Gr,Re,On,function(){return Vr(!0)},Xn,D);y.useImperativeHandle(Y,function(){return{getScrollInfo:Gi,scrollTo:function(ae){function le(ke){return ke&&(0,E.Z)(ke)==="object"&&("left"in ke||"top"in ke)}le(ae)?(ae.left!==void 0&&Zn(xo(ae.left)),O(ae.top)):O(ae)}}}),at(function(){if(tt){var oe=At.slice($r,Br+1);tt(oe,At)}},[$r,Br,At]);var G=kr(At,On,Gr,Re),Q=Te==null?void 0:Te({start:$r,end:Br,virtual:Be,offsetX:Gn,offsetY:Ai,rtl:rn,getSize:G}),pe=L(At,$r,Br,A,ui,Ye,ar),Oe=null;Ee&&(Oe=(0,x.Z)((0,b.Z)({},Pt?"height":"maxHeight",Ee),Oi),U&&(Oe.overflowY="hidden",A&&(Oe.overflowX="hidden"),Nn&&(Oe.pointerEvents="none")));var Ae={};return rn&&(Ae.dir="rtl"),y.createElement("div",(0,T.Z)({style:(0,x.Z)((0,x.Z)({},jt),{},{position:"relative"}),className:xn},Ae,Gt),y.createElement(Se.Z,{onResize:Hi},y.createElement($,{className:"".concat(X,"-holder"),style:Oe,ref:Ct,onScroll:Lo,onMouseEnter:D},y.createElement(He,{prefixCls:X,height:Xr,offsetX:Gn,offsetY:Ai,scrollWidth:A,onInnerResize:Vr,ref:Mn,innerProps:Ce,rtl:rn,extra:Q},pe))),Be&&Xr>Ee&&y.createElement(c,{ref:Vi,prefixCls:X,scrollOffset:on,scrollRange:Xr,rtl:rn,onScroll:Fo,onStartMove:dr,onStopMove:xr,spinSize:_o,containerSize:Yr.height,style:Pe==null?void 0:Pe.verticalScrollBar,thumbStyle:Pe==null?void 0:Pe.verticalScrollBarThumb}),Be&&A&&y.createElement(c,{ref:Ni,prefixCls:X,scrollOffset:Gn,scrollRange:A,rtl:rn,onScroll:Fo,onStartMove:dr,onStopMove:xr,spinSize:fi,containerSize:Yr.width,horizontal:!0,style:Pe==null?void 0:Pe.horizontalScrollBar,thumbStyle:Pe==null?void 0:Pe.horizontalScrollBarThumb}))}var Ci=y.forwardRef(_r);Ci.displayName="List";var si=Ci,Pi=si},66392:function(sn,ve){"use strict";var f;var T=Symbol.for("react.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),y=Symbol.for("react.context"),ue=Symbol.for("react.server_context"),V=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),Se=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),He=Symbol.for("react.lazy"),Ie=Symbol.for("react.offscreen"),we;we=Symbol.for("react.module.reference");function fe(k){if(typeof k=="object"&&k!==null){var qe=k.$$typeof;switch(qe){case T:switch(k=k.type,k){case E:case b:case B:case h:case Se:return k;default:switch(k=k&&k.$$typeof,k){case ue:case y:case V:case He:case ce:case M:return k;default:return qe}}case x:return qe}}}f=y,f=M,f=T,f=V,f=E,f=He,f=ce,f=x,f=b,f=B,f=h,f=Se,f=function(){return!1},f=function(){return!1},f=function(k){return fe(k)===y},f=function(k){return fe(k)===M},f=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===T},f=function(k){return fe(k)===V},f=function(k){return fe(k)===E},f=function(k){return fe(k)===He},f=function(k){return fe(k)===ce},f=function(k){return fe(k)===x},f=function(k){return fe(k)===b},f=function(k){return fe(k)===B},f=function(k){return fe(k)===h},f=function(k){return fe(k)===Se},f=function(k){return typeof k=="string"||typeof k=="function"||k===E||k===b||k===B||k===h||k===Se||k===Ie||typeof k=="object"&&k!==null&&(k.$$typeof===He||k.$$typeof===ce||k.$$typeof===M||k.$$typeof===y||k.$$typeof===V||k.$$typeof===we||k.getModuleId!==void 0)},f=fe},31461:function(sn,ve,f){"use strict";f(66392)},17423:function(sn,ve,f){"use strict";f.d(ve,{Z:function(){return ue}});const T=V=>typeof V=="object"&&V!=null&&V.nodeType===1,x=(V,h)=>(!h||V!=="hidden")&&V!=="visible"&&V!=="clip",E=(V,h)=>{if(V.clientHeight<V.scrollHeight||V.clientWidth<V.scrollWidth){const Se=getComputedStyle(V,null);return x(Se.overflowY,h)||x(Se.overflowX,h)||(ce=>{const He=(Ie=>{if(!Ie.ownerDocument||!Ie.ownerDocument.defaultView)return null;try{return Ie.ownerDocument.defaultView.frameElement}catch(we){return null}})(ce);return!!He&&(He.clientHeight<ce.scrollHeight||He.clientWidth<ce.scrollWidth)})(V)}return!1},B=(V,h,Se,ce,He,Ie,we,fe)=>Ie<V&&we>h||Ie>V&&we<h?0:Ie<=V&&fe<=Se||we>=h&&fe>=Se?Ie-V-ce:we>h&&fe<Se||Ie<V&&fe>Se?we-h+He:0,b=V=>{const h=V.parentElement;return h==null?V.getRootNode().host||null:h},M=(V,h)=>{var Se,ce,He,Ie;if(typeof document=="undefined")return[];const{scrollMode:we,block:fe,inline:k,boundary:qe,skipOverflowHiddenElements:wt}=h,te=typeof qe=="function"?qe:Nt=>Nt!==qe;if(!T(V))throw new TypeError("Invalid target");const ne=document.scrollingElement||document.documentElement,g=[];let c=V;for(;T(c)&&te(c);){if(c=b(c),c===ne){g.push(c);break}c!=null&&c===document.body&&E(c)&&!E(document.documentElement)||c!=null&&E(c,wt)&&g.push(c)}const C=(ce=(Se=window.visualViewport)==null?void 0:Se.width)!=null?ce:innerWidth,L=(Ie=(He=window.visualViewport)==null?void 0:He.height)!=null?Ie:innerHeight,{scrollX:J,scrollY:z}=window,{height:K,width:ee,top:Me,right:me,bottom:Qe,left:et}=V.getBoundingClientRect(),{top:_e,right:gt,bottom:mt,left:at}=(Nt=>{const Ve=window.getComputedStyle(Nt);return{top:parseFloat(Ve.scrollMarginTop)||0,right:parseFloat(Ve.scrollMarginRight)||0,bottom:parseFloat(Ve.scrollMarginBottom)||0,left:parseFloat(Ve.scrollMarginLeft)||0}})(V);let Ke=fe==="start"||fe==="nearest"?Me-_e:fe==="end"?Qe+mt:Me+K/2-_e+mt,je=k==="center"?et+ee/2-at+gt:k==="end"?me+gt:et-at;const Ot=[];for(let Nt=0;Nt<g.length;Nt++){const Ve=g[Nt],{height:rt,width:Xe,top:vn,right:Wn,bottom:xe,left:he}=Ve.getBoundingClientRect();if(we==="if-needed"&&Me>=0&&et>=0&&Qe<=L&&me<=C&&Me>=vn&&Qe<=xe&&et>=he&&me<=Wn)return Ot;const ze=getComputedStyle(Ve),ye=parseInt(ze.borderLeftWidth,10),ut=parseInt(ze.borderTopWidth,10),Mt=parseInt(ze.borderRightWidth,10),dt=parseInt(ze.borderBottomWidth,10);let P=0,W=0;const H="offsetWidth"in Ve?Ve.offsetWidth-Ve.clientWidth-ye-Mt:0,ie="offsetHeight"in Ve?Ve.offsetHeight-Ve.clientHeight-ut-dt:0,yt="offsetWidth"in Ve?Ve.offsetWidth===0?0:Xe/Ve.offsetWidth:0,lt="offsetHeight"in Ve?Ve.offsetHeight===0?0:rt/Ve.offsetHeight:0;if(ne===Ve)P=fe==="start"?Ke:fe==="end"?Ke-L:fe==="nearest"?B(z,z+L,L,ut,dt,z+Ke,z+Ke+K,K):Ke-L/2,W=k==="start"?je:k==="center"?je-C/2:k==="end"?je-C:B(J,J+C,C,ye,Mt,J+je,J+je+ee,ee),P=Math.max(0,P+z),W=Math.max(0,W+J);else{P=fe==="start"?Ke-vn-ut:fe==="end"?Ke-xe+dt+ie:fe==="nearest"?B(vn,xe,rt,ut,dt+ie,Ke,Ke+K,K):Ke-(vn+rt/2)+ie/2,W=k==="start"?je-he-ye:k==="center"?je-(he+Xe/2)+H/2:k==="end"?je-Wn+Mt+H:B(he,Wn,Xe,ye,Mt+H,je,je+ee,ee);const{scrollLeft:De,scrollTop:ht}=Ve;P=lt===0?0:Math.max(0,Math.min(ht+P/lt,Ve.scrollHeight-rt/lt+ie)),W=yt===0?0:Math.max(0,Math.min(De+W/yt,Ve.scrollWidth-Xe/yt+H)),Ke+=ht-P,je+=De-W}Ot.push({el:Ve,top:P,left:W})}return Ot},y=V=>V===!1?{block:"end",inline:"nearest"}:(h=>h===Object(h)&&Object.keys(h).length!==0)(V)?V:{block:"start",inline:"nearest"};function ue(V,h){if(!V.isConnected||!(He=>{let Ie=He;for(;Ie&&Ie.parentNode;){if(Ie.parentNode===document)return!0;Ie=Ie.parentNode instanceof ShadowRoot?Ie.parentNode.host:Ie.parentNode}return!1})(V))return;const Se=(He=>{const Ie=window.getComputedStyle(He);return{top:parseFloat(Ie.scrollMarginTop)||0,right:parseFloat(Ie.scrollMarginRight)||0,bottom:parseFloat(Ie.scrollMarginBottom)||0,left:parseFloat(Ie.scrollMarginLeft)||0}})(V);if((He=>typeof He=="object"&&typeof He.behavior=="function")(h))return h.behavior(M(V,h));const ce=typeof h=="boolean"||h==null?void 0:h.behavior;for(const{el:He,top:Ie,left:we}of M(V,y(h))){const fe=Ie-Se.top+Se.bottom,k=we-Se.left+Se.right;He.scroll({top:fe,left:k,behavior:ce})}}}}]);