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

107 lines
354 KiB

This file contains ambiguous Unicode characters!

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

(self.webpackChunk=self.webpackChunk||[]).push([[5230],{18299:function(_t,le,f){"use strict";f.d(le,{Z:function(){return m}});var w=f(87462),V=f(67294),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},_=x,b=f(74643),O=function(Z,v){return V.createElement(b.Z,(0,w.Z)({},Z,{ref:v,icon:_}))},m=V.forwardRef(O)},42922:function(_t,le,f){"use strict";f.d(le,{Z:function(){return m}});var w=f(87462),V=f(67294),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},_=x,b=f(74643),O=function(Z,v){return V.createElement(b.Z,(0,w.Z)({},Z,{ref:v,icon:_}))},m=V.forwardRef(O)},63237:function(_t,le,f){"use strict";f.d(le,{Z:function(){return m}});var w=f(87462),V=f(67294),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},_=x,b=f(74643),O=function(Z,v){return V.createElement(b.Z,(0,w.Z)({},Z,{ref:v,icon:_}))},m=V.forwardRef(O)},99569:function(_t,le,f){"use strict";f.d(le,{Z:function(){return m}});var w=f(87462),V=f(67294),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},_=x,b=f(74643),O=function(Z,v){return V.createElement(b.Z,(0,w.Z)({},Z,{ref:v,icon:_}))},m=V.forwardRef(O)},17663:function(_t,le,f){"use strict";f.d(le,{Z:function(){return m}});var w=f(87462),V=f(67294),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},_=x,b=f(74643),O=function(Z,v){return V.createElement(b.Z,(0,w.Z)({},Z,{ref:v,icon:_}))},m=V.forwardRef(O)},72395:function(_t,le,f){"use strict";f.d(le,{Z:function(){return m}});var w=f(87462),V=f(67294),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},_=x,b=f(74643),O=function(Z,v){return V.createElement(b.Z,(0,w.Z)({},Z,{ref:v,icon:_}))},m=V.forwardRef(O)},71749:function(){"use strict"},30483:function(){"use strict"},96670:function(_t,le,f){"use strict";f.d(le,{t:function(){return ie}});var w=f(67294),V=f(71577),x={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},_=f(94184),b=f.n(_),O=Object.defineProperty,m=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,v=(Re,ve,be)=>ve in Re?O(Re,ve,{enumerable:!0,configurable:!0,writable:!0,value:be}):Re[ve]=be,me=(Re,ve)=>{for(var be in ve||(ve={}))ae.call(ve,be)&&v(Re,be,ve[be]);if(m)for(var be of m(ve))Z.call(ve,be)&&v(Re,be,ve[be]);return Re};const ie=({cancelText:Re="\u53D6\u6D88",okText:ve="\u786E\u5B9A",loading:be=!1,hasOkBtn:pe=!0,hasCancelBtn:K=!0,okButtonProps:je={},onCancel:Ct=()=>{},onOk:W=()=>{},className:j=""})=>w.createElement("div",{className:b()(x.buttonFixed,j)},w.createElement("div",{className:x.buttonWrap},K&&w.createElement(V.ZP,{size:"middle",className:`${x.button} mr20`,onClick:Ct},Re),pe&&w.createElement(V.ZP,me({size:"middle",type:"primary",className:`${x.button} mr20`,loading:be,onClick:W},je),ve)))},57444:function(_t,le,f){"use strict";f.d(le,{h:function(){return j}});var w=f(67294),V=f(11713),x=f(22150),_=f(71577),b=f(4631),O=f.n(b),m=f(71749),ae=f(30483),Z=Object.defineProperty,v=Object.defineProperties,me=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,be=(d,c,C)=>c in d?Z(d,c,{enumerable:!0,configurable:!0,writable:!0,value:C}):d[c]=C,pe=(d,c)=>{for(var C in c||(c={}))Re.call(c,C)&&be(d,C,c[C]);if(ie)for(var C of ie(c))ve.call(c,C)&&be(d,C,c[C]);return d},K=(d,c)=>v(d,me(c));const je=V.default.Option,Ct={labelCol:{span:4},wrapperCol:{span:20}},W={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"]};le.Z=({callback:d,onCancel:c})=>{const[C,T]=(0,w.useState)("python");function G(H){T(W[H][1])}function D(H){d(H)}return w.createElement(x.default,K(pe({},Ct),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:D,style:{width:500}}),w.createElement(x.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},w.createElement(V.default,{getPopupContainer:H=>H.parentNode,onChange:G},Object.keys(W).map(H=>w.createElement(je,{key:H,value:H},W[H][0])))),w.createElement(x.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},w.createElement(j,{mode:C})),w.createElement("div",{className:"flex-container flex-end"},w.createElement(_.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.createElement(_.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function j({value:d,onChange:c,mode:C,options:T={}}){const G=(0,w.useRef)(),[D,H]=(0,w.useState)();return(0,w.useEffect)(()=>{if(D){let q=function(We){const se=We.getValue();c&&c(se)};return D.on("change",q),()=>{D.off("change",q)}}},[D,c]),(0,w.useEffect)(()=>{D&&D.setOption("mode",C)},[D,C]),(0,w.useEffect)(()=>{D&&(d!==D.getValue()||d==="")&&setTimeout(()=>{D.setValue(d||"")},300)},[D,d]),(0,w.useEffect)(()=>{if(G.current&&!D){const q=O().fromTextArea(G.current,pe({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},T));H(q)}},[G.current,D]),w.createElement("div",{className:"my-codemirror-container"},w.createElement("textarea",{ref:G}))}},10234:function(_t,le,f){"use strict";f.r(le),f.d(le,{default:function(){return Ct}});var w=f(67294),V=f(35973),x=f(22150),_=f(69677),b=f(57444),O=f(96670),m={bg:"bg___hW0a5",wrap:"wrap___qsjmY",title:"title___TYQ3w",path:"path___J3ICf",colorBlue:"colorBlue___r1F5X",width240:"width240___Vbbdg"},ae=Object.defineProperty,Z=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,ie=(W,j,d)=>j in W?ae(W,j,{enumerable:!0,configurable:!0,writable:!0,value:d}):W[j]=d,Re=(W,j)=>{for(var d in j||(j={}))v.call(j,d)&&ie(W,d,j[d]);if(Z)for(var d of Z(j))me.call(j,d)&&ie(W,d,j[d]);return W},ve=(W,j)=>{var d={};for(var c in W)v.call(W,c)&&j.indexOf(c)<0&&(d[c]=W[c]);if(W!=null&&Z)for(var c of Z(W))j.indexOf(c)<0&&me.call(W,c)&&(d[c]=W[c]);return d},be=(W,j,d)=>new Promise((c,C)=>{var T=H=>{try{D(d.next(H))}catch(q){C(q)}},G=H=>{try{D(d.throw(H))}catch(q){C(q)}},D=H=>H.done?c(H.value):Promise.resolve(H.value).then(T,G);D((d=d.apply(W,j)).next())});const pe=W=>{var j=W,{shixunsDetail:d,globalSetting:c,loading:C,user:T,dispatch:G}=j,D=ve(j,["shixunsDetail","globalSetting","loading","user","dispatch"]);const H=(0,V.useLocation)(),[q,We]=(0,w.useState)({}),se=(0,w.useRef)(),ke=(0,w.useRef)(),[Ve]=x.default.useForm(),[Ae,lt]=(0,w.useState)("");(0,w.useEffect)(()=>(G({type:"globalSetting/footerToggle",payload:!1}),()=>{G({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,w.useEffect)(()=>{const Oe=sessionStorage.getItem("pathArray");if(Oe){const Se=Oe.split(",").join("/"),ct=Se.indexOf("/")===0?Se.substr(1):Se;lt(ct)}},[]),(0,w.useEffect)(()=>{var Oe,Se,ct,Mt;ke.current=(Se=(Oe=H.pathname)==null?void 0:Oe.split("/"))==null?void 0:Se[2],se.current=((Mt=(ct=H.pathname)==null?void 0:ct.split("/"))==null?void 0:Mt[3])==="repository"},[]);const ot=(...Oe)=>be(void 0,[...Oe],function*(Se={}){if(yield G({type:"shixunsDetail/addRepositoryFile",payload:{id:ke.current,message:Se.commitMessage,content:Se.codeMirror,path:`${Ae?`${Ae}/`:""}${Se.path||""}`,secret_repository:se.current?void 0:!0}})){const Mt=se.current?`/shixuns/${ke.current}/repository${Ae?`/master/shixun_show/${Ae}`:""}`:`/shixuns/${ke.current}/secret_repository`;V.history.replace(Mt)}}),Qe=()=>{var Oe,Se;V.history.push(`/shixuns/${ke.current}/${(Se=(Oe=H.pathname)==null?void 0:Oe.split("/"))==null?void 0:Se[3]}${Ae?`/master/shixun_show/${Ae}`:""}`)};return w.createElement("section",{className:m.bg},w.createElement("div",{className:m.wrap},w.createElement("div",{className:m.title},"\u65B0\u5EFA\u6587\u4EF6"),w.createElement(x.default,{className:"mt10",form:Ve,scrollToFirstError:!0,layout:"vertical",onFinish:ot,onValuesChange:()=>We(Re({},Ve.getFieldsValue()))},w.createElement(x.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},w.createElement(x.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},w.createElement("span",null,w.createElement("span",{className:"mr5"},Ae?`${Ae}/`:""),w.createElement(_.default,{className:m.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),w.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")),w.createElement(x.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"}]},w.createElement(_.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"})),w.createElement("div",{className:"mt10 mb20"},w.createElement(x.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},w.createElement(b.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"]}}))),w.createElement(x.default.Item,{noStyle:!0},w.createElement(O.t,{okButtonProps:{htmlType:"submit"},onCancel:Qe})))))};var K=(0,V.connect)(({shixunsDetail:W,loading:j,globalSetting:d,user:c})=>({shixunsDetail:W,globalSetting:d,user:c,loading:j.models.index}))(pe);const je=({globalSetting:W})=>w.createElement(K,null);var Ct=(0,V.connect)(({globalSetting:W})=>({globalSetting:W}))(je)},9708:function(_t,le,f){"use strict";f.d(le,{F:function(){return b},Z:function(){return _}});var w=f(94184),V=f.n(w);const x=null;function _(O,m,ae){return V()({[`${O}-status-success`]:m==="success",[`${O}-status-warning`]:m==="warning",[`${O}-status-error`]:m==="error",[`${O}-status-validating`]:m==="validating",[`${O}-has-feedback`]:ae})}const b=(O,m)=>m||O},88258:function(_t,le,f){"use strict";var w=f(67294),V=f(53124),x=f(32983);const _=b=>{const{componentName:O}=b,{getPrefixCls:m}=(0,w.useContext)(V.E_),ae=m("empty");switch(O){case"Table":case"List":return w.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return w.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE,className:`${ae}-small`});default:return w.createElement(x.Z,null)}};le.Z=_},32983:function(_t,le,f){"use strict";f.d(le,{Z:function(){return W}});var w=f(94184),V=f.n(w),x=f(67294),_=f(53124),b=f(10110),O=f(84780),m=f(46605),Z=()=>{const[,j]=(0,m.Z)(),c=new O.C(j.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return x.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{fill:"none",fillRule:"evenodd"},x.createElement("g",{transform:"translate(24 31.67)"},x.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),x.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),x.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),x.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),x.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),x.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),x.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},x.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),x.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},me=()=>{const[,j]=(0,m.Z)(),{colorFill:d,colorFillTertiary:c,colorFillQuaternary:C,colorBgContainer:T}=j,{borderColor:G,shadowColor:D,contentColor:H}=(0,x.useMemo)(()=>({borderColor:new O.C(d).onBackground(T).toHexShortString(),shadowColor:new O.C(c).onBackground(T).toHexShortString(),contentColor:new O.C(C).onBackground(T).toHexShortString()}),[d,c,C,T]);return x.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},x.createElement("ellipse",{fill:D,cx:"32",cy:"33",rx:"32",ry:"7"}),x.createElement("g",{fillRule:"nonzero",stroke:G},x.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),x.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:H}))))},ie=f(67968),Re=f(45503);const ve=j=>{const{componentCls:d,margin:c,marginXS:C,marginXL:T,fontSize:G,lineHeight:D}=j;return{[d]:{marginInline:C,fontSize:G,lineHeight:D,textAlign:"center",[`${d}-image`]:{height:j.emptyImgHeight,marginBottom:C,opacity:j.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${d}-description`]:{color:j.colorText},[`${d}-footer`]:{marginTop:c},"&-normal":{marginBlock:T,color:j.colorTextDisabled,[`${d}-description`]:{color:j.colorTextDisabled},[`${d}-image`]:{height:j.emptyImgHeightMD}},"&-small":{marginBlock:C,color:j.colorTextDisabled,[`${d}-image`]:{height:j.emptyImgHeightSM}}}}};var be=(0,ie.Z)("Empty",j=>{const{componentCls:d,controlHeightLG:c}=j,C=(0,Re.TS)(j,{emptyImgCls:`${d}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[ve(C)]}),pe=function(j,d){var c={};for(var C in j)Object.prototype.hasOwnProperty.call(j,C)&&d.indexOf(C)<0&&(c[C]=j[C]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var T=0,C=Object.getOwnPropertySymbols(j);T<C.length;T++)d.indexOf(C[T])<0&&Object.prototype.propertyIsEnumerable.call(j,C[T])&&(c[C[T]]=j[C[T]]);return c};const K=x.createElement(Z,null),je=x.createElement(me,null),Ct=j=>{var{className:d,rootClassName:c,prefixCls:C,image:T=K,description:G,children:D,imageStyle:H,style:q}=j,We=pe(j,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:se,direction:ke,empty:Ve}=x.useContext(_.E_),Ae=se("empty",C),[lt,ot]=be(Ae),[Qe]=(0,b.Z)("Empty"),Oe=typeof G!="undefined"?G:Qe==null?void 0:Qe.description,Se=typeof Oe=="string"?Oe:"empty";let ct=null;return typeof T=="string"?ct=x.createElement("img",{alt:Se,src:T}):ct=T,lt(x.createElement("div",Object.assign({className:V()(ot,Ae,Ve==null?void 0:Ve.className,{[`${Ae}-normal`]:T===je,[`${Ae}-rtl`]:ke==="rtl"},d,c),style:Object.assign(Object.assign({},Ve==null?void 0:Ve.style),q)},We),x.createElement("div",{className:`${Ae}-image`,style:H},ct),Oe&&x.createElement("div",{className:`${Ae}-description`},Oe),D&&x.createElement("div",{className:`${Ae}-footer`},D)))};Ct.PRESENTED_IMAGE_DEFAULT=K,Ct.PRESENTED_IMAGE_SIMPLE=je;var W=Ct},22150:function(_t,le,f){"use strict";f.d(le,{default:function(){return Ue}});var w=f(74902),V=f(94184),x=f.n(V),_=f(38379),b=f(67294),O=f(33603),m=f(65223);function ae(y){const[L,A]=b.useState(y);return b.useEffect(()=>{const N=setTimeout(()=>{A(y)},y.length?0:10);return()=>{clearTimeout(N)}},[y]),L}var Z=f(14747),v=f(50438),me=f(33507),ie=f(45503),Re=f(67968),be=y=>{const{componentCls:L}=y,A=`${L}-show-help`,N=`${L}-show-help-item`;return{[A]:{transition:`opacity ${y.motionDurationSlow} ${y.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[N]:{overflow:"hidden",transition:`height ${y.motionDurationSlow} ${y.motionEaseInOut},
opacity ${y.motionDurationSlow} ${y.motionEaseInOut},
transform ${y.motionDurationSlow} ${y.motionEaseInOut} !important`,[`&${N}-appear, &${N}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${N}-leave-active`]:{transform:"translateY(-5px)"}}}}};const pe=y=>({legend:{display:"block",width:"100%",marginBottom:y.marginLG,padding:0,color:y.colorTextDescription,fontSize:y.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${y.lineWidth}px ${y.lineType} ${y.colorBorder}`},label:{fontSize:y.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 ${y.controlOutlineWidth}px ${y.controlOutline}`},output:{display:"block",paddingTop:15,color:y.colorText,fontSize:y.fontSize,lineHeight:y.lineHeight}}),K=(y,L)=>{const{formItemCls:A}=y;return{[A]:{[`${A}-label > label`]:{height:L},[`${A}-control-input`]:{minHeight:L}}}},je=y=>{const{componentCls:L}=y;return{[y.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Z.Wf)(y)),pe(y)),{[`${L}-text`]:{display:"inline-block",paddingInlineEnd:y.paddingSM},"&-small":Object.assign({},K(y,y.controlHeightSM)),"&-large":Object.assign({},K(y,y.controlHeightLG))})}},Ct=y=>{const{formItemCls:L,iconCls:A,componentCls:N,rootPrefixCls:$,labelRequiredMarkColor:F,labelColor:De,labelFontSize:ft,labelHeight:Xe,labelColonMarginInlineStart:ge,labelColonMarginInlineEnd:Ie,itemMarginBottom:Le}=y;return{[L]:Object.assign(Object.assign({},(0,Z.Wf)(y)),{marginBottom:Le,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${$}-row`]:{display:"none"},"&-has-warning":{[`${L}-split`]:{color:y.colorError}},"&-has-error":{[`${L}-split`]:{color:y.colorWarning}},[`${L}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${y.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Xe,color:De,fontSize:ft,[`> ${A}`]:{fontSize:y.fontSize,verticalAlign:"top"},[`&${L}-required:not(${L}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:y.marginXXS,color:F,fontSize:y.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${N}-hide-required-mark &`]:{display:"none"}},[`${L}-optional`]:{display:"inline-block",marginInlineStart:y.marginXXS,color:y.colorTextDescription,[`${N}-hide-required-mark &`]:{display:"none"}},[`${L}-tooltip`]:{color:y.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:y.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:ge,marginInlineEnd:Ie},[`&${L}-no-colon::after`]:{content:'"\\a0"'}}},[`${L}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${$}-col-'"]):not([class*="' ${$}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:y.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[L]:{"&-explain, &-extra":{clear:"both",color:y.colorTextDescription,fontSize:y.fontSize,lineHeight:y.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:y.controlHeightSM,transition:`color ${y.motionDurationMid} ${y.motionEaseOut}`},"&-explain":{"&-error":{color:y.colorError},"&-warning":{color:y.colorWarning}}},[`&-with-help ${L}-explain`]:{height:"auto",opacity:1},[`${L}-feedback-icon`]:{fontSize:y.fontSize,textAlign:"center",visibility:"visible",animationName:v.kr,animationDuration:y.motionDurationMid,animationTimingFunction:y.motionEaseOutBack,pointerEvents:"none","&-success":{color:y.colorSuccess},"&-error":{color:y.colorError},"&-warning":{color:y.colorWarning},"&-validating":{color:y.colorPrimary}}})}},W=y=>{const{componentCls:L,formItemCls:A}=y;return{[`${L}-horizontal`]:{[`${A}-label`]:{flexGrow:0},[`${A}-control`]:{flex:"1 1 0",minWidth:0},[`${A}-label[class$='-24'], ${A}-label[class*='-24 ']`]:{[`& + ${A}-control`]:{minWidth:"unset"}}}}},j=y=>{const{componentCls:L,formItemCls:A}=y;return{[`${L}-inline`]:{display:"flex",flexWrap:"wrap",[A]:{flex:"none",marginInlineEnd:y.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${A}-label,
> ${A}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${A}-label`]:{flex:"none"},[`${L}-text`]:{display:"inline-block"},[`${A}-has-feedback`]:{display:"inline-block"}}}}},d=y=>({padding:y.verticalLabelPadding,margin:y.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=y=>{const{componentCls:L,formItemCls:A,rootPrefixCls:N}=y;return{[`${A} ${A}-label`]:d(y),[L]:{[A]:{flexWrap:"wrap",[`${A}-label, ${A}-control`]:{[`&:not([class*=" ${N}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},C=y=>{const{componentCls:L,formItemCls:A,rootPrefixCls:N}=y;return{[`${L}-vertical`]:{[A]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${L}-item-control`]:{width:"100%"}}},[`${L}-vertical ${A}-label,
.${N}-col-24${A}-label,
.${N}-col-xl-24${A}-label`]:d(y),[`@media (max-width: ${y.screenXSMax}px)`]:[c(y),{[L]:{[`.${N}-col-xs-24${A}-label`]:d(y)}}],[`@media (max-width: ${y.screenSMMax}px)`]:{[L]:{[`.${N}-col-sm-24${A}-label`]:d(y)}},[`@media (max-width: ${y.screenMDMax}px)`]:{[L]:{[`.${N}-col-md-24${A}-label`]:d(y)}},[`@media (max-width: ${y.screenLGMax}px)`]:{[L]:{[`.${N}-col-lg-24${A}-label`]:d(y)}}}},T=(y,L)=>(0,ie.TS)(y,{formItemCls:`${y.componentCls}-item`,rootPrefixCls:L});var G=(0,Re.Z)("Form",(y,L)=>{let{rootPrefixCls:A}=L;const N=T(y,A);return[je(N),Ct(N),be(N),W(N),j(N),C(N),(0,me.Z)(N),v.kr]},y=>({labelRequiredMarkColor:y.colorError,labelColor:y.colorTextHeading,labelFontSize:y.fontSize,labelHeight:y.controlHeight,labelColonMarginInlineStart:y.marginXXS/2,labelColonMarginInlineEnd:y.marginXS,itemMarginBottom:y.marginLG,verticalLabelPadding:`0 0 ${y.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const D=[];function H(y,L,A){let N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof y=="string"?y:`${L}-${N}`,error:y,errorStatus:A}}var We=y=>{let{help:L,helpStatus:A,errors:N=D,warnings:$=D,className:F,fieldId:De,onVisibleChanged:ft}=y;const{prefixCls:Xe}=b.useContext(m.Rk),ge=`${Xe}-item-explain`,[,Ie]=G(Xe),Le=(0,b.useMemo)(()=>(0,O.Z)(Xe),[Xe]),$t=ae(N),z=ae($),Ne=b.useMemo(()=>L!=null?[H(L,"help",A)]:[].concat((0,w.Z)($t.map((vn,Et)=>H(vn,"error","error",Et))),(0,w.Z)(z.map((vn,Et)=>H(vn,"warning","warning",Et)))),[L,A,$t,z]),Vt={};return De&&(Vt.id=`${De}_help`),b.createElement(_.default,{motionDeadline:Le.motionDeadline,motionName:`${Xe}-show-help`,visible:!!Ne.length,onVisibleChanged:ft},vn=>{const{className:Et,style:dt}=vn;return b.createElement("div",Object.assign({},Vt,{className:x()(ge,Et,F,Ie),style:dt,role:"alert"}),b.createElement(_.CSSMotionList,Object.assign({keys:Ne},(0,O.Z)(Xe),{motionName:`${Xe}-show-help-item`,component:!1}),Sn=>{const{key:Pe,error:qt,errorStatus:Gt,className:xn,style:fn}=Sn;return b.createElement("div",{key:Pe,className:x()(xn,{[`${ge}-${Gt}`]:Gt}),style:fn},qt)}))})},se=f(58083),ke=f(53124),Ve=f(98866),Ae=f(97647),lt=f(98675),ot=f(17423);const Qe=["parentNode"],Oe="form_item";function Se(y){return y===void 0||y===!1?[]:Array.isArray(y)?y:[y]}function ct(y,L){if(!y.length)return;const A=y.join("_");return L?`${L}_${A}`:Qe.includes(A)?`${Oe}_${A}`:A}function Mt(y,L,A,N,$,F){let De=N;return F!==void 0?De=F:A.validating?De="validating":y.length?De="error":L.length?De="warning":(A.touched||$&&A.validated)&&(De="success"),De}function Ke(y){return Se(y).join("_")}function tt(y){const[L]=(0,se.useForm)(),A=b.useRef({}),N=b.useMemo(()=>y!=null?y:Object.assign(Object.assign({},L),{__INTERNAL__:{itemRef:$=>F=>{const De=Ke($);F?A.current[De]=F:delete A.current[De]}},scrollToField:function($){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const De=Se($),ft=ct(De,N.__INTERNAL__.name),Xe=ft?document.getElementById(ft):null;Xe&&(0,ot.Z)(Xe,Object.assign({scrollMode:"if-needed",block:"nearest"},F))},getFieldInstance:$=>{const F=Ke($);return A.current[F]}}),[y,L]);return[N]}var Ge=f(37920),mn=function(y,L){var A={};for(var N in y)Object.prototype.hasOwnProperty.call(y,N)&&L.indexOf(N)<0&&(A[N]=y[N]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $=0,N=Object.getOwnPropertySymbols(y);$<N.length;$++)L.indexOf(N[$])<0&&Object.prototype.propertyIsEnumerable.call(y,N[$])&&(A[N[$]]=y[N[$]]);return A};const Xn=(y,L)=>{const A=b.useContext(Ve.Z),{getPrefixCls:N,direction:$,form:F}=b.useContext(ke.E_),{prefixCls:De,className:ft,rootClassName:Xe,size:ge,disabled:Ie=A,form:Le,colon:$t,labelAlign:z,labelWrap:Ne,labelCol:Vt,wrapperCol:vn,hideRequiredMark:Et,layout:dt="horizontal",scrollToFirstError:Sn,requiredMark:Pe,onFinishFailed:qt,name:Gt,style:xn,feedbackIcons:fn}=y,yr=mn(y,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Zn=(0,lt.Z)(ge),Nn=b.useContext(Ge.Z),Or=(0,b.useMemo)(()=>Pe!==void 0?Pe:F&&F.requiredMark!==void 0?F.requiredMark:!Et,[Et,Pe,F]),Ir=$t!=null?$t:F==null?void 0:F.colon,Rn=N("form",De),[br,cr]=G(Rn),Sr=x()(Rn,`${Rn}-${dt}`,{[`${Rn}-hide-required-mark`]:Or===!1,[`${Rn}-rtl`]:$==="rtl",[`${Rn}-${Zn}`]:Zn},cr,F==null?void 0:F.className,ft,Xe),[Cn]=tt(Le),{__INTERNAL__:ir}=Cn;ir.name=Gt;const Kn=(0,b.useMemo)(()=>({name:Gt,labelAlign:z,labelCol:Vt,labelWrap:Ne,wrapperCol:vn,vertical:dt==="vertical",colon:Ir,requiredMark:Or,itemRef:ir.itemRef,form:Cn,feedbackIcons:fn}),[Gt,z,Vt,vn,dt,Ir,Or,Cn,fn]);b.useImperativeHandle(L,()=>Cn);const Un=(fr,pn)=>{if(fr){let An={block:"nearest"};typeof fr=="object"&&(An=fr),Cn.scrollToField(pn,An)}},Qn=fr=>{if(qt==null||qt(fr),fr.errorFields.length){const pn=fr.errorFields[0].name;if(Sn!==void 0){Un(Sn,pn);return}F&&F.scrollToFirstError!==void 0&&Un(F.scrollToFirstError,pn)}};return br(b.createElement(Ve.n,{disabled:Ie},b.createElement(Ae.q,{size:Zn},b.createElement(m.RV,Object.assign({},{validateMessages:Nn}),b.createElement(m.q3.Provider,{value:Kn},b.createElement(se.default,Object.assign({id:Gt},yr,{name:Gt,onFinishFailed:Qn,form:Cn,style:Object.assign(Object.assign({},F==null?void 0:F.style),xn),className:Sr})))))))};var de=b.forwardRef(Xn),Fe=f(9475),he=f(17799),nt=f(96159),St=f(37419);function st(y){if(typeof y=="function")return y;const L=(0,St.Z)(y);return L.length<=1?L[0]:L}const Be=()=>{const{status:y,errors:L=[],warnings:A=[]}=(0,b.useContext)(m.aM);return{status:y,errors:L,warnings:A}};Be.Context=m.aM;var gt=Be,ht=f(96523);function Rt(y){const[L,A]=b.useState(y),N=(0,b.useRef)(null),$=(0,b.useRef)([]),F=(0,b.useRef)(!1);b.useEffect(()=>(F.current=!1,()=>{F.current=!0,ht.Z.cancel(N.current),N.current=null}),[]);function De(ft){F.current||(N.current===null&&($.current=[],N.current=(0,ht.Z)(()=>{N.current=null,A(Xe=>{let ge=Xe;return $.current.forEach(Ie=>{ge=Ie(ge)}),ge})})),$.current.push(ft))}return[L,De]}function Zt(){const{itemRef:y}=b.useContext(m.q3),L=b.useRef({});function A(N,$){const F=$&&typeof $=="object"&&$.ref,De=N.join("_");return(L.current.name!==De||L.current.originRef!==F)&&(L.current.name=De,L.current.originRef=F,L.current.ref=(0,he.sQ)(y(N),F)),L.current.ref}return A}var xt=f(48130),at=f(14075),Qt=f(10366),Ht=f(92820),zt=f(21584);const er=y=>{const{formItemCls:L}=y;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${L}-control`]:{display:"flex"}}}};var on=(0,Re.b)(["Form","item-item"],(y,L)=>{let{rootPrefixCls:A}=L;const N=T(y,A);return[er(N)]}),ue=y=>{const{prefixCls:L,status:A,wrapperCol:N,children:$,errors:F,warnings:De,_internalItemRender:ft,extra:Xe,help:ge,fieldId:Ie,marginBottom:Le,onErrorVisibleChanged:$t}=y,z=`${L}-item`,Ne=b.useContext(m.q3),Vt=N||Ne.wrapperCol||{},vn=x()(`${z}-control`,Vt.className),Et=b.useMemo(()=>Object.assign({},Ne),[Ne]);delete Et.labelCol,delete Et.wrapperCol;const dt=b.createElement("div",{className:`${z}-control-input`},b.createElement("div",{className:`${z}-control-input-content`},$)),Sn=b.useMemo(()=>({prefixCls:L,status:A}),[L,A]),Pe=Le!==null||F.length||De.length?b.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},b.createElement(m.Rk.Provider,{value:Sn},b.createElement(We,{fieldId:Ie,errors:F,warnings:De,help:ge,helpStatus:A,className:`${z}-explain-connected`,onVisibleChanged:$t})),!!Le&&b.createElement("div",{style:{width:0,height:Le}})):null,qt={};Ie&&(qt.id=`${Ie}_extra`);const Gt=Xe?b.createElement("div",Object.assign({},qt,{className:`${z}-extra`}),Xe):null,xn=ft&&ft.mark==="pro_table_render"&&ft.render?ft.render(y,{input:dt,errorList:Pe,extra:Gt}):b.createElement(b.Fragment,null,dt,Pe,Gt);return b.createElement(m.q3.Provider,{value:Et},b.createElement(zt.Z,Object.assign({},Vt,{className:vn}),xn),b.createElement(on,{prefixCls:L}))},hn=f(17663),tn=f(24457),yn=f(10110),bn=f(83062),Ur=function(y,L){var A={};for(var N in y)Object.prototype.hasOwnProperty.call(y,N)&&L.indexOf(N)<0&&(A[N]=y[N]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $=0,N=Object.getOwnPropertySymbols(y);$<N.length;$++)L.indexOf(N[$])<0&&Object.prototype.propertyIsEnumerable.call(y,N[$])&&(A[N[$]]=y[N[$]]);return A};function rr(y){return y?typeof y=="object"&&!b.isValidElement(y)?y:{title:y}:null}var zn=y=>{let{prefixCls:L,label:A,htmlFor:N,labelCol:$,labelAlign:F,colon:De,required:ft,requiredMark:Xe,tooltip:ge}=y;var Ie;const[Le]=(0,yn.Z)("Form"),{vertical:$t,labelAlign:z,labelCol:Ne,labelWrap:Vt,colon:vn}=b.useContext(m.q3);if(!A)return null;const Et=$||Ne||{},dt=F||z,Sn=`${L}-item-label`,Pe=x()(Sn,dt==="left"&&`${Sn}-left`,Et.className,{[`${Sn}-wrap`]:!!Vt});let qt=A;const Gt=De===!0||vn!==!1&&De!==!1;Gt&&!$t&&typeof A=="string"&&A.trim()!==""&&(qt=A.replace(/[:|]\s*$/,""));const fn=rr(ge);if(fn){const{icon:Or=b.createElement(hn.Z,null)}=fn,Ir=Ur(fn,["icon"]),Rn=b.createElement(bn.Z,Object.assign({},Ir),b.cloneElement(Or,{className:`${L}-item-tooltip`,title:""}));qt=b.createElement(b.Fragment,null,qt,Rn)}const yr=Xe==="optional",Zn=typeof Xe=="function";Zn?qt=Xe(qt,{required:!!ft}):yr&&!ft&&(qt=b.createElement(b.Fragment,null,qt,b.createElement("span",{className:`${L}-item-optional`,title:""},(Le==null?void 0:Le.optional)||((Ie=tn.Z.Form)===null||Ie===void 0?void 0:Ie.optional))));const Nn=x()({[`${L}-item-required`]:ft,[`${L}-item-required-mark-optional`]:yr||Zn,[`${L}-item-no-colon`]:!Gt});return b.createElement(zt.Z,Object.assign({},Et,{className:Pe}),b.createElement("label",{htmlFor:N,className:Nn,title:typeof A=="string"?A:""},qt))},_n=f(87725),jr=f(16646),kr=f(87995),Si=f(3407);const li={success:_n.Z,warning:kr.Z,error:jr.Z,validating:Si.Z};function Oi(y){let{children:L,errors:A,warnings:N,hasFeedback:$,validateStatus:F,prefixCls:De,meta:ft,noStyle:Xe}=y;const ge=`${De}-item`,{feedbackIcons:Ie}=b.useContext(m.q3),Le=Mt(A,N,ft,null,!!$,F),{isFormItemInput:$t,status:z}=b.useContext(m.aM),Ne=b.useMemo(()=>{var Vt;let vn;if($){const Sn=$!==!0&&$.icons||Ie,Pe=Le&&((Vt=Sn==null?void 0:Sn({status:Le,errors:A,warnings:N}))===null||Vt===void 0?void 0:Vt[Le]),qt=Le&&li[Le];vn=Pe!==!1&&qt?b.createElement("span",{className:x()(`${ge}-feedback-icon`,`${ge}-feedback-icon-${Le}`)},Pe||b.createElement(qt,null)):null}let Et=!0,dt=Le||"";return Xe&&(Et=$t,dt=(Le!=null?Le:z)||""),{status:dt,errors:A,warnings:N,hasFeedback:!!$,feedbackIcon:vn,isFormItemInput:Et}},[Le,$,Xe,$t,z]);return b.createElement(m.aM.Provider,{value:Ne},L)}var Vr=function(y,L){var A={};for(var N in y)Object.prototype.hasOwnProperty.call(y,N)&&L.indexOf(N)<0&&(A[N]=y[N]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $=0,N=Object.getOwnPropertySymbols(y);$<N.length;$++)L.indexOf(N[$])<0&&Object.prototype.propertyIsEnumerable.call(y,N[$])&&(A[N[$]]=y[N[$]]);return A};function Ci(y){const{prefixCls:L,className:A,rootClassName:N,style:$,help:F,errors:De,warnings:ft,validateStatus:Xe,meta:ge,hasFeedback:Ie,hidden:Le,children:$t,fieldId:z,required:Ne,isRequired:Vt,onSubItemMetaChange:vn}=y,Et=Vr(y,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),dt=`${L}-item`,{requiredMark:Sn}=b.useContext(m.q3),Pe=b.useRef(null),qt=ae(De),Gt=ae(ft),xn=F!=null,fn=!!(xn||De.length||ft.length),yr=!!Pe.current&&(0,xt.Z)(Pe.current),[Zn,Nn]=b.useState(null);(0,at.Z)(()=>{if(fn&&Pe.current){const cr=getComputedStyle(Pe.current);Nn(parseInt(cr.marginBottom,10))}},[fn,yr]);const Or=cr=>{cr||Nn(null)},Rn=function(){let cr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Sr=cr?qt:ge.errors,Cn=cr?Gt:ge.warnings;return Mt(Sr,Cn,ge,"",!!Ie,Xe)}(),br=x()(dt,A,N,{[`${dt}-with-help`]:xn||qt.length||Gt.length,[`${dt}-has-feedback`]:Rn&&Ie,[`${dt}-has-success`]:Rn==="success",[`${dt}-has-warning`]:Rn==="warning",[`${dt}-has-error`]:Rn==="error",[`${dt}-is-validating`]:Rn==="validating",[`${dt}-hidden`]:Le});return b.createElement("div",{className:br,style:$,ref:Pe},b.createElement(Ht.Z,Object.assign({className:`${dt}-row`},(0,Qt.Z)(Et,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),b.createElement(zn,Object.assign({htmlFor:z},y,{requiredMark:Sn,required:Ne!=null?Ne:Vt,prefixCls:L})),b.createElement(ue,Object.assign({},y,ge,{errors:qt,warnings:Gt,prefixCls:L,status:Rn,help:F,marginBottom:Zn,onErrorVisibleChanged:Or}),b.createElement(m.qI.Provider,{value:vn},b.createElement(Oi,{prefixCls:L,meta:ge,errors:ge.errors,warnings:ge.warnings,hasFeedback:Ie,validateStatus:Rn},$t)))),!!Zn&&b.createElement("div",{className:`${dt}-margin-offset`,style:{marginBottom:-Zn}}))}const si="__SPLIT__",Ni=null,I=b.memo(y=>{let{children:L}=y;return L},(y,L)=>y.value===L.value&&y.update===L.update&&y.childProps.length===L.childProps.length&&y.childProps.every((A,N)=>A===L.childProps[N]));function Y(y){return y!=null}function U(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function X(y){const{name:L,noStyle:A,className:N,dependencies:$,prefixCls:F,shouldUpdate:De,rules:ft,children:Xe,required:ge,label:Ie,messageVariables:Le,trigger:$t="onChange",validateTrigger:z,hidden:Ne,help:Vt}=y,{getPrefixCls:vn}=b.useContext(ke.E_),{name:Et}=b.useContext(m.q3),dt=st(Xe),Sn=typeof dt=="function",Pe=b.useContext(m.qI),{validateTrigger:qt}=b.useContext(se.FieldContext),Gt=z!==void 0?z:qt,xn=Y(L),fn=vn("form",F),[yr,Zn]=G(fn),Nn=b.useContext(se.ListContext),Or=b.useRef(),[Ir,Rn]=Rt({}),[br,cr]=(0,Fe.Z)(()=>U()),Sr=pn=>{const An=Nn==null?void 0:Nn.getKey(pn.name);if(cr(pn.destroy?U():pn,!0),A&&Vt!==!1&&Pe){let jn=pn.name;if(pn.destroy)jn=Or.current||jn;else if(An!==void 0){const[Rr,ui]=An;jn=[Rr].concat((0,w.Z)(ui)),Or.current=jn}Pe(pn,jn)}},Cn=(pn,An)=>{Rn(jn=>{const Rr=Object.assign({},jn),Gr=[].concat((0,w.Z)(pn.name.slice(0,-1)),(0,w.Z)(An)).join(si);return pn.destroy?delete Rr[Gr]:Rr[Gr]=pn,Rr})},[ir,Kn]=b.useMemo(()=>{const pn=(0,w.Z)(br.errors),An=(0,w.Z)(br.warnings);return Object.values(Ir).forEach(jn=>{pn.push.apply(pn,(0,w.Z)(jn.errors||[])),An.push.apply(An,(0,w.Z)(jn.warnings||[]))}),[pn,An]},[Ir,br.errors,br.warnings]),Un=Zt();function Qn(pn,An,jn){return A&&!Ne?b.createElement(Oi,{prefixCls:fn,hasFeedback:y.hasFeedback,validateStatus:y.validateStatus,meta:br,errors:ir,warnings:Kn,noStyle:!0},pn):b.createElement(Ci,Object.assign({key:"row"},y,{className:x()(N,Zn),prefixCls:fn,fieldId:An,isRequired:jn,errors:ir,warnings:Kn,meta:br,onSubItemMetaChange:Cn}),pn)}if(!xn&&!Sn&&!$)return yr(Qn(dt));let fr={};return typeof Ie=="string"?fr.label=Ie:L&&(fr.label=String(L)),Le&&(fr=Object.assign(Object.assign({},fr),Le)),yr(b.createElement(se.Field,Object.assign({},y,{messageVariables:fr,trigger:$t,validateTrigger:Gt,onMetaChange:Sr}),(pn,An,jn)=>{const Rr=Se(L).length&&An?An.name:[],ui=ct(Rr,Et),Gr=ge!==void 0?ge:!!(ft&&ft.some(Pn=>{if(Pn&&typeof Pn=="object"&&Pn.required&&!Pn.warningOnly)return!0;if(typeof Pn=="function"){const Yr=Pn(jn);return Yr&&Yr.required&&!Yr.warningOnly}return!1})),Xr=Object.assign({},pn);let ci=null;if(Array.isArray(dt)&&xn)ci=dt;else if(!(Sn&&(!(De||$)||xn))){if(!($&&!Sn&&!xn))if((0,nt.l$)(dt)){const Pn=Object.assign(Object.assign({},dt.props),Xr);if(Pn.id||(Pn.id=ui),Vt||ir.length>0||Kn.length>0||y.extra){const $r=[];(Vt||ir.length>0)&&$r.push(`${ui}_help`),y.extra&&$r.push(`${ui}_extra`),Pn["aria-describedby"]=$r.join(" ")}ir.length>0&&(Pn["aria-invalid"]="true"),Gr&&(Pn["aria-required"]="true"),(0,he.Yr)(dt)&&(Pn.ref=Un(Rr,dt)),new Set([].concat((0,w.Z)(Se($t)),(0,w.Z)(Se(Gt)))).forEach($r=>{Pn[$r]=function(){for(var Ai,Hi,xi,_r,Vi,Wi=arguments.length,Gi=new Array(Wi),Fi=0;Fi<Wi;Fi++)Gi[Fi]=arguments[Fi];(xi=Xr[$r])===null||xi===void 0||(Ai=xi).call.apply(Ai,[Xr].concat(Gi)),(Vi=(_r=dt.props)[$r])===null||Vi===void 0||(Hi=Vi).call.apply(Hi,[_r].concat(Gi))}});const Fr=[Pn["aria-required"],Pn["aria-invalid"],Pn["aria-describedby"]];ci=b.createElement(I,{value:Xr[y.valuePropName||"value"],update:dt,childProps:Fr},(0,nt.Tm)(dt,Pn))}else Sn&&(De||$)&&!xn?ci=dt(jn):ci=dt}return Qn(ci,ui,Gr)}))}const $e=X;$e.useStatus=gt;var ye=$e,we=function(y,L){var A={};for(var N in y)Object.prototype.hasOwnProperty.call(y,N)&&L.indexOf(N)<0&&(A[N]=y[N]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $=0,N=Object.getOwnPropertySymbols(y);$<N.length;$++)L.indexOf(N[$])<0&&Object.prototype.propertyIsEnumerable.call(y,N[$])&&(A[N[$]]=y[N[$]]);return A},wt=y=>{var{prefixCls:L,children:A}=y,N=we(y,["prefixCls","children"]);const{getPrefixCls:$}=b.useContext(ke.E_),F=$("form",L),De=b.useMemo(()=>({prefixCls:F,status:"error"}),[F]);return b.createElement(se.List,Object.assign({},N),(ft,Xe,ge)=>b.createElement(m.Rk.Provider,{value:De},A(ft.map(Ie=>Object.assign(Object.assign({},Ie),{fieldKey:Ie.key})),Xe,{errors:ge.errors,warnings:ge.warnings})))};function Dt(){const{form:y}=(0,b.useContext)(m.q3);return y}const rt=de;rt.Item=ye,rt.List=wt,rt.ErrorList=We,rt.useForm=tt,rt.useFormInstance=Dt,rt.useWatch=se.useWatch,rt.Provider=m.RV,rt.create=()=>{};var Ue=rt},82586:function(_t,le,f){"use strict";f.d(le,{Z:function(){return Ct},n:function(){return K}});var w=f(16646),V=f(94184),x=f.n(V),_=f(67656),b=f(17799),O=f(67294),m=f(9708),ae=f(53124),Z=f(98866),v=f(98675),me=f(65223),ie=f(4173),Re=f(72922),ve=f(47673);function be(W){return!!(W.prefix||W.suffix||W.allowClear)}var pe=function(W,j){var d={};for(var c in W)Object.prototype.hasOwnProperty.call(W,c)&&j.indexOf(c)<0&&(d[c]=W[c]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var C=0,c=Object.getOwnPropertySymbols(W);C<c.length;C++)j.indexOf(c[C])<0&&Object.prototype.propertyIsEnumerable.call(W,c[C])&&(d[c[C]]=W[c[C]]);return d};function K(W,j){if(!W)return;W.focus(j);const{cursor:d}=j||{};if(d){const c=W.value.length;switch(d){case"start":W.setSelectionRange(0,0);break;case"end":W.setSelectionRange(c,c);break;default:W.setSelectionRange(0,c);break}}}var Ct=(0,O.forwardRef)((W,j)=>{var d;const{prefixCls:c,bordered:C=!0,status:T,size:G,disabled:D,onBlur:H,onFocus:q,suffix:We,allowClear:se,addonAfter:ke,addonBefore:Ve,className:Ae,style:lt,styles:ot,rootClassName:Qe,onChange:Oe,classNames:Se}=W,ct=pe(W,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Mt,direction:Ke,input:tt}=O.useContext(ae.E_),Ge=Mt("input",c),mn=(0,O.useRef)(null),[Xn,xe]=(0,ve.ZP)(Ge),{compactSize:de,compactItemClassnames:Fe}=(0,ie.ri)(Ge,Ke),he=(0,v.Z)(on=>{var Yn;return(Yn=G!=null?G:de)!==null&&Yn!==void 0?Yn:on}),nt=O.useContext(Z.Z),St=D!=null?D:nt,{status:st,hasFeedback:Be,feedbackIcon:gt}=(0,O.useContext)(me.aM),ht=(0,m.F)(st,T),Rt=be(W)||!!Be,Zt=(0,O.useRef)(Rt);(0,O.useEffect)(()=>{var on;Rt&&Zt.current,Zt.current=Rt},[Rt]);const xt=(0,Re.Z)(mn,!0),at=on=>{xt(),H==null||H(on)},Qt=on=>{xt(),q==null||q(on)},Ht=on=>{xt(),Oe==null||Oe(on)},zt=(Be||We)&&O.createElement(O.Fragment,null,We,Be&&gt);let er;return typeof se=="object"&&(se!=null&&se.clearIcon)?er=se:se&&(er={clearIcon:O.createElement(w.Z,null)}),Xn(O.createElement(_.default,Object.assign({ref:(0,b.sQ)(j,mn),prefixCls:Ge,autoComplete:tt==null?void 0:tt.autoComplete},ct,{disabled:St,onBlur:at,onFocus:Qt,style:Object.assign(Object.assign({},tt==null?void 0:tt.style),lt),styles:Object.assign(Object.assign({},tt==null?void 0:tt.styles),ot),suffix:zt,allowClear:er,className:x()(Ae,Qe,Fe,tt==null?void 0:tt.className),onChange:Ht,addonAfter:ke&&O.createElement(ie.BR,null,O.createElement(me.Ux,{override:!0,status:!0},ke)),addonBefore:Ve&&O.createElement(ie.BR,null,O.createElement(me.Ux,{override:!0,status:!0},Ve)),classNames:Object.assign(Object.assign(Object.assign({},Se),tt==null?void 0:tt.classNames),{input:x()({[`${Ge}-sm`]:he==="small",[`${Ge}-lg`]:he==="large",[`${Ge}-rtl`]:Ke==="rtl",[`${Ge}-borderless`]:!C},!Rt&&(0,m.Z)(Ge,ht),Se==null?void 0:Se.input,(d=tt==null?void 0:tt.classNames)===null||d===void 0?void 0:d.input,xe)}),classes:{affixWrapper:x()({[`${Ge}-affix-wrapper-sm`]:he==="small",[`${Ge}-affix-wrapper-lg`]:he==="large",[`${Ge}-affix-wrapper-rtl`]:Ke==="rtl",[`${Ge}-affix-wrapper-borderless`]:!C},(0,m.Z)(`${Ge}-affix-wrapper`,ht,Be),xe),wrapper:x()({[`${Ge}-group-rtl`]:Ke==="rtl"},xe),group:x()({[`${Ge}-group-wrapper-sm`]:he==="small",[`${Ge}-group-wrapper-lg`]:he==="large",[`${Ge}-group-wrapper-rtl`]:Ke==="rtl",[`${Ge}-group-wrapper-disabled`]:St},(0,m.Z)(`${Ge}-group-wrapper`,ht,Be),xe)}})))})},96330:function(_t,le,f){"use strict";var w=f(16646),V=f(94184),x=f.n(V),_=f(64701),b=f(67294),O=f(9708),m=f(53124),ae=f(98866),Z=f(98675),v=f(65223),me=f(82586),ie=f(47673),Re=function(be,pe){var K={};for(var je in be)Object.prototype.hasOwnProperty.call(be,je)&&pe.indexOf(je)<0&&(K[je]=be[je]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,je=Object.getOwnPropertySymbols(be);Ct<je.length;Ct++)pe.indexOf(je[Ct])<0&&Object.prototype.propertyIsEnumerable.call(be,je[Ct])&&(K[je[Ct]]=be[je[Ct]]);return K};const ve=(0,b.forwardRef)((be,pe)=>{const{prefixCls:K,bordered:je=!0,size:Ct,disabled:W,status:j,allowClear:d,showCount:c,classNames:C,rootClassName:T,className:G}=be,D=Re(be,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:H,direction:q}=b.useContext(m.E_),We=(0,Z.Z)(Ct),se=b.useContext(ae.Z),ke=W!=null?W:se,{status:Ve,hasFeedback:Ae,feedbackIcon:lt}=b.useContext(v.aM),ot=(0,O.F)(Ve,j),Qe=b.useRef(null);b.useImperativeHandle(pe,()=>{var Ke;return{resizableTextArea:(Ke=Qe.current)===null||Ke===void 0?void 0:Ke.resizableTextArea,focus:tt=>{var Ge,mn;(0,me.n)((mn=(Ge=Qe.current)===null||Ge===void 0?void 0:Ge.resizableTextArea)===null||mn===void 0?void 0:mn.textArea,tt)},blur:()=>{var tt;return(tt=Qe.current)===null||tt===void 0?void 0:tt.blur()}}});const Oe=H("input",K);let Se;typeof d=="object"&&(d!=null&&d.clearIcon)?Se=d:d&&(Se={clearIcon:b.createElement(w.Z,null)});const[ct,Mt]=(0,ie.ZP)(Oe);return ct(b.createElement(_.default,Object.assign({},D,{disabled:ke,allowClear:Se,className:x()(G,T),classes:{affixWrapper:x()(`${Oe}-textarea-affix-wrapper`,{[`${Oe}-affix-wrapper-rtl`]:q==="rtl",[`${Oe}-affix-wrapper-borderless`]:!je,[`${Oe}-affix-wrapper-sm`]:We==="small",[`${Oe}-affix-wrapper-lg`]:We==="large",[`${Oe}-textarea-show-count`]:c},(0,O.Z)(`${Oe}-affix-wrapper`,ot),Mt)},classNames:Object.assign(Object.assign({},C),{textarea:x()({[`${Oe}-borderless`]:!je,[`${Oe}-sm`]:We==="small",[`${Oe}-lg`]:We==="large"},(0,O.Z)(Oe,ot),Mt,C==null?void 0:C.textarea)}),prefixCls:Oe,suffix:Ae&&b.createElement("span",{className:`${Oe}-textarea-suffix`},lt),showCount:c,ref:Qe})))});le.Z=ve},72922:function(_t,le,f){"use strict";f.d(le,{Z:function(){return V}});var w=f(67294);function V(x,_){const b=(0,w.useRef)([]),O=()=>{b.current.push(setTimeout(()=>{var m,ae,Z,v;!((m=x.current)===null||m===void 0)&&m.input&&((ae=x.current)===null||ae===void 0?void 0:ae.input.getAttribute("type"))==="password"&&(!((Z=x.current)===null||Z===void 0)&&Z.input.hasAttribute("value"))&&((v=x.current)===null||v===void 0||v.input.removeAttribute("value"))}))};return(0,w.useEffect)(()=>(_&&O(),()=>b.current.forEach(m=>{m&&clearTimeout(m)})),[]),O}},69677:function(_t,le,f){"use strict";f.d(le,{default:function(){return We}});var w=f(94184),V=f.n(w),x=f(67294),_=f(53124),b=f(65223),O=f(47673),ae=se=>{const{getPrefixCls:ke,direction:Ve}=(0,x.useContext)(_.E_),{prefixCls:Ae,className:lt}=se,ot=ke("input-group",Ae),Qe=ke("input"),[Oe,Se]=(0,O.ZP)(Qe),ct=V()(ot,{[`${ot}-lg`]:se.size==="large",[`${ot}-sm`]:se.size==="small",[`${ot}-compact`]:se.compact,[`${ot}-rtl`]:Ve==="rtl"},Se,lt),Mt=(0,x.useContext)(b.aM),Ke=(0,x.useMemo)(()=>Object.assign(Object.assign({},Mt),{isFormItemInput:!1}),[Mt]);return Oe(x.createElement("span",{className:ct,style:se.style,onMouseEnter:se.onMouseEnter,onMouseLeave:se.onMouseLeave,onFocus:se.onFocus,onBlur:se.onBlur},x.createElement(b.aM.Provider,{value:Ke},se.children)))},Z=f(82586),v=f(63237),me=f(99569),ie=f(10366),Re=f(17799),ve=f(72922),be=function(se,ke){var Ve={};for(var Ae in se)Object.prototype.hasOwnProperty.call(se,Ae)&&ke.indexOf(Ae)<0&&(Ve[Ae]=se[Ae]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,Ae=Object.getOwnPropertySymbols(se);lt<Ae.length;lt++)ke.indexOf(Ae[lt])<0&&Object.prototype.propertyIsEnumerable.call(se,Ae[lt])&&(Ve[Ae[lt]]=se[Ae[lt]]);return Ve};const pe=se=>se?x.createElement(me.Z,null):x.createElement(v.Z,null),K={click:"onClick",hover:"onMouseOver"};var Ct=x.forwardRef((se,ke)=>{const{visibilityToggle:Ve=!0}=se,Ae=typeof Ve=="object"&&Ve.visible!==void 0,[lt,ot]=(0,x.useState)(()=>Ae?Ve.visible:!1),Qe=(0,x.useRef)(null);x.useEffect(()=>{Ae&&ot(Ve.visible)},[Ae,Ve]);const Oe=(0,ve.Z)(Qe),Se=()=>{const{disabled:St}=se;St||(lt&&Oe(),ot(st=>{var Be;const gt=!st;return typeof Ve=="object"&&((Be=Ve.onVisibleChange)===null||Be===void 0||Be.call(Ve,gt)),gt}))},ct=St=>{const{action:st="click",iconRender:Be=pe}=se,gt=K[st]||"",ht=Be(lt),Rt={[gt]:Se,className:`${St}-icon`,key:"passwordIcon",onMouseDown:Zt=>{Zt.preventDefault()},onMouseUp:Zt=>{Zt.preventDefault()}};return x.cloneElement(x.isValidElement(ht)?ht:x.createElement("span",null,ht),Rt)},{className:Mt,prefixCls:Ke,inputPrefixCls:tt,size:Ge}=se,mn=be(se,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Xn}=x.useContext(_.E_),xe=Xn("input",tt),de=Xn("input-password",Ke),Fe=Ve&&ct(de),he=V()(de,Mt,{[`${de}-${Ge}`]:!!Ge}),nt=Object.assign(Object.assign({},(0,ie.Z)(mn,["suffix","iconRender","visibilityToggle"])),{type:lt?"text":"password",className:he,prefixCls:xe,suffix:Fe});return Ge&&(nt.size=Ge),x.createElement(Z.Z,Object.assign({ref:(0,Re.sQ)(ke,Qe)},nt))}),W=f(72395),j=f(96159),d=f(71577),c=f(98675),C=f(4173),T=function(se,ke){var Ve={};for(var Ae in se)Object.prototype.hasOwnProperty.call(se,Ae)&&ke.indexOf(Ae)<0&&(Ve[Ae]=se[Ae]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,Ae=Object.getOwnPropertySymbols(se);lt<Ae.length;lt++)ke.indexOf(Ae[lt])<0&&Object.prototype.propertyIsEnumerable.call(se,Ae[lt])&&(Ve[Ae[lt]]=se[Ae[lt]]);return Ve},D=x.forwardRef((se,ke)=>{const{prefixCls:Ve,inputPrefixCls:Ae,className:lt,size:ot,suffix:Qe,enterButton:Oe=!1,addonAfter:Se,loading:ct,disabled:Mt,onSearch:Ke,onChange:tt,onCompositionStart:Ge,onCompositionEnd:mn}=se,Xn=T(se,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:xe,direction:de}=x.useContext(_.E_),Fe=x.useRef(!1),he=xe("input-search",Ve),nt=xe("input",Ae),{compactSize:St}=(0,C.ri)(he,de),st=(0,c.Z)(ue=>{var hn;return(hn=ot!=null?ot:St)!==null&&hn!==void 0?hn:ue}),Be=x.useRef(null),gt=ue=>{ue&&ue.target&&ue.type==="click"&&Ke&&Ke(ue.target.value,ue,{source:"clear"}),tt&&tt(ue)},ht=ue=>{var hn;document.activeElement===((hn=Be.current)===null||hn===void 0?void 0:hn.input)&&ue.preventDefault()},Rt=ue=>{var hn,tn;Ke&&Ke((tn=(hn=Be.current)===null||hn===void 0?void 0:hn.input)===null||tn===void 0?void 0:tn.value,ue,{source:"input"})},Zt=ue=>{Fe.current||ct||Rt(ue)},xt=typeof Oe=="boolean"?x.createElement(W.Z,null):null,at=`${he}-button`;let Qt;const Ht=Oe||{},zt=Ht.type&&Ht.type.__ANT_BUTTON===!0;zt||Ht.type==="button"?Qt=(0,j.Tm)(Ht,Object.assign({onMouseDown:ht,onClick:ue=>{var hn,tn;(tn=(hn=Ht==null?void 0:Ht.props)===null||hn===void 0?void 0:hn.onClick)===null||tn===void 0||tn.call(hn,ue),Rt(ue)},key:"enterButton"},zt?{className:at,size:st}:{})):Qt=x.createElement(d.ZP,{className:at,type:Oe?"primary":void 0,size:st,disabled:Mt,key:"enterButton",onMouseDown:ht,onClick:Rt,loading:ct,icon:xt},Oe),Se&&(Qt=[Qt,(0,j.Tm)(Se,{key:"addonAfter"})]);const er=V()(he,{[`${he}-rtl`]:de==="rtl",[`${he}-${st}`]:!!st,[`${he}-with-button`]:!!Oe},lt),on=ue=>{Fe.current=!0,Ge==null||Ge(ue)},Yn=ue=>{Fe.current=!1,mn==null||mn(ue)};return x.createElement(Z.Z,Object.assign({ref:(0,Re.sQ)(Be,ke),onPressEnter:Zt},Xn,{size:st,onCompositionStart:on,onCompositionEnd:Yn,prefixCls:nt,addonAfter:Qt,suffix:Qe,onChange:gt,className:er,disabled:Mt}))}),H=f(96330);const q=Z.Z;q.Group=ae,q.Search=D,q.TextArea=H.Z,q.Password=Ct;var We=q},47673:function(_t,le,f){"use strict";f.d(le,{M1:function(){return m},TM:function(){return j},Xy:function(){return ae},bi:function(){return me},e5:function(){return W},ik:function(){return ie},nz:function(){return b},pU:function(){return O},s7:function(){return Re},x0:function(){return v}});var w=f(14747),V=f(80110),x=f(45503),_=f(67968);const b=d=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:d,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),O=d=>({borderColor:d.hoverBorderColor}),m=d=>({borderColor:d.activeBorderColor,boxShadow:d.activeShadow,outline:0}),ae=d=>({color:d.colorTextDisabled,backgroundColor:d.colorBgContainerDisabled,borderColor:d.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},O((0,x.TS)(d,{hoverBorderColor:d.colorBorder})))}),Z=d=>{const{paddingBlockLG:c,fontSizeLG:C,lineHeightLG:T,borderRadiusLG:G,paddingInlineLG:D}=d;return{padding:`${c}px ${D}px`,fontSize:C,lineHeight:T,borderRadius:G}},v=d=>({padding:`${d.paddingBlockSM}px ${d.paddingInlineSM}px`,borderRadius:d.borderRadiusSM}),me=(d,c)=>{const{componentCls:C,colorError:T,colorWarning:G,errorActiveShadow:D,warningActiveShadow:H,colorErrorBorderHover:q,colorWarningBorderHover:We}=d;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:T,"&:hover":{borderColor:q},"&:focus, &-focused":Object.assign({},m((0,x.TS)(d,{activeBorderColor:T,activeShadow:D}))),[`${C}-prefix, ${C}-suffix`]:{color:T}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:G,"&:hover":{borderColor:We},"&:focus, &-focused":Object.assign({},m((0,x.TS)(d,{activeBorderColor:G,activeShadow:H}))),[`${C}-prefix, ${C}-suffix`]:{color:G}}}},ie=d=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${d.paddingBlock}px ${d.paddingInline}px`,color:d.colorText,fontSize:d.fontSize,lineHeight:d.lineHeight,backgroundColor:d.colorBgContainer,backgroundImage:"none",borderWidth:d.lineWidth,borderStyle:d.lineType,borderColor:d.colorBorder,borderRadius:d.borderRadius,transition:`all ${d.motionDurationMid}`},b(d.colorTextPlaceholder)),{"&:hover":Object.assign({},O(d)),"&:focus, &-focused":Object.assign({},m(d)),"&-disabled, &[disabled]":Object.assign({},ae(d)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:d.controlHeight,lineHeight:d.lineHeight,verticalAlign:"bottom",transition:`all ${d.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},Z(d)),"&-sm":Object.assign({},v(d)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),Re=d=>{const{componentCls:c,antCls:C}=d;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:d.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${c}, &-lg > ${c}-group-addon`]:Object.assign({},Z(d)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},v(d)),[`&-lg ${C}-select-single ${C}-select-selector`]:{height:d.controlHeightLG},[`&-sm ${C}-select-single ${C}-select-selector`]:{height:d.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 ${d.paddingInline}px`,color:d.colorText,fontWeight:"normal",fontSize:d.fontSize,textAlign:"center",backgroundColor:d.colorFillAlter,border:`${d.lineWidth}px ${d.lineType} ${d.colorBorder}`,borderRadius:d.borderRadius,transition:`all ${d.motionDurationSlow}`,lineHeight:1,[`${C}-select`]:{margin:`-${d.paddingBlock+1}px -${d.paddingInline}px`,[`&${C}-select-single:not(${C}-select-customize-input)`]:{[`${C}-select-selector`]:{backgroundColor:"inherit",border:`${d.lineWidth}px ${d.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${C}-select-selector`]:{color:d.colorPrimary}}},[`${C}-cascader-picker`]:{margin:`-9px -${d.paddingInline}px`,backgroundColor:"transparent",[`${C}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${c}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${c}-search-with-button &`]:{zIndex:0}}},[`> ${c}:first-child, ${c}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${C}-select ${C}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}-affix-wrapper`]:{[`&:not(:first-child) ${c}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${c}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}:last-child, ${c}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${C}-select ${C}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${c}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${c}-search &`]:{borderStartStartRadius:d.borderRadius,borderEndStartRadius:d.borderRadius}},[`&:not(:first-child), ${c}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${c}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,w.dF)()),{[`${c}-group-addon, ${c}-group-wrap, > ${c}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:d.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${c}-affix-wrapper,
& > ${c}-number-affix-wrapper,
& > ${C}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-d.lineWidth,borderInlineEndWidth:d.lineWidth},[`${c}`]:{float:"none"},[`& > ${C}-select > ${C}-select-selector,
& > ${C}-select-auto-complete ${c},
& > ${C}-cascader-picker ${c},
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:d.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${C}-select-focused`]:{zIndex:1},[`& > ${C}-select > ${C}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${C}-select:first-child > ${C}-select-selector,
& > ${C}-select-auto-complete:first-child ${c},
& > ${C}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:d.borderRadius,borderEndStartRadius:d.borderRadius},[`& > *:last-child,
& > ${C}-select:last-child > ${C}-select-selector,
& > ${C}-cascader-picker:last-child ${c},
& > ${C}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:d.lineWidth,borderStartEndRadius:d.borderRadius,borderEndEndRadius:d.borderRadius},[`& > ${C}-select-auto-complete ${c}`]:{verticalAlign:"top"},[`${c}-group-wrapper + ${c}-group-wrapper`]:{marginInlineStart:-d.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:d.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:d.borderRadius}}}})}},ve=d=>{const{componentCls:c,controlHeightSM:C,lineWidth:T}=d,D=(C-T*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,w.Wf)(d)),ie(d)),me(d,c)),{'&[type="color"]':{height:d.controlHeight,[`&${c}-lg`]:{height:d.controlHeightLG},[`&${c}-sm`]:{height:C,paddingTop:D,paddingBottom:D}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},be=d=>{const{componentCls:c}=d;return{[`${c}-clear-icon`]:{margin:0,color:d.colorTextQuaternary,fontSize:d.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${d.motionDurationSlow}`,"&:hover":{color:d.colorTextTertiary},"&:active":{color:d.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${d.inputAffixPadding}px`}}}},pe=d=>{const{componentCls:c,inputAffixPadding:C,colorTextDescription:T,motionDurationSlow:G,colorIcon:D,colorIconHover:H,iconCls:q}=d;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ie(d)),{display:"inline-flex",[`&:not(${c}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},O(d)),{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:d.paddingXS}},"&-show-count-suffix":{color:T},"&-show-count-has-suffix":{marginInlineEnd:d.paddingXXS},"&-prefix":{marginInlineEnd:C},"&-suffix":{marginInlineStart:C}}}),be(d)),{[`${q}${c}-password-icon`]:{color:D,cursor:"pointer",transition:`all ${G}`,"&:hover":{color:H}}}),me(d,`${c}-affix-wrapper`))}},K=d=>{const{componentCls:c,colorError:C,colorWarning:T,borderRadiusLG:G,borderRadiusSM:D}=d;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,w.Wf)(d)),Re(d)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:G,fontSize:d.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:D}},"&-status-error":{[`${c}-group-addon`]:{color:C,borderColor:C}},"&-status-warning":{[`${c}-group-addon`]:{color:T,borderColor:T}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},ae(d))},[`&: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}}}})}},je=d=>{const{componentCls:c,antCls:C}=d,T=`${c}-search`;return{[T]:{[`${c}`]:{"&:hover, &:focus":{borderColor:d.colorPrimaryHover,[`+ ${c}-group-addon ${T}-button:not(${C}-btn-primary)`]:{borderInlineStartColor:d.colorPrimaryHover}}},[`${c}-affix-wrapper`]:{borderRadius:0},[`${c}-lg`]:{lineHeight:d.lineHeightLG-2e-4},[`> ${c}-group`]:{[`> ${c}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${T}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:d.borderRadius,borderEndEndRadius:d.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${T}-button:not(${C}-btn-primary)`]:{color:d.colorTextDescription,"&:hover":{color:d.colorPrimaryHover},"&:active":{color:d.colorPrimaryActive},[`&${C}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${T}-button`]:{height:d.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${T}-button`]:{height:d.controlHeightLG},[`&-small ${T}-button`]:{height:d.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${c}-compact-item`]:{[`&:not(${c}-compact-last-item)`]:{[`${c}-group-addon`]:{[`${c}-search-button`]:{marginInlineEnd:-d.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}}}}},Ct=d=>{const{componentCls:c,paddingLG:C}=d,T=`${c}-textarea`;return{[T]:{position:"relative","&-show-count":{[`> ${c}`]:{height:"100%"},[`${c}-data-count`]:{position:"absolute",bottom:-d.fontSize*d.lineHeight,insetInlineEnd:0,color:d.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${c}`]:{paddingInlineEnd:C}},[`&-affix-wrapper${T}-has-feedback`]:{[`${c}`]:{paddingInlineEnd:C}},[`&-affix-wrapper${c}-affix-wrapper`]:{padding:0,[`> textarea${c}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${c}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${c}-clear-icon`]:{position:"absolute",insetInlineEnd:d.paddingXS,insetBlockStart:d.paddingXS},[`${T}-suffix`]:{position:"absolute",top:0,insetInlineEnd:d.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function W(d){return(0,x.TS)(d,{inputAffixPadding:d.paddingXXS})}const j=d=>{const{controlHeight:c,fontSize:C,lineHeight:T,lineWidth:G,controlHeightSM:D,controlHeightLG:H,fontSizeLG:q,lineHeightLG:We,paddingSM:se,controlPaddingHorizontalSM:ke,controlPaddingHorizontal:Ve,colorFillAlter:Ae,colorPrimaryHover:lt,controlOutlineWidth:ot,controlOutline:Qe,colorErrorOutline:Oe,colorWarningOutline:Se}=d;return{paddingBlock:Math.max(Math.round((c-C*T)/2*10)/10-G,3),paddingBlockSM:Math.max(Math.round((D-C*T)/2*10)/10-G,0),paddingBlockLG:Math.ceil((H-q*We)/2*10)/10-G,paddingInline:se-G,paddingInlineSM:ke-G,paddingInlineLG:Ve-G,addonBg:Ae,activeBorderColor:lt,hoverBorderColor:lt,activeShadow:`0 0 0 ${ot}px ${Qe}`,errorActiveShadow:`0 0 0 ${ot}px ${Oe}`,warningActiveShadow:`0 0 0 ${ot}px ${Se}`}};le.ZP=(0,_.Z)("Input",d=>{const c=(0,x.TS)(d,W(d));return[ve(c),Ct(c),pe(c),K(c),je(c),(0,V.c)(c)]},j)},11713:function(_t,le,f){"use strict";f.d(le,{default:function(){return wo}});var w=f(94184),V=f.n(w),x=f(87462),_=f(74902),b=f(4942),O=f(1413),m=f(97685),ae=f(45987),Z=f(71002),v=f(67294);function me(h){var p=v.useRef();p.current=h;var P=v.useCallback(function(){for(var M,k=arguments.length,Q=new Array(k),ce=0;ce<k;ce++)Q[ce]=arguments[ce];return(M=p.current)===null||M===void 0?void 0:M.call.apply(M,[p].concat(Q))},[]);return P}function ie(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Re=ie()?v.useLayoutEffect:v.useEffect,ve=Re,be=function(p,P){var M=v.useRef(!0);Re(function(){if(!M.current)return p()},P),Re(function(){return M.current=!1,function(){M.current=!0}},[])};function pe(h){var p=v.useRef(!1),P=v.useState(h),M=(0,m.Z)(P,2),k=M[0],Q=M[1];v.useEffect(function(){return p.current=!1,function(){p.current=!0}},[]);function ce(Ce,Te){Te&&p.current||Q(Ce)}return[k,ce]}function K(h){return h!==void 0}function je(h,p){var P=p||{},M=P.defaultValue,k=P.value,Q=P.onChange,ce=P.postState,Ce=pe(function(){return K(k)?k:K(M)?typeof M=="function"?M():M:typeof h=="function"?h():h}),Te=(0,m.Z)(Ce,2),ee=Te[0],te=Te[1],ne=k!==void 0?k:ee,He=ce?ce(ne):ne,re=me(Q),Je=pe([ne]),Ot=(0,m.Z)(Je,2),Tt=Ot[0],Lt=Ot[1];be(function(){var It=Tt[0];ee!==It&&re(ee,It)},[Tt]),be(function(){K(k)||te(k)},[k]);var mt=me(function(It,an){te(It,an),Lt([ne],an)});return[He,mt]}var Ct={};function W(h,p){}function j(h,p){}function d(){Ct={}}function c(h,p,P){!p&&!Ct[P]&&(h(!1,P),Ct[P]=!0)}function C(h,p){c(W,h,p)}function T(h,p){c(j,h,p)}var G=C,D=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var h=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(h)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(h==null?void 0:h.substr(0,4))},H={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(p){var P=p.keyCode;if(p.altKey&&!p.ctrlKey||p.metaKey||P>=H.F1&&P<=H.F12)return!1;switch(P){case H.ALT:case H.CAPS_LOCK:case H.CONTEXT_MENU:case H.CTRL:case H.DOWN:case H.END:case H.ESC:case H.HOME:case H.INSERT:case H.LEFT:case H.MAC_FF_META:case H.META:case H.NUMLOCK:case H.NUM_CENTER:case H.PAGE_DOWN:case H.PAGE_UP:case H.PAUSE:case H.PRINT_SCREEN:case H.RIGHT:case H.SHIFT:case H.UP:case H.WIN_KEY:case H.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(p){if(p>=H.ZERO&&p<=H.NINE||p>=H.NUM_ZERO&&p<=H.NUM_MULTIPLY||p>=H.A&&p<=H.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&p===0)return!0;switch(p){case H.SPACE:case H.QUESTION_MARK:case H.NUM_PLUS:case H.NUM_MINUS:case H.NUM_PERIOD:case H.NUM_DIVISION:case H.SEMICOLON:case H.DASH:case H.EQUALS:case H.COMMA:case H.PERIOD:case H.SLASH:case H.APOSTROPHE:case H.SINGLE_QUOTE:case H.OPEN_SQUARE_BRACKET:case H.BACKSLASH:case H.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},q=H,We=f(47655);function se(h,p,P){var M=v.useRef({});return(!("value"in M.current)||P(M.current.condition,p))&&(M.current.value=h(),M.current.condition=p),M.current.value}function ke(h,p){typeof h=="function"?h(p):(0,Z.Z)(h)==="object"&&h&&"current"in h&&(h.current=p)}function Ve(){for(var h=arguments.length,p=new Array(h),P=0;P<h;P++)p[P]=arguments[P];var M=p.filter(function(k){return k});return M.length<=1?M[0]:function(k){p.forEach(function(Q){ke(Q,k)})}}function Ae(){for(var h=arguments.length,p=new Array(h),P=0;P<h;P++)p[P]=arguments[P];return se(function(){return Ve.apply(void 0,p)},p,function(M,k){return M.length===k.length&&M.every(function(Q,ce){return Q===k[ce]})})}function lt(h){var p,P,M=isMemo(h)?h.type.type:h.type;return!(typeof M=="function"&&!((p=M.prototype)!==null&&p!==void 0&&p.render)||typeof h=="function"&&!((P=h.prototype)!==null&&P!==void 0&&P.render))}var ot=function(p){var P=p.className,M=p.customizeIcon,k=p.customizeIconProps,Q=p.onMouseDown,ce=p.onClick,Ce=p.children,Te;return typeof M=="function"?Te=M(k):Te=M,v.createElement("span",{className:P,onMouseDown:function(te){te.preventDefault(),Q&&Q(te)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:ce,"aria-hidden":!0},Te!==void 0?Te:v.createElement("span",{className:V()(P.split(/\s+/).map(function(ee){return"".concat(ee,"-icon")}))},Ce))},Qe=ot;function Oe(h,p,P,M,k){var Q=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,ce=arguments.length>6?arguments[6]:void 0,Ce=arguments.length>7?arguments[7]:void 0,Te=v.useMemo(function(){if((0,Z.Z)(M)==="object")return M.clearIcon;if(k)return k},[M,k]),ee=v.useMemo(function(){return!!(!Q&&M&&(P.length||ce)&&!(Ce==="combobox"&&ce===""))},[M,Q,P.length,ce,Ce]);return{allowClear:ee,clearIcon:v.createElement(Qe,{className:"".concat(h,"-clear"),onMouseDown:p,customizeIcon:Te},"\xD7")}}var Se=v.createContext(null);function ct(){return v.useContext(Se)}function Mt(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,p=v.useState(!1),P=(0,m.Z)(p,2),M=P[0],k=P[1],Q=v.useRef(null),ce=function(){window.clearTimeout(Q.current)};v.useEffect(function(){return ce},[]);var Ce=function(ee,te){ce(),Q.current=window.setTimeout(function(){k(ee),te&&te()},h)};return[M,Ce,ce]}function Ke(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,p=v.useRef(null),P=v.useRef(null);v.useEffect(function(){return function(){window.clearTimeout(P.current)}},[]);function M(k){(k||p.current===null)&&(p.current=k),window.clearTimeout(P.current),P.current=window.setTimeout(function(){p.current=null},h)}return[function(){return p.current},M]}function tt(h,p,P,M){var k=v.useRef(null);k.current={open:p,triggerOpen:P,customizedTrigger:M},v.useEffect(function(){function Q(ce){var Ce;if(!((Ce=k.current)!==null&&Ce!==void 0&&Ce.customizedTrigger)){var Te=ce.target;Te.shadowRoot&&ce.composed&&(Te=ce.composedPath()[0]||Te),k.current.open&&h().filter(function(ee){return ee}).every(function(ee){return!ee.contains(Te)&&ee!==Te})&&k.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Q),function(){return window.removeEventListener("mousedown",Q)}},[])}var Ge=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,mn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Xn="".concat(Ge," ").concat(mn).split(/[\s\n]+/),xe="aria-",de="data-";function Fe(h,p){return h.indexOf(p)===0}function he(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P;p===!1?P={aria:!0,data:!0,attr:!0}:p===!0?P={aria:!0}:P=(0,O.Z)({},p);var M={};return Object.keys(h).forEach(function(k){(P.aria&&(k==="role"||Fe(k,xe))||P.data&&Fe(k,de)||P.attr&&Xn.includes(k))&&(M[k]=h[k])}),M}var nt=f(48555),St=f(14075),st=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Be=void 0;function gt(h,p){var P=h.prefixCls,M=h.invalidate,k=h.item,Q=h.renderItem,ce=h.responsive,Ce=h.responsiveDisabled,Te=h.registerSize,ee=h.itemKey,te=h.className,ne=h.style,He=h.children,re=h.display,Je=h.order,Ot=h.component,Tt=Ot===void 0?"div":Ot,Lt=(0,ae.Z)(h,st),mt=ce&&!re;function It(Ut){Te(ee,Ut)}v.useEffect(function(){return function(){It(null)}},[]);var an=Q&&k!==Be?Q(k):He,Xt;M||(Xt={opacity:mt?0:1,height:mt?0:Be,overflowY:mt?"hidden":Be,order:ce?Je:Be,pointerEvents:mt?"none":Be,position:mt?"absolute":Be});var yt={};mt&&(yt["aria-hidden"]=!0);var Kt=v.createElement(Tt,(0,x.Z)({className:V()(!M&&P,te),style:(0,O.Z)((0,O.Z)({},Xt),ne)},yt,Lt,{ref:p}),an);return ce&&(Kt=v.createElement(nt.Z,{onResize:function(ln){var jt=ln.offsetWidth;It(jt)},disabled:Ce},Kt)),Kt}var ht=v.forwardRef(gt);ht.displayName="Item";var Rt=ht,Zt=f(77527),xt=f(73935),at=f(96523);function Qt(h){if(typeof MessageChannel=="undefined")(0,at.Z)(h);else{var p=new MessageChannel;p.port1.onmessage=function(){return h()},p.port2.postMessage(void 0)}}function Ht(){var h=v.useRef(null),p=function(M){h.current||(h.current=[],Qt(function(){(0,xt.unstable_batchedUpdates)(function(){h.current.forEach(function(k){k()}),h.current=null})})),h.current.push(M)};return p}function zt(h,p){var P=v.useState(p),M=(0,m.Z)(P,2),k=M[0],Q=M[1],ce=(0,Zt.Z)(function(Ce){h(function(){Q(Ce)})});return[k,ce]}var er=v.createContext(null),on=["component"],Yn=["className"],ue=["className"],hn=function(p,P){var M=v.useContext(er);if(!M){var k=p.component,Q=k===void 0?"div":k,ce=(0,ae.Z)(p,on);return v.createElement(Q,(0,x.Z)({},ce,{ref:P}))}var Ce=M.className,Te=(0,ae.Z)(M,Yn),ee=p.className,te=(0,ae.Z)(p,ue);return v.createElement(er.Provider,{value:null},v.createElement(Rt,(0,x.Z)({ref:P,className:V()(Ce,ee)},Te,te)))},tn=v.forwardRef(hn);tn.displayName="RawItem";var yn=tn,bn=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Ur="responsive",rr="invalidate";function Ar(h){return"+ ".concat(h.length," ...")}function zn(h,p){var P=h.prefixCls,M=P===void 0?"rc-overflow":P,k=h.data,Q=k===void 0?[]:k,ce=h.renderItem,Ce=h.renderRawItem,Te=h.itemKey,ee=h.itemWidth,te=ee===void 0?10:ee,ne=h.ssr,He=h.style,re=h.className,Je=h.maxCount,Ot=h.renderRest,Tt=h.renderRawRest,Lt=h.suffix,mt=h.component,It=mt===void 0?"div":mt,an=h.itemComponent,Xt=h.onVisibleChange,yt=(0,ae.Z)(h,bn),Kt=ne==="full",Ut=Ht(),ln=zt(Ut,null),jt=(0,m.Z)(ln,2),en=jt[0],wn=jt[1],sn=en||0,un=zt(Ut,new Map),cn=(0,m.Z)(un,2),ut=cn[0],bt=cn[1],Nt=zt(Ut,0),Jt=(0,m.Z)(Nt,2),zr=Jt[0],Cr=Jt[1],or=zt(Ut,0),xr=(0,m.Z)(or,2),Yt=xr[0],kn=xr[1],Qr=zt(Ut,0),Pt=(0,m.Z)(Qr,2),et=Pt[0],Wt=Pt[1],En=(0,v.useState)(null),dn=(0,m.Z)(En,2),nn=dn[0],At=dn[1],Ln=(0,v.useState)(null),Jn=(0,m.Z)(Ln,2),Vn=Jn[0],sr=Jn[1],Gn=v.useMemo(function(){return Vn===null&&Kt?Number.MAX_SAFE_INTEGER:Vn||0},[Vn,en]),ar=(0,v.useState)(!1),On=(0,m.Z)(ar,2),Hn=On[0],Br=On[1],Jr="".concat(M,"-item"),qr=Math.max(zr,Yt),dr=Je===Ur,Tn=Q.length&&dr,wr=Je===rr,di=Tn||typeof Je=="number"&&Q.length>Je,Lr=(0,v.useMemo)(function(){var Ft=Q;return Tn?en===null&&Kt?Ft=Q:Ft=Q.slice(0,Math.min(Q.length,sn/te)):typeof Je=="number"&&(Ft=Q.slice(0,Je)),Ft},[Q,te,en,Je,Tn]),qn=(0,v.useMemo)(function(){return Tn?Q.slice(Gn+1):Q.slice(Lr.length)},[Q,Lr,Tn,Gn]),hr=(0,v.useCallback)(function(Ft,fe){var Ye;return typeof Te=="function"?Te(Ft):(Ye=Te&&(Ft==null?void 0:Ft[Te]))!==null&&Ye!==void 0?Ye:fe},[Te]),ei=(0,v.useCallback)(ce||function(Ft){return Ft},[ce]);function hi(Ft,fe,Ye){Vn===Ft&&(fe===void 0||fe===nn)||(sr(Ft),Ye||(Br(Ft<Q.length-1),Xt==null||Xt(Ft)),fe!==void 0&&At(fe))}function Bi(Ft,fe){wn(fe.clientWidth)}function zi(Ft,fe){bt(function(Ye){var _e=new Map(Ye);return fe===null?_e.delete(Ft):_e.set(Ft,fe),_e})}function ti(Ft,fe){kn(fe),Cr(Yt)}function vi(Ft,fe){Wt(fe)}function vr(Ft){return ut.get(hr(Lr[Ft],Ft))}(0,St.Z)(function(){if(sn&&typeof qr=="number"&&Lr){var Ft=et,fe=Lr.length,Ye=fe-1;if(!fe){hi(0,null);return}for(var _e=0;_e<fe;_e+=1){var vt=vr(_e);if(Kt&&(vt=vt||0),vt===void 0){hi(_e-1,void 0,!0);break}if(Ft+=vt,Ye===0&&Ft<=sn||_e===Ye-1&&Ft+vr(Ye)<=sn){hi(Ye,null);break}else if(Ft+qr>sn){hi(_e-1,Ft-vt-et+Yt);break}}Lt&&vr(0)+et>sn&&At(null)}},[sn,ut,Yt,et,hr,Lr]);var pr=Hn&&!!qn.length,ni={};nn!==null&&Tn&&(ni={position:"absolute",left:nn,top:0});var Tr={prefixCls:Jr,responsive:Tn,component:an,invalidate:wr},Li=Ce?function(Ft,fe){var Ye=hr(Ft,fe);return v.createElement(er.Provider,{key:Ye,value:(0,O.Z)((0,O.Z)({},Tr),{},{order:fe,item:Ft,itemKey:Ye,registerSize:zi,display:fe<=Gn})},Ce(Ft,fe))}:function(Ft,fe){var Ye=hr(Ft,fe);return v.createElement(Rt,(0,x.Z)({},Tr,{order:fe,key:Ye,item:Ft,renderItem:ei,itemKey:Ye,registerSize:zi,display:fe<=Gn}))},_i,to={order:pr?Gn:Number.MAX_SAFE_INTEGER,className:"".concat(Jr,"-rest"),registerSize:ti,display:pr};if(Tt)Tt&&(_i=v.createElement(er.Provider,{value:(0,O.Z)((0,O.Z)({},Tr),to)},Tt(qn)));else{var wi=Ot||Ar;_i=v.createElement(Rt,(0,x.Z)({},Tr,to),typeof wi=="function"?wi(qn):wi)}var Zi=v.createElement(It,(0,x.Z)({className:V()(!wr&&M,re),style:He,ref:p},yt),Lr.map(Li),di?_i:null,Lt&&v.createElement(Rt,(0,x.Z)({},Tr,{responsive:dr,responsiveDisabled:!Tn,order:Gn,className:"".concat(Jr,"-suffix"),registerSize:vi,display:!0,style:ni}),Lt));return dr&&(Zi=v.createElement(nt.Z,{onResize:Bi,disabled:!Tn},Zi)),Zi}var _n=v.forwardRef(zn);_n.displayName="Overflow",_n.Item=yn,_n.RESPONSIVE=Ur,_n.INVALIDATE=rr;var jr=_n,kr=jr,Si=function(p,P){var M,k,Q=p.prefixCls,ce=p.id,Ce=p.inputElement,Te=p.disabled,ee=p.tabIndex,te=p.autoFocus,ne=p.autoComplete,He=p.editable,re=p.activeDescendantId,Je=p.value,Ot=p.maxLength,Tt=p.onKeyDown,Lt=p.onMouseDown,mt=p.onChange,It=p.onPaste,an=p.onCompositionStart,Xt=p.onCompositionEnd,yt=p.open,Kt=p.attrs,Ut=Ce||v.createElement("input",null),ln=Ut,jt=ln.ref,en=ln.props,wn=en.onKeyDown,sn=en.onChange,un=en.onMouseDown,cn=en.onCompositionStart,ut=en.onCompositionEnd,bt=en.style;return"maxLength"in Ut.props,Ut=v.cloneElement(Ut,(0,O.Z)((0,O.Z)((0,O.Z)({type:"search"},en),{},{id:ce,ref:Ve(P,jt),disabled:Te,tabIndex:ee,autoComplete:ne||"off",autoFocus:te,className:V()("".concat(Q,"-selection-search-input"),(M=Ut)===null||M===void 0||(k=M.props)===null||k===void 0?void 0:k.className),role:"combobox","aria-label":"Search","aria-expanded":yt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ce,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ce,"_list"),"aria-activedescendant":yt?re:void 0},Kt),{},{value:He?Je:"",maxLength:Ot,readOnly:!He,unselectable:He?null:"on",style:(0,O.Z)((0,O.Z)({},bt),{},{opacity:He?null:0}),onKeyDown:function(Jt){Tt(Jt),wn&&wn(Jt)},onMouseDown:function(Jt){Lt(Jt),un&&un(Jt)},onChange:function(Jt){mt(Jt),sn&&sn(Jt)},onCompositionStart:function(Jt){an(Jt),cn&&cn(Jt)},onCompositionEnd:function(Jt){Xt(Jt),ut&&ut(Jt)},onPaste:It})),Ut},li=v.forwardRef(Si);li.displayName="Input";var Oi=li;function Vr(h){return Array.isArray(h)?h:h!==void 0?[h]:[]}var Ci=typeof window!="undefined"&&window.document&&window.document.documentElement,si=Ci;function Ni(h){return h!=null}function I(h){return!h&&h!==0}function Y(h){return["string","number"].includes((0,Z.Z)(h))}function U(h){var p=void 0;return h&&(Y(h.title)?p=h.title.toString():Y(h.label)&&(p=h.label.toString())),p}function X(h,p){si?v.useLayoutEffect(h,p):v.useEffect(h,p)}function $e(h){var p;return(p=h.key)!==null&&p!==void 0?p:h.value}var ye=function(p){p.preventDefault(),p.stopPropagation()},we=function(p){var P=p.id,M=p.prefixCls,k=p.values,Q=p.open,ce=p.searchValue,Ce=p.autoClearSearchValue,Te=p.inputRef,ee=p.placeholder,te=p.disabled,ne=p.mode,He=p.showSearch,re=p.autoFocus,Je=p.autoComplete,Ot=p.activeDescendantId,Tt=p.tabIndex,Lt=p.removeIcon,mt=p.maxTagCount,It=p.maxTagTextLength,an=p.maxTagPlaceholder,Xt=an===void 0?function(At){return"+ ".concat(At.length," ...")}:an,yt=p.tagRender,Kt=p.onToggleOpen,Ut=p.onRemove,ln=p.onInputChange,jt=p.onInputPaste,en=p.onInputKeyDown,wn=p.onInputMouseDown,sn=p.onInputCompositionStart,un=p.onInputCompositionEnd,cn=v.useRef(null),ut=(0,v.useState)(0),bt=(0,m.Z)(ut,2),Nt=bt[0],Jt=bt[1],zr=(0,v.useState)(!1),Cr=(0,m.Z)(zr,2),or=Cr[0],xr=Cr[1],Yt="".concat(M,"-selection"),kn=Q||ne==="multiple"&&Ce===!1||ne==="tags"?ce:"",Qr=ne==="tags"||ne==="multiple"&&Ce===!1||He&&(Q||or);X(function(){Jt(cn.current.scrollWidth)},[kn]);function Pt(At,Ln,Jn,Vn,sr){return v.createElement("span",{className:V()("".concat(Yt,"-item"),(0,b.Z)({},"".concat(Yt,"-item-disabled"),Jn)),title:U(At)},v.createElement("span",{className:"".concat(Yt,"-item-content")},Ln),Vn&&v.createElement(Qe,{className:"".concat(Yt,"-item-remove"),onMouseDown:ye,onClick:sr,customizeIcon:Lt},"\xD7"))}function et(At,Ln,Jn,Vn,sr){var Gn=function(On){ye(On),Kt(!Q)};return v.createElement("span",{onMouseDown:Gn},yt({label:Ln,value:At,disabled:Jn,closable:Vn,onClose:sr}))}function Wt(At){var Ln=At.disabled,Jn=At.label,Vn=At.value,sr=!te&&!Ln,Gn=Jn;if(typeof It=="number"&&(typeof Jn=="string"||typeof Jn=="number")){var ar=String(Gn);ar.length>It&&(Gn="".concat(ar.slice(0,It),"..."))}var On=function(Br){Br&&Br.stopPropagation(),Ut(At)};return typeof yt=="function"?et(Vn,Gn,Ln,sr,On):Pt(At,Gn,Ln,sr,On)}function En(At){var Ln=typeof Xt=="function"?Xt(At):Xt;return Pt({title:Ln},Ln,!1)}var dn=v.createElement("div",{className:"".concat(Yt,"-search"),style:{width:Nt},onFocus:function(){xr(!0)},onBlur:function(){xr(!1)}},v.createElement(Oi,{ref:Te,open:Q,prefixCls:M,id:P,inputElement:null,disabled:te,autoFocus:re,autoComplete:Je,editable:Qr,activeDescendantId:Ot,value:kn,onKeyDown:en,onMouseDown:wn,onChange:ln,onPaste:jt,onCompositionStart:sn,onCompositionEnd:un,tabIndex:Tt,attrs:he(p,!0)}),v.createElement("span",{ref:cn,className:"".concat(Yt,"-search-mirror"),"aria-hidden":!0},kn,"\xA0")),nn=v.createElement(kr,{prefixCls:"".concat(Yt,"-overflow"),data:k,renderItem:Wt,renderRest:En,suffix:dn,itemKey:$e,maxCount:mt});return v.createElement(v.Fragment,null,nn,!k.length&&!kn&&v.createElement("span",{className:"".concat(Yt,"-placeholder")},ee))},qe=we,wt=function(p){var P=p.inputElement,M=p.prefixCls,k=p.id,Q=p.inputRef,ce=p.disabled,Ce=p.autoFocus,Te=p.autoComplete,ee=p.activeDescendantId,te=p.mode,ne=p.open,He=p.values,re=p.placeholder,Je=p.tabIndex,Ot=p.showSearch,Tt=p.searchValue,Lt=p.activeValue,mt=p.maxLength,It=p.onInputKeyDown,an=p.onInputMouseDown,Xt=p.onInputChange,yt=p.onInputPaste,Kt=p.onInputCompositionStart,Ut=p.onInputCompositionEnd,ln=p.title,jt=v.useState(!1),en=(0,m.Z)(jt,2),wn=en[0],sn=en[1],un=te==="combobox",cn=un||Ot,ut=He[0],bt=Tt||"";un&&Lt&&!wn&&(bt=Lt),v.useEffect(function(){un&&sn(!1)},[un,Lt]);var Nt=te!=="combobox"&&!ne&&!Ot?!1:!!bt,Jt=ln===void 0?U(ut):ln,zr=function(){if(ut)return null;var or=Nt?{visibility:"hidden"}:void 0;return v.createElement("span",{className:"".concat(M,"-selection-placeholder"),style:or},re)};return v.createElement(v.Fragment,null,v.createElement("span",{className:"".concat(M,"-selection-search")},v.createElement(Oi,{ref:Q,prefixCls:M,id:k,open:ne,inputElement:P,disabled:ce,autoFocus:Ce,autoComplete:Te,editable:cn,activeDescendantId:ee,value:bt,onKeyDown:It,onMouseDown:an,onChange:function(or){sn(!0),Xt(or)},onPaste:yt,onCompositionStart:Kt,onCompositionEnd:Ut,tabIndex:Je,attrs:he(p,!0),maxLength:un?mt:void 0})),!un&&ut?v.createElement("span",{className:"".concat(M,"-selection-item"),title:Jt,style:Nt?{visibility:"hidden"}:void 0},ut.label):null,zr())},Dt=wt;function rt(h){return![q.ESC,q.SHIFT,q.BACKSPACE,q.TAB,q.WIN_KEY,q.ALT,q.META,q.WIN_KEY_RIGHT,q.CTRL,q.SEMICOLON,q.EQUALS,q.CAPS_LOCK,q.CONTEXT_MENU,q.F1,q.F2,q.F3,q.F4,q.F5,q.F6,q.F7,q.F8,q.F9,q.F10,q.F11,q.F12].includes(h)}var Ue=function(p,P){var M=(0,v.useRef)(null),k=(0,v.useRef)(!1),Q=p.prefixCls,ce=p.open,Ce=p.mode,Te=p.showSearch,ee=p.tokenWithEnter,te=p.autoClearSearchValue,ne=p.onSearch,He=p.onSearchSubmit,re=p.onToggleOpen,Je=p.onInputKeyDown,Ot=p.domRef;v.useImperativeHandle(P,function(){return{focus:function(){M.current.focus()},blur:function(){M.current.blur()}}});var Tt=Ke(0),Lt=(0,m.Z)(Tt,2),mt=Lt[0],It=Lt[1],an=function(bt){var Nt=bt.which;(Nt===q.UP||Nt===q.DOWN)&&bt.preventDefault(),Je&&Je(bt),Nt===q.ENTER&&Ce==="tags"&&!k.current&&!ce&&(He==null||He(bt.target.value)),rt(Nt)&&re(!0)},Xt=function(){It(!0)},yt=(0,v.useRef)(null),Kt=function(bt){ne(bt,!0,k.current)!==!1&&re(!0)},Ut=function(){k.current=!0},ln=function(bt){k.current=!1,Ce!=="combobox"&&Kt(bt.target.value)},jt=function(bt){var Nt=bt.target.value;if(ee&&yt.current&&/[\r\n]/.test(yt.current)){var Jt=yt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Nt=Nt.replace(Jt,yt.current)}yt.current=null,Kt(Nt)},en=function(bt){var Nt=bt.clipboardData,Jt=Nt.getData("text");yt.current=Jt},wn=function(bt){var Nt=bt.target;if(Nt!==M.current){var Jt=document.body.style.msTouchAction!==void 0;Jt?setTimeout(function(){M.current.focus()}):M.current.focus()}},sn=function(bt){var Nt=mt();bt.target!==M.current&&!Nt&&Ce!=="combobox"&&bt.preventDefault(),(Ce!=="combobox"&&(!Te||!Nt)||!ce)&&(ce&&te!==!1&&ne("",!0,!1),re())},un={inputRef:M,onInputKeyDown:an,onInputMouseDown:Xt,onInputChange:jt,onInputPaste:en,onInputCompositionStart:Ut,onInputCompositionEnd:ln},cn=Ce==="multiple"||Ce==="tags"?v.createElement(qe,(0,x.Z)({},p,un)):v.createElement(Dt,(0,x.Z)({},p,un));return v.createElement("div",{ref:Ot,className:"".concat(Q,"-selector"),onClick:wn,onMouseDown:sn},cn)},y=v.forwardRef(Ue);y.displayName="Selector";var L=y,A=f(62709),N=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],$=function(p){var P=p===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:P,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:P,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:P,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:P,adjustY:1},htmlRegion:"scroll"}}},F=function(p,P){var M=p.prefixCls,k=p.disabled,Q=p.visible,ce=p.children,Ce=p.popupElement,Te=p.animation,ee=p.transitionName,te=p.dropdownStyle,ne=p.dropdownClassName,He=p.direction,re=He===void 0?"ltr":He,Je=p.placement,Ot=p.builtinPlacements,Tt=p.dropdownMatchSelectWidth,Lt=p.dropdownRender,mt=p.dropdownAlign,It=p.getPopupContainer,an=p.empty,Xt=p.getTriggerDOMNode,yt=p.onPopupVisibleChange,Kt=p.onPopupMouseEnter,Ut=(0,ae.Z)(p,N),ln="".concat(M,"-dropdown"),jt=Ce;Lt&&(jt=Lt(Ce));var en=v.useMemo(function(){return Ot||$(Tt)},[Ot,Tt]),wn=Te?"".concat(ln,"-").concat(Te):ee,sn=typeof Tt=="number",un=v.useMemo(function(){return sn?null:Tt===!1?"minWidth":"width"},[Tt,sn]),cn=te;sn&&(cn=(0,O.Z)((0,O.Z)({},cn),{},{width:Tt}));var ut=v.useRef(null);return v.useImperativeHandle(P,function(){return{getPopupElement:function(){return ut.current}}}),v.createElement(A.Z,(0,x.Z)({},Ut,{showAction:yt?["click"]:[],hideAction:yt?["click"]:[],popupPlacement:Je||(re==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:en,prefixCls:ln,popupTransitionName:wn,popup:v.createElement("div",{ref:ut,onMouseEnter:Kt},jt),stretch:un,popupAlign:mt,popupVisible:Q,getPopupContainer:It,popupClassName:V()(ne,(0,b.Z)({},"".concat(ln,"-empty"),an)),popupStyle:cn,getTriggerDOMNode:Xt,onPopupVisibleChange:yt}),ce)},De=v.forwardRef(F);De.displayName="SelectTrigger";var ft=De,Xe=f(84506);function ge(h,p){var P=h.key,M;return"value"in h&&(M=h.value),P!=null?P:M!==void 0?M:"rc-index-key-".concat(p)}function Ie(h,p){var P=h||{},M=P.label,k=P.value,Q=P.options,ce=P.groupLabel,Ce=M||(p?"children":"label");return{label:Ce,value:k||"value",options:Q||"options",groupLabel:ce||Ce}}function Le(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=p.fieldNames,M=p.childrenAsData,k=[],Q=Ie(P,!1),ce=Q.label,Ce=Q.value,Te=Q.options,ee=Q.groupLabel;function te(ne,He){ne.forEach(function(re){if(He||!(Te in re)){var Je=re[Ce];k.push({key:ge(re,k.length),groupOption:He,data:re,label:re[ce],value:Je})}else{var Ot=re[ee];Ot===void 0&&M&&(Ot=re.label),k.push({key:ge(re,k.length),group:!0,data:re,label:Ot}),te(re[Te],!0)}})}return te(h,!1),k}function $t(h){var p=(0,O.Z)({},h);return"props"in p||Object.defineProperty(p,"props",{get:function(){return G(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),p}}),p}function z(h,p){if(!p||!p.length)return null;var P=!1;function M(Q,ce){var Ce=(0,Xe.Z)(ce),Te=Ce[0],ee=Ce.slice(1);if(!Te)return[Q];var te=Q.split(Te);return P=P||te.length>1,te.reduce(function(ne,He){return[].concat((0,_.Z)(ne),(0,_.Z)(M(He,ee)))},[]).filter(function(ne){return ne})}var k=M(h,p);return P?k: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"],Vt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function vn(h){return h==="tags"||h==="multiple"}var Et=v.forwardRef(function(h,p){var P,M,k=h.id,Q=h.prefixCls,ce=h.className,Ce=h.showSearch,Te=h.tagRender,ee=h.direction,te=h.omitDomProps,ne=h.displayValues,He=h.onDisplayValuesChange,re=h.emptyOptions,Je=h.notFoundContent,Ot=Je===void 0?"Not Found":Je,Tt=h.onClear,Lt=h.mode,mt=h.disabled,It=h.loading,an=h.getInputElement,Xt=h.getRawInputElement,yt=h.open,Kt=h.defaultOpen,Ut=h.onDropdownVisibleChange,ln=h.activeValue,jt=h.onActiveValueChange,en=h.activeDescendantId,wn=h.searchValue,sn=h.autoClearSearchValue,un=h.onSearch,cn=h.onSearchSplit,ut=h.tokenSeparators,bt=h.allowClear,Nt=h.suffixIcon,Jt=h.clearIcon,zr=h.OptionList,Cr=h.animation,or=h.transitionName,xr=h.dropdownStyle,Yt=h.dropdownClassName,kn=h.dropdownMatchSelectWidth,Qr=h.dropdownRender,Pt=h.dropdownAlign,et=h.placement,Wt=h.builtinPlacements,En=h.getPopupContainer,dn=h.showAction,nn=dn===void 0?[]:dn,At=h.onFocus,Ln=h.onBlur,Jn=h.onKeyUp,Vn=h.onKeyDown,sr=h.onMouseDown,Gn=(0,ae.Z)(h,Ne),ar=vn(Lt),On=(Ce!==void 0?Ce:ar)||Lt==="combobox",Hn=(0,O.Z)({},Gn);Vt.forEach(function(rn){delete Hn[rn]}),te==null||te.forEach(function(rn){delete Hn[rn]});var Br=v.useState(!1),Jr=(0,m.Z)(Br,2),qr=Jr[0],dr=Jr[1];v.useEffect(function(){dr(D())},[]);var Tn=v.useRef(null),wr=v.useRef(null),di=v.useRef(null),Lr=v.useRef(null),qn=v.useRef(null),hr=Mt(),ei=(0,m.Z)(hr,3),hi=ei[0],Bi=ei[1],zi=ei[2];v.useImperativeHandle(p,function(){var rn,Bt;return{focus:(rn=Lr.current)===null||rn===void 0?void 0:rn.focus,blur:(Bt=Lr.current)===null||Bt===void 0?void 0:Bt.blur,scrollTo:function(oi){var gn;return(gn=qn.current)===null||gn===void 0?void 0:gn.scrollTo(oi)}}});var ti=v.useMemo(function(){var rn;if(Lt!=="combobox")return wn;var Bt=(rn=ne[0])===null||rn===void 0?void 0:rn.value;return typeof Bt=="string"||typeof Bt=="number"?String(Bt):""},[wn,Lt,ne]),vi=Lt==="combobox"&&typeof an=="function"&&an()||null,vr=typeof Xt=="function"&&Xt(),pr=Ae(wr,vr==null||(P=vr.props)===null||P===void 0?void 0:P.ref),ni=v.useState(!1),Tr=(0,m.Z)(ni,2),Li=Tr[0],_i=Tr[1];ve(function(){_i(!0)},[]);var to=je(!1,{defaultValue:Kt,value:yt}),wi=(0,m.Z)(to,2),Zi=wi[0],Ft=wi[1],fe=Li?Zi:!1,Ye=!Ot&&re;(mt||Ye&&fe&&Lt==="combobox")&&(fe=!1);var _e=Ye?!1:fe,vt=v.useCallback(function(rn){var Bt=rn!==void 0?rn:!fe;mt||(Ft(Bt),fe!==Bt&&(Ut==null||Ut(Bt)))},[mt,fe,Ft,Ut]),Fn=v.useMemo(function(){return(ut||[]).some(function(rn){return[`
`,`\r
`].includes(rn)})},[ut]),$n=function(Bt,Hr,oi){var gn=!0,Mn=Bt;jt==null||jt(null);var Wn=oi?null:z(Bt,ut);return Lt!=="combobox"&&Wn&&(Mn="",cn==null||cn(Wn),vt(!1),gn=!1),un&&ti!==Mn&&un(Mn,{source:Hr?"typing":"effect"}),gn},ri=function(Bt){!Bt||!Bt.trim()||un(Bt,{source:"submit"})};v.useEffect(function(){!fe&&!ar&&Lt!=="combobox"&&$n("",!1,!1)},[fe]),v.useEffect(function(){Zi&&mt&&Ft(!1),mt&&Bi(!1)},[mt]);var pi=Ke(),Ki=(0,m.Z)(pi,2),gr=Ki[0],Qi=Ki[1],Do=function(Bt){var Hr=gr(),oi=Bt.which;if(oi===q.ENTER&&(Lt!=="combobox"&&Bt.preventDefault(),fe||vt(!0)),Qi(!!ti),oi===q.BACKSPACE&&!Hr&&ar&&!ti&&ne.length){for(var gn=(0,_.Z)(ne),Mn=null,Wn=gn.length-1;Wn>=0;Wn-=1){var tr=gn[Wn];if(!tr.disabled){gn.splice(Wn,1),Mn=tr;break}}Mn&&He(gn,{type:"remove",values:[Mn]})}for(var Ei=arguments.length,vo=new Array(Ei>1?Ei-1:0),Ti=1;Ti<Ei;Ti++)vo[Ti-1]=arguments[Ti];if(fe&&qn.current){var ga;(ga=qn.current).onKeyDown.apply(ga,[Bt].concat(vo))}Vn==null||Vn.apply(void 0,[Bt].concat(vo))},Go=function(Bt){for(var Hr=arguments.length,oi=new Array(Hr>1?Hr-1:0),gn=1;gn<Hr;gn++)oi[gn-1]=arguments[gn];if(fe&&qn.current){var Mn;(Mn=qn.current).onKeyUp.apply(Mn,[Bt].concat(oi))}Jn==null||Jn.apply(void 0,[Bt].concat(oi))},No=function(Bt){var Hr=ne.filter(function(oi){return oi!==Bt});He(Hr,{type:"remove",values:[Bt]})},Ui=v.useRef(!1),ii=function(){Bi(!0),mt||(At&&!Ui.current&&At.apply(void 0,arguments),nn.includes("focus")&&vt(!0)),Ui.current=!0},Eo=function(){Bi(!1,function(){Ui.current=!1,vt(!1)}),!mt&&(ti&&(Lt==="tags"?un(ti,{source:"submit"}):Lt==="multiple"&&un("",{source:"blur"})),Ln&&Ln.apply(void 0,arguments))},co=[];v.useEffect(function(){return function(){co.forEach(function(rn){return clearTimeout(rn)}),co.splice(0,co.length)}},[]);var Ao=function(Bt){var Hr,oi=Bt.target,gn=(Hr=di.current)===null||Hr===void 0?void 0:Hr.getPopupElement();if(gn&&gn.contains(oi)){var Mn=setTimeout(function(){var vo=co.indexOf(Mn);if(vo!==-1&&co.splice(vo,1),zi(),!qr&&!gn.contains(document.activeElement)){var Ti;(Ti=Lr.current)===null||Ti===void 0||Ti.focus()}});co.push(Mn)}for(var Wn=arguments.length,tr=new Array(Wn>1?Wn-1:0),Ei=1;Ei<Wn;Ei++)tr[Ei-1]=arguments[Ei];sr==null||sr.apply(void 0,[Bt].concat(tr))},fa=v.useState({}),Mo=(0,m.Z)(fa,2),da=Mo[1];function no(){da({})}var fo;vr&&(fo=function(Bt){vt(Bt)}),tt(function(){var rn;return[Tn.current,(rn=di.current)===null||rn===void 0?void 0:rn.getPopupElement()]},_e,vt,!!vr);var ro=v.useMemo(function(){return(0,O.Z)((0,O.Z)({},h),{},{notFoundContent:Ot,open:fe,triggerOpen:_e,id:k,showSearch:On,multiple:ar,toggleOpen:vt})},[h,Ot,_e,fe,k,On,ar,vt]),ho=!!Nt||It,io;ho&&(io=v.createElement(Qe,{className:V()("".concat(Q,"-arrow"),(0,b.Z)({},"".concat(Q,"-arrow-loading"),It)),customizeIcon:Nt,customizeIconProps:{loading:It,searchValue:ti,open:fe,focused:hi,showSearch:On}}));var ha=function(){var Bt;Tt==null||Tt(),(Bt=Lr.current)===null||Bt===void 0||Bt.focus(),He([],{type:"clear",values:ne}),$n("",!1,!1)},Xo=Oe(Q,ha,ne,bt,Jt,mt,ti,Lt),va=Xo.allowClear,Pa=Xo.clearIcon,oo=v.createElement(zr,{ref:qn}),ao=V()(Q,ce,(M={},(0,b.Z)(M,"".concat(Q,"-focused"),hi),(0,b.Z)(M,"".concat(Q,"-multiple"),ar),(0,b.Z)(M,"".concat(Q,"-single"),!ar),(0,b.Z)(M,"".concat(Q,"-allow-clear"),bt),(0,b.Z)(M,"".concat(Q,"-show-arrow"),ho),(0,b.Z)(M,"".concat(Q,"-disabled"),mt),(0,b.Z)(M,"".concat(Q,"-loading"),It),(0,b.Z)(M,"".concat(Q,"-open"),fe),(0,b.Z)(M,"".concat(Q,"-customize-input"),vi),(0,b.Z)(M,"".concat(Q,"-show-search"),On),M)),pa=v.createElement(ft,{ref:di,disabled:mt,prefixCls:Q,visible:_e,popupElement:oo,animation:Cr,transitionName:or,dropdownStyle:xr,dropdownClassName:Yt,direction:ee,dropdownMatchSelectWidth:kn,dropdownRender:Qr,dropdownAlign:Pt,placement:et,builtinPlacements:Wt,getPopupContainer:En,empty:re,getTriggerDOMNode:function(){return wr.current},onPopupVisibleChange:fo,onPopupMouseEnter:no},vr?v.cloneElement(vr,{ref:pr}):v.createElement(L,(0,x.Z)({},h,{domRef:wr,prefixCls:Q,inputElement:vi,ref:Lr,id:k,showSearch:On,autoClearSearchValue:sn,mode:Lt,activeDescendantId:en,tagRender:Te,values:ne,open:fe,onToggleOpen:vt,activeValue:ln,searchValue:ti,onSearch:$n,onSearchSubmit:ri,onRemove:No,tokenWithEnter:Fn}))),Yo;return vr?Yo=pa:Yo=v.createElement("div",(0,x.Z)({className:ao},Hn,{ref:Tn,onMouseDown:Ao,onKeyDown:Do,onKeyUp:Go,onFocus:ii,onBlur:Eo}),hi&&!fe&&v.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(ne.map(function(rn){var Bt=rn.label,Hr=rn.value;return["number","string"].includes((0,Z.Z)(Bt))?Bt:Hr}).join(", "))),pa,io,va&&Pa),v.createElement(Se.Provider,{value:ro},Yo)}),dt=Et,Sn=function(h,p){var P=v.useRef({values:new Map,options:new Map}),M=v.useMemo(function(){var Q=P.current,ce=Q.values,Ce=Q.options,Te=h.map(function(ne){if(ne.label===void 0){var He;return(0,O.Z)((0,O.Z)({},ne),{},{label:(He=ce.get(ne.value))===null||He===void 0?void 0:He.label})}return ne}),ee=new Map,te=new Map;return Te.forEach(function(ne){ee.set(ne.value,ne),te.set(ne.value,p.get(ne.value)||Ce.get(ne.value))}),P.current.values=ee,P.current.options=te,Te},[h,p]),k=v.useCallback(function(Q){return p.get(Q)||P.current.options.get(Q)},[p]);return[M,k]};function Pe(h,p){return Vr(h).join("").toUpperCase().includes(p)}var qt=function(h,p,P,M,k){return v.useMemo(function(){if(!P||M===!1)return h;var Q=p.options,ce=p.label,Ce=p.value,Te=[],ee=typeof M=="function",te=P.toUpperCase(),ne=ee?M:function(re,Je){return k?Pe(Je[k],te):Je[Q]?Pe(Je[ce!=="children"?ce:"label"],te):Pe(Je[Ce],te)},He=ee?function(re){return $t(re)}:function(re){return re};return h.forEach(function(re){if(re[Q]){var Je=ne(P,He(re));if(Je)Te.push(re);else{var Ot=re[Q].filter(function(Tt){return ne(P,He(Tt))});Ot.length&&Te.push((0,O.Z)((0,O.Z)({},re),{},(0,b.Z)({},Q,Ot)))}return}ne(P,He(re))&&Te.push(re)}),Te},[h,M,k,P,p])},Gt=0,xn=ie();function fn(){var h;return xn?(h=Gt,Gt+=1):h="TEST_OR_SSR",h}function yr(h){var p=v.useState(),P=(0,m.Z)(p,2),M=P[0],k=P[1];return v.useEffect(function(){k("rc_select_".concat(fn()))},[]),h||M}function Zn(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=[];return v.Children.forEach(h,function(M){M==null&&!p.keepEmpty||(Array.isArray(M)?P=P.concat(Zn(M)):(0,We.isFragment)(M)&&M.props?P=P.concat(Zn(M.props.children,p)):P.push(M))}),P}var Nn=["children","value"],Or=["children"];function Ir(h){var p=h,P=p.key,M=p.props,k=M.children,Q=M.value,ce=(0,ae.Z)(M,Nn);return(0,O.Z)({key:P,value:Q!==void 0?Q:P,children:k},ce)}function Rn(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Zn(h).map(function(P,M){if(!v.isValidElement(P)||!P.type)return null;var k=P,Q=k.type.isSelectOptGroup,ce=k.key,Ce=k.props,Te=Ce.children,ee=(0,ae.Z)(Ce,Or);return p||!Q?Ir(P):(0,O.Z)((0,O.Z)({key:"__RC_SELECT_GRP__".concat(ce===null?M:ce,"__"),label:ce},ee),{},{options:Rn(Te)})}).filter(function(P){return P})}function br(h,p,P,M,k){return v.useMemo(function(){var Q=h,ce=!h;ce&&(Q=Rn(p));var Ce=new Map,Te=new Map,ee=function(He,re,Je){Je&&typeof Je=="string"&&He.set(re[Je],re)};function te(ne){for(var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,re=0;re<ne.length;re+=1){var Je=ne[re];!Je[P.options]||He?(Ce.set(Je[P.value],Je),ee(Te,Je,P.label),ee(Te,Je,M),ee(Te,Je,k)):te(Je[P.options],!0)}}return te(Q),{options:Q,valueOptions:Ce,labelOptions:Te}},[h,p,P,M,k])}function cr(h){var p=v.useRef();p.current=h;var P=v.useCallback(function(){return p.current.apply(p,arguments)},[]);return P}var Sr=function(){return null};Sr.isSelectOptGroup=!0;var Cn=Sr,ir=function(){return null};ir.isSelectOption=!0;var Kn=ir;function Un(h,p){var P=(0,O.Z)({},h);return Array.isArray(p)&&p.forEach(function(M){delete P[M]}),P}var Qn=f(73299),fr=v.createContext(null),pn=fr;function An(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var jn=["disabled","title","children","style","className"];function Rr(h){return typeof h=="string"||typeof h=="number"}var ui=function(p,P){var M=ct(),k=M.prefixCls,Q=M.id,ce=M.open,Ce=M.multiple,Te=M.mode,ee=M.searchValue,te=M.toggleOpen,ne=M.notFoundContent,He=M.onPopupScroll,re=v.useContext(pn),Je=re.flattenOptions,Ot=re.onActiveValue,Tt=re.defaultActiveFirstOption,Lt=re.onSelect,mt=re.menuItemSelectedIcon,It=re.rawValues,an=re.fieldNames,Xt=re.virtual,yt=re.direction,Kt=re.listHeight,Ut=re.listItemHeight,ln="".concat(k,"-item"),jt=se(function(){return Je},[ce,Je],function(Pt,et){return et[0]&&Pt[1]!==et[1]}),en=v.useRef(null),wn=function(et){et.preventDefault()},sn=function(et){en.current&&en.current.scrollTo(typeof et=="number"?{index:et}:et)},un=function(et){for(var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,En=jt.length,dn=0;dn<En;dn+=1){var nn=(et+dn*Wt+En)%En,At=jt[nn],Ln=At.group,Jn=At.data;if(!Ln&&!Jn.disabled)return nn}return-1},cn=v.useState(function(){return un(0)}),ut=(0,m.Z)(cn,2),bt=ut[0],Nt=ut[1],Jt=function(et){var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Nt(et);var En={source:Wt?"keyboard":"mouse"},dn=jt[et];if(!dn){Ot(null,-1,En);return}Ot(dn.value,et,En)};(0,v.useEffect)(function(){Jt(Tt!==!1?un(0):-1)},[jt.length,ee]);var zr=v.useCallback(function(Pt){return It.has(Pt)&&Te!=="combobox"},[Te,(0,_.Z)(It).toString(),It.size]);(0,v.useEffect)(function(){var Pt=setTimeout(function(){if(!Ce&&ce&&It.size===1){var Wt=Array.from(It)[0],En=jt.findIndex(function(dn){var nn=dn.data;return nn.value===Wt});En!==-1&&(Jt(En),sn(En))}});if(ce){var et;(et=en.current)===null||et===void 0||et.scrollTo(void 0)}return function(){return clearTimeout(Pt)}},[ce,ee,Je.length]);var Cr=function(et){et!==void 0&&Lt(et,{selected:!It.has(et)}),Ce||te(!1)};if(v.useImperativeHandle(P,function(){return{onKeyDown:function(et){var Wt=et.which,En=et.ctrlKey;switch(Wt){case q.N:case q.P:case q.UP:case q.DOWN:{var dn=0;if(Wt===q.UP?dn=-1:Wt===q.DOWN?dn=1:An()&&En&&(Wt===q.N?dn=1:Wt===q.P&&(dn=-1)),dn!==0){var nn=un(bt+dn,dn);sn(nn),Jt(nn,!0)}break}case q.ENTER:{var At=jt[bt];At&&!At.data.disabled?Cr(At.value):Cr(void 0),ce&&et.preventDefault();break}case q.ESC:te(!1),ce&&et.stopPropagation()}},onKeyUp:function(){},scrollTo:function(et){sn(et)}}}),jt.length===0)return v.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),className:"".concat(ln,"-empty"),onMouseDown:wn},ne);var or=Object.keys(an).map(function(Pt){return an[Pt]}),xr=function(et){return et.label};function Yt(Pt,et){var Wt=Pt.group;return{role:Wt?"presentation":"option",id:"".concat(Q,"_list_").concat(et)}}var kn=function(et){var Wt=jt[et];if(!Wt)return null;var En=Wt.data||{},dn=En.value,nn=Wt.group,At=he(En,!0),Ln=xr(Wt);return Wt?v.createElement("div",(0,x.Z)({"aria-label":typeof Ln=="string"&&!nn?Ln:null},At,{key:et},Yt(Wt,et),{"aria-selected":zr(dn)}),dn):null},Qr={role:"listbox",id:"".concat(Q,"_list")};return v.createElement(v.Fragment,null,Xt&&v.createElement("div",(0,x.Z)({},Qr,{style:{height:0,width:0,overflow:"hidden"}}),kn(bt-1),kn(bt),kn(bt+1)),v.createElement(Qn.Z,{itemKey:"key",ref:en,data:jt,height:Kt,itemHeight:Ut,fullHeight:!1,onMouseDown:wn,onScroll:He,virtual:Xt,direction:yt,innerProps:Xt?null:Qr},function(Pt,et){var Wt,En=Pt.group,dn=Pt.groupOption,nn=Pt.data,At=Pt.label,Ln=Pt.value,Jn=nn.key;if(En){var Vn,sr=(Vn=nn.title)!==null&&Vn!==void 0?Vn:Rr(At)?At.toString():void 0;return v.createElement("div",{className:V()(ln,"".concat(ln,"-group")),title:sr},At!==void 0?At:Jn)}var Gn=nn.disabled,ar=nn.title,On=nn.children,Hn=nn.style,Br=nn.className,Jr=(0,ae.Z)(nn,jn),qr=Un(Jr,or),dr=zr(Ln),Tn="".concat(ln,"-option"),wr=V()(ln,Tn,Br,(Wt={},(0,b.Z)(Wt,"".concat(Tn,"-grouped"),dn),(0,b.Z)(Wt,"".concat(Tn,"-active"),bt===et&&!Gn),(0,b.Z)(Wt,"".concat(Tn,"-disabled"),Gn),(0,b.Z)(Wt,"".concat(Tn,"-selected"),dr),Wt)),di=xr(Pt),Lr=!mt||typeof mt=="function"||dr,qn=typeof di=="number"?di:di||Ln,hr=Rr(qn)?qn.toString():void 0;return ar!==void 0&&(hr=ar),v.createElement("div",(0,x.Z)({},he(qr),Xt?{}:Yt(Pt,et),{"aria-selected":dr,className:wr,title:hr,onMouseMove:function(){bt===et||Gn||Jt(et)},onClick:function(){Gn||Cr(Ln)},style:Hn}),v.createElement("div",{className:"".concat(Tn,"-content")},qn),v.isValidElement(mt)||dr,Lr&&v.createElement(Qe,{className:"".concat(ln,"-option-state"),customizeIcon:mt,customizeIconProps:{isSelected:dr}},dr?"\u2713":null))}))},Gr=v.forwardRef(ui);Gr.displayName="OptionList";var Xr=Gr;function ci(h){var p=h.mode,P=h.options,M=h.children,k=h.backfill,Q=h.allowClear,ce=h.placeholder,Ce=h.getInputElement,Te=h.showSearch,ee=h.onSearch,te=h.defaultOpen,ne=h.autoFocus,He=h.labelInValue,re=h.value,Je=h.inputValue,Ot=h.optionLabelProp,Tt=isMultiple(p),Lt=Te!==void 0?Te:Tt||p==="combobox",mt=P||convertChildrenToData(M);if(warning(p!=="tags"||mt.every(function(yt){return!yt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),p==="tags"||p==="combobox"){var It=mt.some(function(yt){return yt.options?yt.options.some(function(Kt){return typeof("value"in Kt?Kt.value:Kt.key)=="number"}):typeof("value"in yt?yt.value:yt.key)=="number"});warning(!It,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(p!=="combobox"||!Ot,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(p==="combobox"||!k,"`backfill` only works with `combobox` mode."),warning(p==="combobox"||!Ce,"`getInputElement` only work with `combobox` mode."),noteOnce(p!=="combobox"||!Ce||!Q||!ce,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ee&&!Lt&&p!=="combobox"&&p!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!te||ne,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),re!=null){var an=toArray(re);warning(!He||an.every(function(yt){return _typeof(yt)==="object"&&("key"in yt||"value"in yt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Tt||Array.isArray(re),"`value` should be array when `mode` is `multiple` or `tags`")}if(M){var Xt=null;toNodeArray(M).some(function(yt){if(!React.isValidElement(yt)||!yt.type)return!1;var Kt=yt,Ut=Kt.type;if(Ut.isSelectOption)return!1;if(Ut.isSelectOptGroup){var ln=toNodeArray(yt.props.children).every(function(jt){return!React.isValidElement(jt)||!yt.type||jt.type.isSelectOption?!0:(Xt=jt.type,!1)});return!ln}return Xt=Ut,!0}),Xt&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Xt.displayName||Xt.name||Xt,"`.")),warning(Je===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Pn(h,p){if(h){var P=function M(k){for(var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ce=0;ce<k.length;ce++){var Ce=k[ce];if(Ce[p==null?void 0:p.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Q&&Array.isArray(Ce[p==null?void 0:p.options])&&M(Ce[p==null?void 0:p.options],!0))break}};P(h)}}var Yr=null,Fr=["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"],$r=["inputValue"];function Ai(h){return!h||(0,Z.Z)(h)!=="object"}var Hi=v.forwardRef(function(h,p){var P=h.id,M=h.mode,k=h.prefixCls,Q=k===void 0?"rc-select":k,ce=h.backfill,Ce=h.fieldNames,Te=h.inputValue,ee=h.searchValue,te=h.onSearch,ne=h.autoClearSearchValue,He=ne===void 0?!0:ne,re=h.onSelect,Je=h.onDeselect,Ot=h.dropdownMatchSelectWidth,Tt=Ot===void 0?!0:Ot,Lt=h.filterOption,mt=h.filterSort,It=h.optionFilterProp,an=h.optionLabelProp,Xt=h.options,yt=h.children,Kt=h.defaultActiveFirstOption,Ut=h.menuItemSelectedIcon,ln=h.virtual,jt=h.direction,en=h.listHeight,wn=en===void 0?200:en,sn=h.listItemHeight,un=sn===void 0?20:sn,cn=h.value,ut=h.defaultValue,bt=h.labelInValue,Nt=h.onChange,Jt=(0,ae.Z)(h,Fr),zr=yr(P),Cr=vn(M),or=!!(!Xt&&yt),xr=v.useMemo(function(){return Lt===void 0&&M==="combobox"?!1:Lt},[Lt,M]),Yt=v.useMemo(function(){return Ie(Ce,or)},[JSON.stringify(Ce),or]),kn=je("",{value:ee!==void 0?ee:Te,postState:function(Ye){return Ye||""}}),Qr=(0,m.Z)(kn,2),Pt=Qr[0],et=Qr[1],Wt=br(Xt,yt,Yt,It,an),En=Wt.valueOptions,dn=Wt.labelOptions,nn=Wt.options,At=v.useCallback(function(fe){var Ye=Vr(fe);return Ye.map(function(_e){var vt,Fn,$n,ri,pi;if(Ai(_e))vt=_e;else{var Ki;$n=_e.key,Fn=_e.label,vt=(Ki=_e.value)!==null&&Ki!==void 0?Ki:$n}var gr=En.get(vt);if(gr){var Qi;if(Fn===void 0&&(Fn=gr==null?void 0:gr[an||Yt.label]),$n===void 0&&($n=(Qi=gr==null?void 0:gr.key)!==null&&Qi!==void 0?Qi:vt),ri=gr==null?void 0:gr.disabled,pi=gr==null?void 0:gr.title,0)var Do}return{label:Fn,value:vt,key:$n,disabled:ri,title:pi}})},[Yt,an,En]),Ln=je(ut,{value:cn}),Jn=(0,m.Z)(Ln,2),Vn=Jn[0],sr=Jn[1],Gn=v.useMemo(function(){var fe,Ye=At(Vn);return M==="combobox"&&I((fe=Ye[0])===null||fe===void 0?void 0:fe.value)?[]:Ye},[Vn,At,M]),ar=Sn(Gn,En),On=(0,m.Z)(ar,2),Hn=On[0],Br=On[1],Jr=v.useMemo(function(){if(!M&&Hn.length===1){var fe=Hn[0];if(fe.value===null&&(fe.label===null||fe.label===void 0))return[]}return Hn.map(function(Ye){var _e;return(0,O.Z)((0,O.Z)({},Ye),{},{label:(_e=Ye.label)!==null&&_e!==void 0?_e:Ye.value})})},[M,Hn]),qr=v.useMemo(function(){return new Set(Hn.map(function(fe){return fe.value}))},[Hn]);v.useEffect(function(){if(M==="combobox"){var fe,Ye=(fe=Hn[0])===null||fe===void 0?void 0:fe.value;et(Ni(Ye)?String(Ye):"")}},[Hn]);var dr=cr(function(fe,Ye){var _e,vt=Ye!=null?Ye:fe;return _e={},(0,b.Z)(_e,Yt.value,fe),(0,b.Z)(_e,Yt.label,vt),_e}),Tn=v.useMemo(function(){if(M!=="tags")return nn;var fe=(0,_.Z)(nn),Ye=function(vt){return En.has(vt)};return(0,_.Z)(Hn).sort(function(_e,vt){return _e.value<vt.value?-1:1}).forEach(function(_e){var vt=_e.value;Ye(vt)||fe.push(dr(vt,_e.label))}),fe},[dr,nn,En,Hn,M]),wr=qt(Tn,Yt,Pt,xr,It),di=v.useMemo(function(){return M!=="tags"||!Pt||wr.some(function(fe){return fe[It||"value"]===Pt})||wr.some(function(fe){return fe[Yt.value]===Pt})?wr:[dr(Pt)].concat((0,_.Z)(wr))},[dr,It,M,wr,Pt,Yt]),Lr=v.useMemo(function(){return mt?(0,_.Z)(di).sort(function(fe,Ye){return mt(fe,Ye)}):di},[di,mt]),qn=v.useMemo(function(){return Le(Lr,{fieldNames:Yt,childrenAsData:or})},[Lr,Yt,or]),hr=function(Ye){var _e=At(Ye);if(sr(_e),Nt&&(_e.length!==Hn.length||_e.some(function($n,ri){var pi;return((pi=Hn[ri])===null||pi===void 0?void 0:pi.value)!==($n==null?void 0:$n.value)}))){var vt=bt?_e:_e.map(function($n){return $n.value}),Fn=_e.map(function($n){return $t(Br($n.value))});Nt(Cr?vt:vt[0],Cr?Fn:Fn[0])}},ei=v.useState(null),hi=(0,m.Z)(ei,2),Bi=hi[0],zi=hi[1],ti=v.useState(0),vi=(0,m.Z)(ti,2),vr=vi[0],pr=vi[1],ni=Kt!==void 0?Kt:M!=="combobox",Tr=v.useCallback(function(fe,Ye){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},vt=_e.source,Fn=vt===void 0?"keyboard":vt;pr(Ye),ce&&M==="combobox"&&fe!==null&&Fn==="keyboard"&&zi(String(fe))},[ce,M]),Li=function(Ye,_e,vt){var Fn=function(){var Ui,ii=Br(Ye);return[bt?{label:ii==null?void 0:ii[Yt.label],value:Ye,key:(Ui=ii==null?void 0:ii.key)!==null&&Ui!==void 0?Ui:Ye}:Ye,$t(ii)]};if(_e&&re){var $n=Fn(),ri=(0,m.Z)($n,2),pi=ri[0],Ki=ri[1];re(pi,Ki)}else if(!_e&&Je&&vt!=="clear"){var gr=Fn(),Qi=(0,m.Z)(gr,2),Do=Qi[0],Go=Qi[1];Je(Do,Go)}},_i=cr(function(fe,Ye){var _e,vt=Cr?Ye.selected:!0;vt?_e=Cr?[].concat((0,_.Z)(Hn),[fe]):[fe]:_e=Hn.filter(function(Fn){return Fn.value!==fe}),hr(_e),Li(fe,vt),M==="combobox"?zi(""):(!vn||He)&&(et(""),zi(""))}),to=function(Ye,_e){hr(Ye);var vt=_e.type,Fn=_e.values;(vt==="remove"||vt==="clear")&&Fn.forEach(function($n){Li($n.value,!1,vt)})},wi=function(Ye,_e){if(et(Ye),zi(null),_e.source==="submit"){var vt=(Ye||"").trim();if(vt){var Fn=Array.from(new Set([].concat((0,_.Z)(qr),[vt])));hr(Fn),Li(vt,!0),et("")}return}_e.source!=="blur"&&(M==="combobox"&&hr(Ye),te==null||te(Ye))},Zi=function(Ye){var _e=Ye;M!=="tags"&&(_e=Ye.map(function(Fn){var $n=dn.get(Fn);return $n==null?void 0:$n.value}).filter(function(Fn){return Fn!==void 0}));var vt=Array.from(new Set([].concat((0,_.Z)(qr),(0,_.Z)(_e))));hr(vt),vt.forEach(function(Fn){Li(Fn,!0)})},Ft=v.useMemo(function(){var fe=ln!==!1&&Tt!==!1;return(0,O.Z)((0,O.Z)({},Wt),{},{flattenOptions:qn,onActiveValue:Tr,defaultActiveFirstOption:ni,onSelect:_i,menuItemSelectedIcon:Ut,rawValues:qr,fieldNames:Yt,virtual:fe,direction:jt,listHeight:wn,listItemHeight:un,childrenAsData:or})},[Wt,qn,Tr,ni,_i,Ut,qr,Yt,ln,Tt,wn,un,or]);return v.createElement(pn.Provider,{value:Ft},v.createElement(dt,(0,x.Z)({},Jt,{id:zr,prefixCls:Q,ref:p,omitDomProps:$r,mode:M,displayValues:Jr,onDisplayValuesChange:to,direction:jt,searchValue:Pt,onSearch:wi,autoClearSearchValue:He,onSearchSplit:Zi,dropdownMatchSelectWidth:Tt,OptionList:Xr,emptyOptions:!qn.length,activeValue:Bi,activeDescendantId:"".concat(zr,"_list_").concat(vr)})))}),xi=Hi;xi.Option=Kn,xi.OptGroup=Cn;var _r=xi,Vi=_r,Wi=f(10366),Gi=f(8745),Fi=f(33603),fi=f(9708),Vo=f(53124),Co=f(98866),qi=f(88258),Ro=f(98675),Ii=f(65223),uo=f(4173),Ri=f(87244),Xi=f(13458),eo=f(78642),$i=f(46163),Lo=function(h,p){var P={};for(var M in h)Object.prototype.hasOwnProperty.call(h,M)&&p.indexOf(M)<0&&(P[M]=h[M]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,M=Object.getOwnPropertySymbols(h);k<M.length;k++)p.indexOf(M[k])<0&&Object.prototype.propertyIsEnumerable.call(h,M[k])&&(P[M[k]]=h[M[k]]);return P};const To="SECRET_COMBOBOX_MODE_DO_NOT_USE",xo=(h,p)=>{var P,{prefixCls:M,bordered:k=!0,className:Q,rootClassName:ce,getPopupContainer:Ce,popupClassName:Te,dropdownClassName:ee,listHeight:te=256,placement:ne,listItemHeight:He=24,size:re,disabled:Je,notFoundContent:Ot,status:Tt,builtinPlacements:Lt,dropdownMatchSelectWidth:mt,popupMatchSelectWidth:It,direction:an,style:Xt,allowClear:yt}=h,Kt=Lo(h,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ut,getPrefixCls:ln,renderEmpty:jt,direction:en,virtual:wn,popupMatchSelectWidth:sn,popupOverflow:un,select:cn}=v.useContext(Vo.E_),ut=ln("select",M),bt=ln(),Nt=an!=null?an:en,{compactSize:Jt,compactItemClassnames:zr}=(0,uo.ri)(ut,Nt),[Cr,or]=(0,Ri.Z)(ut),xr=v.useMemo(()=>{const{mode:Tn}=Kt;if(Tn!=="combobox")return Tn===To?"combobox":Tn},[Kt.mode]),Yt=xr==="multiple"||xr==="tags",kn=(0,eo.Z)(Kt.suffixIcon,Kt.showArrow),Qr=(P=It!=null?It:mt)!==null&&P!==void 0?P:sn,{status:Pt,hasFeedback:et,isFormItemInput:Wt,feedbackIcon:En}=v.useContext(Ii.aM),dn=(0,fi.F)(Pt,Tt);let nn;Ot!==void 0?nn=Ot:xr==="combobox"?nn=null:nn=(jt==null?void 0:jt("Select"))||v.createElement(qi.Z,{componentName:"Select"});const{suffixIcon:At,itemIcon:Ln,removeIcon:Jn,clearIcon:Vn}=(0,$i.Z)(Object.assign(Object.assign({},Kt),{multiple:Yt,hasFeedback:et,feedbackIcon:En,showSuffixIcon:kn,prefixCls:ut,showArrow:Kt.showArrow,componentName:"Select"})),sr=yt===!0?{clearIcon:Vn}:yt,Gn=(0,Wi.Z)(Kt,["suffixIcon","itemIcon"]),ar=V()(Te||ee,{[`${ut}-dropdown-${Nt}`]:Nt==="rtl"},ce,or),On=(0,Ro.Z)(Tn=>{var wr;return(wr=re!=null?re:Jt)!==null&&wr!==void 0?wr:Tn}),Hn=v.useContext(Co.Z),Br=Je!=null?Je:Hn,Jr=V()({[`${ut}-lg`]:On==="large",[`${ut}-sm`]:On==="small",[`${ut}-rtl`]:Nt==="rtl",[`${ut}-borderless`]:!k,[`${ut}-in-form-item`]:Wt},(0,fi.Z)(ut,dn,et),zr,cn==null?void 0:cn.className,Q,ce,or),qr=v.useMemo(()=>ne!==void 0?ne:Nt==="rtl"?"bottomRight":"bottomLeft",[ne,Nt]),dr=(0,Xi.Z)(Lt,un);return Cr(v.createElement(Vi,Object.assign({ref:p,virtual:wn,showSearch:cn==null?void 0:cn.showSearch},Gn,{style:Object.assign(Object.assign({},cn==null?void 0:cn.style),Xt),dropdownMatchSelectWidth:Qr,builtinPlacements:dr,transitionName:(0,Fi.m)(bt,"slide-up",Kt.transitionName),listHeight:te,listItemHeight:He,mode:xr,prefixCls:ut,placement:qr,direction:Nt,suffixIcon:At,menuItemSelectedIcon:Ln,removeIcon:Jn,allowClear:sr,notFoundContent:nn,className:Jr,getPopupContainer:Ce||Ut,dropdownClassName:ar,disabled:Br})))},Yi=v.forwardRef(xo),Po=(0,Gi.Z)(Yi);Yi.SECRET_COMBOBOX_MODE_DO_NOT_USE=To,Yi.Option=Kn,Yi.OptGroup=Cn,Yi._InternalPanelDoNotUseOrYouWillBeFired=Po;var wo=Yi},87244:function(_t,le,f){"use strict";f.d(le,{Z:function(){return d}});var w=f(14747),V=f(80110),x=f(45503),_=f(67968),b=f(67771),O=f(33297);const m=c=>{const{optionHeight:C,optionFontSize:T,optionLineHeight:G,optionPadding:D}=c;return{position:"relative",display:"block",minHeight:C,padding:D,color:c.colorText,fontWeight:"normal",fontSize:T,lineHeight:G,boxSizing:"border-box"}};var Z=c=>{const{antCls:C,componentCls:T}=c,G=`${T}-item`,D=`&${C}-slide-up-enter${C}-slide-up-enter-active`,H=`&${C}-slide-up-appear${C}-slide-up-appear-active`,q=`&${C}-slide-up-leave${C}-slide-up-leave-active`,We=`${T}-dropdown-placement-`;return[{[`${T}-dropdown`]:Object.assign(Object.assign({},(0,w.Wf)(c)),{position:"absolute",top:-9999,zIndex:c.zIndexPopup,boxSizing:"border-box",padding:c.paddingXXS,overflow:"hidden",fontSize:c.fontSize,fontVariant:"initial",backgroundColor:c.colorBgElevated,borderRadius:c.borderRadiusLG,outline:"none",boxShadow:c.boxShadowSecondary,[`
${D}${We}bottomLeft,
${H}${We}bottomLeft
`]:{animationName:b.fJ},[`
${D}${We}topLeft,
${H}${We}topLeft,
${D}${We}topRight,
${H}${We}topRight
`]:{animationName:b.Qt},[`${q}${We}bottomLeft`]:{animationName:b.Uw},[`
${q}${We}topLeft,
${q}${We}topRight
`]:{animationName:b.ly},"&-hidden":{display:"none"},[`${G}`]:Object.assign(Object.assign({},m(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"},w.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${G}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${G}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${G}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${G}-option-selected`]:{backgroundColor:c.colorBgContainerDisabled},color:c.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:c.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,b.oN)(c,"slide-up"),(0,b.oN)(c,"slide-down"),(0,O.Fm)(c,"move-up"),(0,O.Fm)(c,"move-down")]};const v=2,me=c=>{let{controlHeightSM:C,controlHeight:T,lineWidth:G}=c;const D=(T-C)/2-G,H=Math.ceil(D/2);return[D,H]};function ie(c,C){const{componentCls:T,iconCls:G}=c,D=`${T}-selection-overflow`,H=c.multipleSelectItemHeight,[q]=me(c),We=C?`${T}-${C}`:"";return{[`${T}-multiple${We}`]:{fontSize:c.fontSize,[D]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${T}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${q-v}px ${v*2}px`,borderRadius:c.borderRadius,[`${T}-show-search&`]:{cursor:"text"},[`${T}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${v}px 0`,lineHeight:`${H}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${T}-show-arrow ${T}-selector,
&${T}-allow-clear ${T}-selector
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${T}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:H,marginTop:v,marginBottom:v,lineHeight:`${H-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:v*2,paddingInlineStart:c.paddingXS,paddingInlineEnd:c.paddingXS/2,[`${T}-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,w.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${G}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${D}-item + ${D}-item`]:{[`${T}-selection-search`]:{marginInlineStart:0}},[`${T}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-q,"\n &-input,\n &-mirror\n ":{height:H,fontFamily:c.fontFamily,lineHeight:`${H}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"}},[`${T}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var ve=c=>{const{componentCls:C}=c,T=(0,x.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),G=(0,x.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,D]=me(c);return[ie(c),ie(T,"sm"),{[`${C}-multiple${C}-sm`]:{[`${C}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${C}-selection-search`]:{marginInlineStart:D}}},ie(G,"lg")]};function be(c,C){const{componentCls:T,inputPaddingHorizontalBase:G,borderRadius:D}=c,H=c.controlHeight-c.lineWidth*2,q=Math.ceil(c.fontSize*1.25),We=C?`${T}-${C}`:"";return{[`${T}-single${We}`]:{fontSize:c.fontSize,[`${T}-selector`]:Object.assign(Object.assign({},(0,w.Wf)(c)),{display:"flex",borderRadius:D,[`${T}-selection-search`]:{position:"absolute",top:0,insetInlineStart:G,insetInlineEnd:G,bottom:0,"&-input":{width:"100%"}},[`
${T}-selection-item,
${T}-selection-placeholder
`]:{padding:0,lineHeight:`${H}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${H}px`}},[`${T}-selection-item`]:{position:"relative",userSelect:"none"},[`${T}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${T}-selection-item:after`,`${T}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${T}-show-arrow ${T}-selection-item,
&${T}-show-arrow ${T}-selection-placeholder
`]:{paddingInlineEnd:q},[`&${T}-open ${T}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${T}-customize-input)`]:{[`${T}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${G}px`,[`${T}-selection-search-input`]:{height:H},"&:after":{lineHeight:`${H}px`}}},[`&${T}-customize-input`]:{[`${T}-selector`]:{"&:after":{display:"none"},[`${T}-selection-search`]:{position:"static",width:"100%"},[`${T}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${G}px`,"&:after":{display:"none"}}}}}}}function pe(c){const{componentCls:C}=c,T=c.controlPaddingHorizontalSM-c.lineWidth;return[be(c),be((0,x.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${C}-single${C}-sm`]:{[`&:not(${C}-customize-input)`]:{[`${C}-selection-search`]:{insetInlineStart:T,insetInlineEnd:T},[`${C}-selector`]:{padding:`0 ${T}px`},[`&${C}-show-arrow ${C}-selection-search`]:{insetInlineEnd:T+c.fontSize*1.5},[`
&${C}-show-arrow ${C}-selection-item,
&${C}-show-arrow ${C}-selection-placeholder
`]:{paddingInlineEnd:c.fontSize*1.5}}}},be((0,x.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const K=c=>{const{componentCls:C,selectorBg:T}=c;return{position:"relative",backgroundColor:T,border:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`,transition:`all ${c.motionDurationMid} ${c.motionEaseInOut}`,input:{cursor:"pointer"},[`${C}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${C}-disabled&`]:{color:c.colorTextDisabled,background:c.colorBgContainerDisabled,cursor:"not-allowed",[`${C}-multiple&`]:{background:c.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},je=function(c,C){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:G,borderHoverColor:D,outlineColor:H,antCls:q}=C,We=T?{[`${G}-selector`]:{borderColor:D}}:{};return{[c]:{[`&:not(${G}-disabled):not(${G}-customize-input):not(${q}-pagination-size-changer)`]:Object.assign(Object.assign({},We),{[`${G}-focused& ${G}-selector`]:{borderColor:D,boxShadow:`0 0 0 ${C.controlOutlineWidth}px ${H}`,outline:0},[`&:hover ${G}-selector`]:{borderColor:D}})}}},Ct=c=>{const{componentCls:C}=c;return{[`${C}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},W=c=>{const{componentCls:C,inputPaddingHorizontalBase:T,iconCls:G}=c;return{[C]:Object.assign(Object.assign({},(0,w.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${C}-customize-input) ${C}-selector`]:Object.assign(Object.assign({},K(c)),Ct(c)),[`${C}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},w.vS),[`${C}-selection-placeholder`]:Object.assign(Object.assign({},w.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${C}-arrow`]:Object.assign(Object.assign({},(0,w.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:T,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[G]:{verticalAlign:"top",transition:`transform ${c.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${C}-suffix)`]:{pointerEvents:"auto"}},[`${C}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${C}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:T,zIndex:1,display:"inline-block",width:c.fontSizeIcon,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:c.clearBg,cursor:"pointer",opacity:0,transition:`color ${c.motionDurationMid} ease, opacity ${c.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:c.colorTextTertiary}},"&:hover":{[`${C}-clear`]:{opacity:1}}}),[`${C}-has-feedback`]:{[`${C}-clear`]:{insetInlineEnd:T+c.fontSize+c.paddingXS}}}},j=c=>{const{componentCls:C}=c;return[{[C]:{[`&-borderless ${C}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${C}-in-form-item`]:{width:"100%"}}},W(c),pe(c),ve(c),Z(c),{[`${C}-rtl`]:{direction:"rtl"}},je(C,(0,x.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),je(`${C}-status-error`,(0,x.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),je(`${C}-status-warning`,(0,x.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,V.c)(c,{borderElCls:`${C}-selector`,focusElCls:`${C}-focused`})]};var d=(0,_.Z)("Select",(c,C)=>{let{rootPrefixCls:T}=C;const G=(0,x.TS)(c,{rootPrefixCls:T,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[j(G)]},c=>{const{fontSize:C,lineHeight:T,controlHeight:G,controlPaddingHorizontal:D,zIndexPopupBase:H,colorText:q,fontWeightStrong:We,controlItemBgActive:se,controlItemBgHover:ke,colorBgContainer:Ve,colorFillSecondary:Ae,controlHeightLG:lt,controlHeightSM:ot,colorBgContainerDisabled:Qe,colorTextDisabled:Oe}=c;return{zIndexPopup:H+50,optionSelectedColor:q,optionSelectedFontWeight:We,optionSelectedBg:se,optionActiveBg:ke,optionPadding:`${(G-C*T)/2}px ${D}px`,optionFontSize:C,optionLineHeight:T,optionHeight:G,selectorBg:Ve,clearBg:Ve,singleItemHeightLG:lt,multipleItemBg:Ae,multipleItemBorderColor:"transparent",multipleItemHeight:ot,multipleItemHeightLG:G,multipleSelectorBgDisabled:Qe,multipleItemColorDisabled:Oe,multipleItemBorderColorDisabled:"transparent"}})},13458:function(_t,le,f){"use strict";f.d(le,{Z:function(){return V}});const w=x=>{const b={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:x==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},b),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},b),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},b),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},b),{points:["br","tr"],offset:[0,-4]})}};function V(x,_){return x||w(_)}},78642:function(_t,le,f){"use strict";f.d(le,{Z:function(){return w}});function w(V,x){return x!==void 0?x:V!==null}},46163:function(_t,le,f){"use strict";f.d(le,{Z:function(){return ae}});var w=f(18299),V=f(16646),x=f(73475),_=f(42922),b=f(3407),O=f(72395),m=f(67294);function ae(Z){let{suffixIcon:v,clearIcon:me,menuItemSelectedIcon:ie,removeIcon:Re,loading:ve,multiple:be,hasFeedback:pe,prefixCls:K,showSuffixIcon:je,feedbackIcon:Ct,showArrow:W,componentName:j}=Z;const d=me!=null?me:m.createElement(V.Z,null),c=D=>v===null&&!pe&&!W?null:m.createElement(m.Fragment,null,je!==!1&&D,pe&&Ct);let C=null;if(v!==void 0)C=c(v);else if(ve)C=c(m.createElement(b.Z,{spin:!0}));else{const D=`${K}-suffix`;C=H=>{let{open:q,showSearch:We}=H;return c(q&&We?m.createElement(O.Z,{className:D}):m.createElement(_.Z,{className:D}))}}let T=null;ie!==void 0?T=ie:be?T=m.createElement(w.Z,null):T=null;let G=null;return Re!==void 0?G=Re:G=m.createElement(x.Z,null),{clearIcon:d,suffixIcon:C,itemIcon:T,removeIcon:G}}},33507:function(_t,le){"use strict";const f=w=>({[w.componentCls]:{[`${w.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${w.motionDurationMid} ${w.motionEaseInOut},
opacity ${w.motionDurationMid} ${w.motionEaseInOut} !important`}},[`${w.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${w.motionDurationMid} ${w.motionEaseInOut},
opacity ${w.motionDurationMid} ${w.motionEaseInOut} !important`}}});le.Z=f},33297:function(_t,le,f){"use strict";f.d(le,{Fm:function(){return ie}});var w=f(45930),V=f(93590);const x=new w.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_=new w.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),b=new w.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),O=new w.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),m=new w.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ae=new w.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Z=new w.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),v=new w.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),me={"move-up":{inKeyframes:Z,outKeyframes:v},"move-down":{inKeyframes:x,outKeyframes:_},"move-left":{inKeyframes:b,outKeyframes:O},"move-right":{inKeyframes:m,outKeyframes:ae}},ie=(Re,ve)=>{const{antCls:be}=Re,pe=`${be}-${ve}`,{inKeyframes:K,outKeyframes:je}=me[ve];return[(0,V.R)(pe,K,je,Re.motionDurationMid),{[`
${pe}-enter,
${pe}-appear
`]:{opacity:0,animationTimingFunction:Re.motionEaseOutCirc},[`${pe}-leave`]:{animationTimingFunction:Re.motionEaseInOutCirc}}]}},67771:function(_t,le,f){"use strict";f.d(le,{Qt:function(){return b},Uw:function(){return _},fJ:function(){return x},ly:function(){return O},oN:function(){return ie}});var w=f(45930),V=f(93590);const x=new w.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),_=new w.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),b=new w.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),O=new w.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),m=new w.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ae=new w.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Z=new w.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),v=new w.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),me={"slide-up":{inKeyframes:x,outKeyframes:_},"slide-down":{inKeyframes:b,outKeyframes:O},"slide-left":{inKeyframes:m,outKeyframes:ae},"slide-right":{inKeyframes:Z,outKeyframes:v}},ie=(Re,ve)=>{const{antCls:be}=Re,pe=`${be}-${ve}`,{inKeyframes:K,outKeyframes:je}=me[ve];return[(0,V.R)(pe,K,je,Re.motionDurationMid),{[`
${pe}-enter,
${pe}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:Re.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${pe}-leave`]:{animationTimingFunction:Re.motionEaseInQuint}}]}},41771:function(_t,le){"use strict";var f;var w=typeof Symbol=="function"&&Symbol.for,V=w?Symbol.for("react.element"):60103,x=w?Symbol.for("react.portal"):60106,_=w?Symbol.for("react.fragment"):60107,b=w?Symbol.for("react.strict_mode"):60108,O=w?Symbol.for("react.profiler"):60114,m=w?Symbol.for("react.provider"):60109,ae=w?Symbol.for("react.context"):60110,Z=w?Symbol.for("react.async_mode"):60111,v=w?Symbol.for("react.concurrent_mode"):60111,me=w?Symbol.for("react.forward_ref"):60112,ie=w?Symbol.for("react.suspense"):60113,Re=w?Symbol.for("react.suspense_list"):60120,ve=w?Symbol.for("react.memo"):60115,be=w?Symbol.for("react.lazy"):60116,pe=w?Symbol.for("react.block"):60121,K=w?Symbol.for("react.fundamental"):60117,je=w?Symbol.for("react.responder"):60118,Ct=w?Symbol.for("react.scope"):60119;function W(d){if(typeof d=="object"&&d!==null){var c=d.$$typeof;switch(c){case V:switch(d=d.type,d){case Z:case v:case _:case O:case b:case ie:return d;default:switch(d=d&&d.$$typeof,d){case ae:case me:case be:case ve:case m:return d;default:return c}}case x:return c}}}function j(d){return W(d)===v}f=Z,f=v,f=ae,f=m,f=V,f=me,f=_,f=be,f=ve,f=x,f=O,f=b,f=ie,f=function(d){return j(d)||W(d)===Z},f=j,f=function(d){return W(d)===ae},f=function(d){return W(d)===m},f=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===V},f=function(d){return W(d)===me},le.isFragment=function(d){return W(d)===_},f=function(d){return W(d)===be},f=function(d){return W(d)===ve},f=function(d){return W(d)===x},f=function(d){return W(d)===O},f=function(d){return W(d)===b},f=function(d){return W(d)===ie},f=function(d){return typeof d=="string"||typeof d=="function"||d===_||d===v||d===O||d===b||d===ie||d===Re||typeof d=="object"&&d!==null&&(d.$$typeof===be||d.$$typeof===ve||d.$$typeof===m||d.$$typeof===ae||d.$$typeof===me||d.$$typeof===K||d.$$typeof===je||d.$$typeof===Ct||d.$$typeof===pe)},f=W},47655:function(_t,le,f){"use strict";_t.exports=f(41771)},64701:function(_t,le,f){"use strict";f.r(le),f.d(le,{ResizableTextArea:function(){return ct},default:function(){return Xn}});var w=f(87462),V=f(1413),x=f(4942),_=f(71002),b=f(97685),O=f(45987),m=f(74902),ae=f(94184),Z=f.n(ae),v=f(67656),me=f(87887),ie=f(67294);function Re(xe){var de=ie.useRef();de.current=xe;var Fe=ie.useCallback(function(){for(var he,nt=arguments.length,St=new Array(nt),st=0;st<nt;st++)St[st]=arguments[st];return(he=de.current)===null||he===void 0?void 0:he.call.apply(he,[de].concat(St))},[]);return Fe}function ve(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var be=ve()?ie.useLayoutEffect:ie.useEffect,pe=be,K=function(de,Fe){var he=ie.useRef(!0);be(function(){if(!he.current)return de()},Fe),be(function(){return he.current=!1,function(){he.current=!0}},[])};function je(xe){var de=ie.useRef(!1),Fe=ie.useState(xe),he=(0,b.Z)(Fe,2),nt=he[0],St=he[1];ie.useEffect(function(){return de.current=!1,function(){de.current=!0}},[]);function st(Be,gt){gt&&de.current||St(Be)}return[nt,st]}function Ct(xe){return xe!==void 0}function W(xe,de){var Fe=de||{},he=Fe.defaultValue,nt=Fe.value,St=Fe.onChange,st=Fe.postState,Be=je(function(){return Ct(nt)?nt:Ct(he)?typeof he=="function"?he():he:typeof xe=="function"?xe():xe}),gt=(0,b.Z)(Be,2),ht=gt[0],Rt=gt[1],Zt=nt!==void 0?nt:ht,xt=st?st(Zt):Zt,at=Re(St),Qt=je([Zt]),Ht=(0,b.Z)(Qt,2),zt=Ht[0],er=Ht[1];K(function(){var Yn=zt[0];ht!==Yn&&at(ht,Yn)},[zt]),K(function(){Ct(nt)||Rt(nt)},[nt]);var on=Re(function(Yn,ue){Rt(Yn,ue),er([Zt],ue)});return[xt,on]}var j=f(48555),d=function(de){return+setTimeout(de,16)},c=function(de){return clearTimeout(de)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(d=function(de){return window.requestAnimationFrame(de)},c=function(de){return window.cancelAnimationFrame(de)});var C=0,T=new Map;function G(xe){T.delete(xe)}var D=function(de){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;C+=1;var he=C;function nt(St){if(St===0)G(he),de();else{var st=d(function(){nt(St-1)});T.set(he,st)}}return nt(Fe),he};D.cancel=function(xe){var de=T.get(xe);return G(de),c(de)};var H=D,q=`
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;
`,We=["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"],se={},ke;function Ve(xe){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=xe.getAttribute("id")||xe.getAttribute("data-reactid")||xe.getAttribute("name");if(de&&se[Fe])return se[Fe];var he=window.getComputedStyle(xe),nt=he.getPropertyValue("box-sizing")||he.getPropertyValue("-moz-box-sizing")||he.getPropertyValue("-webkit-box-sizing"),St=parseFloat(he.getPropertyValue("padding-bottom"))+parseFloat(he.getPropertyValue("padding-top")),st=parseFloat(he.getPropertyValue("border-bottom-width"))+parseFloat(he.getPropertyValue("border-top-width")),Be=We.map(function(ht){return"".concat(ht,":").concat(he.getPropertyValue(ht))}).join(";"),gt={sizingStyle:Be,paddingSize:St,borderSize:st,boxSizing:nt};return de&&Fe&&(se[Fe]=gt),gt}function Ae(xe){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,he=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ke||(ke=document.createElement("textarea"),ke.setAttribute("tab-index","-1"),ke.setAttribute("aria-hidden","true"),document.body.appendChild(ke)),xe.getAttribute("wrap")?ke.setAttribute("wrap",xe.getAttribute("wrap")):ke.removeAttribute("wrap");var nt=Ve(xe,de),St=nt.paddingSize,st=nt.borderSize,Be=nt.boxSizing,gt=nt.sizingStyle;ke.setAttribute("style","".concat(gt,";").concat(q)),ke.value=xe.value||xe.placeholder||"";var ht=void 0,Rt=void 0,Zt,xt=ke.scrollHeight;if(Be==="border-box"?xt+=st:Be==="content-box"&&(xt-=St),Fe!==null||he!==null){ke.value=" ";var at=ke.scrollHeight-St;Fe!==null&&(ht=at*Fe,Be==="border-box"&&(ht=ht+St+st),xt=Math.max(ht,xt)),he!==null&&(Rt=at*he,Be==="border-box"&&(Rt=Rt+St+st),Zt=xt>Rt?"":"hidden",xt=Math.min(Rt,xt))}var Qt={height:xt,overflowY:Zt,resize:"none"};return ht&&(Qt.minHeight=ht),Rt&&(Qt.maxHeight=Rt),Qt}var lt=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ot=0,Qe=1,Oe=2,Se=ie.forwardRef(function(xe,de){var Fe=xe,he=Fe.prefixCls,nt=Fe.onPressEnter,St=Fe.defaultValue,st=Fe.value,Be=Fe.autoSize,gt=Fe.onResize,ht=Fe.className,Rt=Fe.style,Zt=Fe.disabled,xt=Fe.onChange,at=Fe.onInternalAutoSize,Qt=(0,O.Z)(Fe,lt),Ht=W(St,{value:st,postState:function(X){return X!=null?X:""}}),zt=(0,b.Z)(Ht,2),er=zt[0],on=zt[1],Yn=function(X){on(X.target.value),xt==null||xt(X)},ue=ie.useRef();ie.useImperativeHandle(de,function(){return{textArea:ue.current}});var hn=ie.useMemo(function(){return Be&&(0,_.Z)(Be)==="object"?[Be.minRows,Be.maxRows]:[]},[Be]),tn=(0,b.Z)(hn,2),yn=tn[0],bn=tn[1],Ur=!!Be,rr=function(){try{if(document.activeElement===ue.current){var X=ue.current,$e=X.selectionStart,ye=X.selectionEnd,we=X.scrollTop;ue.current.setSelectionRange($e,ye),ue.current.scrollTop=we}}catch(qe){}},Ar=ie.useState(Oe),zn=(0,b.Z)(Ar,2),_n=zn[0],jr=zn[1],kr=ie.useState(),Si=(0,b.Z)(kr,2),li=Si[0],Oi=Si[1],Vr=function(){jr(ot)};pe(function(){Ur&&Vr()},[st,yn,bn,Ur]),pe(function(){if(_n===ot)jr(Qe);else if(_n===Qe){var U=Ae(ue.current,!1,yn,bn);jr(Oe),Oi(U)}else rr()},[_n]);var Ci=ie.useRef(),si=function(){H.cancel(Ci.current)},Ni=function(X){_n===Oe&&(gt==null||gt(X),Be&&(si(),Ci.current=H(function(){Vr()})))};ie.useEffect(function(){return si},[]);var I=Ur?li:null,Y=(0,V.Z)((0,V.Z)({},Rt),I);return(_n===ot||_n===Qe)&&(Y.overflowY="hidden",Y.overflowX="hidden"),ie.createElement(j.Z,{onResize:Ni,disabled:!(Be||gt)},ie.createElement("textarea",(0,w.Z)({},Qt,{ref:ue,style:Y,className:Z()(he,ht,(0,x.Z)({},"".concat(he,"-disabled"),Zt)),disabled:Zt,value:er,onChange:Yn})))}),ct=Se,Mt=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ke(xe,de){return(0,m.Z)(xe||"").slice(0,de).join("")}function tt(xe,de,Fe,he){var nt=Fe;return xe?nt=Ke(Fe,he):(0,m.Z)(de||"").length<Fe.length&&(0,m.Z)(Fe||"").length>he&&(nt=de),nt}var Ge=ie.forwardRef(function(xe,de){var Fe,he=xe.defaultValue,nt=xe.value,St=xe.onFocus,st=xe.onBlur,Be=xe.onChange,gt=xe.allowClear,ht=xe.maxLength,Rt=xe.onCompositionStart,Zt=xe.onCompositionEnd,xt=xe.suffix,at=xe.prefixCls,Qt=at===void 0?"rc-textarea":at,Ht=xe.classes,zt=xe.showCount,er=xe.className,on=xe.style,Yn=xe.disabled,ue=xe.hidden,hn=xe.classNames,tn=xe.styles,yn=xe.onResize,bn=(0,O.Z)(xe,Mt),Ur=W(he,{value:nt,defaultValue:he}),rr=(0,b.Z)(Ur,2),Ar=rr[0],zn=rr[1],_n=(0,ie.useRef)(null),jr=ie.useState(!1),kr=(0,b.Z)(jr,2),Si=kr[0],li=kr[1],Oi=ie.useState(!1),Vr=(0,b.Z)(Oi,2),Ci=Vr[0],si=Vr[1],Ni=ie.useRef(),I=ie.useRef(0),Y=ie.useState(null),U=(0,b.Z)(Y,2),X=U[0],$e=U[1],ye=function(){var Ie;(Ie=_n.current)===null||Ie===void 0||Ie.textArea.focus()};(0,ie.useImperativeHandle)(de,function(){return{resizableTextArea:_n.current,focus:ye,blur:function(){var Ie;(Ie=_n.current)===null||Ie===void 0||Ie.textArea.blur()}}}),(0,ie.useEffect)(function(){li(function(ge){return!Yn&&ge})},[Yn]);var we=Number(ht)>0,qe=function(Ie){si(!0),Ni.current=Ar,I.current=Ie.currentTarget.selectionStart,Rt==null||Rt(Ie)},wt=function(Ie){si(!1);var Le=Ie.currentTarget.value;if(we){var $t,z=I.current>=ht+1||I.current===(($t=Ni.current)===null||$t===void 0?void 0:$t.length);Le=tt(z,Ni.current,Le,ht)}Le!==Ar&&(zn(Le),(0,me.rJ)(Ie.currentTarget,Ie,Be,Le)),Zt==null||Zt(Ie)},Dt=function(Ie){var Le=Ie.target.value;if(!Ci&&we){var $t=Ie.target.selectionStart>=ht+1||Ie.target.selectionStart===Le.length||!Ie.target.selectionStart;Le=tt($t,Ar,Le,ht)}zn(Le),(0,me.rJ)(Ie.currentTarget,Ie,Be,Le)},rt=function(Ie){var Le=bn.onPressEnter,$t=bn.onKeyDown;Ie.key==="Enter"&&Le&&Le(Ie),$t==null||$t(Ie)},Ue=function(Ie){li(!0),St==null||St(Ie)},y=function(Ie){li(!1),st==null||st(Ie)},L=function(Ie){var Le;zn(""),ye(),(0,me.rJ)((Le=_n.current)===null||Le===void 0?void 0:Le.textArea,Ie,Be)},A=(0,me.D7)(Ar);!Ci&&we&&nt==null&&(A=Ke(A,ht));var N=xt,$;if(zt){var F=(0,m.Z)(A).length;(0,_.Z)(zt)==="object"?$=zt.formatter({value:A,count:F,maxLength:ht}):$="".concat(F).concat(we?" / ".concat(ht):""),N=ie.createElement(ie.Fragment,null,N,ie.createElement("span",{className:Z()("".concat(Qt,"-data-count"),hn==null?void 0:hn.count),style:tn==null?void 0:tn.count},$))}var De=function(Ie){var Le;yn==null||yn(Ie),(Le=_n.current)!==null&&Le!==void 0&&Le.textArea.style.height&&$e(!0)},ft=!bn.autoSize&&!zt&&!gt,Xe=ie.createElement(v.BaseInput,{value:A,allowClear:gt,handleReset:L,suffix:N,prefixCls:Qt,classes:{affixWrapper:Z()(Ht==null?void 0:Ht.affixWrapper,(Fe={},(0,x.Z)(Fe,"".concat(Qt,"-show-count"),zt),(0,x.Z)(Fe,"".concat(Qt,"-textarea-allow-clear"),gt),Fe))},disabled:Yn,focused:Si,className:er,style:(0,V.Z)((0,V.Z)({},on),X&&!ft?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof $=="string"?$:void 0}},hidden:ue,inputElement:ie.createElement(ct,(0,w.Z)({},bn,{onKeyDown:rt,onChange:Dt,onFocus:Ue,onBlur:y,onCompositionStart:qe,onCompositionEnd:wt,className:hn==null?void 0:hn.textarea,style:(0,V.Z)((0,V.Z)({},tn==null?void 0:tn.textarea),{},{resize:on==null?void 0:on.resize}),disabled:Yn,prefixCls:Qt,onResize:De,ref:_n}))});return Xe}),mn=Ge,Xn=mn},4631:function(_t){(function(le,f){_t.exports=f()})(this,function(){"use strict";var le=navigator.userAgent,f=navigator.platform,w=/gecko\/\d/i.test(le),V=/MSIE \d/.test(le),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(le),_=/Edge\/(\d+)/.exec(le),b=V||x||_,O=b&&(V?document.documentMode||6:+(_||x)[1]),m=!_&&/WebKit\//.test(le),ae=m&&/Qt\/\d+\.\d+/.test(le),Z=!_&&/Chrome\//.test(le),v=/Opera\//.test(le),me=/Apple Computer/.test(navigator.vendor),ie=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(le),Re=/PhantomJS/.test(le),ve=!_&&/AppleWebKit/.test(le)&&/Mobile\/\w+/.test(le),be=/Android/.test(le),pe=ve||be||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(le),K=ve||/Mac/.test(f),je=/\bCrOS\b/.test(le),Ct=/win/i.test(f),W=v&&le.match(/Version\/(\d*\.\d*)/);W&&(W=Number(W[1])),W&&W>=15&&(v=!1,m=!0);var j=K&&(ae||v&&(W==null||W<12.11)),d=w||b&&O>=9;function c(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C=function(e,t){var r=e.className,n=c(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function G(e,t){return T(e).appendChild(t)}function D(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function H(e,t,r,n){var i=D(e,t,r,n);return i.setAttribute("role","presentation"),i}var q;document.createRange?q=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:q=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 We(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 se(){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 ke(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function Ve(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 Ae=function(e){e.select()};ve?Ae=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:b&&(Ae=function(e){try{e.select()}catch(t){}});function lt(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ot(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 Qe(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 Oe=function(){this.id=null,this.f=null,this.time=0,this.handler=lt(this.onTimeout,this)};Oe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Oe.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function Se(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var ct=50,Mt={toString:function(){return"CodeMirror.Pass"}},Ke={scroll:!1},tt={origin:"*mouse"},Ge={origin:"+move"};function mn(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 Xn=[""];function xe(e){for(;Xn.length<=e;)Xn.push(de(Xn)+" ");return Xn[e]}function de(e){return e[e.length-1]}function Fe(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function he(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function nt(){}function St(e,t){var r;return Object.create?r=Object.create(e):(nt.prototype=e,r=new nt),t&&ot(t,r),r}var st=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Be(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||st.test(e))}function gt(e,t){return t?t.source.indexOf("\\w")>-1&&Be(e)?!0:t.test(e):Be(e)}function ht(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Rt=/[\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 Zt(e){return e.charCodeAt(0)>=768&&Rt.test(e)}function xt(e,t,r){for(;(r<0?t>0:t<e.length)&&Zt(e.charAt(t));)t+=r;return t}function at(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 Qt(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 Ht=null;function zt(e,t,r){var n;Ht=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:Ht=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:Ht=i)}return n!=null?n:Ht}var er=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,g,S){this.level=u,this.from=g,this.to=S}return function(u,g){var S=g=="ltr"?"L":"R";if(u.length==0||g=="ltr"&&!n.test(u))return!1;for(var R=u.length,E=[],B=0;B<R;++B)E.push(r(u.charCodeAt(B)));for(var J=0,oe=S;J<R;++J){var Ee=E[J];Ee=="m"?E[J]=oe:oe=Ee}for(var ze=0,Me=S;ze<R;++ze){var Ze=E[ze];Ze=="1"&&Me=="r"?E[ze]="n":o.test(Ze)&&(Me=Ze,Ze=="r"&&(E[ze]="R"))}for(var pt=1,it=E[0];pt<R-1;++pt){var kt=E[pt];kt=="+"&&it=="1"&&E[pt+1]=="1"?E[pt]="1":kt==","&&it==E[pt+1]&&(it=="1"||it=="n")&&(E[pt]=it),it=kt}for(var Bn=0;Bn<R;++Bn){var Dr=E[Bn];if(Dr==",")E[Bn]="N";else if(Dr=="%"){var lr=void 0;for(lr=Bn+1;lr<R&&E[lr]=="%";++lr);for(var Mi=Bn&&E[Bn-1]=="!"||lr<R&&E[lr]=="1"?"1":"N",mi=Bn;mi<lr;++mi)E[mi]=Mi;Bn=lr-1}}for(var Er=0,yi=S;Er<R;++Er){var Wr=E[Er];yi=="L"&&Wr=="1"?E[Er]="L":o.test(Wr)&&(yi=Wr)}for(var Pr=0;Pr<R;++Pr)if(i.test(E[Pr])){var Mr=void 0;for(Mr=Pr+1;Mr<R&&i.test(E[Mr]);++Mr);for(var ur=(Pr?E[Pr-1]:S)=="L",bi=(Mr<R?E[Mr]:S)=="L",jo=ur==bi?ur?"L":"R":S,So=Pr;So<Mr;++So)E[So]=jo;Pr=Mr-1}for(var Kr=[],Ji,Nr=0;Nr<R;)if(a.test(E[Nr])){var Ja=Nr;for(++Nr;Nr<R&&a.test(E[Nr]);++Nr);Kr.push(new s(0,Ja,Nr))}else{var so=Nr,Oo=Kr.length,Io=g=="rtl"?1:0;for(++Nr;Nr<R&&E[Nr]!="L";++Nr);for(var ai=so;ai<Nr;)if(l.test(E[ai])){so<ai&&(Kr.splice(Oo,0,new s(1,so,ai)),Oo+=Io);var ko=ai;for(++ai;ai<Nr&&l.test(E[ai]);++ai);Kr.splice(Oo,0,new s(2,ko,ai)),Oo+=Io,so=ai}else++ai;so<Nr&&Kr.splice(Oo,0,new s(1,so,Nr))}return g=="ltr"&&(Kr[0].level==1&&(Ji=u.match(/^\s+/))&&(Kr[0].from=Ji[0].length,Kr.unshift(new s(0,0,Ji[0].length))),de(Kr).level==1&&(Ji=u.match(/\s+$/))&&(de(Kr).to-=Ji[0].length,Kr.push(new s(0,R-Ji[0].length,R)))),g=="rtl"?Kr.reverse():Kr}}();function on(e,t){var r=e.order;return r==null&&(r=e.order=er(e.text,t)),r}var Yn=[],ue=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]||Yn).concat(r)}};function hn(e,t){return e._handlers&&e._handlers[t]||Yn}function tn(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=Se(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function yn(e,t){var r=hn(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 bn(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),yn(e,r||t.type,e,t),jr(t)||t.codemirrorIgnore}function Ur(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)Se(r,t[n])==-1&&r.push(t[n])}function rr(e,t){return hn(e,t).length>0}function Ar(e){e.prototype.on=function(t,r){ue(this,t,r)},e.prototype.off=function(t,r){tn(this,t,r)}}function zn(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _n(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function jr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function kr(e){zn(e),_n(e)}function Si(e){return e.target||e.srcElement}function li(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),K&&e.ctrlKey&&t==1&&(t=3),t}var Oi=function(){if(b&&O<9)return!1;var e=D("div");return"draggable"in e||"dragDrop"in e}(),Vr;function Ci(e){if(Vr==null){var t=D("span","\u200B");G(e,D("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Vr=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&O<8))}var r=Vr?D("span","\u200B"):D("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var si;function Ni(e){if(si!=null)return si;var t=G(e,document.createTextNode("A\u062EA")),r=q(t,0,1).getBoundingClientRect(),n=q(t,1,2).getBoundingClientRect();return T(e),!r||r.left==r.right?!1:si=n.right-r.right<3}var I=`
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Y=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},U=function(){var e=D("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),X=null;function $e(e){if(X!=null)return X;var t=G(e,D("span","x")),r=t.getBoundingClientRect(),n=q(t,0,1).getBoundingClientRect();return X=Math.abs(r.left-n.left)>1}var ye={},we={};function qe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ye[e]=t}function wt(e,t){we[e]=t}function Dt(e){if(typeof e=="string"&&we.hasOwnProperty(e))e=we[e];else if(e&&typeof e.name=="string"&&we.hasOwnProperty(e.name)){var t=we[e.name];typeof t=="string"&&(t={name:t}),e=St(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Dt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Dt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function rt(e,t){t=Dt(t);var r=ye[t.name];if(!r)return rt(e,"text/plain");var n=r(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[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 Ue={};function y(e,t){var r=Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={};ot(t,r)}function L(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 A(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 N(e,t,r){return e.startState?e.startState(t,r):!0}var $=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};$.prototype.eol=function(){return this.pos>=this.string.length},$.prototype.sol=function(){return this.pos==this.lineStart},$.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},$.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},$.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},$.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},$.prototype.skipToEnd=function(){this.pos=this.string.length},$.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},$.prototype.backUp=function(e){this.pos-=e},$.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},$.prototype.indentation=function(){return Qe(this.string,null,this.tabSize)-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},$.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)}},$.prototype.current=function(){return this.string.slice(this.start,this.pos)},$.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},$.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},$.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function F(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 De(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 ft(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function Xe(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function ge(e){if(e.parent==null)return null;for(var t=e.parent,r=Se(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function Ie(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 Le(e,t){return t>=e.first&&t<e.first+e.size}function $t(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function z(e,t,r){if(r===void 0&&(r=null),!(this instanceof z))return new z(e,t,r);this.line=e,this.ch=t,this.sticky=r}function Ne(e,t){return e.line-t.line||e.ch-t.ch}function Vt(e,t){return e.sticky==t.sticky&&Ne(e,t)==0}function vn(e){return z(e.line,e.ch)}function Et(e,t){return Ne(e,t)<0?t:e}function dt(e,t){return Ne(e,t)<0?e:t}function Sn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Pe(e,t){if(t.line<e.first)return z(e.first,0);var r=e.first+e.size-1;return t.line>r?z(r,F(e,r).text.length):qt(t,F(e,t.line).text.length)}function qt(e,t){var r=e.ch;return r==null||r>t?z(e.line,t):r<0?z(e.line,0):e}function Gt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Pe(e,t[n]);return r}var xn=function(e,t){this.state=e,this.lookAhead=t},fn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};fn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},fn.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}},fn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fn.fromSaved=function(e,t,r){return t instanceof xn?new fn(e,L(e.mode,t.state),r,t.lookAhead):new fn(e,L(e.mode,t),r)},fn.prototype.save=function(e){var t=e!==!1?L(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new xn(t,this.maxLookAhead):t};function yr(e,t,r,n){var i=[e.state.modeGen],o={};Cn(e,t.text,e.doc.mode,r,function(u,g){return i.push(u,g)},o,n);for(var a=r.state,l=function(u){r.baseTokens=i;var g=e.state.overlays[u],S=1,R=0;r.state=!0,Cn(e,t.text,g.mode,r,function(E,B){for(var J=S;R<E;){var oe=i[S];oe>E&&i.splice(S,1,E,i[S+1],oe),S+=2,R=Math.min(E,oe)}if(B)if(g.opaque)i.splice(J,S-J,E,"overlay "+B),S=J+2;else for(;J<S;J+=2){var Ee=i[J+1];i[J+1]=(Ee?Ee+" ":"")+"overlay "+B}},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 Zn(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Nn(e,ge(t)),i=t.text.length>e.options.maxHighlightLength&&L(e.doc.mode,n.state),o=yr(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 Nn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new fn(n,!0,t);var o=ir(e,t,r),a=o>n.first&&F(n,o-1).stateAfter,l=a?fn.fromSaved(n,a,o):new fn(n,N(n.mode),o);return n.iter(o,t,function(s){Or(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 Or(e,t,r,n){var i=e.doc.mode,o=new $(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&Ir(i,r.state);!o.eol();)Rn(i,o,r.state),o.start=o.pos}function Ir(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=A(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function Rn(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=A(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 br=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function cr(e,t,r,n){var i=e.doc,o=i.mode,a;t=Pe(i,t);var l=F(i,t.line),s=Nn(e,t.line,r),u=new $(l.text,e.options.tabSize,s),g;for(n&&(g=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=Rn(o,u,s.state),n&&g.push(new br(u,a,L(i.mode,s.state)));return n?g:new br(u,a,s.state)}function Sr(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 Cn(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,g=new $(t,e.options.tabSize,n),S,R=e.options.addModeClass&&[null];for(t==""&&Sr(Ir(r,n.state),o);!g.eol();){if(g.pos>e.options.maxHighlightLength?(l=!1,a&&Or(e,t,n,g.pos),g.pos=t.length,S=null):S=Sr(Rn(r,g,n.state,R),o),R){var E=R[0].name;E&&(S="m-"+(S?E+" "+S:E))}if(!l||u!=S){for(;s<g.start;)s=Math.min(g.start,s+5e3),i(s,u);u=S}g.start=g.pos}for(;s<g.pos;){var B=Math.min(g.pos,s+5e3);i(B,u),s=B}}function ir(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=F(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof xn?u.lookAhead:0)<=o.modeFrontier))return l;var g=Qe(s.text,null,e.options.tabSize);(i==null||n>g)&&(i=l-1,n=g)}return i}function Kn(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=F(e,n).stateAfter;if(i&&(!(i instanceof xn)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Un=!1,Qn=!1;function fr(){Un=!0}function pn(){Qn=!0}function An(e,t,r){this.marker=e,this.from=t,this.to=r}function jn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Rr(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function ui(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Gr(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.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 An(a,o.from,s?null:o.to))}}return n}function Xr(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 An(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function ci(e,t){if(t.full)return null;var r=Le(e,t.from.line)&&F(e,t.from.line).markedSpans,n=Le(e,t.to.line)&&F(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=Ne(t.from,t.to)==0,l=Gr(r,i,a),s=Xr(n,o,a),u=t.text.length==1,g=de(t.text).length+(u?i:0);if(l)for(var S=0;S<l.length;++S){var R=l[S];if(R.to==null){var E=jn(s,R.marker);E?u&&(R.to=E.to==null?null:E.to+g):R.to=i}}if(s)for(var B=0;B<s.length;++B){var J=s[B];if(J.to!=null&&(J.to+=g),J.from==null){var oe=jn(l,J.marker);oe||(J.from=g,u&&(l||(l=[])).push(J))}else J.from+=g,u&&(l||(l=[])).push(J)}l&&(l=Pn(l)),s&&s!=l&&(s=Pn(s));var Ee=[l];if(!u){var ze=t.text.length-2,Me;if(ze>0&&l)for(var Ze=0;Ze<l.length;++Ze)l[Ze].to==null&&(Me||(Me=[])).push(new An(l[Ze].marker,null,null));for(var pt=0;pt<ze;++pt)Ee.push(Me);Ee.push(s)}return Ee}function Pn(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 Yr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(E){if(E.markedSpans)for(var B=0;B<E.markedSpans.length;++B){var J=E.markedSpans[B].marker;J.readOnly&&(!n||Se(n,J)==-1)&&(n||(n=[])).push(J)}}),!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(!(Ne(u.to,l.from)<0||Ne(u.from,l.to)>0)){var g=[s,1],S=Ne(u.from,l.from),R=Ne(u.to,l.to);(S<0||!a.inclusiveLeft&&!S)&&g.push({from:u.from,to:l.from}),(R>0||!a.inclusiveRight&&!R)&&g.push({from:l.to,to:u.to}),i.splice.apply(i,g),s+=g.length-3}}return i}function Fr(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function $r(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Ai(e){return e.inclusiveLeft?-1:0}function Hi(e){return e.inclusiveRight?1:0}function xi(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=Ne(n.from,i.from)||Ai(e)-Ai(t);if(o)return-o;var a=Ne(n.to,i.to)||Hi(e)-Hi(t);return a||t.id-e.id}function _r(e,t){var r=Qn&&e.markedSpans,n;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||xi(n,i.marker)<0)&&(n=i.marker);return n}function Vi(e){return _r(e,!0)}function Wi(e){return _r(e,!1)}function Gi(e,t){var r=Qn&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!n||xi(n,o.marker)<0)&&(n=o.marker)}return n}function Fi(e,t,r,n,i){var o=F(e,t),a=Qn&&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),g=Ne(u.from,r)||Ai(s.marker)-Ai(i),S=Ne(u.to,n)||Hi(s.marker)-Hi(i);if(!(g>=0&&S<=0||g<=0&&S>=0)&&(g<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Ne(u.to,r)>=0:Ne(u.to,r)>0)||g>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Ne(u.from,n)<=0:Ne(u.from,n)<0)))return!0}}}function fi(e){for(var t;t=Vi(e);)e=t.find(-1,!0).line;return e}function Vo(e){for(var t;t=Wi(e);)e=t.find(1,!0).line;return e}function Co(e){for(var t,r;t=Wi(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function qi(e,t){var r=F(e,t),n=fi(r);return r==n?t:ge(n)}function Ro(e,t){if(t>e.lastLine())return t;var r=F(e,t),n;if(!Ii(e,r))return t;for(;n=Wi(r);)r=n.find(1,!0).line;return ge(r)+1}function Ii(e,t){var r=Qn&&t.markedSpans;if(r){for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&uo(e,t,n))return!0}}}function uo(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return uo(e,n.line,jn(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&uo(e,t,i))return!0}function Ri(e){e=fi(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function Xi(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Vi(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Wi(n);){var o=r.find(0,!0);t-=n.text.length-o.from.ch,n=o.to.line,t+=n.text.length-o.to.ch}return t}function eo(e){var t=e.display,r=e.doc;t.maxLine=F(r,r.first),t.maxLineLength=Xi(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Xi(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var $i=function(e,t,r){this.text=e,$r(this,t),this.height=r?r(this):1};$i.prototype.lineNo=function(){return ge(this)},Ar($i);function Lo(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Fr(e),$r(e,r);var i=n?n(e):1;i!=e.height&&Xe(e,i)}function To(e){e.parent=null,Fr(e)}var xo={},Yi={};function Po(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yi:xo;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function wo(e,t){var r=H("span",null,null,m?"padding-right: .1px":null),n={pre:H("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=p,Ni(e.display.measure)&&(a=on(o,e.doc.direction))&&(n.addToken=M(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&ge(o);Q(o,n,Zn(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=Ve(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=Ve(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Ci(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(m){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 yn(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ve(n.pre.className,n.textClass||"")),n}function h(e){var t=D("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function p(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?P(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,g;if(!s.test(t))e.col+=t.length,g=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,g),b&&O<9&&(u=!0),e.pos+=t.length;else{g=document.createDocumentFragment();for(var S=0;;){s.lastIndex=S;var R=s.exec(t),E=R?R.index-S:t.length-S;if(E){var B=document.createTextNode(l.slice(S,S+E));b&&O<9?g.appendChild(D("span",[B])):g.appendChild(B),e.map.push(e.pos,e.pos+E,B),e.col+=E,e.pos+=E}if(!R)break;S+=E+1;var J=void 0;if(R[0]==" "){var oe=e.cm.options.tabSize,Ee=oe-e.col%oe;J=g.appendChild(D("span",xe(Ee),"cm-tab")),J.setAttribute("role","presentation"),J.setAttribute("cm-text"," "),e.col+=Ee}else R[0]=="\r"||R[0]==`
`?(J=g.appendChild(D("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),J.setAttribute("cm-text",R[0]),e.col+=1):(J=e.cm.options.specialCharPlaceholder(R[0]),J.setAttribute("cm-text",R[0]),b&&O<9?g.appendChild(D("span",[J])):g.appendChild(J),e.col+=1);e.map.push(e.pos,e.pos+1,J),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var ze=r||"";n&&(ze+=n),i&&(ze+=i);var Me=D("span",[g],ze,o);if(a)for(var Ze in a)a.hasOwnProperty(Ze)&&Ze!="style"&&Ze!="class"&&Me.setAttribute(Ze,a[Ze]);return e.content.appendChild(Me)}e.content.appendChild(g)}}function P(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 M(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,g=u+n.length;;){for(var S=void 0,R=0;R<t.length&&(S=t[R],!(S.to>u&&S.from<=u));R++);if(S.to>=g)return e(r,n,i,o,a,l,s);e(r,n.slice(0,S.to-u),i,o,null,l,s),o=null,n=n.slice(S.to-u),u=S.to}}}function k(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Q(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var a=1;a<r.length;a+=2)t.addToken(t,i.slice(o,o=r[a]),Po(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,g="",S,R,E=0,B,J,oe,Ee,ze;;){if(E==s){B=J=oe=R="",ze=null,Ee=null,E=1/0;for(var Me=[],Ze=void 0,pt=0;pt<n.length;++pt){var it=n[pt],kt=it.marker;if(kt.type=="bookmark"&&it.from==s&&kt.widgetNode)Me.push(kt);else if(it.from<=s&&(it.to==null||it.to>s||kt.collapsed&&it.to==s&&it.from==s)){if(it.to!=null&&it.to!=s&&E>it.to&&(E=it.to,J=""),kt.className&&(B+=" "+kt.className),kt.css&&(R=(R?R+";":"")+kt.css),kt.startStyle&&it.from==s&&(oe+=" "+kt.startStyle),kt.endStyle&&it.to==E&&(Ze||(Ze=[])).push(kt.endStyle,it.to),kt.title&&((ze||(ze={})).title=kt.title),kt.attributes)for(var Bn in kt.attributes)(ze||(ze={}))[Bn]=kt.attributes[Bn];kt.collapsed&&(!Ee||xi(Ee.marker,kt)<0)&&(Ee=it)}else it.from>s&&E>it.from&&(E=it.from)}if(Ze)for(var Dr=0;Dr<Ze.length;Dr+=2)Ze[Dr+1]==E&&(J+=" "+Ze[Dr]);if(!Ee||Ee.from==s)for(var lr=0;lr<Me.length;++lr)k(t,0,Me[lr]);if(Ee&&(Ee.from||0)==s){if(k(t,(Ee.to==null?l+1:Ee.to)-s,Ee.marker,Ee.from==null),Ee.to==null)return;Ee.to==s&&(Ee=!1)}}if(s>=l)break;for(var Mi=Math.min(l,E);;){if(g){var mi=s+g.length;if(!Ee){var Er=mi>Mi?g.slice(0,Mi-s):g;t.addToken(t,Er,S?S+B:B,oe,s+Er.length==E?J:"",R,ze)}if(mi>=Mi){g=g.slice(Mi-s),s=Mi;break}s=mi,oe=""}g=i.slice(o,o=r[u++]),S=Po(r[u++],t.cm.options)}}}function ce(e,t,r){this.line=t,this.rest=Co(t),this.size=this.rest?ge(de(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ii(e,t)}function Ce(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new ce(e.doc,F(e.doc,o),o);i=o+a.size,n.push(a)}return n}var Te=null;function ee(e){Te?Te.ops.push(e):e.ownsGroup=Te={ops:[e],delayedCallbacks:[]}}function te(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 ne(e,t){var r=e.ownsGroup;if(r)try{te(r)}finally{Te=null,t(r)}}var He=null;function re(e,t){var r=hn(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Te?i=Te.delayedCallbacks:He?i=He:(i=He=[],setTimeout(Je,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function Je(){var e=He;He=null;for(var t=0;t<e.length;++t)e[t]()}function Ot(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?It(e,t):o=="gutter"?Xt(e,t,r,n):o=="class"?an(e,t):o=="widget"&&yt(e,t,n)}t.changes=null}function Tt(e){return e.node==e.text&&(e.node=D("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),b&&O<8&&(e.node.style.zIndex=2)),e.node}function Lt(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=Tt(t);t.background=n.insertBefore(D("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function mt(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):wo(e,t)}function It(e,t){var r=t.text.className,n=mt(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,an(e,t)):r&&(t.text.className=r)}function an(e,t){Lt(e,t),t.line.wrapClass?Tt(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 Xt(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=Tt(t);t.gutterBackground=D("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=Tt(t),l=t.gutter=D("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(D("div",$t(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,g=o.hasOwnProperty(u)&&o[u];g&&l.appendChild(D("div",[g],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function yt(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);Ut(e,t,r)}function Kt(e,t,r,n){var i=mt(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),an(e,t),Xt(e,t,r,n),Ut(e,t,n),t.node}function Ut(e,t,r){if(ln(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)ln(e,t.rest[n],t,r,!1)}function ln(e,t,r,n,i){if(t.widgets)for(var o=Tt(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=D("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),jt(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),re(s,"redraw")}}function jt(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 en(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!We(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;"),G(t.display.measure,D("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function wn(e,t){for(var r=Si(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function sn(e){return e.lineSpace.offsetTop}function un(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function cn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=G(e.measure,D("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function ut(e){return ct-e.display.nativeBarWidth}function bt(e){return e.display.scroller.clientWidth-ut(e)-e.display.barWidth}function Nt(e){return e.display.scroller.clientHeight-ut(e)-e.display.barHeight}function Jt(e,t,r){var n=e.options.lineWrapping,i=n&&bt(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function zr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(ge(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Cr(e,t){t=fi(t);var r=ge(t),n=e.display.externalMeasured=new ce(e.doc,t,r);n.lineN=r;var i=n.built=wo(e,n);return n.text=i.pre,G(e.display.lineMeasure,i.pre),n}function or(e,t,r,n){return kn(e,Yt(e,t),r,n)}function xr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[vr(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Yt(e,t){var r=ge(t),n=xr(e,r);n&&!n.text?n=null:n&&n.changes&&(Ot(e,n,r,hi(e)),e.curOp.forceUpdate=!0),n||(n=Cr(e,t));var i=zr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function kn(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||(Jt(e,t.view,t.rect),t.hasHeights=!0),a=Wt(e,t,r,n),a.bogus||(t.cache[o]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var Qr={left:0,right:0,top:0,bottom:0};function Pt(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 et(e,t){var r=Qr;if(t=="left")for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function Wt(e,t,r,n){var i=Pt(t.map,r,n),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var g=0;g<4;g++){for(;a&&Zt(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&Zt(t.line.text.charAt(i.coverStart+l));)++l;if(b&&O<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=et(q(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}b&&O<11&&(u=En(e.display.measure,u))}else{a>0&&(s=n="right");var S;e.options.lineWrapping&&(S=o.getClientRects()).length>1?u=S[n=="right"?S.length-1:0]:u=o.getBoundingClientRect()}if(b&&O<9&&!a&&(!u||!u.left&&!u.right)){var R=o.parentNode.getClientRects()[0];R?u={left:R.left,right:R.left+ei(e.display),top:R.top,bottom:R.bottom}:u=Qr}for(var E=u.top-t.rect.top,B=u.bottom-t.rect.top,J=(E+B)/2,oe=t.view.measure.heights,Ee=0;Ee<oe.length-1&&!(J<oe[Ee]);Ee++);var ze=Ee?oe[Ee-1]:0,Me=oe[Ee],Ze={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:ze,bottom:Me};return!u.left&&!u.right&&(Ze.bogus=!0),e.options.singleCursorHeightPerLine||(Ze.rtop=E,Ze.rbottom=B),Ze}function En(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!$e(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 dn(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 nn(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)dn(e.display.view[t])}function At(e){nn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Ln(){return Z&&be?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Jn(){return Z&&be?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Vn(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=en(e.widgets[r]));return t}function sr(e,t,r,n,i){if(!i){var o=Vn(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Ri(t);if(n=="local"?a+=sn(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(n=="window"?0:Jn());var s=l.left+(n=="window"?0:Ln());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function Gn(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=Ln(),i-=Jn();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 ar(e,t,r,n,i){return n||(n=F(e.doc,t.line)),sr(e,n,or(e,n,t.ch,i),r)}function On(e,t,r,n,i,o){n=n||F(e.doc,t.line),i||(i=Yt(e,n));function a(B,J){var oe=kn(e,i,B,J?"right":"left",o);return J?oe.left=oe.right:oe.right=oe.left,sr(e,n,oe,r)}var l=on(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 g(B,J,oe){var Ee=l[J],ze=Ee.level==1;return a(oe?B-1:B,ze!=oe)}var S=zt(l,s,u),R=Ht,E=g(s,S,u=="before");return R!=null&&(E.other=g(s,R,u!="before")),E}function Hn(e,t){var r=0;t=Pe(e.doc,t),e.options.lineWrapping||(r=ei(e.display)*t.ch);var n=F(e.doc,t.line),i=Ri(n)+sn(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Br(e,t,r,n,i){var o=z(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Jr(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return Br(n.first,0,null,-1,-1);var i=Ie(n,r),o=n.first+n.size-1;if(i>o)return Br(n.first+n.size-1,F(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=F(n,i);;){var l=wr(e,a,i,t,r),s=Gi(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=F(n,i=u.line)}}function qr(e,t,r,n){n-=Vn(t);var i=t.text.length,o=at(function(a){return kn(e,r,a-1).bottom<=n},i,0);return i=at(function(a){return kn(e,r,a).top>n},o,i),{begin:o,end:i}}function dr(e,t,r,n){r||(r=Yt(e,t));var i=sr(e,t,kn(e,r,n),"line").top;return qr(e,t,r,i)}function Tn(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function wr(e,t,r,n,i){i-=Ri(t);var o=Yt(e,t),a=Vn(t),l=0,s=t.text.length,u=!0,g=on(t,e.doc.direction);if(g){var S=(e.options.lineWrapping?Lr:di)(e,t,r,o,g,n,i);u=S.level!=1,l=u?S.from:S.to-1,s=u?S.to:S.from-1}var R=null,E=null,B=at(function(pt){var it=kn(e,o,pt);return it.top+=a,it.bottom+=a,Tn(it,n,i,!1)?(it.top<=i&&it.left<=n&&(R=pt,E=it),!0):!1},l,s),J,oe,Ee=!1;if(E){var ze=n-E.left<E.right-n,Me=ze==u;B=R+(Me?0:1),oe=Me?"after":"before",J=ze?E.left:E.right}else{!u&&(B==s||B==l)&&B++,oe=B==0?"after":B==t.text.length?"before":kn(e,o,B-(u?1:0)).bottom+a<=i==u?"after":"before";var Ze=On(e,z(r,B,oe),"line",t,o);J=Ze.left,Ee=i<Ze.top?-1:i>=Ze.bottom?1:0}return B=xt(t.text,B,1),Br(r,B,oe,Ee,n-J)}function di(e,t,r,n,i,o,a){var l=at(function(S){var R=i[S],E=R.level!=1;return Tn(On(e,z(r,E?R.to:R.from,E?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,g=On(e,z(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Tn(g,o,a,!0)&&g.top>a&&(s=i[l-1])}return s}function Lr(e,t,r,n,i,o,a){var l=qr(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var g=null,S=null,R=0;R<i.length;R++){var E=i[R];if(!(E.from>=u||E.to<=s)){var B=E.level!=1,J=kn(e,n,B?Math.min(u,E.to)-1:Math.max(s,E.from)).right,oe=J<o?o-J+1e9:J-o;(!g||S>oe)&&(g=E,S=oe)}}return g||(g=i[i.length-1]),g.from<s&&(g={from:s,to:g.to,level:g.level}),g.to>u&&(g={from:g.from,to:u,level:g.level}),g}var qn;function hr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(qn==null){qn=D("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)qn.appendChild(document.createTextNode("x")),qn.appendChild(D("br"));qn.appendChild(document.createTextNode("x"))}G(e.measure,qn);var r=qn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),T(e.measure),r||1}function ei(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=D("span","xxxxxxxxxx"),r=D("pre",[t],"CodeMirror-line-like");G(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function hi(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=o.offsetLeft+o.clientLeft+i,n[l]=o.clientWidth}return{fixedPos:Bi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Bi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zi(e){var t=hr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/ei(e.display)-3);return function(i){if(Ii(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function ti(e){var t=e.doc,r=zi(e);t.iter(function(n){var i=r(n);i!=n.height&&Xe(n,i)})}function vi(e,t,r,n){var i=e.display;if(!r&&Si(t).getAttribute("cm-not-content")=="true")return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(S){return null}var s=Jr(e,o,a),u;if(n&&s.xRel>0&&(u=F(e.doc,s.line).text).length==s.ch){var g=Qe(u,u.length,e.options.tabSize)-u.length;s=z(s.line,Math.max(0,Math.round((o-cn(e.display).left)/ei(e.display))-g))}return s}function vr(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 pr(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)Qn&&qi(e.doc,t)<i.viewTo&&Tr(e);else if(r<=i.viewFrom)Qn&&Ro(e.doc,r+n)>i.viewFrom?Tr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Tr(e);else if(t<=i.viewFrom){var o=Li(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Tr(e)}else if(r>=i.viewTo){var a=Li(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Tr(e)}else{var l=Li(e,t,t,-1),s=Li(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Ce(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Tr(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function ni(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[vr(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);Se(a,r)==-1&&a.push(r)}}}function Tr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Li(e,t,r,n){var i=vr(e,t),o,a=e.display.view;if(!Qn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(n>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,r+=o}for(;qi(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function _i(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Ce(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ce(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(vr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Ce(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,vr(e,r)))),n.viewTo=r}function to(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function wi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Zi(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(!(!t&&a==r.sel.primIndex)){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Ft(e,l.head,i),s||Ye(e,l,o)}}return n}function Ft(e,t,r){var n=On(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(D("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(D("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function fe(e,t){return e.top-t.top||e.left-t.left}function Ye(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=cn(e.display),l=a.left,s=Math.max(n.sizerWidth,bt(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function g(Me,Ze,pt,it){Ze<0&&(Ze=0),Ze=Math.round(Ze),it=Math.round(it),o.appendChild(D("div",null,"CodeMirror-selected","position: absolute; left: "+Me+`px;
top: `+Ze+"px; width: "+(pt==null?s-Me:pt)+`px;
height: `+(it-Ze)+"px"))}function S(Me,Ze,pt){var it=F(i,Me),kt=it.text.length,Bn,Dr;function lr(Er,yi){return ar(e,z(Me,Er),"div",it,yi)}function Mi(Er,yi,Wr){var Pr=dr(e,it,null,Er),Mr=yi=="ltr"==(Wr=="after")?"left":"right",ur=Wr=="after"?Pr.begin:Pr.end-(/\s/.test(it.text.charAt(Pr.end-1))?2:1);return lr(ur,Mr)[Mr]}var mi=on(it,i.direction);return Qt(mi,Ze||0,pt==null?kt:pt,function(Er,yi,Wr,Pr){var Mr=Wr=="ltr",ur=lr(Er,Mr?"left":"right"),bi=lr(yi-1,Mr?"right":"left"),jo=Ze==null&&Er==0,So=pt==null&&yi==kt,Kr=Pr==0,Ji=!mi||Pr==mi.length-1;if(bi.top-ur.top<=3){var Nr=(u?jo:So)&&Kr,Ja=(u?So:jo)&&Ji,so=Nr?l:(Mr?ur:bi).left,Oo=Ja?s:(Mr?bi:ur).right;g(so,ur.top,Oo-so,ur.bottom)}else{var Io,ai,ko,qa;Mr?(Io=u&&jo&&Kr?l:ur.left,ai=u?s:Mi(Er,Wr,"before"),ko=u?l:Mi(yi,Wr,"after"),qa=u&&So&&Ji?s:bi.right):(Io=u?Mi(Er,Wr,"before"):l,ai=!u&&jo&&Kr?s:ur.right,ko=!u&&So&&Ji?l:bi.left,qa=u?Mi(yi,Wr,"after"):s),g(Io,ur.top,ai-Io,ur.bottom),ur.bottom<bi.top&&g(l,ur.bottom,null,bi.top),g(ko,bi.top,qa-ko,bi.bottom)}(!Bn||fe(ur,Bn)<0)&&(Bn=ur),fe(bi,Bn)<0&&(Bn=bi),(!Dr||fe(ur,Dr)<0)&&(Dr=ur),fe(bi,Dr)<0&&(Dr=bi)}),{start:Bn,end:Dr}}var R=t.from(),E=t.to();if(R.line==E.line)S(R.line,R.ch,E.ch);else{var B=F(i,R.line),J=F(i,E.line),oe=fi(B)==fi(J),Ee=S(R.line,R.ch,oe?B.text.length+1:null).end,ze=S(E.line,oe?0:null,E.ch).start;oe&&(Ee.top<ze.top-2?(g(Ee.right,Ee.top,null,Ee.bottom),g(l,ze.top,ze.left,ze.bottom)):g(Ee.right,Ee.top,ze.left-Ee.right,Ee.bottom)),Ee.bottom<ze.top&&g(l,Ee.bottom,null,ze.top)}r.appendChild(o)}function _e(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ri(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function vt(e){e.state.focused||(e.display.input.focus(),$n(e))}function Fn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ri(e))},100)}function $n(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(yn(e,"focus",e,t),e.state.focused=!0,ke(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),m&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),_e(e))}function ri(e,t){e.state.delayingBlurEvent||(e.state.focused&&(yn(e,"blur",e,t),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function pi(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(b&&O<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 g=i.line.height-a;if((g>.005||g<-.005)&&(Xe(i.line,a),Ki(i.line),i.rest))for(var S=0;S<i.rest.length;S++)Ki(i.rest[S]);if(l>e.display.sizerWidth){var R=Math.ceil(l/ei(e.display));R>e.display.maxLineLength&&(e.display.maxLineLength=R,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ki(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 gr(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-sn(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=Ie(t,n),a=Ie(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=Ie(t,Ri(F(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=Ie(t,Ri(F(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Qi(e,t){if(!bn(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&&!Re){var o=D("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-sn(e.display))+`px;
height: `+(t.bottom-t.top+ut(e)+r.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Do(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?z(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?z(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=On(e,t),s=!r||r==t?l:On(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=No(e,i),g=e.doc.scrollTop,S=e.doc.scrollLeft;if(u.scrollTop!=null&&(Mo(e,u.scrollTop),Math.abs(e.doc.scrollTop-g)>1&&(a=!0)),u.scrollLeft!=null&&(no(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-S)>1&&(a=!0)),!a)break}return i}function Go(e,t){var r=No(e,t);r.scrollTop!=null&&Mo(e,r.scrollTop),r.scrollLeft!=null&&no(e,r.scrollLeft)}function No(e,t){var r=e.display,n=hr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=Nt(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+un(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 g=Math.min(t.top,(u?l:t.bottom)-o);g!=i&&(a.scrollTop=g)}var S=e.options.fixedGutter?0:r.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-S,E=bt(e)-r.gutters.offsetWidth,B=t.right-t.left>E;return B&&(t.right=t.left+E),t.left<10?a.scrollLeft=0:t.left<R?a.scrollLeft=Math.max(0,t.left+S-(B?0:10)):t.right>E+R-3&&(a.scrollLeft=t.right+(B?0:10)-E),a}function Ui(e,t){t!=null&&(Ao(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ii(e){Ao(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Eo(e,t,r){(t!=null||r!=null)&&Ao(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function co(e,t){Ao(e),e.curOp.scrollToPos=t}function Ao(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=Hn(e,t.from),n=Hn(e,t.to);fa(e,r,n,t.margin)}}function fa(e,t,r,n){var i=No(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});Eo(e,i.scrollLeft,i.scrollTop)}function Mo(e,t){Math.abs(e.doc.scrollTop-t)<2||(w||Na(e,{top:t}),da(e,t,!0),w&&Na(e),Ei(e,100))}function da(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function no(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,tl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function fo(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+un(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+ut(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var ro=function(e,t,r){this.cm=r;var n=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),ue(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ue(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&O<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ro.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},ro.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ro.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ro.prototype.zeroWidthHack=function(){var e=K&&!ie?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Oe,this.disableVert=new Oe},ro.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),o=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},ro.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ho=function(){};ho.prototype.update=function(){return{bottom:0,right:0}},ho.prototype.setScrollLeft=function(){},ho.prototype.setScrollTop=function(){},ho.prototype.clear=function(){};function io(e,t){t||(t=fo(e));var r=e.display.barWidth,n=e.display.barHeight;ha(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&pi(e),ha(e,fo(e)),r=e.display.barWidth,n=e.display.barHeight}function ha(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Xo={native:ro,null:ho};function va(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Xo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ue(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?no(e,t):Mo(e,t)},e),e.display.scrollbars.addClass&&ke(e.display.wrapper,e.display.scrollbars.addClass)}var Pa=0;function oo(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Pa},ee(e.curOp)}function ao(e){var t=e.curOp;t&&ne(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;pa(r)})}function pa(e){for(var t=e.ops,r=0;r<t.length;r++)Yo(t[r]);for(var n=0;n<t.length;n++)rn(t[n]);for(var i=0;i<t.length;i++)Bt(t[i]);for(var o=0;o<t.length;o++)Hr(t[o]);for(var a=0;a<t.length;a++)oi(t[a])}function Yo(e){var t=e.cm,r=t.display;ga(t),e.updateMaxLine&&eo(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ti(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function rn(e){e.updatedDisplay=e.mustUpdate&&Da(e.cm,e.update)}function Bt(e){var t=e.cm,r=t.display;e.updatedDisplay&&pi(t),e.barMeasure=fo(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=or(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+ut(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-bt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Hr(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&no(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==se();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&io(t,e.barMeasure),e.updatedDisplay&&Fa(t,e.barMeasure),e.selectionChanged&&_e(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&vt(e.cm)}function oi(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&el(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&da(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&no(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Do(t,Pe(n,e.scrollToPos.from),Pe(n,e.scrollToPos.to),e.scrollToPos.margin);Qi(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||yn(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&yn(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&yn(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function gn(e,t){if(e.curOp)return t();oo(e);try{return t()}finally{ao(e)}}function Mn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);oo(e);try{return t.apply(e,arguments)}finally{ao(e)}}}function Wn(e){return function(){if(this.curOp)return e.apply(this,arguments);oo(this);try{return e.apply(this,arguments)}finally{ao(this)}}}function tr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);oo(t);try{return e.apply(this,arguments)}finally{ao(t)}}}function Ei(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,lt(vo,e))}function vo(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Nn(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?L(t.mode,n.state):null,s=yr(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,g=s.classes;g?o.styleClasses=g:u&&(o.styleClasses=null);for(var S=!a||a.length!=o.styles.length||u!=g&&(!u||!g||u.bgClass!=g.bgClass||u.textClass!=g.textClass),R=0;!S&&R<a.length;++R)S=a[R]!=o.styles[R];S&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Or(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Ei(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&gn(e,function(){for(var o=0;o<i.length;o++)ni(e,i[o],"text")})}}var Ti=function(e,t,r){var n=e.display;this.viewport=t,this.visible=gr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=bt(e),this.force=r,this.dims=hi(e),this.events=[]};Ti.prototype.signal=function(e,t){rr(e,t)&&this.events.push(arguments)},Ti.prototype.finish=function(){for(var e=0;e<this.events.length;e++)yn.apply(null,this.events[e])};function ga(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=ut(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=ut(e)+"px",t.scrollbarsClipped=!0)}function os(e){if(e.hasFocus())return null;var t=se();if(!t||!We(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&We(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==se())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&We(document.body,e.anchorNode)&&We(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Da(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Tr(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&to(e)==0)return!1;nl(e)&&(Tr(e),t.dims=hi(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Qn&&(o=qi(e.doc,o),a=Ro(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;_i(e,o,a),r.viewOffset=Ri(F(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=to(e);if(!l&&s==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=os(e);return s>4&&(r.lineDiv.style.display="none"),ls(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,as(u),T(r.cursorDiv),T(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Ei(e,400)),r.updateLineNumbers=null,!0}function el(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==bt(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+un(e.display)-Nt(e),r.top)}),t.visible=gr(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=gr(e.display,e.doc,r));if(!Da(e,t))break;pi(e);var i=fo(e);wi(e),io(e,i),Fa(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 Na(e,t){var r=new Ti(e,t);if(Da(e,r)){pi(e),el(e,r);var n=fo(e);wi(e),io(e,n),Fa(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(B){var J=B.nextSibling;return m&&K&&e.display.currentWheelTarget==B?B.style.display="none":B.parentNode.removeChild(B),J}for(var s=n.view,u=n.viewFrom,g=0;g<s.length;g++){var S=s[g];if(!S.hidden)if(!S.node||S.node.parentNode!=o){var R=Kt(e,S,u,r);o.insertBefore(R,a)}else{for(;a!=S.node;)a=l(a);var E=i&&t!=null&&t<=u&&S.lineNumber;S.changes&&(Se(S.changes,"gutter")>-1&&(E=!1),Ot(e,S,u,r)),E&&(T(S.lineNumber),S.lineNumber.appendChild(document.createTextNode($t(e.options,u)))),a=S.node.nextSibling}u+=S.size}for(;a;)a=l(a)}function Aa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Fa(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+ut(e)+"px"}function tl(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=Bi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function nl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=$t(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(D("div",[D("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Aa(e.display),!0}return!1}function $a(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null;if(typeof o!="string"&&(a=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function rl(e){var t=e.gutters,r=e.gutterSpecs;T(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,l=t.appendChild(D("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),o=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Aa(e)}function _o(e){rl(e.display),pr(e),tl(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=D("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=D("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=H("div",null,"CodeMirror-code"),i.selectionDiv=D("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=D("div",null,"CodeMirror-cursors"),i.measure=D("div",null,"CodeMirror-measure"),i.lineMeasure=D("div",null,"CodeMirror-measure"),i.lineSpace=H("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=H("div",[i.lineSpace],"CodeMirror-lines");i.mover=D("div",[o],null,"position: relative"),i.sizer=D("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=D("div",null,null,"position: absolute; height: "+ct+"px; width: 1px;"),i.gutters=D("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=D("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=D("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),b&&O<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!m&&!(w&&pe)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=$a(n.gutters,n.lineNumbers),rl(i),r.init(i)}var ma=0,Pi=null;b?Pi=-.53:w?Pi=15:Z?Pi=-.7:me&&(Pi=-1/3);function il(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function us(e){var t=il(e);return t.x*=Pi,t.y*=Pi,t}function ol(e,t){var r=il(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&K&&m){e:for(var u=t.target,g=o.view;u!=a;u=u.parentNode)for(var S=0;S<g.length;S++)if(g[S].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!w&&!v&&Pi!=null){i&&s&&Mo(e,Math.max(0,a.scrollTop+i*Pi)),no(e,Math.max(0,a.scrollLeft+n*Pi)),(!i||i&&s)&&zn(t),o.wheelStartX=null;return}if(i&&Pi!=null){var R=i*Pi,E=e.doc.scrollTop,B=E+o.wrapper.clientHeight;R<0?E=Math.max(0,E+R-50):B=Math.min(e.doc.height,B+R+50),Na(e,{top:E,bottom:B})}ma<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(o.wheelStartX!=null){var J=a.scrollLeft-o.wheelStartX,oe=a.scrollTop-o.wheelStartY,Ee=oe&&o.wheelDY&&oe/o.wheelDY||J&&o.wheelDX&&J/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Ee&&(Pi=(Pi*ma+Ee)/(ma+1),++ma)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Di=function(e,t){this.ranges=e,this.primIndex=t};Di.prototype.primary=function(){return this.ranges[this.primIndex]},Di.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Vt(r.anchor,n.anchor)||!Vt(r.head,n.head))return!1}return!0},Di.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new In(vn(this.ranges[t].anchor),vn(this.ranges[t].head));return new Di(e,this.primIndex)},Di.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Di.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Ne(t,n.from())>=0&&Ne(e,n.to())<=0)return r}return-1};var In=function(e,t){this.anchor=e,this.head=t};In.prototype.from=function(){return dt(this.anchor,this.head)},In.prototype.to=function(){return Et(this.anchor,this.head)},In.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ji(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(R,E){return Ne(R.from(),E.from())}),r=Se(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=Ne(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=dt(l.from(),a.from()),g=Et(l.to(),a.to()),S=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new In(S?g:u,S?u:g))}}return new Di(t,r)}function po(e,t){return new Di([new In(e,t||e)],0)}function go(e){return e.text?z(e.from.line+e.text.length-1,de(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function al(e,t){if(Ne(e,t.from)<0)return e;if(Ne(e,t.to)<=0)return go(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=go(t).ch-t.to.ch),z(r,n)}function za(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new In(al(i.anchor,t),al(i.head,t)))}return ji(e.cm,r,e.sel.primIndex)}function ll(e,t,r){return e.line==t.line?z(r.line,e.ch-t.ch+r.ch):z(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=z(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=ll(l.from,i,o),u=ll(go(l),i,o);if(i=l.to,o=u,r=="around"){var g=e.sel.ranges[a],S=Ne(g.head,g.anchor)<0;n[a]=new In(S?u:s,S?s:u)}else n[a]=new In(s,s)}return new Di(n,e.sel.primIndex)}function Ha(e){e.doc.mode=rt(e.options,e.doc.modeOption),Qo(e)}function Qo(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ei(e,100),e.state.modeGen++,e.curOp&&pr(e)}function sl(e,t){return t.from.ch==0&&t.to.ch==0&&de(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Wa(e,t,r,n){function i(ze){return r?r[ze]:null}function o(ze,Me,Ze){Lo(ze,Me,Ze,n),re(ze,"change",ze,t)}function a(ze,Me){for(var Ze=[],pt=ze;pt<Me;++pt)Ze.push(new $i(u[pt],i(pt),n));return Ze}var l=t.from,s=t.to,u=t.text,g=F(e,l.line),S=F(e,s.line),R=de(u),E=i(u.length-1),B=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(sl(e,t)){var J=a(0,u.length-1);o(S,S.text,E),B&&e.remove(l.line,B),J.length&&e.insert(l.line,J)}else if(g==S)if(u.length==1)o(g,g.text.slice(0,l.ch)+R+g.text.slice(s.ch),E);else{var oe=a(1,u.length-1);oe.push(new $i(R+g.text.slice(s.ch),E,n)),o(g,g.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,oe)}else if(u.length==1)o(g,g.text.slice(0,l.ch)+u[0]+S.text.slice(s.ch),i(0)),e.remove(l.line+1,B);else{o(g,g.text.slice(0,l.ch)+u[0],i(0)),o(S,R+S.text.slice(s.ch),E);var Ee=a(1,u.length-1);B>1&&e.remove(l.line+1,B-1),e.insert(l.line+1,Ee)}re(e,"change",e,t)}function mo(e,t,r){function n(i,o,a){if(i.linked)for(var l=0;l<i.linked.length;++l){var s=i.linked[l];if(s.doc!=o){var u=a&&s.sharedHist;r&&!u||(t(s.doc,u),n(s.doc,i,u))}}}n(e,null,!0)}function ul(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ti(e),Ha(e),cl(e),e.options.lineWrapping||eo(e),e.options.mode=t.modeOption,pr(e)}function cl(e){(e.doc.direction=="rtl"?ke:C)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){gn(e,function(){cl(e),pr(e)})}function ya(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ba(e,t){var r={from:vn(t.from),to:go(t),text:De(e,t.from,t.to)};return hl(e,r,t.from.line,t.to.line+1),mo(e,function(n){return hl(n,r,t.from.line,t.to.line+1)},!0),r}function fl(e){for(;e.length;){var t=de(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return fl(e.done),de(e.done);if(e.done.length&&!de(e.done).ranges)return de(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),de(e.done)}function dl(e,t,r,n){var i=e.history;i.undone.length=0;var o=+new Date,a,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(a=ds(i,i.lastOp==n)))l=de(a.changes),Ne(t.from,t.to)==0&&Ne(t.from,l.to)==0?l.to=go(t):a.changes.push(Ba(e,t));else{var s=de(i.done);for((!s||!s.ranges)&&ba(e.sel,i.done),a={changes:[Ba(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||yn(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,de(i.done),t))?i.done[i.done.length-1]=t:ba(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&fl(i.undone)}function ba(e,t){var r=de(t);r&&r.ranges&&r.equals(e)||t.push(e)}function hl(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function ps(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function gs(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ps(r[i]));return n}function vl(e,t){var r=gs(e,t),n=ci(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function Fo(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?Di.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],g=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var S in u)(g=S.match(/^spans_(\d+)$/))&&Se(t,Number(g[1]))>-1&&(de(l)[S]=u[S],delete u[S])}}return n}function Za(e,t,r,n){if(n){var i=e.anchor;if(r){var o=Ne(t,i)<0;o!=Ne(r,i)<0?(i=t,t=r):o!=Ne(t,r)<0&&(t=r)}return new In(i,t)}else return new In(r||t,t)}function Sa(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Zr(e,new Di([Za(e.sel.primary(),t,r,i)],0),n)}function pl(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Za(e.sel.ranges[o],t[o],null,i);var a=ji(e.cm,n,e.sel.primIndex);Zr(e,a,r)}function Ka(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Zr(e,ji(e.cm,i,e.sel.primIndex),n)}function gl(e,t,r,n){Zr(e,po(t,r),n)}function ms(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new In(Pe(e,i[o].anchor),Pe(e,i[o].head))},origin:r&&r.origin};return yn(e,"beforeSelectionChange",e,n),e.cm&&yn(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?ji(e.cm,n.ranges,n.ranges.length-1):t}function ml(e,t,r){var n=e.history.done,i=de(n);i&&i.ranges?(n[n.length-1]=t,Ca(e,t,r)):Zr(e,t,r)}function Zr(e,t,r){Ca(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Ca(e,t,r){(rr(e,"beforeSelectionChange")||e.cm&&rr(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(Ne(t.primary().head,e.sel.primary().head)<0?-1:1);yl(e,Sl(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&ii(e.cm)}function yl(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ur(e.cm)),re(e,"cursorActivity",e))}function bl(e){yl(e,Sl(e,e.sel,null,!1))}function Sl(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=xa(e,a.anchor,l&&l.anchor,r,n),u=xa(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new In(s,u))}return i?ji(e.cm,i,t.primIndex):t}function $o(e,t,r,n,i){var o=F(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,g="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(g?l.to>=t.ch:l.to>t.ch))){if(i&&(yn(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var S=s.find(n<0?1:-1),R=void 0;if((n<0?g:u)&&(S=Cl(e,S,-n,S&&S.line==t.line?o:null)),S&&S.line==t.line&&(R=Ne(S,r))&&(n<0?R<0:R>0))return $o(e,S,t,n,i)}var E=s.find(n<0?-1:1);return(n<0?u:g)&&(E=Cl(e,E,n,E.line==t.line?o:null)),E?$o(e,E,t,n,i):null}}return t}function xa(e,t,r,n,i){var o=n||1,a=$o(e,t,r,o,i)||!i&&$o(e,t,r,o,!0)||$o(e,t,r,-o,i)||!i&&$o(e,t,r,-o,!0);return a||(e.cantEdit=!0,z(e.first,0))}function Cl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?Pe(e,z(t.line-1)):null:r>0&&t.ch==(n||F(e,t.line)).text.length?t.line<e.first+e.size-1?z(t.line+1,0):null:new z(t.line,t.ch+r)}function xl(e){e.setSelection(z(e.firstLine(),0),z(e.lastLine()),Ke)}function wl(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=Pe(e,i)),o&&(n.to=Pe(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),yn(e,"beforeChange",e,n),e.cm&&yn(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 zo(e,t,r){if(e.cm){if(!e.cm.curOp)return Mn(e.cm,zo)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((rr(e,"beforeChange")||e.cm&&rr(e.cm,"beforeChange"))&&(t=wl(e,t,!0),!t))){var n=Un&&!r&&Yr(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)El(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else El(e,t)}}function El(e,t){if(!(t.text.length==1&&t.text[0]==""&&Ne(t.from,t.to)==0)){var r=za(e,t);dl(e,t,r,e.cm?e.cm.curOp.id:NaN),Jo(e,t,r,ci(e,t));var n=[];mo(e,function(i,o){!o&&Se(n,i.history)==-1&&(Rl(i.history,t),n.push(i.history)),Jo(i,t,null,ci(i,t))})}}function wa(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!r)){for(var i=e.history,o,a=e.sel,l=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u<l.length&&(o=l[u],!(r?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=l.pop(),o.ranges){if(ba(o,s),r&&!o.equals(e.sel)){Zr(e,o,{clearRedo:!1});return}a=o}else if(n){l.push(o);return}else break;var g=[];ba(a,s),s.push({changes:g,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var S=rr(e,"beforeChange")||e.cm&&rr(e.cm,"beforeChange"),R=function(J){var oe=o.changes[J];if(oe.origin=t,S&&!wl(e,oe,!1))return l.length=0,{};g.push(Ba(e,oe));var Ee=J?za(e,oe):de(l);Jo(e,oe,Ee,vl(e,oe)),!J&&e.cm&&e.cm.scrollIntoView({from:oe.from,to:go(oe)});var ze=[];mo(e,function(Me,Ze){!Ze&&Se(ze,Me.history)==-1&&(Rl(Me.history,oe),ze.push(Me.history)),Jo(Me,oe,null,vl(Me,oe))})},E=o.changes.length-1;E>=0;--E){var B=R(E);if(B)return B.v}}}}function Ml(e,t){if(t!=0&&(e.first+=t,e.sel=new Di(Fe(e.sel.ranges,function(i){return new In(z(i.anchor.line+t,i.anchor.ch),z(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){pr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)ni(e.cm,n,"gutter")}}function Jo(e,t,r,n){if(e.cm&&!e.cm.curOp)return Mn(e.cm,Jo)(e,t,r,n);if(t.to.line<e.first){Ml(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Ml(e,i),t={from:z(e.first,0),to:z(t.to.line+i,t.to.ch),text:[de(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:z(o,F(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=De(e,t.from,t.to),r||(r=za(e,t)),e.cm?ys(e.cm,t,n):Wa(e,t,n),Ca(e,r,Ke),e.cantEdit&&xa(e,z(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=ge(fi(F(n,o.line))),n.iter(s,a.line+1,function(E){if(E==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ur(e),Wa(n,t,r,zi(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(E){var B=Xi(E);B>i.maxLineLength&&(i.maxLine=E,i.maxLineLength=B,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Kn(n,o.line),Ei(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?pr(e):o.line==a.line&&t.text.length==1&&!sl(e.doc,t)?ni(e,o.line,"text"):pr(e,o.line,a.line+1,u);var g=rr(e,"changes"),S=rr(e,"change");if(S||g){var R={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};S&&re(e,"change",e,R),g&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function Ho(e,t,r,n,i){var o;n||(n=r),Ne(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),zo(e,{from:r,to:n,text:t,origin:i})}function Ol(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Il(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)Ol(o.ranges[l].anchor,t,r,n),Ol(o.ranges[l].head,t,r,n);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(r<u.from.line)u.from=z(u.from.line+n,u.from.ch),u.to=z(u.to.line+n,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function Rl(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Il(e.done,r,n,i),Il(e.undone,r,n,i)}function qo(e,t,r,n){var i=t,o=t;return typeof t=="number"?o=F(e,Sn(e,t)):i=ge(t),i==null?null:(n(o,i)&&e.cm&&ni(e.cm,i,r),o)}function ea(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}ea.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,To(i),re(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function ta(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}ta.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ea))){var l=[];this.collapse(l),this.children=[new ea(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new ea(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new ta(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=Se(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ta(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if((t-=a)==0)break;e=0}else e-=o}}};var na=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};na.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=ge(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=en(this);Xe(r,Math.max(0,r.height-o)),e&&(gn(e,function(){Ll(e,r,-o),ni(e,n,"widget")}),re(e,"lineWidgetCleared",e,this,n))}},na.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=en(this)-t;i&&(Ii(this.doc,n)||Xe(n,n.height+i),r&&gn(r,function(){r.curOp.forceUpdate=!0,Ll(r,n,i),re(r,"lineWidgetChanged",r,e,ge(n))}))},Ar(na);function Ll(e,t,r){Ri(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ui(e,r)}function bs(e,t,r,n){var i=new na(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),qo(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!Ii(e,a)){var s=Ri(a)<e.scrollTop;Xe(a,a.height+en(i)),s&&Ui(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&re(o,"lineWidgetAdded",o,i,typeof t=="number"?t:ge(t)),i}var Tl=0,yo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Tl};yo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&oo(e),rr(this,"clear")){var r=this.find();r&&re(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=jn(a.markedSpans,this);e&&!this.collapsed?ni(e,ge(a),"text"):e&&(l.to!=null&&(i=ge(a)),l.from!=null&&(n=ge(a))),a.markedSpans=Rr(a.markedSpans,l),l.from==null&&this.collapsed&&!Ii(this.doc,a)&&e&&Xe(a,hr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=fi(this.lines[s]),g=Xi(u);g>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=g,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&pr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&bl(e.doc)),e&&re(e,"markerCleared",e,this,n,i),t&&ao(e),this.parent&&this.parent.clear()}},yo.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=jn(o.markedSpans,this);if(a.from!=null&&(r=z(t?o:ge(o),a.from),e==-1))return r;if(a.to!=null&&(n=z(t?o:ge(o),a.to),e==1))return n}return r&&{from:r,to:n}},yo.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||gn(n,function(){var i=t.line,o=ge(t.line),a=xr(n,o);if(a&&(dn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ii(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=en(r)-l;s&&Xe(i,i.height+s)}re(n,"markerChanged",n,e)})},yo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Se(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},yo.prototype.detachLine=function(e){if(this.lines.splice(Se(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ar(yo);function Wo(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Mn(e.cm,Wo)(e,t,r,n,i);var o=new yo(e,i),a=Ne(t,r);if(n&&ot(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=H("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Fi(e,t.line,t,r,o)||t.line!=r.line&&Fi(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");pn()}o.addToHistory&&dl(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,u;if(e.iter(l,r.line+1,function(S){s&&o.collapsed&&!s.options.lineWrapping&&fi(S)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&Xe(S,0),ui(S,new An(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(S){Ii(e,S)&&Xe(S,0)}),o.clearOnEnter&&ue(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(fr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Tl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)pr(s,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var g=t.line;g<=r.line;g++)ni(s,g,"text");o.atomic&&bl(s.doc),re(s,"markerAdded",s,o)}return o}var ra=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};ra.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();re(this,"clear")}},ra.prototype.find=function(e,t){return this.primary.find(e,t)},Ar(ra);function Ss(e,t,r,n,i){n=ot(n),n.shared=!1;var o=[Wo(e,t,r,n,i)],a=o[0],l=n.widgetNode;return mo(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Wo(s,Pe(s,t),Pe(s,r),n,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=de(o)}),new ra(o,a)}function Pl(e){return e.findMarks(z(e.first,0),e.clipPos(z(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(Ne(o,a)){var l=Wo(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function xs(e){for(var t=function(n){var i=e[n],o=[i.primary.doc];mo(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];Se(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var ws=0,gi=function(e,t,r,n,i){if(!(this instanceof gi))return new gi(e,t,r,n,i);r==null&&(r=0),ta.call(this,[new ea([new $i("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=z(r,0);this.sel=po(o),this.history=new ya(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)),Wa(this,{from:o,to:o,text:e}),Zr(this,po(o),Ke)};gi.prototype=St(ta.prototype,{constructor:gi,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ft(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:tr(function(e){var t=z(this.first,0),r=this.first+this.size-1;zo(this,{from:t,to:z(r,F(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Eo(this.cm,0,0),Zr(this,po(t),Ke)}),replaceRange:function(e,t,r,n){t=Pe(this,t),r=r?Pe(this,r):t,Ho(this,e,t,r,n)},getRange:function(e,t,r){var n=De(this,Pe(this,e),Pe(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(Le(this,e))return F(this,e)},getLineNumber:function(e){return ge(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=F(this,e)),fi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Pe(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:tr(function(e,t,r){gl(this,Pe(this,typeof e=="number"?z(e,t||0):e),null,r)}),setSelection:tr(function(e,t,r){gl(this,Pe(this,e),Pe(this,t||e),r)}),extendSelection:tr(function(e,t,r){Sa(this,Pe(this,e),t&&Pe(this,t),r)}),extendSelections:tr(function(e,t){pl(this,Gt(this,e),t)}),extendSelectionsBy:tr(function(e,t){var r=Fe(this.sel.ranges,e);pl(this,Gt(this,r),t)}),setSelections:tr(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new In(Pe(this,e[i].anchor),Pe(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Zr(this,ji(this.cm,n,t),r)}}),addSelection:tr(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new In(Pe(this,e),Pe(this,t||e))),Zr(this,ji(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=De(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=De(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:tr(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--)zo(this,n[s]);l?ml(this,l):this.cm&&ii(this.cm)}),undo:tr(function(){wa(this,"undo")}),redo:tr(function(){wa(this,"redo")}),undoSelection:tr(function(){wa(this,"undo",!0)}),redoSelection:tr(function(){wa(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new ya(this.history.maxGeneration),mo(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Fo(this.history.done),undone:Fo(this.history.undone)}},setHistory:function(e){var t=this.history=new ya(this.history.maxGeneration);t.done=Fo(e.done.slice(0),null,!0),t.undone=Fo(e.undone.slice(0),null,!0)},setGutterMarker:tr(function(e,t,r){return qo(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&ht(i)&&(n.gutterMarkers=null),!0})}),clearGutter:tr(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&qo(t,r,"gutter",function(){return r.gutterMarkers[e]=null,ht(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Le(this,e)||(t=e,e=F(this,e),!e))return null}else if(t=ge(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:tr(function(e,t,r){return qo(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(c(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:tr(function(e,t,r){return qo(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=n[i];if(o)if(r==null)n[i]=null;else{var a=o.match(c(r));if(!a)return!1;var l=a.index+a[0].length;n[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:tr(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Wo(this,Pe(this,e),Pe(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=Pe(this,e),Wo(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Pe(this,e);var t=[],r=F(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=Pe(this,e),t=Pe(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}),Pe(this,z(r,t))},indexFromPos:function(e){e=Pe(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new gi(ft(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new gi(ft(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,Pl(this)),n},unlinkDoc:function(e){if(e instanceof nr&&(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(Pl(this));break}}if(e.history==this.history){var n=[e.id];mo(e,function(i){return n.push(i.id)},!0),e.history=new ya(null),e.history.done=Fo(this.history.done,n),e.history.undone=Fo(this.history.undone,n)}},iterLinkedDocs:function(e){mo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):I(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:tr(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fs(this.cm))})}),gi.prototype.eachLine=gi.prototype.iter;var Dl=0;function Es(e){var t=this;if(Nl(t),!(bn(t,e)||wn(t.display,e))){zn(e),b&&(Dl=+new Date);var r=vi(t,e,!0),n=e.dataTransfer.files;if(!(!r||t.isReadOnly()))if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(){++a==i&&Mn(t,function(){r=Pe(t.doc,r);var E={from:r,to:r,text:t.doc.splitLines(o.filter(function(B){return B!=null}).join(t.doc.lineSeparator())),origin:"paste"};zo(t.doc,E),ml(t.doc,po(Pe(t.doc,r),Pe(t.doc,go(E))))})()},s=function(E,B){if(t.options.allowDropFileTypes&&Se(t.options.allowDropFileTypes,E.type)==-1){l();return}var J=new FileReader;J.onerror=function(){return l()},J.onload=function(){var oe=J.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(oe)){l();return}o[B]=oe,l()},J.readAsText(E)},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 g=e.dataTransfer.getData("Text");if(g){var S;if(t.state.draggingText&&!t.state.draggingText.copy&&(S=t.listSelections()),Ca(t.doc,po(r,r)),S)for(var R=0;R<S.length;++R)Ho(t.doc,"",S[R].anchor,S[R].head,"drag");t.replaceSelection(g,"around","paste"),t.display.input.focus()}}catch(E){}}}}function Ms(e,t){if(b&&(!e.state.draggingText||+new Date-Dl<100)){kr(t);return}if(!(bn(e,t)||wn(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!me)){var r=D("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",v&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),v&&r.parentNode.removeChild(r)}}function Os(e,t){var r=vi(e,t);if(r){var n=document.createDocumentFragment();Ft(e,r,n),e.display.dragCursor||(e.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),G(e.display.dragCursor,n)}}function Nl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Al(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var o=0;o<r.length;o++)e(r[o])})}}var Fl=!1;function Is(){Fl||(Rs(),Fl=!0)}function Rs(){var e;ue(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Al(Ls)},100))}),ue(window,"blur",function(){return Al(ri)})}function Ls(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var bo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ia=0;ia<10;ia++)bo[ia+48]=bo[ia+96]=String(ia);for(var Ea=65;Ea<=90;Ea++)bo[Ea]=String.fromCharCode(Ea);for(var oa=1;oa<=12;oa++)bo[oa+111]=bo[oa+63235]="F"+oa;var lo={};lo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},lo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},lo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},lo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},lo.default=K?lo.macDefault:lo.pcDefault;function 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 Ps(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=Fe(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 Bo(e,t,r,n){t=Ma(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Bo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Bo(e,t.fallthrough[o],r,n);if(a)return a}}}function $l(e){var t=typeof e=="string"?e:bo[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function zl(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(j?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(j?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Hl(e,t){if(v&&e.keyCode==34&&e.char)return!1;var r=bo[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),zl(r,e,t))}function Ma(e){return typeof e=="string"?lo[e]:e}function Zo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&Ne(o.from,de(n).to)<=0;){var a=n.pop();if(Ne(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}gn(e,function(){for(var l=n.length-1;l>=0;l--)Ho(e.doc,"",n[l].from,n[l].to,"+delete");ii(e)})}function Ua(e,t,r){var n=xt(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ja(e,t,r){var n=Ua(e,t.ch,r);return n==null?null:new z(t.line,n,r<0?"after":"before")}function ka(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=on(r,t.doc.direction);if(o){var a=i<0?de(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var g=Yt(t,r);u=i<0?r.text.length-1:0;var S=kn(t,g,u).top;u=at(function(R){return kn(t,g,R).top==S},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=Ua(r,u,1))}else u=i<0?a.to:a.from;return new z(n,u,s)}}return new z(n,i<0?r.text.length:0,i<0?"before":"after")}function Ds(e,t,r,n){var i=on(t,e.doc.direction);if(!i)return ja(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=zt(i,r.ch,r.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return ja(t,r,n);var l=function(Ee,ze){return Ua(t,Ee instanceof z?Ee.ch:Ee,ze)},s,u=function(Ee){return e.options.lineWrapping?(s=s||Yt(e,t),dr(e,t,s,Ee)):{begin:0,end:t.text.length}},g=u(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var S=a.level==1==n<0,R=l(r,S?1:-1);if(R!=null&&(S?R<=a.to&&R<=g.end:R>=a.from&&R>=g.begin)){var E=S?"before":"after";return new z(r.line,R,E)}}var B=function(Ee,ze,Me){for(var Ze=function(Bn,Dr){return Dr?new z(r.line,l(Bn,1),"before"):new z(r.line,Bn,"after")};Ee>=0&&Ee<i.length;Ee+=ze){var pt=i[Ee],it=ze>0==(pt.level!=1),kt=it?Me.begin:l(Me.end,-1);if(pt.from<=kt&&kt<pt.to||(kt=it?pt.from:l(pt.to,-1),Me.begin<=kt&&kt<Me.end))return Ze(kt,it)}},J=B(o+n,n,g);if(J)return J;var oe=n>0?g.end:l(g.begin,-1);return oe!=null&&!(n>0&&oe==t.text.length)&&(J=B(n>0?0:i.length-1,n,u(oe)),J)?J:null}var aa={selectAll:xl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ke)},killLine:function(e){return Zo(e,function(t){if(t.empty()){var r=F(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:z(t.head.line+1,0)}:{from:t.head,to:z(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Zo(e,function(t){return{from:z(t.from().line,0),to:Pe(e.doc,z(t.to().line+1,0))}})},delLineLeft:function(e){return Zo(e,function(t){return{from:z(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Zo(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Zo(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(z(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(z(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Wl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Bl(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")},Ge)},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")},Ge)},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/)?Bl(e,t.head):n},Ge)},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=Qe(e.getLine(o.line),o.ch,n);t.push(xe(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return gn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=F(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new z(i.line,i.ch-1)),i.ch>0)i=new z(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),z(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=F(e.doc,i.line-1).text;a&&(i=new z(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),z(i.line-1,a.length-1),i,"+transpose"))}}r.push(new In(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return gn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);ii(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Wl(e,t){var r=F(e.doc,t),n=fi(r);return n!=r&&(t=ge(n)),ka(!0,e,n,t,1)}function Ns(e,t){var r=F(e.doc,t),n=Vo(r);return n!=r&&(t=ge(n)),ka(!0,e,r,t,-1)}function Bl(e,t){var r=Wl(e,t.line),n=F(e.doc,r.line),i=on(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 z(r.line,a?0:o,r.sticky)}return r}function Oa(e,t,r){if(typeof t=="string"&&(t=aa[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Mt}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=Bo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Bo(t,e.options.extraKeys,r,e)||Bo(t,e.options.keyMap,r,e)}var Fs=new Oe;function la(e,t,r,n){var i=e.state.keySeq;if(i){if($l(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Fs.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Zl(e,i+" "+t,r,n))return!0}return Zl(e,t,r,n)}function Zl(e,t,r,n){var i=As(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&re(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(zn(r),_e(e)),!!i}function Kl(e,t){var r=Hl(t,!0);return r?t.shiftKey&&!e.state.keySeq?la(e,"Shift-"+r,t,function(n){return Oa(e,n,!0)})||la(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Oa(e,n)}):la(e,r,t,function(n){return Oa(e,n)}):!1}function $s(e,t,r){return la(e,"'"+r+"'",t,function(n){return Oa(e,n,!0)})}var Va=null;function Ul(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=se(),!bn(t,e))){b&&O<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=Kl(t,e);v&&(Va=n?r:null,!n&&r==88&&!U&&(K?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),w&&!K&&!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;ke(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(C(t,"CodeMirror-crosshair"),tn(document,"keyup",r),tn(document,"mouseover",r))}ue(document,"keyup",r),ue(document,"mouseover",r)}function jl(e){e.keyCode==16&&(this.doc.sel.shift=!1),bn(this,e)}function kl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(wn(t.display,e)||bn(t,e)||e.ctrlKey&&!e.altKey||K&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(v&&r==Va){Va=null,zn(e);return}if(!(v&&(!e.which||e.which<10)&&Kl(t,e))){var i=String.fromCharCode(n==null?r:n);i!="\b"&&($s(t,e,i)||t.display.input.onKeyPress(e))}}}var Hs=400,Ga=function(e,t,r){this.time=e,this.pos=t,this.button=r};Ga.prototype.compare=function(e,t,r){return this.time+Hs>e&&Ne(t,this.pos)==0&&r==this.button};var sa,ua;function Ws(e,t){var r=+new Date;return ua&&ua.compare(r,e,t)?(sa=ua=null,"triple"):sa&&sa.compare(r,e,t)?(ua=new Ga(r,e,t),sa=null,"double"):(sa=new Ga(r,e,t),ua=null,"single")}function Vl(e){var t=this,r=t.display;if(!(bn(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,wn(r,e)){m||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!Xa(t,e)){var n=vi(t,e),i=li(e),o=n?Ws(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):Si(e)==r.scroller&&zn(e):i==2?(n&&Sa(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(d?t.display.input.onContextMenu(e):Fn(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,la(e,zl(o,i),i,function(a){if(typeof a=="string"&&(a=aa[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,r)!=Mt}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=je?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=K?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(K?r.altKey:r.ctrlKey)),i}function Ks(e,t,r,n){b?setTimeout(lt(vt,e),0):e.curOp.focus=se();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&Oi&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(Ne((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(Ne(a.to(),t)>0||t.xRel<0)?Us(e,n,t,i):js(e,n,t,i)}function Us(e,t,r,n){var i=e.display,o=!1,a=Mn(e,function(u){m&&(i.scroller.draggable=!1),e.state.draggingText=!1,tn(i.wrapper.ownerDocument,"mouseup",a),tn(i.wrapper.ownerDocument,"mousemove",l),tn(i.scroller,"dragstart",s),tn(i.scroller,"drop",a),o||(zn(u),n.addNew||Sa(e.doc,r,null,null,n.extend),m&&!me||b&&O==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};m&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ue(i.wrapper.ownerDocument,"mouseup",a),ue(i.wrapper.ownerDocument,"mousemove",l),ue(i.scroller,"dragstart",s),ue(i.scroller,"drop",a),Fn(e),setTimeout(function(){return i.input.focus()},20)}function Gl(e,t,r){if(r=="char")return new In(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new In(z(t.line,0),Pe(e.doc,z(t.line+1,0)));var n=r(e,t);return new In(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;zn(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 In(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new In(r,r)),r=vi(e,t,!0,!0),l=-1;else{var g=Gl(e,r,n.unit);n.extend?a=Za(a,g.anchor,g.head,n.extend):a=g}n.addNew?l==-1?(l=u.length,Zr(o,ji(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(Zr(o,ji(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):Ka(o,l,a,tt):(l=0,Zr(o,new Di([a],0),tt),s=o.sel);var S=r;function R(Me){if(Ne(S,Me)!=0)if(S=Me,n.unit=="rectangle"){for(var Ze=[],pt=e.options.tabSize,it=Qe(F(o,r.line).text,r.ch,pt),kt=Qe(F(o,Me.line).text,Me.ch,pt),Bn=Math.min(it,kt),Dr=Math.max(it,kt),lr=Math.min(r.line,Me.line),Mi=Math.min(e.lastLine(),Math.max(r.line,Me.line));lr<=Mi;lr++){var mi=F(o,lr).text,Er=mn(mi,Bn,pt);Bn==Dr?Ze.push(new In(z(lr,Er),z(lr,Er))):mi.length>Er&&Ze.push(new In(z(lr,Er),z(lr,mn(mi,Dr,pt))))}Ze.length||Ze.push(new In(r,r)),Zr(o,ji(e,s.ranges.slice(0,l).concat(Ze),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Me)}else{var yi=a,Wr=Gl(e,Me,n.unit),Pr=yi.anchor,Mr;Ne(Wr.anchor,Pr)>0?(Mr=Wr.head,Pr=dt(yi.from(),Wr.anchor)):(Mr=Wr.anchor,Pr=Et(yi.to(),Wr.head));var ur=s.ranges.slice(0);ur[l]=ks(e,new In(Pe(o,Pr),Mr)),Zr(o,ji(e,ur,l),tt)}}var E=i.wrapper.getBoundingClientRect(),B=0;function J(Me){var Ze=++B,pt=vi(e,Me,!0,n.unit=="rectangle");if(pt)if(Ne(pt,S)!=0){e.curOp.focus=se(),R(pt);var it=gr(i,o);(pt.line>=it.to||pt.line<it.from)&&setTimeout(Mn(e,function(){B==Ze&&J(Me)}),150)}else{var kt=Me.clientY<E.top?-20:Me.clientY>E.bottom?20:0;kt&&setTimeout(Mn(e,function(){B==Ze&&(i.scroller.scrollTop+=kt,J(Me))}),50)}}function oe(Me){e.state.selectingText=!1,B=1/0,Me&&(zn(Me),i.input.focus()),tn(i.wrapper.ownerDocument,"mousemove",Ee),tn(i.wrapper.ownerDocument,"mouseup",ze),o.history.lastSelOrigin=null}var Ee=Mn(e,function(Me){Me.buttons===0||!li(Me)?oe(Me):J(Me)}),ze=Mn(e,oe);e.state.selectingText=ze,ue(i.wrapper.ownerDocument,"mousemove",Ee),ue(i.wrapper.ownerDocument,"mouseup",ze)}function ks(e,t){var r=t.anchor,n=t.head,i=F(e.doc,r.line);if(Ne(r,n)==0&&r.sticky==n.sticky)return t;var o=on(i);if(!o)return t;var a=zt(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 g=zt(o,n.ch,n.sticky),S=g-a||(n.ch-r.ch)*(l.level==1?-1:1);g==s-1||g==s?u=S<0:u=S>0}var R=o[s+(u?-1:0)],E=u==(R.level==1),B=E?R.from:R.to,J=E?"after":"before";return r.ch==B&&r.sticky==J?t:new In(new z(r.line,B,J),n)}function Xl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(R){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&zn(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!rr(e,r))return jr(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){var g=Ie(e.doc,o),S=e.display.gutterSpecs[s];return yn(e,r,e,g,S.className,t),jr(t)}}}function Xa(e,t){return Xl(e,t,"gutterClick",!0)}function Yl(e,t){wn(e.display,t)||Vs(e,t)||bn(e,t,"contextmenu")||d||e.display.input.onContextMenu(t)}function Vs(e,t){return rr(e,"gutterContextMenu")?Xl(e,t,"gutterContextMenu",!1):!1}function _l(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),At(e)}var Ko={toString:function(){return"CodeMirror.Init"}},Ql={},Ia={};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!=Ko&&o(l,s,u)}:o)}e.defineOption=r,e.Init=Ko,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,Ha(n)},!0),r("indentUnit",2,Ha,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){Qo(n),At(n),pr(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 g=s.text.indexOf(i,u);if(g==-1)break;u=g+i.length,o.push(z(a,g))}a++});for(var l=o.length-1;l>=0;l--)Ho(n.doc,i,o[l],z(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!=Ko&&n.refresh()}),r("specialCharPlaceholder",h,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",pe?"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",!Ct),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){_l(n),_o(n)},!0),r("keyMap","default",function(n,i,o){var a=Ma(i),l=o!=Ko&&Ma(o);l&&l.detach&&l.detach(n,a),a.attach&&a.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Ys,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=$a(i,n.options.lineNumbers),_o(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?Bi(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return io(n)},!0),r("scrollbarStyle","native",function(n){va(n),io(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=$a(n.options.gutters,i),_o(n)},!0),r("firstLineNumber",1,_o,!0),r("lineNumberFormatter",function(n){return n},_o,!0),r("showCursorWhenSelecting",!1,wi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(ri(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Xs),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,wi,!0),r("singleCursorHeightPerLine",!0,wi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Qo,!0),r("addModeClass",!1,Qo,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,Qo,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Xs(e,t,r){var n=r&&r!=Ko;if(!t!=!n){var i=e.display.dragFunctions,o=t?ue:tn;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 Ys(e){e.options.lineWrapping?(ke(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),eo(e)),ti(e),pr(e),At(e),setTimeout(function(){return io(e)},100)}function nr(e,t){var r=this;if(!(this instanceof nr))return new nr(e,t);this.options=t=t?ot(t):{},ot(Ql,t,!1);var n=t.value;typeof n=="string"?n=new gi(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new nr.inputStyles[t.inputStyle](this),o=this.display=new ss(e,n,i,t);o.wrapper.CodeMirror=this,_l(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),va(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Oe,keySeq:null,specialChars:null},t.autofocus&&!pe&&o.input.focus(),b&&O<11&&setTimeout(function(){return r.display.input.reset(!0)},20),_s(this),Is(),oo(this),this.curOp.forceUpdate=!0,ul(this,n),t.autofocus&&!pe||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&$n(r)},20):ri(this);for(var a in Ia)Ia.hasOwnProperty(a)&&Ia[a](this,t[a],Ko);nl(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Ya.length;++l)Ya[l](this);ao(this),m&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}nr.defaults=Ql,nr.optionHandlers=Ia;function _s(e){var t=e.display;ue(t.scroller,"mousedown",Mn(e,Vl)),b&&O<11?ue(t.scroller,"dblclick",Mn(e,function(s){if(!bn(e,s)){var u=vi(e,s);if(!(!u||Xa(e,s)||wn(e.display,s))){zn(s);var g=e.findWordAt(u);Sa(e.doc,g.anchor,g.head)}}})):ue(t.scroller,"dblclick",function(s){return bn(e,s)||zn(s)}),ue(t.scroller,"contextmenu",function(s){return Yl(e,s)}),ue(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Yl(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 g=u.left-s.left,S=u.top-s.top;return g*g+S*S>20*20}ue(t.scroller,"touchstart",function(s){if(!bn(e,s)&&!o(s)&&!Xa(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)}}),ue(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ue(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!wn(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var g=e.coordsChar(t.activeTouch,"page"),S;!u.prev||a(u,u.prev)?S=new In(g,g):!u.prev.prev||a(u,u.prev.prev)?S=e.findWordAt(g):S=new In(z(g.line,0),Pe(e.doc,z(g.line+1,0))),e.setSelection(S.anchor,S.head),e.focus(),zn(s)}i()}),ue(t.scroller,"touchcancel",i),ue(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Mo(e,t.scroller.scrollTop),no(e,t.scroller.scrollLeft,!0),yn(e,"scroll",e))}),ue(t.scroller,"mousewheel",function(s){return ol(e,s)}),ue(t.scroller,"DOMMouseScroll",function(s){return ol(e,s)}),ue(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){bn(e,s)||kr(s)},over:function(s){bn(e,s)||(Os(e,s),kr(s))},start:function(s){return Ms(e,s)},drop:Mn(e,Es),leave:function(s){bn(e,s)||Nl(e)}};var l=t.input.getField();ue(l,"keyup",function(s){return jl.call(e,s)}),ue(l,"keydown",Mn(e,Ul)),ue(l,"keypress",Mn(e,kl)),ue(l,"focus",function(s){return $n(e,s)}),ue(l,"blur",function(s){return ri(e,s)})}var Ya=[];nr.defineInitHook=function(e){return Ya.push(e)};function ca(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=Nn(e,t).state:r="prev");var a=e.options.tabSize,l=F(i,t),s=Qe(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],g;if(!n&&!/\S/.test(l.text))g=0,r="not";else if(r=="smart"&&(g=i.mode.indent(o,l.text.slice(u.length),l.text),g==Mt||g>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?g=Qe(F(i,t-1).text,null,a):g=0:r=="add"?g=s+e.options.indentUnit:r=="subtract"?g=s-e.options.indentUnit:typeof r=="number"&&(g=s+r),g=Math.max(0,g);var S="",R=0;if(e.options.indentWithTabs)for(var E=Math.floor(g/a);E;--E)R+=a,S+=" ";if(R<g&&(S+=xe(g-R)),S!=u)return Ho(i,S,z(t,0),z(t,u.length),"+input"),l.stateAfter=null,!0;for(var B=0;B<i.sel.ranges.length;B++){var J=i.sel.ranges[B];if(J.head.line==t&&J.head.ch<u.length){var oe=z(t,u.length);Ka(i,B,new In(oe,oe));break}}}var ki=null;function Ra(e){ki=e}function _a(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=I(t),u=null;if(l&&n.ranges.length>1)if(ki&&ki.text.join(`
`)==t){if(n.ranges.length%ki.text.length==0){u=[];for(var g=0;g<ki.text.length;g++)u.push(o.splitLines(ki.text[g]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=Fe(s,function(Ee){return[Ee]}));for(var S=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var E=n.ranges[R],B=E.from(),J=E.to();E.empty()&&(r&&r>0?B=z(B.line,B.ch-r):e.state.overwrite&&!l?J=z(J.line,Math.min(F(o,J.line).text.length,J.ch+de(s).length)):l&&ki&&ki.lineWise&&ki.text.join(`
`)==s.join(`
`)&&(B=J=z(B.line,0)));var oe={from:B,to:J,text:u?u[R%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};zo(e.doc,oe),re(e,"inputRead",e,oe)}t&&!l&&ql(e,t),ii(e),e.curOp.updateInput<2&&(e.curOp.updateInput=S),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Jl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&gn(t,function(){return _a(t,r,0,null,"paste")}),!0}function ql(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=ca(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(F(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=ca(e,i.head.line,"smart"));a&&re(e,"electricInput",e,i.head.line)}}}function es(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:z(i,0),head:z(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function ts(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function ns(){var e=D("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=D("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return m?e.style.width="1000px":e.setAttribute("wrap","off"),ve&&(e.style.border="1px solid black"),ts(e),t}function Qs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var o=this.options,a=o[n];o[n]==i&&n!="mode"||(o[n]=i,t.hasOwnProperty(n)&&Mn(this,t[n])(this,i,a),yn(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](Ma(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==n||i[o].name==n)return i.splice(o,1),!0},addOverlay:Wn(function(n,i){var o=n.token?n:e.getMode(this.options,n);if(o.startState)throw new Error("Overlays may not be stateful.");he(this.state.overlays,{mode:o,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,pr(this)}),removeOverlay:Wn(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++,pr(this);return}}}),indentLine:Wn(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Le(this.doc,n)&&ca(this,n,i,o)}),indentSelection:Wn(function(n){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(ca(this,l.head.line,n,!0),o=l.head.line,a==this.doc.sel.primIndex&&ii(this));else{var s=l.from(),u=l.to(),g=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var S=g;S<o;++S)ca(this,S,n);var R=this.doc.sel.ranges;s.ch==0&&i.length==R.length&&R[a].from().ch>0&&Ka(this.doc,a,new In(s,R[a].to()),Ke)}}}),getTokenAt:function(n,i){return cr(this,n,i)},getLineTokens:function(n,i){return cr(this,z(n),i,!0)},getTokenTypeAt:function(n){n=Pe(this.doc,n);var i=Zn(this,F(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 g=s?s.indexOf("overlay "):-1;return g<0?s:g==0?null:s.slice(0,g-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 g=0;g<a._global.length;g++){var S=a._global[g];S.pred(l,this)&&Se(o,S.val)==-1&&o.push(S.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=Sn(o,n==null?o.first+o.size-1:n),Nn(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=Pe(this.doc,n):o=n?a.from():a.to(),On(this,o,i||"page")},charCoords:function(n,i){return ar(this,Pe(this.doc,n),i||"page")},coordsChar:function(n,i){return n=Gn(this,n,i||"page"),Jr(this,n.left,n.top)},lineAtHeight:function(n,i){return n=Gn(this,{top:n,left:0},i||"page").top,Ie(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=F(this.doc,n)}else l=n;return sr(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Ri(l):0)},defaultTextHeight:function(){return hr(this.display)},defaultCharWidth:function(){return ei(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,o,a,l){var s=this.display;n=On(this,Pe(this.doc,n));var u=n.bottom,g=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")u=n.top;else if(a=="above"||a=="near"){var S=Math.max(s.wrapper.clientHeight,this.doc.height),R=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>S)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=S&&(u=n.bottom),g+i.offsetWidth>R&&(g=R-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(g=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?g=0:l=="middle"&&(g=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=g+"px"),o&&Go(this,{left:g,top:u,right:g+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:Wn(Ul),triggerOnKeyPress:Wn(kl),triggerOnKeyUp:jl,triggerOnMouseDown:Wn(Vl),execCommand:function(n){if(aa.hasOwnProperty(n))return aa[n].call(null,this)},triggerElectric:Wn(function(n){ql(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=Pe(this.doc,n),u=0;u<i&&(s=Qa(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:Wn(function(n,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?Qa(o.doc,a.head,n,i,o.options.rtlMoveVisually):n<0?a.from():a.to()},Ge)}),deleteH:Wn(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Zo(this,function(l){var s=Qa(a,l.head,n,i,!1);return n<0?{from:s,to:l.head}:{from:l.head,to:s}})}),findPosV:function(n,i,o,a){var l=1,s=a;i<0&&(l=-1,i=-i);for(var u=Pe(this.doc,n),g=0;g<i;++g){var S=On(this,u,"div");if(s==null?s=S.left:S.left=s,u=rs(this,S,l,o),u.hitSide)break}return u},moveV:Wn(function(n,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(g){if(s)return n<0?g.from():g.to();var S=On(o,g.head,"div");g.goalColumn!=null&&(S.left=g.goalColumn),l.push(S.left);var R=rs(o,S,n,i);return i=="page"&&g==a.sel.primary()&&Ui(o,ar(o,R,"div").top-S.top),R},Ge),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=F(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),g=gt(u,s)?function(S){return gt(S,s)}:/\s/.test(u)?function(S){return/\s/.test(S)}:function(S){return!/\s/.test(S)&&!gt(S)};a>0&&g(o.charAt(a-1));)--a;for(;l<o.length&&g(o.charAt(l));)++l}return new In(z(n.line,a),z(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ke(this.display.cursorDiv,"CodeMirror-overwrite"):C(this.display.cursorDiv,"CodeMirror-overwrite"),yn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==se()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Wn(function(n,i){Eo(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-ut(this)-this.display.barHeight,width:n.scrollWidth-ut(this)-this.display.barWidth,clientHeight:Nt(this),clientWidth:bt(this)}},scrollIntoView:Wn(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:z(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?co(this,n):fa(this,n.from,n.to,n.margin)}),setSize:Wn(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&&nn(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){ni(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,yn(this,"refresh",this)}),operation:function(n){return gn(this,n)},startOperation:function(){return oo(this)},endOperation:function(){return ao(this)},refresh:Wn(function(){var n=this.display.cachedTextHeight;pr(this),this.curOp.forceUpdate=!0,At(this),Eo(this,this.doc.scrollLeft,this.doc.scrollTop),Aa(this.display),(n==null||Math.abs(n-hr(this.display))>.5||this.options.lineWrapping)&&ti(this),yn(this,"refresh",this)}),swapDoc:Wn(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ul(this,n),At(this),this.display.input.reset(),Eo(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,re(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}},Ar(e),e.registerHelper=function(n,i,o){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=o},e.registerGlobalHelper=function(n,i,o,a){e.registerHelper(n,i,a),r[n]._global.push({pred:o,val:a})}}function Qa(e,t,r,n,i){var o=t,a=r,l=F(e,t.line),s=i&&e.direction=="rtl"?-r:r;function u(){var ze=t.line+s;return ze<e.first||ze>=e.first+e.size?!1:(t=new z(ze,t.ch,t.sticky),l=F(e,ze))}function g(ze){var Me;if(n=="codepoint"){var Ze=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Ze)?Me=null:Me=new z(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(Ze>=55296&&Ze<56320?2:1))),-r)}else i?Me=Ds(e.cm,l,t,r):Me=ja(l,t,r);if(Me==null)if(!ze&&u())t=ka(i,e.cm,l,t.line,s);else return!1;else t=Me;return!0}if(n=="char"||n=="codepoint")g();else if(n=="column")g(!0);else if(n=="word"||n=="group")for(var S=null,R=n=="group",E=e.cm&&e.cm.getHelper(t,"wordChars"),B=!0;!(r<0&&!g(!B));B=!1){var J=l.text.charAt(t.ch)||`
`,oe=gt(J,E)?"w":R&&J==`
`?"n":!R||/\s/.test(J)?null:"p";if(R&&!B&&!oe&&(oe="s"),S&&S!=oe){r<0&&(r=1,g(),t.sticky="after");break}if(oe&&(S=oe),r>0&&!g(!B))break}var Ee=xa(e,t,o,a,!0);return Vt(o,Ee)&&(Ee.hitSide=!0),Ee}function rs(e,t,r,n){var i=e.doc,o=t.left,a;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*hr(e.display),3);a=(r>0?t.bottom:t.top)+r*s}else n=="line"&&(a=r>0?t.bottom+3:t.top-3);for(var u;u=Jr(e,o,a),!!u.outside;){if(r<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=r*5}return u}var Dn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Oe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Dn.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;ts(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function o(l){for(var s=l.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ue(i,"paste",function(l){!o(l)||bn(n,l)||Jl(l,n)||O<=11&&setTimeout(Mn(n,function(){return t.updateFromDOM()}),20)}),ue(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),ue(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),ue(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ue(i,"touchstart",function(){return r.forceCompositionEnd()}),ue(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||bn(n,l))){if(n.somethingSelected())Ra({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var s=es(n);Ra({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,Ke),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=ki.text.join(`
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var g=ns(),S=g.firstChild;n.display.lineSpace.insertBefore(g,n.display.lineSpace.firstChild),S.value=ki.text.join(`
`);var R=document.activeElement;Ae(S),setTimeout(function(){n.display.lineSpace.removeChild(g),R.focus(),R==i&&r.showPrimarySelection()},50)}}ue(i,"copy",a),ue(i,"cut",a)},Dn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Dn.prototype.prepareSelection=function(){var e=Zi(this.cm,!1);return e.focus=document.activeElement==this.div,e},Dn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Dn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Dn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=La(t,e.anchorNode,e.anchorOffset),a=La(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&Ne(dt(o,a),n)==0&&Ne(Et(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&is(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&is(t,i);if(!u){var g=l[l.length-1].measure,S=g.maps?g.maps[g.maps.length-1]:g.map;u={node:S[S.length-1],offset:S[S.length-2]-S[S.length-3]}}if(!s||!u){e.removeAllRanges();return}var R=e.rangeCount&&e.getRangeAt(0),E;try{E=q(s.node,s.offset,u.offset,u.node)}catch(B){}E&&(!w&&t.state.focused?(e.collapse(s.node,s.offset),E.collapsed||(e.removeAllRanges(),e.addRange(E))):(e.removeAllRanges(),e.addRange(E)),R&&e.anchorNode==null?e.addRange(R):w&&this.startGracePeriod()),this.rememberSelection()}},Dn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Dn.prototype.showMultipleSelections=function(e){G(this.cm.display.cursorDiv,e.cursors),G(this.cm.display.selectionDiv,e.selection)},Dn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Dn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return We(this.div,t)},Dn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Dn.prototype.blur=function(){this.div.blur()},Dn.prototype.getField=function(){return this.div},Dn.prototype.supportsTouch=function(){return!0},Dn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():gn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},Dn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Dn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(be&&Z&&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=La(t,e.anchorNode,e.anchorOffset),n=La(t,e.focusNode,e.focusOffset);r&&n&&gn(t,function(){Zr(t.doc,po(r,n),Ke),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Dn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=z(n.line-1,F(e.doc,n.line-1).length)),i.ch==F(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=z(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||(o=vr(e,n.line))==0?(a=ge(t.view[0].line),l=t.view[0].node):(a=ge(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=vr(e,i.line),u,g;if(s==t.view.length-1?(u=t.viewTo-1,g=t.lineDiv.lastChild):(u=ge(t.view[s+1].line)-1,g=t.view[s+1].node.previousSibling),!l)return!1;for(var S=e.doc.splitLines(qs(e,l,g,a,u)),R=De(e.doc,z(a,0),z(u,F(e.doc,u).text.length));S.length>1&&R.length>1;)if(de(S)==de(R))S.pop(),R.pop(),u--;else if(S[0]==R[0])S.shift(),R.shift(),a++;else break;for(var E=0,B=0,J=S[0],oe=R[0],Ee=Math.min(J.length,oe.length);E<Ee&&J.charCodeAt(E)==oe.charCodeAt(E);)++E;for(var ze=de(S),Me=de(R),Ze=Math.min(ze.length-(S.length==1?E:0),Me.length-(R.length==1?E:0));B<Ze&&ze.charCodeAt(ze.length-B-1)==Me.charCodeAt(Me.length-B-1);)++B;if(S.length==1&&R.length==1&&a==n.line)for(;E&&E>n.ch&&ze.charCodeAt(ze.length-B-1)==Me.charCodeAt(Me.length-B-1);)E--,B++;S[S.length-1]=ze.slice(0,ze.length-B).replace(/^\u200b+/,""),S[0]=S[0].slice(E).replace(/\u200b+$/,"");var pt=z(a,E),it=z(u,R.length?de(R).length-B:0);if(S.length>1||S[0]||Ne(pt,it))return Ho(e.doc,S,pt,it,"+input"),!0},Dn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Dn.prototype.reset=function(){this.forceCompositionEnd()},Dn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Dn.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Dn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&gn(this.cm,function(){return pr(e.cm)})},Dn.prototype.setUneditable=function(e){e.contentEditable="false"},Dn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Mn(this.cm,_a)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Dn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Dn.prototype.onContextMenu=function(){},Dn.prototype.resetPosition=function(){},Dn.prototype.needsContentAttribute=!0;function is(e,t){var r=xr(e,t.line);if(!r||r.hidden)return null;var n=F(e.doc,t.line),i=zr(r,n,t.line),o=on(n,e.doc.direction),a="left";if(o){var l=zt(o,t.ch);a=l%2?"right":"left"}var s=Pt(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 Uo(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(E){return function(B){return B.id==E}}function g(){a&&(o+=l,s&&(o+=l),a=s=!1)}function S(E){E&&(g(),o+=E)}function R(E){if(E.nodeType==1){var B=E.getAttribute("cm-text");if(B){S(B);return}var J=E.getAttribute("cm-marker"),oe;if(J){var Ee=e.findMarks(z(n,0),z(i+1,0),u(+J));Ee.length&&(oe=Ee[0].find(0))&&S(De(e.doc,oe.from,oe.to).join(l));return}if(E.getAttribute("contenteditable")=="false")return;var ze=/^(pre|div|p|li|table|br)$/i.test(E.nodeName);if(!/^br$/i.test(E.nodeName)&&E.textContent.length==0)return;ze&&g();for(var Me=0;Me<E.childNodes.length;Me++)R(E.childNodes[Me]);/^(pre|p)$/i.test(E.nodeName)&&(s=!0),ze&&(a=!0)}else E.nodeType==3&&S(E.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;R(t),t!=r;)t=t.nextSibling,s=!1;return o}function La(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Uo(e.clipPos(z(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||!We(n,t))return Uo(z(ge(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?de(e.rest):e.line;return Uo(z(ge(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 g(oe,Ee,ze){for(var Me=-1;Me<(u?u.length:0);Me++)for(var Ze=Me<0?s.map:u[Me],pt=0;pt<Ze.length;pt+=3){var it=Ze[pt+2];if(it==oe||it==Ee){var kt=ge(Me<0?e.line:e.rest[Me]),Bn=Ze[pt]+ze;return(ze<0||it!=oe)&&(Bn=Ze[pt+(ze?1:0)]),z(kt,Bn)}}}var S=g(a,l,r);if(S)return Uo(S,i);for(var R=l.nextSibling,E=a?a.nodeValue.length-r:0;R;R=R.nextSibling){if(S=g(R,R.firstChild,0),S)return Uo(z(S.line,S.ch-E),i);E+=R.textContent.length}for(var B=l.previousSibling,J=r;B;B=B.previousSibling){if(S=g(B,B.firstChild,-1),S)return Uo(z(S.line,S.ch+J),i);J+=B.textContent.length}}var mr=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Oe,this.hasSelection=!1,this.composing=null};mr.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),ve&&(i.style.width="0px"),ue(i,"input",function(){b&&O>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),ue(i,"paste",function(a){bn(n,a)||Jl(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!bn(n,a)){if(n.somethingSelected())Ra({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=es(n);Ra({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,Ke):(r.prevInput="",i.value=l.text.join(`
`),Ae(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}ue(i,"cut",o),ue(i,"copy",o),ue(e.scroller,"paste",function(a){if(!(wn(e,a)||bn(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)}}),ue(e.lineSpace,"selectstart",function(a){wn(e,a)||zn(a)}),ue(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"})}}),ue(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},mr.prototype.createField=function(e){this.wrapper=ns(),this.textarea=this.wrapper.firstChild},mr.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},mr.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Zi(e);if(e.options.moveInputWithCursor){var i=On(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},mr.prototype.showSelection=function(e){var t=this.cm,r=t.display;G(r.cursorDiv,e.cursors),G(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},mr.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&&Ae(this.textarea),b&&O>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",b&&O>=9&&(this.hasSelection=null))}},mr.prototype.getField=function(){return this.textarea},mr.prototype.supportsTouch=function(){return!1},mr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!pe||se()!=this.textarea))try{this.textarea.focus()}catch(e){}},mr.prototype.blur=function(){this.textarea.blur()},mr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},mr.prototype.receivedFocus=function(){this.slowPoll()},mr.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},mr.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)},mr.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Y(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(b&&O>=9&&this.hasSelection===i||K&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!n&&(n="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return gn(t,function(){_a(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},mr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},mr.prototype.onKeyPress=function(){b&&O>=9&&(this.hasSelection=null),this.fastPoll()},mr.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=vi(r,e),a=n.scroller.scrollTop;if(!o||v)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Mn(r,Zr)(r.doc,po(o),Ke);var s=i.style.cssText,u=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+`px;
z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var S;m&&(S=window.scrollY),n.input.focus(),m&&window.scrollTo(null,S),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=E,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(i.selectionStart!=null){var J=r.somethingSelected(),oe="\u200B"+(J?i.value:"");i.value="\u21DA",i.value=oe,t.prevInput=J?"":"\u200B",i.selectionStart=1,i.selectionEnd=oe.length,n.selForContextMenu=r.doc.sel}}function E(){if(t.contextMenuPending==E&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&O<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!b||b&&O<9)&&R();var J=0,oe=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Mn(r,xl)(r):J++<10?n.detectingSelectAll=setTimeout(oe,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(oe,200)}}if(b&&O>=9&&R(),d){kr(e);var B=function(){tn(window,"mouseup",B),setTimeout(E,20)};ue(window,"mouseup",B)}else setTimeout(E,50)},mr.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},mr.prototype.setUneditable=function(){},mr.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?ot(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=se();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(ue(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&&(tn(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=nr(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=tn,e.on=ue,e.wheelEventPixels=us,e.Doc=gi,e.splitLines=I,e.countColumn=Qe,e.findColumn=mn,e.isWordChar=Be,e.Pass=Mt,e.signal=yn,e.Line=$i,e.changeEnd=go,e.scrollbarModel=Xo,e.Pos=z,e.cmpPos=Ne,e.modes=ye,e.mimeModes=we,e.resolveMode=Dt,e.getMode=rt,e.modeExtensions=Ue,e.extendMode=y,e.copyState=L,e.startState=N,e.innerMode=A,e.commands=aa,e.keyMap=lo,e.keyName=Hl,e.isModifierKey=$l,e.lookupKey=Bo,e.normalizeKeyMap=Ps,e.StringStream=$,e.SharedTextMarker=ra,e.TextMarker=yo,e.LineWidget=na,e.e_preventDefault=zn,e.e_stopPropagation=_n,e.e_stop=kr,e.addClass=ke,e.contains=We,e.rmClass=C,e.keyNames=bo}Gs(nr),Qs(nr);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Ta in gi.prototype)gi.prototype.hasOwnProperty(Ta)&&Se(ru,Ta)<0&&(nr.prototype[Ta]=function(e){return function(){return e.apply(this.doc,arguments)}}(gi.prototype[Ta]));return Ar(gi),nr.inputStyles={textarea:mr,contenteditable:Dn},nr.defineMode=function(e){!nr.defaults.mode&&e!="null"&&(nr.defaults.mode=e),qe.apply(this,arguments)},nr.defineMIME=wt,nr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),nr.defineMIME("text/plain","null"),nr.defineExtension=function(e,t){nr.prototype[e]=t},nr.defineDocExtension=function(e,t){gi.prototype[e]=t},nr.fromTextArea=tu,nu(nr),nr.version="5.58.2",nr})},67656:function(_t,le,f){"use strict";f.r(le),f.d(le,{BaseInput:function(){return v},default:function(){return Ct}});var w=f(87462),V=f(1413),x=f(4942),_=f(71002),b=f(94184),O=f.n(b),m=f(67294),ae=f(87887),Z=function(j){var d,c,C=j.inputElement,T=j.prefixCls,G=j.prefix,D=j.suffix,H=j.addonBefore,q=j.addonAfter,We=j.className,se=j.style,ke=j.disabled,Ve=j.readOnly,Ae=j.focused,lt=j.triggerFocus,ot=j.allowClear,Qe=j.value,Oe=j.handleReset,Se=j.hidden,ct=j.classes,Mt=j.classNames,Ke=j.dataAttrs,tt=j.styles,Ge=j.components,mn=(Ge==null?void 0:Ge.affixWrapper)||"span",Xn=(Ge==null?void 0:Ge.groupWrapper)||"span",xe=(Ge==null?void 0:Ge.wrapper)||"span",de=(Ge==null?void 0:Ge.groupAddon)||"span",Fe=(0,m.useRef)(null),he=function(Ht){var zt;(zt=Fe.current)!==null&&zt!==void 0&&zt.contains(Ht.target)&&(lt==null||lt())},nt=function(){var Ht;if(!ot)return null;var zt=!ke&&!Ve&&Qe,er="".concat(T,"-clear-icon"),on=(0,_.Z)(ot)==="object"&&ot!==null&&ot!==void 0&&ot.clearIcon?ot.clearIcon:"\u2716";return m.createElement("span",{onClick:Oe,onMouseDown:function(ue){return ue.preventDefault()},className:O()(er,(Ht={},(0,x.Z)(Ht,"".concat(er,"-hidden"),!zt),(0,x.Z)(Ht,"".concat(er,"-has-suffix"),!!D),Ht)),role:"button",tabIndex:-1},on)},St=(0,m.cloneElement)(C,{value:Qe,hidden:Se,className:O()((d=C.props)===null||d===void 0?void 0:d.className,!(0,ae.X3)(j)&&!(0,ae.He)(j)&&We)||null,style:(0,V.Z)((0,V.Z)({},(c=C.props)===null||c===void 0?void 0:c.style),!(0,ae.X3)(j)&&!(0,ae.He)(j)?se:{})});if((0,ae.X3)(j)){var st,Be="".concat(T,"-affix-wrapper"),gt=O()(Be,(st={},(0,x.Z)(st,"".concat(Be,"-disabled"),ke),(0,x.Z)(st,"".concat(Be,"-focused"),Ae),(0,x.Z)(st,"".concat(Be,"-readonly"),Ve),(0,x.Z)(st,"".concat(Be,"-input-with-clear-btn"),D&&ot&&Qe),st),!(0,ae.He)(j)&&We,ct==null?void 0:ct.affixWrapper,Mt==null?void 0:Mt.affixWrapper),ht=(D||ot)&&m.createElement("span",{className:O()("".concat(T,"-suffix"),Mt==null?void 0:Mt.suffix),style:tt==null?void 0:tt.suffix},nt(),D);St=m.createElement(mn,(0,w.Z)({className:gt,style:(0,V.Z)((0,V.Z)({},(0,ae.He)(j)?void 0:se),tt==null?void 0:tt.affixWrapper),hidden:!(0,ae.He)(j)&&Se,onClick:he},Ke==null?void 0:Ke.affixWrapper,{ref:Fe}),G&&m.createElement("span",{className:O()("".concat(T,"-prefix"),Mt==null?void 0:Mt.prefix),style:tt==null?void 0:tt.prefix},G),(0,m.cloneElement)(C,{value:Qe,hidden:null}),ht)}if((0,ae.He)(j)){var Rt="".concat(T,"-group"),Zt="".concat(Rt,"-addon"),xt=O()("".concat(T,"-wrapper"),Rt,ct==null?void 0:ct.wrapper),at=O()("".concat(T,"-group-wrapper"),We,ct==null?void 0:ct.group);return m.createElement(Xn,{className:at,style:se,hidden:Se},m.createElement(xe,{className:xt},H&&m.createElement(de,{className:Zt},H),(0,m.cloneElement)(St,{hidden:null}),q&&m.createElement(de,{className:Zt},q)))}return St},v=Z,me=f(74902),ie=f(97685),Re=f(45987),ve=f(21770),be=f(98423),pe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],K=(0,m.forwardRef)(function(W,j){var d=W.autoComplete,c=W.onChange,C=W.onFocus,T=W.onBlur,G=W.onPressEnter,D=W.onKeyDown,H=W.prefixCls,q=H===void 0?"rc-input":H,We=W.disabled,se=W.htmlSize,ke=W.className,Ve=W.maxLength,Ae=W.suffix,lt=W.showCount,ot=W.type,Qe=ot===void 0?"text":ot,Oe=W.classes,Se=W.classNames,ct=W.styles,Mt=(0,Re.Z)(W,pe),Ke=(0,ve.Z)(W.defaultValue,{value:W.value}),tt=(0,ie.Z)(Ke,2),Ge=tt[0],mn=tt[1],Xn=(0,m.useState)(!1),xe=(0,ie.Z)(Xn,2),de=xe[0],Fe=xe[1],he=(0,m.useRef)(null),nt=function(at){he.current&&(0,ae.nH)(he.current,at)};(0,m.useImperativeHandle)(j,function(){return{focus:nt,blur:function(){var at;(at=he.current)===null||at===void 0||at.blur()},setSelectionRange:function(at,Qt,Ht){var zt;(zt=he.current)===null||zt===void 0||zt.setSelectionRange(at,Qt,Ht)},select:function(){var at;(at=he.current)===null||at===void 0||at.select()},input:he.current}}),(0,m.useEffect)(function(){Fe(function(xt){return xt&&We?!1:xt})},[We]);var St=function(at){W.value===void 0&&mn(at.target.value),he.current&&(0,ae.rJ)(he.current,at,c)},st=function(at){G&&at.key==="Enter"&&G(at),D==null||D(at)},Be=function(at){Fe(!0),C==null||C(at)},gt=function(at){Fe(!1),T==null||T(at)},ht=function(at){mn(""),nt(),he.current&&(0,ae.rJ)(he.current,at,c)},Rt=function(){var at=(0,be.Z)(W,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return m.createElement("input",(0,w.Z)({autoComplete:d},at,{onChange:St,onFocus:Be,onBlur:gt,onKeyDown:st,className:O()(q,(0,x.Z)({},"".concat(q,"-disabled"),We),Se==null?void 0:Se.input),style:ct==null?void 0:ct.input,ref:he,size:se,type:Qe}))},Zt=function(){var at=Number(Ve)>0;if(Ae||lt){var Qt=(0,ae.D7)(Ge),Ht=(0,me.Z)(Qt).length,zt=(0,_.Z)(lt)==="object"?lt.formatter({value:Qt,count:Ht,maxLength:Ve}):"".concat(Ht).concat(at?" / ".concat(Ve):"");return m.createElement(m.Fragment,null,!!lt&&m.createElement("span",{className:O()("".concat(q,"-show-count-suffix"),(0,x.Z)({},"".concat(q,"-show-count-has-suffix"),!!Ae),Se==null?void 0:Se.count),style:(0,V.Z)({},ct==null?void 0:ct.count)},zt),Ae)}return null};return m.createElement(v,(0,w.Z)({},Mt,{prefixCls:q,className:ke,inputElement:Rt(),handleReset:ht,value:(0,ae.D7)(Ge),focused:de,triggerFocus:nt,suffix:Zt(),disabled:We,classes:Oe,classNames:Se,styles:ct}))}),je=K,Ct=je},87887:function(_t,le,f){"use strict";f.d(le,{D7:function(){return b},He:function(){return w},X3:function(){return V},nH:function(){return _},rJ:function(){return x}});function w(O){return!!(O.addonBefore||O.addonAfter)}function V(O){return!!(O.prefix||O.suffix||O.allowClear)}function x(O,m,ae,Z){if(ae){var v=m;if(m.type==="click"){var me=O.cloneNode(!0);v=Object.create(m,{target:{value:me},currentTarget:{value:me}}),me.value="",ae(v);return}if(Z!==void 0){v=Object.create(m,{target:{value:O},currentTarget:{value:O}}),O.value=Z,ae(v);return}ae(v)}}function _(O,m){if(O){O.focus(m);var ae=m||{},Z=ae.cursor;if(Z){var v=O.value.length;switch(Z){case"start":O.setSelectionRange(0,0);break;case"end":O.setSelectionRange(v,v);break;default:O.setSelectionRange(0,v)}}}}function b(O){return typeof O=="undefined"||O===null?"":String(O)}},66680:function(_t,le,f){"use strict";f.d(le,{Z:function(){return V}});var w=f(67294);function V(x){var _=w.useRef();_.current=x;var b=w.useCallback(function(){for(var O,m=arguments.length,ae=new Array(m),Z=0;Z<m;Z++)ae[Z]=arguments[Z];return(O=_.current)===null||O===void 0?void 0:O.call.apply(O,[_].concat(ae))},[]);return b}},21770:function(_t,le,f){"use strict";f.d(le,{Z:function(){return O}});var w=f(97685),V=f(66680),x=f(8410),_=f(63896);function b(m){return m!==void 0}function O(m,ae){var Z=ae||{},v=Z.defaultValue,me=Z.value,ie=Z.onChange,Re=Z.postState,ve=(0,_.Z)(function(){return b(me)?me:b(v)?typeof v=="function"?v():v:typeof m=="function"?m():m}),be=(0,w.Z)(ve,2),pe=be[0],K=be[1],je=me!==void 0?me:pe,Ct=Re?Re(je):je,W=(0,V.Z)(ie),j=(0,_.Z)([je]),d=(0,w.Z)(j,2),c=d[0],C=d[1];(0,x.o)(function(){var G=c[0];pe!==G&&W(pe,G)},[c]),(0,x.o)(function(){b(me)||K(me)},[me]);var T=(0,V.Z)(function(G,D){K(G,D),C([je],D)});return[Ct,T]}},98423:function(_t,le,f){"use strict";f.d(le,{Z:function(){return V}});var w=f(1413);function V(x,_){var b=(0,w.Z)({},x);return Array.isArray(_)&&_.forEach(function(O){delete b[O]}),b}},73299:function(_t,le,f){"use strict";f.d(le,{Z:function(){return Ni}});var w=f(87462),V=f(1413),x=f(71002),_=f(97685),b=f(4942),O=f(45987),m=f(67294),ae=f(73935),Z=f(94184),v=f.n(Z),me=f(48555),ie=m.forwardRef(function(I,Y){var U=I.height,X=I.offsetY,$e=I.offsetX,ye=I.children,we=I.prefixCls,qe=I.onInnerResize,wt=I.innerProps,Dt=I.rtl,rt=I.extra,Ue={},y={display:"flex",flexDirection:"column"};if(X!==void 0){var L;Ue={height:U,position:"relative",overflow:"hidden"},y=(0,V.Z)((0,V.Z)({},y),{},(L={transform:"translateY(".concat(X,"px)")},(0,b.Z)(L,Dt?"marginRight":"marginLeft",-$e),(0,b.Z)(L,"position","absolute"),(0,b.Z)(L,"left",0),(0,b.Z)(L,"right",0),(0,b.Z)(L,"top",0),L))}return m.createElement("div",{style:Ue},m.createElement(me.Z,{onResize:function(N){var $=N.offsetHeight;$&&qe&&qe()}},m.createElement("div",(0,w.Z)({style:y,className:v()((0,b.Z)({},"".concat(we,"-holder-inner"),we)),ref:Y},wt),ye,rt)))});ie.displayName="Filler";var Re=ie,ve=function(Y){return+setTimeout(Y,16)},be=function(Y){return clearTimeout(Y)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ve=function(Y){return window.requestAnimationFrame(Y)},be=function(Y){return window.cancelAnimationFrame(Y)});var pe=0,K=new Map;function je(I){K.delete(I)}var Ct=function(Y){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;pe+=1;var X=pe;function $e(ye){if(ye===0)je(X),Y();else{var we=ve(function(){$e(ye-1)});K.set(X,we)}}return $e(U),X};Ct.cancel=function(I){var Y=K.get(I);return je(Y),be(Y)};var W=Ct;function j(I,Y){var U="touches"in I?I.touches[0]:I;return U[Y?"pageX":"pageY"]}var d=m.forwardRef(function(I,Y){var U,X=I.prefixCls,$e=I.rtl,ye=I.scrollOffset,we=I.scrollRange,qe=I.onStartMove,wt=I.onStopMove,Dt=I.onScroll,rt=I.horizontal,Ue=I.spinSize,y=I.containerSize,L=I.style,A=I.thumbStyle,N=m.useState(!1),$=(0,_.Z)(N,2),F=$[0],De=$[1],ft=m.useState(null),Xe=(0,_.Z)(ft,2),ge=Xe[0],Ie=Xe[1],Le=m.useState(null),$t=(0,_.Z)(Le,2),z=$t[0],Ne=$t[1],Vt=!$e,vn=m.useRef(),Et=m.useRef(),dt=m.useState(!1),Sn=(0,_.Z)(dt,2),Pe=Sn[0],qt=Sn[1],Gt=m.useRef(),xn=function(){clearTimeout(Gt.current),qt(!0),Gt.current=setTimeout(function(){qt(!1)},3e3)},fn=we-y||0,yr=y-Ue||0,Zn=fn>0,Nn=m.useMemo(function(){if(ye===0||fn===0)return 0;var Kn=ye/fn;return Kn*yr},[ye,fn,yr]),Or=function(Un){Un.stopPropagation(),Un.preventDefault()},Ir=m.useRef({top:Nn,dragging:F,pageY:ge,startTop:z});Ir.current={top:Nn,dragging:F,pageY:ge,startTop:z};var Rn=function(Un){De(!0),Ie(j(Un,rt)),Ne(Ir.current.top),qe(),Un.stopPropagation(),Un.preventDefault()};m.useEffect(function(){var Kn=function(pn){pn.preventDefault()},Un=vn.current,Qn=Et.current;return Un.addEventListener("touchstart",Kn),Qn.addEventListener("touchstart",Rn),function(){Un.removeEventListener("touchstart",Kn),Qn.removeEventListener("touchstart",Rn)}},[]);var br=m.useRef();br.current=fn;var cr=m.useRef();cr.current=yr,m.useEffect(function(){if(F){var Kn,Un=function(pn){var An=Ir.current,jn=An.dragging,Rr=An.pageY,ui=An.startTop;if(W.cancel(Kn),jn){var Gr=j(pn,rt)-Rr,Xr=ui;!Vt&&rt?Xr-=Gr:Xr+=Gr;var ci=br.current,Pn=cr.current,Yr=Pn?Xr/Pn:0,Fr=Math.ceil(Yr*ci);Fr=Math.max(Fr,0),Fr=Math.min(Fr,ci),Kn=W(function(){Dt(Fr,rt)})}},Qn=function(){De(!1),wt()};return window.addEventListener("mousemove",Un),window.addEventListener("touchmove",Un),window.addEventListener("mouseup",Qn),window.addEventListener("touchend",Qn),function(){window.removeEventListener("mousemove",Un),window.removeEventListener("touchmove",Un),window.removeEventListener("mouseup",Qn),window.removeEventListener("touchend",Qn),W.cancel(Kn)}}},[F]),m.useEffect(function(){xn()},[ye]),m.useImperativeHandle(Y,function(){return{delayHidden:xn}});var Sr="".concat(X,"-scrollbar"),Cn={position:"absolute",visibility:Pe&&Zn?null:"hidden"},ir={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return rt?(Cn.height=8,Cn.left=0,Cn.right=0,Cn.bottom=0,ir.height="100%",ir.width=Ue,Vt?ir.left=Nn:ir.right=Nn):(Cn.width=8,Cn.top=0,Cn.bottom=0,Vt?Cn.right=0:Cn.left=0,ir.width="100%",ir.height=Ue,ir.top=Nn),m.createElement("div",{ref:vn,className:v()(Sr,(U={},(0,b.Z)(U,"".concat(Sr,"-horizontal"),rt),(0,b.Z)(U,"".concat(Sr,"-vertical"),!rt),(0,b.Z)(U,"".concat(Sr,"-visible"),Pe),U)),style:(0,V.Z)((0,V.Z)({},Cn),L),onMouseDown:Or,onMouseMove:xn},m.createElement("div",{ref:Et,className:v()("".concat(Sr,"-thumb"),(0,b.Z)({},"".concat(Sr,"-thumb-moving"),F)),style:(0,V.Z)((0,V.Z)({},ir),A),onMouseDown:Rn}))}),c=d;function C(I){var Y=I.children,U=I.setRef,X=m.useCallback(function($e){U($e)},[]);return m.cloneElement(Y,{ref:X})}function T(I,Y,U,X,$e,ye,we){var qe=we.getKey;return I.slice(Y,U+1).map(function(wt,Dt){var rt=Y+Dt,Ue=ye(wt,rt,{style:{width:X}}),y=qe(wt);return m.createElement(C,{key:y,setRef:function(A){return $e(wt,A)}},Ue)})}function G(I){return I instanceof HTMLElement||I instanceof SVGElement}function D(I){return G(I)?I:I instanceof m.Component?ae.findDOMNode(I):null}var H=f(15671),q=f(43144),We=function(){function I(){(0,H.Z)(this,I),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,q.Z)(I,[{key:"set",value:function(U,X){this.maps[U]=X,this.id+=1}},{key:"get",value:function(U){return this.maps[U]}}]),I}(),se=We;function ke(I,Y,U){var X=m.useState(0),$e=(0,_.Z)(X,2),ye=$e[0],we=$e[1],qe=(0,m.useRef)(new Map),wt=(0,m.useRef)(new se),Dt=(0,m.useRef)();function rt(){W.cancel(Dt.current)}function Ue(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;rt();var A=function(){qe.current.forEach(function($,F){if($&&$.offsetParent){var De=D($),ft=De.offsetHeight;wt.current.get(F)!==ft&&wt.current.set(F,De.offsetHeight)}}),we(function($){return $+1})};L?A():Dt.current=W(A)}function y(L,A){var N=I(L),$=qe.current.get(N);A?(qe.current.set(N,A),Ue()):qe.current.delete(N),!$!=!A&&(A?Y==null||Y(L):U==null||U(L))}return(0,m.useEffect)(function(){return rt},[]),[y,Ue,wt.current,ye]}function Ve(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ae=Ve()?m.useLayoutEffect:m.useEffect,lt=function(Y,U){var X=m.useRef(!0);Ae(function(){return Y(X.current)},U),Ae(function(){return X.current=!1,function(){X.current=!0}},[])},ot=function(Y,U){lt(function(X){if(!X)return Y()},U)},Qe=lt;function Oe(I){var Y=m.useRef();Y.current=I;var U=m.useCallback(function(){for(var X,$e=arguments.length,ye=new Array($e),we=0;we<$e;we++)ye[we]=arguments[we];return(X=Y.current)===null||X===void 0?void 0:X.call.apply(X,[Y].concat(ye))},[]);return U}function Se(I){var Y=React.useRef(!1),U=React.useState(I),X=_slicedToArray(U,2),$e=X[0],ye=X[1];React.useEffect(function(){return Y.current=!1,function(){Y.current=!0}},[]);function we(qe,wt){wt&&Y.current||ye(qe)}return[$e,we]}function ct(I){return I!==void 0}function Mt(I,Y){var U=Y||{},X=U.defaultValue,$e=U.value,ye=U.onChange,we=U.postState,qe=useState(function(){return ct($e)?$e:ct(X)?typeof X=="function"?X():X:typeof I=="function"?I():I}),wt=_slicedToArray(qe,2),Dt=wt[0],rt=wt[1],Ue=$e!==void 0?$e:Dt,y=we?we(Ue):Ue,L=useEvent(ye),A=useState([Ue]),N=_slicedToArray(A,2),$=N[0],F=N[1];useLayoutUpdateEffect(function(){var ft=$[0];Dt!==ft&&L(Dt,ft)},[$]),useLayoutUpdateEffect(function(){ct($e)||rt($e)},[$e]);var De=useEvent(function(ft,Xe){rt(ft,Xe),F([Ue],Xe)});return[y,De]}var Ke=f(31461);function tt(I,Y,U){var X=React.useRef({});return(!("value"in X.current)||U(X.current.condition,Y))&&(X.current.value=I(),X.current.condition=Y),X.current.value}function Ge(I,Y){typeof I=="function"?I(Y):_typeof(I)==="object"&&I&&"current"in I&&(I.current=Y)}function mn(){for(var I=arguments.length,Y=new Array(I),U=0;U<I;U++)Y[U]=arguments[U];var X=Y.filter(function($e){return $e});return X.length<=1?X[0]:function($e){Y.forEach(function(ye){Ge(ye,$e)})}}function Xn(){for(var I=arguments.length,Y=new Array(I),U=0;U<I;U++)Y[U]=arguments[U];return useMemo(function(){return mn.apply(void 0,Y)},Y,function(X,$e){return X.length!==$e.length||X.every(function(ye,we){return ye!==$e[we]})})}function xe(I){var Y,U,X=isMemo(I)?I.type.type:I.type;return!(typeof X=="function"&&!((Y=X.prototype)!==null&&Y!==void 0&&Y.render)||typeof I=="function"&&!((U=I.prototype)!==null&&U!==void 0&&U.render))}function de(I){return!isValidElement(I)||isFragment(I)?!1:xe(I)}function Fe(I,Y,U,X){if(!Y.length)return U;var $e=_toArray(Y),ye=$e[0],we=$e.slice(1),qe;return!I&&typeof ye=="number"?qe=[]:Array.isArray(I)?qe=_toConsumableArray(I):qe=_objectSpread({},I),X&&U===void 0&&we.length===1?delete qe[ye][we[0]]:qe[ye]=Fe(qe[ye],we,U,X),qe}function he(I,Y,U){var X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Y.length&&X&&U===void 0&&!get(I,Y.slice(0,-1))?I:Fe(I,Y,U,X)}function nt(I){return _typeof(I)==="object"&&I!==null&&Object.getPrototypeOf(I)===Object.prototype}function St(I){return Array.isArray(I)?[]:{}}var st=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Be(){for(var I=arguments.length,Y=new Array(I),U=0;U<I;U++)Y[U]=arguments[U];var X=St(Y[0]);return Y.forEach(function($e){function ye(we,qe){var wt=new Set(qe),Dt=get($e,we),rt=Array.isArray(Dt);if(rt||nt(Dt)){if(!wt.has(Dt)){wt.add(Dt);var Ue=get(X,we);rt?X=he(X,we,[]):(!Ue||_typeof(Ue)!=="object")&&(X=he(X,we,St(Dt))),st(Dt).forEach(function(y){ye([].concat(_toConsumableArray(we),[y]),wt)})}}else X=he(X,we,Dt)}ye([])}),X}var gt={},ht=[],Rt=function(Y){ht.push(Y)};function Zt(I,Y){if(0)var U}function xt(I,Y){if(0)var U}function at(){gt={}}function Qt(I,Y,U){!Y&&!gt[U]&&(I(!1,U),gt[U]=!0)}function Ht(I,Y){Qt(Zt,I,Y)}function zt(I,Y){Qt(xt,I,Y)}Ht.preMessage=Rt,Ht.resetWarned=at,Ht.noteOnce=zt;var er=null,on=10;function Yn(I,Y,U,X,$e,ye,we,qe){var wt=m.useRef(),Dt=m.useState(null),rt=(0,_.Z)(Dt,2),Ue=rt[0],y=rt[1];return Qe(function(){if(Ue&&Ue.times<on){if(!I.current){y(function(xn){return(0,V.Z)({},xn)});return}ye();var L=Ue.targetAlign,A=Ue.originAlign,N=Ue.index,$=Ue.offset,F=I.current.clientHeight,De=!1,ft=L,Xe=null;if(F){for(var ge=L||A,Ie=0,Le=0,$t=0,z=Math.min(Y.length-1,N),Ne=0;Ne<=z;Ne+=1){var Vt=$e(Y[Ne]);Le=Ie;var vn=U.get(Vt);$t=Le+(vn===void 0?X:vn),Ie=$t}for(var Et=ge==="top"?$:F-$,dt=z;dt>=0;dt-=1){var Sn=$e(Y[dt]),Pe=U.get(Sn);if(Pe===void 0){De=!0;break}if(Et-=Pe,Et<=0)break}switch(ge){case"top":Xe=Le-$;break;case"bottom":Xe=$t-F+$;break;default:{var qt=I.current.scrollTop,Gt=qt+F;Le<qt?ft="top":$t>Gt&&(ft="bottom")}}Xe!==null&&we(Xe),Xe!==Ue.lastTop&&(De=!0)}De&&y(function(xn){return(0,V.Z)((0,V.Z)({},xn),{},{times:xn.times+1,targetAlign:ft,lastTop:Xe})})}},[Ue,I.current]),function(L){if(L==null){qe();return}if(W.cancel(wt.current),typeof L=="number")we(L);else if(L&&(0,x.Z)(L)==="object"){var A,N=L.align;"index"in L?A=L.index:A=Y.findIndex(function(De){return $e(De)===L.key});var $=L.offset,F=$===void 0?0:$;y({times:0,index:A,offset:F,originAlign:N})}}}function ue(I,Y,U,X){var $e=U-I,ye=Y-U,we=Math.min($e,ye)*2;if(X<=we){var qe=Math.floor(X/2);return X%2?U+qe+1:U-qe}return $e>ye?U-(X-ye):U+(X-$e)}function hn(I,Y,U){var X=I.length,$e=Y.length,ye,we;if(X===0&&$e===0)return null;X<$e?(ye=I,we=Y):(ye=Y,we=I);var qe={__EMPTY_ITEM__:!0};function wt(A){return A!==void 0?U(A):qe}for(var Dt=null,rt=Math.abs(X-$e)!==1,Ue=0;Ue<we.length;Ue+=1){var y=wt(ye[Ue]),L=wt(we[Ue]);if(y!==L){Dt=Ue,rt=rt||y!==wt(we[Ue+1]);break}}return Dt===null?null:{index:Dt,multiple:rt}}function tn(I,Y,U){var X=m.useState(I),$e=(0,_.Z)(X,2),ye=$e[0],we=$e[1],qe=m.useState(null),wt=(0,_.Z)(qe,2),Dt=wt[0],rt=wt[1];return m.useEffect(function(){var Ue=hn(ye||[],I||[],Y);(Ue==null?void 0:Ue.index)!==void 0&&(U==null||U(Ue.index),rt(I[Ue.index])),we(I)},[I]),[Dt]}var yn=(typeof navigator=="undefined"?"undefined":(0,x.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),bn=yn,Ur=function(I,Y){var U=(0,m.useRef)(!1),X=(0,m.useRef)(null);function $e(){clearTimeout(X.current),U.current=!0,X.current=setTimeout(function(){U.current=!1},50)}var ye=(0,m.useRef)({top:I,bottom:Y});return ye.current.top=I,ye.current.bottom=Y,function(we){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,wt=we<0&&ye.current.top||we>0&&ye.current.bottom;return qe&&wt?(clearTimeout(X.current),U.current=!1):(!wt||U.current)&&$e(),!U.current&&wt}};function rr(I,Y,U,X,$e){var ye=(0,m.useRef)(0),we=(0,m.useRef)(null),qe=(0,m.useRef)(null),wt=(0,m.useRef)(!1),Dt=Ur(Y,U);function rt($,F){W.cancel(we.current),ye.current+=F,qe.current=F,!Dt(F)&&(bn||$.preventDefault(),we.current=W(function(){var De=wt.current?10:1;$e(ye.current*De),ye.current=0}))}function Ue($,F){$e(F,!0),bn||$.preventDefault()}var y=(0,m.useRef)(null),L=(0,m.useRef)(null);function A($){if(I){W.cancel(L.current),L.current=W(function(){y.current=null},2);var F=$.deltaX,De=$.deltaY,ft=$.shiftKey,Xe=F,ge=De;(y.current==="sx"||!y.current&&ft&&De&&!F)&&(Xe=De,ge=0,y.current="sx");var Ie=Math.abs(Xe),Le=Math.abs(ge);y.current===null&&(y.current=X&&Ie>Le?"x":"y"),y.current==="y"?rt($,ge):Ue($,Xe)}}function N($){I&&(wt.current=$.detail===qe.current)}return[A,N]}var Ar=14/15;function zn(I,Y,U){var X=(0,m.useRef)(!1),$e=(0,m.useRef)(0),ye=(0,m.useRef)(null),we=(0,m.useRef)(null),qe,wt=function(y){if(X.current){var L=Math.ceil(y.touches[0].pageY),A=$e.current-L;$e.current=L,U(A)&&y.preventDefault(),clearInterval(we.current),we.current=setInterval(function(){A*=Ar,(!U(A,!0)||Math.abs(A)<=.1)&&clearInterval(we.current)},16)}},Dt=function(){X.current=!1,qe()},rt=function(y){qe(),y.touches.length===1&&!X.current&&(X.current=!0,$e.current=Math.ceil(y.touches[0].pageY),ye.current=y.target,ye.current.addEventListener("touchmove",wt),ye.current.addEventListener("touchend",Dt))};qe=function(){ye.current&&(ye.current.removeEventListener("touchmove",wt),ye.current.removeEventListener("touchend",Dt))},Qe(function(){return I&&Y.current.addEventListener("touchstart",rt),function(){var Ue;(Ue=Y.current)===null||Ue===void 0||Ue.removeEventListener("touchstart",rt),qe(),clearInterval(we.current)}},[I])}var _n=20;function jr(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,U=I/Y*100;return isNaN(U)&&(U=0),U=Math.max(U,_n),U=Math.min(U,I/2),Math.floor(U)}function kr(I,Y,U,X){var $e=m.useMemo(function(){return[new Map,[]]},[I,U.id,X]),ye=(0,_.Z)($e,2),we=ye[0],qe=ye[1],wt=function(rt){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rt,y=we.get(rt),L=we.get(Ue);if(y===void 0||L===void 0)for(var A=I.length,N=qe.length;N<A;N+=1){var $,F=I[N],De=Y(F);we.set(De,N);var ft=($=U.get(De))!==null&&$!==void 0?$:X;if(qe[N]=(qe[N-1]||0)+ft,De===rt&&(y=N),De===Ue&&(L=N),y!==void 0&&L!==void 0)break}return{top:qe[y-1]||0,bottom:qe[L]}};return wt}var Si=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],li=[],Oi={overflowY:"auto",overflowAnchor:"none"};function Vr(I,Y){var U=I.prefixCls,X=U===void 0?"rc-virtual-list":U,$e=I.className,ye=I.height,we=I.itemHeight,qe=I.fullHeight,wt=qe===void 0?!0:qe,Dt=I.style,rt=I.data,Ue=I.children,y=I.itemKey,L=I.virtual,A=I.direction,N=I.scrollWidth,$=I.component,F=$===void 0?"div":$,De=I.onScroll,ft=I.onVirtualScroll,Xe=I.onVisibleChange,ge=I.innerProps,Ie=I.extraRender,Le=I.styles,$t=(0,O.Z)(I,Si),z=!!(L!==!1&&ye&&we),Ne=z&&rt&&(we*rt.length>ye||!!N),Vt=A==="rtl",vn=v()(X,(0,b.Z)({},"".concat(X,"-rtl"),Vt),$e),Et=rt||li,dt=(0,m.useRef)(),Sn=(0,m.useRef)(),Pe=(0,m.useState)(0),qt=(0,_.Z)(Pe,2),Gt=qt[0],xn=qt[1],fn=(0,m.useState)(0),yr=(0,_.Z)(fn,2),Zn=yr[0],Nn=yr[1],Or=(0,m.useState)(!1),Ir=(0,_.Z)(Or,2),Rn=Ir[0],br=Ir[1],cr=function(){br(!0)},Sr=function(){br(!1)},Cn=m.useCallback(function(ee){return typeof y=="function"?y(ee):ee==null?void 0:ee[y]},[y]),ir={getKey:Cn};function Kn(ee){xn(function(te){var ne;typeof ee=="function"?ne=ee(te):ne=ee;var He=Ro(ne);return dt.current.scrollTop=He,He})}var Un=(0,m.useRef)({start:0,end:Et.length}),Qn=(0,m.useRef)(),fr=tn(Et,Cn),pn=(0,_.Z)(fr,1),An=pn[0];Qn.current=An;var jn=ke(Cn,null,null),Rr=(0,_.Z)(jn,4),ui=Rr[0],Gr=Rr[1],Xr=Rr[2],ci=Rr[3],Pn=m.useMemo(function(){if(!z)return{scrollHeight:void 0,start:0,end:Et.length-1,offset:void 0};if(!Ne){var ee;return{scrollHeight:((ee=Sn.current)===null||ee===void 0?void 0:ee.offsetHeight)||0,start:0,end:Et.length-1,offset:void 0}}for(var te=0,ne,He,re,Je=Et.length,Ot=0;Ot<Je;Ot+=1){var Tt=Et[Ot],Lt=Cn(Tt),mt=Xr.get(Lt),It=te+(mt===void 0?we:mt);It>=Gt&&ne===void 0&&(ne=Ot,He=te),It>Gt+ye&&re===void 0&&(re=Ot),te=It}return ne===void 0&&(ne=0,He=0,re=Math.ceil(ye/we)),re===void 0&&(re=Et.length-1),re=Math.min(re+1,Et.length-1),{scrollHeight:te,start:ne,end:re,offset:He}},[Ne,z,Gt,Et,ci,ye]),Yr=Pn.scrollHeight,Fr=Pn.start,$r=Pn.end,Ai=Pn.offset;Un.current.start=Fr,Un.current.end=$r;var Hi=m.useState({width:0,height:ye}),xi=(0,_.Z)(Hi,2),_r=xi[0],Vi=xi[1],Wi=function(te){Vi({width:te.width||te.offsetWidth,height:te.height||te.offsetHeight})},Gi=(0,m.useRef)(),Fi=(0,m.useRef)(),fi=m.useMemo(function(){return jr(_r.width,N)},[_r.width,N]),Vo=m.useMemo(function(){return jr(_r.height,Yr)},[_r.height,Yr]),Co=Yr-ye,qi=(0,m.useRef)(Co);qi.current=Co;function Ro(ee){var te=ee;return Number.isNaN(qi.current)||(te=Math.min(te,qi.current)),te=Math.max(te,0),te}var Ii=Gt<=0,uo=Gt>=Co,Ri=Ur(Ii,uo),Xi=function(){return{x:Vt?-Zn:Zn,y:Gt}},eo=(0,m.useRef)(Xi()),$i=Oe(function(){if(ft){var ee=Xi();(eo.current.x!==ee.x||eo.current.y!==ee.y)&&(ft(ee),eo.current=ee)}});function Lo(ee,te){var ne=ee;te?((0,ae.flushSync)(function(){Nn(ne)}),$i()):Kn(ne)}function To(ee){var te=ee.currentTarget.scrollTop;te!==Gt&&Kn(te),De==null||De(ee),$i()}var xo=function(te){var ne=te,He=N-_r.width;return ne=Math.max(ne,0),ne=Math.min(ne,He),ne},Yi=Oe(function(ee,te){te?((0,ae.flushSync)(function(){Nn(function(ne){var He=ne+(Vt?-ee:ee);return xo(He)})}),$i()):Kn(function(ne){var He=ne+ee;return He})}),Po=rr(z,Ii,uo,!!N,Yi),wo=(0,_.Z)(Po,2),h=wo[0],p=wo[1];zn(z,dt,function(ee,te){return Ri(ee,te)?!1:(h({preventDefault:function(){},deltaY:ee}),!0)}),Qe(function(){function ee(ne){z&&ne.preventDefault()}var te=dt.current;return te.addEventListener("wheel",h),te.addEventListener("DOMMouseScroll",p),te.addEventListener("MozMousePixelScroll",ee),function(){te.removeEventListener("wheel",h),te.removeEventListener("DOMMouseScroll",p),te.removeEventListener("MozMousePixelScroll",ee)}},[z]),Qe(function(){N&&Nn(function(ee){return xo(ee)})},[_r.width,N]);var P=function(){var te,ne;(te=Gi.current)===null||te===void 0||te.delayHidden(),(ne=Fi.current)===null||ne===void 0||ne.delayHidden()},M=Yn(dt,Et,Xr,we,Cn,function(){return Gr(!0)},Kn,P);m.useImperativeHandle(Y,function(){return{getScrollInfo:Xi,scrollTo:function(te){function ne(He){return He&&(0,x.Z)(He)==="object"&&("left"in He||"top"in He)}ne(te)?(te.left!==void 0&&Nn(xo(te.left)),M(te.top)):M(te)}}}),Qe(function(){if(Xe){var ee=Et.slice(Fr,$r+1);Xe(ee,Et)}},[Fr,$r,Et]);var k=kr(Et,Cn,Xr,we),Q=Ie==null?void 0:Ie({start:Fr,end:$r,virtual:Ne,offsetX:Zn,offsetY:Ai,rtl:Vt,getSize:k}),ce=T(Et,Fr,$r,N,ui,Ue,ir),Ce=null;ye&&(Ce=(0,V.Z)((0,b.Z)({},wt?"height":"maxHeight",ye),Oi),z&&(Ce.overflowY="hidden",N&&(Ce.overflowX="hidden"),Rn&&(Ce.pointerEvents="none")));var Te={};return Vt&&(Te.dir="rtl"),m.createElement("div",(0,w.Z)({style:(0,V.Z)((0,V.Z)({},Dt),{},{position:"relative"}),className:vn},Te,$t),m.createElement(me.Z,{onResize:Wi},m.createElement(F,{className:"".concat(X,"-holder"),style:Ce,ref:dt,onScroll:To,onMouseEnter:P},m.createElement(Re,{prefixCls:X,height:Yr,offsetX:Zn,offsetY:Ai,scrollWidth:N,onInnerResize:Gr,ref:Sn,innerProps:ge,rtl:Vt,extra:Q},ce))),Ne&&Yr>ye&&m.createElement(c,{ref:Gi,prefixCls:X,scrollOffset:Gt,scrollRange:Yr,rtl:Vt,onScroll:Lo,onStartMove:cr,onStopMove:Sr,spinSize:Vo,containerSize:_r.height,style:Le==null?void 0:Le.verticalScrollBar,thumbStyle:Le==null?void 0:Le.verticalScrollBarThumb}),Ne&&N&&m.createElement(c,{ref:Fi,prefixCls:X,scrollOffset:Zn,scrollRange:N,rtl:Vt,onScroll:Lo,onStartMove:cr,onStopMove:Sr,spinSize:fi,containerSize:_r.width,horizontal:!0,style:Le==null?void 0:Le.horizontalScrollBar,thumbStyle:Le==null?void 0:Le.horizontalScrollBarThumb}))}var Ci=m.forwardRef(Vr);Ci.displayName="List";var si=Ci,Ni=si},66392:function(_t,le){"use strict";var f;var w=Symbol.for("react.element"),V=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),m=Symbol.for("react.context"),ae=Symbol.for("react.server_context"),Z=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),Re=Symbol.for("react.lazy"),ve=Symbol.for("react.offscreen"),be;be=Symbol.for("react.module.reference");function pe(K){if(typeof K=="object"&&K!==null){var je=K.$$typeof;switch(je){case w:switch(K=K.type,K){case x:case b:case _:case v:case me:return K;default:switch(K=K&&K.$$typeof,K){case ae:case m:case Z:case Re:case ie:case O:return K;default:return je}}case V:return je}}}f=m,f=O,f=w,f=Z,f=x,f=Re,f=ie,f=V,f=b,f=_,f=v,f=me,f=function(){return!1},f=function(){return!1},f=function(K){return pe(K)===m},f=function(K){return pe(K)===O},f=function(K){return typeof K=="object"&&K!==null&&K.$$typeof===w},f=function(K){return pe(K)===Z},f=function(K){return pe(K)===x},f=function(K){return pe(K)===Re},f=function(K){return pe(K)===ie},f=function(K){return pe(K)===V},f=function(K){return pe(K)===b},f=function(K){return pe(K)===_},f=function(K){return pe(K)===v},f=function(K){return pe(K)===me},f=function(K){return typeof K=="string"||typeof K=="function"||K===x||K===b||K===_||K===v||K===me||K===ve||typeof K=="object"&&K!==null&&(K.$$typeof===Re||K.$$typeof===ie||K.$$typeof===O||K.$$typeof===m||K.$$typeof===Z||K.$$typeof===be||K.getModuleId!==void 0)},f=pe},31461:function(_t,le,f){"use strict";f(66392)},17423:function(_t,le,f){"use strict";f.d(le,{Z:function(){return ae}});const w=Z=>typeof Z=="object"&&Z!=null&&Z.nodeType===1,V=(Z,v)=>(!v||Z!=="hidden")&&Z!=="visible"&&Z!=="clip",x=(Z,v)=>{if(Z.clientHeight<Z.scrollHeight||Z.clientWidth<Z.scrollWidth){const me=getComputedStyle(Z,null);return V(me.overflowY,v)||V(me.overflowX,v)||(ie=>{const Re=(ve=>{if(!ve.ownerDocument||!ve.ownerDocument.defaultView)return null;try{return ve.ownerDocument.defaultView.frameElement}catch(be){return null}})(ie);return!!Re&&(Re.clientHeight<ie.scrollHeight||Re.clientWidth<ie.scrollWidth)})(Z)}return!1},_=(Z,v,me,ie,Re,ve,be,pe)=>ve<Z&&be>v||ve>Z&&be<v?0:ve<=Z&&pe<=me||be>=v&&pe>=me?ve-Z-ie:be>v&&pe<me||ve<Z&&pe>me?be-v+Re:0,b=Z=>{const v=Z.parentElement;return v==null?Z.getRootNode().host||null:v},O=(Z,v)=>{var me,ie,Re,ve;if(typeof document=="undefined")return[];const{scrollMode:be,block:pe,inline:K,boundary:je,skipOverflowHiddenElements:Ct}=v,W=typeof je=="function"?je:Mt=>Mt!==je;if(!w(Z))throw new TypeError("Invalid target");const j=document.scrollingElement||document.documentElement,d=[];let c=Z;for(;w(c)&&W(c);){if(c=b(c),c===j){d.push(c);break}c!=null&&c===document.body&&x(c)&&!x(document.documentElement)||c!=null&&x(c,Ct)&&d.push(c)}const C=(ie=(me=window.visualViewport)==null?void 0:me.width)!=null?ie:innerWidth,T=(ve=(Re=window.visualViewport)==null?void 0:Re.height)!=null?ve:innerHeight,{scrollX:G,scrollY:D}=window,{height:H,width:q,top:We,right:se,bottom:ke,left:Ve}=Z.getBoundingClientRect(),{top:Ae,right:lt,bottom:ot,left:Qe}=(Mt=>{const Ke=window.getComputedStyle(Mt);return{top:parseFloat(Ke.scrollMarginTop)||0,right:parseFloat(Ke.scrollMarginRight)||0,bottom:parseFloat(Ke.scrollMarginBottom)||0,left:parseFloat(Ke.scrollMarginLeft)||0}})(Z);let Oe=pe==="start"||pe==="nearest"?We-Ae:pe==="end"?ke+ot:We+H/2-Ae+ot,Se=K==="center"?Ve+q/2-Qe+lt:K==="end"?se+lt:Ve-Qe;const ct=[];for(let Mt=0;Mt<d.length;Mt++){const Ke=d[Mt],{height:tt,width:Ge,top:mn,right:Xn,bottom:xe,left:de}=Ke.getBoundingClientRect();if(be==="if-needed"&&We>=0&&Ve>=0&&ke<=T&&se<=C&&We>=mn&&ke<=xe&&Ve>=de&&se<=Xn)return ct;const Fe=getComputedStyle(Ke),he=parseInt(Fe.borderLeftWidth,10),nt=parseInt(Fe.borderTopWidth,10),St=parseInt(Fe.borderRightWidth,10),st=parseInt(Fe.borderBottomWidth,10);let Be=0,gt=0;const ht="offsetWidth"in Ke?Ke.offsetWidth-Ke.clientWidth-he-St:0,Rt="offsetHeight"in Ke?Ke.offsetHeight-Ke.clientHeight-nt-st:0,Zt="offsetWidth"in Ke?Ke.offsetWidth===0?0:Ge/Ke.offsetWidth:0,xt="offsetHeight"in Ke?Ke.offsetHeight===0?0:tt/Ke.offsetHeight:0;if(j===Ke)Be=pe==="start"?Oe:pe==="end"?Oe-T:pe==="nearest"?_(D,D+T,T,nt,st,D+Oe,D+Oe+H,H):Oe-T/2,gt=K==="start"?Se:K==="center"?Se-C/2:K==="end"?Se-C:_(G,G+C,C,he,St,G+Se,G+Se+q,q),Be=Math.max(0,Be+D),gt=Math.max(0,gt+G);else{Be=pe==="start"?Oe-mn-nt:pe==="end"?Oe-xe+st+Rt:pe==="nearest"?_(mn,xe,tt,nt,st+Rt,Oe,Oe+H,H):Oe-(mn+tt/2)+Rt/2,gt=K==="start"?Se-de-he:K==="center"?Se-(de+Ge/2)+ht/2:K==="end"?Se-Xn+St+ht:_(de,Xn,Ge,he,St+ht,Se,Se+q,q);const{scrollLeft:at,scrollTop:Qt}=Ke;Be=xt===0?0:Math.max(0,Math.min(Qt+Be/xt,Ke.scrollHeight-tt/xt+Rt)),gt=Zt===0?0:Math.max(0,Math.min(at+gt/Zt,Ke.scrollWidth-Ge/Zt+ht)),Oe+=Qt-Be,Se+=at-gt}ct.push({el:Ke,top:Be,left:gt})}return ct},m=Z=>Z===!1?{block:"end",inline:"nearest"}:(v=>v===Object(v)&&Object.keys(v).length!==0)(Z)?Z:{block:"start",inline:"nearest"};function ae(Z,v){if(!Z.isConnected||!(Re=>{let ve=Re;for(;ve&&ve.parentNode;){if(ve.parentNode===document)return!0;ve=ve.parentNode instanceof ShadowRoot?ve.parentNode.host:ve.parentNode}return!1})(Z))return;const me=(Re=>{const ve=window.getComputedStyle(Re);return{top:parseFloat(ve.scrollMarginTop)||0,right:parseFloat(ve.scrollMarginRight)||0,bottom:parseFloat(ve.scrollMarginBottom)||0,left:parseFloat(ve.scrollMarginLeft)||0}})(Z);if((Re=>typeof Re=="object"&&typeof Re.behavior=="function")(v))return v.behavior(O(Z,v));const ie=typeof v=="boolean"||v==null?void 0:v.behavior;for(const{el:Re,top:ve,left:be}of O(Z,m(v))){const pe=ve-me.top+me.bottom,K=be-me.left+me.right;Re.scroll({top:pe,left:K,behavior:ie})}}}}]);