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

90 lines
337 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([[7046],{40001:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(71409),J=f(59301),C={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"},j=C,p=f(7657),P=function(y,Ce){return J.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:j}))},T=J.forwardRef(P),ye=T},84105:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(71409),J=f(59301),C={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"},j=C,p=f(7657),P=function(y,Ce){return J.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:j}))},T=J.forwardRef(P),ye=T},73331:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(71409),J=f(59301),C={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"},j=C,p=f(7657),P=function(y,Ce){return J.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:j}))},T=J.forwardRef(P),ye=T},15277:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(71409),J=f(59301),C={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"},j=C,p=f(7657),P=function(y,Ce){return J.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:j}))},T=J.forwardRef(P),ye=T},61485:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(71409),J=f(59301),C={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"},j=C,p=f(7657),P=function(y,Ce){return J.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:j}))},T=J.forwardRef(P),ye=T},47472:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(71409),J=f(59301),C={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"},j=C,p=f(7657),P=function(y,Ce){return J.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:j}))},T=J.forwardRef(P),ye=T},8336:function(){"use strict"},12469:function(){"use strict"},81705:function(nn,xe,f){"use strict";f.d(xe,{t:function(){return N}});var E=f(59301),J=f(3113),C={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},j=f(92310),p=f.n(j),P=Object.defineProperty,T=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,y=(ve,Oe,k)=>Oe in ve?P(ve,Oe,{enumerable:!0,configurable:!0,writable:!0,value:k}):ve[Oe]=k,Ce=(ve,Oe)=>{for(var k in Oe||(Oe={}))ye.call(Oe,k)&&y(ve,k,Oe[k]);if(T)for(var k of T(Oe))te.call(Oe,k)&&y(ve,k,Oe[k]);return ve};const N=({cancelText:ve="\u53D6\u6D88",okText:Oe="\u786E\u5B9A",loading:k=!1,hasOkBtn:Xe=!0,hasCancelBtn:nt=!0,okButtonProps:Ze={},onCancel:tt=()=>{},onOk:_=()=>{},className:Z=""})=>E.createElement("div",{className:p()(C.buttonFixed,Z)},E.createElement("div",{className:C.buttonWrap},nt&&E.createElement(J.ZP,{size:"middle",className:`${C.button} mr20`,onClick:tt},ve),Xe&&E.createElement(J.ZP,Ce({size:"middle",type:"primary",className:`${C.button} mr20`,loading:k,onClick:_},Ze),Oe)))},69720:function(nn,xe,f){"use strict";f.d(xe,{h:function(){return Z}});var E=f(59301),J=f(57809),C=f(78241),j=f(3113),p=f(89780),P=f.n(p),T=f(8336),ye=f(12469),te=Object.defineProperty,y=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,k=(S,c,b)=>c in S?te(S,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):S[c]=b,Xe=(S,c)=>{for(var b in c||(c={}))ve.call(c,b)&&k(S,b,c[b]);if(N)for(var b of N(c))Oe.call(c,b)&&k(S,b,c[b]);return S},nt=(S,c)=>y(S,Ce(c));const Ze=J.default.Option,tt={labelCol:{span:4},wrapperCol:{span:20}},_={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"]};xe.Z=({callback:S,onCancel:c})=>{const[b,I]=(0,E.useState)("python");function F(be){I(_[be][1])}function R(be){S(be)}return E.createElement(C.default,nt(Xe({},tt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:R,style:{width:500}}),E.createElement(C.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},E.createElement(J.default,{getPopupContainer:be=>be.parentNode,onChange:F},Object.keys(_).map(be=>E.createElement(Ze,{key:be,value:be},_[be][0])))),E.createElement(C.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},E.createElement(Z,{mode:b})),E.createElement("div",{className:"flex-container flex-end"},E.createElement(j.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.createElement(j.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function Z({value:S,onChange:c,mode:b,options:I={}}){const F=(0,E.useRef)(),[R,be]=(0,E.useState)();return(0,E.useEffect)(()=>{if(R){let We=function(Ae){const me=Ae.getValue();c&&c(me)};return R.on("change",We),()=>{R.off("change",We)}}},[R,c]),(0,E.useEffect)(()=>{R&&R.setOption("mode",b)},[R,b]),(0,E.useEffect)(()=>{R&&(S!==R.getValue()||S==="")&&setTimeout(()=>{R.setValue(S||"")},300)},[R,S]),(0,E.useEffect)(()=>{if(F.current&&!R){const We=P().fromTextArea(F.current,Xe({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},I));be(We)}},[F.current,R]),E.createElement("div",{className:"my-codemirror-container"},E.createElement("textarea",{ref:F}))}},83283:function(nn,xe,f){"use strict";f.r(xe),f.d(xe,{default:function(){return nt}});var E=f(59301),J=f(25690),C=f(78241),j=f(92832),p=f(69720),P=f(81705),T={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},ye=Object.defineProperty,te=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,N=(Ze,tt,_)=>tt in Ze?ye(Ze,tt,{enumerable:!0,configurable:!0,writable:!0,value:_}):Ze[tt]=_,ve=(Ze,tt)=>{for(var _ in tt||(tt={}))y.call(tt,_)&&N(Ze,_,tt[_]);if(te)for(var _ of te(tt))Ce.call(tt,_)&&N(Ze,_,tt[_]);return Ze},Oe=(Ze,tt)=>{var _={};for(var Z in Ze)y.call(Ze,Z)&&tt.indexOf(Z)<0&&(_[Z]=Ze[Z]);if(Ze!=null&&te)for(var Z of te(Ze))tt.indexOf(Z)<0&&Ce.call(Ze,Z)&&(_[Z]=Ze[Z]);return _},k=(Ze,tt,_)=>new Promise((Z,S)=>{var c=F=>{try{I(_.next(F))}catch(R){S(R)}},b=F=>{try{I(_.throw(F))}catch(R){S(R)}},I=F=>F.done?Z(F.value):Promise.resolve(F.value).then(c,b);I((_=_.apply(Ze,tt)).next())});const Xe=Ze=>{var tt=Ze,{shixunsDetail:_,globalSetting:Z,loading:S,user:c,dispatch:b}=tt,I=Oe(tt,["shixunsDetail","globalSetting","loading","user","dispatch"]);const F=(0,J.useLocation)(),[R,be]=(0,E.useState)({}),We=(0,E.useRef)(),Ae=(0,E.useRef)(),[me]=C.default.useForm(),[ut,ke]=(0,E.useState)("");(0,E.useEffect)(()=>(b({type:"globalSetting/footerToggle",payload:!1}),()=>{b({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,E.useEffect)(()=>{const H=sessionStorage.getItem("pathArray");if(H){const G=H.split(",").join("/"),q=G.indexOf("/")===0?G.substr(1):G;ke(q)}},[]),(0,E.useEffect)(()=>{var H,G,q,ee;Ae.current=(G=(H=F.pathname)==null?void 0:H.split("/"))==null?void 0:G[2],We.current=((ee=(q=F.pathname)==null?void 0:q.split("/"))==null?void 0:ee[3])==="repository"},[]);const Ge=(...H)=>k(void 0,[...H],function*(G={}){if(yield b({type:"shixunsDetail/addRepositoryFile",payload:{id:Ae.current,message:G.commitMessage,content:G.codeMirror,path:`${ut?`${ut}/`:""}${G.path||""}`,secret_repository:We.current?void 0:!0}})){const ee=We.current?`/shixuns/${Ae.current}/repository${ut?`/master/shixun_show/${ut}`:""}`:`/shixuns/${Ae.current}/secret_repository`;J.history.replace(ee)}}),le=()=>{var H,G;J.history.push(`/shixuns/${Ae.current}/${(G=(H=F.pathname)==null?void 0:H.split("/"))==null?void 0:G[3]}${ut?`/master/shixun_show/${ut}`:""}`)};return E.createElement("section",{className:T.bg},E.createElement("div",{className:T.wrap},E.createElement("div",{className:T.title},"\u65B0\u5EFA\u6587\u4EF6"),E.createElement(C.default,{className:"mt10",form:me,scrollToFirstError:!0,layout:"vertical",onFinish:Ge,onValuesChange:()=>be(ve({},me.getFieldsValue()))},E.createElement(C.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},E.createElement(C.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},E.createElement("span",null,E.createElement("span",{className:"mr5"},ut?`${ut}/`:""),E.createElement(j.default,{className:T.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),E.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")),E.createElement(C.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"}]},E.createElement(j.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"})),E.createElement("div",{className:"mt10 mb20"},E.createElement(C.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},E.createElement(p.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"]}}))),E.createElement(C.default.Item,{noStyle:!0},E.createElement(P.t,{okButtonProps:{htmlType:"submit"},onCancel:le})))))};var nt=(0,J.connect)(({shixunsDetail:Ze,loading:tt,globalSetting:_,user:Z})=>({shixunsDetail:Ze,globalSetting:_,user:Z,loading:tt.models.index}))(Xe)},19080:function(nn,xe,f){"use strict";f.d(xe,{F:function(){return p},Z:function(){return j}});var E=f(92310),J=f.n(E);const C=null;function j(P,T,ye){return J()({[`${P}-status-success`]:T==="success",[`${P}-status-warning`]:T==="warning",[`${P}-status-error`]:T==="error",[`${P}-status-validating`]:T==="validating",[`${P}-has-feedback`]:ye})}const p=(P,T)=>T||P},93891:function(nn,xe,f){"use strict";var E=f(59301),J=f(36355),C=f(64165);const j=p=>{const{componentName:P}=p,{getPrefixCls:T}=(0,E.useContext)(J.E_),ye=T("empty");switch(P){case"Table":case"List":return E.createElement(C.Z,{image:C.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return E.createElement(C.Z,{image:C.Z.PRESENTED_IMAGE_SIMPLE,className:`${ye}-small`});default:return E.createElement(C.Z,null)}};xe.Z=j},64165:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return _}});var E=f(92310),J=f.n(E),C=f(59301),j=f(36355),p=f(9763),P=f(64993),T=f(88088),te=()=>{const[,Z]=(0,T.Z)(),c=new P.C(Z.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return C.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},C.createElement("g",{fill:"none",fillRule:"evenodd"},C.createElement("g",{transform:"translate(24 31.67)"},C.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),C.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"}),C.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)"}),C.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"}),C.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"})),C.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"}),C.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},C.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),C.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ce=()=>{const[,Z]=(0,T.Z)(),{colorFill:S,colorFillTertiary:c,colorFillQuaternary:b,colorBgContainer:I}=Z,{borderColor:F,shadowColor:R,contentColor:be}=(0,C.useMemo)(()=>({borderColor:new P.C(S).onBackground(I).toHexShortString(),shadowColor:new P.C(c).onBackground(I).toHexShortString(),contentColor:new P.C(b).onBackground(I).toHexShortString()}),[S,c,b,I]);return C.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},C.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},C.createElement("ellipse",{fill:R,cx:"32",cy:"33",rx:"32",ry:"7"}),C.createElement("g",{fillRule:"nonzero",stroke:F},C.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"}),C.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:be}))))},N=f(83116),ve=f(37613);const Oe=Z=>{const{componentCls:S,margin:c,marginXS:b,marginXL:I,fontSize:F,lineHeight:R}=Z;return{[S]:{marginInline:b,fontSize:F,lineHeight:R,textAlign:"center",[`${S}-image`]:{height:Z.emptyImgHeight,marginBottom:b,opacity:Z.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${S}-description`]:{color:Z.colorText},[`${S}-footer`]:{marginTop:c},"&-normal":{marginBlock:I,color:Z.colorTextDisabled,[`${S}-description`]:{color:Z.colorTextDisabled},[`${S}-image`]:{height:Z.emptyImgHeightMD}},"&-small":{marginBlock:b,color:Z.colorTextDisabled,[`${S}-image`]:{height:Z.emptyImgHeightSM}}}}};var k=(0,N.Z)("Empty",Z=>{const{componentCls:S,controlHeightLG:c}=Z,b=(0,ve.TS)(Z,{emptyImgCls:`${S}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Oe(b)]}),Xe=function(Z,S){var c={};for(var b in Z)Object.prototype.hasOwnProperty.call(Z,b)&&S.indexOf(b)<0&&(c[b]=Z[b]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,b=Object.getOwnPropertySymbols(Z);I<b.length;I++)S.indexOf(b[I])<0&&Object.prototype.propertyIsEnumerable.call(Z,b[I])&&(c[b[I]]=Z[b[I]]);return c};const nt=C.createElement(te,null),Ze=C.createElement(Ce,null),tt=Z=>{var{className:S,rootClassName:c,prefixCls:b,image:I=nt,description:F,children:R,imageStyle:be,style:We}=Z,Ae=Xe(Z,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:me,direction:ut,empty:ke}=C.useContext(j.E_),Ge=me("empty",b),[le,H]=k(Ge),[G]=(0,p.Z)("Empty"),q=typeof F!="undefined"?F:G==null?void 0:G.description,ee=typeof q=="string"?q:"empty";let Ve=null;return typeof I=="string"?Ve=C.createElement("img",{alt:ee,src:I}):Ve=I,le(C.createElement("div",Object.assign({className:J()(H,Ge,ke==null?void 0:ke.className,{[`${Ge}-normal`]:I===Ze,[`${Ge}-rtl`]:ut==="rtl"},S,c),style:Object.assign(Object.assign({},ke==null?void 0:ke.style),We)},Ae),C.createElement("div",{className:`${Ge}-image`,style:be},Ve),q&&C.createElement("div",{className:`${Ge}-description`},q),R&&C.createElement("div",{className:`${Ge}-footer`},R)))};tt.PRESENTED_IMAGE_DEFAULT=nt,tt.PRESENTED_IMAGE_SIMPLE=Ze;var _=tt},78241:function(nn,xe,f){"use strict";f.d(xe,{default:function(){return Mt}});var E=f(62730),J=f(92310),C=f.n(J),j=f(77900),p=f(59301),P=f(62892),T=f(32441);function ye(g){const[D,W]=p.useState(g);return p.useEffect(()=>{const d=setTimeout(()=>{W(g)},g.length?0:10);return()=>{clearTimeout(d)}},[g]),D}var te=f(17313),y=f(29878),Ce=f(8378),N=f(37613),ve=f(83116),k=g=>{const{componentCls:D}=g,W=`${D}-show-help`,d=`${D}-show-help-item`;return{[W]:{transition:`opacity ${g.motionDurationSlow} ${g.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[d]:{overflow:"hidden",transition:`height ${g.motionDurationSlow} ${g.motionEaseInOut},
opacity ${g.motionDurationSlow} ${g.motionEaseInOut},
transform ${g.motionDurationSlow} ${g.motionEaseInOut} !important`,[`&${d}-appear, &${d}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${d}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Xe=g=>({legend:{display:"block",width:"100%",marginBottom:g.marginLG,padding:0,color:g.colorTextDescription,fontSize:g.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${g.lineWidth}px ${g.lineType} ${g.colorBorder}`},label:{fontSize:g.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${g.controlOutlineWidth}px ${g.controlOutline}`},output:{display:"block",paddingTop:15,color:g.colorText,fontSize:g.fontSize,lineHeight:g.lineHeight}}),nt=(g,D)=>{const{formItemCls:W}=g;return{[W]:{[`${W}-label > label`]:{height:D},[`${W}-control-input`]:{minHeight:D}}}},Ze=g=>{const{componentCls:D}=g;return{[g.componentCls]:Object.assign(Object.assign(Object.assign({},(0,te.Wf)(g)),Xe(g)),{[`${D}-text`]:{display:"inline-block",paddingInlineEnd:g.paddingSM},"&-small":Object.assign({},nt(g,g.controlHeightSM)),"&-large":Object.assign({},nt(g,g.controlHeightLG))})}},tt=g=>{const{formItemCls:D,iconCls:W,componentCls:d,rootPrefixCls:h,labelRequiredMarkColor:x,labelColor:L,labelFontSize:Q,labelHeight:B,labelColonMarginInlineStart:$,labelColonMarginInlineEnd:se,itemMarginBottom:ie}=g;return{[D]:Object.assign(Object.assign({},(0,te.Wf)(g)),{marginBottom:ie,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${h}-row`]:{display:"none"},"&-has-warning":{[`${D}-split`]:{color:g.colorError}},"&-has-error":{[`${D}-split`]:{color:g.colorWarning}},[`${D}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${g.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:B,color:L,fontSize:Q,[`> ${W}`]:{fontSize:g.fontSize,verticalAlign:"top"},[`&${D}-required:not(${D}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:g.marginXXS,color:x,fontSize:g.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${d}-hide-required-mark &`]:{display:"none"}},[`${D}-optional`]:{display:"inline-block",marginInlineStart:g.marginXXS,color:g.colorTextDescription,[`${d}-hide-required-mark &`]:{display:"none"}},[`${D}-tooltip`]:{color:g.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:g.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:$,marginInlineEnd:se},[`&${D}-no-colon::after`]:{content:'"\\a0"'}}},[`${D}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${h}-col-'"]):not([class*="' ${h}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:g.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[D]:{"&-explain, &-extra":{clear:"both",color:g.colorTextDescription,fontSize:g.fontSize,lineHeight:g.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:g.controlHeightSM,transition:`color ${g.motionDurationMid} ${g.motionEaseOut}`},"&-explain":{"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning}}},[`&-with-help ${D}-explain`]:{height:"auto",opacity:1},[`${D}-feedback-icon`]:{fontSize:g.fontSize,textAlign:"center",visibility:"visible",animationName:y.kr,animationDuration:g.motionDurationMid,animationTimingFunction:g.motionEaseOutBack,pointerEvents:"none","&-success":{color:g.colorSuccess},"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning},"&-validating":{color:g.colorPrimary}}})}},_=g=>{const{componentCls:D,formItemCls:W}=g;return{[`${D}-horizontal`]:{[`${W}-label`]:{flexGrow:0},[`${W}-control`]:{flex:"1 1 0",minWidth:0},[`${W}-label[class$='-24'], ${W}-label[class*='-24 ']`]:{[`& + ${W}-control`]:{minWidth:"unset"}}}}},Z=g=>{const{componentCls:D,formItemCls:W}=g;return{[`${D}-inline`]:{display:"flex",flexWrap:"wrap",[W]:{flex:"none",marginInlineEnd:g.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${W}-label,
> ${W}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${W}-label`]:{flex:"none"},[`${D}-text`]:{display:"inline-block"},[`${W}-has-feedback`]:{display:"inline-block"}}}}},S=g=>({padding:g.verticalLabelPadding,margin:g.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=g=>{const{componentCls:D,formItemCls:W,rootPrefixCls:d}=g;return{[`${W} ${W}-label`]:S(g),[D]:{[W]:{flexWrap:"wrap",[`${W}-label, ${W}-control`]:{[`&:not([class*=" ${d}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},b=g=>{const{componentCls:D,formItemCls:W,rootPrefixCls:d}=g;return{[`${D}-vertical`]:{[W]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${D}-item-control`]:{width:"100%"}}},[`${D}-vertical ${W}-label,
.${d}-col-24${W}-label,
.${d}-col-xl-24${W}-label`]:S(g),[`@media (max-width: ${g.screenXSMax}px)`]:[c(g),{[D]:{[`.${d}-col-xs-24${W}-label`]:S(g)}}],[`@media (max-width: ${g.screenSMMax}px)`]:{[D]:{[`.${d}-col-sm-24${W}-label`]:S(g)}},[`@media (max-width: ${g.screenMDMax}px)`]:{[D]:{[`.${d}-col-md-24${W}-label`]:S(g)}},[`@media (max-width: ${g.screenLGMax}px)`]:{[D]:{[`.${d}-col-lg-24${W}-label`]:S(g)}}}},I=(g,D)=>(0,N.TS)(g,{formItemCls:`${g.componentCls}-item`,rootPrefixCls:D});var F=(0,ve.Z)("Form",(g,D)=>{let{rootPrefixCls:W}=D;const d=I(g,W);return[Ze(d),tt(d),k(d),_(d),Z(d),b(d),(0,Ce.Z)(d),y.kr]},g=>({labelRequiredMarkColor:g.colorError,labelColor:g.colorTextHeading,labelFontSize:g.fontSize,labelHeight:g.controlHeight,labelColonMarginInlineStart:g.marginXXS/2,labelColonMarginInlineEnd:g.marginXS,itemMarginBottom:g.marginLG,verticalLabelPadding:`0 0 ${g.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const R=[];function be(g,D,W){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof g=="string"?g:`${D}-${d}`,error:g,errorStatus:W}}var Ae=g=>{let{help:D,helpStatus:W,errors:d=R,warnings:h=R,className:x,fieldId:L,onVisibleChanged:Q}=g;const{prefixCls:B}=p.useContext(T.Rk),$=`${B}-item-explain`,[,se]=F(B),ie=(0,p.useMemo)(()=>(0,P.Z)(B),[B]),Fe=ye(d),M=ye(h),K=p.useMemo(()=>D!=null?[be(D,"help",W)]:[].concat((0,E.Z)(Fe.map((pe,Be)=>be(pe,"error","error",Be))),(0,E.Z)(M.map((pe,Be)=>be(pe,"warning","warning",Be)))),[D,W,Fe,M]),Ke={};return L&&(Ke.id=`${L}_help`),p.createElement(j.default,{motionDeadline:ie.motionDeadline,motionName:`${B}-show-help`,visible:!!K.length,onVisibleChanged:Q},pe=>{const{className:Be,style:Te}=pe;return p.createElement("div",Object.assign({},Ke,{className:C()($,Be,x,se),style:Te,role:"alert"}),p.createElement(j.CSSMotionList,Object.assign({keys:K},(0,P.Z)(B),{motionName:`${B}-show-help-item`,component:!1}),ft=>{const{key:Y,error:ae,errorStatus:De,className:it,style:_e}=ft;return p.createElement("div",{key:Y,className:C()(it,{[`${$}-${De}`]:De}),style:_e},ae)}))})},me=f(95013),ut=f(36355),ke=f(1684),Ge=f(52946),le=f(19716),H=f(16722);const G=["parentNode"],q="form_item";function ee(g){return g===void 0||g===!1?[]:Array.isArray(g)?g:[g]}function Ve(g,D){if(!g.length)return;const W=g.join("_");return D?`${D}_${W}`:G.includes(W)?`${q}_${W}`:W}function ze(g,D,W,d,h,x){let L=d;return x!==void 0?L=x:W.validating?L="validating":g.length?L="error":D.length?L="warning":(W.touched||h&&W.validated)&&(L="success"),L}function ue(g){return ee(g).join("_")}function Re(g){const[D]=(0,me.useForm)(),W=p.useRef({}),d=p.useMemo(()=>g!=null?g:Object.assign(Object.assign({},D),{__INTERNAL__:{itemRef:h=>x=>{const L=ue(h);x?W.current[L]=x:delete W.current[L]}},scrollToField:function(h){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const L=ee(h),Q=Ve(L,d.__INTERNAL__.name),B=Q?document.getElementById(Q):null;B&&(0,H.Z)(B,Object.assign({scrollMode:"if-needed",block:"nearest"},x))},getFieldInstance:h=>{const x=ue(h);return W.current[x]}}),[g,D]);return[d]}var fe=f(28726),bt=function(g,D){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&D.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)D.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W};const Dt=(g,D)=>{const W=p.useContext(ke.Z),{getPrefixCls:d,direction:h,form:x}=p.useContext(ut.E_),{prefixCls:L,className:Q,rootClassName:B,size:$,disabled:se=W,form:ie,colon:Fe,labelAlign:M,labelWrap:K,labelCol:Ke,wrapperCol:pe,hideRequiredMark:Be,layout:Te="horizontal",scrollToFirstError:ft,requiredMark:Y,onFinishFailed:ae,name:De,style:it,feedbackIcons:_e}=g,lt=bt(g,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),_t=(0,le.Z)($),Rt=p.useContext(fe.Z),$t=(0,p.useMemo)(()=>Y!==void 0?Y:x&&x.requiredMark!==void 0?x.requiredMark:!Be,[Be,Y,x]),zt=Fe!=null?Fe:x==null?void 0:x.colon,wt=d("form",L),[qt,Ut]=F(wt),jt=C()(wt,`${wt}-${Te}`,{[`${wt}-hide-required-mark`]:$t===!1,[`${wt}-rtl`]:h==="rtl",[`${wt}-${_t}`]:_t},Ut,x==null?void 0:x.className,Q,B),[kt]=Re(ie),{__INTERNAL__:Lt}=kt;Lt.name=De;const xt=(0,p.useMemo)(()=>({name:De,labelAlign:M,labelCol:Ke,labelWrap:K,wrapperCol:pe,vertical:Te==="vertical",colon:zt,requiredMark:$t,itemRef:Lt.itemRef,form:kt,feedbackIcons:_e}),[De,M,Ke,pe,Te,zt,$t,kt,_e]);p.useImperativeHandle(D,()=>kt);const Wt=(fn,Nt)=>{if(fn){let Ht={block:"nearest"};typeof fn=="object"&&(Ht=fn),kt.scrollToField(Nt,Ht)}},Et=fn=>{if(ae==null||ae(fn),fn.errorFields.length){const Nt=fn.errorFields[0].name;if(ft!==void 0){Wt(ft,Nt);return}x&&x.scrollToFirstError!==void 0&&Wt(x.scrollToFirstError,Nt)}};return qt(p.createElement(ke.n,{disabled:se},p.createElement(Ge.q,{size:_t},p.createElement(T.RV,Object.assign({},{validateMessages:Rt}),p.createElement(T.q3.Provider,{value:xt},p.createElement(me.default,Object.assign({id:De},lt,{name:De,onFinishFailed:Et,form:kt,style:Object.assign(Object.assign({},x==null?void 0:x.style),it),className:jt})))))))};var et=p.forwardRef(Dt),Ot=f(41799),at=f(8654),A=f(92343),we=f(11592);function oe(g){if(typeof g=="function")return g;const D=(0,we.Z)(g);return D.length<=1?D[0]:D}const V=()=>{const{status:g,errors:D=[],warnings:W=[]}=(0,p.useContext)(T.aM);return{status:g,errors:D,warnings:W}};V.Context=T.aM;var re=V,de=f(16089);function Se(g){const[D,W]=p.useState(g),d=(0,p.useRef)(null),h=(0,p.useRef)([]),x=(0,p.useRef)(!1);p.useEffect(()=>(x.current=!1,()=>{x.current=!0,de.Z.cancel(d.current),d.current=null}),[]);function L(Q){x.current||(d.current===null&&(h.current=[],d.current=(0,de.Z)(()=>{d.current=null,W(B=>{let $=B;return h.current.forEach(se=>{$=se($)}),$})})),h.current.push(Q))}return[D,L]}function he(){const{itemRef:g}=p.useContext(T.q3),D=p.useRef({});function W(d,h){const x=h&&typeof h=="object"&&h.ref,L=d.join("_");return(D.current.name!==L||D.current.originRef!==x)&&(D.current.name=L,D.current.originRef=x,D.current.ref=(0,at.sQ)(g(d),x)),D.current.ref}return W}var Le=f(29194),ne=f(34280),Ye=f(2738),ce=f(27382),Ie=f(37028);const Me=g=>{const{formItemCls:D}=g;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${D}-control`]:{display:"flex"}}}};var Ee=(0,ve.b)(["Form","item-item"],(g,D)=>{let{rootPrefixCls:W}=D;const d=I(g,W);return[Me(d)]}),U=g=>{const{prefixCls:D,status:W,wrapperCol:d,children:h,errors:x,warnings:L,_internalItemRender:Q,extra:B,help:$,fieldId:se,marginBottom:ie,onErrorVisibleChanged:Fe}=g,M=`${D}-item`,K=p.useContext(T.q3),Ke=d||K.wrapperCol||{},pe=C()(`${M}-control`,Ke.className),Be=p.useMemo(()=>Object.assign({},K),[K]);delete Be.labelCol,delete Be.wrapperCol;const Te=p.createElement("div",{className:`${M}-control-input`},p.createElement("div",{className:`${M}-control-input-content`},h)),ft=p.useMemo(()=>({prefixCls:D,status:W}),[D,W]),Y=ie!==null||x.length||L.length?p.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},p.createElement(T.Rk.Provider,{value:ft},p.createElement(Ae,{fieldId:se,errors:x,warnings:L,help:$,helpStatus:W,className:`${M}-explain-connected`,onVisibleChanged:Fe})),!!ie&&p.createElement("div",{style:{width:0,height:ie}})):null,ae={};se&&(ae.id=`${se}_extra`);const De=B?p.createElement("div",Object.assign({},ae,{className:`${M}-extra`}),B):null,it=Q&&Q.mark==="pro_table_render"&&Q.render?Q.render(g,{input:Te,errorList:Y,extra:De}):p.createElement(p.Fragment,null,Te,Y,De);return p.createElement(T.q3.Provider,{value:Be},p.createElement(Ie.Z,Object.assign({},Ke,{className:pe}),it),p.createElement(Ee,{prefixCls:D}))},rt=f(61485),He=f(31724),ct=f(9763),vt=f(6848),rn=function(g,D){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&D.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)D.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W};function Zt(g){return g?typeof g=="object"&&!p.isValidElement(g)?g:{title:g}:null}var Pt=g=>{let{prefixCls:D,label:W,htmlFor:d,labelCol:h,labelAlign:x,colon:L,required:Q,requiredMark:B,tooltip:$}=g;var se;const[ie]=(0,ct.Z)("Form"),{vertical:Fe,labelAlign:M,labelCol:K,labelWrap:Ke,colon:pe}=p.useContext(T.q3);if(!W)return null;const Be=h||K||{},Te=x||M,ft=`${D}-item-label`,Y=C()(ft,Te==="left"&&`${ft}-left`,Be.className,{[`${ft}-wrap`]:!!Ke});let ae=W;const De=L===!0||pe!==!1&&L!==!1;De&&!Fe&&typeof W=="string"&&W.trim()!==""&&(ae=W.replace(/[:|]\s*$/,""));const _e=Zt($);if(_e){const{icon:$t=p.createElement(rt.Z,null)}=_e,zt=rn(_e,["icon"]),wt=p.createElement(vt.Z,Object.assign({},zt),p.cloneElement($t,{className:`${D}-item-tooltip`,title:""}));ae=p.createElement(p.Fragment,null,ae,wt)}const lt=B==="optional",_t=typeof B=="function";_t?ae=B(ae,{required:!!Q}):lt&&!Q&&(ae=p.createElement(p.Fragment,null,ae,p.createElement("span",{className:`${D}-item-optional`,title:""},(ie==null?void 0:ie.optional)||((se=He.Z.Form)===null||se===void 0?void 0:se.optional))));const Rt=C()({[`${D}-item-required`]:Q,[`${D}-item-required-mark-optional`]:lt||_t,[`${D}-item-no-colon`]:!De});return p.createElement(Ie.Z,Object.assign({},Be,{className:Y}),p.createElement("label",{htmlFor:d,className:Rt,title:typeof W=="string"?W:""},ae))},Xt=f(29679),Yt=f(19248),sn=f(96512),Cn=f(58617);const un={success:Xt.Z,warning:sn.Z,error:Yt.Z,validating:Cn.Z};function zn(g){let{children:D,errors:W,warnings:d,hasFeedback:h,validateStatus:x,prefixCls:L,meta:Q,noStyle:B}=g;const $=`${L}-item`,{feedbackIcons:se}=p.useContext(T.q3),ie=ze(W,d,Q,null,!!h,x),{isFormItemInput:Fe,status:M}=p.useContext(T.aM),K=p.useMemo(()=>{var Ke;let pe;if(h){const ft=h!==!0&&h.icons||se,Y=ie&&((Ke=ft==null?void 0:ft({status:ie,errors:W,warnings:d}))===null||Ke===void 0?void 0:Ke[ie]),ae=ie&&un[ie];pe=Y!==!1&&ae?p.createElement("span",{className:C()(`${$}-feedback-icon`,`${$}-feedback-icon-${ie}`)},Y||p.createElement(ae,null)):null}let Be=!0,Te=ie||"";return B&&(Be=Fe,Te=(ie!=null?ie:M)||""),{status:Te,errors:W,warnings:d,hasFeedback:!!h,feedbackIcon:pe,isFormItemInput:Be}},[ie,h,B,Fe,M]);return p.createElement(T.aM.Provider,{value:K},D)}var Wn=function(g,D){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&D.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)D.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W};function pn(g){const{prefixCls:D,className:W,rootClassName:d,style:h,help:x,errors:L,warnings:Q,validateStatus:B,meta:$,hasFeedback:se,hidden:ie,children:Fe,fieldId:M,required:K,isRequired:Ke,onSubItemMetaChange:pe}=g,Be=Wn(g,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Te=`${D}-item`,{requiredMark:ft}=p.useContext(T.q3),Y=p.useRef(null),ae=ye(L),De=ye(Q),it=x!=null,_e=!!(it||L.length||Q.length),lt=!!Y.current&&(0,Le.Z)(Y.current),[_t,Rt]=p.useState(null);(0,ne.Z)(()=>{if(_e&&Y.current){const Ut=getComputedStyle(Y.current);Rt(parseInt(Ut.marginBottom,10))}},[_e,lt]);const $t=Ut=>{Ut||Rt(null)},wt=function(){let Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const jt=Ut?ae:$.errors,kt=Ut?De:$.warnings;return ze(jt,kt,$,"",!!se,B)}(),qt=C()(Te,W,d,{[`${Te}-with-help`]:it||ae.length||De.length,[`${Te}-has-feedback`]:wt&&se,[`${Te}-has-success`]:wt==="success",[`${Te}-has-warning`]:wt==="warning",[`${Te}-has-error`]:wt==="error",[`${Te}-is-validating`]:wt==="validating",[`${Te}-hidden`]:ie});return p.createElement("div",{className:qt,style:h,ref:Y},p.createElement(ce.Z,Object.assign({className:`${Te}-row`},(0,Ye.Z)(Be,["_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"])),p.createElement(Pt,Object.assign({htmlFor:M},g,{requiredMark:ft,required:K!=null?K:Ke,prefixCls:D})),p.createElement(U,Object.assign({},g,$,{errors:ae,warnings:De,prefixCls:D,status:wt,help:x,marginBottom:_t,onErrorVisibleChanged:$t}),p.createElement(T.qI.Provider,{value:pe},p.createElement(zn,{prefixCls:D,meta:$,errors:$.errors,warnings:$.warnings,hasFeedback:se,validateStatus:wt},Fe)))),!!_t&&p.createElement("div",{className:`${Te}-margin-offset`,style:{marginBottom:-_t}}))}const Ln="__SPLIT__",wn=null,In=p.memo(g=>{let{children:D}=g;return D},(g,D)=>g.value===D.value&&g.update===D.update&&g.childProps.length===D.childProps.length&&g.childProps.every((W,d)=>W===D.childProps[d]));function xn(g){return g!=null}function dn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Nn(g){const{name:D,noStyle:W,className:d,dependencies:h,prefixCls:x,shouldUpdate:L,rules:Q,children:B,required:$,label:se,messageVariables:ie,trigger:Fe="onChange",validateTrigger:M,hidden:K,help:Ke}=g,{getPrefixCls:pe}=p.useContext(ut.E_),{name:Be}=p.useContext(T.q3),Te=oe(B),ft=typeof Te=="function",Y=p.useContext(T.qI),{validateTrigger:ae}=p.useContext(me.FieldContext),De=M!==void 0?M:ae,it=xn(D),_e=pe("form",x),[lt,_t]=F(_e),Rt=p.useContext(me.ListContext),$t=p.useRef(),[zt,wt]=Se({}),[qt,Ut]=(0,Ot.Z)(()=>dn()),jt=Nt=>{const Ht=Rt==null?void 0:Rt.getKey(Nt.name);if(Ut(Nt.destroy?dn():Nt,!0),W&&Ke!==!1&&Y){let an=Nt.name;if(Nt.destroy)an=$t.current||an;else if(Ht!==void 0){const[Gt,En]=Ht;an=[Gt].concat((0,E.Z)(En)),$t.current=an}Y(Nt,an)}},kt=(Nt,Ht)=>{wt(an=>{const Gt=Object.assign({},an),jn=[].concat((0,E.Z)(Nt.name.slice(0,-1)),(0,E.Z)(Ht)).join(Ln);return Nt.destroy?delete Gt[jn]:Gt[jn]=Nt,Gt})},[Lt,xt]=p.useMemo(()=>{const Nt=(0,E.Z)(qt.errors),Ht=(0,E.Z)(qt.warnings);return Object.values(zt).forEach(an=>{Nt.push.apply(Nt,(0,E.Z)(an.errors||[])),Ht.push.apply(Ht,(0,E.Z)(an.warnings||[]))}),[Nt,Ht]},[zt,qt.errors,qt.warnings]),Wt=he();function Et(Nt,Ht,an){return W&&!K?p.createElement(zn,{prefixCls:_e,hasFeedback:g.hasFeedback,validateStatus:g.validateStatus,meta:qt,errors:Lt,warnings:xt,noStyle:!0},Nt):p.createElement(pn,Object.assign({key:"row"},g,{className:C()(d,_t),prefixCls:_e,fieldId:Ht,isRequired:an,errors:Lt,warnings:xt,meta:qt,onSubItemMetaChange:kt}),Nt)}if(!it&&!ft&&!h)return lt(Et(Te));let fn={};return typeof se=="string"?fn.label=se:D&&(fn.label=String(D)),ie&&(fn=Object.assign(Object.assign({},fn),ie)),lt(p.createElement(me.Field,Object.assign({},g,{messageVariables:fn,trigger:Fe,validateTrigger:De,onMetaChange:jt}),(Nt,Ht,an)=>{const Gt=ee(D).length&&Ht?Ht.name:[],En=Ve(Gt,Be),jn=$!==void 0?$:!!(Q&&Q.some(dt=>{if(dt&&typeof dt=="object"&&dt.required&&!dt.warningOnly)return!0;if(typeof dt=="function"){const en=dt(an);return en&&en.required&&!en.warningOnly}return!1})),It=Object.assign({},Nt);let st=null;if(Array.isArray(Te)&&it)st=Te;else if(!(ft&&(!(L||h)||it))){if(!(h&&!ft&&!it))if((0,A.l$)(Te)){const dt=Object.assign(Object.assign({},Te.props),It);if(dt.id||(dt.id=En),Ke||Lt.length>0||xt.length>0||g.extra){const Vt=[];(Ke||Lt.length>0)&&Vt.push(`${En}_help`),g.extra&&Vt.push(`${En}_extra`),dt["aria-describedby"]=Vt.join(" ")}Lt.length>0&&(dt["aria-invalid"]="true"),jn&&(dt["aria-required"]="true"),(0,at.Yr)(Te)&&(dt.ref=Wt(Gt,Te)),new Set([].concat((0,E.Z)(ee(Fe)),(0,E.Z)(ee(De)))).forEach(Vt=>{dt[Vt]=function(){for(var At,ln,gn,mn,Tn,Ue=arguments.length,$e=new Array(Ue),gt=0;gt<Ue;gt++)$e[gt]=arguments[gt];(gn=It[Vt])===null||gn===void 0||(At=gn).call.apply(At,[It].concat($e)),(Tn=(mn=Te.props)[Vt])===null||Tn===void 0||(ln=Tn).call.apply(ln,[mn].concat($e))}});const tn=[dt["aria-required"],dt["aria-invalid"],dt["aria-describedby"]];st=p.createElement(In,{value:It[g.valuePropName||"value"],update:Te,childProps:tn},(0,A.Tm)(Te,dt))}else ft&&(L||h)&&!it?st=Te(an):st=Te}return Et(st,En,jn)}))}const Qt=Nn;Qt.useStatus=re;var An=Qt,Hn=function(g,D){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&D.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)D.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W},pr=g=>{var{prefixCls:D,children:W}=g,d=Hn(g,["prefixCls","children"]);const{getPrefixCls:h}=p.useContext(ut.E_),x=h("form",D),L=p.useMemo(()=>({prefixCls:x,status:"error"}),[x]);return p.createElement(me.List,Object.assign({},d),(Q,B,$)=>p.createElement(T.Rk.Provider,{value:L},W(Q.map(se=>Object.assign(Object.assign({},se),{fieldKey:se.key})),B,{errors:$.errors,warnings:$.warnings})))};function on(){const{form:g}=(0,p.useContext)(T.q3);return g}const Qe=et;Qe.Item=An,Qe.List=pr,Qe.ErrorList=Ae,Qe.useForm=Re,Qe.useFormInstance=on,Qe.useWatch=me.useWatch,Qe.Provider=T.RV,Qe.create=()=>{};var Mt=Qe},9432:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return tt},n:function(){return nt}});var E=f(19248),J=f(92310),C=f.n(J),j=f(93681),p=f(8654),P=f(59301),T=f(19080),ye=f(36355),te=f(1684),y=f(19716),Ce=f(32441),N=f(33234),ve=f(59412),Oe=f(9937);function k(_){return!!(_.prefix||_.suffix||_.allowClear)}var Xe=function(_,Z){var S={};for(var c in _)Object.prototype.hasOwnProperty.call(_,c)&&Z.indexOf(c)<0&&(S[c]=_[c]);if(_!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,c=Object.getOwnPropertySymbols(_);b<c.length;b++)Z.indexOf(c[b])<0&&Object.prototype.propertyIsEnumerable.call(_,c[b])&&(S[c[b]]=_[c[b]]);return S};function nt(_,Z){if(!_)return;_.focus(Z);const{cursor:S}=Z||{};if(S){const c=_.value.length;switch(S){case"start":_.setSelectionRange(0,0);break;case"end":_.setSelectionRange(c,c);break;default:_.setSelectionRange(0,c);break}}}var tt=(0,P.forwardRef)((_,Z)=>{var S;const{prefixCls:c,bordered:b=!0,status:I,size:F,disabled:R,onBlur:be,onFocus:We,suffix:Ae,allowClear:me,addonAfter:ut,addonBefore:ke,className:Ge,style:le,styles:H,rootClassName:G,onChange:q,classNames:ee}=_,Ve=Xe(_,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:ze,direction:ue,input:Re}=P.useContext(ye.E_),fe=ze("input",c),bt=(0,P.useRef)(null),[Dt,St]=(0,Oe.ZP)(fe),{compactSize:et,compactItemClassnames:Ot}=(0,N.ri)(fe,ue),at=(0,y.Z)(Ee=>{var Je;return(Je=F!=null?F:et)!==null&&Je!==void 0?Je:Ee}),A=P.useContext(te.Z),we=R!=null?R:A,{status:oe,hasFeedback:V,feedbackIcon:re}=(0,P.useContext)(Ce.aM),de=(0,T.F)(oe,I),Se=k(_)||!!V,he=(0,P.useRef)(Se);(0,P.useEffect)(()=>{var Ee;Se&&he.current,he.current=Se},[Se]);const Le=(0,ve.Z)(bt,!0),ne=Ee=>{Le(),be==null||be(Ee)},Ye=Ee=>{Le(),We==null||We(Ee)},ce=Ee=>{Le(),q==null||q(Ee)},Ie=(V||Ae)&&P.createElement(P.Fragment,null,Ae,V&&re);let Me;return typeof me=="object"&&(me!=null&&me.clearIcon)?Me=me:me&&(Me={clearIcon:P.createElement(E.Z,null)}),Dt(P.createElement(j.default,Object.assign({ref:(0,p.sQ)(Z,bt),prefixCls:fe,autoComplete:Re==null?void 0:Re.autoComplete},Ve,{disabled:we,onBlur:ne,onFocus:Ye,style:Object.assign(Object.assign({},Re==null?void 0:Re.style),le),styles:Object.assign(Object.assign({},Re==null?void 0:Re.styles),H),suffix:Ie,allowClear:Me,className:C()(Ge,G,Ot,Re==null?void 0:Re.className),onChange:ce,addonAfter:ut&&P.createElement(N.BR,null,P.createElement(Ce.Ux,{override:!0,status:!0},ut)),addonBefore:ke&&P.createElement(N.BR,null,P.createElement(Ce.Ux,{override:!0,status:!0},ke)),classNames:Object.assign(Object.assign(Object.assign({},ee),Re==null?void 0:Re.classNames),{input:C()({[`${fe}-sm`]:at==="small",[`${fe}-lg`]:at==="large",[`${fe}-rtl`]:ue==="rtl",[`${fe}-borderless`]:!b},!Se&&(0,T.Z)(fe,de),ee==null?void 0:ee.input,(S=Re==null?void 0:Re.classNames)===null||S===void 0?void 0:S.input,St)}),classes:{affixWrapper:C()({[`${fe}-affix-wrapper-sm`]:at==="small",[`${fe}-affix-wrapper-lg`]:at==="large",[`${fe}-affix-wrapper-rtl`]:ue==="rtl",[`${fe}-affix-wrapper-borderless`]:!b},(0,T.Z)(`${fe}-affix-wrapper`,de,V),St),wrapper:C()({[`${fe}-group-rtl`]:ue==="rtl"},St),group:C()({[`${fe}-group-wrapper-sm`]:at==="small",[`${fe}-group-wrapper-lg`]:at==="large",[`${fe}-group-wrapper-rtl`]:ue==="rtl",[`${fe}-group-wrapper-disabled`]:we},(0,T.Z)(`${fe}-group-wrapper`,de,V),St)}})))})},1643:function(nn,xe,f){"use strict";var E=f(19248),J=f(92310),C=f.n(J),j=f(9296),p=f(59301),P=f(19080),T=f(36355),ye=f(1684),te=f(19716),y=f(32441),Ce=f(9432),N=f(9937),ve=function(k,Xe){var nt={};for(var Ze in k)Object.prototype.hasOwnProperty.call(k,Ze)&&Xe.indexOf(Ze)<0&&(nt[Ze]=k[Ze]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,Ze=Object.getOwnPropertySymbols(k);tt<Ze.length;tt++)Xe.indexOf(Ze[tt])<0&&Object.prototype.propertyIsEnumerable.call(k,Ze[tt])&&(nt[Ze[tt]]=k[Ze[tt]]);return nt};const Oe=(0,p.forwardRef)((k,Xe)=>{const{prefixCls:nt,bordered:Ze=!0,size:tt,disabled:_,status:Z,allowClear:S,showCount:c,classNames:b,rootClassName:I,className:F}=k,R=ve(k,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:be,direction:We}=p.useContext(T.E_),Ae=(0,te.Z)(tt),me=p.useContext(ye.Z),ut=_!=null?_:me,{status:ke,hasFeedback:Ge,feedbackIcon:le}=p.useContext(y.aM),H=(0,P.F)(ke,Z),G=p.useRef(null);p.useImperativeHandle(Xe,()=>{var ue;return{resizableTextArea:(ue=G.current)===null||ue===void 0?void 0:ue.resizableTextArea,focus:Re=>{var fe,bt;(0,Ce.n)((bt=(fe=G.current)===null||fe===void 0?void 0:fe.resizableTextArea)===null||bt===void 0?void 0:bt.textArea,Re)},blur:()=>{var Re;return(Re=G.current)===null||Re===void 0?void 0:Re.blur()}}});const q=be("input",nt);let ee;typeof S=="object"&&(S!=null&&S.clearIcon)?ee=S:S&&(ee={clearIcon:p.createElement(E.Z,null)});const[Ve,ze]=(0,N.ZP)(q);return Ve(p.createElement(j.default,Object.assign({},R,{disabled:ut,allowClear:ee,className:C()(F,I),classes:{affixWrapper:C()(`${q}-textarea-affix-wrapper`,{[`${q}-affix-wrapper-rtl`]:We==="rtl",[`${q}-affix-wrapper-borderless`]:!Ze,[`${q}-affix-wrapper-sm`]:Ae==="small",[`${q}-affix-wrapper-lg`]:Ae==="large",[`${q}-textarea-show-count`]:c},(0,P.Z)(`${q}-affix-wrapper`,H),ze)},classNames:Object.assign(Object.assign({},b),{textarea:C()({[`${q}-borderless`]:!Ze,[`${q}-sm`]:Ae==="small",[`${q}-lg`]:Ae==="large"},(0,P.Z)(q,H),ze,b==null?void 0:b.textarea)}),prefixCls:q,suffix:Ge&&p.createElement("span",{className:`${q}-textarea-suffix`},le),showCount:c,ref:G})))});xe.Z=Oe},59412:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return J}});var E=f(59301);function J(C,j){const p=(0,E.useRef)([]),P=()=>{p.current.push(setTimeout(()=>{var T,ye,te,y;!((T=C.current)===null||T===void 0)&&T.input&&((ye=C.current)===null||ye===void 0?void 0:ye.input.getAttribute("type"))==="password"&&(!((te=C.current)===null||te===void 0)&&te.input.hasAttribute("value"))&&((y=C.current)===null||y===void 0||y.input.removeAttribute("value"))}))};return(0,E.useEffect)(()=>(j&&P(),()=>p.current.forEach(T=>{T&&clearTimeout(T)})),[]),P}},92832:function(nn,xe,f){"use strict";f.d(xe,{default:function(){return Ae}});var E=f(92310),J=f.n(E),C=f(59301),j=f(36355),p=f(32441),P=f(9937),ye=me=>{const{getPrefixCls:ut,direction:ke}=(0,C.useContext)(j.E_),{prefixCls:Ge,className:le}=me,H=ut("input-group",Ge),G=ut("input"),[q,ee]=(0,P.ZP)(G),Ve=J()(H,{[`${H}-lg`]:me.size==="large",[`${H}-sm`]:me.size==="small",[`${H}-compact`]:me.compact,[`${H}-rtl`]:ke==="rtl"},ee,le),ze=(0,C.useContext)(p.aM),ue=(0,C.useMemo)(()=>Object.assign(Object.assign({},ze),{isFormItemInput:!1}),[ze]);return q(C.createElement("span",{className:Ve,style:me.style,onMouseEnter:me.onMouseEnter,onMouseLeave:me.onMouseLeave,onFocus:me.onFocus,onBlur:me.onBlur},C.createElement(p.aM.Provider,{value:ue},me.children)))},te=f(9432),y=f(73331),Ce=f(15277),N=f(2738),ve=f(8654),Oe=f(59412),k=function(me,ut){var ke={};for(var Ge in me)Object.prototype.hasOwnProperty.call(me,Ge)&&ut.indexOf(Ge)<0&&(ke[Ge]=me[Ge]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,Ge=Object.getOwnPropertySymbols(me);le<Ge.length;le++)ut.indexOf(Ge[le])<0&&Object.prototype.propertyIsEnumerable.call(me,Ge[le])&&(ke[Ge[le]]=me[Ge[le]]);return ke};const Xe=me=>me?C.createElement(Ce.Z,null):C.createElement(y.Z,null),nt={click:"onClick",hover:"onMouseOver"};var tt=C.forwardRef((me,ut)=>{const{visibilityToggle:ke=!0}=me,Ge=typeof ke=="object"&&ke.visible!==void 0,[le,H]=(0,C.useState)(()=>Ge?ke.visible:!1),G=(0,C.useRef)(null);C.useEffect(()=>{Ge&&H(ke.visible)},[Ge,ke]);const q=(0,Oe.Z)(G),ee=()=>{const{disabled:we}=me;we||(le&&q(),H(oe=>{var V;const re=!oe;return typeof ke=="object"&&((V=ke.onVisibleChange)===null||V===void 0||V.call(ke,re)),re}))},Ve=we=>{const{action:oe="click",iconRender:V=Xe}=me,re=nt[oe]||"",de=V(le),Se={[re]:ee,className:`${we}-icon`,key:"passwordIcon",onMouseDown:he=>{he.preventDefault()},onMouseUp:he=>{he.preventDefault()}};return C.cloneElement(C.isValidElement(de)?de:C.createElement("span",null,de),Se)},{className:ze,prefixCls:ue,inputPrefixCls:Re,size:fe}=me,bt=k(me,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Dt}=C.useContext(j.E_),St=Dt("input",Re),et=Dt("input-password",ue),Ot=ke&&Ve(et),at=J()(et,ze,{[`${et}-${fe}`]:!!fe}),A=Object.assign(Object.assign({},(0,N.Z)(bt,["suffix","iconRender","visibilityToggle"])),{type:le?"text":"password",className:at,prefixCls:St,suffix:Ot});return fe&&(A.size=fe),C.createElement(te.Z,Object.assign({ref:(0,ve.sQ)(ut,G)},A))}),_=f(47472),Z=f(92343),S=f(3113),c=f(19716),b=f(33234),I=function(me,ut){var ke={};for(var Ge in me)Object.prototype.hasOwnProperty.call(me,Ge)&&ut.indexOf(Ge)<0&&(ke[Ge]=me[Ge]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,Ge=Object.getOwnPropertySymbols(me);le<Ge.length;le++)ut.indexOf(Ge[le])<0&&Object.prototype.propertyIsEnumerable.call(me,Ge[le])&&(ke[Ge[le]]=me[Ge[le]]);return ke},R=C.forwardRef((me,ut)=>{const{prefixCls:ke,inputPrefixCls:Ge,className:le,size:H,suffix:G,enterButton:q=!1,addonAfter:ee,loading:Ve,disabled:ze,onSearch:ue,onChange:Re,onCompositionStart:fe,onCompositionEnd:bt}=me,Dt=I(me,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:St,direction:et}=C.useContext(j.E_),Ot=C.useRef(!1),at=St("input-search",ke),A=St("input",Ge),{compactSize:we}=(0,b.ri)(at,et),oe=(0,c.Z)(U=>{var rt;return(rt=H!=null?H:we)!==null&&rt!==void 0?rt:U}),V=C.useRef(null),re=U=>{U&&U.target&&U.type==="click"&&ue&&ue(U.target.value,U,{source:"clear"}),Re&&Re(U)},de=U=>{var rt;document.activeElement===((rt=V.current)===null||rt===void 0?void 0:rt.input)&&U.preventDefault()},Se=U=>{var rt,He;ue&&ue((He=(rt=V.current)===null||rt===void 0?void 0:rt.input)===null||He===void 0?void 0:He.value,U,{source:"input"})},he=U=>{Ot.current||Ve||Se(U)},Le=typeof q=="boolean"?C.createElement(_.Z,null):null,ne=`${at}-button`;let Ye;const ce=q||{},Ie=ce.type&&ce.type.__ANT_BUTTON===!0;Ie||ce.type==="button"?Ye=(0,Z.Tm)(ce,Object.assign({onMouseDown:de,onClick:U=>{var rt,He;(He=(rt=ce==null?void 0:ce.props)===null||rt===void 0?void 0:rt.onClick)===null||He===void 0||He.call(rt,U),Se(U)},key:"enterButton"},Ie?{className:ne,size:oe}:{})):Ye=C.createElement(S.ZP,{className:ne,type:q?"primary":void 0,size:oe,disabled:ze,key:"enterButton",onMouseDown:de,onClick:Se,loading:Ve,icon:Le},q),ee&&(Ye=[Ye,(0,Z.Tm)(ee,{key:"addonAfter"})]);const Me=J()(at,{[`${at}-rtl`]:et==="rtl",[`${at}-${oe}`]:!!oe,[`${at}-with-button`]:!!q},le),Ee=U=>{Ot.current=!0,fe==null||fe(U)},Je=U=>{Ot.current=!1,bt==null||bt(U)};return C.createElement(te.Z,Object.assign({ref:(0,ve.sQ)(V,ut),onPressEnter:he},Dt,{size:oe,onCompositionStart:Ee,onCompositionEnd:Je,prefixCls:A,addonAfter:Ye,suffix:G,onChange:re,className:Me,disabled:ze}))}),be=f(1643);const We=te.Z;We.Group=ye,We.Search=R,We.TextArea=be.Z,We.Password=tt;var Ae=We},9937:function(nn,xe,f){"use strict";f.d(xe,{M1:function(){return T},TM:function(){return Z},Xy:function(){return ye},bi:function(){return Ce},e5:function(){return _},ik:function(){return N},nz:function(){return p},pU:function(){return P},s7:function(){return ve},x0:function(){return y}});var E=f(17313),J=f(74207),C=f(37613),j=f(83116);const p=S=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:S,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),P=S=>({borderColor:S.hoverBorderColor}),T=S=>({borderColor:S.activeBorderColor,boxShadow:S.activeShadow,outline:0}),ye=S=>({color:S.colorTextDisabled,backgroundColor:S.colorBgContainerDisabled,borderColor:S.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},P((0,C.TS)(S,{hoverBorderColor:S.colorBorder})))}),te=S=>{const{paddingBlockLG:c,fontSizeLG:b,lineHeightLG:I,borderRadiusLG:F,paddingInlineLG:R}=S;return{padding:`${c}px ${R}px`,fontSize:b,lineHeight:I,borderRadius:F}},y=S=>({padding:`${S.paddingBlockSM}px ${S.paddingInlineSM}px`,borderRadius:S.borderRadiusSM}),Ce=(S,c)=>{const{componentCls:b,colorError:I,colorWarning:F,errorActiveShadow:R,warningActiveShadow:be,colorErrorBorderHover:We,colorWarningBorderHover:Ae}=S;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:I,"&:hover":{borderColor:We},"&:focus, &-focused":Object.assign({},T((0,C.TS)(S,{activeBorderColor:I,activeShadow:R}))),[`${b}-prefix, ${b}-suffix`]:{color:I}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:F,"&:hover":{borderColor:Ae},"&:focus, &-focused":Object.assign({},T((0,C.TS)(S,{activeBorderColor:F,activeShadow:be}))),[`${b}-prefix, ${b}-suffix`]:{color:F}}}},N=S=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${S.paddingBlock}px ${S.paddingInline}px`,color:S.colorText,fontSize:S.fontSize,lineHeight:S.lineHeight,backgroundColor:S.colorBgContainer,backgroundImage:"none",borderWidth:S.lineWidth,borderStyle:S.lineType,borderColor:S.colorBorder,borderRadius:S.borderRadius,transition:`all ${S.motionDurationMid}`},p(S.colorTextPlaceholder)),{"&:hover":Object.assign({},P(S)),"&:focus, &-focused":Object.assign({},T(S)),"&-disabled, &[disabled]":Object.assign({},ye(S)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:S.controlHeight,lineHeight:S.lineHeight,verticalAlign:"bottom",transition:`all ${S.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},te(S)),"&-sm":Object.assign({},y(S)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),ve=S=>{const{componentCls:c,antCls:b}=S;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:S.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${c}, &-lg > ${c}-group-addon`]:Object.assign({},te(S)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},y(S)),[`&-lg ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightLG},[`&-sm ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightSM},[`> ${c}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${c}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${S.paddingInline}px`,color:S.colorText,fontWeight:"normal",fontSize:S.fontSize,textAlign:"center",backgroundColor:S.colorFillAlter,border:`${S.lineWidth}px ${S.lineType} ${S.colorBorder}`,borderRadius:S.borderRadius,transition:`all ${S.motionDurationSlow}`,lineHeight:1,[`${b}-select`]:{margin:`-${S.paddingBlock+1}px -${S.paddingInline}px`,[`&${b}-select-single:not(${b}-select-customize-input)`]:{[`${b}-select-selector`]:{backgroundColor:"inherit",border:`${S.lineWidth}px ${S.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${b}-select-selector`]:{color:S.colorPrimary}}},[`${b}-cascader-picker`]:{margin:`-9px -${S.paddingInline}px`,backgroundColor:"transparent",[`${b}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${c}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${c}-search-with-button &`]:{zIndex:0}}},[`> ${c}:first-child, ${c}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}-affix-wrapper`]:{[`&:not(:first-child) ${c}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${c}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}:last-child, ${c}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${c}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${c}-search &`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius}},[`&:not(:first-child), ${c}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${c}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,E.dF)()),{[`${c}-group-addon, ${c}-group-wrap, > ${c}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:S.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${c}-affix-wrapper,
& > ${c}-number-affix-wrapper,
& > ${b}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-S.lineWidth,borderInlineEndWidth:S.lineWidth},[`${c}`]:{float:"none"},[`& > ${b}-select > ${b}-select-selector,
& > ${b}-select-auto-complete ${c},
& > ${b}-cascader-picker ${c},
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:S.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${b}-select-focused`]:{zIndex:1},[`& > ${b}-select > ${b}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${b}-select:first-child > ${b}-select-selector,
& > ${b}-select-auto-complete:first-child ${c},
& > ${b}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius},[`& > *:last-child,
& > ${b}-select:last-child > ${b}-select-selector,
& > ${b}-cascader-picker:last-child ${c},
& > ${b}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:S.lineWidth,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius},[`& > ${b}-select-auto-complete ${c}`]:{verticalAlign:"top"},[`${c}-group-wrapper + ${c}-group-wrapper`]:{marginInlineStart:-S.lineWidth,[`${c}-affix-wrapper`]:{borderRadius:0}},[`${c}-group-wrapper:not(:last-child)`]:{[`&${c}-search > ${c}-group`]:{[`& > ${c}-group-addon > ${c}-search-button`]:{borderRadius:0},[`& > ${c}`]:{borderStartStartRadius:S.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:S.borderRadius}}}})}},Oe=S=>{const{componentCls:c,controlHeightSM:b,lineWidth:I}=S,R=(b-I*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,E.Wf)(S)),N(S)),Ce(S,c)),{'&[type="color"]':{height:S.controlHeight,[`&${c}-lg`]:{height:S.controlHeightLG},[`&${c}-sm`]:{height:b,paddingTop:R,paddingBottom:R}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},k=S=>{const{componentCls:c}=S;return{[`${c}-clear-icon`]:{margin:0,color:S.colorTextQuaternary,fontSize:S.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${S.motionDurationSlow}`,"&:hover":{color:S.colorTextTertiary},"&:active":{color:S.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${S.inputAffixPadding}px`}}}},Xe=S=>{const{componentCls:c,inputAffixPadding:b,colorTextDescription:I,motionDurationSlow:F,colorIcon:R,colorIconHover:be,iconCls:We}=S;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},N(S)),{display:"inline-flex",[`&:not(${c}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},P(S)),{zIndex:1,[`${c}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${c}[disabled]`]:{background:"transparent"}},[`> input${c}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${c}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:S.paddingXS}},"&-show-count-suffix":{color:I},"&-show-count-has-suffix":{marginInlineEnd:S.paddingXXS},"&-prefix":{marginInlineEnd:b},"&-suffix":{marginInlineStart:b}}}),k(S)),{[`${We}${c}-password-icon`]:{color:R,cursor:"pointer",transition:`all ${F}`,"&:hover":{color:be}}}),Ce(S,`${c}-affix-wrapper`))}},nt=S=>{const{componentCls:c,colorError:b,colorWarning:I,borderRadiusLG:F,borderRadiusSM:R}=S;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,E.Wf)(S)),ve(S)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:F,fontSize:S.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:R}},"&-status-error":{[`${c}-group-addon`]:{color:b,borderColor:b}},"&-status-warning":{[`${c}-group-addon`]:{color:I,borderColor:I}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},ye(S))},[`&:not(${c}-compact-first-item):not(${c}-compact-last-item)${c}-compact-item`]:{[`${c}, ${c}-group-addon`]:{borderRadius:0}},[`&:not(${c}-compact-last-item)${c}-compact-first-item`]:{[`${c}, ${c}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${c}-compact-first-item)${c}-compact-last-item`]:{[`${c}, ${c}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Ze=S=>{const{componentCls:c,antCls:b}=S,I=`${c}-search`;return{[I]:{[`${c}`]:{"&:hover, &:focus":{borderColor:S.colorPrimaryHover,[`+ ${c}-group-addon ${I}-button:not(${b}-btn-primary)`]:{borderInlineStartColor:S.colorPrimaryHover}}},[`${c}-affix-wrapper`]:{borderRadius:0},[`${c}-lg`]:{lineHeight:S.lineHeightLG-2e-4},[`> ${c}-group`]:{[`> ${c}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${I}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${I}-button:not(${b}-btn-primary)`]:{color:S.colorTextDescription,"&:hover":{color:S.colorPrimaryHover},"&:active":{color:S.colorPrimaryActive},[`&${b}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${I}-button`]:{height:S.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${I}-button`]:{height:S.controlHeightLG},[`&-small ${I}-button`]:{height:S.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${c}-compact-item`]:{[`&:not(${c}-compact-last-item)`]:{[`${c}-group-addon`]:{[`${c}-search-button`]:{marginInlineEnd:-S.lineWidth,borderRadius:0}}},[`&:not(${c}-compact-first-item)`]:{[`${c},${c}-affix-wrapper`]:{borderRadius:0}},[`> ${c}-group-addon ${c}-search-button,
> ${c},
${c}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${c}-affix-wrapper-focused`]:{zIndex:2}}}}},tt=S=>{const{componentCls:c,paddingLG:b}=S,I=`${c}-textarea`;return{[I]:{position:"relative","&-show-count":{[`> ${c}`]:{height:"100%"},[`${c}-data-count`]:{position:"absolute",bottom:-S.fontSize*S.lineHeight,insetInlineEnd:0,color:S.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${c}`]:{paddingInlineEnd:b}},[`&-affix-wrapper${I}-has-feedback`]:{[`${c}`]:{paddingInlineEnd:b}},[`&-affix-wrapper${c}-affix-wrapper`]:{padding:0,[`> textarea${c}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${c}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${c}-clear-icon`]:{position:"absolute",insetInlineEnd:S.paddingXS,insetBlockStart:S.paddingXS},[`${I}-suffix`]:{position:"absolute",top:0,insetInlineEnd:S.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function _(S){return(0,C.TS)(S,{inputAffixPadding:S.paddingXXS})}const Z=S=>{const{controlHeight:c,fontSize:b,lineHeight:I,lineWidth:F,controlHeightSM:R,controlHeightLG:be,fontSizeLG:We,lineHeightLG:Ae,paddingSM:me,controlPaddingHorizontalSM:ut,controlPaddingHorizontal:ke,colorFillAlter:Ge,colorPrimaryHover:le,controlOutlineWidth:H,controlOutline:G,colorErrorOutline:q,colorWarningOutline:ee}=S;return{paddingBlock:Math.max(Math.round((c-b*I)/2*10)/10-F,3),paddingBlockSM:Math.max(Math.round((R-b*I)/2*10)/10-F,0),paddingBlockLG:Math.ceil((be-We*Ae)/2*10)/10-F,paddingInline:me-F,paddingInlineSM:ut-F,paddingInlineLG:ke-F,addonBg:Ge,activeBorderColor:le,hoverBorderColor:le,activeShadow:`0 0 0 ${H}px ${G}`,errorActiveShadow:`0 0 0 ${H}px ${q}`,warningActiveShadow:`0 0 0 ${H}px ${ee}`}};xe.ZP=(0,j.Z)("Input",S=>{const c=(0,C.TS)(S,_(S));return[Oe(c),tt(c),Xe(c),nt(c),Ze(c),(0,J.c)(c)]},Z)},57809:function(nn,xe,f){"use strict";var E=f(92310),J=f.n(E),C=f(77861),j=f(2738),p=f(59301),P=f(53487),T=f(62892),ye=f(19080),te=f(36355),y=f(1684),Ce=f(93891),N=f(19716),ve=f(32441),Oe=f(33234),k=f(14154),Xe=f(58582),nt=f(84443),Ze=f(66339),tt=function(b,I){var F={};for(var R in b)Object.prototype.hasOwnProperty.call(b,R)&&I.indexOf(R)<0&&(F[R]=b[R]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,R=Object.getOwnPropertySymbols(b);be<R.length;be++)I.indexOf(R[be])<0&&Object.prototype.propertyIsEnumerable.call(b,R[be])&&(F[R[be]]=b[R[be]]);return F};const _="SECRET_COMBOBOX_MODE_DO_NOT_USE",Z=(b,I)=>{var F,{prefixCls:R,bordered:be=!0,className:We,rootClassName:Ae,getPopupContainer:me,popupClassName:ut,dropdownClassName:ke,listHeight:Ge=256,placement:le,listItemHeight:H=24,size:G,disabled:q,notFoundContent:ee,status:Ve,builtinPlacements:ze,dropdownMatchSelectWidth:ue,popupMatchSelectWidth:Re,direction:fe,style:bt,allowClear:Dt}=b,St=tt(b,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:et,getPrefixCls:Ot,renderEmpty:at,direction:A,virtual:we,popupMatchSelectWidth:oe,popupOverflow:V,select:re}=p.useContext(te.E_),de=Ot("select",R),Se=Ot(),he=fe!=null?fe:A,{compactSize:Le,compactItemClassnames:ne}=(0,Oe.ri)(de,he),[Ye,ce]=(0,k.Z)(de),Ie=p.useMemo(()=>{const{mode:In}=St;if(In!=="combobox")return In===_?"combobox":In},[St.mode]),Me=Ie==="multiple"||Ie==="tags",Ee=(0,nt.Z)(St.suffixIcon,St.showArrow),Je=(F=Re!=null?Re:ue)!==null&&F!==void 0?F:oe,{status:U,hasFeedback:rt,isFormItemInput:He,feedbackIcon:ct}=p.useContext(ve.aM),vt=(0,ye.F)(U,Ve);let rn;ee!==void 0?rn=ee:Ie==="combobox"?rn=null:rn=(at==null?void 0:at("Select"))||p.createElement(Ce.Z,{componentName:"Select"});const{suffixIcon:Zt,itemIcon:Ft,removeIcon:Pt,clearIcon:Xt}=(0,Ze.Z)(Object.assign(Object.assign({},St),{multiple:Me,hasFeedback:rt,feedbackIcon:ct,showSuffixIcon:Ee,prefixCls:de,showArrow:St.showArrow,componentName:"Select"})),Yt=Dt===!0?{clearIcon:Xt}:Dt,sn=(0,j.Z)(St,["suffixIcon","itemIcon"]),Cn=J()(ut||ke,{[`${de}-dropdown-${he}`]:he==="rtl"},Ae,ce),un=(0,N.Z)(In=>{var xn;return(xn=G!=null?G:Le)!==null&&xn!==void 0?xn:In}),zn=p.useContext(y.Z),Wn=q!=null?q:zn,pn=J()({[`${de}-lg`]:un==="large",[`${de}-sm`]:un==="small",[`${de}-rtl`]:he==="rtl",[`${de}-borderless`]:!be,[`${de}-in-form-item`]:He},(0,ye.Z)(de,vt,rt),ne,re==null?void 0:re.className,We,Ae,ce),Ln=p.useMemo(()=>le!==void 0?le:he==="rtl"?"bottomRight":"bottomLeft",[le,he]),wn=(0,Xe.Z)(ze,V);return Ye(p.createElement(C.ZP,Object.assign({ref:I,virtual:we,showSearch:re==null?void 0:re.showSearch},sn,{style:Object.assign(Object.assign({},re==null?void 0:re.style),bt),dropdownMatchSelectWidth:Je,builtinPlacements:wn,transitionName:(0,T.m)(Se,"slide-up",St.transitionName),listHeight:Ge,listItemHeight:H,mode:Ie,prefixCls:de,placement:Ln,direction:he,suffixIcon:Zt,menuItemSelectedIcon:Ft,removeIcon:Pt,allowClear:Yt,notFoundContent:rn,className:pn,getPopupContainer:me||et,dropdownClassName:Cn,disabled:Wn})))},S=p.forwardRef(Z),c=(0,P.Z)(S);S.SECRET_COMBOBOX_MODE_DO_NOT_USE=_,S.Option=C.Wx,S.OptGroup=C.Xo,S._InternalPanelDoNotUseOrYouWillBeFired=c,xe.default=S},14154:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return S}});var E=f(17313),J=f(74207),C=f(37613),j=f(83116),p=f(13826),P=f(92899);const T=c=>{const{optionHeight:b,optionFontSize:I,optionLineHeight:F,optionPadding:R}=c;return{position:"relative",display:"block",minHeight:b,padding:R,color:c.colorText,fontWeight:"normal",fontSize:I,lineHeight:F,boxSizing:"border-box"}};var te=c=>{const{antCls:b,componentCls:I}=c,F=`${I}-item`,R=`&${b}-slide-up-enter${b}-slide-up-enter-active`,be=`&${b}-slide-up-appear${b}-slide-up-appear-active`,We=`&${b}-slide-up-leave${b}-slide-up-leave-active`,Ae=`${I}-dropdown-placement-`;return[{[`${I}-dropdown`]:Object.assign(Object.assign({},(0,E.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,[`
${R}${Ae}bottomLeft,
${be}${Ae}bottomLeft
`]:{animationName:p.fJ},[`
${R}${Ae}topLeft,
${be}${Ae}topLeft,
${R}${Ae}topRight,
${be}${Ae}topRight
`]:{animationName:p.Qt},[`${We}${Ae}bottomLeft`]:{animationName:p.Uw},[`
${We}${Ae}topLeft,
${We}${Ae}topRight
`]:{animationName:p.ly},"&-hidden":{display:"none"},[`${F}`]:Object.assign(Object.assign({},T(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"},E.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${F}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${F}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${F}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${F}-option-selected`]:{backgroundColor:c.colorBgContainerDisabled},color:c.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:c.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,p.oN)(c,"slide-up"),(0,p.oN)(c,"slide-down"),(0,P.Fm)(c,"move-up"),(0,P.Fm)(c,"move-down")]};const y=2,Ce=c=>{let{controlHeightSM:b,controlHeight:I,lineWidth:F}=c;const R=(I-b)/2-F,be=Math.ceil(R/2);return[R,be]};function N(c,b){const{componentCls:I,iconCls:F}=c,R=`${I}-selection-overflow`,be=c.multipleSelectItemHeight,[We]=Ce(c),Ae=b?`${I}-${b}`:"";return{[`${I}-multiple${Ae}`]:{fontSize:c.fontSize,[R]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${I}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${We-y}px ${y*2}px`,borderRadius:c.borderRadius,[`${I}-show-search&`]:{cursor:"text"},[`${I}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${y}px 0`,lineHeight:`${be}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${I}-show-arrow ${I}-selector,
&${I}-allow-clear ${I}-selector
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${I}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:be,marginTop:y,marginBottom:y,lineHeight:`${be-c.lineWidth*2}px`,background:c.multipleItemBg,border:`${c.lineWidth}px ${c.lineType} ${c.multipleItemBorderColor}`,borderRadius:c.borderRadiusSM,cursor:"default",transition:`font-size ${c.motionDurationSlow}, line-height ${c.motionDurationSlow}, height ${c.motionDurationSlow}`,userSelect:"none",marginInlineEnd:y*2,paddingInlineStart:c.paddingXS,paddingInlineEnd:c.paddingXS/2,[`${I}-disabled&`]:{color:c.multipleItemColorDisabled,borderColor:c.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:c.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,E.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${F}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${R}-item + ${R}-item`]:{[`${I}-selection-search`]:{marginInlineStart:0}},[`${I}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-We,"\n &-input,\n &-mirror\n ":{height:be,fontFamily:c.fontFamily,lineHeight:`${be}px`,transition:`all ${c.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${I}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var Oe=c=>{const{componentCls:b}=c,I=(0,C.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),F=(0,C.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,R]=Ce(c);return[N(c),N(I,"sm"),{[`${b}-multiple${b}-sm`]:{[`${b}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${b}-selection-search`]:{marginInlineStart:R}}},N(F,"lg")]};function k(c,b){const{componentCls:I,inputPaddingHorizontalBase:F,borderRadius:R}=c,be=c.controlHeight-c.lineWidth*2,We=Math.ceil(c.fontSize*1.25),Ae=b?`${I}-${b}`:"";return{[`${I}-single${Ae}`]:{fontSize:c.fontSize,[`${I}-selector`]:Object.assign(Object.assign({},(0,E.Wf)(c)),{display:"flex",borderRadius:R,[`${I}-selection-search`]:{position:"absolute",top:0,insetInlineStart:F,insetInlineEnd:F,bottom:0,"&-input":{width:"100%"}},[`
${I}-selection-item,
${I}-selection-placeholder
`]:{padding:0,lineHeight:`${be}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${be}px`}},[`${I}-selection-item`]:{position:"relative",userSelect:"none"},[`${I}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${I}-selection-item:after`,`${I}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${I}-show-arrow ${I}-selection-item,
&${I}-show-arrow ${I}-selection-placeholder
`]:{paddingInlineEnd:We},[`&${I}-open ${I}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${I}-customize-input)`]:{[`${I}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${F}px`,[`${I}-selection-search-input`]:{height:be},"&:after":{lineHeight:`${be}px`}}},[`&${I}-customize-input`]:{[`${I}-selector`]:{"&:after":{display:"none"},[`${I}-selection-search`]:{position:"static",width:"100%"},[`${I}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${F}px`,"&:after":{display:"none"}}}}}}}function Xe(c){const{componentCls:b}=c,I=c.controlPaddingHorizontalSM-c.lineWidth;return[k(c),k((0,C.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${b}-single${b}-sm`]:{[`&:not(${b}-customize-input)`]:{[`${b}-selection-search`]:{insetInlineStart:I,insetInlineEnd:I},[`${b}-selector`]:{padding:`0 ${I}px`},[`&${b}-show-arrow ${b}-selection-search`]:{insetInlineEnd:I+c.fontSize*1.5},[`
&${b}-show-arrow ${b}-selection-item,
&${b}-show-arrow ${b}-selection-placeholder
`]:{paddingInlineEnd:c.fontSize*1.5}}}},k((0,C.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const nt=c=>{const{componentCls:b,selectorBg:I}=c;return{position:"relative",backgroundColor:I,border:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`,transition:`all ${c.motionDurationMid} ${c.motionEaseInOut}`,input:{cursor:"pointer"},[`${b}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${b}-disabled&`]:{color:c.colorTextDisabled,background:c.colorBgContainerDisabled,cursor:"not-allowed",[`${b}-multiple&`]:{background:c.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},Ze=function(c,b){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:F,borderHoverColor:R,outlineColor:be,antCls:We}=b,Ae=I?{[`${F}-selector`]:{borderColor:R}}:{};return{[c]:{[`&:not(${F}-disabled):not(${F}-customize-input):not(${We}-pagination-size-changer)`]:Object.assign(Object.assign({},Ae),{[`${F}-focused& ${F}-selector`]:{borderColor:R,boxShadow:`0 0 0 ${b.controlOutlineWidth}px ${be}`,outline:0},[`&:hover ${F}-selector`]:{borderColor:R}})}}},tt=c=>{const{componentCls:b}=c;return{[`${b}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},_=c=>{const{componentCls:b,inputPaddingHorizontalBase:I,iconCls:F}=c;return{[b]:Object.assign(Object.assign({},(0,E.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${b}-customize-input) ${b}-selector`]:Object.assign(Object.assign({},nt(c)),tt(c)),[`${b}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},E.vS),[`${b}-selection-placeholder`]:Object.assign(Object.assign({},E.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${b}-arrow`]:Object.assign(Object.assign({},(0,E.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:I,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[F]:{verticalAlign:"top",transition:`transform ${c.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${b}-suffix)`]:{pointerEvents:"auto"}},[`${b}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${b}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:I,zIndex:1,display:"inline-block",width:c.fontSizeIcon,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:c.clearBg,cursor:"pointer",opacity:0,transition:`color ${c.motionDurationMid} ease, opacity ${c.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:c.colorTextTertiary}},"&:hover":{[`${b}-clear`]:{opacity:1}}}),[`${b}-has-feedback`]:{[`${b}-clear`]:{insetInlineEnd:I+c.fontSize+c.paddingXS}}}},Z=c=>{const{componentCls:b}=c;return[{[b]:{[`&-borderless ${b}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${b}-in-form-item`]:{width:"100%"}}},_(c),Xe(c),Oe(c),te(c),{[`${b}-rtl`]:{direction:"rtl"}},Ze(b,(0,C.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),Ze(`${b}-status-error`,(0,C.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),Ze(`${b}-status-warning`,(0,C.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,J.c)(c,{borderElCls:`${b}-selector`,focusElCls:`${b}-focused`})]};var S=(0,j.Z)("Select",(c,b)=>{let{rootPrefixCls:I}=b;const F=(0,C.TS)(c,{rootPrefixCls:I,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[Z(F)]},c=>{const{fontSize:b,lineHeight:I,controlHeight:F,controlPaddingHorizontal:R,zIndexPopupBase:be,colorText:We,fontWeightStrong:Ae,controlItemBgActive:me,controlItemBgHover:ut,colorBgContainer:ke,colorFillSecondary:Ge,controlHeightLG:le,controlHeightSM:H,colorBgContainerDisabled:G,colorTextDisabled:q}=c;return{zIndexPopup:be+50,optionSelectedColor:We,optionSelectedFontWeight:Ae,optionSelectedBg:me,optionActiveBg:ut,optionPadding:`${(F-b*I)/2}px ${R}px`,optionFontSize:b,optionLineHeight:I,optionHeight:F,selectorBg:ke,clearBg:ke,singleItemHeightLG:le,multipleItemBg:Ge,multipleItemBorderColor:"transparent",multipleItemHeight:H,multipleItemHeightLG:F,multipleSelectorBgDisabled:G,multipleItemColorDisabled:q,multipleItemBorderColorDisabled:"transparent"}})},58582:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return J}});const E=C=>{const p={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:C==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},p),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},p),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},p),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},p),{points:["br","tr"],offset:[0,-4]})}};function J(C,j){return C||E(j)}},84443:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return E}});function E(J,C){return C!==void 0?C:J!==null}},66339:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(40001),J=f(19248),C=f(99267),j=f(84105),p=f(58617),P=f(47472),T=f(59301);function ye(te){let{suffixIcon:y,clearIcon:Ce,menuItemSelectedIcon:N,removeIcon:ve,loading:Oe,multiple:k,hasFeedback:Xe,prefixCls:nt,showSuffixIcon:Ze,feedbackIcon:tt,showArrow:_,componentName:Z}=te;const S=Ce!=null?Ce:T.createElement(J.Z,null),c=R=>y===null&&!Xe&&!_?null:T.createElement(T.Fragment,null,Ze!==!1&&R,Xe&&tt);let b=null;if(y!==void 0)b=c(y);else if(Oe)b=c(T.createElement(p.Z,{spin:!0}));else{const R=`${nt}-suffix`;b=be=>{let{open:We,showSearch:Ae}=be;return c(We&&Ae?T.createElement(P.Z,{className:R}):T.createElement(j.Z,{className:R}))}}let I=null;N!==void 0?I=N:k?I=T.createElement(E.Z,null):I=null;let F=null;return ve!==void 0?F=ve:F=T.createElement(C.Z,null),{clearIcon:S,suffixIcon:b,itemIcon:I,removeIcon:F}}},8378:function(nn,xe){"use strict";const f=E=>({[E.componentCls]:{[`${E.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${E.motionDurationMid} ${E.motionEaseInOut},
opacity ${E.motionDurationMid} ${E.motionEaseInOut} !important`}},[`${E.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${E.motionDurationMid} ${E.motionEaseInOut},
opacity ${E.motionDurationMid} ${E.motionEaseInOut} !important`}}});xe.Z=f},92899:function(nn,xe,f){"use strict";f.d(xe,{Fm:function(){return N}});var E=f(93083),J=f(95406);const C=new E.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),j=new E.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),p=new E.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),P=new E.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),T=new E.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ye=new E.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),te=new E.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),y=new E.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ce={"move-up":{inKeyframes:te,outKeyframes:y},"move-down":{inKeyframes:C,outKeyframes:j},"move-left":{inKeyframes:p,outKeyframes:P},"move-right":{inKeyframes:T,outKeyframes:ye}},N=(ve,Oe)=>{const{antCls:k}=ve,Xe=`${k}-${Oe}`,{inKeyframes:nt,outKeyframes:Ze}=Ce[Oe];return[(0,J.R)(Xe,nt,Ze,ve.motionDurationMid),{[`
${Xe}-enter,
${Xe}-appear
`]:{opacity:0,animationTimingFunction:ve.motionEaseOutCirc},[`${Xe}-leave`]:{animationTimingFunction:ve.motionEaseInOutCirc}}]}},13826:function(nn,xe,f){"use strict";f.d(xe,{Qt:function(){return p},Uw:function(){return j},fJ:function(){return C},ly:function(){return P},oN:function(){return N}});var E=f(93083),J=f(95406);const C=new E.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),j=new E.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),p=new E.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),P=new E.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),T=new E.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ye=new E.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),te=new E.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),y=new E.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ce={"slide-up":{inKeyframes:C,outKeyframes:j},"slide-down":{inKeyframes:p,outKeyframes:P},"slide-left":{inKeyframes:T,outKeyframes:ye},"slide-right":{inKeyframes:te,outKeyframes:y}},N=(ve,Oe)=>{const{antCls:k}=ve,Xe=`${k}-${Oe}`,{inKeyframes:nt,outKeyframes:Ze}=Ce[Oe];return[(0,J.R)(Xe,nt,Ze,ve.motionDurationMid),{[`
${Xe}-enter,
${Xe}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:ve.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Xe}-leave`]:{animationTimingFunction:ve.motionEaseInQuint}}]}},89780:function(nn){(function(xe,f){nn.exports=f()})(this,function(){"use strict";var xe=navigator.userAgent,f=navigator.platform,E=/gecko\/\d/i.test(xe),J=/MSIE \d/.test(xe),C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xe),j=/Edge\/(\d+)/.exec(xe),p=J||C||j,P=p&&(J?document.documentMode||6:+(j||C)[1]),T=!j&&/WebKit\//.test(xe),ye=T&&/Qt\/\d+\.\d+/.test(xe),te=!j&&/Chrome\//.test(xe),y=/Opera\//.test(xe),Ce=/Apple Computer/.test(navigator.vendor),N=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(xe),ve=/PhantomJS/.test(xe),Oe=!j&&/AppleWebKit/.test(xe)&&/Mobile\/\w+/.test(xe),k=/Android/.test(xe),Xe=Oe||k||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(xe),nt=Oe||/Mac/.test(f),Ze=/\bCrOS\b/.test(xe),tt=/win/i.test(f),_=y&&xe.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(y=!1,T=!0);var Z=nt&&(ye||y&&(_==null||_<12.11)),S=E||p&&P>=9;function c(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,t){var r=e.className,n=c(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function I(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function F(e,t){return I(e).appendChild(t)}function R(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 be(e,t,r,n){var i=R(e,t,r,n);return i.setAttribute("role","presentation"),i}var We;document.createRange?We=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:We=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 Ae(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 ut(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function ke(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 Ge=function(e){e.select()};Oe?Ge=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:p&&(Ge=function(e){try{e.select()}catch(t){}});function le(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function H(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 G(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 q=function(){this.id=null,this.f=null,this.time=0,this.handler=le(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},q.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 ee(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Ve=50,ze={toString:function(){return"CodeMirror.Pass"}},ue={scroll:!1},Re={origin:"*mouse"},fe={origin:"+move"};function bt(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 Dt=[""];function St(e){for(;Dt.length<=e;)Dt.push(et(Dt)+" ");return Dt[e]}function et(e){return e[e.length-1]}function Ot(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function at(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function A(){}function we(e,t){var r;return Object.create?r=Object.create(e):(A.prototype=e,r=new A),t&&H(t,r),r}var oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function V(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function re(e,t){return t?t.source.indexOf("\\w")>-1&&V(e)?!0:t.test(e):V(e)}function de(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Se=/[\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 he(e){return e.charCodeAt(0)>=768&&Se.test(e)}function Le(e,t,r){for(;(r<0?t>0:t<e.length)&&he(e.charAt(t));)t+=r;return t}function ne(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 Ye(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 ce=null;function Ie(e,t,r){var n;ce=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:ce=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:ce=i)}return n!=null?n:ce}var Me=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,v,m){this.level=u,this.from=v,this.to=m}return function(u,v){var m=v=="ltr"?"L":"R";if(u.length==0||v=="ltr"&&!n.test(u))return!1;for(var O=u.length,w=[],z=0;z<O;++z)w.push(r(u.charCodeAt(z)));for(var X=0,ge=m;X<O;++X){var Pe=w[X];Pe=="m"?w[X]=ge:ge=Pe}for(var je=0,Ne=m;je<O;++je){var qe=w[je];qe=="1"&&Ne=="r"?w[je]="n":o.test(qe)&&(Ne=qe,qe=="r"&&(w[je]="R"))}for(var Ct=1,pt=w[0];Ct<O-1;++Ct){var Kt=w[Ct];Kt=="+"&&pt=="1"&&w[Ct+1]=="1"?w[Ct]="1":Kt==","&&pt==w[Ct+1]&&(pt=="1"||pt=="n")&&(w[Ct]=pt),pt=Kt}for(var Sn=0;Sn<O;++Sn){var Qn=w[Sn];if(Qn==",")w[Sn]="N";else if(Qn=="%"){var Dn=void 0;for(Dn=Sn+1;Dn<O&&w[Dn]=="%";++Dn);for(var br=Sn&&w[Sn-1]=="!"||Dn<O&&w[Dn]=="1"?"1":"N",dr=Sn;dr<Dn;++dr)w[dr]=br;Sn=Dn-1}}for(var Bn=0,hr=m;Bn<O;++Bn){var er=w[Bn];hr=="L"&&er=="1"?w[Bn]="L":o.test(er)&&(hr=er)}for(var Un=0;Un<O;++Un)if(i.test(w[Un])){var Zn=void 0;for(Zn=Un+1;Zn<O&&i.test(w[Zn]);++Zn);for(var Pn=(Un?w[Un-1]:m)=="L",vr=(Zn<O?w[Zn]:m)=="L",Wi=Pn==vr?Pn?"L":"R":m,ai=Un;ai<Zn;++ai)w[ai]=Wi;Un=Zn-1}for(var ir=[],Zr,Jn=0;Jn<O;)if(a.test(w[Jn])){var ba=Jn;for(++Jn;Jn<O&&a.test(w[Jn]);++Jn);ir.push(new s(0,ba,Jn))}else{var Vr=Jn,yi=ir.length,bi=v=="rtl"?1:0;for(++Jn;Jn<O&&w[Jn]!="L";++Jn);for(var lr=Vr;lr<Jn;)if(l.test(w[lr])){Vr<lr&&(ir.splice(yi,0,new s(1,Vr,lr)),yi+=bi);var Hi=lr;for(++lr;lr<Jn&&l.test(w[lr]);++lr);ir.splice(yi,0,new s(2,Hi,lr)),yi+=bi,Vr=lr}else++lr;Vr<Jn&&ir.splice(yi,0,new s(1,Vr,Jn))}return v=="ltr"&&(ir[0].level==1&&(Zr=u.match(/^\s+/))&&(ir[0].from=Zr[0].length,ir.unshift(new s(0,0,Zr[0].length))),et(ir).level==1&&(Zr=u.match(/\s+$/))&&(et(ir).to-=Zr[0].length,ir.push(new s(0,O-Zr[0].length,O)))),v=="rtl"?ir.reverse():ir}}();function Ee(e,t){var r=e.order;return r==null&&(r=e.order=Me(e.text,t)),r}var Je=[],U=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]||Je).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||Je}function He(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=ee(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ct(e,t){var r=rt(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 vt(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ct(e,r||t.type,e,t),Yt(t)||t.codemirrorIgnore}function rn(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)ee(r,t[n])==-1&&r.push(t[n])}function Zt(e,t){return rt(e,t).length>0}function Ft(e){e.prototype.on=function(t,r){U(this,t,r)},e.prototype.off=function(t,r){He(this,t,r)}}function Pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Xt(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Yt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function sn(e){Pt(e),Xt(e)}function Cn(e){return e.target||e.srcElement}function un(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),nt&&e.ctrlKey&&t==1&&(t=3),t}var zn=function(){if(p&&P<9)return!1;var e=R("div");return"draggable"in e||"dragDrop"in e}(),Wn;function pn(e){if(Wn==null){var t=R("span","\u200B");F(e,R("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Wn=t.offsetWidth<=1&&t.offsetHeight>2&&!(p&&P<8))}var r=Wn?R("span","\u200B"):R("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Ln;function wn(e){if(Ln!=null)return Ln;var t=F(e,document.createTextNode("A\u062EA")),r=We(t,0,1).getBoundingClientRect(),n=We(t,1,2).getBoundingClientRect();return I(e),!r||r.left==r.right?!1:Ln=n.right-r.right<3}var In=`
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},xn=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},dn=function(){var e=R("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Nn=null;function Qt(e){if(Nn!=null)return Nn;var t=F(e,R("span","x")),r=t.getBoundingClientRect(),n=We(t,0,1).getBoundingClientRect();return Nn=Math.abs(r.left-n.left)>1}var An={},Hn={};function Sr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),An[e]=t}function pr(e,t){Hn[e]=t}function on(e){if(typeof e=="string"&&Hn.hasOwnProperty(e))e=Hn[e];else if(e&&typeof e.name=="string"&&Hn.hasOwnProperty(e.name)){var t=Hn[e.name];typeof t=="string"&&(t={name:t}),e=we(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return on("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return on("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Qe(e,t){t=on(t);var r=An[t.name];if(!r)return Qe(e,"text/plain");var n=r(e,t);if(Mt.hasOwnProperty(t.name)){var i=Mt[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 Mt={};function g(e,t){var r=Mt.hasOwnProperty(e)?Mt[e]:Mt[e]={};H(t,r)}function D(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 W(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),!(!r||r.mode==e));)t=r.state,e=r.mode;return r||{mode:e,state:t}}function d(e,t,r){return e.startState?e.startState(t,r):!0}var h=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};h.prototype.eol=function(){return this.pos>=this.string.length},h.prototype.sol=function(){return this.pos==this.lineStart},h.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},h.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},h.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},h.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},h.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},h.prototype.skipToEnd=function(){this.pos=this.string.length},h.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},h.prototype.backUp=function(e){this.pos-=e},h.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=G(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},h.prototype.indentation=function(){return G(this.string,null,this.tabSize)-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},h.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(a){return r?a.toLowerCase():a},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},h.prototype.current=function(){return this.string.slice(this.start,this.pos)},h.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},h.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},h.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function x(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 L(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 Q(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function B(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function $(e){if(e.parent==null)return null;for(var t=e.parent,r=ee(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 se(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 ie(e,t){return t>=e.first&&t<e.first+e.size}function Fe(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function M(e,t,r){if(r===void 0&&(r=null),!(this instanceof M))return new M(e,t,r);this.line=e,this.ch=t,this.sticky=r}function K(e,t){return e.line-t.line||e.ch-t.ch}function Ke(e,t){return e.sticky==t.sticky&&K(e,t)==0}function pe(e){return M(e.line,e.ch)}function Be(e,t){return K(e,t)<0?t:e}function Te(e,t){return K(e,t)<0?e:t}function ft(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Y(e,t){if(t.line<e.first)return M(e.first,0);var r=e.first+e.size-1;return t.line>r?M(r,x(e,r).text.length):ae(t,x(e,t.line).text.length)}function ae(e,t){var r=e.ch;return r==null||r>t?M(e.line,t):r<0?M(e.line,0):e}function De(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Y(e,t[n]);return r}var it=function(e,t){this.state=e,this.lookAhead=t},_e=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};_e.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},_e.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}},_e.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},_e.fromSaved=function(e,t,r){return t instanceof it?new _e(e,D(e.mode,t.state),r,t.lookAhead):new _e(e,D(e.mode,t),r)},_e.prototype.save=function(e){var t=e!==!1?D(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new it(t,this.maxLookAhead):t};function lt(e,t,r,n){var i=[e.state.modeGen],o={};kt(e,t.text,e.doc.mode,r,function(u,v){return i.push(u,v)},o,n);for(var a=r.state,l=function(u){r.baseTokens=i;var v=e.state.overlays[u],m=1,O=0;r.state=!0,kt(e,t.text,v.mode,r,function(w,z){for(var X=m;O<w;){var ge=i[m];ge>w&&i.splice(m,1,w,i[m+1],ge),m+=2,O=Math.min(w,ge)}if(z)if(v.opaque)i.splice(X,m-X,w,"overlay "+z),m=X+2;else for(;X<m;X+=2){var Pe=i[X+1];i[X+1]=(Pe?Pe+" ":"")+"overlay "+z}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function _t(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Rt(e,$(t)),i=t.text.length>e.options.maxHighlightLength&&D(e.doc.mode,n.state),o=lt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Rt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new _e(n,!0,t);var o=Lt(e,t,r),a=o>n.first&&x(n,o-1).stateAfter,l=a?_e.fromSaved(n,a,o):new _e(n,d(n.mode),o);return n.iter(o,t,function(s){$t(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 $t(e,t,r,n){var i=e.doc.mode,o=new h(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&zt(i,r.state);!o.eol();)wt(i,o,r.state),o.start=o.pos}function zt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=W(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function wt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=W(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var qt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ut(e,t,r,n){var i=e.doc,o=i.mode,a;t=Y(i,t);var l=x(i,t.line),s=Rt(e,t.line,r),u=new h(l.text,e.options.tabSize,s),v;for(n&&(v=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=wt(o,u,s.state),n&&v.push(new qt(u,a,D(i.mode,s.state)));return n?v:new qt(u,a,s.state)}function jt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function kt(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,v=new h(t,e.options.tabSize,n),m,O=e.options.addModeClass&&[null];for(t==""&&jt(zt(r,n.state),o);!v.eol();){if(v.pos>e.options.maxHighlightLength?(l=!1,a&&$t(e,t,n,v.pos),v.pos=t.length,m=null):m=jt(wt(r,v,n.state,O),o),O){var w=O[0].name;w&&(m="m-"+(m?w+" "+m:w))}if(!l||u!=m){for(;s<v.start;)s=Math.min(v.start,s+5e3),i(s,u);u=m}v.start=v.pos}for(;s<v.pos;){var z=Math.min(v.pos,s+5e3);i(z,u),s=z}}function Lt(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=x(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof it?u.lookAhead:0)<=o.modeFrontier))return l;var v=G(s.text,null,e.options.tabSize);(i==null||n>v)&&(i=l-1,n=v)}return i}function xt(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=x(e,n).stateAfter;if(i&&(!(i instanceof it)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Wt=!1,Et=!1;function fn(){Wt=!0}function Nt(){Et=!0}function Ht(e,t,r){this.marker=e,this.from=t,this.to=r}function an(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Gt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function En(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function jn(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&a.type=="bookmark"&&(!r||!o.marker.insertLeft)){var s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Ht(a,o.from,s?null:o.to))}}return n}function It(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&a.type=="bookmark"&&(!r||o.marker.insertLeft)){var s=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Ht(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function st(e,t){if(t.full)return null;var r=ie(e,t.from.line)&&x(e,t.from.line).markedSpans,n=ie(e,t.to.line)&&x(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=K(t.from,t.to)==0,l=jn(r,i,a),s=It(n,o,a),u=t.text.length==1,v=et(t.text).length+(u?i:0);if(l)for(var m=0;m<l.length;++m){var O=l[m];if(O.to==null){var w=an(s,O.marker);w?u&&(O.to=w.to==null?null:w.to+v):O.to=i}}if(s)for(var z=0;z<s.length;++z){var X=s[z];if(X.to!=null&&(X.to+=v),X.from==null){var ge=an(l,X.marker);ge||(X.from=v,u&&(l||(l=[])).push(X))}else X.from+=v,u&&(l||(l=[])).push(X)}l&&(l=dt(l)),s&&s!=l&&(s=dt(s));var Pe=[l];if(!u){var je=t.text.length-2,Ne;if(je>0&&l)for(var qe=0;qe<l.length;++qe)l[qe].to==null&&(Ne||(Ne=[])).push(new Ht(l[qe].marker,null,null));for(var Ct=0;Ct<je;++Ct)Pe.push(Ne);Pe.push(s)}return Pe}function dt(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function en(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(w){if(w.markedSpans)for(var z=0;z<w.markedSpans.length;++z){var X=w.markedSpans[z].marker;X.readOnly&&(!n||ee(n,X)==-1)&&(n||(n=[])).push(X)}}),!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(!(K(u.to,l.from)<0||K(u.from,l.to)>0)){var v=[s,1],m=K(u.from,l.from),O=K(u.to,l.to);(m<0||!a.inclusiveLeft&&!m)&&v.push({from:u.from,to:l.from}),(O>0||!a.inclusiveRight&&!O)&&v.push({from:l.to,to:u.to}),i.splice.apply(i,v),s+=v.length-3}}return i}function tn(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Vt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function At(e){return e.inclusiveLeft?-1:0}function ln(e){return e.inclusiveRight?1:0}function gn(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=K(n.from,i.from)||At(e)-At(t);if(o)return-o;var a=K(n.to,i.to)||ln(e)-ln(t);return a||t.id-e.id}function mn(e,t){var r=Et&&e.markedSpans,n;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||gn(n,i.marker)<0)&&(n=i.marker);return n}function Tn(e){return mn(e,!0)}function Ue(e){return mn(e,!1)}function $e(e,t){var r=Et&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!n||gn(n,o.marker)<0)&&(n=o.marker)}return n}function gt(e,t,r,n,i){var o=x(e,t),a=Et&&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),v=K(u.from,r)||At(s.marker)-At(i),m=K(u.to,n)||ln(s.marker)-ln(i);if(!(v>=0&&m<=0||v<=0&&m>=0)&&(v<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?K(u.to,r)>=0:K(u.to,r)>0)||v>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?K(u.from,n)<=0:K(u.from,n)<0)))return!0}}}function mt(e){for(var t;t=Tn(e);)e=t.find(-1,!0).line;return e}function vn(e){for(var t;t=Ue(e);)e=t.find(1,!0).line;return e}function Cr(e){for(var t,r;t=Ue(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Kn(e,t){var r=x(e,t),n=mt(r);return r==n?t:$(n)}function _n(e,t){if(t>e.lastLine())return t;var r=x(e,t),n;if(!Fn(e,r))return t;for(;n=Ue(r);)r=n.find(1,!0).line;return $(r)+1}function Fn(e,t){var r=Et&&t.markedSpans;if(r){for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&kn(e,t,n))return!0}}}function kn(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return kn(e,n.line,an(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&kn(e,t,i))return!0}function Mn(e){e=mt(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function sr(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Tn(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Ue(n);){var o=r.find(0,!0);t-=n.text.length-o.from.ch,n=o.to.line,t+=n.text.length-o.to.ch}return t}function qn(e){var t=e.display,r=e.doc;t.maxLine=x(r,r.first),t.maxLineLength=sr(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=sr(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var tr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};tr.prototype.lineNo=function(){return $(this)},Ft(tr);function Kr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),tn(e),Vt(e,r);var i=n?n(e):1;i!=e.height&&B(e,i)}function Xr(e){e.parent=null,tn(e)}var li={},Yr={};function xr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yr:li;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Qr(e,t){var r=be("span",null,null,T?"padding-right: .1px":null),n={pre:be("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=Bi,wn(e.display.measure)&&(a=Ee(o,e.doc.direction))&&(n.addToken=si(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&$(o);Ci(o,n,_t(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=ke(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=ke(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(pn(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(T){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 ct(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=ke(n.pre.className,n.textClass||"")),n}function Ir(e){var t=R("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Bi(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?Si(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,v;if(!s.test(t))e.col+=t.length,v=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,v),p&&P<9&&(u=!0),e.pos+=t.length;else{v=document.createDocumentFragment();for(var m=0;;){s.lastIndex=m;var O=s.exec(t),w=O?O.index-m:t.length-m;if(w){var z=document.createTextNode(l.slice(m,m+w));p&&P<9?v.appendChild(R("span",[z])):v.appendChild(z),e.map.push(e.pos,e.pos+w,z),e.col+=w,e.pos+=w}if(!O)break;m+=w+1;var X=void 0;if(O[0]==" "){var ge=e.cm.options.tabSize,Pe=ge-e.col%ge;X=v.appendChild(R("span",St(Pe),"cm-tab")),X.setAttribute("role","presentation"),X.setAttribute("cm-text"," "),e.col+=Pe}else O[0]=="\r"||O[0]==`
`?(X=v.appendChild(R("span",O[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),X.setAttribute("cm-text",O[0]),e.col+=1):(X=e.cm.options.specialCharPlaceholder(O[0]),X.setAttribute("cm-text",O[0]),p&&P<9?v.appendChild(R("span",[X])):v.appendChild(X),e.col+=1);e.map.push(e.pos,e.pos+1,X),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var je=r||"";n&&(je+=n),i&&(je+=i);var Ne=R("span",[v],je,o);if(a)for(var qe in a)a.hasOwnProperty(qe)&&qe!="style"&&qe!="class"&&Ne.setAttribute(qe,a[qe]);return e.content.appendChild(Ne)}e.content.appendChild(v)}}function Si(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),n+=o,r=o==" "}return n}function si(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,v=u+n.length;;){for(var m=void 0,O=0;O<t.length&&(m=t[O],!(m.to>u&&m.from<=u));O++);if(m.to>=v)return e(r,n,i,o,a,l,s);e(r,n.slice(0,m.to-u),i,o,null,l,s),o=null,n=n.slice(m.to-u),u=m.to}}}function _r(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 Ci(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]),xr(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,v="",m,O,w=0,z,X,ge,Pe,je;;){if(w==s){z=X=ge=O="",je=null,Pe=null,w=1/0;for(var Ne=[],qe=void 0,Ct=0;Ct<n.length;++Ct){var pt=n[Ct],Kt=pt.marker;if(Kt.type=="bookmark"&&pt.from==s&&Kt.widgetNode)Ne.push(Kt);else if(pt.from<=s&&(pt.to==null||pt.to>s||Kt.collapsed&&pt.to==s&&pt.from==s)){if(pt.to!=null&&pt.to!=s&&w>pt.to&&(w=pt.to,X=""),Kt.className&&(z+=" "+Kt.className),Kt.css&&(O=(O?O+";":"")+Kt.css),Kt.startStyle&&pt.from==s&&(ge+=" "+Kt.startStyle),Kt.endStyle&&pt.to==w&&(qe||(qe=[])).push(Kt.endStyle,pt.to),Kt.title&&((je||(je={})).title=Kt.title),Kt.attributes)for(var Sn in Kt.attributes)(je||(je={}))[Sn]=Kt.attributes[Sn];Kt.collapsed&&(!Pe||gn(Pe.marker,Kt)<0)&&(Pe=pt)}else pt.from>s&&w>pt.from&&(w=pt.from)}if(qe)for(var Qn=0;Qn<qe.length;Qn+=2)qe[Qn+1]==w&&(X+=" "+qe[Qn]);if(!Pe||Pe.from==s)for(var Dn=0;Dn<Ne.length;++Dn)_r(t,0,Ne[Dn]);if(Pe&&(Pe.from||0)==s){if(_r(t,(Pe.to==null?l+1:Pe.to)-s,Pe.marker,Pe.from==null),Pe.to==null)return;Pe.to==s&&(Pe=!1)}}if(s>=l)break;for(var br=Math.min(l,w);;){if(v){var dr=s+v.length;if(!Pe){var Bn=dr>br?v.slice(0,br-s):v;t.addToken(t,Bn,m?m+z:z,ge,s+Bn.length==w?X:"",O,je)}if(dr>=br){v=v.slice(br-s),s=br;break}s=dr,ge=""}v=i.slice(o,o=r[u++]),m=xr(r[u++],t.cm.options)}}}function xi(e,t,r){this.line=t,this.rest=Cr(t),this.size=this.rest?$(et(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Fn(e,t)}function Ur(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new xi(e.doc,x(e.doc,o),o);i=o+a.size,n.push(a)}return n}var Ar=null;function ui(e){Ar?Ar.ops.push(e):e.ownsGroup=Ar={ops:[e],delayedCallbacks:[]}}function ht(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Tt(e,t){var r=e.ownsGroup;if(r)try{ht(r)}finally{Ar=null,t(r)}}var yt=null;function ot(e,t){var r=rt(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ar?i=Ar.delayedCallbacks:yt?i=yt:(i=yt=[],setTimeout(yn,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function yn(){var e=yt;yt=null;for(var t=0;t<e.length;++t)e[t]()}function bn(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Gn(e,t):o=="gutter"?ci(e,t,r,n):o=="class"?Rr(e,t):o=="widget"&&Zi(e,t,n)}t.changes=null}function ur(e){return e.node==e.text&&(e.node=R("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),p&&P<8&&(e.node.style.zIndex=2)),e.node}function Mr(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ur(t);t.background=n.insertBefore(R("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Fr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Qr(e,t)}function Gn(e,t){var r=t.text.className,n=Fr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Rr(e,t)):r&&(t.text.className=r)}function Rr(e,t){Mr(e,t),t.line.wrapClass?ur(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function ci(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=ur(t);t.gutterBackground=R("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=ur(t),l=t.gutter=R("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(R("div",Fe(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,v=o.hasOwnProperty(u)&&o[u];v&&l.appendChild(R("div",[v],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Zi(e,t,r){t.alignable&&(t.alignable=null);for(var n=c("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Hr(e,t,r)}function mo(e,t,r,n){var i=Fr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Rr(e,t),ci(e,t,r,n),Hr(e,t,n),t.node}function Hr(e,t,r){if(Lr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Lr(e,t.rest[n],t,r,!1)}function Lr(e,t,r,n,i){if(t.widgets)for(var o=ur(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=R("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Zo(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),ot(s,"redraw")}}function Zo(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Tr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Ae(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;"),F(t.display.measure,R("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function $r(e,t){for(var r=Cn(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function wi(e){return e.lineSpace.offsetTop}function Ki(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function yo(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=F(e.measure,R("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Dr(e){return Ve-e.display.nativeBarWidth}function Br(e){return e.display.scroller.clientWidth-Dr(e)-e.display.barWidth}function _i(e){return e.display.scroller.clientHeight-Dr(e)-e.display.barHeight}function bo(e,t,r){var n=e.options.lineWrapping,i=n&&Br(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 Ui(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if($(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ko(e,t){t=mt(t);var r=$(t),n=e.display.externalMeasured=new xi(e.doc,t,r);n.lineN=r;var i=n.built=Qr(e,n);return n.text=i.pre,F(e.display.lineMeasure,i.pre),n}function ji(e,t,r,n){return Pr(e,Jr(e,t),r,n)}function ki(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[hi(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Jr(e,t){var r=$(t),n=ki(e,r);n&&!n.text?n=null:n&&n.changes&&(bn(e,n,r,ko(e)),e.curOp.forceUpdate=!0),n||(n=Ko(e,t));var i=Ui(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Pr(e,t,r,n,i){t.before&&(r=-1);var o=r+(n||""),a;return t.cache.hasOwnProperty(o)?a=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(bo(e,t.view,t.rect),t.hasHeights=!0),a=Jt(e,t,r,n),a.bogus||(t.cache[o]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var So={left:0,right:0,top:0,bottom:0};function Gi(e,t,r){for(var n,i,o,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(u==e.length-3||t==s&&e[u+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),i!=null){if(n=e[u+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),r=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],a="left";if(r=="right"&&i==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Vi(e,t){var r=So;if(t=="left")for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function Jt(e,t,r,n){var i=Gi(t.map,r,n),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var v=0;v<4;v++){for(;a&&he(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&he(t.line.text.charAt(i.coverStart+l));)++l;if(p&&P<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Vi(We(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}p&&P<11&&(u=Bt(e.display.measure,u))}else{a>0&&(s=n="right");var m;e.options.lineWrapping&&(m=o.getClientRects()).length>1?u=m[n=="right"?m.length-1:0]:u=o.getBoundingClientRect()}if(p&&P<9&&!a&&(!u||!u.left&&!u.right)){var O=o.parentNode.getClientRects()[0];O?u={left:O.left,right:O.left+Oi(e.display),top:O.top,bottom:O.bottom}:u=So}for(var w=u.top-t.rect.top,z=u.bottom-t.rect.top,X=(w+z)/2,ge=t.view.measure.heights,Pe=0;Pe<ge.length-1&&!(X<ge[Pe]);Pe++);var je=Pe?ge[Pe-1]:0,Ne=ge[Pe],qe={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:je,bottom:Ne};return!u.left&&!u.right&&(qe.bogus=!0),e.options.singleCursorHeightPerLine||(qe.rtop=w,qe.rbottom=z),qe}function Bt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Qt(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Vn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function nr(e){e.display.externalMeasure=null,I(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Vn(e.display.view[t])}function On(e){nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function or(){return te&&k?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function gr(){return te&&k?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function jr(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Tr(e.widgets[r]));return t}function wr(e,t,r,n,i){if(!i){var o=jr(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Mn(t);if(n=="local"?a+=wi(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(n=="window"?0:gr());var s=l.left+(n=="window"?0:or());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function kr(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=or(),i-=gr();else if(r=="local"||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Nr(e,t,r,n,i){return n||(n=x(e.doc,t.line)),wr(e,n,ji(e,n,t.ch,i),r)}function mr(e,t,r,n,i,o){n=n||x(e.doc,t.line),i||(i=Jr(e,n));function a(z,X){var ge=Pr(e,i,z,X?"right":"left",o);return X?ge.left=ge.right:ge.right=ge.left,wr(e,n,ge,r)}var l=Ee(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 v(z,X,ge){var Pe=l[X],je=Pe.level==1;return a(ge?z-1:z,je!=ge)}var m=Ie(l,s,u),O=ce,w=v(s,m,u=="before");return O!=null&&(w.other=v(s,O,u!="before")),w}function Ca(e,t){var r=0;t=Y(e.doc,t),e.options.lineWrapping||(r=Oi(e.display)*t.ch);var n=x(e.doc,t.line),i=Mn(n)+wi(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function _o(e,t,r,n,i){var o=M(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Uo(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return _o(n.first,0,null,-1,-1);var i=se(n,r),o=n.first+n.size-1;if(i>o)return _o(n.first+n.size-1,x(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=x(n,i);;){var l=Zl(e,a,i,t,r),s=$e(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=x(n,i=u.line)}}function xa(e,t,r,n){n-=jr(t);var i=t.text.length,o=ne(function(a){return Pr(e,r,a-1).bottom<=n},i,0);return i=ne(function(a){return Pr(e,r,a).top>n},o,i),{begin:o,end:i}}function wa(e,t,r,n){r||(r=Jr(e,t));var i=wr(e,t,Pr(e,r,n),"line").top;return xa(e,t,r,i)}function jo(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Zl(e,t,r,n,i){i-=Mn(t);var o=Jr(e,t),a=jr(t),l=0,s=t.text.length,u=!0,v=Ee(t,e.doc.direction);if(v){var m=(e.options.lineWrapping?_l:Kl)(e,t,r,o,v,n,i);u=m.level!=1,l=u?m.from:m.to-1,s=u?m.to:m.from-1}var O=null,w=null,z=ne(function(Ct){var pt=Pr(e,o,Ct);return pt.top+=a,pt.bottom+=a,jo(pt,n,i,!1)?(pt.top<=i&&pt.left<=n&&(O=Ct,w=pt),!0):!1},l,s),X,ge,Pe=!1;if(w){var je=n-w.left<w.right-n,Ne=je==u;z=O+(Ne?0:1),ge=Ne?"after":"before",X=je?w.left:w.right}else{!u&&(z==s||z==l)&&z++,ge=z==0?"after":z==t.text.length?"before":Pr(e,o,z-(u?1:0)).bottom+a<=i==u?"after":"before";var qe=mr(e,M(r,z,ge),"line",t,o);X=qe.left,Pe=i<qe.top?-1:i>=qe.bottom?1:0}return z=Le(t.text,z,1),_o(r,z,ge,Pe,n-X)}function Kl(e,t,r,n,i,o,a){var l=ne(function(m){var O=i[m],w=O.level!=1;return jo(mr(e,M(r,w?O.to:O.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,v=mr(e,M(r,u?s.from:s.to,u?"after":"before"),"line",t,n);jo(v,o,a,!0)&&v.top>a&&(s=i[l-1])}return s}function _l(e,t,r,n,i,o,a){var l=xa(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var v=null,m=null,O=0;O<i.length;O++){var w=i[O];if(!(w.from>=u||w.to<=s)){var z=w.level!=1,X=Pr(e,n,z?Math.min(u,w.to)-1:Math.max(s,w.from)).right,ge=X<o?o-X+1e9:X-o;(!v||m>ge)&&(v=w,m=ge)}}return v||(v=i[i.length-1]),v.from<s&&(v={from:s,to:v.to,level:v.level}),v.to>u&&(v={from:v.from,to:u,level:v.level}),v}var fi;function Ei(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(fi==null){fi=R("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)fi.appendChild(document.createTextNode("x")),fi.appendChild(R("br"));fi.appendChild(document.createTextNode("x"))}F(e.measure,fi);var r=fi.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),I(e.measure),r||1}function Oi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=R("span","xxxxxxxxxx"),r=R("pre",[t],"CodeMirror-line-like");F(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ko(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=o.offsetLeft+o.clientLeft+i,n[l]=o.clientWidth}return{fixedPos:Go(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Go(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ea(e){var t=Ei(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Oi(e.display)-3);return function(i){if(Fn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Vo(e){var t=e.doc,r=Ea(e);t.iter(function(n){var i=r(n);i!=n.height&&B(n,i)})}function di(e,t,r,n){var i=e.display;if(!r&&Cn(t).getAttribute("cm-not-content")=="true")return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(m){return null}var s=Uo(e,o,a),u;if(n&&s.xRel>0&&(u=x(e.doc,s.line).text).length==s.ch){var v=G(u,u.length,e.options.tabSize)-u.length;s=M(s.line,Math.max(0,Math.round((o-yo(e.display).left)/Oi(e.display))-v))}return s}function hi(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function cr(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Et&&Kn(e.doc,t)<i.viewTo&&ei(e);else if(r<=i.viewFrom)Et&&_n(e.doc,r+n)>i.viewFrom?ei(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)ei(e);else if(t<=i.viewFrom){var o=Co(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):ei(e)}else if(r>=i.viewTo){var a=Co(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):ei(e)}else{var l=Co(e,t,t,-1),s=Co(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Ur(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):ei(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function qr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[hi(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);ee(a,r)==-1&&a.push(r)}}}function ei(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Co(e,t,r,n){var i=hi(e,t),o,a=e.display.view;if(!Et||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(;Kn(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 Ul(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Ur(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ur(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(hi(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Ur(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,hi(e,r)))),n.viewTo=r}function Oa(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function Xi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ia(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(!(!t&&a==r.sel.primIndex)){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Ma(e,l.head,i),s||jl(e,l,o)}}return n}function Ma(e,t,r){var n=mr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(R("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(R("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 xo(e,t){return e.top-t.top||e.left-t.left}function jl(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=yo(e.display),l=a.left,s=Math.max(n.sizerWidth,Br(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function v(Ne,qe,Ct,pt){qe<0&&(qe=0),qe=Math.round(qe),pt=Math.round(pt),o.appendChild(R("div",null,"CodeMirror-selected","position: absolute; left: "+Ne+`px;
top: `+qe+"px; width: "+(Ct==null?s-Ne:Ct)+`px;
height: `+(pt-qe)+"px"))}function m(Ne,qe,Ct){var pt=x(i,Ne),Kt=pt.text.length,Sn,Qn;function Dn(Bn,hr){return Nr(e,M(Ne,Bn),"div",pt,hr)}function br(Bn,hr,er){var Un=wa(e,pt,null,Bn),Zn=hr=="ltr"==(er=="after")?"left":"right",Pn=er=="after"?Un.begin:Un.end-(/\s/.test(pt.text.charAt(Un.end-1))?2:1);return Dn(Pn,Zn)[Zn]}var dr=Ee(pt,i.direction);return Ye(dr,qe||0,Ct==null?Kt:Ct,function(Bn,hr,er,Un){var Zn=er=="ltr",Pn=Dn(Bn,Zn?"left":"right"),vr=Dn(hr-1,Zn?"right":"left"),Wi=qe==null&&Bn==0,ai=Ct==null&&hr==Kt,ir=Un==0,Zr=!dr||Un==dr.length-1;if(vr.top-Pn.top<=3){var Jn=(u?Wi:ai)&&ir,ba=(u?ai:Wi)&&Zr,Vr=Jn?l:(Zn?Pn:vr).left,yi=ba?s:(Zn?vr:Pn).right;v(Vr,Pn.top,yi-Vr,Pn.bottom)}else{var bi,lr,Hi,Sa;Zn?(bi=u&&Wi&&ir?l:Pn.left,lr=u?s:br(Bn,er,"before"),Hi=u?l:br(hr,er,"after"),Sa=u&&ai&&Zr?s:vr.right):(bi=u?br(Bn,er,"before"):l,lr=!u&&Wi&&ir?s:Pn.right,Hi=!u&&ai&&Zr?l:vr.left,Sa=u?br(hr,er,"after"):s),v(bi,Pn.top,lr-bi,Pn.bottom),Pn.bottom<vr.top&&v(l,Pn.bottom,null,vr.top),v(Hi,vr.top,Sa-Hi,vr.bottom)}(!Sn||xo(Pn,Sn)<0)&&(Sn=Pn),xo(vr,Sn)<0&&(Sn=vr),(!Qn||xo(Pn,Qn)<0)&&(Qn=Pn),xo(vr,Qn)<0&&(Qn=vr)}),{start:Sn,end:Qn}}var O=t.from(),w=t.to();if(O.line==w.line)m(O.line,O.ch,w.ch);else{var z=x(i,O.line),X=x(i,w.line),ge=mt(z)==mt(X),Pe=m(O.line,O.ch,ge?z.text.length+1:null).end,je=m(w.line,ge?0:null,w.ch).start;ge&&(Pe.top<je.top-2?(v(Pe.right,Pe.top,null,Pe.bottom),v(l,je.top,je.left,je.bottom)):v(Pe.right,Pe.top,je.left-Pe.right,Pe.bottom)),Pe.bottom<je.top&&v(l,Pe.bottom,null,je.top)}r.appendChild(o)}function Xo(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ii(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ra(e){e.state.focused||(e.display.input.focus(),Yo(e))}function La(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ii(e))},100)}function Yo(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(ct(e,"focus",e,t),e.state.focused=!0,ut(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),T&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xo(e))}function Ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ct(e,"blur",e,t),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function wo(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(p&&P<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 v=i.line.height-a;if((v>.005||v<-.005)&&(B(i.line,a),Ta(i.line),i.rest))for(var m=0;m<i.rest.length;m++)Ta(i.rest[m]);if(l>e.display.sizerWidth){var O=Math.ceil(l/Oi(e.display));O>e.display.maxLineLength&&(e.display.maxLineLength=O,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ta(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Eo(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-wi(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=se(t,n),a=se(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=se(t,Mn(x(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=se(t,Mn(x(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function kl(e,t){if(!vt(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&&!ve){var o=R("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-wi(e.display))+`px;
height: `+(t.bottom-t.top+Dr(e)+r.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Gl(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?M(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?M(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=mr(e,t),s=!r||r==t?l:mr(e,r);i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n};var u=Qo(e,i),v=e.doc.scrollTop,m=e.doc.scrollLeft;if(u.scrollTop!=null&&(Qi(e,u.scrollTop),Math.abs(e.doc.scrollTop-v)>1&&(a=!0)),u.scrollLeft!=null&&(vi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-m)>1&&(a=!0)),!a)break}return i}function Vl(e,t){var r=Qo(e,t);r.scrollTop!=null&&Qi(e,r.scrollTop),r.scrollLeft!=null&&vi(e,r.scrollLeft)}function Qo(e,t){var r=e.display,n=Ei(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=_i(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Ki(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 v=Math.min(t.top,(u?l:t.bottom)-o);v!=i&&(a.scrollTop=v)}var m=e.options.fixedGutter?0:r.gutters.offsetWidth,O=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-m,w=Br(e)-r.gutters.offsetWidth,z=t.right-t.left>w;return z&&(t.right=t.left+w),t.left<10?a.scrollLeft=0:t.left<O?a.scrollLeft=Math.max(0,t.left+m-(z?0:10)):t.right>w+O-3&&(a.scrollLeft=t.right+(z?0:10)-w),a}function Jo(e,t){t!=null&&(Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mi(e){Oo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yi(e,t,r){(t!=null||r!=null)&&Oo(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Xl(e,t){Oo(e),e.curOp.scrollToPos=t}function Oo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=Ca(e,t.from),n=Ca(e,t.to);Da(e,r,n,t.margin)}}function Da(e,t,r,n){var i=Qo(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yi(e,i.scrollLeft,i.scrollTop)}function Qi(e,t){Math.abs(e.doc.scrollTop-t)<2||(E||ea(e,{top:t}),Pa(e,t,!0),E&&ea(e),eo(e,100))}function Pa(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function vi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,za(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ji(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Ki(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Dr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var pi=function(e,t,r){this.cm=r;var n=this.vert=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),U(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),U(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&P<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},pi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pi.prototype.zeroWidthHack=function(){var e=nt&&!N?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},pi.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),o=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},pi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qi=function(){};qi.prototype.update=function(){return{bottom:0,right:0}},qi.prototype.setScrollLeft=function(){},qi.prototype.setScrollTop=function(){},qi.prototype.clear=function(){};function Ri(e,t){t||(t=Ji(e));var r=e.display.barWidth,n=e.display.barHeight;Na(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&wo(e),Na(e,Ji(e)),r=e.display.barWidth,n=e.display.barHeight}function Na(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Aa={native:pi,null:qi};function Fa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Aa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),U(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?vi(e,t):Qi(e,t)},e),e.display.scrollbars.addClass&&ut(e.display.wrapper,e.display.scrollbars.addClass)}var Yl=0;function gi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Yl},ui(e.curOp)}function mi(e){var t=e.curOp;t&&Tt(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Ql(r)})}function Ql(e){for(var t=e.ops,r=0;r<t.length;r++)Jl(t[r]);for(var n=0;n<t.length;n++)ql(t[n]);for(var i=0;i<t.length;i++)es(t[i]);for(var o=0;o<t.length;o++)ts(t[o]);for(var a=0;a<t.length;a++)ns(t[a])}function Jl(e){var t=e.cm,r=t.display;is(t),e.updateMaxLine&&qn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ql(e){e.updatedDisplay=e.mustUpdate&&qo(e.cm,e.update)}function es(e){var t=e.cm,r=t.display;e.updatedDisplay&&wo(t),e.barMeasure=Ji(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ji(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Dr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Br(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function ts(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&vi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==me();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ri(t,e.barMeasure),e.updatedDisplay&&na(t,e.barMeasure),e.selectionChanged&&Xo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Ra(e.cm)}function ns(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&$a(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Pa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&vi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Gl(t,Y(n,e.scrollToPos.from),Y(n,e.scrollToPos.to),e.scrollToPos.margin);kl(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||ct(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&ct(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ct(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function yr(e,t){if(e.curOp)return t();gi(e);try{return t()}finally{mi(e)}}function Xn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);gi(e);try{return t.apply(e,arguments)}finally{mi(e)}}}function ar(e){return function(){if(this.curOp)return e.apply(this,arguments);gi(this);try{return e.apply(this,arguments)}finally{mi(this)}}}function Yn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);gi(t);try{return e.apply(this,arguments)}finally{mi(t)}}}function eo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,le(rs,e))}function rs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Rt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?D(t.mode,n.state):null,s=lt(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,v=s.classes;v?o.styleClasses=v:u&&(o.styleClasses=null);for(var m=!a||a.length!=o.styles.length||u!=v&&(!u||!v||u.bgClass!=v.bgClass||u.textClass!=v.textClass),O=0;!m&&O<a.length;++O)m=a[O]!=o.styles[O];m&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&$t(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return eo(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&yr(e,function(){for(var o=0;o<i.length;o++)qr(e,i[o],"text")})}}var Io=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Eo(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Br(e),this.force=r,this.dims=ko(e),this.events=[]};Io.prototype.signal=function(e,t){Zt(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ct.apply(null,this.events[e])};function is(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Dr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Dr(e)+"px",t.scrollbarsClipped=!0)}function os(e){if(e.hasFocus())return null;var t=me();if(!t||!Ae(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Ae(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&&Ae(document.body,e.anchorNode)&&Ae(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function qo(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return ei(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&Oa(e)==0)return!1;Wa(e)&&(ei(e),t.dims=ko(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Et&&(o=Kn(e.doc,o),a=_n(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Ul(e,o,a),r.viewOffset=Mn(x(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Oa(e);if(!l&&s==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=os(e);return s>4&&(r.lineDiv.style.display="none"),ls(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,as(u),I(r.cursorDiv),I(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,eo(e,400)),r.updateLineNumbers=null,!0}function $a(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Br(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+Ki(e.display)-_i(e),r.top)}),t.visible=Eo(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Eo(e.display,e.doc,r));if(!qo(e,t))break;wo(e);var i=Ji(e);Xi(e),Ri(e,i),na(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ea(e,t){var r=new Io(e,t);if(qo(e,r)){wo(e),$a(e,r);var n=Ji(e);Xi(e),Ri(e,n),na(e,n),r.finish()}}function ls(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function l(z){var X=z.nextSibling;return T&&nt&&e.display.currentWheelTarget==z?z.style.display="none":z.parentNode.removeChild(z),X}for(var s=n.view,u=n.viewFrom,v=0;v<s.length;v++){var m=s[v];if(!m.hidden)if(!m.node||m.node.parentNode!=o){var O=mo(e,m,u,r);o.insertBefore(O,a)}else{for(;a!=m.node;)a=l(a);var w=i&&t!=null&&t<=u&&m.lineNumber;m.changes&&(ee(m.changes,"gutter")>-1&&(w=!1),bn(e,m,u,r)),w&&(I(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(Fe(e.options,u)))),a=m.node.nextSibling}u+=m.size}for(;a;)a=l(a)}function ta(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function na(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Dr(e)+"px"}function za(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=Go(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Wa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Fe(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(R("div",[R("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ta(e.display),!0}return!1}function ra(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null;if(typeof o!="string"&&(a=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Ha(e){var t=e.gutters,r=e.gutterSpecs;I(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,l=t.appendChild(R("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),o=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ta(e)}function to(e){Ha(e.display),cr(e),za(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=R("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=R("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=be("div",null,"CodeMirror-code"),i.selectionDiv=R("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=R("div",null,"CodeMirror-cursors"),i.measure=R("div",null,"CodeMirror-measure"),i.lineMeasure=R("div",null,"CodeMirror-measure"),i.lineSpace=be("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=be("div",[i.lineSpace],"CodeMirror-lines");i.mover=R("div",[o],null,"position: relative"),i.sizer=R("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=R("div",null,null,"position: absolute; height: "+Ve+"px; width: 1px;"),i.gutters=R("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=R("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=R("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),p&&P<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!T&&!(E&&Xe)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=ra(n.gutters,n.lineNumbers),Ha(i),r.init(i)}var Mo=0,Er=null;p?Er=-.53:E?Er=15:te?Er=-.7:Ce&&(Er=-1/3);function Ba(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=Ba(e);return t.x*=Er,t.y*=Er,t}function Za(e,t){var r=Ba(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&nt&&T){e:for(var u=t.target,v=o.view;u!=a;u=u.parentNode)for(var m=0;m<v.length;m++)if(v[m].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!E&&!y&&Er!=null){i&&s&&Qi(e,Math.max(0,a.scrollTop+i*Er)),vi(e,Math.max(0,a.scrollLeft+n*Er)),(!i||i&&s)&&Pt(t),o.wheelStartX=null;return}if(i&&Er!=null){var O=i*Er,w=e.doc.scrollTop,z=w+o.wrapper.clientHeight;O<0?w=Math.max(0,w+O-50):z=Math.min(e.doc.height,z+O+50),ea(e,{top:w,bottom:z})}Mo<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(o.wheelStartX!=null){var X=a.scrollLeft-o.wheelStartX,ge=a.scrollTop-o.wheelStartY,Pe=ge&&o.wheelDY&&ge/o.wheelDY||X&&o.wheelDX&&X/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Pe&&(Er=(Er*Mo+Pe)/(Mo+1),++Mo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Or=function(e,t){this.ranges=e,this.primIndex=t};Or.prototype.primary=function(){return this.ranges[this.primIndex]},Or.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Ke(r.anchor,n.anchor)||!Ke(r.head,n.head))return!1}return!0},Or.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new cn(pe(this.ranges[t].anchor),pe(this.ranges[t].head));return new Or(e,this.primIndex)},Or.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Or.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(K(t,n.from())>=0&&K(e,n.to())<=0)return r}return-1};var cn=function(e,t){this.anchor=e,this.head=t};cn.prototype.from=function(){return Te(this.anchor,this.head)},cn.prototype.to=function(){return Be(this.anchor,this.head)},cn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function zr(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(O,w){return K(O.from(),w.from())}),r=ee(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=K(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=Te(l.from(),a.from()),v=Be(l.to(),a.to()),m=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new cn(m?v:u,m?u:v))}}return new Or(t,r)}function ti(e,t){return new Or([new cn(e,t||e)],0)}function ni(e){return e.text?M(e.from.line+e.text.length-1,et(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ka(e,t){if(K(e,t.from)<0)return e;if(K(e,t.to)<=0)return ni(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ni(t).ch-t.to.ch),M(r,n)}function ia(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new cn(Ka(i.anchor,t),Ka(i.head,t)))}return zr(e.cm,r,e.sel.primIndex)}function _a(e,t,r){return e.line==t.line?M(r.line,e.ch-t.ch+r.ch):M(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=M(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=_a(l.from,i,o),u=_a(ni(l),i,o);if(i=l.to,o=u,r=="around"){var v=e.sel.ranges[a],m=K(v.head,v.anchor)<0;n[a]=new cn(m?u:s,m?s:u)}else n[a]=new cn(s,s)}return new Or(n,e.sel.primIndex)}function oa(e){e.doc.mode=Qe(e.options,e.doc.modeOption),no(e)}function no(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,eo(e,100),e.state.modeGen++,e.curOp&&cr(e)}function Ua(e,t){return t.from.ch==0&&t.to.ch==0&&et(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function aa(e,t,r,n){function i(je){return r?r[je]:null}function o(je,Ne,qe){Kr(je,Ne,qe,n),ot(je,"change",je,t)}function a(je,Ne){for(var qe=[],Ct=je;Ct<Ne;++Ct)qe.push(new tr(u[Ct],i(Ct),n));return qe}var l=t.from,s=t.to,u=t.text,v=x(e,l.line),m=x(e,s.line),O=et(u),w=i(u.length-1),z=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Ua(e,t)){var X=a(0,u.length-1);o(m,m.text,w),z&&e.remove(l.line,z),X.length&&e.insert(l.line,X)}else if(v==m)if(u.length==1)o(v,v.text.slice(0,l.ch)+O+v.text.slice(s.ch),w);else{var ge=a(1,u.length-1);ge.push(new tr(O+v.text.slice(s.ch),w,n)),o(v,v.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,ge)}else if(u.length==1)o(v,v.text.slice(0,l.ch)+u[0]+m.text.slice(s.ch),i(0)),e.remove(l.line+1,z);else{o(v,v.text.slice(0,l.ch)+u[0],i(0)),o(m,O+m.text.slice(s.ch),w);var Pe=a(1,u.length-1);z>1&&e.remove(l.line+1,z-1),e.insert(l.line+1,Pe)}ot(e,"change",e,t)}function ri(e,t,r){function n(i,o,a){if(i.linked)for(var l=0;l<i.linked.length;++l){var s=i.linked[l];if(s.doc!=o){var u=a&&s.sharedHist;r&&!u||(t(s.doc,u),n(s.doc,i,u))}}}n(e,null,!0)}function ja(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Vo(e),oa(e),ka(e),e.options.lineWrapping||qn(e),e.options.mode=t.modeOption,cr(e)}function ka(e){(e.doc.direction=="rtl"?ut:b)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){yr(e,function(){ka(e),cr(e)})}function Ro(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function la(e,t){var r={from:pe(t.from),to:ni(t),text:L(e,t.from,t.to)};return Xa(e,r,t.from.line,t.to.line+1),ri(e,function(n){return Xa(n,r,t.from.line,t.to.line+1)},!0),r}function Ga(e){for(;e.length;){var t=et(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return Ga(e.done),et(e.done);if(e.done.length&&!et(e.done).ranges)return et(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),et(e.done)}function Va(e,t,r,n){var i=e.history;i.undone.length=0;var o=+new Date,a,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(a=ds(i,i.lastOp==n)))l=et(a.changes),K(t.from,t.to)==0&&K(t.from,l.to)==0?l.to=ni(t):a.changes.push(la(e,t));else{var s=et(i.done);for((!s||!s.ranges)&&Lo(e.sel,i.done),a={changes:[la(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||ct(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,et(i.done),t))?i.done[i.done.length-1]=t:Lo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Ga(i.undone)}function Lo(e,t){var r=et(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Xa(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function ps(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function gs(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ps(r[i]));return n}function Ya(e,t){var r=gs(e,t),n=st(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function Li(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?Or.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],v=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var m in u)(v=m.match(/^spans_(\d+)$/))&&ee(t,Number(v[1]))>-1&&(et(l)[m]=u[m],delete u[m])}}return n}function sa(e,t,r,n){if(n){var i=e.anchor;if(r){var o=K(t,i)<0;o!=K(r,i)<0?(i=t,t=r):o!=K(t,r)<0&&(t=r)}return new cn(i,t)}else return new cn(r||t,t)}function To(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),rr(e,new Or([sa(e.sel.primary(),t,r,i)],0),n)}function Qa(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=sa(e.sel.ranges[o],t[o],null,i);var a=zr(e.cm,n,e.sel.primIndex);rr(e,a,r)}function ua(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,rr(e,zr(e.cm,i,e.sel.primIndex),n)}function Ja(e,t,r,n){rr(e,ti(t,r),n)}function ms(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new cn(Y(e,i[o].anchor),Y(e,i[o].head))},origin:r&&r.origin};return ct(e,"beforeSelectionChange",e,n),e.cm&&ct(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?zr(e.cm,n.ranges,n.ranges.length-1):t}function qa(e,t,r){var n=e.history.done,i=et(n);i&&i.ranges?(n[n.length-1]=t,Do(e,t,r)):rr(e,t,r)}function rr(e,t,r){Do(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Do(e,t,r){(Zt(e,"beforeSelectionChange")||e.cm&&Zt(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(K(t.primary().head,e.sel.primary().head)<0?-1:1);el(e,nl(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Mi(e.cm)}function el(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,rn(e.cm)),ot(e,"cursorActivity",e))}function tl(e){el(e,nl(e,e.sel,null,!1))}function nl(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Po(e,a.anchor,l&&l.anchor,r,n),u=Po(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new cn(s,u))}return i?zr(e.cm,i,t.primIndex):t}function Ti(e,t,r,n,i){var o=x(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,v="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(v?l.to>=t.ch:l.to>t.ch))){if(i&&(ct(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var m=s.find(n<0?1:-1),O=void 0;if((n<0?v:u)&&(m=rl(e,m,-n,m&&m.line==t.line?o:null)),m&&m.line==t.line&&(O=K(m,r))&&(n<0?O<0:O>0))return Ti(e,m,t,n,i)}var w=s.find(n<0?-1:1);return(n<0?u:v)&&(w=rl(e,w,n,w.line==t.line?o:null)),w?Ti(e,w,t,n,i):null}}return t}function Po(e,t,r,n,i){var o=n||1,a=Ti(e,t,r,o,i)||!i&&Ti(e,t,r,o,!0)||Ti(e,t,r,-o,i)||!i&&Ti(e,t,r,-o,!0);return a||(e.cantEdit=!0,M(e.first,0))}function rl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?Y(e,M(t.line-1)):null:r>0&&t.ch==(n||x(e,t.line)).text.length?t.line<e.first+e.size-1?M(t.line+1,0):null:new M(t.line,t.ch+r)}function il(e){e.setSelection(M(e.firstLine(),0),M(e.lastLine()),ue)}function ol(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,o,a,l){i&&(n.from=Y(e,i)),o&&(n.to=Y(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),ct(e,"beforeChange",e,n),e.cm&&ct(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Di(e,t,r){if(e.cm){if(!e.cm.curOp)return Xn(e.cm,Di)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((Zt(e,"beforeChange")||e.cm&&Zt(e.cm,"beforeChange"))&&(t=ol(e,t,!0),!t))){var n=Wt&&!r&&en(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)al(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else al(e,t)}}function al(e,t){if(!(t.text.length==1&&t.text[0]==""&&K(t.from,t.to)==0)){var r=ia(e,t);Va(e,t,r,e.cm?e.cm.curOp.id:NaN),ro(e,t,r,st(e,t));var n=[];ri(e,function(i,o){!o&&ee(n,i.history)==-1&&(cl(i.history,t),n.push(i.history)),ro(i,t,null,st(i,t))})}}function No(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!r)){for(var i=e.history,o,a=e.sel,l=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u<l.length&&(o=l[u],!(r?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=l.pop(),o.ranges){if(Lo(o,s),r&&!o.equals(e.sel)){rr(e,o,{clearRedo:!1});return}a=o}else if(n){l.push(o);return}else break;var v=[];Lo(a,s),s.push({changes:v,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var m=Zt(e,"beforeChange")||e.cm&&Zt(e.cm,"beforeChange"),O=function(X){var ge=o.changes[X];if(ge.origin=t,m&&!ol(e,ge,!1))return l.length=0,{};v.push(la(e,ge));var Pe=X?ia(e,ge):et(l);ro(e,ge,Pe,Ya(e,ge)),!X&&e.cm&&e.cm.scrollIntoView({from:ge.from,to:ni(ge)});var je=[];ri(e,function(Ne,qe){!qe&&ee(je,Ne.history)==-1&&(cl(Ne.history,ge),je.push(Ne.history)),ro(Ne,ge,null,Ya(Ne,ge))})},w=o.changes.length-1;w>=0;--w){var z=O(w);if(z)return z.v}}}}function ll(e,t){if(t!=0&&(e.first+=t,e.sel=new Or(Ot(e.sel.ranges,function(i){return new cn(M(i.anchor.line+t,i.anchor.ch),M(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){cr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)qr(e.cm,n,"gutter")}}function ro(e,t,r,n){if(e.cm&&!e.cm.curOp)return Xn(e.cm,ro)(e,t,r,n);if(t.to.line<e.first){ll(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ll(e,i),t={from:M(e.first,0),to:M(t.to.line+i,t.to.ch),text:[et(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:M(o,x(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=L(e,t.from,t.to),r||(r=ia(e,t)),e.cm?ys(e.cm,t,n):aa(e,t,n),Do(e,r,ue),e.cantEdit&&Po(e,M(e.firstLine(),0))&&(e.cantEdit=!1)}}function ys(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=$(mt(x(n,o.line))),n.iter(s,a.line+1,function(w){if(w==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&rn(e),aa(n,t,r,Ea(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(w){var z=sr(w);z>i.maxLineLength&&(i.maxLine=w,i.maxLineLength=z,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),xt(n,o.line),eo(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?cr(e):o.line==a.line&&t.text.length==1&&!Ua(e.doc,t)?qr(e,o.line,"text"):cr(e,o.line,a.line+1,u);var v=Zt(e,"changes"),m=Zt(e,"change");if(m||v){var O={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};m&&ot(e,"change",e,O),v&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(O)}e.display.selForContextMenu=null}function Pi(e,t,r,n,i){var o;n||(n=r),K(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Di(e,{from:r,to:n,text:t,origin:i})}function sl(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ul(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)sl(o.ranges[l].anchor,t,r,n),sl(o.ranges[l].head,t,r,n);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(r<u.from.line)u.from=M(u.from.line+n,u.from.ch),u.to=M(u.to.line+n,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function cl(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ul(e.done,r,n,i),ul(e.undone,r,n,i)}function io(e,t,r,n){var i=t,o=t;return typeof t=="number"?o=x(e,ft(e,t)):i=$(t),i==null?null:(n(o,i)&&e.cm&&qr(e.cm,i,r),o)}function oo(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}oo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Xr(i),ot(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function ao(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}ao.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof oo))){var l=[];this.collapse(l),this.children=[new oo(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new oo(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new ao(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=ee(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ao(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if((t-=a)==0)break;e=0}else e-=o}}};var lo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};lo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=$(r);if(!(n==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Tr(this);B(r,Math.max(0,r.height-o)),e&&(yr(e,function(){fl(e,r,-o),qr(e,n,"widget")}),ot(e,"lineWidgetCleared",e,this,n))}},lo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Tr(this)-t;i&&(Fn(this.doc,n)||B(n,n.height+i),r&&yr(r,function(){r.curOp.forceUpdate=!0,fl(r,n,i),ot(r,"lineWidgetChanged",r,e,$(n))}))},Ft(lo);function fl(e,t,r){Mn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Jo(e,r)}function bs(e,t,r,n){var i=new lo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),io(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!Fn(e,a)){var s=Mn(a)<e.scrollTop;B(a,a.height+Tr(i)),s&&Jo(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&ot(o,"lineWidgetAdded",o,i,typeof t=="number"?t:$(t)),i}var dl=0,ii=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++dl};ii.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&gi(e),Zt(this,"clear")){var r=this.find();r&&ot(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=an(a.markedSpans,this);e&&!this.collapsed?qr(e,$(a),"text"):e&&(l.to!=null&&(i=$(a)),l.from!=null&&(n=$(a))),a.markedSpans=Gt(a.markedSpans,l),l.from==null&&this.collapsed&&!Fn(this.doc,a)&&e&&B(a,Ei(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=mt(this.lines[s]),v=sr(u);v>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=v,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&cr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&tl(e.doc)),e&&ot(e,"markerCleared",e,this,n,i),t&&mi(e),this.parent&&this.parent.clear()}},ii.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=an(o.markedSpans,this);if(a.from!=null&&(r=M(t?o:$(o),a.from),e==-1))return r;if(a.to!=null&&(n=M(t?o:$(o),a.to),e==1))return n}return r&&{from:r,to:n}},ii.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||yr(n,function(){var i=t.line,o=$(t.line),a=ki(n,o);if(a&&(Vn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Fn(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=Tr(r)-l;s&&B(i,i.height+s)}ot(n,"markerChanged",n,e)})},ii.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ee(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ii.prototype.detachLine=function(e){if(this.lines.splice(ee(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ft(ii);function Ni(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Xn(e.cm,Ni)(e,t,r,n,i);var o=new ii(e,i),a=K(t,r);if(n&&H(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=be("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(gt(e,t.line,t,r,o)||t.line!=r.line&&gt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nt()}o.addToHistory&&Va(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,u;if(e.iter(l,r.line+1,function(m){s&&o.collapsed&&!s.options.lineWrapping&&mt(m)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&B(m,0),En(m,new Ht(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(m){Fn(e,m)&&B(m,0)}),o.clearOnEnter&&U(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(fn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++dl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)cr(s,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var v=t.line;v<=r.line;v++)qr(s,v,"text");o.atomic&&tl(s.doc),ot(s,"markerAdded",s,o)}return o}var so=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};so.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ot(this,"clear")}},so.prototype.find=function(e,t){return this.primary.find(e,t)},Ft(so);function Ss(e,t,r,n,i){n=H(n),n.shared=!1;var o=[Ni(e,t,r,n,i)],a=o[0],l=n.widgetNode;return ri(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Ni(s,Y(s,t),Y(s,r),n,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=et(o)}),new so(o,a)}function hl(e){return e.findMarks(M(e.first,0),e.clipPos(M(e.lastLine())),function(t){return t.parent})}function 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(K(o,a)){var l=Ni(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];ri(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];ee(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var ws=0,fr=function(e,t,r,n,i){if(!(this instanceof fr))return new fr(e,t,r,n,i);r==null&&(r=0),ao.call(this,[new oo([new tr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=M(r,0);this.sel=ti(o),this.history=new Ro(null),this.id=++ws,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),aa(this,{from:o,to:o,text:e}),rr(this,ti(o),ue)};fr.prototype=we(ao.prototype,{constructor:fr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Q(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=M(this.first,0),r=this.first+this.size-1;Di(this,{from:t,to:M(r,x(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yi(this.cm,0,0),rr(this,ti(t),ue)}),replaceRange:function(e,t,r,n){t=Y(this,t),r=r?Y(this,r):t,Pi(this,e,t,r,n)},getRange:function(e,t,r){var n=L(this,Y(this,e),Y(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(ie(this,e))return x(this,e)},getLineNumber:function(e){return $(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=x(this,e)),mt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Y(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yn(function(e,t,r){Ja(this,Y(this,typeof e=="number"?M(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ja(this,Y(this,e),Y(this,t||e),r)}),extendSelection:Yn(function(e,t,r){To(this,Y(this,e),t&&Y(this,t),r)}),extendSelections:Yn(function(e,t){Qa(this,De(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=Ot(this.sel.ranges,e);Qa(this,De(this,r),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new cn(Y(this,e[i].anchor),Y(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),rr(this,zr(this.cm,n,t),r)}}),addSelection:Yn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new cn(Y(this,e),Y(this,t||e))),rr(this,zr(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=L(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=L(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Yn(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&t!="end"&&cs(this,n,t),s=n.length-1;s>=0;s--)Di(this,n[s]);l?qa(this,l):this.cm&&Mi(this.cm)}),undo:Yn(function(){No(this,"undo")}),redo:Yn(function(){No(this,"redo")}),undoSelection:Yn(function(){No(this,"undo",!0)}),redoSelection:Yn(function(){No(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ro(this.history.maxGeneration),ri(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Li(this.history.done),undone:Li(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history.maxGeneration);t.done=Li(e.done.slice(0),null,!0),t.undone=Li(e.undone.slice(0),null,!0)},setGutterMarker:Yn(function(e,t,r){return io(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&de(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Yn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&io(t,r,"gutter",function(){return r.gutterMarkers[e]=null,de(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!ie(this,e)||(t=e,e=x(this,e),!e))return null}else if(t=$(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(c(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=n[i];if(o)if(r==null)n[i]=null;else{var a=o.match(c(r));if(!a)return!1;var l=a.index+a[0].length;n[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:Yn(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ni(this,Y(this,e),Y(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=Y(this,e),Ni(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Y(this,e);var t=[],r=x(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=Y(this,e),t=Y(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}),Y(this,M(r,t))},indexFromPos:function(e){e=Y(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new fr(Q(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new fr(Q(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,hl(this)),n},unlinkDoc:function(e){if(e instanceof Rn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),xs(hl(this));break}}if(e.history==this.history){var n=[e.id];ri(e,function(i){return n.push(i.id)},!0),e.history=new Ro(null),e.history.done=Li(this.history.done,n),e.history.undone=Li(this.history.undone,n)}},iterLinkedDocs:function(e){ri(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):In(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Yn(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fs(this.cm))})}),fr.prototype.eachLine=fr.prototype.iter;var vl=0;function Es(e){var t=this;if(pl(t),!(vt(t,e)||$r(t.display,e))){Pt(e),p&&(vl=+new Date);var r=di(t,e,!0),n=e.dataTransfer.files;if(!(!r||t.isReadOnly()))if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(){++a==i&&Xn(t,function(){r=Y(t.doc,r);var w={from:r,to:r,text:t.doc.splitLines(o.filter(function(z){return z!=null}).join(t.doc.lineSeparator())),origin:"paste"};Di(t.doc,w),qa(t.doc,ti(Y(t.doc,r),Y(t.doc,ni(w))))})()},s=function(w,z){if(t.options.allowDropFileTypes&&ee(t.options.allowDropFileTypes,w.type)==-1){l();return}var X=new FileReader;X.onerror=function(){return l()},X.onload=function(){var ge=X.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ge)){l();return}o[z]=ge,l()},X.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 v=e.dataTransfer.getData("Text");if(v){var m;if(t.state.draggingText&&!t.state.draggingText.copy&&(m=t.listSelections()),Do(t.doc,ti(r,r)),m)for(var O=0;O<m.length;++O)Pi(t.doc,"",m[O].anchor,m[O].head,"drag");t.replaceSelection(v,"around","paste"),t.display.input.focus()}}catch(w){}}}}function Os(e,t){if(p&&(!e.state.draggingText||+new Date-vl<100)){sn(t);return}if(!(vt(e,t)||$r(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ce)){var r=R("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",y&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),y&&r.parentNode.removeChild(r)}}function Is(e,t){var r=di(e,t);if(r){var n=document.createDocumentFragment();Ma(e,r,n),e.display.dragCursor||(e.display.dragCursor=R("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),F(e.display.dragCursor,n)}}function pl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function gl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var o=0;o<r.length;o++)e(r[o])})}}var ml=!1;function Ms(){ml||(Rs(),ml=!0)}function Rs(){var e;U(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gl(Ls)},100))}),U(window,"blur",function(){return gl(Ii)})}function Ls(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var oi={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},uo=0;uo<10;uo++)oi[uo+48]=oi[uo+96]=String(uo);for(var Ao=65;Ao<=90;Ao++)oi[Ao]=String.fromCharCode(Ao);for(var co=1;co<=12;co++)oi[co+111]=oi[co+63235]="F"+co;var Gr={};Gr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Gr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Gr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Gr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Gr.default=nt?Gr.macDefault:Gr.pcDefault;function Ts(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Ds(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=Ot(r.split(" "),Ts),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(!s)t[l]=a;else if(s!=a)throw new Error("Inconsistent bindings for "+l)}delete e[r]}for(var u in t)e[u]=t[u];return e}function Ai(e,t,r,n){t=Fo(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ai(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Ai(e,t.fallthrough[o],r,n);if(a)return a}}}function yl(e){var t=typeof e=="string"?e:oi[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function bl(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Z?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Z?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Sl(e,t){if(y&&e.keyCode==34&&e.char)return!1;var r=oi[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),bl(r,e,t))}function Fo(e){return typeof e=="string"?Gr[e]:e}function Fi(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&K(o.from,et(n).to)<=0;){var a=n.pop();if(K(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}yr(e,function(){for(var l=n.length-1;l>=0;l--)Pi(e.doc,"",n[l].from,n[l].to,"+delete");Mi(e)})}function ca(e,t,r){var n=Le(e.text,t+r,r);return n<0||n>e.text.length?null:n}function fa(e,t,r){var n=ca(e,t.ch,r);return n==null?null:new M(t.line,n,r<0?"after":"before")}function da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Ee(r,t.doc.direction);if(o){var a=i<0?et(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var v=Jr(t,r);u=i<0?r.text.length-1:0;var m=Pr(t,v,u).top;u=ne(function(O){return Pr(t,v,O).top==m},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=ca(r,u,1))}else u=i<0?a.to:a.from;return new M(n,u,s)}}return new M(n,i<0?r.text.length:0,i<0?"before":"after")}function Ps(e,t,r,n){var i=Ee(t,e.doc.direction);if(!i)return fa(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ie(i,r.ch,r.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return fa(t,r,n);var l=function(Pe,je){return ca(t,Pe instanceof M?Pe.ch:Pe,je)},s,u=function(Pe){return e.options.lineWrapping?(s=s||Jr(e,t),wa(e,t,s,Pe)):{begin:0,end:t.text.length}},v=u(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var m=a.level==1==n<0,O=l(r,m?1:-1);if(O!=null&&(m?O<=a.to&&O<=v.end:O>=a.from&&O>=v.begin)){var w=m?"before":"after";return new M(r.line,O,w)}}var z=function(Pe,je,Ne){for(var qe=function(Sn,Qn){return Qn?new M(r.line,l(Sn,1),"before"):new M(r.line,Sn,"after")};Pe>=0&&Pe<i.length;Pe+=je){var Ct=i[Pe],pt=je>0==(Ct.level!=1),Kt=pt?Ne.begin:l(Ne.end,-1);if(Ct.from<=Kt&&Kt<Ct.to||(Kt=pt?Ct.from:l(Ct.to,-1),Ne.begin<=Kt&&Kt<Ne.end))return qe(Kt,pt)}},X=z(o+n,n,v);if(X)return X;var ge=n>0?v.end:l(v.begin,-1);return ge!=null&&!(n>0&&ge==t.text.length)&&(X=z(n>0?0:i.length-1,n,u(ge)),X)?X:null}var fo={selectAll:il,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ue)},killLine:function(e){return Fi(e,function(t){if(t.empty()){var r=x(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:M(t.head.line+1,0)}:{from:t.head,to:M(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Fi(e,function(t){return{from:M(t.from().line,0),to:Y(e.doc,M(t.to().line+1,0))}})},delLineLeft:function(e){return Fi(e,function(t){return{from:M(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Fi(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 Fi(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(M(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(M(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Cl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return xl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ns(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")},fe)},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")},fe)},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/)?xl(e,t.head):n},fe)},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=G(e.getLine(o.line),o.ch,n);t.push(St(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return yr(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=x(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new M(i.line,i.ch-1)),i.ch>0)i=new M(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),M(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=x(e.doc,i.line-1).text;a&&(i=new M(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),M(i.line-1,a.length-1),i,"+transpose"))}}r.push(new cn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return yr(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Mi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Cl(e,t){var r=x(e.doc,t),n=mt(r);return n!=r&&(t=$(n)),da(!0,e,n,t,1)}function Ns(e,t){var r=x(e.doc,t),n=vn(r);return n!=r&&(t=$(n)),da(!0,e,r,t,-1)}function xl(e,t){var r=Cl(e,t.line),n=x(e.doc,r.line),i=Ee(n,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return M(r.line,a?0:o,r.sticky)}return r}function $o(e,t,r){if(typeof t=="string"&&(t=fo[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=ze}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function As(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ai(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ai(t,e.options.extraKeys,r,e)||Ai(t,e.options.keyMap,r,e)}var Fs=new q;function ho(e,t,r,n){var i=e.state.keySeq;if(i){if(yl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Fs.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),wl(e,i+" "+t,r,n))return!0}return wl(e,t,r,n)}function wl(e,t,r,n){var i=As(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ot(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(Pt(r),Xo(e)),!!i}function El(e,t){var r=Sl(t,!0);return r?t.shiftKey&&!e.state.keySeq?ho(e,"Shift-"+r,t,function(n){return $o(e,n,!0)})||ho(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return $o(e,n)}):ho(e,r,t,function(n){return $o(e,n)}):!1}function $s(e,t,r){return ho(e,"'"+r+"'",t,function(n){return $o(e,n,!0)})}var ha=null;function Ol(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=me(),!vt(t,e))){p&&P<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=El(t,e);y&&(ha=n?r:null,!n&&r==88&&!dn&&(nt?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),E&&!nt&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&zs(t)}}function zs(e){var t=e.display.lineDiv;ut(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(b(t,"CodeMirror-crosshair"),He(document,"keyup",r),He(document,"mouseover",r))}U(document,"keyup",r),U(document,"mouseover",r)}function Il(e){e.keyCode==16&&(this.doc.sel.shift=!1),vt(this,e)}function Ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!($r(t.display,e)||vt(t,e)||e.ctrlKey&&!e.altKey||nt&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(y&&r==ha){ha=null,Pt(e);return}if(!(y&&(!e.which||e.which<10)&&El(t,e))){var i=String.fromCharCode(n==null?r:n);i!="\b"&&($s(t,e,i)||t.display.input.onKeyPress(e))}}}var Ws=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+Ws>e&&K(t,this.pos)==0&&r==this.button};var vo,po;function Hs(e,t){var r=+new Date;return po&&po.compare(r,e,t)?(vo=po=null,"triple"):vo&&vo.compare(r,e,t)?(po=new va(r,e,t),vo=null,"double"):(vo=new va(r,e,t),po=null,"single")}function Rl(e){var t=this,r=t.display;if(!(vt(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,$r(r,e)){T||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!pa(t,e)){var n=di(t,e),i=un(e),o=n?Hs(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Bs(t,i,n,o,e))&&(i==1?n?Ks(t,n,o,e):Cn(e)==r.scroller&&Pt(e):i==2?(n&&To(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(S?t.display.input.onContextMenu(e):La(t)))}}}function Bs(e,t,r,n,i){var o="Click";return n=="double"?o="Double"+o:n=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,ho(e,bl(o,i),i,function(a){if(typeof a=="string"&&(a=fo[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,r)!=ze}finally{e.state.suppressEdits=!1}return l})}function Zs(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var o=Ze?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=nt?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(nt?r.altKey:r.ctrlKey)),i}function Ks(e,t,r,n){p?setTimeout(le(Ra,e),0):e.curOp.focus=me();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&zn&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(K((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(K(a.to(),t)>0||t.xRel<0)?_s(e,n,t,i):Us(e,n,t,i)}function _s(e,t,r,n){var i=e.display,o=!1,a=Xn(e,function(u){T&&(i.scroller.draggable=!1),e.state.draggingText=!1,He(i.wrapper.ownerDocument,"mouseup",a),He(i.wrapper.ownerDocument,"mousemove",l),He(i.scroller,"dragstart",s),He(i.scroller,"drop",a),o||(Pt(u),n.addNew||To(e.doc,r,null,null,n.extend),T&&!Ce||p&&P==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};T&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),U(i.wrapper.ownerDocument,"mouseup",a),U(i.wrapper.ownerDocument,"mousemove",l),U(i.scroller,"dragstart",s),U(i.scroller,"drop",a),La(e),setTimeout(function(){return i.input.focus()},20)}function Ll(e,t,r){if(r=="char")return new cn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new cn(M(t.line,0),Y(e.doc,M(t.line+1,0)));var n=r(e,t);return new cn(n.from,n.to)}function Us(e,t,r,n){var i=e.display,o=e.doc;Pt(t);var a,l,s=o.sel,u=s.ranges;if(n.addNew&&!n.extend?(l=o.sel.contains(r),l>-1?a=u[l]:a=new cn(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new cn(r,r)),r=di(e,t,!0,!0),l=-1;else{var v=Ll(e,r,n.unit);n.extend?a=sa(a,v.anchor,v.head,n.extend):a=v}n.addNew?l==-1?(l=u.length,rr(o,zr(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(rr(o,zr(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):ua(o,l,a,Re):(l=0,rr(o,new Or([a],0),Re),s=o.sel);var m=r;function O(Ne){if(K(m,Ne)!=0)if(m=Ne,n.unit=="rectangle"){for(var qe=[],Ct=e.options.tabSize,pt=G(x(o,r.line).text,r.ch,Ct),Kt=G(x(o,Ne.line).text,Ne.ch,Ct),Sn=Math.min(pt,Kt),Qn=Math.max(pt,Kt),Dn=Math.min(r.line,Ne.line),br=Math.min(e.lastLine(),Math.max(r.line,Ne.line));Dn<=br;Dn++){var dr=x(o,Dn).text,Bn=bt(dr,Sn,Ct);Sn==Qn?qe.push(new cn(M(Dn,Bn),M(Dn,Bn))):dr.length>Bn&&qe.push(new cn(M(Dn,Bn),M(Dn,bt(dr,Qn,Ct))))}qe.length||qe.push(new cn(r,r)),rr(o,zr(e,s.ranges.slice(0,l).concat(qe),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ne)}else{var hr=a,er=Ll(e,Ne,n.unit),Un=hr.anchor,Zn;K(er.anchor,Un)>0?(Zn=er.head,Un=Te(hr.from(),er.anchor)):(Zn=er.anchor,Un=Be(hr.to(),er.head));var Pn=s.ranges.slice(0);Pn[l]=js(e,new cn(Y(o,Un),Zn)),rr(o,zr(e,Pn,l),Re)}}var w=i.wrapper.getBoundingClientRect(),z=0;function X(Ne){var qe=++z,Ct=di(e,Ne,!0,n.unit=="rectangle");if(Ct)if(K(Ct,m)!=0){e.curOp.focus=me(),O(Ct);var pt=Eo(i,o);(Ct.line>=pt.to||Ct.line<pt.from)&&setTimeout(Xn(e,function(){z==qe&&X(Ne)}),150)}else{var Kt=Ne.clientY<w.top?-20:Ne.clientY>w.bottom?20:0;Kt&&setTimeout(Xn(e,function(){z==qe&&(i.scroller.scrollTop+=Kt,X(Ne))}),50)}}function ge(Ne){e.state.selectingText=!1,z=1/0,Ne&&(Pt(Ne),i.input.focus()),He(i.wrapper.ownerDocument,"mousemove",Pe),He(i.wrapper.ownerDocument,"mouseup",je),o.history.lastSelOrigin=null}var Pe=Xn(e,function(Ne){Ne.buttons===0||!un(Ne)?ge(Ne):X(Ne)}),je=Xn(e,ge);e.state.selectingText=je,U(i.wrapper.ownerDocument,"mousemove",Pe),U(i.wrapper.ownerDocument,"mouseup",je)}function js(e,t){var r=t.anchor,n=t.head,i=x(e.doc,r.line);if(K(r,n)==0&&r.sticky==n.sticky)return t;var o=Ee(i);if(!o)return t;var a=Ie(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 v=Ie(o,n.ch,n.sticky),m=v-a||(n.ch-r.ch)*(l.level==1?-1:1);v==s-1||v==s?u=m<0:u=m>0}var O=o[s+(u?-1:0)],w=u==(O.level==1),z=w?O.from:O.to,X=w?"after":"before";return r.ch==z&&r.sticky==X?t:new cn(new M(r.line,z,X),n)}function Tl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(O){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Pt(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Zt(e,r))return Yt(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){var v=se(e.doc,o),m=e.display.gutterSpecs[s];return ct(e,r,e,v,m.className,t),Yt(t)}}}function pa(e,t){return Tl(e,t,"gutterClick",!0)}function Dl(e,t){$r(e.display,t)||ks(e,t)||vt(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function ks(e,t){return Zt(e,"gutterContextMenu")?Tl(e,t,"gutterContextMenu",!1):!1}function Pl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),On(e)}var $i={toString:function(){return"CodeMirror.Init"}},Nl={},zo={};function Gs(e){var t=e.optionHandlers;function r(n,i,o,a){e.defaults[n]=i,o&&(t[n]=a?function(l,s,u){u!=$i&&o(l,s,u)}:o)}e.defineOption=r,e.Init=$i,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,oa(n)},!0),r("indentUnit",2,oa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){no(n),On(n),cr(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!!i){var o=[],a=n.doc.first;n.doc.iter(function(s){for(var u=0;;){var v=s.text.indexOf(i,u);if(v==-1)break;u=v+i.length,o.push(M(a,v))}a++});for(var l=o.length-1;l>=0;l--)Pi(n.doc,i,o[l],M(o[l].line,o[l].ch+i.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,o){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=$i&&n.refresh()}),r("specialCharPlaceholder",Ir,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",Xe?"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",!tt),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Pl(n),to(n)},!0),r("keyMap","default",function(n,i,o){var a=Fo(i),l=o!=$i&&Fo(o);l&&l.detach&&l.detach(n,a),a.attach&&a.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Xs,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=ra(i,n.options.lineNumbers),to(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?Go(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Ri(n)},!0),r("scrollbarStyle","native",function(n){Fa(n),Ri(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=ra(n.options.gutters,i),to(n)},!0),r("firstLineNumber",1,to,!0),r("lineNumberFormatter",function(n){return n},to,!0),r("showCursorWhenSelecting",!1,Xi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Ii(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Vs),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Xi,!0),r("singleCursorHeightPerLine",!0,Xi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,no,!0),r("addModeClass",!1,no,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,no,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Vs(e,t,r){var n=r&&r!=$i;if(!t!=!n){var i=e.display.dragFunctions,o=t?U:He;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Xs(e){e.options.lineWrapping?(ut(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),qn(e)),Vo(e),cr(e),On(e),setTimeout(function(){return Ri(e)},100)}function Rn(e,t){var r=this;if(!(this instanceof Rn))return new Rn(e,t);this.options=t=t?H(t):{},H(Nl,t,!1);var n=t.value;typeof n=="string"?n=new fr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Rn.inputStyles[t.inputStyle](this),o=this.display=new ss(e,n,i,t);o.wrapper.CodeMirror=this,Pl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(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 q,keySeq:null,specialChars:null},t.autofocus&&!Xe&&o.input.focus(),p&&P<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Ms(),gi(this),this.curOp.forceUpdate=!0,ja(this,n),t.autofocus&&!Xe||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Yo(r)},20):Ii(this);for(var a in zo)zo.hasOwnProperty(a)&&zo[a](this,t[a],$i);Wa(this),t.finishInit&&t.finishInit(this);for(var l=0;l<ga.length;++l)ga[l](this);mi(this),T&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Rn.defaults=Nl,Rn.optionHandlers=zo;function Ys(e){var t=e.display;U(t.scroller,"mousedown",Xn(e,Rl)),p&&P<11?U(t.scroller,"dblclick",Xn(e,function(s){if(!vt(e,s)){var u=di(e,s);if(!(!u||pa(e,s)||$r(e.display,s))){Pt(s);var v=e.findWordAt(u);To(e.doc,v.anchor,v.head)}}})):U(t.scroller,"dblclick",function(s){return vt(e,s)||Pt(s)}),U(t.scroller,"contextmenu",function(s){return Dl(e,s)}),U(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Dl(e,s)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function o(s){if(s.touches.length!=1)return!1;var u=s.touches[0];return u.radiusX<=1&&u.radiusY<=1}function a(s,u){if(u.left==null)return!0;var v=u.left-s.left,m=u.top-s.top;return v*v+m*m>20*20}U(t.scroller,"touchstart",function(s){if(!vt(e,s)&&!o(s)&&!pa(e,s)){t.input.ensurePolled(),clearTimeout(r);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-n.end<=300?n:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),U(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),U(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!$r(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var v=e.coordsChar(t.activeTouch,"page"),m;!u.prev||a(u,u.prev)?m=new cn(v,v):!u.prev.prev||a(u,u.prev.prev)?m=e.findWordAt(v):m=new cn(M(v.line,0),Y(e.doc,M(v.line+1,0))),e.setSelection(m.anchor,m.head),e.focus(),Pt(s)}i()}),U(t.scroller,"touchcancel",i),U(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),ct(e,"scroll",e))}),U(t.scroller,"mousewheel",function(s){return Za(e,s)}),U(t.scroller,"DOMMouseScroll",function(s){return Za(e,s)}),U(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){vt(e,s)||sn(s)},over:function(s){vt(e,s)||(Is(e,s),sn(s))},start:function(s){return Os(e,s)},drop:Xn(e,Es),leave:function(s){vt(e,s)||pl(e)}};var l=t.input.getField();U(l,"keyup",function(s){return Il.call(e,s)}),U(l,"keydown",Xn(e,Ol)),U(l,"keypress",Xn(e,Ml)),U(l,"focus",function(s){return Yo(e,s)}),U(l,"blur",function(s){return Ii(e,s)})}var ga=[];Rn.defineInitHook=function(e){return ga.push(e)};function go(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=Rt(e,t).state:r="prev");var a=e.options.tabSize,l=x(i,t),s=G(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],v;if(!n&&!/\S/.test(l.text))v=0,r="not";else if(r=="smart"&&(v=i.mode.indent(o,l.text.slice(u.length),l.text),v==ze||v>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?v=G(x(i,t-1).text,null,a):v=0:r=="add"?v=s+e.options.indentUnit:r=="subtract"?v=s-e.options.indentUnit:typeof r=="number"&&(v=s+r),v=Math.max(0,v);var m="",O=0;if(e.options.indentWithTabs)for(var w=Math.floor(v/a);w;--w)O+=a,m+=" ";if(O<v&&(m+=St(v-O)),m!=u)return Pi(i,m,M(t,0),M(t,u.length),"+input"),l.stateAfter=null,!0;for(var z=0;z<i.sel.ranges.length;z++){var X=i.sel.ranges[z];if(X.head.line==t&&X.head.ch<u.length){var ge=M(t,u.length);ua(i,z,new cn(ge,ge));break}}}var Wr=null;function Wo(e){Wr=e}function ma(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=In(t),u=null;if(l&&n.ranges.length>1)if(Wr&&Wr.text.join(`
`)==t){if(n.ranges.length%Wr.text.length==0){u=[];for(var v=0;v<Wr.text.length;v++)u.push(o.splitLines(Wr.text[v]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=Ot(s,function(Pe){return[Pe]}));for(var m=e.curOp.updateInput,O=n.ranges.length-1;O>=0;O--){var w=n.ranges[O],z=w.from(),X=w.to();w.empty()&&(r&&r>0?z=M(z.line,z.ch-r):e.state.overwrite&&!l?X=M(X.line,Math.min(x(o,X.line).text.length,X.ch+et(s).length)):l&&Wr&&Wr.lineWise&&Wr.text.join(`
`)==s.join(`
`)&&(z=X=M(z.line,0)));var ge={from:z,to:X,text:u?u[O%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Di(e.doc,ge),ot(e,"inputRead",e,ge)}t&&!l&&Fl(e,t),Mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=m),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Al(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&yr(t,function(){return ma(t,r,0,null,"paste")}),!0}function Fl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=go(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(x(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=go(e,i.head.line,"smart"));a&&ot(e,"electricInput",e,i.head.line)}}}function $l(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:M(i,0),head:M(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function zl(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Wl(){var e=R("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=R("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return T?e.style.width="1000px":e.setAttribute("wrap","off"),Oe&&(e.style.border="1px solid black"),zl(e),t}function Qs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var o=this.options,a=o[n];o[n]==i&&n!="mode"||(o[n]=i,t.hasOwnProperty(n)&&Xn(this,t[n])(this,i,a),ct(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"](Fo(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==n||i[o].name==n)return i.splice(o,1),!0},addOverlay:ar(function(n,i){var o=n.token?n:e.getMode(this.options,n);if(o.startState)throw new Error("Overlays may not be stateful.");at(this.state.overlays,{mode:o,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,cr(this)}),removeOverlay:ar(function(n){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==n||typeof n=="string"&&a.name==n){i.splice(o,1),this.state.modeGen++,cr(this);return}}}),indentLine:ar(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),ie(this.doc,n)&&go(this,n,i,o)}),indentSelection:ar(function(n){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(go(this,l.head.line,n,!0),o=l.head.line,a==this.doc.sel.primIndex&&Mi(this));else{var s=l.from(),u=l.to(),v=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var m=v;m<o;++m)go(this,m,n);var O=this.doc.sel.ranges;s.ch==0&&i.length==O.length&&O[a].from().ch>0&&ua(this.doc,a,new cn(s,O[a].to()),ue)}}}),getTokenAt:function(n,i){return Ut(this,n,i)},getLineTokens:function(n,i){return Ut(this,M(n),i,!0)},getTokenTypeAt:function(n){n=Y(this.doc,n);var i=_t(this,x(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 v=s?s.indexOf("overlay "):-1;return v<0?s:v==0?null:s.slice(0,v-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 v=0;v<a._global.length;v++){var m=a._global[v];m.pred(l,this)&&ee(o,m.val)==-1&&o.push(m.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=ft(o,n==null?o.first+o.size-1:n),Rt(this,n+1,i).state},cursorCoords:function(n,i){var o,a=this.doc.sel.primary();return n==null?o=a.head:typeof n=="object"?o=Y(this.doc,n):o=n?a.from():a.to(),mr(this,o,i||"page")},charCoords:function(n,i){return Nr(this,Y(this.doc,n),i||"page")},coordsChar:function(n,i){return n=kr(this,n,i||"page"),Uo(this,n.left,n.top)},lineAtHeight:function(n,i){return n=kr(this,{top:n,left:0},i||"page").top,se(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=x(this.doc,n)}else l=n;return wr(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Mn(l):0)},defaultTextHeight:function(){return Ei(this.display)},defaultCharWidth:function(){return Oi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,o,a,l){var s=this.display;n=mr(this,Y(this.doc,n));var u=n.bottom,v=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")u=n.top;else if(a=="above"||a=="near"){var m=Math.max(s.wrapper.clientHeight,this.doc.height),O=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>m)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=m&&(u=n.bottom),v+i.offsetWidth>O&&(v=O-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(v=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?v=0:l=="middle"&&(v=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=v+"px"),o&&Vl(this,{left:v,top:u,right:v+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:ar(Ol),triggerOnKeyPress:ar(Ml),triggerOnKeyUp:Il,triggerOnMouseDown:ar(Rl),execCommand:function(n){if(fo.hasOwnProperty(n))return fo[n].call(null,this)},triggerElectric:ar(function(n){Fl(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=Y(this.doc,n),u=0;u<i&&(s=ya(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:ar(function(n,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?ya(o.doc,a.head,n,i,o.options.rtlMoveVisually):n<0?a.from():a.to()},fe)}),deleteH:ar(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Fi(this,function(l){var s=ya(a,l.head,n,i,!1);return n<0?{from:s,to:l.head}:{from:l.head,to:s}})}),findPosV:function(n,i,o,a){var l=1,s=a;i<0&&(l=-1,i=-i);for(var u=Y(this.doc,n),v=0;v<i;++v){var m=mr(this,u,"div");if(s==null?s=m.left:m.left=s,u=Hl(this,m,l,o),u.hitSide)break}return u},moveV:ar(function(n,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(v){if(s)return n<0?v.from():v.to();var m=mr(o,v.head,"div");v.goalColumn!=null&&(m.left=v.goalColumn),l.push(m.left);var O=Hl(o,m,n,i);return i=="page"&&v==a.sel.primary()&&Jo(o,Nr(o,O,"div").top-m.top),O},fe),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=x(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),v=re(u,s)?function(m){return re(m,s)}:/\s/.test(u)?function(m){return/\s/.test(m)}:function(m){return!/\s/.test(m)&&!re(m)};a>0&&v(o.charAt(a-1));)--a;for(;l<o.length&&v(o.charAt(l));)++l}return new cn(M(n.line,a),M(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ut(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),ct(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==me()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ar(function(n,i){Yi(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Dr(this)-this.display.barHeight,width:n.scrollWidth-Dr(this)-this.display.barWidth,clientHeight:_i(this),clientWidth:Br(this)}},scrollIntoView:ar(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:M(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Xl(this,n):Da(this,n.from,n.to,n.margin)}),setSize:ar(function(n,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};n!=null&&(this.display.wrapper.style.width=a(n)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&nr(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){qr(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,ct(this,"refresh",this)}),operation:function(n){return yr(this,n)},startOperation:function(){return gi(this)},endOperation:function(){return mi(this)},refresh:ar(function(){var n=this.display.cachedTextHeight;cr(this),this.curOp.forceUpdate=!0,On(this),Yi(this,this.doc.scrollLeft,this.doc.scrollTop),ta(this.display),(n==null||Math.abs(n-Ei(this.display))>.5||this.options.lineWrapping)&&Vo(this),ct(this,"refresh",this)}),swapDoc:ar(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ja(this,n),On(this),this.display.input.reset(),Yi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,ot(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}},Ft(e),e.registerHelper=function(n,i,o){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=o},e.registerGlobalHelper=function(n,i,o,a){e.registerHelper(n,i,a),r[n]._global.push({pred:o,val:a})}}function ya(e,t,r,n,i){var o=t,a=r,l=x(e,t.line),s=i&&e.direction=="rtl"?-r:r;function u(){var je=t.line+s;return je<e.first||je>=e.first+e.size?!1:(t=new M(je,t.ch,t.sticky),l=x(e,je))}function v(je){var Ne;if(n=="codepoint"){var qe=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(qe)?Ne=null:Ne=new M(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(qe>=55296&&qe<56320?2:1))),-r)}else i?Ne=Ps(e.cm,l,t,r):Ne=fa(l,t,r);if(Ne==null)if(!je&&u())t=da(i,e.cm,l,t.line,s);else return!1;else t=Ne;return!0}if(n=="char"||n=="codepoint")v();else if(n=="column")v(!0);else if(n=="word"||n=="group")for(var m=null,O=n=="group",w=e.cm&&e.cm.getHelper(t,"wordChars"),z=!0;!(r<0&&!v(!z));z=!1){var X=l.text.charAt(t.ch)||`
`,ge=re(X,w)?"w":O&&X==`
`?"n":!O||/\s/.test(X)?null:"p";if(O&&!z&&!ge&&(ge="s"),m&&m!=ge){r<0&&(r=1,v(),t.sticky="after");break}if(ge&&(m=ge),r>0&&!v(!z))break}var Pe=Po(e,t,o,a,!0);return Ke(o,Pe)&&(Pe.hitSide=!0),Pe}function Hl(e,t,r,n){var i=e.doc,o=t.left,a;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*Ei(e.display),3);a=(r>0?t.bottom:t.top)+r*s}else n=="line"&&(a=r>0?t.bottom+3:t.top-3);for(var u;u=Uo(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 q,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;zl(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}U(i,"paste",function(l){!o(l)||vt(n,l)||Al(l,n)||P<=11&&setTimeout(Xn(n,function(){return t.updateFromDOM()}),20)}),U(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),U(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),U(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),U(i,"touchstart",function(){return r.forceCompositionEnd()}),U(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||vt(n,l))){if(n.somethingSelected())Wo({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var s=$l(n);Wo({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,ue),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=Wr.text.join(`
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var v=Wl(),m=v.firstChild;n.display.lineSpace.insertBefore(v,n.display.lineSpace.firstChild),m.value=Wr.text.join(`
`);var O=document.activeElement;Ge(m),setTimeout(function(){n.display.lineSpace.removeChild(v),O.focus(),O==i&&r.showPrimarySelection()},50)}}U(i,"copy",a),U(i,"cut",a)},hn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var e=Ia(this.cm,!1);return e.focus=document.activeElement==this.div,e},hn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},hn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},hn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=Ho(t,e.anchorNode,e.anchorOffset),a=Ho(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&K(Te(o,a),n)==0&&K(Be(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Bl(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Bl(t,i);if(!u){var v=l[l.length-1].measure,m=v.maps?v.maps[v.maps.length-1]:v.map;u={node:m[m.length-1],offset:m[m.length-2]-m[m.length-3]}}if(!s||!u){e.removeAllRanges();return}var O=e.rangeCount&&e.getRangeAt(0),w;try{w=We(s.node,s.offset,u.offset,u.node)}catch(z){}w&&(!E&&t.state.focused?(e.collapse(s.node,s.offset),w.collapsed||(e.removeAllRanges(),e.addRange(w))):(e.removeAllRanges(),e.addRange(w)),O&&e.anchorNode==null?e.addRange(O):E&&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){F(this.cm.display.cursorDiv,e.cursors),F(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 Ae(this.div,t)},hn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},hn.prototype.blur=function(){this.div.blur()},hn.prototype.getField=function(){return this.div},hn.prototype.supportsTouch=function(){return!0},hn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():yr(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},hn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},hn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(k&&te&&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=Ho(t,e.anchorNode,e.anchorOffset),n=Ho(t,e.focusNode,e.focusOffset);r&&n&&yr(t,function(){rr(t.doc,ti(r,n),ue),(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=M(n.line-1,x(e.doc,n.line-1).length)),i.ch==x(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=M(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||(o=hi(e,n.line))==0?(a=$(t.view[0].line),l=t.view[0].node):(a=$(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=hi(e,i.line),u,v;if(s==t.view.length-1?(u=t.viewTo-1,v=t.lineDiv.lastChild):(u=$(t.view[s+1].line)-1,v=t.view[s+1].node.previousSibling),!l)return!1;for(var m=e.doc.splitLines(qs(e,l,v,a,u)),O=L(e.doc,M(a,0),M(u,x(e.doc,u).text.length));m.length>1&&O.length>1;)if(et(m)==et(O))m.pop(),O.pop(),u--;else if(m[0]==O[0])m.shift(),O.shift(),a++;else break;for(var w=0,z=0,X=m[0],ge=O[0],Pe=Math.min(X.length,ge.length);w<Pe&&X.charCodeAt(w)==ge.charCodeAt(w);)++w;for(var je=et(m),Ne=et(O),qe=Math.min(je.length-(m.length==1?w:0),Ne.length-(O.length==1?w:0));z<qe&&je.charCodeAt(je.length-z-1)==Ne.charCodeAt(Ne.length-z-1);)++z;if(m.length==1&&O.length==1&&a==n.line)for(;w&&w>n.ch&&je.charCodeAt(je.length-z-1)==Ne.charCodeAt(Ne.length-z-1);)w--,z++;m[m.length-1]=je.slice(0,je.length-z).replace(/^\u200b+/,""),m[0]=m[0].slice(w).replace(/\u200b+$/,"");var Ct=M(a,w),pt=M(u,O.length?et(O).length-z:0);if(m.length>1||m[0]||K(Ct,pt))return Pi(e.doc,m,Ct,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())&&yr(this.cm,function(){return cr(e.cm)})},hn.prototype.setUneditable=function(e){e.contentEditable="false"},hn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Xn(this.cm,ma)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},hn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},hn.prototype.onContextMenu=function(){},hn.prototype.resetPosition=function(){},hn.prototype.needsContentAttribute=!0;function Bl(e,t){var r=ki(e,t.line);if(!r||r.hidden)return null;var n=x(e.doc,t.line),i=Ui(r,n,t.line),o=Ee(n,e.doc.direction),a="left";if(o){var l=Ie(o,t.ch);a=l%2?"right":"left"}var s=Gi(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function Js(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function zi(e,t){return t&&(e.bad=!0),e}function qs(e,t,r,n,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(w){return function(z){return z.id==w}}function v(){a&&(o+=l,s&&(o+=l),a=s=!1)}function m(w){w&&(v(),o+=w)}function O(w){if(w.nodeType==1){var z=w.getAttribute("cm-text");if(z){m(z);return}var X=w.getAttribute("cm-marker"),ge;if(X){var Pe=e.findMarks(M(n,0),M(i+1,0),u(+X));Pe.length&&(ge=Pe[0].find(0))&&m(L(e.doc,ge.from,ge.to).join(l));return}if(w.getAttribute("contenteditable")=="false")return;var je=/^(pre|div|p|li|table|br)$/i.test(w.nodeName);if(!/^br$/i.test(w.nodeName)&&w.textContent.length==0)return;je&&v();for(var Ne=0;Ne<w.childNodes.length;Ne++)O(w.childNodes[Ne]);/^(pre|p)$/i.test(w.nodeName)&&(s=!0),je&&(a=!0)}else w.nodeType==3&&m(w.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;O(t),t!=r;)t=t.nextSibling,s=!1;return o}function Ho(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return zi(e.clipPos(M(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return eu(o,t,r)}}function eu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!Ae(n,t))return zi(M($(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?et(e.rest):e.line;return zi(M($(o),o.text.length),i)}var a=t.nodeType==3?t:null,l=t;for(!a&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(a=t.firstChild,r&&(r=a.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var s=e.measure,u=s.maps;function v(ge,Pe,je){for(var Ne=-1;Ne<(u?u.length:0);Ne++)for(var qe=Ne<0?s.map:u[Ne],Ct=0;Ct<qe.length;Ct+=3){var pt=qe[Ct+2];if(pt==ge||pt==Pe){var Kt=$(Ne<0?e.line:e.rest[Ne]),Sn=qe[Ct]+je;return(je<0||pt!=ge)&&(Sn=qe[Ct+(je?1:0)]),M(Kt,Sn)}}}var m=v(a,l,r);if(m)return zi(m,i);for(var O=l.nextSibling,w=a?a.nodeValue.length-r:0;O;O=O.nextSibling){if(m=v(O,O.firstChild,0),m)return zi(M(m.line,m.ch-w),i);w+=O.textContent.length}for(var z=l.previousSibling,X=r;z;z=z.previousSibling){if(m=v(z,z.firstChild,-1),m)return zi(M(m.line,m.ch+X),i);X+=z.textContent.length}}var $n=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null};$n.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),Oe&&(i.style.width="0px"),U(i,"input",function(){p&&P>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),U(i,"paste",function(a){vt(n,a)||Al(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!vt(n,a)){if(n.somethingSelected())Wo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=$l(n);Wo({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,ue):(r.prevInput="",i.value=l.text.join(`
`),Ge(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}U(i,"cut",o),U(i,"copy",o),U(e.scroller,"paste",function(a){if(!($r(e,a)||vt(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)}}),U(e.lineSpace,"selectstart",function(a){$r(e,a)||Pt(a)}),U(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"})}}),U(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},$n.prototype.createField=function(e){this.wrapper=Wl(),this.textarea=this.wrapper.firstChild},$n.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$n.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Ia(e);if(e.options.moveInputWithCursor){var i=mr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},$n.prototype.showSelection=function(e){var t=this.cm,r=t.display;F(r.cursorDiv,e.cursors),F(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$n.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&&Ge(this.textarea),p&&P>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",p&&P>=9&&(this.hasSelection=null))}},$n.prototype.getField=function(){return this.textarea},$n.prototype.supportsTouch=function(){return!1},$n.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Xe||me()!=this.textarea))try{this.textarea.focus()}catch(e){}},$n.prototype.blur=function(){this.textarea.blur()},$n.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$n.prototype.receivedFocus=function(){this.slowPoll()},$n.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$n.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)},$n.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||xn(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(p&&P>=9&&this.hasSelection===i||nt&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!n&&(n="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return yr(t,function(){ma(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$n.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$n.prototype.onKeyPress=function(){p&&P>=9&&(this.hasSelection=null),this.fastPoll()},$n.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=di(r,e),a=n.scroller.scrollTop;if(!o||y)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Xn(r,rr)(r.doc,ti(o),ue);var s=i.style.cssText,u=t.wrapper.style.cssText,v=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-v.top-5)+"px; left: "+(e.clientX-v.left-5)+`px;
z-index: 1000; background: `+(p?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var m;T&&(m=window.scrollY),n.input.focus(),T&&window.scrollTo(null,m),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=w,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function O(){if(i.selectionStart!=null){var X=r.somethingSelected(),ge="\u200B"+(X?i.value:"");i.value="\u21DA",i.value=ge,t.prevInput=X?"":"\u200B",i.selectionStart=1,i.selectionEnd=ge.length,n.selForContextMenu=r.doc.sel}}function w(){if(t.contextMenuPending==w&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,p&&P<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!p||p&&P<9)&&O();var X=0,ge=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Xn(r,il)(r):X++<10?n.detectingSelectAll=setTimeout(ge,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ge,200)}}if(p&&P>=9&&O(),S){sn(e);var z=function(){He(window,"mouseup",z),setTimeout(w,20)};U(window,"mouseup",z)}else setTimeout(w,50)},$n.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$n.prototype.setUneditable=function(){},$n.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?H(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&&(U(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(s){}}t.finishInit=function(s){s.save=n,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,n(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(He(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Rn(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=He,e.on=U,e.wheelEventPixels=us,e.Doc=fr,e.splitLines=In,e.countColumn=G,e.findColumn=bt,e.isWordChar=V,e.Pass=ze,e.signal=ct,e.Line=tr,e.changeEnd=ni,e.scrollbarModel=Aa,e.Pos=M,e.cmpPos=K,e.modes=An,e.mimeModes=Hn,e.resolveMode=on,e.getMode=Qe,e.modeExtensions=Mt,e.extendMode=g,e.copyState=D,e.startState=d,e.innerMode=W,e.commands=fo,e.keyMap=Gr,e.keyName=Sl,e.isModifierKey=yl,e.lookupKey=Ai,e.normalizeKeyMap=Ds,e.StringStream=h,e.SharedTextMarker=so,e.TextMarker=ii,e.LineWidget=lo,e.e_preventDefault=Pt,e.e_stopPropagation=Xt,e.e_stop=sn,e.addClass=ut,e.contains=Ae,e.rmClass=b,e.keyNames=oi}Gs(Rn),Qs(Rn);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Bo in fr.prototype)fr.prototype.hasOwnProperty(Bo)&&ee(ru,Bo)<0&&(Rn.prototype[Bo]=function(e){return function(){return e.apply(this.doc,arguments)}}(fr.prototype[Bo]));return Ft(fr),Rn.inputStyles={textarea:$n,contenteditable:hn},Rn.defineMode=function(e){!Rn.defaults.mode&&e!="null"&&(Rn.defaults.mode=e),Sr.apply(this,arguments)},Rn.defineMIME=pr,Rn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Rn.defineMIME("text/plain","null"),Rn.defineExtension=function(e,t){Rn.prototype[e]=t},Rn.defineDocExtension=function(e,t){fr.prototype[e]=t},Rn.fromTextArea=tu,nu(Rn),Rn.version="5.58.2",Rn})},93681:function(nn,xe,f){"use strict";f.r(xe),f.d(xe,{BaseInput:function(){return y},default:function(){return tt}});var E=f(71409),J=f(89490),C=f(87075),j=f(28788),p=f(92310),P=f.n(p),T=f(59301),ye=f(5643),te=function(Z){var S,c,b=Z.inputElement,I=Z.prefixCls,F=Z.prefix,R=Z.suffix,be=Z.addonBefore,We=Z.addonAfter,Ae=Z.className,me=Z.style,ut=Z.disabled,ke=Z.readOnly,Ge=Z.focused,le=Z.triggerFocus,H=Z.allowClear,G=Z.value,q=Z.handleReset,ee=Z.hidden,Ve=Z.classes,ze=Z.classNames,ue=Z.dataAttrs,Re=Z.styles,fe=Z.components,bt=(fe==null?void 0:fe.affixWrapper)||"span",Dt=(fe==null?void 0:fe.groupWrapper)||"span",St=(fe==null?void 0:fe.wrapper)||"span",et=(fe==null?void 0:fe.groupAddon)||"span",Ot=(0,T.useRef)(null),at=function(ce){var Ie;(Ie=Ot.current)!==null&&Ie!==void 0&&Ie.contains(ce.target)&&(le==null||le())},A=function(){var ce;if(!H)return null;var Ie=!ut&&!ke&&G,Me="".concat(I,"-clear-icon"),Ee=(0,j.Z)(H)==="object"&&H!==null&&H!==void 0&&H.clearIcon?H.clearIcon:"\u2716";return T.createElement("span",{onClick:q,onMouseDown:function(U){return U.preventDefault()},className:P()(Me,(ce={},(0,C.Z)(ce,"".concat(Me,"-hidden"),!Ie),(0,C.Z)(ce,"".concat(Me,"-has-suffix"),!!R),ce)),role:"button",tabIndex:-1},Ee)},we=(0,T.cloneElement)(b,{value:G,hidden:ee,className:P()((S=b.props)===null||S===void 0?void 0:S.className,!(0,ye.X3)(Z)&&!(0,ye.He)(Z)&&Ae)||null,style:(0,J.Z)((0,J.Z)({},(c=b.props)===null||c===void 0?void 0:c.style),!(0,ye.X3)(Z)&&!(0,ye.He)(Z)?me:{})});if((0,ye.X3)(Z)){var oe,V="".concat(I,"-affix-wrapper"),re=P()(V,(oe={},(0,C.Z)(oe,"".concat(V,"-disabled"),ut),(0,C.Z)(oe,"".concat(V,"-focused"),Ge),(0,C.Z)(oe,"".concat(V,"-readonly"),ke),(0,C.Z)(oe,"".concat(V,"-input-with-clear-btn"),R&&H&&G),oe),!(0,ye.He)(Z)&&Ae,Ve==null?void 0:Ve.affixWrapper,ze==null?void 0:ze.affixWrapper),de=(R||H)&&T.createElement("span",{className:P()("".concat(I,"-suffix"),ze==null?void 0:ze.suffix),style:Re==null?void 0:Re.suffix},A(),R);we=T.createElement(bt,(0,E.Z)({className:re,style:(0,J.Z)((0,J.Z)({},(0,ye.He)(Z)?void 0:me),Re==null?void 0:Re.affixWrapper),hidden:!(0,ye.He)(Z)&&ee,onClick:at},ue==null?void 0:ue.affixWrapper,{ref:Ot}),F&&T.createElement("span",{className:P()("".concat(I,"-prefix"),ze==null?void 0:ze.prefix),style:Re==null?void 0:Re.prefix},F),(0,T.cloneElement)(b,{value:G,hidden:null}),de)}if((0,ye.He)(Z)){var Se="".concat(I,"-group"),he="".concat(Se,"-addon"),Le=P()("".concat(I,"-wrapper"),Se,Ve==null?void 0:Ve.wrapper),ne=P()("".concat(I,"-group-wrapper"),Ae,Ve==null?void 0:Ve.group);return T.createElement(Dt,{className:ne,style:me,hidden:ee},T.createElement(St,{className:Le},be&&T.createElement(et,{className:he},be),(0,T.cloneElement)(we,{hidden:null}),We&&T.createElement(et,{className:he},We)))}return we},y=te,Ce=f(62730),N=f(11036),ve=f(39224),Oe=f(18929),k=f(2738),Xe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],nt=(0,T.forwardRef)(function(_,Z){var S=_.autoComplete,c=_.onChange,b=_.onFocus,I=_.onBlur,F=_.onPressEnter,R=_.onKeyDown,be=_.prefixCls,We=be===void 0?"rc-input":be,Ae=_.disabled,me=_.htmlSize,ut=_.className,ke=_.maxLength,Ge=_.suffix,le=_.showCount,H=_.type,G=H===void 0?"text":H,q=_.classes,ee=_.classNames,Ve=_.styles,ze=(0,ve.Z)(_,Xe),ue=(0,Oe.Z)(_.defaultValue,{value:_.value}),Re=(0,N.Z)(ue,2),fe=Re[0],bt=Re[1],Dt=(0,T.useState)(!1),St=(0,N.Z)(Dt,2),et=St[0],Ot=St[1],at=(0,T.useRef)(null),A=function(ne){at.current&&(0,ye.nH)(at.current,ne)};(0,T.useImperativeHandle)(Z,function(){return{focus:A,blur:function(){var ne;(ne=at.current)===null||ne===void 0||ne.blur()},setSelectionRange:function(ne,Ye,ce){var Ie;(Ie=at.current)===null||Ie===void 0||Ie.setSelectionRange(ne,Ye,ce)},select:function(){var ne;(ne=at.current)===null||ne===void 0||ne.select()},input:at.current}}),(0,T.useEffect)(function(){Ot(function(Le){return Le&&Ae?!1:Le})},[Ae]);var we=function(ne){_.value===void 0&&bt(ne.target.value),at.current&&(0,ye.rJ)(at.current,ne,c)},oe=function(ne){F&&ne.key==="Enter"&&F(ne),R==null||R(ne)},V=function(ne){Ot(!0),b==null||b(ne)},re=function(ne){Ot(!1),I==null||I(ne)},de=function(ne){bt(""),A(),at.current&&(0,ye.rJ)(at.current,ne,c)},Se=function(){var ne=(0,k.Z)(_,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return T.createElement("input",(0,E.Z)({autoComplete:S},ne,{onChange:we,onFocus:V,onBlur:re,onKeyDown:oe,className:P()(We,(0,C.Z)({},"".concat(We,"-disabled"),Ae),ee==null?void 0:ee.input),style:Ve==null?void 0:Ve.input,ref:at,size:me,type:G}))},he=function(){var ne=Number(ke)>0;if(Ge||le){var Ye=(0,ye.D7)(fe),ce=(0,Ce.Z)(Ye).length,Ie=(0,j.Z)(le)==="object"?le.formatter({value:Ye,count:ce,maxLength:ke}):"".concat(ce).concat(ne?" / ".concat(ke):"");return T.createElement(T.Fragment,null,!!le&&T.createElement("span",{className:P()("".concat(We,"-show-count-suffix"),(0,C.Z)({},"".concat(We,"-show-count-has-suffix"),!!Ge),ee==null?void 0:ee.count),style:(0,J.Z)({},Ve==null?void 0:Ve.count)},Ie),Ge)}return null};return T.createElement(y,(0,E.Z)({},ze,{prefixCls:We,className:ut,inputElement:Se(),handleReset:de,value:(0,ye.D7)(fe),focused:et,triggerFocus:A,suffix:he(),disabled:Ae,classes:q,classNames:ee,styles:Ve}))}),Ze=nt,tt=Ze},5643:function(nn,xe,f){"use strict";f.d(xe,{D7:function(){return p},He:function(){return E},X3:function(){return J},nH:function(){return j},rJ:function(){return C}});function E(P){return!!(P.addonBefore||P.addonAfter)}function J(P){return!!(P.prefix||P.suffix||P.allowClear)}function C(P,T,ye,te){if(ye){var y=T;if(T.type==="click"){var Ce=P.cloneNode(!0);y=Object.create(T,{target:{value:Ce},currentTarget:{value:Ce}}),Ce.value="",ye(y);return}if(te!==void 0){y=Object.create(T,{target:{value:P},currentTarget:{value:P}}),P.value=te,ye(y);return}ye(y)}}function j(P,T){if(P){P.focus(T);var ye=T||{},te=ye.cursor;if(te){var y=P.value.length;switch(te){case"start":P.setSelectionRange(0,0);break;case"end":P.setSelectionRange(y,y);break;default:P.setSelectionRange(0,y)}}}}function p(P){return typeof P=="undefined"||P===null?"":String(P)}},11780:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return le}});var E=f(71409),J=f(89490),C=f(11036),j=f(39224),p=f(59301),P=f(92310),T=f.n(P),ye=f(29301),te=f(34280),y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ce=void 0;function N(H,G){var q=H.prefixCls,ee=H.invalidate,Ve=H.item,ze=H.renderItem,ue=H.responsive,Re=H.responsiveDisabled,fe=H.registerSize,bt=H.itemKey,Dt=H.className,St=H.style,et=H.children,Ot=H.display,at=H.order,A=H.component,we=A===void 0?"div":A,oe=(0,j.Z)(H,y),V=ue&&!Ot;function re(ne){fe(bt,ne)}p.useEffect(function(){return function(){re(null)}},[]);var de=ze&&Ve!==Ce?ze(Ve,{index:at}):et,Se;ee||(Se={opacity:V?0:1,height:V?0:Ce,overflowY:V?"hidden":Ce,order:ue?at:Ce,pointerEvents:V?"none":Ce,position:V?"absolute":Ce});var he={};V&&(he["aria-hidden"]=!0);var Le=p.createElement(we,(0,E.Z)({className:T()(!ee&&q,Dt),style:(0,J.Z)((0,J.Z)({},Se),St)},he,oe,{ref:G}),de);return ue&&(Le=p.createElement(ye.Z,{onResize:function(Ye){var ce=Ye.offsetWidth;re(ce)},disabled:Re},Le)),Le}var ve=p.forwardRef(N);ve.displayName="Item";var Oe=ve,k=f(6089),Xe=f(4676),nt=f(16089);function Ze(H){if(typeof MessageChannel=="undefined")(0,nt.Z)(H);else{var G=new MessageChannel;G.port1.onmessage=function(){return H()},G.port2.postMessage(void 0)}}function tt(){var H=p.useRef(null),G=function(ee){H.current||(H.current=[],Ze(function(){(0,Xe.unstable_batchedUpdates)(function(){H.current.forEach(function(Ve){Ve()}),H.current=null})})),H.current.push(ee)};return G}function _(H,G){var q=p.useState(G),ee=(0,C.Z)(q,2),Ve=ee[0],ze=ee[1],ue=(0,k.Z)(function(Re){H(function(){ze(Re)})});return[Ve,ue]}var Z=p.createContext(null),S=["component"],c=["className"],b=["className"],I=function(G,q){var ee=p.useContext(Z);if(!ee){var Ve=G.component,ze=Ve===void 0?"div":Ve,ue=(0,j.Z)(G,S);return p.createElement(ze,(0,E.Z)({},ue,{ref:q}))}var Re=ee.className,fe=(0,j.Z)(ee,c),bt=G.className,Dt=(0,j.Z)(G,b);return p.createElement(Z.Provider,{value:null},p.createElement(Oe,(0,E.Z)({ref:q,className:T()(Re,bt)},fe,Dt)))},F=p.forwardRef(I);F.displayName="RawItem";var R=F,be=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],We="responsive",Ae="invalidate";function me(H){return"+ ".concat(H.length," ...")}function ut(H,G){var q=H.prefixCls,ee=q===void 0?"rc-overflow":q,Ve=H.data,ze=Ve===void 0?[]:Ve,ue=H.renderItem,Re=H.renderRawItem,fe=H.itemKey,bt=H.itemWidth,Dt=bt===void 0?10:bt,St=H.ssr,et=H.style,Ot=H.className,at=H.maxCount,A=H.renderRest,we=H.renderRawRest,oe=H.suffix,V=H.component,re=V===void 0?"div":V,de=H.itemComponent,Se=H.onVisibleChange,he=(0,j.Z)(H,be),Le=St==="full",ne=tt(),Ye=_(ne,null),ce=(0,C.Z)(Ye,2),Ie=ce[0],Me=ce[1],Ee=Ie||0,Je=_(ne,new Map),U=(0,C.Z)(Je,2),rt=U[0],He=U[1],ct=_(ne,0),vt=(0,C.Z)(ct,2),rn=vt[0],Zt=vt[1],Ft=_(ne,0),Pt=(0,C.Z)(Ft,2),Xt=Pt[0],Yt=Pt[1],sn=_(ne,0),Cn=(0,C.Z)(sn,2),un=Cn[0],zn=Cn[1],Wn=(0,p.useState)(null),pn=(0,C.Z)(Wn,2),Ln=pn[0],wn=pn[1],In=(0,p.useState)(null),xn=(0,C.Z)(In,2),dn=xn[0],Nn=xn[1],Qt=p.useMemo(function(){return dn===null&&Le?Number.MAX_SAFE_INTEGER:dn||0},[dn,Ie]),An=(0,p.useState)(!1),Hn=(0,C.Z)(An,2),Sr=Hn[0],pr=Hn[1],on="".concat(ee,"-item"),Qe=Math.max(rn,Xt),Mt=at===We,g=ze.length&&Mt,D=at===Ae,W=g||typeof at=="number"&&ze.length>at,d=(0,p.useMemo)(function(){var ae=ze;return g?Ie===null&&Le?ae=ze:ae=ze.slice(0,Math.min(ze.length,Ee/Dt)):typeof at=="number"&&(ae=ze.slice(0,at)),ae},[ze,Dt,Ie,at,g]),h=(0,p.useMemo)(function(){return g?ze.slice(Qt+1):ze.slice(d.length)},[ze,d,g,Qt]),x=(0,p.useCallback)(function(ae,De){var it;return typeof fe=="function"?fe(ae):(it=fe&&(ae==null?void 0:ae[fe]))!==null&&it!==void 0?it:De},[fe]),L=(0,p.useCallback)(ue||function(ae){return ae},[ue]);function Q(ae,De,it){dn===ae&&(De===void 0||De===Ln)||(Nn(ae),it||(pr(ae<ze.length-1),Se==null||Se(ae)),De!==void 0&&wn(De))}function B(ae,De){Me(De.clientWidth)}function $(ae,De){He(function(it){var _e=new Map(it);return De===null?_e.delete(ae):_e.set(ae,De),_e})}function se(ae,De){Yt(De),Zt(Xt)}function ie(ae,De){zn(De)}function Fe(ae){return rt.get(x(d[ae],ae))}(0,te.Z)(function(){if(Ee&&typeof Qe=="number"&&d){var ae=un,De=d.length,it=De-1;if(!De){Q(0,null);return}for(var _e=0;_e<De;_e+=1){var lt=Fe(_e);if(Le&&(lt=lt||0),lt===void 0){Q(_e-1,void 0,!0);break}if(ae+=lt,it===0&&ae<=Ee||_e===it-1&&ae+Fe(it)<=Ee){Q(it,null);break}else if(ae+Qe>Ee){Q(_e-1,ae-lt-un+Xt);break}}oe&&Fe(0)+un>Ee&&wn(null)}},[Ee,rt,Xt,un,x,d]);var M=Sr&&!!h.length,K={};Ln!==null&&g&&(K={position:"absolute",left:Ln,top:0});var Ke={prefixCls:on,responsive:g,component:de,invalidate:D},pe=Re?function(ae,De){var it=x(ae,De);return p.createElement(Z.Provider,{key:it,value:(0,J.Z)((0,J.Z)({},Ke),{},{order:De,item:ae,itemKey:it,registerSize:$,display:De<=Qt})},Re(ae,De))}:function(ae,De){var it=x(ae,De);return p.createElement(Oe,(0,E.Z)({},Ke,{order:De,key:it,item:ae,renderItem:L,itemKey:it,registerSize:$,display:De<=Qt}))},Be={order:M?Qt:Number.MAX_SAFE_INTEGER,className:"".concat(on,"-rest"),registerSize:se,display:M},Te=A||me,ft=we?p.createElement(Z.Provider,{value:(0,J.Z)((0,J.Z)({},Ke),Be)},we(h)):p.createElement(Oe,(0,E.Z)({},Ke,Be),typeof Te=="function"?Te(h):Te),Y=p.createElement(re,(0,E.Z)({className:T()(!D&&ee,Ot),style:et,ref:G},he),d.map(pe),W?ft:null,oe&&p.createElement(Oe,(0,E.Z)({},Ke,{responsive:Mt,responsiveDisabled:!g,order:Qt,className:"".concat(on,"-suffix"),registerSize:ie,display:!0,style:K}),oe));return Mt?p.createElement(ye.Z,{onResize:B,disabled:!g},Y):Y}var ke=p.forwardRef(ut);ke.displayName="Overflow",ke.Item=R,ke.RESPONSIVE=We,ke.INVALIDATE=Ae;var Ge=ke,le=Ge},17115:function(nn,xe,f){"use strict";f.d(xe,{ZP:function(){return T}});var E=f(11036),J=f(59301),C=f(47273),j=0,p=(0,C.Z)();function P(){var ye;return p?(ye=j,j+=1):ye="TEST_OR_SSR",ye}function T(ye){var te=J.useState(),y=(0,E.Z)(te,2),Ce=y[0],N=y[1];return J.useEffect(function(){N("rc_select_".concat(P()))},[]),ye||Ce}},77861:function(nn,xe,f){"use strict";f.d(xe,{Ac:function(){return Me},Xo:function(){return Yt},Wx:function(){return Cn},ZP:function(){return W},lk:function(){return Z}});var E=f(71409),J=f(62730),C=f(87075),j=f(89490),p=f(11036),P=f(39224),T=f(28788),ye=f(18929),te=f(48736),y=f(59301),Ce=f(92310),N=f.n(Ce),ve=f(34280),Oe=f(49658),k=f(10228),Xe=f(8654),nt=function(h){var x=h.className,L=h.customizeIcon,Q=h.customizeIconProps,B=h.onMouseDown,$=h.onClick,se=h.children,ie;return typeof L=="function"?ie=L(Q):ie=L,y.createElement("span",{className:x,onMouseDown:function(M){M.preventDefault(),B&&B(M)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:$,"aria-hidden":!0},ie!==void 0?ie:y.createElement("span",{className:N()(x.split(/\s+/).map(function(Fe){return"".concat(Fe,"-icon")}))},se))},Ze=nt;function tt(d,h,x,L,Q){var B=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,$=arguments.length>6?arguments[6]:void 0,se=arguments.length>7?arguments[7]:void 0,ie=y.useMemo(function(){if((0,T.Z)(L)==="object")return L.clearIcon;if(Q)return Q},[L,Q]),Fe=y.useMemo(function(){return!!(!B&&L&&(x.length||$)&&!(se==="combobox"&&$===""))},[L,B,x.length,$,se]);return{allowClear:Fe,clearIcon:y.createElement(Ze,{className:"".concat(d,"-clear"),onMouseDown:h,customizeIcon:ie},"\xD7")}}var _=y.createContext(null);function Z(){return y.useContext(_)}function S(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,h=y.useState(!1),x=(0,p.Z)(h,2),L=x[0],Q=x[1],B=y.useRef(null),$=function(){window.clearTimeout(B.current)};y.useEffect(function(){return $},[]);var se=function(Fe,M){$(),B.current=window.setTimeout(function(){Q(Fe),M&&M()},d)};return[L,se,$]}function c(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,h=y.useRef(null),x=y.useRef(null);y.useEffect(function(){return function(){window.clearTimeout(x.current)}},[]);function L(Q){(Q||h.current===null)&&(h.current=Q),window.clearTimeout(x.current),x.current=window.setTimeout(function(){h.current=null},d)}return[function(){return h.current},L]}function b(d,h,x,L){var Q=y.useRef(null);Q.current={open:h,triggerOpen:x,customizedTrigger:L},y.useEffect(function(){function B($){var se;if(!((se=Q.current)!==null&&se!==void 0&&se.customizedTrigger)){var ie=$.target;ie.shadowRoot&&$.composed&&(ie=$.composedPath()[0]||ie),Q.current.open&&d().filter(function(Fe){return Fe}).every(function(Fe){return!Fe.contains(ie)&&Fe!==ie})&&Q.current.triggerOpen(!1)}}return window.addEventListener("mousedown",B),function(){return window.removeEventListener("mousedown",B)}},[])}var I=f(26112),F=f(11780),R=function(h,x){var L,Q,B=h.prefixCls,$=h.id,se=h.inputElement,ie=h.disabled,Fe=h.tabIndex,M=h.autoFocus,K=h.autoComplete,Ke=h.editable,pe=h.activeDescendantId,Be=h.value,Te=h.maxLength,ft=h.onKeyDown,Y=h.onMouseDown,ae=h.onChange,De=h.onPaste,it=h.onCompositionStart,_e=h.onCompositionEnd,lt=h.open,_t=h.attrs,Rt=se||y.createElement("input",null),$t=Rt,zt=$t.ref,wt=$t.props,qt=wt.onKeyDown,Ut=wt.onChange,jt=wt.onMouseDown,kt=wt.onCompositionStart,Lt=wt.onCompositionEnd,xt=wt.style;return(0,te.Kp)(!("maxLength"in Rt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Rt=y.cloneElement(Rt,(0,j.Z)((0,j.Z)((0,j.Z)({type:"search"},wt),{},{id:$,ref:(0,Xe.sQ)(x,zt),disabled:ie,tabIndex:Fe,autoComplete:K||"off",autoFocus:M,className:N()("".concat(B,"-selection-search-input"),(L=Rt)===null||L===void 0||(Q=L.props)===null||Q===void 0?void 0:Q.className),role:"combobox","aria-label":"Search","aria-expanded":lt||!1,"aria-haspopup":"listbox","aria-owns":"".concat($,"_list"),"aria-autocomplete":"list","aria-controls":"".concat($,"_list"),"aria-activedescendant":lt?pe:void 0},_t),{},{value:Ke?Be:"",maxLength:Te,readOnly:!Ke,unselectable:Ke?null:"on",style:(0,j.Z)((0,j.Z)({},xt),{},{opacity:Ke?null:0}),onKeyDown:function(Et){ft(Et),qt&&qt(Et)},onMouseDown:function(Et){Y(Et),jt&&jt(Et)},onChange:function(Et){ae(Et),Ut&&Ut(Et)},onCompositionStart:function(Et){it(Et),kt&&kt(Et)},onCompositionEnd:function(Et){_e(Et),Lt&&Lt(Et)},onPaste:De})),Rt},be=y.forwardRef(R);be.displayName="Input";var We=be;function Ae(d){return Array.isArray(d)?d:d!==void 0?[d]:[]}var me=typeof window!="undefined"&&window.document&&window.document.documentElement,ut=me;function ke(d){return d!=null}function Ge(d){return!d&&d!==0}function le(d){return["string","number"].includes((0,T.Z)(d))}function H(d){var h=void 0;return d&&(le(d.title)?h=d.title.toString():le(d.label)&&(h=d.label.toString())),h}function G(d,h){ut?y.useLayoutEffect(d,h):y.useEffect(d,h)}function q(d){var h;return(h=d.key)!==null&&h!==void 0?h:d.value}var ee=function(h){h.preventDefault(),h.stopPropagation()},Ve=function(h){var x=h.id,L=h.prefixCls,Q=h.values,B=h.open,$=h.searchValue,se=h.autoClearSearchValue,ie=h.inputRef,Fe=h.placeholder,M=h.disabled,K=h.mode,Ke=h.showSearch,pe=h.autoFocus,Be=h.autoComplete,Te=h.activeDescendantId,ft=h.tabIndex,Y=h.removeIcon,ae=h.maxTagCount,De=h.maxTagTextLength,it=h.maxTagPlaceholder,_e=it===void 0?function(At){return"+ ".concat(At.length," ...")}:it,lt=h.tagRender,_t=h.onToggleOpen,Rt=h.onRemove,$t=h.onInputChange,zt=h.onInputPaste,wt=h.onInputKeyDown,qt=h.onInputMouseDown,Ut=h.onInputCompositionStart,jt=h.onInputCompositionEnd,kt=y.useRef(null),Lt=(0,y.useState)(0),xt=(0,p.Z)(Lt,2),Wt=xt[0],Et=xt[1],fn=(0,y.useState)(!1),Nt=(0,p.Z)(fn,2),Ht=Nt[0],an=Nt[1],Gt="".concat(L,"-selection"),En=B||K==="multiple"&&se===!1||K==="tags"?$:"",jn=K==="tags"||K==="multiple"&&se===!1||Ke&&(B||Ht);G(function(){Et(kt.current.scrollWidth)},[En]);function It(At,ln,gn,mn,Tn){return y.createElement("span",{className:N()("".concat(Gt,"-item"),(0,C.Z)({},"".concat(Gt,"-item-disabled"),gn)),title:H(At)},y.createElement("span",{className:"".concat(Gt,"-item-content")},ln),mn&&y.createElement(Ze,{className:"".concat(Gt,"-item-remove"),onMouseDown:ee,onClick:Tn,customizeIcon:Y},"\xD7"))}function st(At,ln,gn,mn,Tn){var Ue=function(gt){ee(gt),_t(!B)};return y.createElement("span",{onMouseDown:Ue},lt({label:ln,value:At,disabled:gn,closable:mn,onClose:Tn}))}function dt(At){var ln=At.disabled,gn=At.label,mn=At.value,Tn=!M&&!ln,Ue=gn;if(typeof De=="number"&&(typeof gn=="string"||typeof gn=="number")){var $e=String(Ue);$e.length>De&&(Ue="".concat($e.slice(0,De),"..."))}var gt=function(vn){vn&&vn.stopPropagation(),Rt(At)};return typeof lt=="function"?st(mn,Ue,ln,Tn,gt):It(At,Ue,ln,Tn,gt)}function en(At){var ln=typeof _e=="function"?_e(At):_e;return It({title:ln},ln,!1)}var tn=y.createElement("div",{className:"".concat(Gt,"-search"),style:{width:Wt},onFocus:function(){an(!0)},onBlur:function(){an(!1)}},y.createElement(We,{ref:ie,open:B,prefixCls:L,id:x,inputElement:null,disabled:M,autoFocus:pe,autoComplete:Be,editable:jn,activeDescendantId:Te,value:En,onKeyDown:wt,onMouseDown:qt,onChange:$t,onPaste:zt,onCompositionStart:Ut,onCompositionEnd:jt,tabIndex:ft,attrs:(0,I.Z)(h,!0)}),y.createElement("span",{ref:kt,className:"".concat(Gt,"-search-mirror"),"aria-hidden":!0},En,"\xA0")),Vt=y.createElement(F.Z,{prefixCls:"".concat(Gt,"-overflow"),data:Q,renderItem:dt,renderRest:en,suffix:tn,itemKey:q,maxCount:ae});return y.createElement(y.Fragment,null,Vt,!Q.length&&!En&&y.createElement("span",{className:"".concat(Gt,"-placeholder")},Fe))},ze=Ve,ue=function(h){var x=h.inputElement,L=h.prefixCls,Q=h.id,B=h.inputRef,$=h.disabled,se=h.autoFocus,ie=h.autoComplete,Fe=h.activeDescendantId,M=h.mode,K=h.open,Ke=h.values,pe=h.placeholder,Be=h.tabIndex,Te=h.showSearch,ft=h.searchValue,Y=h.activeValue,ae=h.maxLength,De=h.onInputKeyDown,it=h.onInputMouseDown,_e=h.onInputChange,lt=h.onInputPaste,_t=h.onInputCompositionStart,Rt=h.onInputCompositionEnd,$t=h.title,zt=y.useState(!1),wt=(0,p.Z)(zt,2),qt=wt[0],Ut=wt[1],jt=M==="combobox",kt=jt||Te,Lt=Ke[0],xt=ft||"";jt&&Y&&!qt&&(xt=Y),y.useEffect(function(){jt&&Ut(!1)},[jt,Y]);var Wt=M!=="combobox"&&!K&&!Te?!1:!!xt,Et=$t===void 0?H(Lt):$t,fn=function(){if(Lt)return null;var Ht=Wt?{visibility:"hidden"}:void 0;return y.createElement("span",{className:"".concat(L,"-selection-placeholder"),style:Ht},pe)};return y.createElement(y.Fragment,null,y.createElement("span",{className:"".concat(L,"-selection-search")},y.createElement(We,{ref:B,prefixCls:L,id:Q,open:K,inputElement:x,disabled:$,autoFocus:se,autoComplete:ie,editable:kt,activeDescendantId:Fe,value:xt,onKeyDown:De,onMouseDown:it,onChange:function(Ht){Ut(!0),_e(Ht)},onPaste:lt,onCompositionStart:_t,onCompositionEnd:Rt,tabIndex:Be,attrs:(0,I.Z)(h,!0),maxLength:jt?ae:void 0})),!jt&&Lt?y.createElement("span",{className:"".concat(L,"-selection-item"),title:Et,style:Wt?{visibility:"hidden"}:void 0},Lt.label):null,fn())},Re=ue;function fe(d){return![k.Z.ESC,k.Z.SHIFT,k.Z.BACKSPACE,k.Z.TAB,k.Z.WIN_KEY,k.Z.ALT,k.Z.META,k.Z.WIN_KEY_RIGHT,k.Z.CTRL,k.Z.SEMICOLON,k.Z.EQUALS,k.Z.CAPS_LOCK,k.Z.CONTEXT_MENU,k.Z.F1,k.Z.F2,k.Z.F3,k.Z.F4,k.Z.F5,k.Z.F6,k.Z.F7,k.Z.F8,k.Z.F9,k.Z.F10,k.Z.F11,k.Z.F12].includes(d)}var bt=function(h,x){var L=(0,y.useRef)(null),Q=(0,y.useRef)(!1),B=h.prefixCls,$=h.open,se=h.mode,ie=h.showSearch,Fe=h.tokenWithEnter,M=h.autoClearSearchValue,K=h.onSearch,Ke=h.onSearchSubmit,pe=h.onToggleOpen,Be=h.onInputKeyDown,Te=h.domRef;y.useImperativeHandle(x,function(){return{focus:function(){L.current.focus()},blur:function(){L.current.blur()}}});var ft=c(0),Y=(0,p.Z)(ft,2),ae=Y[0],De=Y[1],it=function(xt){var Wt=xt.which;(Wt===k.Z.UP||Wt===k.Z.DOWN)&&xt.preventDefault(),Be&&Be(xt),Wt===k.Z.ENTER&&se==="tags"&&!Q.current&&!$&&(Ke==null||Ke(xt.target.value)),fe(Wt)&&pe(!0)},_e=function(){De(!0)},lt=(0,y.useRef)(null),_t=function(xt){K(xt,!0,Q.current)!==!1&&pe(!0)},Rt=function(){Q.current=!0},$t=function(xt){Q.current=!1,se!=="combobox"&&_t(xt.target.value)},zt=function(xt){var Wt=xt.target.value;if(Fe&&lt.current&&/[\r\n]/.test(lt.current)){var Et=lt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Wt=Wt.replace(Et,lt.current)}lt.current=null,_t(Wt)},wt=function(xt){var Wt=xt.clipboardData,Et=Wt.getData("text");lt.current=Et},qt=function(xt){var Wt=xt.target;if(Wt!==L.current){var Et=document.body.style.msTouchAction!==void 0;Et?setTimeout(function(){L.current.focus()}):L.current.focus()}},Ut=function(xt){var Wt=ae();xt.target!==L.current&&!Wt&&se!=="combobox"&&xt.preventDefault(),(se!=="combobox"&&(!ie||!Wt)||!$)&&($&&M!==!1&&K("",!0,!1),pe())},jt={inputRef:L,onInputKeyDown:it,onInputMouseDown:_e,onInputChange:zt,onInputPaste:wt,onInputCompositionStart:Rt,onInputCompositionEnd:$t},kt=se==="multiple"||se==="tags"?y.createElement(ze,(0,E.Z)({},h,jt)):y.createElement(Re,(0,E.Z)({},h,jt));return y.createElement("div",{ref:Te,className:"".concat(B,"-selector"),onClick:qt,onMouseDown:Ut},kt)},Dt=y.forwardRef(bt);Dt.displayName="Selector";var St=Dt,et=f(35593),Ot=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],at=function(h){var x=h===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"}}},A=function(h,x){var L=h.prefixCls,Q=h.disabled,B=h.visible,$=h.children,se=h.popupElement,ie=h.animation,Fe=h.transitionName,M=h.dropdownStyle,K=h.dropdownClassName,Ke=h.direction,pe=Ke===void 0?"ltr":Ke,Be=h.placement,Te=h.builtinPlacements,ft=h.dropdownMatchSelectWidth,Y=h.dropdownRender,ae=h.dropdownAlign,De=h.getPopupContainer,it=h.empty,_e=h.getTriggerDOMNode,lt=h.onPopupVisibleChange,_t=h.onPopupMouseEnter,Rt=(0,P.Z)(h,Ot),$t="".concat(L,"-dropdown"),zt=se;Y&&(zt=Y(se));var wt=y.useMemo(function(){return Te||at(ft)},[Te,ft]),qt=ie?"".concat($t,"-").concat(ie):Fe,Ut=typeof ft=="number",jt=y.useMemo(function(){return Ut?null:ft===!1?"minWidth":"width"},[ft,Ut]),kt=M;Ut&&(kt=(0,j.Z)((0,j.Z)({},kt),{},{width:ft}));var Lt=y.useRef(null);return y.useImperativeHandle(x,function(){return{getPopupElement:function(){return Lt.current}}}),y.createElement(et.Z,(0,E.Z)({},Rt,{showAction:lt?["click"]:[],hideAction:lt?["click"]:[],popupPlacement:Be||(pe==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:wt,prefixCls:$t,popupTransitionName:qt,popup:y.createElement("div",{ref:Lt,onMouseEnter:_t},zt),stretch:jt,popupAlign:ae,popupVisible:B,getPopupContainer:De,popupClassName:N()(K,(0,C.Z)({},"".concat($t,"-empty"),it)),popupStyle:kt,getTriggerDOMNode:_e,onPopupVisibleChange:lt}),$)},we=y.forwardRef(A);we.displayName="SelectTrigger";var oe=we,V=f(67900);function re(d,h){var x=d.key,L;return"value"in d&&(L=d.value),x!=null?x:L!==void 0?L:"rc-index-key-".concat(h)}function de(d,h){var x=d||{},L=x.label,Q=x.value,B=x.options,$=x.groupLabel,se=L||(h?"children":"label");return{label:se,value:Q||"value",options:B||"options",groupLabel:$||se}}function Se(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=h.fieldNames,L=h.childrenAsData,Q=[],B=de(x,!1),$=B.label,se=B.value,ie=B.options,Fe=B.groupLabel;function M(K,Ke){K.forEach(function(pe){if(Ke||!(ie in pe)){var Be=pe[se];Q.push({key:re(pe,Q.length),groupOption:Ke,data:pe,label:pe[$],value:Be})}else{var Te=pe[Fe];Te===void 0&&L&&(Te=pe.label),Q.push({key:re(pe,Q.length),group:!0,data:pe,label:Te}),M(pe[ie],!0)}})}return M(d,!1),Q}function he(d){var h=(0,j.Z)({},d);return"props"in h||Object.defineProperty(h,"props",{get:function(){return(0,te.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),h}}),h}function Le(d,h){if(!h||!h.length)return null;var x=!1;function L(B,$){var se=(0,V.Z)($),ie=se[0],Fe=se.slice(1);if(!ie)return[B];var M=B.split(ie);return x=x||M.length>1,M.reduce(function(K,Ke){return[].concat((0,J.Z)(K),(0,J.Z)(L(Ke,Fe)))},[]).filter(function(K){return K})}var Q=L(d,h);return x?Q:null}var ne=["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"],Ye=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function ce(d){return d==="tags"||d==="multiple"}var Ie=y.forwardRef(function(d,h){var x,L,Q=d.id,B=d.prefixCls,$=d.className,se=d.showSearch,ie=d.tagRender,Fe=d.direction,M=d.omitDomProps,K=d.displayValues,Ke=d.onDisplayValuesChange,pe=d.emptyOptions,Be=d.notFoundContent,Te=Be===void 0?"Not Found":Be,ft=d.onClear,Y=d.mode,ae=d.disabled,De=d.loading,it=d.getInputElement,_e=d.getRawInputElement,lt=d.open,_t=d.defaultOpen,Rt=d.onDropdownVisibleChange,$t=d.activeValue,zt=d.onActiveValueChange,wt=d.activeDescendantId,qt=d.searchValue,Ut=d.autoClearSearchValue,jt=d.onSearch,kt=d.onSearchSplit,Lt=d.tokenSeparators,xt=d.allowClear,Wt=d.suffixIcon,Et=d.clearIcon,fn=d.OptionList,Nt=d.animation,Ht=d.transitionName,an=d.dropdownStyle,Gt=d.dropdownClassName,En=d.dropdownMatchSelectWidth,jn=d.dropdownRender,It=d.dropdownAlign,st=d.placement,dt=d.builtinPlacements,en=d.getPopupContainer,tn=d.showAction,Vt=tn===void 0?[]:tn,At=d.onFocus,ln=d.onBlur,gn=d.onKeyUp,mn=d.onKeyDown,Tn=d.onMouseDown,Ue=(0,P.Z)(d,ne),$e=ce(Y),gt=(se!==void 0?se:$e)||Y==="combobox",mt=(0,j.Z)({},Ue);Ye.forEach(function(Jt){delete mt[Jt]}),M==null||M.forEach(function(Jt){delete mt[Jt]});var vn=y.useState(!1),Cr=(0,p.Z)(vn,2),Kn=Cr[0],_n=Cr[1];y.useEffect(function(){_n((0,Oe.Z)())},[]);var Fn=y.useRef(null),kn=y.useRef(null),Mn=y.useRef(null),sr=y.useRef(null),qn=y.useRef(null),tr=S(),Kr=(0,p.Z)(tr,3),Xr=Kr[0],li=Kr[1],Yr=Kr[2];y.useImperativeHandle(h,function(){var Jt,Bt;return{focus:(Jt=sr.current)===null||Jt===void 0?void 0:Jt.focus,blur:(Bt=sr.current)===null||Bt===void 0?void 0:Bt.blur,scrollTo:function(nr){var On;return(On=qn.current)===null||On===void 0?void 0:On.scrollTo(nr)}}});var xr=y.useMemo(function(){var Jt;if(Y!=="combobox")return qt;var Bt=(Jt=K[0])===null||Jt===void 0?void 0:Jt.value;return typeof Bt=="string"||typeof Bt=="number"?String(Bt):""},[qt,Y,K]),Qr=Y==="combobox"&&typeof it=="function"&&it()||null,Ir=typeof _e=="function"&&_e(),Bi=(0,Xe.x1)(kn,Ir==null||(x=Ir.props)===null||x===void 0?void 0:x.ref),Si=y.useState(!1),si=(0,p.Z)(Si,2),_r=si[0],Ci=si[1];(0,ve.Z)(function(){Ci(!0)},[]);var xi=(0,ye.Z)(!1,{defaultValue:_t,value:lt}),Ur=(0,p.Z)(xi,2),Ar=Ur[0],ui=Ur[1],ht=_r?Ar:!1,Tt=!Te&&pe;(ae||Tt&&ht&&Y==="combobox")&&(ht=!1);var yt=Tt?!1:ht,ot=y.useCallback(function(Jt){var Bt=Jt!==void 0?Jt:!ht;ae||(ui(Bt),ht!==Bt&&(Rt==null||Rt(Bt)))},[ae,ht,ui,Rt]),yn=y.useMemo(function(){return(Lt||[]).some(function(Jt){return[`
`,`\r
`].includes(Jt)})},[Lt]),bn=function(Bt,Vn,nr){var On=!0,or=Bt;zt==null||zt(null);var gr=nr?null:Le(Bt,Lt);return Y!=="combobox"&&gr&&(or="",kt==null||kt(gr),ot(!1),On=!1),jt&&xr!==or&&jt(or,{source:Vn?"typing":"effect"}),On},ur=function(Bt){!Bt||!Bt.trim()||jt(Bt,{source:"submit"})};y.useEffect(function(){!ht&&!$e&&Y!=="combobox"&&bn("",!1,!1)},[ht]),y.useEffect(function(){Ar&&ae&&ui(!1),ae&&li(!1)},[ae]);var Mr=c(),Fr=(0,p.Z)(Mr,2),Gn=Fr[0],Rr=Fr[1],ci=function(Bt){var Vn=Gn(),nr=Bt.which;if(nr===k.Z.ENTER&&(Y!=="combobox"&&Bt.preventDefault(),ht||ot(!0)),Rr(!!xr),nr===k.Z.BACKSPACE&&!Vn&&$e&&!xr&&K.length){for(var On=(0,J.Z)(K),or=null,gr=On.length-1;gr>=0;gr-=1){var jr=On[gr];if(!jr.disabled){On.splice(gr,1),or=jr;break}}or&&Ke(On,{type:"remove",values:[or]})}for(var wr=arguments.length,kr=new Array(wr>1?wr-1:0),Nr=1;Nr<wr;Nr++)kr[Nr-1]=arguments[Nr];if(ht&&qn.current){var mr;(mr=qn.current).onKeyDown.apply(mr,[Bt].concat(kr))}mn==null||mn.apply(void 0,[Bt].concat(kr))},Zi=function(Bt){for(var Vn=arguments.length,nr=new Array(Vn>1?Vn-1:0),On=1;On<Vn;On++)nr[On-1]=arguments[On];if(ht&&qn.current){var or;(or=qn.current).onKeyUp.apply(or,[Bt].concat(nr))}gn==null||gn.apply(void 0,[Bt].concat(nr))},mo=function(Bt){var Vn=K.filter(function(nr){return nr!==Bt});Ke(Vn,{type:"remove",values:[Bt]})},Hr=y.useRef(!1),Lr=function(){li(!0),ae||(At&&!Hr.current&&At.apply(void 0,arguments),Vt.includes("focus")&&ot(!0)),Hr.current=!0},Zo=function(){li(!1,function(){Hr.current=!1,ot(!1)}),!ae&&(xr&&(Y==="tags"?jt(xr,{source:"submit"}):Y==="multiple"&&jt("",{source:"blur"})),ln&&ln.apply(void 0,arguments))},Tr=[];y.useEffect(function(){return function(){Tr.forEach(function(Jt){return clearTimeout(Jt)}),Tr.splice(0,Tr.length)}},[]);var $r=function(Bt){var Vn,nr=Bt.target,On=(Vn=Mn.current)===null||Vn===void 0?void 0:Vn.getPopupElement();if(On&&On.contains(nr)){var or=setTimeout(function(){var kr=Tr.indexOf(or);if(kr!==-1&&Tr.splice(kr,1),Yr(),!Kn&&!On.contains(document.activeElement)){var Nr;(Nr=sr.current)===null||Nr===void 0||Nr.focus()}});Tr.push(or)}for(var gr=arguments.length,jr=new Array(gr>1?gr-1:0),wr=1;wr<gr;wr++)jr[wr-1]=arguments[wr];Tn==null||Tn.apply(void 0,[Bt].concat(jr))},wi=y.useState({}),Ki=(0,p.Z)(wi,2),yo=Ki[1];function Dr(){yo({})}var Br;Ir&&(Br=function(Bt){ot(Bt)}),b(function(){var Jt;return[Fn.current,(Jt=Mn.current)===null||Jt===void 0?void 0:Jt.getPopupElement()]},yt,ot,!!Ir);var _i=y.useMemo(function(){return(0,j.Z)((0,j.Z)({},d),{},{notFoundContent:Te,open:ht,triggerOpen:yt,id:Q,showSearch:gt,multiple:$e,toggleOpen:ot})},[d,Te,yt,ht,Q,gt,$e,ot]),bo=!!Wt||De,Ui;bo&&(Ui=y.createElement(Ze,{className:N()("".concat(B,"-arrow"),(0,C.Z)({},"".concat(B,"-arrow-loading"),De)),customizeIcon:Wt,customizeIconProps:{loading:De,searchValue:xr,open:ht,focused:Xr,showSearch:gt}}));var Ko=function(){var Bt;ft==null||ft(),(Bt=sr.current)===null||Bt===void 0||Bt.focus(),Ke([],{type:"clear",values:K}),bn("",!1,!1)},ji=tt(B,Ko,K,xt,Et,ae,xr,Y),ki=ji.allowClear,Jr=ji.clearIcon,Pr=y.createElement(fn,{ref:qn}),So=N()(B,$,(L={},(0,C.Z)(L,"".concat(B,"-focused"),Xr),(0,C.Z)(L,"".concat(B,"-multiple"),$e),(0,C.Z)(L,"".concat(B,"-single"),!$e),(0,C.Z)(L,"".concat(B,"-allow-clear"),xt),(0,C.Z)(L,"".concat(B,"-show-arrow"),bo),(0,C.Z)(L,"".concat(B,"-disabled"),ae),(0,C.Z)(L,"".concat(B,"-loading"),De),(0,C.Z)(L,"".concat(B,"-open"),ht),(0,C.Z)(L,"".concat(B,"-customize-input"),Qr),(0,C.Z)(L,"".concat(B,"-show-search"),gt),L)),Gi=y.createElement(oe,{ref:Mn,disabled:ae,prefixCls:B,visible:yt,popupElement:Pr,animation:Nt,transitionName:Ht,dropdownStyle:an,dropdownClassName:Gt,direction:Fe,dropdownMatchSelectWidth:En,dropdownRender:jn,dropdownAlign:It,placement:st,builtinPlacements:dt,getPopupContainer:en,empty:pe,getTriggerDOMNode:function(){return kn.current},onPopupVisibleChange:Br,onPopupMouseEnter:Dr},Ir?y.cloneElement(Ir,{ref:Bi}):y.createElement(St,(0,E.Z)({},d,{domRef:kn,prefixCls:B,inputElement:Qr,ref:sr,id:Q,showSearch:gt,autoClearSearchValue:Ut,mode:Y,activeDescendantId:wt,tagRender:ie,values:K,open:ht,onToggleOpen:ot,activeValue:$t,searchValue:xr,onSearch:bn,onSearchSubmit:ur,onRemove:mo,tokenWithEnter:yn}))),Vi;return Ir?Vi=Gi:Vi=y.createElement("div",(0,E.Z)({className:So},mt,{ref:Fn,onMouseDown:$r,onKeyDown:ci,onKeyUp:Zi,onFocus:Lr,onBlur:Zo}),Xr&&!ht&&y.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(K.map(function(Jt){var Bt=Jt.label,Vn=Jt.value;return["number","string"].includes((0,T.Z)(Bt))?Bt:Vn}).join(", "))),Gi,Ui,ki&&Jr),y.createElement(_.Provider,{value:_i},Vi)}),Me=Ie,Ee=function(d,h){var x=y.useRef({values:new Map,options:new Map}),L=y.useMemo(function(){var B=x.current,$=B.values,se=B.options,ie=d.map(function(K){if(K.label===void 0){var Ke;return(0,j.Z)((0,j.Z)({},K),{},{label:(Ke=$.get(K.value))===null||Ke===void 0?void 0:Ke.label})}return K}),Fe=new Map,M=new Map;return ie.forEach(function(K){Fe.set(K.value,K),M.set(K.value,h.get(K.value)||se.get(K.value))}),x.current.values=Fe,x.current.options=M,ie},[d,h]),Q=y.useCallback(function(B){return h.get(B)||x.current.options.get(B)},[h]);return[L,Q]};function Je(d,h){return Ae(d).join("").toUpperCase().includes(h)}var U=function(d,h,x,L,Q){return y.useMemo(function(){if(!x||L===!1)return d;var B=h.options,$=h.label,se=h.value,ie=[],Fe=typeof L=="function",M=x.toUpperCase(),K=Fe?L:function(pe,Be){return Q?Je(Be[Q],M):Be[B]?Je(Be[$!=="children"?$:"label"],M):Je(Be[se],M)},Ke=Fe?function(pe){return he(pe)}:function(pe){return pe};return d.forEach(function(pe){if(pe[B]){var Be=K(x,Ke(pe));if(Be)ie.push(pe);else{var Te=pe[B].filter(function(ft){return K(x,Ke(ft))});Te.length&&ie.push((0,j.Z)((0,j.Z)({},pe),{},(0,C.Z)({},B,Te)))}return}K(x,Ke(pe))&&ie.push(pe)}),ie},[d,L,Q,x,h])},rt=f(17115),He=f(11592),ct=["children","value"],vt=["children"];function rn(d){var h=d,x=h.key,L=h.props,Q=L.children,B=L.value,$=(0,P.Z)(L,ct);return(0,j.Z)({key:x,value:B!==void 0?B:x,children:Q},$)}function Zt(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,He.Z)(d).map(function(x,L){if(!y.isValidElement(x)||!x.type)return null;var Q=x,B=Q.type.isSelectOptGroup,$=Q.key,se=Q.props,ie=se.children,Fe=(0,P.Z)(se,vt);return h||!B?rn(x):(0,j.Z)((0,j.Z)({key:"__RC_SELECT_GRP__".concat($===null?L:$,"__"),label:$},Fe),{},{options:Zt(ie)})}).filter(function(x){return x})}function Ft(d,h,x,L,Q){return y.useMemo(function(){var B=d,$=!d;$&&(B=Zt(h));var se=new Map,ie=new Map,Fe=function(Ke,pe,Be){Be&&typeof Be=="string"&&Ke.set(pe[Be],pe)};function M(K){for(var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=0;pe<K.length;pe+=1){var Be=K[pe];!Be[x.options]||Ke?(se.set(Be[x.value],Be),Fe(ie,Be,x.label),Fe(ie,Be,L),Fe(ie,Be,Q)):M(Be[x.options],!0)}}return M(B),{options:B,valueOptions:se,labelOptions:ie}},[d,h,x,L,Q])}function Pt(d){var h=y.useRef();h.current=d;var x=y.useCallback(function(){return h.current.apply(h,arguments)},[]);return x}var Xt=function(){return null};Xt.isSelectOptGroup=!0;var Yt=Xt,sn=function(){return null};sn.isSelectOption=!0;var Cn=sn,un=f(80547),zn=f(2738),Wn=f(65283),pn=y.createContext(null),Ln=pn;function wn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var In=["disabled","title","children","style","className"];function xn(d){return typeof d=="string"||typeof d=="number"}var dn=function(h,x){var L=Z(),Q=L.prefixCls,B=L.id,$=L.open,se=L.multiple,ie=L.mode,Fe=L.searchValue,M=L.toggleOpen,K=L.notFoundContent,Ke=L.onPopupScroll,pe=y.useContext(Ln),Be=pe.flattenOptions,Te=pe.onActiveValue,ft=pe.defaultActiveFirstOption,Y=pe.onSelect,ae=pe.menuItemSelectedIcon,De=pe.rawValues,it=pe.fieldNames,_e=pe.virtual,lt=pe.direction,_t=pe.listHeight,Rt=pe.listItemHeight,$t="".concat(Q,"-item"),zt=(0,un.Z)(function(){return Be},[$,Be],function(It,st){return st[0]&&It[1]!==st[1]}),wt=y.useRef(null),qt=function(st){st.preventDefault()},Ut=function(st){wt.current&&wt.current.scrollTo(typeof st=="number"?{index:st}:st)},jt=function(st){for(var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,en=zt.length,tn=0;tn<en;tn+=1){var Vt=(st+tn*dt+en)%en,At=zt[Vt],ln=At.group,gn=At.data;if(!ln&&!gn.disabled)return Vt}return-1},kt=y.useState(function(){return jt(0)}),Lt=(0,p.Z)(kt,2),xt=Lt[0],Wt=Lt[1],Et=function(st){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Wt(st);var en={source:dt?"keyboard":"mouse"},tn=zt[st];if(!tn){Te(null,-1,en);return}Te(tn.value,st,en)};(0,y.useEffect)(function(){Et(ft!==!1?jt(0):-1)},[zt.length,Fe]);var fn=y.useCallback(function(It){return De.has(It)&&ie!=="combobox"},[ie,(0,J.Z)(De).toString(),De.size]);(0,y.useEffect)(function(){var It=setTimeout(function(){if(!se&&$&&De.size===1){var dt=Array.from(De)[0],en=zt.findIndex(function(tn){var Vt=tn.data;return Vt.value===dt});en!==-1&&(Et(en),Ut(en))}});if($){var st;(st=wt.current)===null||st===void 0||st.scrollTo(void 0)}return function(){return clearTimeout(It)}},[$,Fe,Be.length]);var Nt=function(st){st!==void 0&&Y(st,{selected:!De.has(st)}),se||M(!1)};if(y.useImperativeHandle(x,function(){return{onKeyDown:function(st){var dt=st.which,en=st.ctrlKey;switch(dt){case k.Z.N:case k.Z.P:case k.Z.UP:case k.Z.DOWN:{var tn=0;if(dt===k.Z.UP?tn=-1:dt===k.Z.DOWN?tn=1:wn()&&en&&(dt===k.Z.N?tn=1:dt===k.Z.P&&(tn=-1)),tn!==0){var Vt=jt(xt+tn,tn);Ut(Vt),Et(Vt,!0)}break}case k.Z.ENTER:{var At=zt[xt];At&&!At.data.disabled?Nt(At.value):Nt(void 0),$&&st.preventDefault();break}case k.Z.ESC:M(!1),$&&st.stopPropagation()}},onKeyUp:function(){},scrollTo:function(st){Ut(st)}}}),zt.length===0)return y.createElement("div",{role:"listbox",id:"".concat(B,"_list"),className:"".concat($t,"-empty"),onMouseDown:qt},K);var Ht=Object.keys(it).map(function(It){return it[It]}),an=function(st){return st.label};function Gt(It,st){var dt=It.group;return{role:dt?"presentation":"option",id:"".concat(B,"_list_").concat(st)}}var En=function(st){var dt=zt[st];if(!dt)return null;var en=dt.data||{},tn=en.value,Vt=dt.group,At=(0,I.Z)(en,!0),ln=an(dt);return dt?y.createElement("div",(0,E.Z)({"aria-label":typeof ln=="string"&&!Vt?ln:null},At,{key:st},Gt(dt,st),{"aria-selected":fn(tn)}),tn):null},jn={role:"listbox",id:"".concat(B,"_list")};return y.createElement(y.Fragment,null,_e&&y.createElement("div",(0,E.Z)({},jn,{style:{height:0,width:0,overflow:"hidden"}}),En(xt-1),En(xt),En(xt+1)),y.createElement(Wn.Z,{itemKey:"key",ref:wt,data:zt,height:_t,itemHeight:Rt,fullHeight:!1,onMouseDown:qt,onScroll:Ke,virtual:_e,direction:lt,innerProps:_e?null:jn},function(It,st){var dt,en=It.group,tn=It.groupOption,Vt=It.data,At=It.label,ln=It.value,gn=Vt.key;if(en){var mn,Tn=(mn=Vt.title)!==null&&mn!==void 0?mn:xn(At)?At.toString():void 0;return y.createElement("div",{className:N()($t,"".concat($t,"-group")),title:Tn},At!==void 0?At:gn)}var Ue=Vt.disabled,$e=Vt.title,gt=Vt.children,mt=Vt.style,vn=Vt.className,Cr=(0,P.Z)(Vt,In),Kn=(0,zn.Z)(Cr,Ht),_n=fn(ln),Fn="".concat($t,"-option"),kn=N()($t,Fn,vn,(dt={},(0,C.Z)(dt,"".concat(Fn,"-grouped"),tn),(0,C.Z)(dt,"".concat(Fn,"-active"),xt===st&&!Ue),(0,C.Z)(dt,"".concat(Fn,"-disabled"),Ue),(0,C.Z)(dt,"".concat(Fn,"-selected"),_n),dt)),Mn=an(It),sr=!ae||typeof ae=="function"||_n,qn=typeof Mn=="number"?Mn:Mn||ln,tr=xn(qn)?qn.toString():void 0;return $e!==void 0&&(tr=$e),y.createElement("div",(0,E.Z)({},(0,I.Z)(Kn),_e?{}:Gt(It,st),{"aria-selected":_n,className:kn,title:tr,onMouseMove:function(){xt===st||Ue||Et(st)},onClick:function(){Ue||Nt(ln)},style:mt}),y.createElement("div",{className:"".concat(Fn,"-content")},qn),y.isValidElement(ae)||_n,sr&&y.createElement(Ze,{className:"".concat($t,"-option-state"),customizeIcon:ae,customizeIconProps:{isSelected:_n}},_n?"\u2713":null))}))},Nn=y.forwardRef(dn);Nn.displayName="OptionList";var Qt=Nn;function An(d){var h=d.mode,x=d.options,L=d.children,Q=d.backfill,B=d.allowClear,$=d.placeholder,se=d.getInputElement,ie=d.showSearch,Fe=d.onSearch,M=d.defaultOpen,K=d.autoFocus,Ke=d.labelInValue,pe=d.value,Be=d.inputValue,Te=d.optionLabelProp,ft=isMultiple(h),Y=ie!==void 0?ie:ft||h==="combobox",ae=x||convertChildrenToData(L);if(warning(h!=="tags"||ae.every(function(lt){return!lt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),h==="tags"||h==="combobox"){var De=ae.some(function(lt){return lt.options?lt.options.some(function(_t){return typeof("value"in _t?_t.value:_t.key)=="number"}):typeof("value"in lt?lt.value:lt.key)=="number"});warning(!De,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(h!=="combobox"||!Te,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(h==="combobox"||!Q,"`backfill` only works with `combobox` mode."),warning(h==="combobox"||!se,"`getInputElement` only work with `combobox` mode."),noteOnce(h!=="combobox"||!se||!B||!$,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Fe&&!Y&&h!=="combobox"&&h!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!M||K,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),pe!=null){var it=toArray(pe);warning(!Ke||it.every(function(lt){return _typeof(lt)==="object"&&("key"in lt||"value"in lt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ft||Array.isArray(pe),"`value` should be array when `mode` is `multiple` or `tags`")}if(L){var _e=null;toNodeArray(L).some(function(lt){if(!React.isValidElement(lt)||!lt.type)return!1;var _t=lt,Rt=_t.type;if(Rt.isSelectOption)return!1;if(Rt.isSelectOptGroup){var $t=toNodeArray(lt.props.children).every(function(zt){return!React.isValidElement(zt)||!lt.type||zt.type.isSelectOption?!0:(_e=zt.type,!1)});return!$t}return _e=Rt,!0}),_e&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_e.displayName||_e.name||_e,"`.")),warning(Be===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Hn(d,h){if(d){var x=function L(Q){for(var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$=0;$<Q.length;$++){var se=Q[$];if(se[h==null?void 0:h.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!B&&Array.isArray(se[h==null?void 0:h.options])&&L(se[h==null?void 0:h.options],!0))break}};x(d)}}var Sr=null,pr=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],on=["inputValue"];function Qe(d){return!d||(0,T.Z)(d)!=="object"}var Mt=y.forwardRef(function(d,h){var x=d.id,L=d.mode,Q=d.prefixCls,B=Q===void 0?"rc-select":Q,$=d.backfill,se=d.fieldNames,ie=d.inputValue,Fe=d.searchValue,M=d.onSearch,K=d.autoClearSearchValue,Ke=K===void 0?!0:K,pe=d.onSelect,Be=d.onDeselect,Te=d.dropdownMatchSelectWidth,ft=Te===void 0?!0:Te,Y=d.filterOption,ae=d.filterSort,De=d.optionFilterProp,it=d.optionLabelProp,_e=d.options,lt=d.children,_t=d.defaultActiveFirstOption,Rt=d.menuItemSelectedIcon,$t=d.virtual,zt=d.direction,wt=d.listHeight,qt=wt===void 0?200:wt,Ut=d.listItemHeight,jt=Ut===void 0?20:Ut,kt=d.value,Lt=d.defaultValue,xt=d.labelInValue,Wt=d.onChange,Et=(0,P.Z)(d,pr),fn=(0,rt.ZP)(x),Nt=ce(L),Ht=!!(!_e&&lt),an=y.useMemo(function(){return Y===void 0&&L==="combobox"?!1:Y},[Y,L]),Gt=y.useMemo(function(){return de(se,Ht)},[JSON.stringify(se),Ht]),En=(0,ye.Z)("",{value:Fe!==void 0?Fe:ie,postState:function(Tt){return Tt||""}}),jn=(0,p.Z)(En,2),It=jn[0],st=jn[1],dt=Ft(_e,lt,Gt,De,it),en=dt.valueOptions,tn=dt.labelOptions,Vt=dt.options,At=y.useCallback(function(ht){var Tt=Ae(ht);return Tt.map(function(yt){var ot,yn,bn,ur,Mr;if(Qe(yt))ot=yt;else{var Fr;bn=yt.key,yn=yt.label,ot=(Fr=yt.value)!==null&&Fr!==void 0?Fr:bn}var Gn=en.get(ot);if(Gn){var Rr;if(yn===void 0&&(yn=Gn==null?void 0:Gn[it||Gt.label]),bn===void 0&&(bn=(Rr=Gn==null?void 0:Gn.key)!==null&&Rr!==void 0?Rr:ot),ur=Gn==null?void 0:Gn.disabled,Mr=Gn==null?void 0:Gn.title,0)var ci}return{label:yn,value:ot,key:bn,disabled:ur,title:Mr}})},[Gt,it,en]),ln=(0,ye.Z)(Lt,{value:kt}),gn=(0,p.Z)(ln,2),mn=gn[0],Tn=gn[1],Ue=y.useMemo(function(){var ht,Tt=At(mn);return L==="combobox"&&Ge((ht=Tt[0])===null||ht===void 0?void 0:ht.value)?[]:Tt},[mn,At,L]),$e=Ee(Ue,en),gt=(0,p.Z)($e,2),mt=gt[0],vn=gt[1],Cr=y.useMemo(function(){if(!L&&mt.length===1){var ht=mt[0];if(ht.value===null&&(ht.label===null||ht.label===void 0))return[]}return mt.map(function(Tt){var yt;return(0,j.Z)((0,j.Z)({},Tt),{},{label:(yt=Tt.label)!==null&&yt!==void 0?yt:Tt.value})})},[L,mt]),Kn=y.useMemo(function(){return new Set(mt.map(function(ht){return ht.value}))},[mt]);y.useEffect(function(){if(L==="combobox"){var ht,Tt=(ht=mt[0])===null||ht===void 0?void 0:ht.value;st(ke(Tt)?String(Tt):"")}},[mt]);var _n=Pt(function(ht,Tt){var yt,ot=Tt!=null?Tt:ht;return yt={},(0,C.Z)(yt,Gt.value,ht),(0,C.Z)(yt,Gt.label,ot),yt}),Fn=y.useMemo(function(){if(L!=="tags")return Vt;var ht=(0,J.Z)(Vt),Tt=function(ot){return en.has(ot)};return(0,J.Z)(mt).sort(function(yt,ot){return yt.value<ot.value?-1:1}).forEach(function(yt){var ot=yt.value;Tt(ot)||ht.push(_n(ot,yt.label))}),ht},[_n,Vt,en,mt,L]),kn=U(Fn,Gt,It,an,De),Mn=y.useMemo(function(){return L!=="tags"||!It||kn.some(function(ht){return ht[De||"value"]===It})||kn.some(function(ht){return ht[Gt.value]===It})?kn:[_n(It)].concat((0,J.Z)(kn))},[_n,De,L,kn,It,Gt]),sr=y.useMemo(function(){return ae?(0,J.Z)(Mn).sort(function(ht,Tt){return ae(ht,Tt)}):Mn},[Mn,ae]),qn=y.useMemo(function(){return Se(sr,{fieldNames:Gt,childrenAsData:Ht})},[sr,Gt,Ht]),tr=function(Tt){var yt=At(Tt);if(Tn(yt),Wt&&(yt.length!==mt.length||yt.some(function(bn,ur){var Mr;return((Mr=mt[ur])===null||Mr===void 0?void 0:Mr.value)!==(bn==null?void 0:bn.value)}))){var ot=xt?yt:yt.map(function(bn){return bn.value}),yn=yt.map(function(bn){return he(vn(bn.value))});Wt(Nt?ot:ot[0],Nt?yn:yn[0])}},Kr=y.useState(null),Xr=(0,p.Z)(Kr,2),li=Xr[0],Yr=Xr[1],xr=y.useState(0),Qr=(0,p.Z)(xr,2),Ir=Qr[0],Bi=Qr[1],Si=_t!==void 0?_t:L!=="combobox",si=y.useCallback(function(ht,Tt){var yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=yt.source,yn=ot===void 0?"keyboard":ot;Bi(Tt),$&&L==="combobox"&&ht!==null&&yn==="keyboard"&&Yr(String(ht))},[$,L]),_r=function(Tt,yt,ot){var yn=function(){var Hr,Lr=vn(Tt);return[xt?{label:Lr==null?void 0:Lr[Gt.label],value:Tt,key:(Hr=Lr==null?void 0:Lr.key)!==null&&Hr!==void 0?Hr:Tt}:Tt,he(Lr)]};if(yt&&pe){var bn=yn(),ur=(0,p.Z)(bn,2),Mr=ur[0],Fr=ur[1];pe(Mr,Fr)}else if(!yt&&Be&&ot!=="clear"){var Gn=yn(),Rr=(0,p.Z)(Gn,2),ci=Rr[0],Zi=Rr[1];Be(ci,Zi)}},Ci=Pt(function(ht,Tt){var yt,ot=Nt?Tt.selected:!0;ot?yt=Nt?[].concat((0,J.Z)(mt),[ht]):[ht]:yt=mt.filter(function(yn){return yn.value!==ht}),tr(yt),_r(ht,ot),L==="combobox"?Yr(""):(!ce||Ke)&&(st(""),Yr(""))}),xi=function(Tt,yt){tr(Tt);var ot=yt.type,yn=yt.values;(ot==="remove"||ot==="clear")&&yn.forEach(function(bn){_r(bn.value,!1,ot)})},Ur=function(Tt,yt){if(st(Tt),Yr(null),yt.source==="submit"){var ot=(Tt||"").trim();if(ot){var yn=Array.from(new Set([].concat((0,J.Z)(Kn),[ot])));tr(yn),_r(ot,!0),st("")}return}yt.source!=="blur"&&(L==="combobox"&&tr(Tt),M==null||M(Tt))},Ar=function(Tt){var yt=Tt;L!=="tags"&&(yt=Tt.map(function(yn){var bn=tn.get(yn);return bn==null?void 0:bn.value}).filter(function(yn){return yn!==void 0}));var ot=Array.from(new Set([].concat((0,J.Z)(Kn),(0,J.Z)(yt))));tr(ot),ot.forEach(function(yn){_r(yn,!0)})},ui=y.useMemo(function(){var ht=$t!==!1&&ft!==!1;return(0,j.Z)((0,j.Z)({},dt),{},{flattenOptions:qn,onActiveValue:si,defaultActiveFirstOption:Si,onSelect:Ci,menuItemSelectedIcon:Rt,rawValues:Kn,fieldNames:Gt,virtual:ht,direction:zt,listHeight:qt,listItemHeight:jt,childrenAsData:Ht})},[dt,qn,si,Si,Ci,Rt,Kn,Gt,$t,ft,qt,jt,Ht]);return y.createElement(Ln.Provider,{value:ui},y.createElement(Me,(0,E.Z)({},Et,{id:fn,prefixCls:B,ref:h,omitDomProps:on,mode:L,displayValues:Cr,onDisplayValuesChange:xi,direction:zt,searchValue:It,onSearch:Ur,autoClearSearchValue:Ke,onSearchSplit:Ar,dropdownMatchSelectWidth:ft,OptionList:Qt,emptyOptions:!qn.length,activeValue:li,activeDescendantId:"".concat(fn,"_list_").concat(Ir)})))}),g=Mt;g.Option=Cn,g.OptGroup=Yt;var D=g,W=D},9296:function(nn,xe,f){"use strict";f.r(xe),f.d(xe,{ResizableTextArea:function(){return be},default:function(){return Ge}});var E=f(71409),J=f(89490),C=f(87075),j=f(28788),p=f(11036),P=f(39224),T=f(62730),ye=f(92310),te=f.n(ye),y=f(93681),Ce=f(5643),N=f(18929),ve=f(59301),Oe=f(29301),k=f(34280),Xe=f(16089),nt=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,Ze=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],tt={},_;function Z(le){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,G=le.getAttribute("id")||le.getAttribute("data-reactid")||le.getAttribute("name");if(H&&tt[G])return tt[G];var q=window.getComputedStyle(le),ee=q.getPropertyValue("box-sizing")||q.getPropertyValue("-moz-box-sizing")||q.getPropertyValue("-webkit-box-sizing"),Ve=parseFloat(q.getPropertyValue("padding-bottom"))+parseFloat(q.getPropertyValue("padding-top")),ze=parseFloat(q.getPropertyValue("border-bottom-width"))+parseFloat(q.getPropertyValue("border-top-width")),ue=Ze.map(function(fe){return"".concat(fe,":").concat(q.getPropertyValue(fe))}).join(";"),Re={sizingStyle:ue,paddingSize:Ve,borderSize:ze,boxSizing:ee};return H&&G&&(tt[G]=Re),Re}function S(le){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;_||(_=document.createElement("textarea"),_.setAttribute("tab-index","-1"),_.setAttribute("aria-hidden","true"),document.body.appendChild(_)),le.getAttribute("wrap")?_.setAttribute("wrap",le.getAttribute("wrap")):_.removeAttribute("wrap");var ee=Z(le,H),Ve=ee.paddingSize,ze=ee.borderSize,ue=ee.boxSizing,Re=ee.sizingStyle;_.setAttribute("style","".concat(Re,";").concat(nt)),_.value=le.value||le.placeholder||"";var fe=void 0,bt=void 0,Dt,St=_.scrollHeight;if(ue==="border-box"?St+=ze:ue==="content-box"&&(St-=Ve),G!==null||q!==null){_.value=" ";var et=_.scrollHeight-Ve;G!==null&&(fe=et*G,ue==="border-box"&&(fe=fe+Ve+ze),St=Math.max(fe,St)),q!==null&&(bt=et*q,ue==="border-box"&&(bt=bt+Ve+ze),Dt=St>bt?"":"hidden",St=Math.min(bt,St))}var Ot={height:St,overflowY:Dt,resize:"none"};return fe&&(Ot.minHeight=fe),bt&&(Ot.maxHeight=bt),Ot}var c=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],b=0,I=1,F=2,R=ve.forwardRef(function(le,H){var G=le,q=G.prefixCls,ee=G.onPressEnter,Ve=G.defaultValue,ze=G.value,ue=G.autoSize,Re=G.onResize,fe=G.className,bt=G.style,Dt=G.disabled,St=G.onChange,et=G.onInternalAutoSize,Ot=(0,P.Z)(G,c),at=(0,N.Z)(Ve,{value:ze,postState:function(Yt){return Yt!=null?Yt:""}}),A=(0,p.Z)(at,2),we=A[0],oe=A[1],V=function(Yt){oe(Yt.target.value),St==null||St(Yt)},re=ve.useRef();ve.useImperativeHandle(H,function(){return{textArea:re.current}});var de=ve.useMemo(function(){return ue&&(0,j.Z)(ue)==="object"?[ue.minRows,ue.maxRows]:[]},[ue]),Se=(0,p.Z)(de,2),he=Se[0],Le=Se[1],ne=!!ue,Ye=function(){try{if(document.activeElement===re.current){var Yt=re.current,sn=Yt.selectionStart,Cn=Yt.selectionEnd,un=Yt.scrollTop;re.current.setSelectionRange(sn,Cn),re.current.scrollTop=un}}catch(zn){}},ce=ve.useState(F),Ie=(0,p.Z)(ce,2),Me=Ie[0],Ee=Ie[1],Je=ve.useState(),U=(0,p.Z)(Je,2),rt=U[0],He=U[1],ct=function(){Ee(b)};(0,k.Z)(function(){ne&&ct()},[ze,he,Le,ne]),(0,k.Z)(function(){if(Me===b)Ee(I);else if(Me===I){var Xt=S(re.current,!1,he,Le);Ee(F),He(Xt)}else Ye()},[Me]);var vt=ve.useRef(),rn=function(){Xe.Z.cancel(vt.current)},Zt=function(Yt){Me===F&&(Re==null||Re(Yt),ue&&(rn(),vt.current=(0,Xe.Z)(function(){ct()})))};ve.useEffect(function(){return rn},[]);var Ft=ne?rt:null,Pt=(0,J.Z)((0,J.Z)({},bt),Ft);return(Me===b||Me===I)&&(Pt.overflowY="hidden",Pt.overflowX="hidden"),ve.createElement(Oe.Z,{onResize:Zt,disabled:!(ue||Re)},ve.createElement("textarea",(0,E.Z)({},Ot,{ref:re,style:Pt,className:te()(q,fe,(0,C.Z)({},"".concat(q,"-disabled"),Dt)),disabled:Dt,value:we,onChange:V})))}),be=R,We=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ae(le,H){return(0,T.Z)(le||"").slice(0,H).join("")}function me(le,H,G,q){var ee=G;return le?ee=Ae(G,q):(0,T.Z)(H||"").length<G.length&&(0,T.Z)(G||"").length>q&&(ee=H),ee}var ut=ve.forwardRef(function(le,H){var G,q=le.defaultValue,ee=le.value,Ve=le.onFocus,ze=le.onBlur,ue=le.onChange,Re=le.allowClear,fe=le.maxLength,bt=le.onCompositionStart,Dt=le.onCompositionEnd,St=le.suffix,et=le.prefixCls,Ot=et===void 0?"rc-textarea":et,at=le.classes,A=le.showCount,we=le.className,oe=le.style,V=le.disabled,re=le.hidden,de=le.classNames,Se=le.styles,he=le.onResize,Le=(0,P.Z)(le,We),ne=(0,N.Z)(q,{value:ee,defaultValue:q}),Ye=(0,p.Z)(ne,2),ce=Ye[0],Ie=Ye[1],Me=(0,ve.useRef)(null),Ee=ve.useState(!1),Je=(0,p.Z)(Ee,2),U=Je[0],rt=Je[1],He=ve.useState(!1),ct=(0,p.Z)(He,2),vt=ct[0],rn=ct[1],Zt=ve.useRef(),Ft=ve.useRef(0),Pt=ve.useState(null),Xt=(0,p.Z)(Pt,2),Yt=Xt[0],sn=Xt[1],Cn=function(){var Qe;(Qe=Me.current)===null||Qe===void 0||Qe.textArea.focus()};(0,ve.useImperativeHandle)(H,function(){return{resizableTextArea:Me.current,focus:Cn,blur:function(){var Qe;(Qe=Me.current)===null||Qe===void 0||Qe.textArea.blur()}}}),(0,ve.useEffect)(function(){rt(function(on){return!V&&on})},[V]);var un=Number(fe)>0,zn=function(Qe){rn(!0),Zt.current=ce,Ft.current=Qe.currentTarget.selectionStart,bt==null||bt(Qe)},Wn=function(Qe){rn(!1);var Mt=Qe.currentTarget.value;if(un){var g,D=Ft.current>=fe+1||Ft.current===((g=Zt.current)===null||g===void 0?void 0:g.length);Mt=me(D,Zt.current,Mt,fe)}Mt!==ce&&(Ie(Mt),(0,Ce.rJ)(Qe.currentTarget,Qe,ue,Mt)),Dt==null||Dt(Qe)},pn=function(Qe){var Mt=Qe.target.value;if(!vt&&un){var g=Qe.target.selectionStart>=fe+1||Qe.target.selectionStart===Mt.length||!Qe.target.selectionStart;Mt=me(g,ce,Mt,fe)}Ie(Mt),(0,Ce.rJ)(Qe.currentTarget,Qe,ue,Mt)},Ln=function(Qe){var Mt=Le.onPressEnter,g=Le.onKeyDown;Qe.key==="Enter"&&Mt&&Mt(Qe),g==null||g(Qe)},wn=function(Qe){rt(!0),Ve==null||Ve(Qe)},In=function(Qe){rt(!1),ze==null||ze(Qe)},xn=function(Qe){var Mt;Ie(""),Cn(),(0,Ce.rJ)((Mt=Me.current)===null||Mt===void 0?void 0:Mt.textArea,Qe,ue)},dn=(0,Ce.D7)(ce);!vt&&un&&ee==null&&(dn=Ae(dn,fe));var Nn=St,Qt;if(A){var An=(0,T.Z)(dn).length;(0,j.Z)(A)==="object"?Qt=A.formatter({value:dn,count:An,maxLength:fe}):Qt="".concat(An).concat(un?" / ".concat(fe):""),Nn=ve.createElement(ve.Fragment,null,Nn,ve.createElement("span",{className:te()("".concat(Ot,"-data-count"),de==null?void 0:de.count),style:Se==null?void 0:Se.count},Qt))}var Hn=function(Qe){var Mt;he==null||he(Qe),(Mt=Me.current)!==null&&Mt!==void 0&&Mt.textArea.style.height&&sn(!0)},Sr=!Le.autoSize&&!A&&!Re,pr=ve.createElement(y.BaseInput,{value:dn,allowClear:Re,handleReset:xn,suffix:Nn,prefixCls:Ot,classes:{affixWrapper:te()(at==null?void 0:at.affixWrapper,(G={},(0,C.Z)(G,"".concat(Ot,"-show-count"),A),(0,C.Z)(G,"".concat(Ot,"-textarea-allow-clear"),Re),G))},disabled:V,focused:U,className:we,style:(0,J.Z)((0,J.Z)({},oe),Yt&&!Sr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Qt=="string"?Qt:void 0}},hidden:re,inputElement:ve.createElement(be,(0,E.Z)({},Le,{onKeyDown:Ln,onChange:pn,onFocus:wn,onBlur:In,onCompositionStart:zn,onCompositionEnd:Wn,className:de==null?void 0:de.textarea,style:(0,J.Z)((0,J.Z)({},Se==null?void 0:Se.textarea),{},{resize:oe==null?void 0:oe.resize}),disabled:V,prefixCls:Ot,onResize:Hn,ref:Me}))});return pr}),ke=ut,Ge=ke},65283:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return at}});var E=f(71409),J=f(28788),C=f(89490),j=f(87075),p=f(11036),P=f(39224),T=f(92310),ye=f.n(T),te=f(29301),y=f(70425),Ce=f(34280),N=f(59301),ve=f(4676),Oe=N.forwardRef(function(A,we){var oe=A.height,V=A.offsetY,re=A.offsetX,de=A.children,Se=A.prefixCls,he=A.onInnerResize,Le=A.innerProps,ne=A.rtl,Ye=A.extra,ce={},Ie={display:"flex",flexDirection:"column"};return V!==void 0&&(ce={height:oe,position:"relative",overflow:"hidden"},Ie=(0,C.Z)((0,C.Z)({},Ie),{},(0,j.Z)((0,j.Z)((0,j.Z)((0,j.Z)((0,j.Z)({transform:"translateY(".concat(V,"px)")},ne?"marginRight":"marginLeft",-re),"position","absolute"),"left",0),"right",0),"top",0))),N.createElement("div",{style:ce},N.createElement(te.Z,{onResize:function(Ee){var Je=Ee.offsetHeight;Je&&he&&he()}},N.createElement("div",(0,E.Z)({style:Ie,className:ye()((0,j.Z)({},"".concat(Se,"-holder-inner"),Se)),ref:we},Le),de,Ye)))});Oe.displayName="Filler";var k=Oe;function Xe(A){var we=A.children,oe=A.setRef,V=N.useCallback(function(re){oe(re)},[]);return N.cloneElement(we,{ref:V})}function nt(A,we,oe,V,re,de,Se,he){var Le=he.getKey;return A.slice(we,oe+1).map(function(ne,Ye){var ce=we+Ye,Ie=Se(ne,ce,{style:{width:V},offsetX:re}),Me=Le(ne);return N.createElement(Xe,{key:Me,setRef:function(Je){return de(ne,Je)}},Ie)})}function Ze(A,we,oe,V){var re=oe-A,de=we-oe,Se=Math.min(re,de)*2;if(V<=Se){var he=Math.floor(V/2);return V%2?oe+he+1:oe-he}return re>de?oe-(V-de):oe+(V-re)}function tt(A,we,oe){var V=A.length,re=we.length,de,Se;if(V===0&&re===0)return null;V<re?(de=A,Se=we):(de=we,Se=A);var he={__EMPTY_ITEM__:!0};function Le(Ee){return Ee!==void 0?oe(Ee):he}for(var ne=null,Ye=Math.abs(V-re)!==1,ce=0;ce<Se.length;ce+=1){var Ie=Le(de[ce]),Me=Le(Se[ce]);if(Ie!==Me){ne=ce,Ye=Ye||Ie!==Le(Se[ce+1]);break}}return ne===null?null:{index:ne,multiple:Ye}}function _(A,we,oe){var V=N.useState(A),re=(0,p.Z)(V,2),de=re[0],Se=re[1],he=N.useState(null),Le=(0,p.Z)(he,2),ne=Le[0],Ye=Le[1];return N.useEffect(function(){var ce=tt(de||[],A||[],we);(ce==null?void 0:ce.index)!==void 0&&(oe==null||oe(ce.index),Ye(A[ce.index])),Se(A)},[A]),[ne]}var Z=f(16089),S=(typeof navigator=="undefined"?"undefined":(0,J.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),c=S,b=function(A,we,oe,V){var re=(0,N.useRef)(!1),de=(0,N.useRef)(null);function Se(){clearTimeout(de.current),re.current=!0,de.current=setTimeout(function(){re.current=!1},50)}var he=(0,N.useRef)({top:A,bottom:we,left:oe,right:V});return he.current.top=A,he.current.bottom=we,he.current.left=oe,he.current.right=V,function(Le,ne){var Ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ce=Le?ne<0&&he.current.left||ne>0&&he.current.right:ne<0&&he.current.top||ne>0&&he.current.bottom;return Ye&&ce?(clearTimeout(de.current),re.current=!1):(!ce||re.current)&&Se(),!re.current&&ce}};function I(A,we,oe,V,re,de,Se){var he=(0,N.useRef)(0),Le=(0,N.useRef)(null),ne=(0,N.useRef)(null),Ye=(0,N.useRef)(!1),ce=b(we,oe,V,re);function Ie(He,ct){if(Z.Z.cancel(Le.current),!ce(!1,ct)){var vt=He;if(!vt._virtualHandled)vt._virtualHandled=!0;else return;he.current+=ct,ne.current=ct,c||vt.preventDefault(),Le.current=(0,Z.Z)(function(){var rn=Ye.current?10:1;Se(he.current*rn,!1),he.current=0})}}function Me(He,ct){Se(ct,!0),c||He.preventDefault()}var Ee=(0,N.useRef)(null),Je=(0,N.useRef)(null);function U(He){if(A){Z.Z.cancel(Je.current),Je.current=(0,Z.Z)(function(){Ee.current=null},2);var ct=He.deltaX,vt=He.deltaY,rn=He.shiftKey,Zt=ct,Ft=vt;(Ee.current==="sx"||!Ee.current&&rn&&vt&&!ct)&&(Zt=vt,Ft=0,Ee.current="sx");var Pt=Math.abs(Zt),Xt=Math.abs(Ft);Ee.current===null&&(Ee.current=de&&Pt>Xt?"x":"y"),Ee.current==="y"?Ie(He,Ft):Me(He,Zt)}}function rt(He){A&&(Ye.current=He.detail===ne.current)}return[U,rt]}function F(A,we,oe,V){var re=N.useMemo(function(){return[new Map,[]]},[A,oe.id,V]),de=(0,p.Z)(re,2),Se=de[0],he=de[1],Le=function(Ye){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ye,Ie=Se.get(Ye),Me=Se.get(ce);if(Ie===void 0||Me===void 0)for(var Ee=A.length,Je=he.length;Je<Ee;Je+=1){var U,rt=A[Je],He=we(rt);Se.set(He,Je);var ct=(U=oe.get(He))!==null&&U!==void 0?U:V;if(he[Je]=(he[Je-1]||0)+ct,He===Ye&&(Ie=Je),He===ce&&(Me=Je),Ie!==void 0&&Me!==void 0)break}return{top:he[Ie-1]||0,bottom:he[Me]}};return Le}var R=f(16552),be=f(19210),We=function(){function A(){(0,R.Z)(this,A),(0,j.Z)(this,"maps",void 0),(0,j.Z)(this,"id",0),(0,j.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,be.Z)(A,[{key:"set",value:function(oe,V){this.diffRecords.set(oe,this.maps[oe]),this.maps[oe]=V,this.id+=1}},{key:"get",value:function(oe){return this.maps[oe]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),A}(),Ae=We;function me(A){var we=parseFloat(A);return isNaN(we)?0:we}function ut(A,we,oe){var V=N.useState(0),re=(0,p.Z)(V,2),de=re[0],Se=re[1],he=(0,N.useRef)(new Map),Le=(0,N.useRef)(new Ae),ne=(0,N.useRef)(0);function Ye(){ne.current+=1}function ce(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ye();var Ee=function(){var rt=!1;he.current.forEach(function(He,ct){if(He&&He.offsetParent){var vt=He.offsetHeight,rn=getComputedStyle(He),Zt=rn.marginTop,Ft=rn.marginBottom,Pt=me(Zt),Xt=me(Ft),Yt=vt+Pt+Xt;Le.current.get(ct)!==Yt&&(Le.current.set(ct,Yt),rt=!0)}}),rt&&Se(function(He){return He+1})};if(Me)Ee();else{ne.current+=1;var Je=ne.current;Promise.resolve().then(function(){Je===ne.current&&Ee()})}}function Ie(Me,Ee){var Je=A(Me),U=he.current.get(Je);Ee?(he.current.set(Je,Ee),ce()):he.current.delete(Je),!U!=!Ee&&(Ee?we==null||we(Me):oe==null||oe(Me))}return(0,N.useEffect)(function(){return Ye},[]),[Ie,ce,Le.current,de]}var ke=14/15;function Ge(A,we,oe){var V=(0,N.useRef)(!1),re=(0,N.useRef)(0),de=(0,N.useRef)(0),Se=(0,N.useRef)(null),he=(0,N.useRef)(null),Le,ne=function(Me){if(V.current){var Ee=Math.ceil(Me.touches[0].pageX),Je=Math.ceil(Me.touches[0].pageY),U=re.current-Ee,rt=de.current-Je,He=Math.abs(U)>Math.abs(rt);He?re.current=Ee:de.current=Je;var ct=oe(He,He?U:rt,!1,Me);ct&&Me.preventDefault(),clearInterval(he.current),ct&&(he.current=setInterval(function(){He?U*=ke:rt*=ke;var vt=Math.floor(He?U:rt);(!oe(He,vt,!0)||Math.abs(vt)<=.1)&&clearInterval(he.current)},16))}},Ye=function(){V.current=!1,Le()},ce=function(Me){Le(),Me.touches.length===1&&!V.current&&(V.current=!0,re.current=Math.ceil(Me.touches[0].pageX),de.current=Math.ceil(Me.touches[0].pageY),Se.current=Me.target,Se.current.addEventListener("touchmove",ne,{passive:!1}),Se.current.addEventListener("touchend",Ye,{passive:!0}))};Le=function(){Se.current&&(Se.current.removeEventListener("touchmove",ne),Se.current.removeEventListener("touchend",Ye))},(0,Ce.Z)(function(){return A&&we.current.addEventListener("touchstart",ce,{passive:!0}),function(){var Ie;(Ie=we.current)===null||Ie===void 0||Ie.removeEventListener("touchstart",ce),Le(),clearInterval(he.current)}},[A])}function le(A){return Math.floor(Math.pow(A,.5))}function H(A,we){var oe="touches"in A?A.touches[0]:A;return oe[we?"pageX":"pageY"]-window[we?"scrollX":"scrollY"]}function G(A,we,oe){N.useEffect(function(){var V=we.current;if(A&&V){var re=!1,de,Se,he=function(){Z.Z.cancel(de)},Le=function Ie(){he(),de=(0,Z.Z)(function(){oe(Se),Ie()})},ne=function(Me){if(!(Me.target.draggable||Me.button!==0)){var Ee=Me;Ee._virtualHandled||(Ee._virtualHandled=!0,re=!0)}},Ye=function(){re=!1,he()},ce=function(Me){if(re){var Ee=H(Me,!1),Je=V.getBoundingClientRect(),U=Je.top,rt=Je.bottom;if(Ee<=U){var He=U-Ee;Se=-le(He),Le()}else if(Ee>=rt){var ct=Ee-rt;Se=le(ct),Le()}else he()}};return V.addEventListener("mousedown",ne),V.ownerDocument.addEventListener("mouseup",Ye),V.ownerDocument.addEventListener("mousemove",ce),function(){V.removeEventListener("mousedown",ne),V.ownerDocument.removeEventListener("mouseup",Ye),V.ownerDocument.removeEventListener("mousemove",ce),he()}}},[A])}var q=10;function ee(A,we,oe,V,re,de,Se,he){var Le=N.useRef(),ne=N.useState(null),Ye=(0,p.Z)(ne,2),ce=Ye[0],Ie=Ye[1];return(0,Ce.Z)(function(){if(ce&&ce.times<q){if(!A.current){Ie(function(In){return(0,C.Z)({},In)});return}de();var Me=ce.targetAlign,Ee=ce.originAlign,Je=ce.index,U=ce.offset,rt=A.current.clientHeight,He=!1,ct=Me,vt=null;if(rt){for(var rn=Me||Ee,Zt=0,Ft=0,Pt=0,Xt=Math.min(we.length-1,Je),Yt=0;Yt<=Xt;Yt+=1){var sn=re(we[Yt]);Ft=Zt;var Cn=oe.get(sn);Pt=Ft+(Cn===void 0?V:Cn),Zt=Pt}for(var un=rn==="top"?U:rt-U,zn=Xt;zn>=0;zn-=1){var Wn=re(we[zn]),pn=oe.get(Wn);if(pn===void 0){He=!0;break}if(un-=pn,un<=0)break}switch(rn){case"top":vt=Ft-U;break;case"bottom":vt=Pt-rt+U;break;default:{var Ln=A.current.scrollTop,wn=Ln+rt;Ft<Ln?ct="top":Pt>wn&&(ct="bottom")}}vt!==null&&Se(vt),vt!==ce.lastTop&&(He=!0)}He&&Ie((0,C.Z)((0,C.Z)({},ce),{},{times:ce.times+1,targetAlign:ct,lastTop:vt}))}},[ce,A.current]),function(Me){if(Me==null){he();return}if(Z.Z.cancel(Le.current),typeof Me=="number")Se(Me);else if(Me&&(0,J.Z)(Me)==="object"){var Ee,Je=Me.align;"index"in Me?Ee=Me.index:Ee=we.findIndex(function(He){return re(He)===Me.key});var U=Me.offset,rt=U===void 0?0:U;Ie({times:0,index:Ee,offset:rt,originAlign:Je})}}}var Ve=N.forwardRef(function(A,we){var oe=A.prefixCls,V=A.rtl,re=A.scrollOffset,de=A.scrollRange,Se=A.onStartMove,he=A.onStopMove,Le=A.onScroll,ne=A.horizontal,Ye=A.spinSize,ce=A.containerSize,Ie=A.style,Me=A.thumbStyle,Ee=A.showScrollBar,Je=N.useState(!1),U=(0,p.Z)(Je,2),rt=U[0],He=U[1],ct=N.useState(null),vt=(0,p.Z)(ct,2),rn=vt[0],Zt=vt[1],Ft=N.useState(null),Pt=(0,p.Z)(Ft,2),Xt=Pt[0],Yt=Pt[1],sn=!V,Cn=N.useRef(),un=N.useRef(),zn=N.useState(Ee),Wn=(0,p.Z)(zn,2),pn=Wn[0],Ln=Wn[1],wn=N.useRef(),In=function(){Ee===!0||Ee===!1||(clearTimeout(wn.current),Ln(!0),wn.current=setTimeout(function(){Ln(!1)},3e3))},xn=de-ce||0,dn=ce-Ye||0,Nn=N.useMemo(function(){if(re===0||xn===0)return 0;var g=re/xn;return g*dn},[re,xn,dn]),Qt=function(D){D.stopPropagation(),D.preventDefault()},An=N.useRef({top:Nn,dragging:rt,pageY:rn,startTop:Xt});An.current={top:Nn,dragging:rt,pageY:rn,startTop:Xt};var Hn=function(D){He(!0),Zt(H(D,ne)),Yt(An.current.top),Se(),D.stopPropagation(),D.preventDefault()};N.useEffect(function(){var g=function(h){h.preventDefault()},D=Cn.current,W=un.current;return D.addEventListener("touchstart",g,{passive:!1}),W.addEventListener("touchstart",Hn,{passive:!1}),function(){D.removeEventListener("touchstart",g),W.removeEventListener("touchstart",Hn)}},[]);var Sr=N.useRef();Sr.current=xn;var pr=N.useRef();pr.current=dn,N.useEffect(function(){if(rt){var g,D=function(h){var x=An.current,L=x.dragging,Q=x.pageY,B=x.startTop;Z.Z.cancel(g);var $=Cn.current.getBoundingClientRect(),se=ce/(ne?$.width:$.height);if(L){var ie=(H(h,ne)-Q)*se,Fe=B;!sn&&ne?Fe-=ie:Fe+=ie;var M=Sr.current,K=pr.current,Ke=K?Fe/K:0,pe=Math.ceil(Ke*M);pe=Math.max(pe,0),pe=Math.min(pe,M),g=(0,Z.Z)(function(){Le(pe,ne)})}},W=function(){He(!1),he()};return window.addEventListener("mousemove",D,{passive:!0}),window.addEventListener("touchmove",D,{passive:!0}),window.addEventListener("mouseup",W,{passive:!0}),window.addEventListener("touchend",W,{passive:!0}),function(){window.removeEventListener("mousemove",D),window.removeEventListener("touchmove",D),window.removeEventListener("mouseup",W),window.removeEventListener("touchend",W),Z.Z.cancel(g)}}},[rt]),N.useEffect(function(){return In(),function(){clearTimeout(wn.current)}},[re]),N.useImperativeHandle(we,function(){return{delayHidden:In}});var on="".concat(oe,"-scrollbar"),Qe={position:"absolute",visibility:pn?null:"hidden"},Mt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ne?(Qe.height=8,Qe.left=0,Qe.right=0,Qe.bottom=0,Mt.height="100%",Mt.width=Ye,sn?Mt.left=Nn:Mt.right=Nn):(Qe.width=8,Qe.top=0,Qe.bottom=0,sn?Qe.right=0:Qe.left=0,Mt.width="100%",Mt.height=Ye,Mt.top=Nn),N.createElement("div",{ref:Cn,className:ye()(on,(0,j.Z)((0,j.Z)((0,j.Z)({},"".concat(on,"-horizontal"),ne),"".concat(on,"-vertical"),!ne),"".concat(on,"-visible"),pn)),style:(0,C.Z)((0,C.Z)({},Qe),Ie),onMouseDown:Qt,onMouseMove:In},N.createElement("div",{ref:un,className:ye()("".concat(on,"-thumb"),(0,j.Z)({},"".concat(on,"-thumb-moving"),rt)),style:(0,C.Z)((0,C.Z)({},Mt),Me),onMouseDown:Hn}))}),ze=Ve,ue=20;function Re(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,oe=A/we*A;return isNaN(oe)&&(oe=0),oe=Math.max(oe,ue),Math.floor(oe)}var fe=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],bt=[],Dt={overflowY:"auto",overflowAnchor:"none"};function St(A,we){var oe=A.prefixCls,V=oe===void 0?"rc-virtual-list":oe,re=A.className,de=A.height,Se=A.itemHeight,he=A.fullHeight,Le=he===void 0?!0:he,ne=A.style,Ye=A.data,ce=A.children,Ie=A.itemKey,Me=A.virtual,Ee=A.direction,Je=A.scrollWidth,U=A.component,rt=U===void 0?"div":U,He=A.onScroll,ct=A.onVirtualScroll,vt=A.onVisibleChange,rn=A.innerProps,Zt=A.extraRender,Ft=A.styles,Pt=A.showScrollBar,Xt=Pt===void 0?"optional":Pt,Yt=(0,P.Z)(A,fe),sn=N.useCallback(function(Ue){return typeof Ie=="function"?Ie(Ue):Ue==null?void 0:Ue[Ie]},[Ie]),Cn=ut(sn,null,null),un=(0,p.Z)(Cn,4),zn=un[0],Wn=un[1],pn=un[2],Ln=un[3],wn=!!(Me!==!1&&de&&Se),In=N.useMemo(function(){return Object.values(pn.maps).reduce(function(Ue,$e){return Ue+$e},0)},[pn.id,pn.maps]),xn=wn&&Ye&&(Math.max(Se*Ye.length,In)>de||!!Je),dn=Ee==="rtl",Nn=ye()(V,(0,j.Z)({},"".concat(V,"-rtl"),dn),re),Qt=Ye||bt,An=(0,N.useRef)(),Hn=(0,N.useRef)(),Sr=(0,N.useRef)(),pr=(0,N.useState)(0),on=(0,p.Z)(pr,2),Qe=on[0],Mt=on[1],g=(0,N.useState)(0),D=(0,p.Z)(g,2),W=D[0],d=D[1],h=(0,N.useState)(!1),x=(0,p.Z)(h,2),L=x[0],Q=x[1],B=function(){Q(!0)},$=function(){Q(!1)},se={getKey:sn};function ie(Ue){Mt(function($e){var gt;typeof Ue=="function"?gt=Ue($e):gt=Ue;var mt=jt(gt);return An.current.scrollTop=mt,mt})}var Fe=(0,N.useRef)({start:0,end:Qt.length}),M=(0,N.useRef)(),K=_(Qt,sn),Ke=(0,p.Z)(K,1),pe=Ke[0];M.current=pe;var Be=N.useMemo(function(){if(!wn)return{scrollHeight:void 0,start:0,end:Qt.length-1,offset:void 0};if(!xn){var Ue;return{scrollHeight:((Ue=Hn.current)===null||Ue===void 0?void 0:Ue.offsetHeight)||0,start:0,end:Qt.length-1,offset:void 0}}for(var $e=0,gt,mt,vn,Cr=Qt.length,Kn=0;Kn<Cr;Kn+=1){var _n=Qt[Kn],Fn=sn(_n),kn=pn.get(Fn),Mn=$e+(kn===void 0?Se:kn);Mn>=Qe&&gt===void 0&&(gt=Kn,mt=$e),Mn>Qe+de&&vn===void 0&&(vn=Kn),$e=Mn}return gt===void 0&&(gt=0,mt=0,vn=Math.ceil(de/Se)),vn===void 0&&(vn=Qt.length-1),vn=Math.min(vn+1,Qt.length-1),{scrollHeight:$e,start:gt,end:vn,offset:mt}},[xn,wn,Qe,Qt,Ln,de]),Te=Be.scrollHeight,ft=Be.start,Y=Be.end,ae=Be.offset;Fe.current.start=ft,Fe.current.end=Y,N.useLayoutEffect(function(){var Ue=pn.getRecord();if(Ue.size===1){var $e=Array.from(Ue.keys())[0],gt=Ue.get($e),mt=Qt[ft];if(mt&&gt===void 0){var vn=sn(mt);if(vn===$e){var Cr=pn.get($e),Kn=Cr-Se;ie(function(_n){return _n+Kn})}}}pn.resetRecord()},[Te]);var De=N.useState({width:0,height:de}),it=(0,p.Z)(De,2),_e=it[0],lt=it[1],_t=function($e){lt({width:$e.offsetWidth,height:$e.offsetHeight})},Rt=(0,N.useRef)(),$t=(0,N.useRef)(),zt=N.useMemo(function(){return Re(_e.width,Je)},[_e.width,Je]),wt=N.useMemo(function(){return Re(_e.height,Te)},[_e.height,Te]),qt=Te-de,Ut=(0,N.useRef)(qt);Ut.current=qt;function jt(Ue){var $e=Ue;return Number.isNaN(Ut.current)||($e=Math.min($e,Ut.current)),$e=Math.max($e,0),$e}var kt=Qe<=0,Lt=Qe>=qt,xt=W<=0,Wt=W>=Je,Et=b(kt,Lt,xt,Wt),fn=function(){return{x:dn?-W:W,y:Qe}},Nt=(0,N.useRef)(fn()),Ht=(0,y.useEvent)(function(Ue){if(ct){var $e=(0,C.Z)((0,C.Z)({},fn()),Ue);(Nt.current.x!==$e.x||Nt.current.y!==$e.y)&&(ct($e),Nt.current=$e)}});function an(Ue,$e){var gt=Ue;$e?((0,ve.flushSync)(function(){d(gt)}),Ht()):ie(gt)}function Gt(Ue){var $e=Ue.currentTarget.scrollTop;$e!==Qe&&ie($e),He==null||He(Ue),Ht()}var En=function($e){var gt=$e,mt=Je?Je-_e.width:0;return gt=Math.max(gt,0),gt=Math.min(gt,mt),gt},jn=(0,y.useEvent)(function(Ue,$e){$e?((0,ve.flushSync)(function(){d(function(gt){var mt=gt+(dn?-Ue:Ue);return En(mt)})}),Ht()):ie(function(gt){var mt=gt+Ue;return mt})}),It=I(wn,kt,Lt,xt,Wt,!!Je,jn),st=(0,p.Z)(It,2),dt=st[0],en=st[1];Ge(wn,An,function(Ue,$e,gt,mt){var vn=mt;return Et(Ue,$e,gt)?!1:!vn||!vn._virtualHandled?(vn&&(vn._virtualHandled=!0),dt({preventDefault:function(){},deltaX:Ue?$e:0,deltaY:Ue?0:$e}),!0):!1}),G(xn,An,function(Ue){ie(function($e){return $e+Ue})}),(0,Ce.Z)(function(){function Ue(gt){var mt=kt&&gt.detail<0,vn=Lt&&gt.detail>0;wn&&!mt&&!vn&&gt.preventDefault()}var $e=An.current;return $e.addEventListener("wheel",dt,{passive:!1}),$e.addEventListener("DOMMouseScroll",en,{passive:!0}),$e.addEventListener("MozMousePixelScroll",Ue,{passive:!1}),function(){$e.removeEventListener("wheel",dt),$e.removeEventListener("DOMMouseScroll",en),$e.removeEventListener("MozMousePixelScroll",Ue)}},[wn,kt,Lt]),(0,Ce.Z)(function(){if(Je){var Ue=En(W);d(Ue),Ht({x:Ue})}},[_e.width,Je]);var tn=function(){var $e,gt;($e=Rt.current)===null||$e===void 0||$e.delayHidden(),(gt=$t.current)===null||gt===void 0||gt.delayHidden()},Vt=ee(An,Qt,pn,Se,sn,function(){return Wn(!0)},ie,tn);N.useImperativeHandle(we,function(){return{nativeElement:Sr.current,getScrollInfo:fn,scrollTo:function($e){function gt(mt){return mt&&(0,J.Z)(mt)==="object"&&("left"in mt||"top"in mt)}gt($e)?($e.left!==void 0&&d(En($e.left)),Vt($e.top)):Vt($e)}}}),(0,Ce.Z)(function(){if(vt){var Ue=Qt.slice(ft,Y+1);vt(Ue,Qt)}},[ft,Y,Qt]);var At=F(Qt,sn,pn,Se),ln=Zt==null?void 0:Zt({start:ft,end:Y,virtual:xn,offsetX:W,offsetY:ae,rtl:dn,getSize:At}),gn=nt(Qt,ft,Y,Je,W,zn,ce,se),mn=null;de&&(mn=(0,C.Z)((0,j.Z)({},Le?"height":"maxHeight",de),Dt),wn&&(mn.overflowY="hidden",Je&&(mn.overflowX="hidden"),L&&(mn.pointerEvents="none")));var Tn={};return dn&&(Tn.dir="rtl"),N.createElement("div",(0,E.Z)({ref:Sr,style:(0,C.Z)((0,C.Z)({},ne),{},{position:"relative"}),className:Nn},Tn,Yt),N.createElement(te.Z,{onResize:_t},N.createElement(rt,{className:"".concat(V,"-holder"),style:mn,ref:An,onScroll:Gt,onMouseEnter:tn},N.createElement(k,{prefixCls:V,height:Te,offsetX:W,offsetY:ae,scrollWidth:Je,onInnerResize:Wn,ref:Hn,innerProps:rn,rtl:dn,extra:ln},gn))),xn&&Te>de&&N.createElement(ze,{ref:Rt,prefixCls:V,scrollOffset:Qe,scrollRange:Te,rtl:dn,onScroll:an,onStartMove:B,onStopMove:$,spinSize:wt,containerSize:_e.height,style:Ft==null?void 0:Ft.verticalScrollBar,thumbStyle:Ft==null?void 0:Ft.verticalScrollBarThumb,showScrollBar:Xt}),xn&&Je>_e.width&&N.createElement(ze,{ref:$t,prefixCls:V,scrollOffset:W,scrollRange:Je,rtl:dn,onScroll:an,onStartMove:B,onStopMove:$,spinSize:zt,containerSize:_e.width,horizontal:!0,style:Ft==null?void 0:Ft.horizontalScrollBar,thumbStyle:Ft==null?void 0:Ft.horizontalScrollBarThumb,showScrollBar:Xt}))}var et=N.forwardRef(St);et.displayName="List";var Ot=et,at=Ot},16722:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});const E=te=>typeof te=="object"&&te!=null&&te.nodeType===1,J=(te,y)=>(!y||te!=="hidden")&&te!=="visible"&&te!=="clip",C=(te,y)=>{if(te.clientHeight<te.scrollHeight||te.clientWidth<te.scrollWidth){const Ce=getComputedStyle(te,null);return J(Ce.overflowY,y)||J(Ce.overflowX,y)||(N=>{const ve=(Oe=>{if(!Oe.ownerDocument||!Oe.ownerDocument.defaultView)return null;try{return Oe.ownerDocument.defaultView.frameElement}catch(k){return null}})(N);return!!ve&&(ve.clientHeight<N.scrollHeight||ve.clientWidth<N.scrollWidth)})(te)}return!1},j=(te,y,Ce,N,ve,Oe,k,Xe)=>Oe<te&&k>y||Oe>te&&k<y?0:Oe<=te&&Xe<=Ce||k>=y&&Xe>=Ce?Oe-te-N:k>y&&Xe<Ce||Oe<te&&Xe>Ce?k-y+ve:0,p=te=>{const y=te.parentElement;return y==null?te.getRootNode().host||null:y},P=(te,y)=>{var Ce,N,ve,Oe;if(typeof document=="undefined")return[];const{scrollMode:k,block:Xe,inline:nt,boundary:Ze,skipOverflowHiddenElements:tt}=y,_=typeof Ze=="function"?Ze:ze=>ze!==Ze;if(!E(te))throw new TypeError("Invalid target");const Z=document.scrollingElement||document.documentElement,S=[];let c=te;for(;E(c)&&_(c);){if(c=p(c),c===Z){S.push(c);break}c!=null&&c===document.body&&C(c)&&!C(document.documentElement)||c!=null&&C(c,tt)&&S.push(c)}const b=(N=(Ce=window.visualViewport)==null?void 0:Ce.width)!=null?N:innerWidth,I=(Oe=(ve=window.visualViewport)==null?void 0:ve.height)!=null?Oe:innerHeight,{scrollX:F,scrollY:R}=window,{height:be,width:We,top:Ae,right:me,bottom:ut,left:ke}=te.getBoundingClientRect(),{top:Ge,right:le,bottom:H,left:G}=(ze=>{const ue=window.getComputedStyle(ze);return{top:parseFloat(ue.scrollMarginTop)||0,right:parseFloat(ue.scrollMarginRight)||0,bottom:parseFloat(ue.scrollMarginBottom)||0,left:parseFloat(ue.scrollMarginLeft)||0}})(te);let q=Xe==="start"||Xe==="nearest"?Ae-Ge:Xe==="end"?ut+H:Ae+be/2-Ge+H,ee=nt==="center"?ke+We/2-G+le:nt==="end"?me+le:ke-G;const Ve=[];for(let ze=0;ze<S.length;ze++){const ue=S[ze],{height:Re,width:fe,top:bt,right:Dt,bottom:St,left:et}=ue.getBoundingClientRect();if(k==="if-needed"&&Ae>=0&&ke>=0&&ut<=I&&me<=b&&(ue===Z&&!C(ue)||Ae>=bt&&ut<=St&&ke>=et&&me<=Dt))return Ve;const Ot=getComputedStyle(ue),at=parseInt(Ot.borderLeftWidth,10),A=parseInt(Ot.borderTopWidth,10),we=parseInt(Ot.borderRightWidth,10),oe=parseInt(Ot.borderBottomWidth,10);let V=0,re=0;const de="offsetWidth"in ue?ue.offsetWidth-ue.clientWidth-at-we:0,Se="offsetHeight"in ue?ue.offsetHeight-ue.clientHeight-A-oe:0,he="offsetWidth"in ue?ue.offsetWidth===0?0:fe/ue.offsetWidth:0,Le="offsetHeight"in ue?ue.offsetHeight===0?0:Re/ue.offsetHeight:0;if(Z===ue)V=Xe==="start"?q:Xe==="end"?q-I:Xe==="nearest"?j(R,R+I,I,A,oe,R+q,R+q+be,be):q-I/2,re=nt==="start"?ee:nt==="center"?ee-b/2:nt==="end"?ee-b:j(F,F+b,b,at,we,F+ee,F+ee+We,We),V=Math.max(0,V+R),re=Math.max(0,re+F);else{V=Xe==="start"?q-bt-A:Xe==="end"?q-St+oe+Se:Xe==="nearest"?j(bt,St,Re,A,oe+Se,q,q+be,be):q-(bt+Re/2)+Se/2,re=nt==="start"?ee-et-at:nt==="center"?ee-(et+fe/2)+de/2:nt==="end"?ee-Dt+we+de:j(et,Dt,fe,at,we+de,ee,ee+We,We);const{scrollLeft:ne,scrollTop:Ye}=ue;V=Le===0?0:Math.max(0,Math.min(Ye+V/Le,ue.scrollHeight-Re/Le+Se)),re=he===0?0:Math.max(0,Math.min(ne+re/he,ue.scrollWidth-fe/he+de)),q+=Ye-V,ee+=ne-re}Ve.push({el:ue,top:V,left:re})}return Ve},T=te=>te===!1?{block:"end",inline:"nearest"}:(y=>y===Object(y)&&Object.keys(y).length!==0)(te)?te:{block:"start",inline:"nearest"};function ye(te,y){if(!te.isConnected||!(ve=>{let Oe=ve;for(;Oe&&Oe.parentNode;){if(Oe.parentNode===document)return!0;Oe=Oe.parentNode instanceof ShadowRoot?Oe.parentNode.host:Oe.parentNode}return!1})(te))return;const Ce=(ve=>{const Oe=window.getComputedStyle(ve);return{top:parseFloat(Oe.scrollMarginTop)||0,right:parseFloat(Oe.scrollMarginRight)||0,bottom:parseFloat(Oe.scrollMarginBottom)||0,left:parseFloat(Oe.scrollMarginLeft)||0}})(te);if((ve=>typeof ve=="object"&&typeof ve.behavior=="function")(y))return y.behavior(P(te,y));const N=typeof y=="boolean"||y==null?void 0:y.behavior;for(const{el:ve,top:Oe,left:k}of P(te,T(y))){const Xe=Oe-Ce.top+Ce.bottom,nt=k-Ce.left+Ce.right;ve.scroll({top:Xe,left:nt,behavior:N})}}}}]);