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__Information__Detail__ind...

152 lines
242 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6988],{84105:function(Xt,ft,a){a.d(ft,{Z:function(){return ot}});var c=a(54476),h=a(59301),L={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"},it=L,y=a(7657),f=function(F,Z){return h.createElement(y.Z,(0,c.Z)({},F,{ref:Z,icon:it}))},et=h.forwardRef(f),ot=et},18785:function(Xt,ft,a){a.d(ft,{Z:function(){return ot}});var c=a(54476),h=a(59301),L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},it=L,y=a(7657),f=function(F,Z){return h.createElement(y.Z,(0,c.Z)({},F,{ref:Z,icon:it}))},et=h.forwardRef(f),ot=et},33853:function(Xt,ft,a){a.d(ft,{Z:function(){return ot}});var c=a(54476),h=a(59301),L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},it=L,y=a(7657),f=function(F,Z){return h.createElement(y.Z,(0,c.Z)({},F,{ref:Z,icon:it}))},et=h.forwardRef(f),ot=et},38819:function(Xt,ft,a){a.d(ft,{Z:function(){return ot}});var c=a(54476),h=a(59301),L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},it=L,y=a(7657),f=function(F,Z){return h.createElement(y.Z,(0,c.Z)({},F,{ref:Z,icon:it}))},et=h.forwardRef(f),ot=et},90559:function(){},27183:function(Xt,ft,a){a.d(ft,{Z:function(){return ht}});var c=a(59301),h={flex_box_center:"flex_box_center___A3pzf",flex_space_between:"flex_space_between___JBoa5",flex_box_vertical_center:"flex_box_vertical_center___MJuIO",flex_box_center_end:"flex_box_center_end___OcjUA",flex_box_column:"flex_box_column___zSH4A",list:"list___KhJas",middle:"middle___IjlYi",row:"row___GGtIx",title:"title___o_xqf",size:"size___OVRoL",download:"download___ZLcIH",preview:"preview___gi0kI",annotation:"annotation___KVSwj"},L=a(92310),it=a.n(L),y=a(21185),f=a(16750),et=a(65862),ot=a(74128),_=a(38147),F=a(41867),Z=a(65582),M=a(8591),l=(U,at,T)=>new Promise((ut,W)=>{var tt=k=>{try{$(T.next(k))}catch(x){W(x)}},R=k=>{try{$(T.throw(k))}catch(x){W(x)}},$=k=>k.done?ut(k.value):Promise.resolve(k.value).then(tt,R);$((T=T.apply(U,at)).next())});const K=({className:U,style:at,dataSource:T=[],authority:ut=!1,callback:W,showDimensions:tt=!0,classroomList:R})=>{var $;const[k,x]=(0,c.useState)({content:"",type:""}),[j,A]=(0,c.useState)({}),[Q,H]=(0,c.useState)(!1),[Y,st]=(0,c.useState)({title:"",visible:!1,src:"",snapshotData:{}}),St=(0,c.useRef)(),d=m=>l(void 0,null,function*(){if(A(m),m.file_type==="txt"){const J=yield(0,_.ZP)(m.url,{method:"get",headers:{"Content-Type":"application/xml"}});St.current=J}x({type:m.file_type,content:ot.Z.API_SERVER+m.url})}),O=m=>{var J;st({visible:!0,src:ot.Z.API_SERVER+m.url,id:m.id,title:m.title,snapshotData:(J=m==null?void 0:m.subitem)==null?void 0:J.settings})},D=m=>l(void 0,null,function*(){var J;x({type:m.file_type,content:ot.Z.API_SERVER+((J=m==null?void 0:m.subitem)==null?void 0:J.url)})}),p=()=>{W(),st({visible:!1})};return T!=null&&T.length?c.createElement(c.Fragment,null,c.createElement("div",{className:it()(h.list,U),style:at},T.map((m,J)=>{var X,z,q;return c.createElement("div",{key:J,className:h.row},c.createElement("div",{className:h.title,onClick:()=>d(m)},c.createElement("i",{className:"iconfont icon-fujian1"}),c.createElement("span",{title:m.title},m.title)),c.createElement("div",{className:h.size},m.filesize),c.createElement("div",{className:h.download,onClick:()=>{var nt,dt;if((0,F.Rm)()&&!((nt=R.AssistantObject.normal)!=null&&nt.can_download)){M.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}(0,et.Nd)("",`${ot.Z.API_SERVER}${(dt=m.url)==null?void 0:dt.replace("disposition=inline","")}`)}},c.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D"),!["other","download"].includes(m==null?void 0:m.file_type)&&c.createElement("div",{className:h.preview,onClick:()=>d(m)},c.createElement("i",{className:"iconfont icon-yulan"}),"\u9884\u89C8"),["image"].includes(m==null?void 0:m.file_type)&&tt&&(ut?c.createElement("div",{className:h.annotation,onClick:()=>O(m)},c.createElement("i",{className:"iconfont icon-pizhu"}),(X=m.subitem)!=null&&X.id?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"):((z=m.subitem)==null?void 0:z.id)&&c.createElement("div",{className:h.annotation,onClick:()=>D(m)},c.createElement("i",{className:"iconfont icon-chakanlaoshipizhu1"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8")),["image"].includes(m==null?void 0:m.file_type)&&((q=m.subitem)==null?void 0:q.id)&&c.createElement("div",{className:h.download,style:{marginLeft:20},onClick:()=>{var nt,dt;(0,et.Nd)("",`${ot.Z.API_SERVER}${(dt=(nt=m==null?void 0:m.subitem)==null?void 0:nt.url)==null?void 0:dt.replace("disposition=inline","")}`)}},c.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D\u6279\u6CE8\u6587\u4EF6"),["office"].includes(m==null?void 0:m.file_type)&&(0,F.eB)()&&["xlsx","docx","pptx"].includes(m==null?void 0:m.file_sub)&&tt&&c.createElement("div",{className:h.annotation,onClick:()=>{H(!0),d(m)}},c.createElement("i",{className:"iconfont icon-pizhu"}),m.is_edit?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"),m.is_edit&&(0,F.dE)()&&tt&&c.createElement("div",{className:h.annotation,onClick:()=>{d(m)}},c.createElement("i",{className:"iconfont icon-sousuo7"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8"))})),c.createElement(y.Z,{close:!0,data:k==null?void 0:k.content,type:k==null?void 0:k.type,hasMask:!0,disabledDownload:(0,F.Rm)()&&!(($=R.AssistantObject.normal)!=null&&$.can_download),editOffice:Q?"edit":"view",monacoEditor:{value:St.current,language:"txt",onChange:()=>{},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onImgDimensions:ut&&tt&&k.type==="image"?()=>O(j):null,onClose:()=>{W(),H(!1),x({content:"",type:""})}}),c.createElement(f.Z,{onOk:p,onClose:()=>st({visible:!1}),data:Y,showFullTools:!0})):null};var ht=(0,Z.connect)(({classroomList:U})=>({classroomList:U}))(K)},16750:function(Xt,ft,a){a.d(ft,{Z:function(){return Z}});var c=a(59301),h={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},L=a(92310),it=a.n(L),y=a(71418),f=a(2859),et=a(38147),ot=a(65862),_=(M,l,K)=>new Promise((ht,U)=>{var at=W=>{try{ut(K.next(W))}catch(tt){U(tt)}},T=W=>{try{ut(K.throw(W))}catch(tt){U(tt)}},ut=W=>W.done?ht(W.value):Promise.resolve(W.value).then(at,T);ut((K=K.apply(M,l)).next())}),Z=({data:M,className:l,fullWidth:K,style:ht={},onClose:U,onOk:at,showFullTools:T,noAssociationId:ut})=>{const W=(0,c.useRef)(null),tt=(0,c.useRef)(null),R=(0,c.useRef)(null),$=(0,c.useRef)(null),[k,x]=(0,c.useState)(!1),[j,A]=(0,c.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,c.useEffect)(()=>{R.current||(R.current=document.createElement("style"),document.head.appendChild(R.current)),M!=null&&M.visible?(document.body.setAttribute("data-custom","y-hidden"),R.current.innerHTML=" html { overflow-y: hidden; }",M!=null&&M.src&&Q()):(document.body.removeAttribute("data-custom"),R.current&&(document.head.removeChild(R.current),R.current=null))},[M==null?void 0:M.visible]);const Q=()=>_(void 0,null,function*(){x(!0),A("\u6B63\u5728\u52A0\u8F7D\u4E2D");const d=yield(0,ot.ZJ)(M==null?void 0:M.src);W.current.src="",W.current.src=d,W.current.onload=function(){St()},x(!1),A("")}),H=()=>{document.body.removeAttribute("data-custom"),R.current.innerHTML=" ",U()},Y=d=>_(void 0,null,function*(){x(!0),A("\u6B63\u5728\u4FDD\u5B58\u4E2D");const O=yield(0,et.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:M.title,file:d.dataUrl}});O!=null&&O.id&&!ut?(yield(0,et.ZP)(`/api/attachments/${M.id}/add_subitem.json`,{method:"post",body:{subitem_id:O==null?void 0:O.id,settings:JSON.stringify(d.state)}})).status===0&&at():O!=null&&O.id&&at(O),document.body.removeAttribute("data-custom"),R.current.innerHTML=" ",x(!1),A("")}),st=()=>{const d=document.querySelector('a[href="https://markerjs.com/"]');d&&d.parentNode&&(d.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(D=>{const p=document.querySelector(D.name);p&&p.setAttribute("title",D.title)})},St=()=>{tt.current=new f.hP(W.current),tt.current.targetRoot=$.current,tt.current.addEventListener("render",Y),tt.current.addEventListener("beforeclose",H),T&&(tt.current.availableMarkerTypes=tt.current.ALL_MARKER_TYPES,tt.current.uiStyleSettings.redoButtonVisible=!0,tt.current.uiStyleSettings.notesButtonVisible=!0,tt.current.uiStyleSettings.zoomButtonVisible=!0,tt.current.uiStyleSettings.zoomOutButtonVisible=!0,tt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=tt.current.uiStyleSettings,tt.current.show(),M!=null&&M.snapshotData&&tt.current.restoreState(M.snapshotData),setTimeout(()=>{window.scrollTo(0,0),st()},300)};return c.createElement(c.Fragment,null,(M==null?void 0:M.visible)&&c.createElement(y.Z,{spinning:k,tip:j,style:{position:"absolute"}},c.createElement("div",{ref:$,className:it()(h.imageDimensions,l,K?h.fullWidth:""),style:ht},c.createElement("img",{className:h.img,ref:W}))))}},22962:function(Xt,ft,a){a.r(ft),a.d(ft,{default:function(){return tt}});var c=a(59301),h=a(43418),L=a(8591),it=a(66104),y=a(65582),f={flex_box_center:"flex_box_center___lnp6p",flex_space_between:"flex_space_between___oy2sS",flex_box_vertical_center:"flex_box_vertical_center___R6TSa",flex_box_center_end:"flex_box_center_end___kJ6HL",flex_box_column:"flex_box_column___rtcpx",bannerButton:"bannerButton___TZefa",menuitem:"menuitem____YRxQ",semenuitem:"semenuitem____YkHW",description:"description___n8Bm9",ehover:"ehover___dTxIt",dhover:"dhover___R4qi3",innerhtml:"innerhtml___jmF_O"},et=a(90559),ot=a(56656),_=a.n(ot),F=a(38147),Z=a(27183),M=a(41867),l=Object.defineProperty,K=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,at=(R,$,k)=>$ in R?l(R,$,{enumerable:!0,configurable:!0,writable:!0,value:k}):R[$]=k,T=(R,$)=>{for(var k in $||($={}))ht.call($,k)&&at(R,k,$[k]);if(K)for(var k of K($))U.call($,k)&&at(R,k,$[k]);return R},ut=(R,$,k)=>new Promise((x,j)=>{var A=Y=>{try{H(k.next(Y))}catch(st){j(st)}},Q=Y=>{try{H(k.throw(Y))}catch(st){j(st)}},H=Y=>Y.done?x(Y.value):Promise.resolve(Y.value).then(A,Q);H((k=k.apply(R,$)).next())});const W=({homePage:R,globalSetting:$,user:k,loading:x,dispatch:j})=>{var A;const[Q]=(0,y.useSearchParams)(),[H,Y]=(0,c.useState)({}),[st,St]=(0,c.useState)(!1),[d,O]=(0,c.useState)(!1),[D,p]=(0,c.useState)(T({page:1,limit:10,setag:"\u5168\u90E8"},(0,y.useParams)()));(0,c.useEffect)(()=>{m()},[]);function m(){return ut(this,null,function*(){var z,q,nt,dt,vt,bt;let gt=Q.get("token"),pt=yield(0,F.ZP)(`/api/news_events/${D.id}.json`,{method:"get",params:{token:gt,new_type:2}});(pt==null?void 0:pt.status)===0&&(Y(pt==null?void 0:pt.data),St(pt==null?void 0:pt.can_edit),O(pt==null?void 0:pt.can_examine),sessionStorage.setItem("datastatus",(z=pt==null?void 0:pt.data)==null?void 0:z.status),j({type:"globalSetting/setShareData",payload:{title:(q=pt==null?void 0:pt.data)==null?void 0:q.title,desc:(dt=(nt=pt==null?void 0:pt.data)==null?void 0:nt.content)==null?void 0:dt.replaceAll(/<[^>]+>/g,""),imgUrl:`${(bt=(vt=pt==null?void 0:pt.data)==null?void 0:vt.cover)==null?void 0:bt.domain_url}?x-oss-process=image/resize,h_200,w_200,m_pad`}}))})}const J=(z,q)=>ut(void 0,null,function*(){h.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",content:`\u8BF7\u786E\u8BA4\u662F\u5426${q}\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\u3002`,onOk:()=>ut(void 0,null,function*(){let nt=yield(0,F.ZP)(`/api/news_events/${D.id}/operations.json`,{method:"post",body:{operation:z,new_type:2}});(nt==null?void 0:nt.status)===0&&(L.ZP.success(q+"\u6210\u529F"),m())})})}),X=(z,q)=>ut(void 0,null,function*(){h.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",content:`\u8BF7\u786E\u8BA4\u662F\u5426${q}\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\u3002`,onOk:()=>ut(void 0,null,function*(){let nt=yield(0,F.ZP)(`/api/news_events/${D.id}/verify.json`,{method:"post",body:{verify_status:z,new_type:2}});(nt==null?void 0:nt.status)===0&&(L.ZP.success("\u5BA1\u6838\u6210\u529F"),m())})})});return c.createElement("section",{style:{background:"#fff",paddingBottom:60}},c.createElement("div",{style:{width:1200,margin:"0px auto"}},c.createElement("div",{style:{display:"flex",paddingTop:25,justifyContent:"space-between"}},c.createElement(it.Z,{items:[{title:c.createElement(y.Link,{to:"/information"},"\u524D\u6CBF\u8D44\u8BAF")},{title:"\u6B63\u6587"}]}),c.createElement("div",null,(0,M.Ny)()&&c.createElement(c.Fragment,null,c.createElement("span",{className:f.ehover,style:{marginRight:10},onClick:()=>{y.history.push(`/information/${D.id}/edit`)}}," ",c.createElement("i",{style:{marginRight:5},className:"iconfont icon-bianji-moren font14"}),"\u7F16\u8F91"),c.createElement("span",{className:f.dhover,onClick:()=>{h.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",content:`\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u300A${H==null?void 0:H.title}\u300B\uFF1F\u5220\u9664\u540E\uFF0C\u5C06\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\u3002`,onOk:()=>ut(void 0,null,function*(){(yield(0,F.ZP)(`/api/news_events/${D.id}.json`,{method:"DELETE",body:{new_type:2}})).status===0&&(L.ZP.info("\u5220\u9664\u6210\u529F"),y.history.back())})})}}," ",c.createElement("i",{style:{marginRight:5},className:"iconfont icon-shanchutimu font14"}),"\u5220\u9664")))),c.createElement("div",{style:{marginTop:30}},c.createElement("div",{style:{fontWeight:600,fontSize:20,color:"#000",textAlign:"center"}},H==null?void 0:H.title),c.createElement("div",{style:{marginTop:20,textAlign:"center"}},(A=H==null?void 0:H.news_event_tags)==null?void 0:A.map(z=>c.createElement("span",{style:{display:"inline-flex",justifyContent:"center",padding:"0px 14px",background:"#F6F7F9",borderRadius:16,height:32,lineHeight:"32px",color:"#CA7720",marginRight:10,marginTop:10}},z==null?void 0:z.name))),c.createElement("div",{style:{marginTop:20,display:"flex",justifyContent:"center",fontSize:14,flexWrap:"wrap"}},(H==null?void 0:H.publisher)&&c.createElement("div",{style:{display:"flex",alignItems:"baseline",marginRight:30}},c.createElement("span",{style:{color:"#999999",marginRight:10}},"\u6765\u6E90"),c.createElement("span",null,H==null?void 0:H.publisher)),c.createElement("div",{style:{display:"block",marginRight:30}},c.createElement("span",{style:{marginRight:10,color:"#999999"}},"\u53D1\u5E03\u65F6\u95F4"),c.createElement("span",null,_()(H==null?void 0:H.publish_time).format("YYYY-MM-DD HH:mm"))),c.createElement("div",{style:{display:"flex",alignItems:"baseline",marginRight:30}},c.createElement("span",{style:{color:"#999999",marginRight:10}},"\u9605\u8BFB\u91CF"),c.createElement("span",null,H==null?void 0:H.click_number)),(H==null?void 0:H.url)&&c.createElement("a",{href:H==null?void 0:H.url,target:"_blank",style:{marginLeft:30}},c.createElement("i",{className:"iconfont icon-lianjie",style:{fontSize:14}})," \u524D\u5F80\u539F\u94FE\u63A5")),c.createElement("div",{className:f.innerhtml,dangerouslySetInnerHTML:{__html:H==null?void 0:H.content}}),c.createElement("div",{style:{marginTop:30}},c.createElement(Z.Z,{callback:()=>{},dataSource:H==null?void 0:H.attachments})))))};var tt=(0,y.connect)(({homePage:R,loading:$,globalSetting:k,user:x})=>({homePage:R,globalSetting:k,loading:$.models.homePage,user:x}))(W)},66104:function(Xt,ft,a){a.d(ft,{Z:function(){return St}});var c=a(92310),h=a.n(c),L=a(11592),it=a(26112),y=a(59301),f=a(92343),et=a(36355),ot=a(84105),_=a(91857);const F=d=>{let{children:O}=d;const{getPrefixCls:D}=y.useContext(et.E_),p=D("breadcrumb");return y.createElement("li",{className:`${p}-separator`,"aria-hidden":"true"},O===""?O:O||"/")};F.__ANT_BREADCRUMB_SEPARATOR=!0;var Z=F,M=function(d,O){var D={};for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&O.indexOf(p)<0&&(D[p]=d[p]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,p=Object.getOwnPropertySymbols(d);m<p.length;m++)O.indexOf(p[m])<0&&Object.prototype.propertyIsEnumerable.call(d,p[m])&&(D[p[m]]=d[p[m]]);return D};function l(d,O){if(d.title===void 0||d.title===null)return null;const D=Object.keys(O).join("|");return typeof d.title=="object"?d.title:String(d.title).replace(new RegExp(`:(${D})`,"g"),(p,m)=>O[m]||p)}function K(d,O,D,p){if(D==null)return null;const{className:m,onClick:J}=O,X=M(O,["className","onClick"]),z=Object.assign(Object.assign({},(0,it.Z)(X,{data:!0,aria:!0})),{onClick:J});return p!==void 0?y.createElement("a",Object.assign({},z,{className:h()(`${d}-link`,m),href:p}),D):y.createElement("span",Object.assign({},z,{className:h()(`${d}-link`,m)}),D)}function ht(d,O){return(p,m,J,X,z)=>{if(O)return O(p,m,J,X);const q=l(p,m);return K(d,p,q,z)}}var U=function(d,O){var D={};for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&O.indexOf(p)<0&&(D[p]=d[p]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,p=Object.getOwnPropertySymbols(d);m<p.length;m++)O.indexOf(p[m])<0&&Object.prototype.propertyIsEnumerable.call(d,p[m])&&(D[p[m]]=d[p[m]]);return D};const at=d=>{const{prefixCls:O,separator:D="/",children:p,menu:m,overlay:J,dropdownProps:X,href:z}=d,nt=(dt=>{if(m||J){const vt=Object.assign({},X);if(m){const bt=m||{},{items:gt}=bt,pt=U(bt,["items"]);vt.menu=Object.assign(Object.assign({},pt),{items:gt==null?void 0:gt.map((mt,$t)=>{var{key:Mt,title:r,label:i,path:t}=mt,o=U(mt,["key","title","label","path"]);let n=i!=null?i:r;return t&&(n=y.createElement("a",{href:`${z}${t}`},n)),Object.assign(Object.assign({},o),{key:Mt!=null?Mt:$t,label:n})})})}else J&&(vt.overlay=J);return y.createElement(_.Z,Object.assign({placement:"bottom"},vt),y.createElement("span",{className:`${O}-overlay-link`},dt,y.createElement(ot.Z,null)))}return dt})(p);return nt!=null?y.createElement(y.Fragment,null,y.createElement("li",null,nt),D&&y.createElement(Z,null,D)):null},T=d=>{const{prefixCls:O,children:D,href:p}=d,m=U(d,["prefixCls","children","href"]),{getPrefixCls:J}=y.useContext(et.E_),X=J("breadcrumb",O);return y.createElement(at,Object.assign({},m,{prefixCls:X}),K(X,m,D,p))};T.__ANT_BREADCRUMB_ITEM=!0;var ut=T,W=a(17313),tt=a(83116),R=a(37613);const $=d=>{const{componentCls:O,iconCls:D}=d;return{[O]:Object.assign(Object.assign({},(0,W.Wf)(d)),{color:d.itemColor,fontSize:d.fontSize,[D]:{fontSize:d.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:d.linkColor,transition:`color ${d.motionDurationMid}`,padding:`0 ${d.paddingXXS}px`,borderRadius:d.borderRadiusSM,height:d.lineHeight*d.fontSize,display:"inline-block",marginInline:-d.marginXXS,"&:hover":{color:d.linkHoverColor,backgroundColor:d.colorBgTextHover}},(0,W.Qy)(d)),"li:last-child":{color:d.lastItemColor},[`${O}-separator`]:{marginInline:d.separatorMargin,color:d.separatorColor},[`${O}-link`]:{[`
> ${D} + span,
> ${D} + a
`]:{marginInlineStart:d.marginXXS}},[`${O}-overlay-link`]:{borderRadius:d.borderRadiusSM,height:d.lineHeight*d.fontSize,display:"inline-block",padding:`0 ${d.paddingXXS}px`,marginInline:-d.marginXXS,[`> ${D}`]:{marginInlineStart:d.marginXXS,fontSize:d.fontSizeIcon},"&:hover":{color:d.linkHoverColor,backgroundColor:d.colorBgTextHover,a:{color:d.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${d.componentCls}-rtl`]:{direction:"rtl"}})}};var k=(0,tt.Z)("Breadcrumb",d=>{const O=(0,R.TS)(d,{});return[$(O)]},d=>({itemColor:d.colorTextDescription,lastItemColor:d.colorText,iconFontSize:d.fontSize,linkColor:d.colorTextDescription,linkHoverColor:d.colorText,separatorColor:d.colorTextDescription,separatorMargin:d.marginXS})),x=function(d,O){var D={};for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&O.indexOf(p)<0&&(D[p]=d[p]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,p=Object.getOwnPropertySymbols(d);m<p.length;m++)O.indexOf(p[m])<0&&Object.prototype.propertyIsEnumerable.call(d,p[m])&&(D[p[m]]=d[p[m]]);return D};function j(d){const{breadcrumbName:O,children:D}=d,p=x(d,["breadcrumbName","children"]),m=Object.assign({title:O},p);return D&&(m.menu={items:D.map(J=>{var{breadcrumbName:X}=J,z=x(J,["breadcrumbName"]);return Object.assign(Object.assign({},z),{title:X})})}),m}function A(d,O){return(0,y.useMemo)(()=>d||(O?O.map(j):null),[d,O])}var Q=function(d,O){var D={};for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&O.indexOf(p)<0&&(D[p]=d[p]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,p=Object.getOwnPropertySymbols(d);m<p.length;m++)O.indexOf(p[m])<0&&Object.prototype.propertyIsEnumerable.call(d,p[m])&&(D[p[m]]=d[p[m]]);return D};const H=(d,O)=>{if(O===void 0)return O;let D=(O||"").replace(/^\//,"");return Object.keys(d).forEach(p=>{D=D.replace(`:${p}`,d[p])}),D},Y=d=>{const{prefixCls:O,separator:D="/",style:p,className:m,rootClassName:J,routes:X,items:z,children:q,itemRender:nt,params:dt={}}=d,vt=Q(d,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:bt,direction:gt,breadcrumb:pt}=y.useContext(et.E_);let mt;const $t=bt("breadcrumb",O),[Mt,r]=k($t),i=A(z,X),t=ht($t,nt);if(i&&i.length>0){const e=[],s=z||X;mt=i.map((u,P)=>{const{path:I,key:E,type:V,menu:G,overlay:lt,onClick:It,className:wt,separator:Bt,dropdownProps:yt}=u,Ct=H(dt,I);Ct!==void 0&&e.push(Ct);const kt=E!=null?E:P;if(V==="separator")return y.createElement(Z,{key:kt},Bt);const Ft={},Yt=P===i.length-1;G?Ft.menu=G:lt&&(Ft.overlay=lt);let{href:Qt}=u;return e.length&&Ct!==void 0&&(Qt=`#/${e.join("/")}`),y.createElement(at,Object.assign({key:kt},Ft,(0,it.Z)(u,{data:!0,aria:!0}),{className:wt,dropdownProps:yt,href:Qt,separator:Yt?"":D,onClick:It,prefixCls:$t}),t(u,dt,s,e,Qt))})}else if(q){const e=(0,L.Z)(q).length;mt=(0,L.Z)(q).map((s,u)=>{if(!s)return s;const P=u===e-1;return(0,f.Tm)(s,{separator:P?"":D,key:u})})}const o=h()($t,pt==null?void 0:pt.className,{[`${$t}-rtl`]:gt==="rtl"},m,J,r),n=Object.assign(Object.assign({},pt==null?void 0:pt.style),p);return Mt(y.createElement("nav",Object.assign({className:o,style:n},vt),y.createElement("ol",null,mt)))};Y.Item=ut,Y.Separator=Z;var st=Y,St=st},91857:function(Xt,ft,a){var c=a(59301),h=a(38819),L=a(92310),it=a.n(L),y=a(31561),f=a(70425),et=a(18929),ot=a(2738),_=a(79676),F=a(53487),Z=a(92343),M=a(36355),l=a(20834),K=a(40875),ht=a(88088),U=a(47211);const at=null,T=R=>{const{menu:$,arrow:k,prefixCls:x,children:j,trigger:A,disabled:Q,dropdownRender:H,getPopupContainer:Y,overlayClassName:st,rootClassName:St,open:d,onOpenChange:O,visible:D,onVisibleChange:p,mouseEnterDelay:m=.15,mouseLeaveDelay:J=.1,autoAdjustOverflow:X=!0,placement:z="",overlay:q,transitionName:nt}=R,{getPopupContainer:dt,getPrefixCls:vt,direction:bt}=c.useContext(M.E_),gt=c.useMemo(()=>{const G=vt();return nt!==void 0?nt:z.includes("top")?`${G}-slide-down`:`${G}-slide-up`},[vt,z,nt]),pt=c.useMemo(()=>z?z.includes("Center")?z.slice(0,z.indexOf("Center")):z:bt==="rtl"?"bottomRight":"bottomLeft",[z,bt]),mt=vt("dropdown",x),[$t,Mt]=(0,U.Z)(mt),[,r]=(0,ht.Z)(),i=c.Children.only(j),t=(0,Z.Tm)(i,{className:it()(`${mt}-trigger`,{[`${mt}-rtl`]:bt==="rtl"},i.props.className),disabled:Q}),o=Q?[]:A;let n;o&&o.includes("contextMenu")&&(n=!0);const[e,s]=(0,et.Z)(!1,{value:d!=null?d:D}),u=(0,f.useEvent)(G=>{O==null||O(G),p==null||p(G),s(G)}),P=it()(st,St,Mt,{[`${mt}-rtl`]:bt==="rtl"}),I=(0,_.Z)({arrowPointAtCenter:typeof k=="object"&&k.pointAtCenter,autoAdjustOverflow:X,offset:r.marginXXS,arrowWidth:k?r.sizePopupArrow:0,borderRadius:r.borderRadius}),E=c.useCallback(()=>{s(!1)},[]),V=()=>{let G;return $!=null&&$.items?G=c.createElement(l.default,Object.assign({},$)):typeof q=="function"?G=q():G=q,H&&(G=H(G)),G=c.Children.only(typeof G=="string"?c.createElement("span",null,G):G),c.createElement(K.J,{prefixCls:`${mt}-menu`,expandIcon:c.createElement("span",{className:`${mt}-menu-submenu-arrow`},c.createElement(h.Z,{className:`${mt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:E,validator:lt=>{let{mode:It}=lt}},G)};return $t(c.createElement(y.Z,Object.assign({alignPoint:n},(0,ot.Z)(R,["rootClassName"]),{mouseEnterDelay:m,mouseLeaveDelay:J,visible:e,builtinPlacements:I,arrow:!!k,overlayClassName:P,prefixCls:mt,getPopupContainer:Y||dt,transitionName:gt,trigger:o,overlay:V,placement:pt,onVisibleChange:u}),t))};function ut(R){return Object.assign(Object.assign({},R),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const W=(0,F.Z)(T,"dropdown",R=>R,ut),tt=R=>c.createElement(W,Object.assign({},R),c.createElement("span",null));T._InternalPanelDoNotUseOrYouWillBeFired=tt,ft.Z=T},47211:function(Xt,ft,a){a.d(ft,{Z:function(){return Z}});var c=a(17313),h=a(13826),L=a(92899),it=a(29878),y=a(19447),f=a(83116),et=a(37613),_=M=>{const{componentCls:l,menuCls:K,colorError:ht,colorTextLightSolid:U}=M,at=`${K}-item`;return{[`${l}, ${l}-menu-submenu`]:{[`${K} ${at}`]:{[`&${at}-danger:not(${at}-disabled)`]:{color:ht,"&:hover":{color:U,backgroundColor:ht}}}}}};const F=M=>{const{componentCls:l,menuCls:K,zIndexPopup:ht,dropdownArrowDistance:U,sizePopupArrow:at,antCls:T,iconCls:ut,motionDurationMid:W,dropdownPaddingVertical:tt,fontSize:R,dropdownEdgeChildPadding:$,colorTextDisabled:k,fontSizeIcon:x,controlPaddingHorizontal:j,colorBgElevated:A}=M;return[{[l]:Object.assign(Object.assign({},(0,c.Wf)(M)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:ht,display:"block","&::before":{position:"absolute",insetBlock:-U+at/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${T}-btn`]:{[`& > ${ut}-down, & > ${T}-btn-icon > ${ut}-down`]:{fontSize:x}},[`${l}-wrap`]:{position:"relative",[`${T}-btn > ${ut}-down`]:{fontSize:x},[`${ut}-down::before`]:{transition:`transform ${W}`}},[`${l}-wrap-open`]:{[`${ut}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${T}-slide-down-enter${T}-slide-down-enter-active${l}-placement-bottomLeft,
&${T}-slide-down-appear${T}-slide-down-appear-active${l}-placement-bottomLeft,
&${T}-slide-down-enter${T}-slide-down-enter-active${l}-placement-bottom,
&${T}-slide-down-appear${T}-slide-down-appear-active${l}-placement-bottom,
&${T}-slide-down-enter${T}-slide-down-enter-active${l}-placement-bottomRight,
&${T}-slide-down-appear${T}-slide-down-appear-active${l}-placement-bottomRight`]:{animationName:h.fJ},[`&${T}-slide-up-enter${T}-slide-up-enter-active${l}-placement-topLeft,
&${T}-slide-up-appear${T}-slide-up-appear-active${l}-placement-topLeft,
&${T}-slide-up-enter${T}-slide-up-enter-active${l}-placement-top,
&${T}-slide-up-appear${T}-slide-up-appear-active${l}-placement-top,
&${T}-slide-up-enter${T}-slide-up-enter-active${l}-placement-topRight,
&${T}-slide-up-appear${T}-slide-up-appear-active${l}-placement-topRight`]:{animationName:h.Qt},[`&${T}-slide-down-leave${T}-slide-down-leave-active${l}-placement-bottomLeft,
&${T}-slide-down-leave${T}-slide-down-leave-active${l}-placement-bottom,
&${T}-slide-down-leave${T}-slide-down-leave-active${l}-placement-bottomRight`]:{animationName:h.Uw},[`&${T}-slide-up-leave${T}-slide-up-leave-active${l}-placement-topLeft,
&${T}-slide-up-leave${T}-slide-up-leave-active${l}-placement-top,
&${T}-slide-up-leave${T}-slide-up-leave-active${l}-placement-topRight`]:{animationName:h.ly}})},(0,y.ZP)(M,{colorBg:A,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${l} ${K}`]:{position:"relative",margin:0},[`${K}-submenu-popup`]:{position:"absolute",zIndex:ht,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${l}, ${l}-menu-submenu`]:{[K]:Object.assign(Object.assign({padding:$,listStyleType:"none",backgroundColor:A,backgroundClip:"padding-box",borderRadius:M.borderRadiusLG,outline:"none",boxShadow:M.boxShadowSecondary},(0,c.Qy)(M)),{[`${K}-item-group-title`]:{padding:`${tt}px ${j}px`,color:M.colorTextDescription,transition:`all ${W}`},[`${K}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${K}-item-icon`]:{minWidth:R,marginInlineEnd:M.marginXS,fontSize:M.fontSizeSM},[`${K}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${W}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${K}-item, ${K}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${tt}px ${j}px`,color:M.colorText,fontWeight:"normal",fontSize:R,lineHeight:M.lineHeight,cursor:"pointer",transition:`all ${W}`,borderRadius:M.borderRadiusSM,"&:hover, &-active":{backgroundColor:M.controlItemBgHover}},(0,c.Qy)(M)),{"&-selected":{color:M.colorPrimary,backgroundColor:M.controlItemBgActive,"&:hover, &-active":{backgroundColor:M.controlItemBgActiveHover}},"&-disabled":{color:k,cursor:"not-allowed","&:hover":{color:k,backgroundColor:A,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${M.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:M.colorSplit},[`${l}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:M.paddingXS,[`${l}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:M.colorTextDescription,fontSize:x,fontStyle:"normal"}}}),[`${K}-item-group-list`]:{margin:`0 ${M.marginXS}px`,padding:0,listStyle:"none"},[`${K}-submenu-title`]:{paddingInlineEnd:j+M.fontSizeSM},[`${K}-submenu-vertical`]:{position:"relative"},[`${K}-submenu${K}-submenu-disabled ${l}-menu-submenu-title`]:{[`&, ${l}-menu-submenu-arrow-icon`]:{color:k,backgroundColor:A,cursor:"not-allowed"}},[`${K}-submenu-selected ${l}-menu-submenu-title`]:{color:M.colorPrimary}})}},[(0,h.oN)(M,"slide-up"),(0,h.oN)(M,"slide-down"),(0,L.Fm)(M,"move-up"),(0,L.Fm)(M,"move-down"),(0,it._y)(M,"zoom-big")]]};var Z=(0,f.Z)("Dropdown",(M,l)=>{let{rootPrefixCls:K}=l;const{marginXXS:ht,sizePopupArrow:U,controlHeight:at,fontSize:T,lineHeight:ut,paddingXXS:W,componentCls:tt,borderRadiusLG:R}=M,$=(at-T*ut)/2,{dropdownArrowOffset:k}=(0,y.fS)({contentRadius:R}),x=(0,et.TS)(M,{menuCls:`${tt}-menu`,rootPrefixCls:K,dropdownArrowDistance:U/2+ht,dropdownArrowOffset:k,dropdownPaddingVertical:$,dropdownEdgeChildPadding:W});return[F(x),_(x)]},M=>({zIndexPopup:M.zIndexPopupBase+50}))},45818:function(Xt,ft,a){a.d(ft,{D:function(){return W},Z:function(){return $}});var c=a(54476),h=a(59301),L={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},it=L,y=a(7657),f=function(x,j){return h.createElement(y.Z,(0,c.Z)({},x,{ref:j,icon:it}))},et=h.forwardRef(f),ot=et,_=a(33853),F=a(38819),Z=a(92310),M=a.n(Z),l=a(2738),ht=k=>!isNaN(parseFloat(k))&&isFinite(k),U=a(36355),at=a(84966),T=function(k,x){var j={};for(var A in k)Object.prototype.hasOwnProperty.call(k,A)&&x.indexOf(A)<0&&(j[A]=k[A]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Q=0,A=Object.getOwnPropertySymbols(k);Q<A.length;Q++)x.indexOf(A[Q])<0&&Object.prototype.propertyIsEnumerable.call(k,A[Q])&&(j[A[Q]]=k[A[Q]]);return j};const ut={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},W=h.createContext({}),tt=(()=>{let k=0;return function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return k+=1,`${x}${k}`}})();var $=h.forwardRef((k,x)=>{const{prefixCls:j,className:A,trigger:Q,children:H,defaultCollapsed:Y=!1,theme:st="dark",style:St={},collapsible:d=!1,reverseArrow:O=!1,width:D=200,collapsedWidth:p=80,zeroWidthTriggerStyle:m,breakpoint:J,onCollapse:X,onBreakpoint:z}=k,q=T(k,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:nt}=(0,h.useContext)(at.Gs),[dt,vt]=(0,h.useState)("collapsed"in k?k.collapsed:Y),[bt,gt]=(0,h.useState)(!1);(0,h.useEffect)(()=>{"collapsed"in k&&vt(k.collapsed)},[k.collapsed]);const pt=(t,o)=>{"collapsed"in k||vt(t),X==null||X(t,o)},mt=(0,h.useRef)();mt.current=t=>{gt(t.matches),z==null||z(t.matches),dt!==t.matches&&pt(t.matches,"responsive")},(0,h.useEffect)(()=>{function t(n){return mt.current(n)}let o;if(typeof window!="undefined"){const{matchMedia:n}=window;if(n&&J&&J in ut){o=n(`(max-width: ${ut[J]})`);try{o.addEventListener("change",t)}catch(e){o.addListener(t)}t(o)}}return()=>{try{o==null||o.removeEventListener("change",t)}catch(n){o==null||o.removeListener(t)}}},[J]),(0,h.useEffect)(()=>{const t=tt("ant-sider-");return nt.addSider(t),()=>nt.removeSider(t)},[]);const $t=()=>{pt(!dt,"clickTrigger")},{getPrefixCls:Mt}=(0,h.useContext)(U.E_),r=()=>{const t=Mt("layout-sider",j),o=(0,l.Z)(q,["collapsed"]),n=dt?p:D,e=ht(n)?`${n}px`:String(n),s=parseFloat(String(p||0))===0?h.createElement("span",{onClick:$t,className:M()(`${t}-zero-width-trigger`,`${t}-zero-width-trigger-${O?"right":"left"}`),style:m},Q||h.createElement(ot,null)):null,I={expanded:O?h.createElement(F.Z,null):h.createElement(_.Z,null),collapsed:O?h.createElement(_.Z,null):h.createElement(F.Z,null)}[dt?"collapsed":"expanded"],E=Q!==null?s||h.createElement("div",{className:`${t}-trigger`,onClick:$t,style:{width:e}},Q||I):null,V=Object.assign(Object.assign({},St),{flex:`0 0 ${e}`,maxWidth:e,minWidth:e,width:e}),G=M()(t,`${t}-${st}`,{[`${t}-collapsed`]:!!dt,[`${t}-has-trigger`]:d&&Q!==null&&!s,[`${t}-below`]:!!bt,[`${t}-zero-width`]:parseFloat(e)===0},A);return h.createElement("aside",Object.assign({className:G},o,{style:V,ref:x}),h.createElement("div",{className:`${t}-children`},H),d||bt&&s?E:null)},i=h.useMemo(()=>({siderCollapsed:dt}),[dt]);return h.createElement(W.Provider,{value:i},r())})},84966:function(Xt,ft,a){a.d(ft,{VY:function(){return W},$_:function(){return ut},h4:function(){return T},Gs:function(){return l},ZP:function(){return tt}});var c=a(94480),h=a(92310),L=a.n(h),it=a(2738),y=a(59301),f=a(36355),et=a(83116),_=R=>{const{componentCls:$,bodyBg:k,lightSiderBg:x,lightTriggerBg:j,lightTriggerColor:A}=R;return{[`${$}-sider-light`]:{background:x,[`${$}-sider-trigger`]:{color:A,background:j},[`${$}-sider-zero-width-trigger`]:{color:A,background:j,border:`1px solid ${k}`,borderInlineStart:0}}}};const F=R=>{const{antCls:$,componentCls:k,colorText:x,triggerColor:j,footerBg:A,triggerBg:Q,headerHeight:H,headerPadding:Y,headerColor:st,footerPadding:St,triggerHeight:d,zeroTriggerHeight:O,zeroTriggerWidth:D,motionDurationMid:p,motionDurationSlow:m,fontSize:J,borderRadius:X,bodyBg:z,headerBg:q,siderBg:nt}=R;return{[k]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:z,"&, *":{boxSizing:"border-box"},[`&${k}-has-sider`]:{flexDirection:"row",[`> ${k}, > ${k}-content`]:{width:0}},[`${k}-header, &${k}-footer`]:{flex:"0 0 auto"},[`${k}-sider`]:{position:"relative",minWidth:0,background:nt,transition:`all ${p}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${$}-menu${$}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:d},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:d,color:j,lineHeight:`${d}px`,textAlign:"center",background:Q,cursor:"pointer",transition:`all ${p}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:H,insetInlineEnd:-D,zIndex:1,width:D,height:O,color:j,fontSize:R.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:nt,borderStartStartRadius:0,borderStartEndRadius:X,borderEndEndRadius:X,borderEndStartRadius:0,cursor:"pointer",transition:`background ${m} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${m}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-D,borderStartStartRadius:X,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:X}}}}},_(R)),{"&-rtl":{direction:"rtl"}}),[`${k}-header`]:{height:H,padding:Y,color:st,lineHeight:`${H}px`,background:q,[`${$}-menu`]:{lineHeight:"inherit"}},[`${k}-footer`]:{padding:St,color:x,fontSize:J,background:A},[`${k}-content`]:{flex:"auto",minHeight:0}}};var Z=(0,et.Z)("Layout",R=>[F(R)],R=>{const{colorBgLayout:$,controlHeight:k,controlHeightLG:x,colorText:j,controlHeightSM:A,marginXXS:Q,colorTextLightSolid:H,colorBgContainer:Y}=R,st=x*1.25;return{colorBgHeader:"#001529",colorBgBody:$,colorBgTrigger:"#002140",bodyBg:$,headerBg:"#001529",headerHeight:k*2,headerPadding:`0 ${st}px`,headerColor:j,footerPadding:`${A}px ${st}px`,footerBg:$,siderBg:"#001529",triggerHeight:x+Q*2,triggerBg:"#002140",triggerColor:H,zeroTriggerWidth:x,zeroTriggerHeight:x,lightSiderBg:Y,lightTriggerBg:Y,lightTriggerColor:j}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),M=function(R,$){var k={};for(var x in R)Object.prototype.hasOwnProperty.call(R,x)&&$.indexOf(x)<0&&(k[x]=R[x]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function")for(var j=0,x=Object.getOwnPropertySymbols(R);j<x.length;j++)$.indexOf(x[j])<0&&Object.prototype.propertyIsEnumerable.call(R,x[j])&&(k[x[j]]=R[x[j]]);return k};const l=y.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function K(R){let{suffixCls:$,tagName:k,displayName:x}=R;return j=>y.forwardRef((Q,H)=>y.createElement(j,Object.assign({ref:H,suffixCls:$,tagName:k},Q)))}const ht=y.forwardRef((R,$)=>{const{prefixCls:k,suffixCls:x,className:j,tagName:A}=R,Q=M(R,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:H}=y.useContext(f.E_),Y=H("layout",k),[st,St]=Z(Y),d=x?`${Y}-${x}`:Y;return st(y.createElement(A,Object.assign({className:L()(k||d,j,St),ref:$},Q)))}),U=y.forwardRef((R,$)=>{const{direction:k}=y.useContext(f.E_),[x,j]=y.useState([]),{prefixCls:A,className:Q,rootClassName:H,children:Y,hasSider:st,tagName:St,style:d}=R,O=M(R,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),D=(0,it.Z)(O,["suffixCls"]),{getPrefixCls:p,layout:m}=y.useContext(f.E_),J=p("layout",A),[X,z]=Z(J),q=L()(J,{[`${J}-has-sider`]:typeof st=="boolean"?st:x.length>0,[`${J}-rtl`]:k==="rtl"},m==null?void 0:m.className,Q,H,z),nt=y.useMemo(()=>({siderHook:{addSider:dt=>{j(vt=>[].concat((0,c.Z)(vt),[dt]))},removeSider:dt=>{j(vt=>vt.filter(bt=>bt!==dt))}}}),[]);return X(y.createElement(l.Provider,{value:nt},y.createElement(St,Object.assign({ref:$,className:q,style:Object.assign(Object.assign({},m==null?void 0:m.style),d)},D),Y)))}),at=K({tagName:"div",displayName:"Layout"})(U),T=K({suffixCls:"header",tagName:"header",displayName:"Header"})(ht),ut=K({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(ht),W=K({suffixCls:"content",tagName:"main",displayName:"Content"})(ht);var tt=at},40875:function(Xt,ft,a){a.d(ft,{J:function(){return f}});var c=a(59301),h=a(33234),L=a(70425),it=function(et,ot){var _={};for(var F in et)Object.prototype.hasOwnProperty.call(et,F)&&ot.indexOf(F)<0&&(_[F]=et[F]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,F=Object.getOwnPropertySymbols(et);Z<F.length;Z++)ot.indexOf(F[Z])<0&&Object.prototype.propertyIsEnumerable.call(et,F[Z])&&(_[F[Z]]=et[F[Z]]);return _};const y=c.createContext(null),f=c.forwardRef((et,ot)=>{const{children:_}=et,F=it(et,["children"]),Z=c.useContext(y),M=c.useMemo(()=>Object.assign(Object.assign({},Z),F),[Z,F.prefixCls,F.mode,F.selectable]);return c.createElement(y.Provider,{value:M},c.createElement(h.BR,null,(0,L.supportNodeRef)(_)?c.cloneElement(_,{ref:ot}):_))});ft.Z=y},20834:function(Xt,ft,a){a.d(ft,{default:function(){return i}});var c=a(15285),h=a(59301),L=a(45818),it=a(92310),y=a.n(it),f=a(36355),et=function(t,o){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(n[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,e=Object.getOwnPropertySymbols(t);s<e.length;s++)o.indexOf(e[s])<0&&Object.prototype.propertyIsEnumerable.call(t,e[s])&&(n[e[s]]=t[e[s]]);return n},_=t=>{const{prefixCls:o,className:n,dashed:e}=t,s=et(t,["prefixCls","className","dashed"]),{getPrefixCls:u}=h.useContext(f.E_),P=u("menu",o),I=y()({[`${P}-item-divider-dashed`]:!!e},n);return h.createElement(c.iz,Object.assign({className:I},s))},F=a(11592),Z=a(2738),M=a(6848),l=a(92343),ht=(0,h.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),at=t=>{var o;const{className:n,children:e,icon:s,title:u,danger:P}=t,{prefixCls:I,firstLevel:E,direction:V,disableMenuItemTitleTooltip:G,inlineCollapsed:lt}=h.useContext(ht),It=Ft=>{const Yt=h.createElement("span",{className:`${I}-title-content`},e);return(!s||(0,l.l$)(e)&&e.type==="span")&&e&&Ft&&E&&typeof e=="string"?h.createElement("div",{className:`${I}-inline-collapsed-noicon`},e.charAt(0)):Yt},{siderCollapsed:wt}=h.useContext(L.D);let Bt=u;typeof u=="undefined"?Bt=E?e:"":u===!1&&(Bt="");const yt={title:Bt};!wt&&!lt&&(yt.title=null,yt.open=!1);const Ct=(0,F.Z)(e).length;let kt=h.createElement(c.ck,Object.assign({},(0,Z.Z)(t,["title","icon","danger"]),{className:y()({[`${I}-item-danger`]:P,[`${I}-item-only-child`]:(s?Ct+1:Ct)===1},n),title:typeof u=="string"?u:void 0}),(0,l.Tm)(s,{className:y()((0,l.l$)(s)?(o=s.props)===null||o===void 0?void 0:o.className:"",`${I}-item-icon`)}),It(lt));return G||(kt=h.createElement(M.Z,Object.assign({},yt,{placement:V==="rtl"?"left":"right",overlayClassName:`${I}-inline-collapsed-tooltip`}),kt)),kt},ut=t=>{var o;const{popupClassName:n,icon:e,title:s,theme:u}=t,P=h.useContext(ht),{prefixCls:I,inlineCollapsed:E,theme:V}=P,G=(0,c.Xl)();let lt;if(!e)lt=E&&!G.length&&s&&typeof s=="string"?h.createElement("div",{className:`${I}-inline-collapsed-noicon`},s.charAt(0)):h.createElement("span",{className:`${I}-title-content`},s);else{const wt=(0,l.l$)(s)&&s.type==="span";lt=h.createElement(h.Fragment,null,(0,l.Tm)(e,{className:y()((0,l.l$)(e)?(o=e.props)===null||o===void 0?void 0:o.className:"",`${I}-item-icon`)}),wt?s:h.createElement("span",{className:`${I}-title-content`},s))}const It=h.useMemo(()=>Object.assign(Object.assign({},P),{firstLevel:!1}),[P]);return h.createElement(ht.Provider,{value:It},h.createElement(c.Wd,Object.assign({},(0,Z.Z)(t,["icon"]),{title:lt,popupClassName:y()(I,n,`${I}-${u||V}`)})))},W=a(18785),tt=a(70425),R=a(62892),$=a(40875),k=function(t,o){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(n[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,e=Object.getOwnPropertySymbols(t);s<e.length;s++)o.indexOf(e[s])<0&&Object.prototype.propertyIsEnumerable.call(t,e[s])&&(n[e[s]]=t[e[s]]);return n};function x(t){return(t||[]).map((o,n)=>{if(o&&typeof o=="object"){const e=o,{label:s,children:u,key:P,type:I}=e,E=k(e,["label","children","key","type"]),V=P!=null?P:`tmp-${n}`;return u||I==="group"?I==="group"?h.createElement(c.BW,Object.assign({key:V},E,{title:s}),x(u)):h.createElement(ut,Object.assign({key:V},E,{title:s}),x(u)):I==="divider"?h.createElement(_,Object.assign({key:V},E)):h.createElement(at,Object.assign({key:V},E),s)}return null}).filter(o=>o)}function j(t){return h.useMemo(()=>t&&x(t),[t])}var A=a(64993),Q=a(17313),H=a(8378),Y=a(13826),st=a(29878),St=a(83116),d=a(37613),D=t=>{const{componentCls:o,motionDurationSlow:n,horizontalLineHeight:e,colorSplit:s,lineWidth:u,lineType:P,itemPaddingInline:I}=t;return{[`${o}-horizontal`]:{lineHeight:e,border:0,borderBottom:`${u}px ${P} ${s}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${o}-item, ${o}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:I},[`> ${o}-item:hover,
> ${o}-item-active,
> ${o}-submenu ${o}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${o}-item, ${o}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${o}-submenu-arrow`]:{display:"none"}}}},m=t=>{let{componentCls:o,menuArrowOffset:n}=t;return{[`${o}-rtl`]:{direction:"rtl"},[`${o}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${o}-rtl${o}-vertical,
${o}-submenu-rtl ${o}-vertical`]:{[`${o}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${n})`},"&::after":{transform:`rotate(45deg) translateY(${n})`}}}}};const J=t=>Object.assign({},(0,Q.oN)(t));var z=(t,o)=>{const{componentCls:n,itemColor:e,itemSelectedColor:s,groupTitleColor:u,itemBg:P,subMenuItemBg:I,itemSelectedBg:E,activeBarHeight:V,activeBarWidth:G,activeBarBorderWidth:lt,motionDurationSlow:It,motionEaseInOut:wt,motionEaseOut:Bt,itemPaddingInline:yt,motionDurationMid:Ct,itemHoverColor:kt,lineType:Ft,colorSplit:Yt,itemDisabledColor:Qt,dangerItemColor:de,dangerItemHoverColor:ee,dangerItemSelectedColor:qt,dangerItemActiveBg:Tt,dangerItemSelectedBg:ie,itemHoverBg:Pe,itemActiveBg:pe,menuSubMenuBg:Le,horizontalItemSelectedColor:Oe,horizontalItemSelectedBg:Te,horizontalItemBorderRadius:fe,horizontalItemHoverBg:me,popupBg:Ze}=t;return{[`${n}-${o}, ${n}-${o} > ${n}`]:{color:e,background:P,[`&${n}-root:focus-visible`]:Object.assign({},J(t)),[`${n}-item-group-title`]:{color:u},[`${n}-submenu-selected`]:{[`> ${n}-submenu-title`]:{color:s}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${Qt} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:kt}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:Pe},"&:active":{backgroundColor:pe}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:Pe},"&:active":{backgroundColor:pe}}},[`${n}-item-danger`]:{color:de,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:ee}},[`&${n}-item:active`]:{background:Tt}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:s,[`&${n}-item-danger`]:{color:qt},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:E,[`&${n}-item-danger`]:{backgroundColor:ie}},[`${n}-item, ${n}-submenu-title`]:{[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},J(t))},[`&${n}-submenu > ${n}`]:{backgroundColor:Le},[`&${n}-popup > ${n}`]:{backgroundColor:Ze},[`&${n}-horizontal`]:Object.assign(Object.assign({},o==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:lt,marginTop:-lt,marginBottom:0,borderRadius:fe,"&::after":{position:"absolute",insetInline:yt,bottom:0,borderBottom:`${V}px solid transparent`,transition:`border-color ${It} ${wt}`,content:'""'},"&:hover, &-active, &-open":{background:me,"&::after":{borderBottomWidth:V,borderBottomColor:Oe}},"&-selected":{color:Oe,backgroundColor:Te,"&:hover":{backgroundColor:Te},"&::after":{borderBottomWidth:V,borderBottomColor:Oe}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${lt}px ${Ft} ${Yt}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:I},[`${n}-item, ${n}-submenu-title`]:lt&&G?{width:`calc(100% + ${lt}px)`}:{},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${G}px solid ${s}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Ct} ${Bt}`,`opacity ${Ct} ${Bt}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:qt}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Ct} ${wt}`,`opacity ${Ct} ${wt}`].join(",")}}}}}};const q=t=>{const{componentCls:o,itemHeight:n,itemMarginInline:e,padding:s,menuArrowSize:u,marginXS:P,itemMarginBlock:I}=t,E=s+u+P;return{[`${o}-item`]:{position:"relative",overflow:"hidden"},[`${o}-item, ${o}-submenu-title`]:{height:n,lineHeight:`${n}px`,paddingInline:s,overflow:"hidden",textOverflow:"ellipsis",marginInline:e,marginBlock:I,width:`calc(100% - ${e*2}px)`},[`> ${o}-item,
> ${o}-submenu > ${o}-submenu-title`]:{height:n,lineHeight:`${n}px`},[`${o}-item-group-list ${o}-submenu-title,
${o}-submenu-title`]:{paddingInlineEnd:E}}};var dt=t=>{const{componentCls:o,iconCls:n,itemHeight:e,colorTextLightSolid:s,dropdownWidth:u,controlHeightLG:P,motionDurationMid:I,motionEaseOut:E,paddingXL:V,itemMarginInline:G,fontSizeLG:lt,motionDurationSlow:It,paddingXS:wt,boxShadowSecondary:Bt,collapsedWidth:yt,collapsedIconSize:Ct}=t,kt={height:e,lineHeight:`${e}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[o]:{"&-inline, &-vertical":Object.assign({[`&${o}-root`]:{boxShadow:"none"}},q(t))},[`${o}-submenu-popup`]:{[`${o}-vertical`]:Object.assign(Object.assign({},q(t)),{boxShadow:Bt})}},{[`${o}-submenu-popup ${o}-vertical${o}-sub`]:{minWidth:u,maxHeight:`calc(100vh - ${P*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${o}-inline`]:{width:"100%",[`&${o}-root`]:{[`${o}-item, ${o}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${It}`,`background ${It}`,`padding ${I} ${E}`].join(","),[`> ${o}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${o}-sub${o}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${o}-submenu > ${o}-submenu-title`]:kt,[`& ${o}-item-group-title`]:{paddingInlineStart:V}},[`${o}-item`]:kt}},{[`${o}-inline-collapsed`]:{width:yt,[`&${o}-root`]:{[`${o}-item, ${o}-submenu ${o}-submenu-title`]:{[`> ${o}-inline-collapsed-noicon`]:{fontSize:lt,textAlign:"center"}}},[`> ${o}-item,
> ${o}-item-group > ${o}-item-group-list > ${o}-item,
> ${o}-item-group > ${o}-item-group-list > ${o}-submenu > ${o}-submenu-title,
> ${o}-submenu > ${o}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${lt/2}px - ${G}px)`,textOverflow:"clip",[`
${o}-submenu-arrow,
${o}-submenu-expand-icon
`]:{opacity:0},[`${o}-item-icon, ${n}`]:{margin:0,fontSize:Ct,lineHeight:`${e}px`,"+ span":{display:"inline-block",opacity:0}}},[`${o}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${o}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:s}},[`${o}-item-group-title`]:Object.assign(Object.assign({},Q.vS),{paddingInline:wt})}}]};const vt=t=>{const{componentCls:o,motionDurationSlow:n,motionDurationMid:e,motionEaseInOut:s,motionEaseOut:u,iconCls:P,iconSize:I,iconMarginInlineEnd:E}=t;return{[`${o}-item, ${o}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding ${n} ${s}`].join(","),[`${o}-item-icon, ${P}`]:{minWidth:I,fontSize:I,transition:[`font-size ${e} ${u}`,`margin ${n} ${s}`,`color ${n}`].join(","),"+ span":{marginInlineStart:E,opacity:1,transition:[`opacity ${n} ${s}`,`margin ${n}`,`color ${n}`].join(",")}},[`${o}-item-icon`]:Object.assign({},(0,Q.Ro)()),[`&${o}-item-only-child`]:{[`> ${P}, > ${o}-item-icon`]:{marginInlineEnd:0}}},[`${o}-item-disabled, ${o}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${o}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},bt=t=>{const{componentCls:o,motionDurationSlow:n,motionEaseInOut:e,borderRadius:s,menuArrowSize:u,menuArrowOffset:P}=t;return{[`${o}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:u,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${e}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:u*.6,height:u*.15,backgroundColor:"currentcolor",borderRadius:s,transition:[`background ${n} ${e}`,`transform ${n} ${e}`,`top ${n} ${e}`,`color ${n} ${e}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${P})`},"&::after":{transform:`rotate(-45deg) translateY(${P})`}}}}},gt=t=>{const{antCls:o,componentCls:n,fontSize:e,motionDurationSlow:s,motionDurationMid:u,motionEaseInOut:P,paddingXS:I,padding:E,colorSplit:V,lineWidth:G,zIndexPopup:lt,borderRadiusLG:It,subMenuItemBorderRadius:wt,menuArrowSize:Bt,menuArrowOffset:yt,lineType:Ct,menuPanelMaskInset:kt,groupTitleLineHeight:Ft,groupTitleFontSize:Yt}=t;return[{"":{[`${n}`]:Object.assign(Object.assign({},(0,Q.dF)()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Q.Wf)(t)),(0,Q.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:e,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${s} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${I}px ${E}px`,fontSize:Yt,lineHeight:Ft,transition:`all ${s}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${s} ${P}`,`background ${s} ${P}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${s} ${P}`,`background ${s} ${P}`,`padding ${u} ${P}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${s} ${P}`,`padding ${s} ${P}`].join(",")},[`${n}-title-content`]:{transition:`color ${s}`},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:V,borderStyle:Ct,borderWidth:0,borderTopWidth:G,marginBlock:G,padding:0,"&-dashed":{borderStyle:"dashed"}}}),vt(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${e*2}px ${E}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:lt,borderRadius:It,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${kt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:kt},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:t.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:t.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:t.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:t.paddingXS},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:It},vt(t)),bt(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:wt},[`${n}-submenu-title::after`]:{transition:`transform ${s} ${P}`}})}}),bt(t)),{[`&-inline-collapsed ${n}-submenu-arrow,
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${yt})`},"&::after":{transform:`rotate(45deg) translateX(-${yt})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(-${Bt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${yt})`},"&::before":{transform:`rotate(45deg) translateX(${yt})`}}})},{[`${o}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]};var pt=(t,o)=>(0,St.Z)("Menu",e=>{if(o===!1)return[];const{colorBgElevated:s,colorPrimary:u,colorTextLightSolid:P,controlHeightLG:I,fontSize:E,darkItemColor:V,darkDangerItemColor:G,darkItemBg:lt,darkSubMenuItemBg:It,darkItemSelectedColor:wt,darkItemSelectedBg:Bt,darkDangerItemSelectedBg:yt,darkItemHoverBg:Ct,darkGroupTitleColor:kt,darkItemHoverColor:Ft,darkItemDisabledColor:Yt,darkDangerItemHoverColor:Qt,darkDangerItemSelectedColor:de,darkDangerItemActiveBg:ee}=e,qt=E/7*5,Tt=(0,d.TS)(e,{menuArrowSize:qt,menuHorizontalHeight:I*1.15,menuArrowOffset:`${qt*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:s}),ie=(0,d.TS)(Tt,{itemColor:V,itemHoverColor:Ft,groupTitleColor:kt,itemSelectedColor:wt,itemBg:lt,popupBg:lt,subMenuItemBg:It,itemActiveBg:"transparent",itemSelectedBg:Bt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Ct,itemDisabledColor:Yt,dangerItemColor:G,dangerItemHoverColor:Qt,dangerItemSelectedColor:de,dangerItemActiveBg:ee,dangerItemSelectedBg:yt,menuSubMenuBg:It,horizontalItemSelectedColor:P,horizontalItemSelectedBg:u});return[gt(Tt),D(Tt),dt(Tt),z(Tt,"light"),z(ie,"dark"),m(Tt),(0,H.Z)(Tt),(0,Y.oN)(Tt,"slide-up"),(0,Y.oN)(Tt,"slide-down"),(0,st._y)(Tt,"zoom-big")]},e=>{const{colorPrimary:s,colorError:u,colorTextDisabled:P,colorErrorBg:I,colorText:E,colorTextDescription:V,colorBgContainer:G,colorFillAlter:lt,colorFillContent:It,lineWidth:wt,lineWidthBold:Bt,controlItemBgActive:yt,colorBgTextHover:Ct,controlHeightLG:kt,lineHeight:Ft,colorBgElevated:Yt,marginXXS:Qt,padding:de,fontSize:ee,controlHeightSM:qt,fontSizeLG:Tt,colorTextLightSolid:ie,colorErrorHover:Pe}=e,pe=new A.C(ie).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:E,itemColor:E,colorItemTextHover:E,itemHoverColor:E,colorItemTextHoverHorizontal:s,horizontalItemHoverColor:s,colorGroupTitle:V,groupTitleColor:V,colorItemTextSelected:s,itemSelectedColor:s,colorItemTextSelectedHorizontal:s,horizontalItemSelectedColor:s,colorItemBg:G,itemBg:G,colorItemBgHover:Ct,itemHoverBg:Ct,colorItemBgActive:It,itemActiveBg:yt,colorSubItemBg:lt,subMenuItemBg:lt,colorItemBgSelected:yt,itemSelectedBg:yt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Bt,activeBarHeight:Bt,colorActiveBarBorderSize:wt,activeBarBorderWidth:wt,colorItemTextDisabled:P,itemDisabledColor:P,colorDangerItemText:u,dangerItemColor:u,colorDangerItemTextHover:u,dangerItemHoverColor:u,colorDangerItemTextSelected:u,dangerItemSelectedColor:u,colorDangerItemBgActive:I,dangerItemActiveBg:I,colorDangerItemBgSelected:I,dangerItemSelectedBg:I,itemMarginInline:e.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:kt,groupTitleLineHeight:Ft,collapsedWidth:kt*2,popupBg:Yt,itemMarginBlock:Qt,itemPaddingInline:de,horizontalLineHeight:`${kt*1.15}px`,iconSize:ee,iconMarginInlineEnd:qt-ee,collapsedIconSize:Tt,groupTitleFontSize:ee,darkItemDisabledColor:new A.C(ie).setAlpha(.25).toRgbString(),darkItemColor:pe,darkDangerItemColor:u,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:ie,darkItemSelectedBg:s,darkDangerItemSelectedBg:u,darkItemHoverBg:"transparent",darkGroupTitleColor:pe,darkItemHoverColor:ie,darkDangerItemHoverColor:Pe,darkDangerItemSelectedColor:ie,darkDangerItemActiveBg:u}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(t),mt=function(t,o){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(n[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,e=Object.getOwnPropertySymbols(t);s<e.length;s++)o.indexOf(e[s])<0&&Object.prototype.propertyIsEnumerable.call(t,e[s])&&(n[e[s]]=t[e[s]]);return n},Mt=(0,h.forwardRef)((t,o)=>{var n,e;const s=h.useContext($.Z),u=s||{},{getPrefixCls:P,getPopupContainer:I,direction:E,menu:V}=h.useContext(f.E_),G=P(),{prefixCls:lt,className:It,style:wt,theme:Bt="light",expandIcon:yt,_internalDisableMenuItemTitleTooltip:Ct,inlineCollapsed:kt,siderCollapsed:Ft,items:Yt,children:Qt,rootClassName:de,mode:ee,selectable:qt,onClick:Tt,overflowedIndicatorPopupClassName:ie}=t,Pe=mt(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),pe=(0,Z.Z)(Pe,["collapsedWidth"]),Le=j(Yt)||Qt;(n=u.validator)===null||n===void 0||n.call(u,{mode:ee});const Oe=(0,tt.useEvent)(function(){var re;Tt==null||Tt.apply(void 0,arguments),(re=u.onClick)===null||re===void 0||re.call(u)}),Te=u.mode||ee,fe=qt!=null?qt:u.selectable,me=h.useMemo(()=>Ft!==void 0?Ft:kt,[kt,Ft]),Ze={horizontal:{motionName:`${G}-slide-up`},inline:(0,R.Z)(G),other:{motionName:`${G}-zoom-big`}},le=P("menu",lt||u.prefixCls),[Ve,Ge]=pt(le,!s),Ne=y()(`${le}-${Bt}`,V==null?void 0:V.className,It);let Re;if(typeof yt=="function")Re=yt;else if(yt===null||yt===!1)Re=null;else if(u.expandIcon===null||u.expandIcon===!1)Re=null;else{const re=yt!=null?yt:u.expandIcon;Re=(0,l.Tm)(re,{className:y()(`${le}-submenu-expand-icon`,(0,l.l$)(re)?(e=re.props)===null||e===void 0?void 0:e.className:"")})}const Gt=h.useMemo(()=>({prefixCls:le,inlineCollapsed:me||!1,direction:E,firstLevel:!0,theme:Bt,mode:Te,disableMenuItemTitleTooltip:Ct}),[le,me,E,Ct,Bt]);return Ve(h.createElement($.Z.Provider,{value:null},h.createElement(ht.Provider,{value:Gt},h.createElement(c.ZP,Object.assign({getPopupContainer:I,overflowedIndicator:h.createElement(W.Z,null),overflowedIndicatorPopupClassName:y()(le,`${le}-${Bt}`,ie),mode:Te,selectable:fe,onClick:Oe},pe,{inlineCollapsed:me,style:Object.assign(Object.assign({},V==null?void 0:V.style),wt),className:Ne,prefixCls:le,direction:E,defaultMotions:Ze,expandIcon:Re,ref:o,rootClassName:y()(de,Ge)}),Le))))});const r=(0,h.forwardRef)((t,o)=>{const n=(0,h.useRef)(null),e=h.useContext(L.D);return(0,h.useImperativeHandle)(o,()=>({menu:n.current,focus:s=>{var u;(u=n.current)===null||u===void 0||u.focus(s)}})),h.createElement(Mt,Object.assign({ref:n},t,e))});r.Item=at,r.SubMenu=ut,r.Divider=_,r.ItemGroup=c.BW;var i=r},8378:function(Xt,ft){const a=c=>({[c.componentCls]:{[`${c.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${c.motionDurationMid} ${c.motionEaseInOut},
opacity ${c.motionDurationMid} ${c.motionEaseInOut} !important`}},[`${c.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${c.motionDurationMid} ${c.motionEaseInOut},
opacity ${c.motionDurationMid} ${c.motionEaseInOut} !important`}}});ft.Z=a},92899:function(Xt,ft,a){a.d(ft,{Fm:function(){return M}});var c=a(36237),h=a(95406);const L=new c.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),it=new c.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),y=new c.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),f=new c.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),et=new c.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ot=new c.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),_=new c.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),F=new c.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Z={"move-up":{inKeyframes:_,outKeyframes:F},"move-down":{inKeyframes:L,outKeyframes:it},"move-left":{inKeyframes:y,outKeyframes:f},"move-right":{inKeyframes:et,outKeyframes:ot}},M=(l,K)=>{const{antCls:ht}=l,U=`${ht}-${K}`,{inKeyframes:at,outKeyframes:T}=Z[K];return[(0,h.R)(U,at,T,l.motionDurationMid),{[`
${U}-enter,
${U}-appear
`]:{opacity:0,animationTimingFunction:l.motionEaseOutCirc},[`${U}-leave`]:{animationTimingFunction:l.motionEaseInOutCirc}}]}},13826:function(Xt,ft,a){a.d(ft,{Qt:function(){return y},Uw:function(){return it},fJ:function(){return L},ly:function(){return f},oN:function(){return M}});var c=a(36237),h=a(95406);const L=new c.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),it=new c.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),y=new c.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),f=new c.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),et=new c.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ot=new c.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),_=new c.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),F=new c.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Z={"slide-up":{inKeyframes:L,outKeyframes:it},"slide-down":{inKeyframes:y,outKeyframes:f},"slide-left":{inKeyframes:et,outKeyframes:ot},"slide-right":{inKeyframes:_,outKeyframes:F}},M=(l,K)=>{const{antCls:ht}=l,U=`${ht}-${K}`,{inKeyframes:at,outKeyframes:T}=Z[K];return[(0,h.R)(U,at,T,l.motionDurationMid),{[`
${U}-enter,
${U}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:l.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${U}-leave`]:{animationTimingFunction:l.motionEaseInQuint}}]}},2859:function(Xt,ft,a){a.d(ft,{hP:function(){return Mt}});var c=function(r,i){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])})(r,i)};function h(r,i){function t(){this.constructor=r}c(r,i),r.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}function L(r,i,t,o){return new(t||(t=Promise))(function(n,e){function s(I){try{P(o.next(I))}catch(E){e(E)}}function u(I){try{P(o.throw(I))}catch(E){e(E)}}function P(I){var E;I.done?n(I.value):(E=I.value,E instanceof t?E:new t(function(V){V(E)})).then(s,u)}P((o=o.apply(r,i||[])).next())})}function it(r,i){var t,o,n,e,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function u(P){return function(I){return function(E){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,o&&(n=2&E[0]?o.return:E[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,E[1])).done)return n;switch(o=0,n&&(E=[2&E[0],n.value]),E[0]){case 0:case 1:n=E;break;case 4:return s.label++,{value:E[1],done:!1};case 5:s.label++,o=E[1],E=[0];continue;case 7:E=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||E[0]!==6&&E[0]!==2)){s=0;continue}if(E[0]===3&&(!n||E[1]>n[0]&&E[1]<n[3])){s.label=E[1];break}if(E[0]===6&&s.label<n[1]){s.label=n[1],n=E;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(E);break}n[2]&&s.ops.pop(),s.trys.pop();continue}E=i.call(r,s)}catch(V){E=[6,V],o=0}finally{t=n=0}if(5&E[0])throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}([P,I])}}}function y(){for(var r=0,i=0,t=arguments.length;i<t;i++)r+=arguments[i].length;var o=Array(r),n=0;for(i=0;i<t;i++)for(var e=arguments[i],s=0,u=e.length;s<u;s++,n++)o[n]=e[s];return o}var f=function(){function r(){}return r.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},r.setAttributes=function(i,t){for(var o=0,n=t;o<n.length;o++){var e=n[o],s=e[0],u=e[1];i.setAttribute(s,u)}},r.createRect=function(i,t,o){var n=document.createElementNS("http://www.w3.org/2000/svg","rect");return n.setAttribute("width",i.toString()),n.setAttribute("height",t.toString()),o&&r.setAttributes(n,o),n},r.createLine=function(i,t,o,n,e){var s=document.createElementNS("http://www.w3.org/2000/svg","line");return s.setAttribute("x1",i.toString()),s.setAttribute("y1",t.toString()),s.setAttribute("x2",o.toString()),s.setAttribute("y2",n.toString()),e&&r.setAttributes(s,e),s},r.createPolygon=function(i,t){var o=document.createElementNS("http://www.w3.org/2000/svg","polygon");return o.setAttribute("points",i),t&&r.setAttributes(o,t),o},r.createCircle=function(i,t){var o=document.createElementNS("http://www.w3.org/2000/svg","circle");return o.setAttribute("cx",(i/2).toString()),o.setAttribute("cy",(i/2).toString()),o.setAttribute("r",i.toString()),t&&r.setAttributes(o,t),o},r.createEllipse=function(i,t,o){var n=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return n.setAttribute("cx",(i/2).toString()),n.setAttribute("cy",(t/2).toString()),n.setAttribute("rx",(i/2).toString()),n.setAttribute("ry",(t/2).toString()),o&&r.setAttributes(n,o),n},r.createGroup=function(i){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return i&&r.setAttributes(t,i),t},r.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},r.createMarker=function(i,t,o,n,e,s,u){var P=document.createElementNS("http://www.w3.org/2000/svg","marker");return r.setAttributes(P,[["id",i],["orient",t],["markerWidth",o.toString()],["markerHeight",n.toString()],["refX",e.toString()],["refY",s.toString()]]),P.appendChild(u),P},r.createText=function(i){var t=document.createElementNS("http://www.w3.org/2000/svg","text");return t.setAttribute("x","0"),t.setAttribute("y","0"),i&&r.setAttributes(t,i),t},r.createTSpan=function(i,t){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");return o.textContent=i,t&&r.setAttributes(o,t),o},r.createImage=function(i){var t=document.createElementNS("http://www.w3.org/2000/svg","image");return i&&r.setAttributes(t,i),t},r.createPoint=function(i,t){var o=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return o.x=i,o.y=t,o},r.createPath=function(i,t){var o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",i),t&&r.setAttributes(o,t),o},r}(),et=function(){function r(){}return r.addKey=function(i){r.key=i},Object.defineProperty(r,"isLicensed",{get:function(){return!!r.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(r.key)},enumerable:!1,configurable:!0}),r}(),ot=function(){function r(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return r.prototype.rasterize=function(i,t,o){var n=this;return new Promise(function(e){var s=o!==void 0?o:document.createElement("canvas");i===null&&(n.markersOnly=!0,n.naturalSize=!1);var u=document.createElementNS("http://www.w3.org/2000/svg","svg");u.setAttribute("xmlns","http://www.w3.org/2000/svg"),u.setAttribute("width",t.width.baseVal.valueAsString),u.setAttribute("height",t.height.baseVal.valueAsString),u.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),u.innerHTML=t.innerHTML,n.naturalSize===!0?(u.width.baseVal.value=i.naturalWidth,u.height.baseVal.value=i.naturalHeight):n.width!==void 0&&n.height!==void 0&&(u.width.baseVal.value=n.width,u.height.baseVal.value=n.height),s.width=u.width.baseVal.value,s.height=u.height.baseVal.value;var P=u.outerHTML,I=s.getContext("2d");n.markersOnly!==!0&&I.drawImage(i,0,0,s.width,s.height);var E=window.URL,V=new Image(s.width,s.height);V.setAttribute("crossOrigin","anonymous");var G=new Blob([P],{type:"image/svg+xml"}),lt=E.createObjectURL(G);V.onload=function(){I.drawImage(V,0,0),E.revokeObjectURL(lt);var It=s.toDataURL(n.imageType,n.imageQuality);e(It)},V.src=lt})},r}(),_=function(){},F=function(){function r(i){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+i+"_"}return Object.defineProperty(r.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),r.prototype.addClass=function(i){return this.styleSheet===void 0&&this.addStyleSheet(),i.name=""+this.classNamePrefix+i.localName,this.classes.push(i),this.styleSheet.sheet.insertRule("."+i.name+" {"+i.style+"}",this.styleSheet.sheet.cssRules.length),i},r.prototype.addRule=function(i){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(i),this.styleSheet.sheet.insertRule(i.selector+" {"+i.style+"}",this.styleSheet.sheet.cssRules.length)},r.prototype.addStyleSheet=function(){var i;this.styleSheet=document.createElement("style"),((i=this.styleSheetRoot)!==null&&i!==void 0?i:document.head).appendChild(this.styleSheet),this.addRule(new Z("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Z("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Z("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new M("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new M("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},r.prototype.removeStyleSheet=function(){var i;this.styleSheet&&(((i=this.styleSheetRoot)!==null&&i!==void 0?i:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},r}(),Z=function(r,i){this.selector=r,this.style=i},M=function(r,i){this.localName=r,this.style=i},l=function(){function r(i,t,o,n,e){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=i,this.displayMode=t,this.markerItems=o,this.uiStyleSettings=n,this.styles=e,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return r.prototype.show=function(i){var t=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=i,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var o=document.createElement("div");o.className=this.toolbarBlockStyleClass.name,o.style.whiteSpace="nowrap",this.uiContainer.appendChild(o),this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(e){var s=document.createElement("div");s.className=""+t.toolbarButtonStyleClass.name,s.setAttribute("data-type-name",e.typeName),s.innerHTML=e.icon,s.addEventListener("click",function(){t.markerToolbarButtonClicked(s,e)}),t.buttons.push(s),t.markerButtons.push(s)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var n=document.createElement("div");n.className=this.toolbarBlockStyleClass.name,n.style.whiteSpace="nowrap",n.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(n),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},r.prototype.addButtonClickListener=function(i){this.buttonClickListeners.push(i)},r.prototype.removeButtonClickListener=function(i){this.buttonClickListeners.indexOf(i)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(i),1)},r.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},r.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var i=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t<this.markerButtons.length;t++)t<i||t===i&&this.markerButtons.length-1===i?this.markerButtonBlock.appendChild(this.markerButtons[t]):(t===i&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[t]))}},r.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},r.prototype.resetButtonStyles=function(){var i=this;this.buttons.forEach(function(t){t.className=t.className.replace(i.uiStyleSettings.toolbarButtonStyleColorsClassName?i.uiStyleSettings.toolbarButtonStyleColorsClassName:i.toolbarButtonStyleColorsClass.name,"").trim(),t.className=t.className.replace(i.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?i.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:i.toolbarActiveButtonStyleColorsClass.name,"").trim(),t.className+=" "+(i.uiStyleSettings.toolbarButtonStyleColorsClassName?i.uiStyleSettings.toolbarButtonStyleColorsClassName:i.toolbarButtonStyleColorsClass.name)})},r.prototype.addActionButton=function(i,t,o){var n=this,e=document.createElement("div");switch(e.className=""+this.toolbarButtonStyleClass.name,e.innerHTML=t,e.setAttribute("data-action",o),e.addEventListener("click",function(){n.actionToolbarButtonClicked(e,o)}),o){case"select":e.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":e.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":e.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":e.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":e.style.fill=this.uiStyleSettings.closeButtonColor}i.appendChild(e),this.buttons.push(e)},r.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new M("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new M("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new M("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new M("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new M("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var i=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new M("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*i)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*i)+`px;
padding: `+i+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new M("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new M("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Z("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Z("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},r.prototype.markerToolbarButtonClicked=function(i,t){this.setActiveButton(i),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(o){return o("marker",t)}),this.markerButtonOverflowBlock.style.display="none"},r.prototype.actionToolbarButtonClicked=function(i,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(o){return o("action",t)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},r.prototype.setActiveButton=function(i){this.resetButtonStyles(),i.className=i.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),i.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},r.prototype.setActiveMarkerButton=function(i){var t=this.markerButtons.find(function(o){return o.getAttribute("data-type-name")===i});t&&this.setActiveButton(t)},r.prototype.setCurrentMarker=function(i){var t=this;this.currentMarker=i,this.buttons.filter(function(o){return/delete|notes/.test(o.getAttribute("data-action"))}).forEach(function(o){t.currentMarker===void 0?(o.style.fillOpacity="0.4",o.style.pointerEvents="none"):(o.style.fillOpacity="1",o.style.pointerEvents="all")})},r}(),K=function(){function r(i,t,o,n){this.panels=[],this.panelButtons=[],this.markerjsContainer=i,this.displayMode=t,this.uiStyleSettings=o,this.styles=n,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return r.prototype.addStyles=function(){var i;this.toolboxStyleClass=this.styles.addClass(new M("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new M("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new M("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new M("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new M("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new M("toolbox-panel-row_colors",`
background-color: `+((i=this.uiStyleSettings.toolboxBackgroundColor)!==null&&i!==void 0?i:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new M("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*t)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*t)+`px;
padding: `+t+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new M("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new M("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Z("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Z("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},r.prototype.show=function(i){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=i,this.uiContainer.className=this.toolboxStyleClass.name+" "+((t=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&t!==void 0?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},r.prototype.setPanelButtons=function(i){var t,o,n=this;this.panels=i,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&t!==void 0?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((o=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&o!==void 0?o:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(e){var s;e.uiStyleSettings=n.uiStyleSettings;var u=document.createElement("div");u.className=n.toolboxButtonStyleClass.name+" "+((s=n.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&s!==void 0?s:n.toolboxButtonStyleColorsClass.name),u.innerHTML=e.icon,u.title=e.title,u.addEventListener("click",function(){n.panelButtonClick(e)}),n.panelButtons.push(u),n.buttonRow.appendChild(u)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},r.prototype.panelButtonClick=function(i){var t=this,o=-1;if(i!==this.activePanel){o=this.panels.indexOf(i),this.panelRow.innerHTML="";var n=i.getUi();n.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(n),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=i}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){t.displayMode==="inline"?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(e,s){var u,P;e.className=t.toolboxButtonStyleClass.name+" "+(s===o?""+((u=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&u!==void 0?u:t.toolboxActiveButtonStyleColorsClass.name):""+((P=t.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&P!==void 0?P:t.toolboxButtonStyleColorsClass.name))})},r}(),ht=function(r,i){this.title=r,this.icon=i},U=function(r){function i(t,o,n,e){var s=r.call(this,t,e||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return s.colors=[],s.addTransparent=!1,s.colorBoxes=[],s.colors=o,s.currentColor=n,s.setCurrentColor=s.setCurrentColor.bind(s),s.getColorBox=s.getColorBox.bind(s),s}return h(i,r),i.prototype.getUi=function(){var t=this,o=document.createElement("div");return o.style.overflow="hidden",o.style.whiteSpace="nowrap",this.colors.forEach(function(n){var e=t.getColorBox(n);o.appendChild(e),t.colorBoxes.push(e)}),o},i.prototype.getColorBox=function(t){var o=this,n=this.uiStyleSettings.toolbarHeight/4,e=this.uiStyleSettings.toolbarHeight-n,s=document.createElement("div");s.style.display="inline-block",s.style.boxSizing="content-box",s.style.width=e-2+"px",s.style.height=e-2+"px",s.style.padding="1px",s.style.marginRight="2px",s.style.marginBottom="2px",s.style.borderWidth="2px",s.style.borderStyle="solid",s.style.borderRadius=(e+2)/2+"px",s.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",s.addEventListener("click",function(){o.setCurrentColor(t,s)});var u=document.createElement("div");return u.style.display="inline-block",u.style.width=e-2+"px",u.style.height=e-2+"px",u.style.backgroundColor=t,u.style.borderRadius=e/2+"px",t==="transparent"&&(u.style.fill=this.uiStyleSettings.toolboxAccentColor,u.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),s.appendChild(u),s},i.prototype.setCurrentColor=function(t,o){var n=this;this.currentColor=t,this.colorBoxes.forEach(function(e){e.style.borderColor=e===o?n.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(t)},i}(ht),at=function(){function r(i,t,o){this._state="new",this._isSelected=!1,this._container=i,this._overlayContainer=t,this.globalSettings=o,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(r.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),r.prototype.ownsTarget=function(i){return!1},Object.defineProperty(r.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),r.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},r.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},r.prototype.pointerDown=function(i,t){},r.prototype.dblClick=function(i,t){},r.prototype.manipulate=function(i){},r.prototype.pointerUp=function(i){this.stateChanged()},r.prototype.dispose=function(){},r.prototype.addMarkerVisualToContainer=function(i){this.container.childNodes.length>0?this.container.insertBefore(i,this.container.childNodes[0]):this.container.appendChild(i)},r.prototype.getState=function(){return{typeName:r.typeName,state:this.state,notes:this.notes}},r.prototype.restoreState=function(i){this._state=i.state,this.notes=i.notes},r.prototype.scale=function(i,t){},r.prototype.colorChanged=function(i){this.onColorChanged&&this.onColorChanged(i),this.stateChanged()},r.prototype.fillColorChanged=function(i){this.onFillColorChanged&&this.onFillColorChanged(i),this.stateChanged()},r.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var i=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),i.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(i)&&this.onStateChanged(this)}},r.typeName="MarkerBase",r}(),T=function(){function r(){this.findGripByVisual=this.findGripByVisual.bind(this)}return r.prototype.findGripByVisual=function(i){return this.topLeft.ownsTarget(i)?this.topLeft:this.topCenter.ownsTarget(i)?this.topCenter:this.topRight.ownsTarget(i)?this.topRight:this.centerLeft.ownsTarget(i)?this.centerLeft:this.centerRight.ownsTarget(i)?this.centerRight:this.bottomLeft.ownsTarget(i)?this.bottomLeft:this.bottomCenter.ownsTarget(i)?this.bottomCenter:this.bottomRight.ownsTarget(i)?this.bottomRight:void 0},r}(),ut=function(){function r(){this.GRIP_SIZE=10,this.visual=f.createGroup(),this.visual.appendChild(f.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(f.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return r.prototype.ownsTarget=function(i){return i===this.visual||i===this.visual.childNodes[0]||i===this.visual.childNodes[1]},r}(),W=function(){function r(){}return r.toITransformMatrix=function(i){return{a:i.a,b:i.b,c:i.c,d:i.d,e:i.e,f:i.f}},r.toSVGMatrix=function(i,t){return i.a=t.a,i.b=t.b,i.c=t.c,i.d=t.d,i.e=t.e,i.f=t.f,i},r}(),tt=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.left=0,e.top=0,e.width=0,e.height=0,e.defaultSize={x:50,y:20},e.offsetX=0,e.offsetY=0,e.rotationAngle=0,e.CB_DISTANCE=10,e._suppressMarkerCreateEvent=!1,e.container.transform.baseVal.appendItem(f.createTransform()),e.setupControlBox(),e}return h(i,r),Object.defineProperty(i.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var o=f.createTransform();this._visual.transform.baseVal.appendItem(o)},enumerable:!1,configurable:!0}),i.prototype.ownsTarget=function(t){return!!r.prototype.ownsTarget.call(this,t)||!!(this.controlGrips.findGripByVisual(t)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(t))},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.state==="new"&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var n=this.unrotatePoint(t);if(this.manipulationStartX=n.x,this.manipulationStartY=n.y,this.offsetX=n.x-this.left,this.offsetY=n.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(o),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(o)){this.activeGrip=this.rotatorGrip;var e=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=e.x-this.width/2,this.top=e.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var s=this.container.transform.baseVal.getItem(0);s.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(s,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},i.prototype.pointerUp=function(t){var o=this.state;r.prototype.pointerUp.call(this,t),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select",o==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},i.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},i.prototype.manipulate=function(t){var o=this.unrotatePoint(t);this.state==="creating"?this.resize(t):this.state==="move"?(this.left=this.manipulationStartLeft+(o.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(o.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(o):this.state==="rotate"&&this.rotate(t)},i.prototype.resize=function(t){var o=this.manipulationStartLeft,n=this.manipulationStartWidth,e=this.manipulationStartTop,s=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:o=this.manipulationStartLeft+t.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-o;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:e=this.manipulationStartTop+t.y-this.manipulationStartY,s=this.manipulationStartHeight+this.manipulationStartTop-e;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:s=this.manipulationStartHeight+t.y-this.manipulationStartY}n>=0?(this.left=o,this.width=n):(this.left=o+n,this.width=-n),s>=0?(this.top=e,this.height=s):(this.top=e+s,this.height=-s),this.setSize()},i.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},i.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var o=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*o,this.applyRotation()}},i.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},i.prototype.rotatePoint=function(t){if(this.rotationAngle===0)return t;var o=this.container.getCTM(),n=f.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(o)).x,y:n.y}},i.prototype.unrotatePoint=function(t){if(this.rotationAngle===0)return t;var o=this.container.getCTM();o=o.inverse();var n=f.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(o)).x,y:n.y}},i.prototype.select=function(){r.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},i.prototype.deselect=function(){r.prototype.deselect.call(this),this.controlBox.style.display="none"},i.prototype.setupControlBox=function(){this.controlBox=f.createGroup();var t=f.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=f.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=f.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new T,this.addControlGrips(),this.controlBox.style.display="none"},i.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},i.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},i.prototype.createGrip=function(){var t=new ut;return t.visual.transform.baseVal.appendItem(f.createTransform()),this.controlBox.appendChild(t.visual),t},i.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,o=-t/2,n=o,e=(this.width+this.CB_DISTANCE)/2-t/2,s=(this.height+this.CB_DISTANCE)/2-t/2,u=this.height+this.CB_DISTANCE-t/2,P=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,o,n),this.positionGrip(this.controlGrips.topCenter.visual,e,n),this.positionGrip(this.controlGrips.topRight.visual,P,n),this.positionGrip(this.controlGrips.centerLeft.visual,o,s),this.positionGrip(this.controlGrips.centerRight.visual,P,s),this.positionGrip(this.controlGrips.bottomLeft.visual,o,u),this.positionGrip(this.controlGrips.bottomCenter.visual,e,u),this.positionGrip(this.controlGrips.bottomRight.visual,P,u),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,e,n-3*this.CB_DISTANCE)},i.prototype.positionGrip=function(t,o,n){var e=t.transform.baseVal.getItem(0);e.setTranslate(o,n),t.transform.baseVal.replaceItem(e,0)},i.prototype.hideControlBox=function(){this.controlBox.style.display="none"},i.prototype.showControlBox=function(){this.controlBox.style.display=""},i.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:W.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:W.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},r.prototype.getState.call(this))},i.prototype.restoreState=function(t){r.prototype.restoreState.call(this,t);var o=t;this.left=o.left,this.top=o.top,this.width=o.width,this.height=o.height,this.rotationAngle=o.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(W.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,o.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(W.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,o.containerTransformMatrix))},i.prototype.scale=function(t,o){r.prototype.scale.call(this,t,o);var n=this.rotatePoint({x:this.left,y:this.top}),e=this.unrotatePoint({x:n.x*t,y:n.y*o});this.left=e.x,this.top=e.y,this.width=this.width*t,this.height=this.height*o,this.adjustControlBox()},i}(at),R=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.fillColor="transparent",e.strokeColor="transparent",e.strokeWidth=0,e.strokeDasharray="",e.opacity=1,e.setStrokeColor=e.setStrokeColor.bind(e),e.setFillColor=e.setFillColor.bind(e),e.setStrokeWidth=e.setStrokeWidth.bind(e),e.setStrokeDasharray=e.setStrokeDasharray.bind(e),e.createVisual=e.createVisual.bind(e),e}return h(i,r),i.prototype.ownsTarget=function(t){return!(!r.prototype.ownsTarget.call(this,t)&&t!==this.visual)},i.prototype.createVisual=function(){this.visual=f.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},i.prototype.manipulate=function(t){r.prototype.manipulate.call(this,t)},i.prototype.resize=function(t){r.prototype.resize.call(this,t),this.setSize()},i.prototype.setSize=function(){r.prototype.setSize.call(this),f.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},i.prototype.pointerUp=function(t){r.prototype.pointerUp.call(this,t),this.setSize()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&f.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&f.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&f.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&f.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},i.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},r.prototype.getState.call(this))},i.prototype.restoreState=function(t){var o=t;this.fillColor=o.fillColor,this.strokeColor=o.strokeColor,this.strokeWidth=o.strokeWidth,this.strokeDasharray=o.strokeDasharray,this.opacity=o.opacity,this.createVisual(),r.prototype.restoreState.call(this,t),this.setSize()},i.prototype.scale=function(t,o){r.prototype.scale.call(this,t,o),this.setSize()},i.title="Rectangle marker",i}(tt),$=function(r){function i(t,o,n,e){var s=r.call(this,t,e||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return s.widths=[],s.widthBoxes=[],s.widths=o,s.currentWidth=n,s.setCurrentWidth=s.setCurrentWidth.bind(s),s}return h(i,r),i.prototype.getUi=function(){var t=this,o=document.createElement("div");return o.style.display="flex",o.style.overflow="hidden",o.style.flexGrow="2",this.widths.forEach(function(n){var e=document.createElement("div");e.style.display="flex",e.style.flexGrow="2",e.style.alignItems="center",e.style.justifyContent="space-between",e.style.padding="5px",e.style.borderWidth="2px",e.style.borderStyle="solid",e.style.borderColor=n===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",e.addEventListener("click",function(){t.setCurrentWidth(n,e)}),o.appendChild(e);var s=document.createElement("div");s.innerText=n.toString(),s.style.marginRight="5px",e.appendChild(s);var u=document.createElement("div");u.style.minHeight="20px",u.style.flexGrow="2",u.style.display="flex",u.style.alignItems="center";var P=document.createElement("hr");P.style.minWidth="20px",P.style.border="0px",P.style.borderTop=n+"px solid "+t.uiStyleSettings.toolboxColor,P.style.flexGrow="2",u.appendChild(P),e.appendChild(u),t.widthBoxes.push(e)}),o},i.prototype.setCurrentWidth=function(t,o){var n=this;this.currentWidth=t,this.widthBoxes.forEach(function(e){e.style.borderColor=e===o?n.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},i}(ht),k=function(r){function i(t,o,n,e){var s=r.call(this,t,e||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return s.styles=[],s.styleBoxes=[],s.styles=o,s.currentStyle=n,s.setCurrentStyle=s.setCurrentStyle.bind(s),s}return h(i,r),i.prototype.getUi=function(){var t=this,o=document.createElement("div");return o.style.display="flex",o.style.overflow="hidden",o.style.flexGrow="2",this.styles.forEach(function(n){var e=document.createElement("div");e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="space-between",e.style.padding="5px",e.style.borderWidth="2px",e.style.borderStyle="solid",e.style.overflow="hidden",e.style.maxWidth=100/t.styles.length-5+"%",e.style.borderColor=n===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",e.addEventListener("click",function(){t.setCurrentStyle(n,e)}),o.appendChild(e);var s=document.createElement("div");s.style.minHeight="20px",s.style.flexGrow="2",s.style.overflow="hidden";var u=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+t.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(n!==""?'stroke-dasharray="'+n+'"':"")+` />
</svg>`;s.innerHTML=u,e.appendChild(s),t.styleBoxes.push(e)}),o},i.prototype.setCurrentStyle=function(t,o){var n=this;this.currentStyle=t,this.styleBoxes.forEach(function(e){e.style.borderColor=e===o?n.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},i}(ht),x=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.strokeColor=n.defaultColor,e.strokeWidth=n.defaultStrokeWidth,e.strokeDasharray=n.defaultStrokeDasharray,e.strokePanel=new U("Line color",n.defaultColorSet,n.defaultColor),e.strokePanel.onColorChanged=e.setStrokeColor,e.strokeWidthPanel=new $("Line width",n.defaultStrokeWidths,n.defaultStrokeWidth),e.strokeWidthPanel.onWidthChanged=e.setStrokeWidth,e.strokeStylePanel=new k("Line style",n.defaultStrokeDasharrays,n.defaultStrokeDasharray),e.strokeStylePanel.onStyleChanged=e.setStrokeDasharray,e}return h(i,r),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=r.prototype.getState.call(this);return t.typeName=i.typeName,t},i.typeName="FrameMarker",i.title="Frame marker",i.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',i}(R),j=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},A=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.x1=0,e.y1=0,e.x2=0,e.y2=0,e.defaultLength=50,e.manipulationStartX=0,e.manipulationStartY=0,e.manipulationStartX1=0,e.manipulationStartY1=0,e.manipulationStartX2=0,e.manipulationStartY2=0,e.setupControlBox(),e}return h(i,r),i.prototype.ownsTarget=function(t){return!!r.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.manipulationStartX=t.x,this.manipulationStartY=t.y,this.state==="new"&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(o)?this.activeGrip=this.grip1:this.grip2.ownsTarget(o)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},i.prototype.pointerUp=function(t){var o=this.state;r.prototype.pointerUp.call(this,t),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(t),this._state="select",o==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},i.prototype.adjustVisual=function(){},i.prototype.manipulate=function(t){this.state==="creating"?this.resize(t):this.state==="move"?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(t)},i.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},i.prototype.select=function(){r.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},i.prototype.deselect=function(){r.prototype.deselect.call(this),this.controlBox.style.display="none"},i.prototype.setupControlBox=function(){this.controlBox=f.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},i.prototype.adjustControlBox=function(){this.positionGrips()},i.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},i.prototype.createGrip=function(){var t=new ut;return t.visual.transform.baseVal.appendItem(f.createTransform()),this.controlBox.appendChild(t.visual),t},i.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},i.prototype.positionGrip=function(t,o,n){var e=t.transform.baseVal.getItem(0);e.setTranslate(o,n),t.transform.baseVal.replaceItem(e,0)},i.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},r.prototype.getState.call(this))},i.prototype.restoreState=function(t){r.prototype.restoreState.call(this,t);var o=t;this.x1=o.x1,this.y1=o.y1,this.x2=o.x2,this.y2=o.y2},i.prototype.scale=function(t,o){r.prototype.scale.call(this,t,o),this.x1=this.x1*t,this.y1=this.y1*o,this.x2=this.x2*t,this.y2=this.y2*o,this.adjustVisual(),this.adjustControlBox()},i}(at),Q=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.strokeColor="transparent",e.strokeWidth=0,e.strokeDasharray="",e.setStrokeColor=e.setStrokeColor.bind(e),e.setStrokeWidth=e.setStrokeWidth.bind(e),e.setStrokeDasharray=e.setStrokeDasharray.bind(e),e.strokeColor=n.defaultColor,e.strokeWidth=n.defaultStrokeWidth,e.strokeDasharray=n.defaultStrokeDasharray,e.strokePanel=new U("Line color",n.defaultColorSet,n.defaultColor),e.strokePanel.onColorChanged=e.setStrokeColor,e.strokeWidthPanel=new $("Line width",n.defaultStrokeWidths,n.defaultStrokeWidth),e.strokeWidthPanel.onWidthChanged=e.setStrokeWidth,e.strokeStylePanel=new k("Line style",n.defaultStrokeDasharrays,n.defaultStrokeDasharray),e.strokeStylePanel.onStyleChanged=e.setStrokeDasharray,e}return h(i,r),i.prototype.ownsTarget=function(t){return!(!r.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},i.prototype.createVisual=function(){this.visual=f.createGroup(),this.selectorLine=f.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=f.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},i.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),f.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),f.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),f.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},r.prototype.getState.call(this));return t.typeName=i.typeName,t},i.prototype.restoreState=function(t){r.prototype.restoreState.call(this,t);var o=t;this.strokeColor=o.strokeColor,this.strokeWidth=o.strokeWidth,this.strokeDasharray=o.strokeDasharray,this.createVisual(),this.adjustVisual()},i.typeName="LineMarker",i.title="Line marker",i.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',i}(A),H=function(r){function i(t,o,n,e){var s=r.call(this,t,e||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return s.fonts=[],s.fontBoxes=[],s.fonts=o,s.currentFont=n,s.setCurrentFont=s.setCurrentFont.bind(s),s}return h(i,r),i.prototype.getUi=function(){var t=this,o=document.createElement("div");return o.style.overflow="hidden",o.style.flexGrow="2",this.fonts.forEach(function(n){var e=document.createElement("div");e.style.display="inline-block",e.style.alignItems="center",e.style.justifyContent="space-between",e.style.padding="5px",e.style.borderWidth="2px",e.style.borderStyle="solid",e.style.overflow="hidden",e.style.maxWidth=100/t.fonts.length-5+"%",e.style.borderColor=n===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",e.addEventListener("click",function(){t.setCurrentFont(n,e)}),o.appendChild(e);var s=document.createElement("div");s.style.display="flex",s.style.minHeight="20px",s.style.flexGrow="2",s.style.fontFamily=n,s.style.overflow="hidden";var u=document.createElement("div");u.style.whiteSpace="nowrap",u.style.overflow="hidden",u.style.textOverflow="ellipsis",u.innerHTML="The quick brown fox jumps over the lazy dog",s.appendChild(u),e.appendChild(s),t.fontBoxes.push(e)}),o},i.prototype.setCurrentFont=function(t,o){var n=this;this.currentFont=t,this.fontBoxes.forEach(function(e){e.style.borderColor=e===o?n.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},i}(ht),Y=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.color="transparent",e.padding=5,e.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",e.text=e.DEFAULT_TEXT,e.isMoved=!1,e.color=n.defaultColor,e.fontFamily=n.defaultFontFamily,e.defaultSize={x:100,y:30},e.setColor=e.setColor.bind(e),e.setFont=e.setFont.bind(e),e.renderText=e.renderText.bind(e),e.sizeText=e.sizeText.bind(e),e.textEditDivClicked=e.textEditDivClicked.bind(e),e.showTextEditor=e.showTextEditor.bind(e),e.setSize=e.setSize.bind(e),e.positionTextEditor=e.positionTextEditor.bind(e),e.colorPanel=new U("Color",n.defaultColorSet,n.defaultColor),e.colorPanel.onColorChanged=e.setColor,e.fontFamilyPanel=new H("Font",n.defaultFontFamilies,n.defaultFontFamily),e.fontFamilyPanel.onFontChanged=e.setFont,e}return h(i,r),i.prototype.ownsTarget=function(t){if(r.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var o=!1;return this.textElement.childNodes.forEach(function(n){n===t&&(o=!0)}),o},i.prototype.createVisual=function(){this.visual=f.createGroup(),this.bgRectangle=f.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=f.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(f.createTransform()),this.textElement.transform.baseVal.appendItem(f.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},i.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(o){t.textElement.appendChild(f.createTSpan(o.trim()===""?" ":o.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},i.prototype.getTextScale=function(){var t=this.textElement.getBBox(),o=1;if(t.width>0&&t.height>0){var n=(1*this.width-this.width*this.padding*2/100)/t.width,e=(1*this.height-this.height*this.padding*2/100)/t.height;o=Math.min(n,e)}return o},i.prototype.getTextPosition=function(t){var o=this.textElement.getBBox(),n=0,e=0;return o.width>0&&o.height>0&&(n=(this.width-o.width*t)/2,e=this.height/2-o.height*t/2),{x:n,y:e}},i.prototype.sizeText=function(){var t=this.textElement.getBBox(),o=this.getTextScale(),n=this.getTextPosition(o);n.y-=t.y*o,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+o+", "+o+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(o,o))},i.prototype.manipulate=function(t){r.prototype.manipulate.call(this,t),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},i.prototype.resize=function(t){r.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},i.prototype.setSize=function(){r.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(f.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),f.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},i.prototype.pointerUp=function(t){var o=this.state;o==="creating"&&(this._suppressMarkerCreateEvent=!0),r.prototype.pointerUp.call(this,t),this.setSize(),(o==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},i.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(o){o.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var o=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&o>.9;)o-=.1,t.textEditor.style.fontSize=Math.max(o,.9)+"em"}),this.textEditor.addEventListener("keyup",function(o){o.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(o){if(o.clipboardData){var n=o.clipboardData.getData("text"),e=window.getSelection();if(!e.rangeCount)return!1;e.deleteFromDocument(),e.getRangeAt(0).insertNode(document.createTextNode(n)),o.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){t.textEditDivClicked(t.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},i.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),o=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),e={x:n.width*t,y:n.height*t};o.x-=e.x/2,o.y-=e.y/2,this.textEditor.style.top=o.y+"px",this.textEditor.style.left=o.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-o.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},i.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},i.prototype.select=function(){r.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},i.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),r.prototype.deselect.call(this)},i.prototype.dblClick=function(t,o){r.prototype.dblClick.call(this,t,o),this.showTextEditor()},i.prototype.setColor=function(t){this.textElement&&f.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},i.prototype.setFont=function(t){this.textElement&&f.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},i.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},i.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},r.prototype.getState.call(this));return t.typeName=i.typeName,t},i.prototype.restoreState=function(t){var o=t;this.color=o.color,this.fontFamily=o.fontFamily,this.padding=o.padding,this.text=o.text,this.createVisual(),r.prototype.restoreState.call(this,t),this.setSize()},i.prototype.scale=function(t,o){r.prototype.scale.call(this,t,o),this.setSize(),this.sizeText(),this.positionTextEditor()},i.typeName="TextMarker",i.title="Text marker",i.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',i}(tt),st=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.color="transparent",e.lineWidth=3,e.drawing=!1,e.pixelRatio=1,e.color=n.defaultColor,e.lineWidth=n.defaultStrokeWidth,e.pixelRatio=n.freehandPixelRatio,e.setColor=e.setColor.bind(e),e.addCanvas=e.addCanvas.bind(e),e.finishCreation=e.finishCreation.bind(e),e.setLineWidth=e.setLineWidth.bind(e),e.colorPanel=new U("Color",n.defaultColorSet,n.defaultColor),e.colorPanel.onColorChanged=e.setColor,e.lineWidthPanel=new $("Line width",n.defaultStrokeWidths,n.defaultStrokeWidth),e.lineWidthPanel.onWidthChanged=e.setLineWidth,e}return h(i,r),i.prototype.ownsTarget=function(t){return!(!r.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},i.prototype.createVisual=function(){this.visual=f.createGroup(),this.drawingImage=f.createImage(),this.visual.appendChild(this.drawingImage);var t=f.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(t,o){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):r.prototype.pointerDown.call(this,t,o)},i.prototype.manipulate=function(t){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):r.prototype.manipulate.call(this,t)},i.prototype.resize=function(t){r.prototype.resize.call(this,t),f.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),f.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},i.prototype.pointerUp=function(t){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):r.prototype.pointerUp.call(this,t)},i.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},i.prototype.select=function(){this.state==="creating"&&this.finishCreation(),r.prototype.select.call(this)},i.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),r.prototype.deselect.call(this)},i.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),o=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=o[0],e=o[1],s=o[2],u=o[3],P=!1,I=0;I<this.canvasElement.height;I++)for(var E=0;E<this.canvasElement.width;E++)t.data[I*this.canvasElement.width*4+4*E+3]>0&&(P=!0,I<e&&(e=I),E<n&&(n=E),I>u&&(u=I),E>s&&(s=E));if(P){this.left=n/this.pixelRatio,this.top=e/this.pixelRatio,this.width=(s-n)/this.pixelRatio,this.height=(u-e)/this.pixelRatio;var V=document.createElement("canvas");V.width=s-n,V.height=u-e,V.getContext("2d").putImageData(this.canvasContext.getImageData(n,e,s-n,u-e),0,0),this.drawingImgUrl=V.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},i.prototype.setDrawingImage=function(){f.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),f.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},i.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},i.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=Object.assign({drawingImgUrl:this.drawingImgUrl},r.prototype.getState.call(this));return t.typeName=i.typeName,t},i.prototype.restoreState=function(t){this.createVisual(),r.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},i.prototype.scale=function(t,o){r.prototype.scale.call(this,t,o),this.setDrawingImage()},i.typeName="FreehandMarker",i.title="Freehand marker",i.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',i}(tt),St=function(r){function i(t,o,n){var e=r.call(this,t,n||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return e.typeBoxes=[],e.currentType=o,e.setCurrentType=e.setCurrentType.bind(e),e}return h(i,r),i.prototype.getUi=function(){var t=this,o=document.createElement("div");o.style.display="flex",o.style.overflow="hidden",o.style.flexGrow="2";for(var n=function(u){var P="both";switch(u){case 0:P="both";break;case 1:P="start";break;case 2:P="end";break;case 3:P="none"}var I=document.createElement("div");if(I.style.display="flex",I.style.flexGrow="2",I.style.alignItems="center",I.style.justifyContent="space-between",I.style.padding="5px",I.style.borderWidth="2px",I.style.borderStyle="solid",I.style.borderColor=P===e.currentType?e.uiStyleSettings.toolboxAccentColor:"transparent",I.addEventListener("click",function(){t.setCurrentType(P,I)}),o.appendChild(I),P==="both"||P==="start"){var E=document.createElement("div");E.style.display="flex",E.style.alignItems="center",E.style.minHeight="20px",E.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(e.uiStyleSettings!==void 0?e.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,E.style.marginLeft="5px",I.appendChild(E)}var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.minHeight="20px",V.style.flexGrow="2";var G=document.createElement("hr");if(G.style.minWidth="20px",G.style.border="0px",G.style.borderTop="3px solid "+(e.uiStyleSettings!==void 0?e.uiStyleSettings.toolboxColor:"#eeeeee"),G.style.flexGrow="2",V.appendChild(G),I.appendChild(V),P==="both"||P==="end"){var lt=document.createElement("div");lt.style.display="flex",lt.style.alignItems="center",lt.style.minHeight="20px",lt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(e.uiStyleSettings!==void 0?e.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,lt.style.marginRight="5px",I.appendChild(lt)}e.typeBoxes.push(I)},e=this,s=0;s<4;s++)n(s);return o},i.prototype.setCurrentType=function(t,o){var n=this;this.currentType=t,this.typeBoxes.forEach(function(e){e.style.borderColor=e===o?n.uiStyleSettings!==void 0?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},i}(ht),d=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.arrowType="end",e.arrowBaseHeight=10,e.arrowBaseWidth=10,e.getArrowPoints=e.getArrowPoints.bind(e),e.setArrowType=e.setArrowType.bind(e),e.arrowTypePanel=new St("Arrow type","end"),e.arrowTypePanel.onArrowTypeChanged=e.setArrowType,e}return h(i,r),i.prototype.ownsTarget=function(t){return!(!r.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},i.prototype.getArrowPoints=function(t,o){var n=this.arrowBaseWidth+2*this.strokeWidth,e=this.arrowBaseHeight+2*this.strokeWidth;return t-n/2+","+(o+e/2)+" "+t+","+(o-e/2)+" "+(t+n/2)+","+(o+e/2)},i.prototype.createTips=function(){this.arrow1=f.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(f.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=f.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(f.createTransform()),this.visual.appendChild(this.arrow2)},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.state==="creating"&&this.createTips()},i.prototype.adjustVisual=function(){if(r.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",f.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),f.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var t=0;Math.abs(this.x1-this.x2)>.1&&(t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var o=this.arrow1.transform.baseVal.getItem(0);o.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(o,0);var n=this.arrow2.transform.baseVal.getItem(0);n.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(n,0)}},i.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=Object.assign({arrowType:this.arrowType},r.prototype.getState.call(this));return t.typeName=i.typeName,t},i.prototype.restoreState=function(t){r.prototype.restoreState.call(this,t);var o=t;this.arrowType=o.arrowType,this.createTips(),this.adjustVisual()},i.typeName="ArrowMarker",i.title="Arrow marker",i.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',i}(Q),O=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.fillColor=n.defaultFillColor,e.strokeWidth=0,e.fillPanel=new U("Color",n.defaultColorSet,n.defaultFillColor),e.fillPanel.onColorChanged=e.setFillColor,e}return h(i,r),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=r.prototype.getState.call(this);return t.typeName=i.typeName,t},i.typeName="CoverMarker",i.title="Cover marker",i.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',i}(R),D=function(r){function i(t,o,n,e){var s=r.call(this,t,e||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return s.opacities=[],s.opacityBoxes=[],s.opacities=o,s.currentOpacity=n,s.setCurrentOpacity=s.setCurrentOpacity.bind(s),s}return h(i,r),i.prototype.getUi=function(){var t=this,o=document.createElement("div");return o.style.display="flex",o.style.overflow="hidden",o.style.flexGrow="2",o.style.justifyContent="space-between",this.opacities.forEach(function(n){var e=document.createElement("div");e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e.style.padding="5px",e.style.borderWidth="2px",e.style.borderStyle="solid",e.style.borderColor=n===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",e.addEventListener("click",function(){t.setCurrentOpacity(n,e)}),o.appendChild(e);var s=document.createElement("div");s.innerText=100*n+"%",e.appendChild(s),t.opacityBoxes.push(e)}),o},i.prototype.setCurrentOpacity=function(t,o){var n=this;this.currentOpacity=t,this.opacityBoxes.forEach(function(e){e.style.borderColor=e===o?n.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},i}(ht),p=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.setOpacity=e.setOpacity.bind(e),e.fillColor=n.defaultHighlightColor,e.strokeWidth=0,e.opacity=n.defaultHighlightOpacity,e.fillPanel=new U("Color",n.defaultColorSet,e.fillColor),e.fillPanel.onColorChanged=e.setFillColor,e.opacityPanel=new D("Opacity",n.defaultOpacitySteps,e.opacity),e.opacityPanel.onOpacityChanged=e.setOpacity,e}return h(i,r),i.prototype.setOpacity=function(t){this.opacity=t,this.visual&&f.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=r.prototype.getState.call(this);return t.typeName=i.typeName,t},i.typeName="HighlightMarker",i.title="Highlight marker",i.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',i}(O),m='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',J='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',X=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.bgColor="transparent",e.tipPosition={x:0,y:0},e.tipBase1Position={x:0,y:0},e.tipBase2Position={x:0,y:0},e.tipMoving=!1,e.color=n.defaultStrokeColor,e.bgColor=n.defaultFillColor,e.fontFamily=n.defaultFontFamily,e.defaultSize={x:100,y:30},e.setBgColor=e.setBgColor.bind(e),e.getTipPoints=e.getTipPoints.bind(e),e.positionTip=e.positionTip.bind(e),e.setTipPoints=e.setTipPoints.bind(e),e.colorPanel=new U("Text color",n.defaultColorSet,e.color,m),e.colorPanel.onColorChanged=e.setColor,e.bgColorPanel=new U("Fill color",n.defaultColorSet,e.bgColor,J),e.bgColorPanel.onColorChanged=e.setBgColor,e.fontFamilyPanel=new H("Font",n.defaultFontFamilies,n.defaultFontFamily),e.fontFamilyPanel.onFontChanged=e.setFont,e.tipGrip=new ut,e.tipGrip.visual.transform.baseVal.appendItem(f.createTransform()),e.controlBox.appendChild(e.tipGrip.visual),e}return h(i,r),i.prototype.ownsTarget=function(t){return r.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},i.prototype.createTip=function(){f.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=f.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},i.prototype.pointerDown=function(t,o){this.state==="new"&&r.prototype.pointerDown.call(this,t,o),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(o)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):r.prototype.pointerDown.call(this,t,o)},i.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,r.prototype.pointerUp.call(this,t);else{var o=this.state==="creating";r.prototype.pointerUp.call(this,t),this.setTipPoints(o),this.positionTip()}},i.prototype.manipulate=function(t){if(this.tipMoving){var o=this.unrotatePoint(t);this.tipPosition={x:o.x-this.manipulationStartLeft,y:o.y-this.manipulationStartTop},this.positionTip()}else r.prototype.manipulate.call(this,t)},i.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(f.setAttributes(this.bgRectangle,[["fill",t]]),f.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},i.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},i.prototype.setTipPoints=function(t){t===void 0&&(t=!1);var o=Math.min(this.height/2,15),n=this.height/5;t&&(this.tipPosition={x:o+n/2,y:this.height+20});var e=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?e<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(n=this.width/5,o=Math.min(this.width/2,15),this.tipBase1Position={x:o,y:0},this.tipBase2Position={x:o+n,y:0}):(this.tipBase1Position={x:0,y:o},this.tipBase2Position={x:0,y:o+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?e<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(n=this.width/5,o=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-o-n,y:0},this.tipBase2Position={x:this.width-o,y:0}):(this.tipBase1Position={x:this.width,y:o},this.tipBase2Position={x:this.width,y:o+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?e<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(n=this.width/5,o=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-o-n,y:this.height},this.tipBase2Position={x:this.width-o,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-o-n},this.tipBase2Position={x:this.width,y:this.height-o}):e<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(n=this.width/5,o=Math.min(this.width/2,15),this.tipBase1Position={x:o,y:this.height},this.tipBase2Position={x:o+n,y:this.height}):(this.tipBase1Position={x:0,y:this.height-o},this.tipBase2Position={x:0,y:this.height-o-n})},i.prototype.resize=function(t){r.prototype.resize.call(this,t),this.positionTip()},i.prototype.positionTip=function(){f.setAttributes(this.tip,[["points",this.getTipPoints()]]);var t=this.tipGrip.visual.transform.baseVal.getItem(0);t.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(t,0)},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),i.prototype.select=function(){this.positionTip(),r.prototype.select.call(this)},i.prototype.getState=function(){var t=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},r.prototype.getState.call(this));return t.typeName=i.typeName,t},i.prototype.restoreState=function(t){var o=t;this.bgColor=o.bgColor,this.tipPosition=o.tipPosition,r.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},i.prototype.scale=function(t,o){r.prototype.scale.call(this,t,o),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*o},this.positionTip()},i.typeName="CalloutMarker",i.title="Callout marker",i.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',i}(Y),z=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.fillColor="transparent",e.strokeColor="transparent",e.strokeWidth=0,e.strokeDasharray="",e.opacity=1,e.strokeColor=n.defaultColor,e.strokeWidth=n.defaultStrokeWidth,e.strokeDasharray=n.defaultStrokeDasharray,e.fillColor=n.defaultFillColor,e.setStrokeColor=e.setStrokeColor.bind(e),e.setFillColor=e.setFillColor.bind(e),e.setStrokeWidth=e.setStrokeWidth.bind(e),e.setStrokeDasharray=e.setStrokeDasharray.bind(e),e.setOpacity=e.setOpacity.bind(e),e.createVisual=e.createVisual.bind(e),e.strokePanel=new U("Line color",y(n.defaultColorSet,["transparent"]),n.defaultColor),e.strokePanel.onColorChanged=e.setStrokeColor,e.fillPanel=new U("Fill color",y(n.defaultColorSet,["transparent"]),e.fillColor,J),e.fillPanel.onColorChanged=e.setFillColor,e.strokeWidthPanel=new $("Line width",n.defaultStrokeWidths,n.defaultStrokeWidth),e.strokeWidthPanel.onWidthChanged=e.setStrokeWidth,e.strokeStylePanel=new k("Line style",n.defaultStrokeDasharrays,n.defaultStrokeDasharray),e.strokeStylePanel.onStyleChanged=e.setStrokeDasharray,e.opacityPanel=new D("Opacity",n.defaultOpacitySteps,e.opacity),e.opacityPanel.onOpacityChanged=e.setOpacity,e}return h(i,r),i.prototype.ownsTarget=function(t){return!(!r.prototype.ownsTarget.call(this,t)&&t!==this.visual)},i.prototype.createVisual=function(){this.visual=f.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},i.prototype.manipulate=function(t){r.prototype.manipulate.call(this,t)},i.prototype.resize=function(t){r.prototype.resize.call(this,t),this.setSize()},i.prototype.setSize=function(){r.prototype.setSize.call(this),f.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},i.prototype.pointerUp=function(t){r.prototype.pointerUp.call(this,t),this.setSize()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&f.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&f.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&f.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&f.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},i.prototype.setOpacity=function(t){this.opacity=t,this.visual&&f.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},r.prototype.getState.call(this));return t.typeName=i.typeName,t},i.prototype.restoreState=function(t){var o=t;this.fillColor=o.fillColor,this.strokeColor=o.strokeColor,this.strokeWidth=o.strokeWidth,this.strokeDasharray=o.strokeDasharray,this.opacity=o.opacity,this.createVisual(),r.prototype.restoreState.call(this,t),this.setSize()},i.prototype.scale=function(t,o){r.prototype.scale.call(this,t,o),this.setSize()},i.typeName="EllipseMarker",i.title="Ellipse marker",i.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',i}(tt),q=function(r){function i(t,o,n){return r.call(this,t,o,n)||this}return h(i,r),Object.defineProperty(i.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),i.prototype.ownsTarget=function(t){return!(!r.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},i.prototype.createTips=function(){this.tip1=f.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(f.createTransform()),this.visual.appendChild(this.tip1),this.tip2=f.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(f.createTransform()),this.visual.appendChild(this.tip2)},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.state==="creating"&&this.createTips()},i.prototype.adjustVisual=function(){if(r.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(f.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),f.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),o=this.tip1.transform.baseVal.getItem(0);o.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(o,0);var n=this.tip2.transform.baseVal.getItem(0);n.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(n,0)}},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=r.prototype.getState.call(this);return t.typeName=i.typeName,t},i.prototype.restoreState=function(t){r.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},i.typeName="MeasurementMarker",i.title="Measurement marker",i.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',i}(Q),nt=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.strokePanel.colors=n.defaultColorSet,e.fillColor="transparent",e}return h(i,r),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=r.prototype.getState.call(this);return t.typeName=i.typeName,t},i.typeName="EllipseFrameMarker",i.title="Ellipse frame marker",i.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',i}(z),dt=function(){function r(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(r.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),r.prototype.addUndoStep=function(i){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(i)||(this.undoStack.push(i),JSON.stringify(this.lastRedoStep)!==JSON.stringify(i)&&this.redoStack.splice(0,this.redoStack.length))},r.prototype.replaceLastUndoStep=function(i){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=i)},r.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},r.prototype.undo=function(){if(this.undoStack.length>1){var i=this.undoStack.pop();return i!==void 0&&this.redoStack.push(i),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},r.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},r}(),vt=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.strokeColor="transparent",e.strokeWidth=0,e.strokeDasharray="",e.curveX=0,e.curveY=0,e.manipulationStartCurveX=0,e.manipulationStartCurveY=0,e.setStrokeColor=e.setStrokeColor.bind(e),e.setStrokeWidth=e.setStrokeWidth.bind(e),e.setStrokeDasharray=e.setStrokeDasharray.bind(e),e.positionGrips=e.positionGrips.bind(e),e.addControlGrips=e.addControlGrips.bind(e),e.adjustVisual=e.adjustVisual.bind(e),e.setupControlBox=e.setupControlBox.bind(e),e.resize=e.resize.bind(e),e.strokeColor=n.defaultColor,e.strokeWidth=n.defaultStrokeWidth,e.strokeDasharray=n.defaultStrokeDasharray,e.strokePanel=new U("Line color",n.defaultColorSet,n.defaultColor),e.strokePanel.onColorChanged=e.setStrokeColor,e.strokeWidthPanel=new $("Line width",n.defaultStrokeWidths,n.defaultStrokeWidth),e.strokeWidthPanel.onWidthChanged=e.setStrokeWidth,e.strokeStylePanel=new k("Line style",n.defaultStrokeDasharrays,n.defaultStrokeDasharray),e.strokeStylePanel.onStyleChanged=e.setStrokeDasharray,e}return h(i,r),i.prototype.ownsTarget=function(t){return!(!r.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},i.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},i.prototype.createVisual=function(){this.visual=f.createGroup(),this.selectorCurve=f.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=f.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=t.x,this.curveY=t.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(o)&&(this.activeGrip=this.curveGrip,this._state="resize")},i.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),f.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),f.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),f.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},i.prototype.setupControlBox=function(){r.prototype.setupControlBox.call(this),this.curveControlLine1=f.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=f.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},i.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,r.prototype.addControlGrips.call(this)},i.prototype.positionGrips=function(){r.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},i.prototype.manipulate=function(t){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),r.prototype.manipulate.call(this,t)},i.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),r.prototype.resize.call(this,t),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},i.prototype.scale=function(t,o){this.curveX=this.curveX*t,this.curveY=this.curveY*o,r.prototype.scale.call(this,t,o)},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},r.prototype.getState.call(this));return t.typeName=i.typeName,t},i.prototype.restoreState=function(t){r.prototype.restoreState.call(this,t);var o=t;this.strokeColor=o.strokeColor,this.strokeWidth=o.strokeWidth,this.strokeDasharray=o.strokeDasharray,this.curveX=o.curveX,this.curveY=o.curveY,this.createVisual(),this.adjustVisual()},i.typeName="CurveMarker",i.title="Curve marker",i.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',i}(A),bt=function(r){function i(t,o,n){var e=r.call(this,t,o,n)||this;return e.fillColor="transparent",e.strokeColor="transparent",e.strokeWidth=0,e.strokeDasharray="",e.textColor="transparent",e.fontSize="1rem",e.isMoved=!1,e.captionText="Caption",e.PADDING=5,e.captionBoxWidth=0,e.captionBoxHeight=0,e.strokeColor=n.defaultColor,e.strokeWidth=n.defaultStrokeWidth,e.strokeDasharray=n.defaultStrokeDasharray,e.fillColor=n.defaultFillColor,e.textColor=n.defaultStrokeColor,e.fontFamily=n.defaultFontFamily,e.fontSize=n.defaultCaptionFontSize,e.captionText=n.defaultCaptionText,e.setStrokeColor=e.setStrokeColor.bind(e),e.setFillColor=e.setFillColor.bind(e),e.setStrokeWidth=e.setStrokeWidth.bind(e),e.setStrokeDasharray=e.setStrokeDasharray.bind(e),e.createVisual=e.createVisual.bind(e),e.sizeCaption=e.sizeCaption.bind(e),e.setCaptionText=e.setCaptionText.bind(e),e.showTextEditor=e.showTextEditor.bind(e),e.positionTextEditor=e.positionTextEditor.bind(e),e.finishTextEditing=e.finishTextEditing.bind(e),e.setFont=e.setFont.bind(e),e.setTextColor=e.setTextColor.bind(e),e.strokePanel=new U("Line color",y(n.defaultColorSet,["transparent"]),e.strokeColor),e.strokePanel.onColorChanged=e.setStrokeColor,e.fillPanel=new U("Fill color",y(n.defaultColorSet,["transparent"]),e.fillColor,J),e.fillPanel.onColorChanged=e.setFillColor,e.strokeWidthPanel=new $("Line width",n.defaultStrokeWidths,n.defaultStrokeWidth),e.strokeWidthPanel.onWidthChanged=e.setStrokeWidth,e.strokeStylePanel=new k("Line style",n.defaultStrokeDasharrays,n.defaultStrokeDasharray),e.strokeStylePanel.onStyleChanged=e.setStrokeDasharray,e.fontFamilyPanel=new H("Font",n.defaultFontFamilies,n.defaultFontFamily),e.fontFamilyPanel.onFontChanged=e.setFont,e.textColorPanel=new U("Text color",n.defaultColorSet,e.textColor,m),e.textColorPanel.onColorChanged=e.setTextColor,e}return h(i,r),i.prototype.ownsTarget=function(t){return!(!r.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.frame&&t!==this.captionBg&&t!==this.captionElement)},i.prototype.createVisual=function(){this.visual=f.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=f.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=f.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=f.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},i.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},i.prototype.pointerDown=function(t,o){r.prototype.pointerDown.call(this,t,o),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},i.prototype.manipulate=function(t){r.prototype.manipulate.call(this,t),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},i.prototype.resize=function(t){r.prototype.resize.call(this,t),this.setSize()},i.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),f.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),f.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},i.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(o){o.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(o){o.key==="Enter"&&t.finishTextEditing(t.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(o){o.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){t.finishTextEditing(t.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){t.finishTextEditing(t.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},i.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},i.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},i.prototype.setFont=function(t){this.captionElement&&f.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},i.prototype.setTextColor=function(t){this.captionElement&&f.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},i.prototype.setSize=function(){r.prototype.setSize.call(this),f.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},i.prototype.pointerUp=function(t){r.prototype.pointerUp.call(this,t),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},i.prototype.dblClick=function(t,o){r.prototype.dblClick.call(this,t,o),this.showTextEditor()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&f.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&f.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&f.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&f.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},r.prototype.getState.call(this));return t.typeName=this.typeName,t},i.prototype.restoreState=function(t){var o=t;this.fillColor=o.fillColor,this.strokeColor=o.strokeColor,this.strokeWidth=o.strokeWidth,this.strokeDasharray=o.strokeDasharray,this.textColor=o.textColor,this.fontFamily=o.fontFamily,this.captionText=o.captionText,this.fontSize=o.fontSize,this.createVisual(),r.prototype.restoreState.call(this,t),this.setSize()},i.prototype.scale=function(t,o){r.prototype.scale.call(this,t,o),this.setSize()},i.typeName="CaptionFrameMarker",i.title="Caption frame marker",i.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',i}(tt),gt=function(){function r(i,t){t===void 0&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=i,this.cancelable=t}return Object.defineProperty(r.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),r.prototype.preventDefault=function(){this._defaultPrevented=!0},r}(),pt=function(r){function i(t,o,n){var e=r.call(this,t,!1)||this;return e.dataUrl=o,e.state=n,e}return h(i,r),i}(gt),mt=function(r){function i(t,o,n){n===void 0&&(n=!1);var e=r.call(this,t,n)||this;return e.marker=o,e}return h(i,r),i}(gt),$t=function(){function r(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return r.prototype.addEventListener=function(i,t){this[i].push(t)},r.prototype.removeEventListener=function(i,t){var o=this[i].indexOf(t);o>-1&&this[i].splice(o,1)},r}(),Mt=function(){function r(i){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new j,this._isOpen=!1,this.undoRedoManager=new dt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new $t,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=r.instanceCounter++,this.styles=new F(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=i,this.targetRoot=document.body,this.width=i.clientWidth,this.height=i.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(r.prototype,"ALL_MARKER_TYPES",{get:function(){return[x,st,d,Y,nt,z,p,X,q,O,Q,vt,bt]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[x,st,d,Y,z,p,X]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"BASIC_MARKER_TYPES",{get:function(){return[x,st,d,Y,p]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(i){var t=this;this._availableMarkerTypes.splice(0),i.forEach(function(o){if(typeof o=="string"){var n=t.ALL_MARKER_TYPES.find(function(e){return e.typeName===o});n!==void 0&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(o)})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(i){this._zoomLevel=i,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),r.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),et.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},r.prototype.show=function(){var i=this;this.styles.styleSheetRoot===void 0&&_.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=_.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(t){return t(new gt(i))})},r.prototype.render=function(){return L(this,void 0,void 0,function(){var i;return it(this,function(t){switch(t.label){case 0:return this.setCurrentMarker(),(i=new ot).naturalSize=this.renderAtNaturalSize,i.imageType=this.renderImageType,i.imageQuality=this.renderImageQuality,i.markersOnly=this.renderMarkersOnly,i.width=this.renderWidth,i.height=this.renderHeight,[4,i.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,i.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}})})},r.prototype.close=function(i){var t=this;if(i===void 0&&(i=!1),this.isOpen){var o=!1;i||this.eventListeners.beforeclose.forEach(function(n){var e=new gt(t,!0);n(e),e.defaultPrevented&&(o=!0)}),o||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(n){return n(new gt(t))}),this.detachEvents(),this._isOpen=!1)}},r.prototype.addMarkersToToolbar=function(){for(var i,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];(i=this._availableMarkerTypes).push.apply(i,t)},r.prototype.addRenderEventListener=function(i){this.addEventListener("render",function(t){i(t.dataUrl,t.state)})},r.prototype.removeRenderEventListener=function(i){},r.prototype.addCloseEventListener=function(i){this.addEventListener("close",function(){i()})},r.prototype.removeCloseEventListener=function(i){},r.prototype.setupResizeObserver=function(){var i=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){i.resize(i.target.clientWidth,i.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return i.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},r.prototype.onPopupTargetResize=function(){var i=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/i>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*i:this.editorCanvas.clientWidth,o=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/i;this.resize(t,o)},r.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},r.prototype.resize=function(i,t){this._isResizing=!0;var o=i/this.imageWidth,n=t/this.imageHeight;this.imageWidth=Math.round(i),this.imageHeight=Math.round(t),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(o,n),this._isResizing=!1},r.prototype.scaleMarkers=function(i,t){var o,n=this;this._currentMarker&&this._currentMarker instanceof Y?this._currentMarker.scale(i,t):(o=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(e){e!==n._currentMarker&&e.scale(i,t)}),o!==void 0&&this.setCurrentMarker(o)},r.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},r.prototype.setTopLeft=function(){var i=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=i.left-t.left,this.top=i.top-t.top},r.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},r.prototype.addDefs=function(){for(var i,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];this.defs=f.createDefs(),this.addDefsToImage(),(i=this.defs).append.apply(i,t)},r.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},r.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},r.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},r.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},r.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},r.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},r.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},r.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var i=document.createElement("a");i.href="https://markerjs.com/",i.target="_blank",i.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',i.title="Powered by marker.js",i.style.display="grid",i.style.alignItems="center",i.style.justifyItems="center",i.style.padding="3px",i.style.width="20px",i.style.height="20px",this.logoUI.appendChild(i),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},r.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},r.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},r.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},r.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var i=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=i+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new l(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new K(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},r.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},r.prototype.removeMarker=function(i){this.markerImage.removeChild(i.container),this.markers.indexOf(i)>-1&&this.markers.splice(this.markers.indexOf(i),1),i.dispose()},r.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},r.prototype.toolbarButtonClicked=function(i,t){if(i==="marker"&&t!==void 0)this.createNewMarker(t);else if(i==="action")switch(t){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},r.prototype.deleteSelectedMarker=function(){var i=this;if(this._currentMarker!==void 0){var t=!1;if(this.eventListeners.markerbeforedelete.forEach(function(n){var e=new mt(i,i._currentMarker,!0);n(e),e.defaultPrevented&&(t=!0)}),!t){var o=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(n){return n(new mt(i,o))})}}},r.prototype.clear=function(){var i=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(s){var u=new mt(i,void 0,!0);s(u),u.defaultPrevented&&(t=!0)}),!t)){this.setCurrentMarker();for(var o=function(s){var u=n.markers[s];n.setCurrentMarker(n.markers[s]),n._currentMarker.dispose(),n.markerImage.removeChild(n._currentMarker.container),n.markers.splice(n.markers.indexOf(n._currentMarker),1),n.eventListeners.markerdelete.forEach(function(P){return P(new mt(i,u))})},n=this,e=this.markers.length-1;e>=0;e--)o(e);this.addUndoStep()}},Object.defineProperty(r.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),r.prototype.showNotesEditor=function(){var i;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(i=this._currentMarker.notes)!==null&&i!==void 0?i:"",this.overlayContainer.appendChild(this.notesArea))},r.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},r.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},r.prototype.addUndoStep=function(){var i=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var t=this.getState(),o=this.undoRedoManager.getLastUndoStep();if(!o||o.width===t.width&&o.height===t.height){var n=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),n<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(e){return e(new gt(i))})}else this.undoRedoManager.replaceLastUndoStep(t),this.eventListeners.statechange.forEach(function(e){return e(new gt(i))})}},r.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},r.prototype.undoStep=function(){var i=this,t=this.undoRedoManager.undo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(o){return o(new gt(i))}))},r.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},r.prototype.redoStep=function(){var i=this,t=this.undoRedoManager.redo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(o){return o(new gt(i))}))},r.prototype.stepZoom=function(){var i=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=i<this.zoomSteps.length-1?this.zoomSteps[i+1]:this.zoomSteps[0]},r.prototype.panTo=function(i){this.contentDiv.scrollBy({left:this.prevPanPoint.x-i.x,top:this.prevPanPoint.y-i.y}),this.prevPanPoint=i},r.prototype.startRenderAndClose=function(){return L(this,void 0,void 0,function(){var i,t,o=this;return it(this,function(n){switch(n.label){case 0:return[4,this.render()];case 1:return i=n.sent(),t=this.getState(),this.eventListeners.render.forEach(function(e){return e(new pt(o,i,t))}),this.close(!0),[2]}})})},r.prototype.getState=function(i){i===!0&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(o){return t.markers.push(o.getState())}),t},r.prototype.restoreState=function(i){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);i.markers.forEach(function(o){var n=t._availableMarkerTypes.find(function(s){return s.typeName===o.typeName});if(n!==void 0){var e=t.addNewMarker(n);e.restoreState(o),t.markers.push(e)}}),i.width&&i.height&&(i.width!==this.imageWidth||i.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/i.width,this.imageHeight/i.height),this.eventListeners.restorestate.forEach(function(o){return o(new gt(t))})},r.prototype.addNewMarker=function(i){var t=f.createGroup();return this.markerImage.appendChild(t),new i(t,this.overlayContainer,this.settings)},r.prototype.createNewMarker=function(i){var t,o=this;(t=typeof i=="string"?this._availableMarkerTypes.find(function(n){return n.typeName===i}):i)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(n){return n(new mt(o,o._currentMarker))}))},r.prototype.markerCreated=function(i){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(i),this.setCurrentMarker(i),i instanceof st&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(st):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(o){return o(new mt(t,t._currentMarker))})},r.prototype.colorChanged=function(i){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=i,this.settings.defaultStrokeColor=i)},r.prototype.fillColorChanged=function(i){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=i)},r.prototype.markerStateChanged=function(i){var t=this;this.eventListeners.markerchange.forEach(function(o){return o(new mt(t,i))})},r.prototype.setCurrentMarker=function(i){var t=this;this._currentMarker!==i&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(o){return o(new mt(t,t._currentMarker))})),this._currentMarker=i,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(o){return o(new mt(t,t._currentMarker))}))},r.prototype.onPointerDown=function(i){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||i.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var t=this.markers.find(function(o){return o.ownsTarget(i.target)});t!==void 0?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(i.clientX,i.clientY),i.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:i.clientX,y:i.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(i.clientX,i.clientY))},r.prototype.onDblClick=function(i){if(this._isFocused||this.focus(),this.mode==="select"){var t=this.markers.find(function(o){return o.ownsTarget(i.target)});t!==void 0&&t!==this._currentMarker&&this.setCurrentMarker(t),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(i.clientX,i.clientY),i.target):this.setCurrentMarker()}},r.prototype.onPointerMove=function(i){this.touchPoints!==1&&i.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||i.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(i.clientX,i.clientY)):this.zoomLevel>1&&this.panTo({x:i.clientX,y:i.clientY}))},r.prototype.onPointerUp=function(i){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(i.clientX,i.clientY)),this.isDragging=!1,this.addUndoStep()},r.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},r.prototype.onKeyUp=function(i){this._currentMarker===void 0||this.notesArea!==void 0||i.key!=="Delete"&&i.key!=="Backspace"||this.deleteSelectedMarker()},r.prototype.clientToLocalCoordinates=function(i,t){var o=this.markerImage.getBoundingClientRect();return{x:(i-o.left)/this.zoomLevel,y:(t-o.top)/this.zoomLevel}},r.prototype.onWindowResize=function(){this.positionUI()},r.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var i=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=i+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},r.prototype.addLicenseKey=function(i){et.addKey(i)},r.prototype.addEventListener=function(i,t){this.eventListeners.addEventListener(i,t)},r.prototype.removeEventListener=function(i,t){this.eventListeners.removeEventListener(i,t)},r.prototype.renderState=function(i){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(i),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(r.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),r.prototype.focus=function(){var i=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(t){return t(new gt(i))}))},r.prototype.blur=function(){var i=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(t){return t(new gt(i))}))},r.instanceCounter=0,r}()},31561:function(Xt,ft,a){a.d(ft,{Z:function(){return k}});var c=a(54476),h=a(20068),L=a(42978),it=a(75931),y=a(35593),f=a(92310),et=a.n(f),ot=a(8654),_=a(59301),F=a(10228),Z=a(16089),M=F.Z.ESC,l=F.Z.TAB;function K(x){var j=x.visible,A=x.triggerRef,Q=x.onVisibleChange,H=x.autoFocus,Y=x.overlayRef,st=_.useRef(!1),St=function(){if(j){var p,m;(p=A.current)===null||p===void 0||(m=p.focus)===null||m===void 0||m.call(p),Q==null||Q(!1)}},d=function(){var p;return(p=Y.current)!==null&&p!==void 0&&p.focus?(Y.current.focus(),st.current=!0,!0):!1},O=function(p){switch(p.keyCode){case M:St();break;case l:{var m=!1;st.current||(m=d()),m?p.preventDefault():St();break}}};_.useEffect(function(){return j?(window.addEventListener("keydown",O),H&&(0,Z.Z)(d,3),function(){window.removeEventListener("keydown",O),st.current=!1}):function(){st.current=!1}},[j])}var ht=(0,_.forwardRef)(function(x,j){var A=x.overlay,Q=x.arrow,H=x.prefixCls,Y=(0,_.useMemo)(function(){var St;return typeof A=="function"?St=A():St=A,St},[A]),st=(0,ot.sQ)(j,Y==null?void 0:Y.ref);return _.createElement(_.Fragment,null,Q&&_.createElement("div",{className:"".concat(H,"-arrow")}),_.cloneElement(Y,{ref:(0,ot.Yr)(Y)?st:void 0}))}),U=ht,at={adjustX:1,adjustY:1},T=[0,0],ut={topLeft:{points:["bl","tl"],overflow:at,offset:[0,-4],targetOffset:T},top:{points:["bc","tc"],overflow:at,offset:[0,-4],targetOffset:T},topRight:{points:["br","tr"],overflow:at,offset:[0,-4],targetOffset:T},bottomLeft:{points:["tl","bl"],overflow:at,offset:[0,4],targetOffset:T},bottom:{points:["tc","bc"],overflow:at,offset:[0,4],targetOffset:T},bottomRight:{points:["tr","br"],overflow:at,offset:[0,4],targetOffset:T}},W=ut,tt=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function R(x,j){var A,Q=x.arrow,H=Q===void 0?!1:Q,Y=x.prefixCls,st=Y===void 0?"rc-dropdown":Y,St=x.transitionName,d=x.animation,O=x.align,D=x.placement,p=D===void 0?"bottomLeft":D,m=x.placements,J=m===void 0?W:m,X=x.getPopupContainer,z=x.showAction,q=x.hideAction,nt=x.overlayClassName,dt=x.overlayStyle,vt=x.visible,bt=x.trigger,gt=bt===void 0?["hover"]:bt,pt=x.autoFocus,mt=x.overlay,$t=x.children,Mt=x.onVisibleChange,r=(0,it.Z)(x,tt),i=_.useState(),t=(0,L.Z)(i,2),o=t[0],n=t[1],e="visible"in x?vt:o,s=_.useRef(null),u=_.useRef(null),P=_.useRef(null);_.useImperativeHandle(j,function(){return s.current});var I=function(Ct){n(Ct),Mt==null||Mt(Ct)};K({visible:e,triggerRef:P,onVisibleChange:I,autoFocus:pt,overlayRef:u});var E=function(Ct){var kt=x.onOverlayClick;n(!1),kt&&kt(Ct)},V=function(){return _.createElement(U,{ref:u,overlay:mt,prefixCls:st,arrow:H})},G=function(){return typeof mt=="function"?V:V()},lt=function(){var Ct=x.minOverlayWidthMatchTrigger,kt=x.alignPoint;return"minOverlayWidthMatchTrigger"in x?Ct:!kt},It=function(){var Ct=x.openClassName;return Ct!==void 0?Ct:"".concat(st,"-open")},wt=_.cloneElement($t,{className:et()((A=$t.props)===null||A===void 0?void 0:A.className,e&&It()),ref:(0,ot.Yr)($t)?(0,ot.sQ)(P,$t.ref):void 0}),Bt=q;return!Bt&&gt.indexOf("contextMenu")!==-1&&(Bt=["click"]),_.createElement(y.Z,(0,c.Z)({builtinPlacements:J},r,{prefixCls:st,ref:s,popupClassName:et()(nt,(0,h.Z)({},"".concat(st,"-show-arrow"),H)),popupStyle:dt,action:gt,showAction:z,hideAction:Bt,popupPlacement:p,popupAlign:O,popupTransitionName:St,popupAnimation:d,popupVisible:e,stretch:lt()?"minWidth":"",popup:G(),onPopupVisibleChange:I,onPopupClick:E,getPopupContainer:X}),wt)}var $=_.forwardRef(R),k=$},15285:function(Xt,ft,a){a.d(ft,{iz:function(){return Ae},ck:function(){return fe},BW:function(){return fi},sN:function(){return fe},Wd:function(){return Ue},ZP:function(){return We},Xl:function(){return A}});var c=a(54476),h=a(20068),L=a(33885),it=a(94480),y=a(42978),f=a(75931),et=a(92310),ot=a.n(et),_=a(83836),F=a(18929),Z=a(13697),M=a(48736),l=a(59301),K=a(4676),ht=l.createContext(null);function U(g,v){return g===void 0?null:"".concat(g,"-").concat(v)}function at(g){var v=l.useContext(ht);return U(v,g)}var T=a(80547),ut=["children","locked"],W=l.createContext(null);function tt(g,v){var w=(0,L.Z)({},g);return Object.keys(v).forEach(function(B){var C=v[B];C!==void 0&&(w[B]=C)}),w}function R(g){var v=g.children,w=g.locked,B=(0,f.Z)(g,ut),C=l.useContext(W),S=(0,T.Z)(function(){return tt(C,B)},[C,B],function(b,N){return!w&&(b[0]!==N[0]||!(0,Z.Z)(b[1],N[1],!0))});return l.createElement(W.Provider,{value:S},v)}var $=[],k=l.createContext(null);function x(){return l.useContext(k)}var j=l.createContext($);function A(g){var v=l.useContext(j);return l.useMemo(function(){return g!==void 0?[].concat((0,it.Z)(v),[g]):v},[v,g])}var Q=l.createContext(null),H=l.createContext({}),Y=H,st=a(29194);function St(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,st.Z)(g)){var w=g.nodeName.toLowerCase(),B=["input","select","textarea","button"].includes(w)||g.isContentEditable||w==="a"&&!!g.getAttribute("href"),C=g.getAttribute("tabindex"),S=Number(C),b=null;return C&&!Number.isNaN(S)?b=S:B&&b===null&&(b=0),B&&g.disabled&&(b=null),b!==null&&(b>=0||v&&b<0)}return!1}function d(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=(0,it.Z)(g.querySelectorAll("*")).filter(function(B){return St(B,v)});return St(g,v)&&w.unshift(g),w}var O=null;function D(){O=document.activeElement}function p(){O=null}function m(){if(O)try{O.focus()}catch(g){}}function J(g,v){if(v.keyCode===9){var w=d(g),B=w[v.shiftKey?0:w.length-1],C=B===document.activeElement||g===document.activeElement;if(C){var S=w[v.shiftKey?w.length-1:0];S.focus(),v.preventDefault()}}}var X=a(10228),z=a(16089),q=X.Z.LEFT,nt=X.Z.RIGHT,dt=X.Z.UP,vt=X.Z.DOWN,bt=X.Z.ENTER,gt=X.Z.ESC,pt=X.Z.HOME,mt=X.Z.END,$t=[dt,vt,q,nt];function Mt(g,v,w,B){var C,S,b,N,ct="prev",rt="next",Lt="children",xt="parent";if(g==="inline"&&B===bt)return{inlineTrigger:!0};var At=(C={},(0,h.Z)(C,dt,ct),(0,h.Z)(C,vt,rt),C),zt=(S={},(0,h.Z)(S,q,w?rt:ct),(0,h.Z)(S,nt,w?ct:rt),(0,h.Z)(S,vt,Lt),(0,h.Z)(S,bt,Lt),S),Ot=(b={},(0,h.Z)(b,dt,ct),(0,h.Z)(b,vt,rt),(0,h.Z)(b,bt,Lt),(0,h.Z)(b,gt,xt),(0,h.Z)(b,q,w?Lt:xt),(0,h.Z)(b,nt,w?xt:Lt),b),Kt={inline:At,horizontal:zt,vertical:Ot,inlineSub:At,horizontalSub:Ot,verticalSub:Ot},Zt=(N=Kt["".concat(g).concat(v?"":"Sub")])===null||N===void 0?void 0:N[B];switch(Zt){case ct:return{offset:-1,sibling:!0};case rt:return{offset:1,sibling:!0};case xt:return{offset:-1,sibling:!1};case Lt:return{offset:1,sibling:!1};default:return null}}function r(g){for(var v=g;v;){if(v.getAttribute("data-menu-list"))return v;v=v.parentElement}return null}function i(g,v){for(var w=g||document.activeElement;w;){if(v.has(w))return w;w=w.parentElement}return null}function t(g,v){var w=d(g,!0);return w.filter(function(B){return v.has(B)})}function o(g,v,w){var B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!g)return null;var C=t(g,v),S=C.length,b=C.findIndex(function(N){return w===N});return B<0?b===-1?b=S-1:b-=1:B>0&&(b+=1),b=(b+S)%S,C[b]}var n=function(v,w){var B=new Set,C=new Map,S=new Map;return v.forEach(function(b){var N=document.querySelector("[data-menu-id='".concat(U(w,b),"']"));N&&(B.add(N),S.set(N,b),C.set(b,N))}),{elements:B,key2element:C,element2key:S}};function e(g,v,w,B,C,S,b,N,ct,rt){var Lt=l.useRef(),xt=l.useRef();xt.current=v;var At=function(){z.Z.cancel(Lt.current)};return l.useEffect(function(){return function(){At()}},[]),function(zt){var Ot=zt.which;if([].concat($t,[bt,gt,pt,mt]).includes(Ot)){var Kt=S(),Zt=n(Kt,B),Ut=Zt,Rt=Ut.elements,Pt=Ut.key2element,Et=Ut.element2key,Wt=Pt.get(v),Nt=i(Wt,Rt),Jt=Et.get(Nt),Ht=Mt(g,b(Jt,!0).length===1,w,Ot);if(!Ht&&Ot!==pt&&Ot!==mt)return;($t.includes(Ot)||[pt,mt].includes(Ot))&&zt.preventDefault();var xe=function(se){if(se){var we=se,ke=se.querySelector("a");ke!=null&&ke.getAttribute("href")&&(we=ke);var Ee=Et.get(se);N(Ee),At(),Lt.current=(0,z.Z)(function(){xt.current===Ee&&we.focus()})}};if([pt,mt].includes(Ot)||Ht.sibling||!Nt){var jt;!Nt||g==="inline"?jt=C.current:jt=r(Nt);var ce,te=t(jt,Rt);Ot===pt?ce=te[0]:Ot===mt?ce=te[te.length-1]:ce=o(jt,Rt,Nt,Ht.offset),xe(ce)}else if(Ht.inlineTrigger)ct(Jt);else if(Ht.offset>0)ct(Jt,!0),At(),Lt.current=(0,z.Z)(function(){Zt=n(Kt,B);var $e=Nt.getAttribute("aria-controls"),se=document.getElementById($e),we=o(se,Zt.elements);xe(we)},5);else if(Ht.offset<0){var oe=b(Jt,!0),ge=oe[oe.length-2],ye=Pt.get(ge);ct(ge,!1),xe(ye)}}rt==null||rt(zt)}}function s(g){Promise.resolve().then(g)}var u="__RC_UTIL_PATH_SPLIT__",P=function(v){return v.join(u)},I=function(v){return v.split(u)},E="rc-menu-more";function V(){var g=l.useState({}),v=(0,y.Z)(g,2),w=v[1],B=(0,l.useRef)(new Map),C=(0,l.useRef)(new Map),S=l.useState([]),b=(0,y.Z)(S,2),N=b[0],ct=b[1],rt=(0,l.useRef)(0),Lt=(0,l.useRef)(!1),xt=function(){Lt.current||w({})},At=(0,l.useCallback)(function(Pt,Et){var Wt=P(Et);C.current.set(Wt,Pt),B.current.set(Pt,Wt),rt.current+=1;var Nt=rt.current;s(function(){Nt===rt.current&&xt()})},[]),zt=(0,l.useCallback)(function(Pt,Et){var Wt=P(Et);C.current.delete(Wt),B.current.delete(Pt)},[]),Ot=(0,l.useCallback)(function(Pt){ct(Pt)},[]),Kt=(0,l.useCallback)(function(Pt,Et){var Wt=B.current.get(Pt)||"",Nt=I(Wt);return Et&&N.includes(Nt[0])&&Nt.unshift(E),Nt},[N]),Zt=(0,l.useCallback)(function(Pt,Et){return Pt.some(function(Wt){var Nt=Kt(Wt,!0);return Nt.includes(Et)})},[Kt]),Ut=function(){var Et=(0,it.Z)(B.current.keys());return N.length&&Et.push(E),Et},Rt=(0,l.useCallback)(function(Pt){var Et="".concat(B.current.get(Pt)).concat(u),Wt=new Set;return(0,it.Z)(C.current.keys()).forEach(function(Nt){Nt.startsWith(Et)&&Wt.add(C.current.get(Nt))}),Wt},[]);return l.useEffect(function(){return function(){Lt.current=!0}},[]),{registerPath:At,unregisterPath:zt,refreshOverflowKeys:Ot,isSubPathKey:Zt,getKeyPath:Kt,getKeys:Ut,getSubPathKeys:Rt}}function G(g){var v=l.useRef(g);v.current=g;var w=l.useCallback(function(){for(var B,C=arguments.length,S=new Array(C),b=0;b<C;b++)S[b]=arguments[b];return(B=v.current)===null||B===void 0?void 0:B.call.apply(B,[v].concat(S))},[]);return g?w:void 0}var lt=Math.random().toFixed(5).toString().slice(2),It=0;function wt(g){var v=(0,F.Z)(g,{value:g}),w=(0,y.Z)(v,2),B=w[0],C=w[1];return l.useEffect(function(){It+=1;var S="".concat(lt,"-").concat(It);C("rc-menu-uuid-".concat(S))},[]),B}var Bt=a(67732),yt=a(83652),Ct=a(42403),kt=a(158),Ft=a(2738),Yt=a(8654);function Qt(g,v,w,B){var C=l.useContext(W),S=C.activeKey,b=C.onActive,N=C.onInactive,ct={active:S===g};return v||(ct.onMouseEnter=function(rt){w==null||w({key:g,domEvent:rt}),b(g)},ct.onMouseLeave=function(rt){B==null||B({key:g,domEvent:rt}),N(g)}),ct}function de(g){var v=l.useContext(W),w=v.mode,B=v.rtl,C=v.inlineIndent;if(w!=="inline")return null;var S=g;return B?{paddingRight:S*C}:{paddingLeft:S*C}}function ee(g){var v=g.icon,w=g.props,B=g.children,C;return v===null||v===!1?null:(typeof v=="function"?C=l.createElement(v,(0,L.Z)({},w)):typeof v!="boolean"&&(C=v),C||B||null)}var qt=["item"];function Tt(g){var v=g.item,w=(0,f.Z)(g,qt);return Object.defineProperty(w,"item",{get:function(){return(0,M.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),v}}),w}var ie=["title","attribute","elementRef"],Pe=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],pe=["active"],Le=function(g){(0,Ct.Z)(w,g);var v=(0,kt.Z)(w);function w(){return(0,Bt.Z)(this,w),v.apply(this,arguments)}return(0,yt.Z)(w,[{key:"render",value:function(){var C=this.props,S=C.title,b=C.attribute,N=C.elementRef,ct=(0,f.Z)(C,ie),rt=(0,Ft.Z)(ct,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,M.ZP)(!b,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),l.createElement(_.Z.Item,(0,c.Z)({},b,{title:typeof S=="string"?S:void 0},rt,{ref:N}))}}]),w}(l.Component),Oe=l.forwardRef(function(g,v){var w,B=g.style,C=g.className,S=g.eventKey,b=g.warnKey,N=g.disabled,ct=g.itemIcon,rt=g.children,Lt=g.role,xt=g.onMouseEnter,At=g.onMouseLeave,zt=g.onClick,Ot=g.onKeyDown,Kt=g.onFocus,Zt=(0,f.Z)(g,Pe),Ut=at(S),Rt=l.useContext(W),Pt=Rt.prefixCls,Et=Rt.onItemClick,Wt=Rt.disabled,Nt=Rt.overflowDisabled,Jt=Rt.itemIcon,Ht=Rt.selectedKeys,xe=Rt.onActive,jt=l.useContext(Y),ce=jt._internalRenderMenuItem,te="".concat(Pt,"-item"),oe=l.useRef(),ge=l.useRef(),ye=Wt||N,$e=(0,Yt.x1)(v,ge),se=A(S),we=function(ne){return{key:S,keyPath:(0,it.Z)(se).reverse(),item:oe.current,domEvent:ne}},ke=ct||Jt,Ee=Qt(S,ye,xt,At),Xe=Ee.active,Ye=(0,f.Z)(Ee,pe),_e=Ht.includes(S),Je=de(se.length),Qe=function(ne){if(!ye){var Me=we(ne);zt==null||zt(Tt(Me)),Et(Me)}},ae=function(ne){if(Ot==null||Ot(ne),ne.which===X.Z.ENTER){var Me=we(ne);zt==null||zt(Tt(Me)),Et(Me)}},Ce=function(ne){xe(S),Kt==null||Kt(ne)},li={};g.role==="option"&&(li["aria-selected"]=_e);var qe=l.createElement(Le,(0,c.Z)({ref:oe,elementRef:$e,role:Lt===null?"none":Lt||"menuitem",tabIndex:N?null:-1,"data-menu-id":Nt&&Ut?null:Ut},Zt,Ye,li,{component:"li","aria-disabled":N,style:(0,L.Z)((0,L.Z)({},Je),B),className:ot()(te,(w={},(0,h.Z)(w,"".concat(te,"-active"),Xe),(0,h.Z)(w,"".concat(te,"-selected"),_e),(0,h.Z)(w,"".concat(te,"-disabled"),ye),w),C),onClick:Qe,onKeyDown:ae,onFocus:Ce}),rt,l.createElement(ee,{props:(0,L.Z)((0,L.Z)({},g),{},{isSelected:_e}),icon:ke}));return ce&&(qe=ce(qe,g,{selected:_e})),qe});function Te(g,v){var w=g.eventKey,B=x(),C=A(w);return l.useEffect(function(){if(B)return B.registerPath(w,C),function(){B.unregisterPath(w,C)}},[C]),B?null:l.createElement(Oe,(0,c.Z)({},g,{ref:v}))}var fe=l.forwardRef(Te),me=["className","children"],Ze=function(v,w){var B=v.className,C=v.children,S=(0,f.Z)(v,me),b=l.useContext(W),N=b.prefixCls,ct=b.mode,rt=b.rtl;return l.createElement("ul",(0,c.Z)({className:ot()(N,rt&&"".concat(N,"-rtl"),"".concat(N,"-sub"),"".concat(N,"-").concat(ct==="inline"?"inline":"vertical"),B),role:"menu"},S,{"data-menu-list":!0,ref:w}),C)},le=l.forwardRef(Ze);le.displayName="SubMenuList";var Ve=le,Ge=a(11592);function Ne(g,v){return(0,Ge.Z)(g).map(function(w,B){if(l.isValidElement(w)){var C,S,b=w.key,N=(C=(S=w.props)===null||S===void 0?void 0:S.eventKey)!==null&&C!==void 0?C:b,ct=N==null;ct&&(N="tmp_key-".concat([].concat((0,it.Z)(v),[B]).join("-")));var rt={key:N,eventKey:N};return l.cloneElement(w,rt)}return w})}var Re=a(35593),Gt={adjustX:1,adjustY:1},re={topLeft:{points:["bl","tl"],overflow:Gt},topRight:{points:["br","tr"],overflow:Gt},bottomLeft:{points:["tl","bl"],overflow:Gt},bottomRight:{points:["tr","br"],overflow:Gt},leftTop:{points:["tr","tl"],overflow:Gt},leftBottom:{points:["br","bl"],overflow:Gt},rightTop:{points:["tl","tr"],overflow:Gt},rightBottom:{points:["bl","br"],overflow:Gt}},Li={topLeft:{points:["bl","tl"],overflow:Gt},topRight:{points:["br","tr"],overflow:Gt},bottomLeft:{points:["tl","bl"],overflow:Gt},bottomRight:{points:["tr","br"],overflow:Gt},rightTop:{points:["tr","tl"],overflow:Gt},rightBottom:{points:["br","bl"],overflow:Gt},leftTop:{points:["tl","tr"],overflow:Gt},leftBottom:{points:["bl","br"],overflow:Gt}},Ke=null;function wi(g,v,w){if(v)return v;if(w)return w[g]||w.other}var ki={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Ni(g){var v=g.prefixCls,w=g.visible,B=g.children,C=g.popup,S=g.popupStyle,b=g.popupClassName,N=g.popupOffset,ct=g.disabled,rt=g.mode,Lt=g.onVisibleChange,xt=l.useContext(W),At=xt.getPopupContainer,zt=xt.rtl,Ot=xt.subMenuOpenDelay,Kt=xt.subMenuCloseDelay,Zt=xt.builtinPlacements,Ut=xt.triggerSubMenuAction,Rt=xt.forceSubMenuRender,Pt=xt.rootClassName,Et=xt.motion,Wt=xt.defaultMotions,Nt=l.useState(!1),Jt=(0,y.Z)(Nt,2),Ht=Jt[0],xe=Jt[1],jt=zt?(0,L.Z)((0,L.Z)({},Li),Zt):(0,L.Z)((0,L.Z)({},re),Zt),ce=ki[rt],te=wi(rt,Et,Wt),oe=l.useRef(te);rt!=="inline"&&(oe.current=te);var ge=(0,L.Z)((0,L.Z)({},oe.current),{},{leavedClassName:"".concat(v,"-hidden"),removeOnLeave:!1,motionAppear:!0}),ye=l.useRef();return l.useEffect(function(){return ye.current=(0,z.Z)(function(){xe(w)}),function(){z.Z.cancel(ye.current)}},[w]),l.createElement(Re.Z,{prefixCls:v,popupClassName:ot()("".concat(v,"-popup"),(0,h.Z)({},"".concat(v,"-rtl"),zt),b,Pt),stretch:rt==="horizontal"?"minWidth":null,getPopupContainer:At,builtinPlacements:jt,popupPlacement:ce,popupVisible:Ht,popup:C,popupStyle:S,popupAlign:N&&{offset:N},action:ct?[]:[Ut],mouseEnterDelay:Ot,mouseLeaveDelay:Kt,onPopupVisibleChange:Lt,forceRender:Rt,popupMotion:ge,fresh:!0},B)}var Ai=a(77900);function ni(g){var v=g.id,w=g.open,B=g.keyPath,C=g.children,S="inline",b=l.useContext(W),N=b.prefixCls,ct=b.forceSubMenuRender,rt=b.motion,Lt=b.defaultMotions,xt=b.mode,At=l.useRef(!1);At.current=xt===S;var zt=l.useState(!At.current),Ot=(0,y.Z)(zt,2),Kt=Ot[0],Zt=Ot[1],Ut=At.current?w:!1;l.useEffect(function(){At.current&&Zt(!1)},[xt]);var Rt=(0,L.Z)({},wi(S,rt,Lt));B.length>1&&(Rt.motionAppear=!1);var Pt=Rt.onVisibleChanged;return Rt.onVisibleChanged=function(Et){return!At.current&&!Et&&Zt(!0),Pt==null?void 0:Pt(Et)},Kt?null:l.createElement(R,{mode:S,locked:!At.current},l.createElement(Ai.default,(0,c.Z)({visible:Ut},Rt,{forceRender:ct,removeOnLeave:!1,leavedClassName:"".concat(N,"-hidden")}),function(Et){var Wt=Et.className,Nt=Et.style;return l.createElement(Ve,{id:v,className:Wt,style:Nt},C)}))}var Ei=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],ri=["active"],ve=function(v){var w,B=v.style,C=v.className,S=v.title,b=v.eventKey,N=v.warnKey,ct=v.disabled,rt=v.internalPopupClose,Lt=v.children,xt=v.itemIcon,At=v.expandIcon,zt=v.popupClassName,Ot=v.popupOffset,Kt=v.popupStyle,Zt=v.onClick,Ut=v.onMouseEnter,Rt=v.onMouseLeave,Pt=v.onTitleClick,Et=v.onTitleMouseEnter,Wt=v.onTitleMouseLeave,Nt=(0,f.Z)(v,Ei),Jt=at(b),Ht=l.useContext(W),xe=Ht.prefixCls,jt=Ht.mode,ce=Ht.openKeys,te=Ht.disabled,oe=Ht.overflowDisabled,ge=Ht.activeKey,ye=Ht.selectedKeys,$e=Ht.itemIcon,se=Ht.expandIcon,we=Ht.onItemClick,ke=Ht.onOpenChange,Ee=Ht.onActive,Xe=l.useContext(Y),Ye=Xe._internalRenderSubMenuItem,_e=l.useContext(Q),Je=_e.isSubPathKey,Qe=A(),ae="".concat(xe,"-submenu"),Ce=te||ct,li=l.useRef(),qe=l.useRef(),ti=xt!=null?xt:$e,ne=At!=null?At:se,Me=ce.includes(b),je=!oe&&Me,Mi=Je(ye,b),ci=Qt(b,Ce,Et,Wt),ei=ci.active,ji=(0,f.Z)(ci,ri),Qi=l.useState(!1),Fi=(0,y.Z)(Qi,2),vi=Fi[0],Ii=Fi[1],Bi=function(Se){Ce||Ii(Se)},Ie=function(Se){Bi(!0),Ut==null||Ut({key:b,domEvent:Se})},Zi=function(Se){Bi(!1),Rt==null||Rt({key:b,domEvent:Se})},gi=l.useMemo(function(){return ei||(jt!=="inline"?vi||Je([ge],b):!1)},[jt,ei,ge,vi,b,Je]),Oi=de(Qe.length),Vi=function(Se){Ce||(Pt==null||Pt({key:b,domEvent:Se}),jt==="inline"&&ke(b,!Me))},hi=G(function(Be){Zt==null||Zt(Tt(Be)),we(Be)}),yi=function(Se){jt!=="inline"&&ke(b,Se)},Ci=function(){Ee(b)},bi=Jt&&"".concat(Jt,"-popup"),ui=l.createElement("div",(0,c.Z)({role:"menuitem",style:Oi,className:"".concat(ae,"-title"),tabIndex:Ce?null:-1,ref:li,title:typeof S=="string"?S:null,"data-menu-id":oe&&Jt?null:Jt,"aria-expanded":je,"aria-haspopup":!0,"aria-controls":bi,"aria-disabled":Ce,onClick:Vi,onFocus:Ci},ji),S,l.createElement(ee,{icon:jt!=="horizontal"?ne:void 0,props:(0,L.Z)((0,L.Z)({},v),{},{isOpen:je,isSubMenu:!0})},l.createElement("i",{className:"".concat(ae,"-arrow")}))),be=l.useRef(jt);if(jt!=="inline"&&Qe.length>1?be.current="vertical":be.current=jt,!oe){var di=be.current;ui=l.createElement(Ni,{mode:di,prefixCls:ae,visible:!rt&&je&&jt!=="inline",popupClassName:zt,popupOffset:Ot,popupStyle:Kt,popup:l.createElement(R,{mode:di==="horizontal"?"vertical":di},l.createElement(Ve,{id:bi,ref:qe},Lt)),disabled:Ce,onVisibleChange:yi},ui)}var ii=l.createElement(_.Z.Item,(0,c.Z)({role:"none"},Nt,{component:"li",style:B,className:ot()(ae,"".concat(ae,"-").concat(jt),C,(w={},(0,h.Z)(w,"".concat(ae,"-open"),je),(0,h.Z)(w,"".concat(ae,"-active"),gi),(0,h.Z)(w,"".concat(ae,"-selected"),Mi),(0,h.Z)(w,"".concat(ae,"-disabled"),Ce),w)),onMouseEnter:Ie,onMouseLeave:Zi}),ui,!oe&&l.createElement(ni,{id:bi,open:je,keyPath:Qe},Lt));return Ye&&(ii=Ye(ii,v,{selected:Mi,active:gi,open:je,disabled:Ce})),l.createElement(R,{onItemClick:hi,mode:jt==="horizontal"?"vertical":jt,itemIcon:ti,expandIcon:ne},ii)};function Ue(g){var v=g.eventKey,w=g.children,B=A(v),C=Ne(w,B),S=x();l.useEffect(function(){if(S)return S.registerPath(v,B),function(){S.unregisterPath(v,B)}},[B]);var b;return S?b=C:b=l.createElement(ve,g,C),l.createElement(j.Provider,{value:B},b)}var zi=a(76190),De=["className","title","eventKey","children"],pi=["children"],si=function(v){var w=v.className,B=v.title,C=v.eventKey,S=v.children,b=(0,f.Z)(v,De),N=l.useContext(W),ct=N.prefixCls,rt="".concat(ct,"-item-group");return l.createElement("li",(0,c.Z)({role:"presentation"},b,{onClick:function(xt){return xt.stopPropagation()},className:ot()(rt,w)}),l.createElement("div",{role:"presentation",className:"".concat(rt,"-title"),title:typeof B=="string"?B:void 0},B),l.createElement("ul",{role:"group",className:"".concat(rt,"-list")},S))};function fi(g){var v=g.children,w=(0,f.Z)(g,pi),B=A(w.eventKey),C=Ne(v,B),S=x();return S?C:l.createElement(si,(0,Ft.Z)(w,["warnKey"]),C)}function Ae(g){var v=g.className,w=g.style,B=l.useContext(W),C=B.prefixCls,S=x();return S?null:l.createElement("li",{role:"separator",className:ot()("".concat(C,"-item-divider"),v),style:w})}var Hi=["label","children","key","type"];function ai(g){return(g||[]).map(function(v,w){if(v&&(0,zi.Z)(v)==="object"){var B=v,C=B.label,S=B.children,b=B.key,N=B.type,ct=(0,f.Z)(B,Hi),rt=b!=null?b:"tmp-".concat(w);return S||N==="group"?N==="group"?l.createElement(fi,(0,c.Z)({key:rt},ct,{title:C}),ai(S)):l.createElement(Ue,(0,c.Z)({key:rt},ct,{title:C}),ai(S)):N==="divider"?l.createElement(Ae,(0,c.Z)({key:rt},ct)):l.createElement(fe,(0,c.Z)({key:rt},ct),C)}return null}).filter(function(v){return v})}function Wi(g,v,w){var B=g;return v&&(B=ai(v)),Ne(B,w)}var _i=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],ze=[],mi=l.forwardRef(function(g,v){var w,B,C=g,S=C.prefixCls,b=S===void 0?"rc-menu":S,N=C.rootClassName,ct=C.style,rt=C.className,Lt=C.tabIndex,xt=Lt===void 0?0:Lt,At=C.items,zt=C.children,Ot=C.direction,Kt=C.id,Zt=C.mode,Ut=Zt===void 0?"vertical":Zt,Rt=C.inlineCollapsed,Pt=C.disabled,Et=C.disabledOverflow,Wt=C.subMenuOpenDelay,Nt=Wt===void 0?.1:Wt,Jt=C.subMenuCloseDelay,Ht=Jt===void 0?.1:Jt,xe=C.forceSubMenuRender,jt=C.defaultOpenKeys,ce=C.openKeys,te=C.activeKey,oe=C.defaultActiveFirst,ge=C.selectable,ye=ge===void 0?!0:ge,$e=C.multiple,se=$e===void 0?!1:$e,we=C.defaultSelectedKeys,ke=C.selectedKeys,Ee=C.onSelect,Xe=C.onDeselect,Ye=C.inlineIndent,_e=Ye===void 0?24:Ye,Je=C.motion,Qe=C.defaultMotions,ae=C.triggerSubMenuAction,Ce=ae===void 0?"hover":ae,li=C.builtinPlacements,qe=C.itemIcon,ti=C.expandIcon,ne=C.overflowedIndicator,Me=ne===void 0?"...":ne,je=C.overflowedIndicatorPopupClassName,Mi=C.getPopupContainer,ci=C.onClick,ei=C.onOpenChange,ji=C.onKeyDown,Qi=C.openAnimation,Fi=C.openTransitionName,vi=C._internalRenderMenuItem,Ii=C._internalRenderSubMenuItem,Bi=(0,f.Z)(C,_i),Ie=l.useMemo(function(){return Wi(zt,At,ze)},[zt,At]),Zi=l.useState(!1),gi=(0,y.Z)(Zi,2),Oi=gi[0],Vi=gi[1],hi=l.useRef(),yi=wt(Kt),Ci=Ot==="rtl",bi=(0,F.Z)(jt,{value:ce,postState:function(Dt){return Dt||ze}}),ui=(0,y.Z)(bi,2),be=ui[0],di=ui[1],ii=function(Dt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function he(){di(Dt),ei==null||ei(Dt)}_t?(0,K.flushSync)(he):he()},Be=l.useState(be),Se=(0,y.Z)(Be,2),fo=Se[0],mo=Se[1],Gi=l.useRef(!1),vo=l.useMemo(function(){return(Ut==="inline"||Ut==="vertical")&&Rt?["vertical",Rt]:[Ut,!1]},[Ut,Rt]),qi=(0,y.Z)(vo,2),Ti=qi[0],Ki=qi[1],to=Ti==="inline",go=l.useState(Ti),eo=(0,y.Z)(go,2),Fe=eo[0],yo=eo[1],Co=l.useState(Ki),io=(0,y.Z)(Co,2),bo=io[0],So=io[1];l.useEffect(function(){yo(Ti),So(Ki),Gi.current&&(to?di(fo):ii(ze))},[Ti,Ki]);var xo=l.useState(0),oo=(0,y.Z)(xo,2),Ri=oo[0],wo=oo[1],Ui=Ri>=Ie.length-1||Fe!=="horizontal"||Et;l.useEffect(function(){to&&mo(be)},[be]),l.useEffect(function(){return Gi.current=!0,function(){Gi.current=!1}},[]);var oi=V(),no=oi.registerPath,ro=oi.unregisterPath,ko=oi.refreshOverflowKeys,so=oi.isSubPathKey,Eo=oi.getKeyPath,ao=oi.getKeys,Po=oi.getSubPathKeys,Mo=l.useMemo(function(){return{registerPath:no,unregisterPath:ro}},[no,ro]),Io=l.useMemo(function(){return{isSubPathKey:so}},[so]);l.useEffect(function(){ko(Ui?ze:Ie.slice(Ri+1).map(function(Vt){return Vt.key}))},[Ri,Ui]);var Bo=(0,F.Z)(te||oe&&((w=Ie[0])===null||w===void 0?void 0:w.key),{value:te}),lo=(0,y.Z)(Bo,2),Si=lo[0],Xi=lo[1],Oo=G(function(Vt){Xi(Vt)}),To=G(function(){Xi(void 0)});(0,l.useImperativeHandle)(v,function(){return{list:hi.current,focus:function(Dt){var _t,he=ao(),ue=n(he,yi),$i=ue.elements,Yi=ue.key2element,_o=ue.element2key,uo=t(hi.current,$i),po=Si!=null?Si:uo[0]?_o.get(uo[0]):(_t=Ie.find(function(jo){return!jo.props.disabled}))===null||_t===void 0?void 0:_t.key,xi=Yi.get(po);if(po&&xi){var Ji;xi==null||(Ji=xi.focus)===null||Ji===void 0||Ji.call(xi,Dt)}}}});var Ro=(0,F.Z)(we||[],{value:ke,postState:function(Dt){return Array.isArray(Dt)?Dt:Dt==null?ze:[Dt]}}),co=(0,y.Z)(Ro,2),Di=co[0],Do=co[1],$o=function(Dt){if(ye){var _t=Dt.key,he=Di.includes(_t),ue;se?he?ue=Di.filter(function(Yi){return Yi!==_t}):ue=[].concat((0,it.Z)(Di),[_t]):ue=[_t],Do(ue);var $i=(0,L.Z)((0,L.Z)({},Dt),{},{selectedKeys:ue});he?Xe==null||Xe($i):Ee==null||Ee($i)}!se&&be.length&&Fe!=="inline"&&ii(ze)},Lo=G(function(Vt){ci==null||ci(Tt(Vt)),$o(Vt)}),ho=G(function(Vt,Dt){var _t=be.filter(function(ue){return ue!==Vt});if(Dt)_t.push(Vt);else if(Fe!=="inline"){var he=Po(Vt);_t=_t.filter(function(ue){return!he.has(ue)})}(0,Z.Z)(be,_t,!0)||ii(_t,!0)}),No=function(Dt,_t){var he=_t!=null?_t:!be.includes(Dt);ho(Dt,he)},Ao=e(Fe,Si,Ci,yi,hi,ao,Eo,Xi,No,ji);l.useEffect(function(){Vi(!0)},[]);var zo=l.useMemo(function(){return{_internalRenderMenuItem:vi,_internalRenderSubMenuItem:Ii}},[vi,Ii]),Ho=Fe!=="horizontal"||Et?Ie:Ie.map(function(Vt,Dt){return l.createElement(R,{key:Vt.key,overflowDisabled:Dt>Ri},Vt)}),Wo=l.createElement(_.Z,(0,c.Z)({id:Kt,ref:hi,prefixCls:"".concat(b,"-overflow"),component:"ul",itemComponent:fe,className:ot()(b,"".concat(b,"-root"),"".concat(b,"-").concat(Fe),rt,(B={},(0,h.Z)(B,"".concat(b,"-inline-collapsed"),bo),(0,h.Z)(B,"".concat(b,"-rtl"),Ci),B),N),dir:Ot,style:ct,role:"menu",tabIndex:xt,data:Ho,renderRawItem:function(Dt){return Dt},renderRawRest:function(Dt){var _t=Dt.length,he=_t?Ie.slice(-_t):null;return l.createElement(Ue,{eventKey:E,title:Me,disabled:Ui,internalPopupClose:_t===0,popupClassName:je},he)},maxCount:Fe!=="horizontal"||Et?_.Z.INVALIDATE:_.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Dt){wo(Dt)},onKeyDown:Ao},Bi));return l.createElement(Y.Provider,{value:zo},l.createElement(ht.Provider,{value:yi},l.createElement(R,{prefixCls:b,rootClassName:N,mode:Fe,openKeys:be,rtl:Ci,disabled:Pt,motion:Oi?Je:null,defaultMotions:Oi?Qe:null,activeKey:Si,onActive:Oo,onInactive:To,selectedKeys:Di,inlineIndent:_e,subMenuOpenDelay:Nt,subMenuCloseDelay:Ht,forceSubMenuRender:xe,builtinPlacements:li,triggerSubMenuAction:Ce,getPopupContainer:Mi,itemIcon:qe,expandIcon:ti,onItemClick:Lo,onOpenChange:ho},l.createElement(Q.Provider,{value:Io},Wo),l.createElement("div",{style:{display:"none"},"aria-hidden":!0},l.createElement(k.Provider,{value:Mo},Ie)))))}),Pi=mi,He=Pi;He.Item=fe,He.SubMenu=Ue,He.ItemGroup=fi,He.Divider=Ae;var We=He},83836:function(Xt,ft,a){a.d(ft,{Z:function(){return D}});var c=a(54476),h=a(33885),L=a(42978),it=a(75931),y=a(59301),f=a(92310),et=a.n(f),ot=a(29301),_=a(34280),F=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Z=void 0;function M(p,m){var J=p.prefixCls,X=p.invalidate,z=p.item,q=p.renderItem,nt=p.responsive,dt=p.responsiveDisabled,vt=p.registerSize,bt=p.itemKey,gt=p.className,pt=p.style,mt=p.children,$t=p.display,Mt=p.order,r=p.component,i=r===void 0?"div":r,t=(0,it.Z)(p,F),o=nt&&!$t;function n(I){vt(bt,I)}y.useEffect(function(){return function(){n(null)}},[]);var e=q&&z!==Z?q(z,{index:Mt}):mt,s;X||(s={opacity:o?0:1,height:o?0:Z,overflowY:o?"hidden":Z,order:nt?Mt:Z,pointerEvents:o?"none":Z,position:o?"absolute":Z});var u={};o&&(u["aria-hidden"]=!0);var P=y.createElement(i,(0,c.Z)({className:et()(!X&&J,gt),style:(0,h.Z)((0,h.Z)({},s),pt)},u,t,{ref:m}),e);return nt&&(P=y.createElement(ot.Z,{onResize:function(E){var V=E.offsetWidth;n(V)},disabled:dt},P)),P}var l=y.forwardRef(M);l.displayName="Item";var K=l,ht=a(6089),U=a(4676),at=a(16089);function T(p){if(typeof MessageChannel=="undefined")(0,at.Z)(p);else{var m=new MessageChannel;m.port1.onmessage=function(){return p()},m.port2.postMessage(void 0)}}function ut(){var p=y.useRef(null),m=function(X){p.current||(p.current=[],T(function(){(0,U.unstable_batchedUpdates)(function(){p.current.forEach(function(z){z()}),p.current=null})})),p.current.push(X)};return m}function W(p,m){var J=y.useState(m),X=(0,L.Z)(J,2),z=X[0],q=X[1],nt=(0,ht.Z)(function(dt){p(function(){q(dt)})});return[z,nt]}var tt=y.createContext(null),R=["component"],$=["className"],k=["className"],x=function(m,J){var X=y.useContext(tt);if(!X){var z=m.component,q=z===void 0?"div":z,nt=(0,it.Z)(m,R);return y.createElement(q,(0,c.Z)({},nt,{ref:J}))}var dt=X.className,vt=(0,it.Z)(X,$),bt=m.className,gt=(0,it.Z)(m,k);return y.createElement(tt.Provider,{value:null},y.createElement(K,(0,c.Z)({ref:J,className:et()(dt,bt)},vt,gt)))},j=y.forwardRef(x);j.displayName="RawItem";var A=j,Q=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],H="responsive",Y="invalidate";function st(p){return"+ ".concat(p.length," ...")}function St(p,m){var J=p.prefixCls,X=J===void 0?"rc-overflow":J,z=p.data,q=z===void 0?[]:z,nt=p.renderItem,dt=p.renderRawItem,vt=p.itemKey,bt=p.itemWidth,gt=bt===void 0?10:bt,pt=p.ssr,mt=p.style,$t=p.className,Mt=p.maxCount,r=p.renderRest,i=p.renderRawRest,t=p.prefix,o=p.suffix,n=p.component,e=n===void 0?"div":n,s=p.itemComponent,u=p.onVisibleChange,P=(0,it.Z)(p,Q),I=pt==="full",E=ut(),V=W(E,null),G=(0,L.Z)(V,2),lt=G[0],It=G[1],wt=lt||0,Bt=W(E,new Map),yt=(0,L.Z)(Bt,2),Ct=yt[0],kt=yt[1],Ft=W(E,0),Yt=(0,L.Z)(Ft,2),Qt=Yt[0],de=Yt[1],ee=W(E,0),qt=(0,L.Z)(ee,2),Tt=qt[0],ie=qt[1],Pe=W(E,0),pe=(0,L.Z)(Pe,2),Le=pe[0],Oe=pe[1],Te=W(E,0),fe=(0,L.Z)(Te,2),me=fe[0],Ze=fe[1],le=(0,y.useState)(null),Ve=(0,L.Z)(le,2),Ge=Ve[0],Ne=Ve[1],Re=(0,y.useState)(null),Gt=(0,L.Z)(Re,2),re=Gt[0],Li=Gt[1],Ke=y.useMemo(function(){return re===null&&I?Number.MAX_SAFE_INTEGER:re||0},[re,lt]),wi=(0,y.useState)(!1),ki=(0,L.Z)(wi,2),Ni=ki[0],Ai=ki[1],ni="".concat(X,"-item"),Ei=Math.max(Qt,Tt),ri=Mt===H,ve=q.length&&ri,Ue=Mt===Y,zi=ve||typeof Mt=="number"&&q.length>Mt,De=(0,y.useMemo)(function(){var S=q;return ve?lt===null&&I?S=q:S=q.slice(0,Math.min(q.length,wt/gt)):typeof Mt=="number"&&(S=q.slice(0,Mt)),S},[q,gt,lt,Mt,ve]),pi=(0,y.useMemo)(function(){return ve?q.slice(Ke+1):q.slice(De.length)},[q,De,ve,Ke]),si=(0,y.useCallback)(function(S,b){var N;return typeof vt=="function"?vt(S):(N=vt&&(S==null?void 0:S[vt]))!==null&&N!==void 0?N:b},[vt]),fi=(0,y.useCallback)(nt||function(S){return S},[nt]);function Ae(S,b,N){re===S&&(b===void 0||b===Ge)||(Li(S),N||(Ai(S<q.length-1),u==null||u(S)),b!==void 0&&Ne(b))}function Hi(S,b){It(b.clientWidth)}function ai(S,b){kt(function(N){var ct=new Map(N);return b===null?ct.delete(S):ct.set(S,b),ct})}function Wi(S,b){ie(b),de(Tt)}function _i(S,b){Oe(b)}function ze(S,b){Ze(b)}function mi(S){return Ct.get(si(De[S],S))}(0,_.Z)(function(){if(wt&&typeof Ei=="number"&&De){var S=Le+me,b=De.length,N=b-1;if(!b){Ae(0,null);return}for(var ct=0;ct<b;ct+=1){var rt=mi(ct);if(I&&(rt=rt||0),rt===void 0){Ae(ct-1,void 0,!0);break}if(S+=rt,N===0&&S<=wt||ct===N-1&&S+mi(N)<=wt){Ae(N,null);break}else if(S+Ei>wt){Ae(ct-1,S-rt-me+Tt);break}}o&&mi(0)+me>wt&&Ne(null)}},[wt,Ct,Tt,Le,me,si,De]);var Pi=Ni&&!!pi.length,He={};Ge!==null&&ve&&(He={position:"absolute",left:Ge,top:0});var We={prefixCls:ni,responsive:ve,component:s,invalidate:Ue},g=dt?function(S,b){var N=si(S,b);return y.createElement(tt.Provider,{key:N,value:(0,h.Z)((0,h.Z)({},We),{},{order:b,item:S,itemKey:N,registerSize:ai,display:b<=Ke})},dt(S,b))}:function(S,b){var N=si(S,b);return y.createElement(K,(0,c.Z)({},We,{order:b,key:N,item:S,renderItem:fi,itemKey:N,registerSize:ai,display:b<=Ke}))},v={order:Pi?Ke:Number.MAX_SAFE_INTEGER,className:"".concat(ni,"-rest"),registerSize:Wi,display:Pi},w=r||st,B=i?y.createElement(tt.Provider,{value:(0,h.Z)((0,h.Z)({},We),v)},i(pi)):y.createElement(K,(0,c.Z)({},We,v),typeof w=="function"?w(pi):w),C=y.createElement(e,(0,c.Z)({className:et()(!Ue&&X,$t),style:mt,ref:m},P),t&&y.createElement(K,(0,c.Z)({},We,{responsive:ri,responsiveDisabled:!ve,order:-1,className:"".concat(ni,"-prefix"),registerSize:_i,display:!0}),t),De.map(g),zi?B:null,o&&y.createElement(K,(0,c.Z)({},We,{responsive:ri,responsiveDisabled:!ve,order:Ke,className:"".concat(ni,"-suffix"),registerSize:ze,display:!0,style:He}),o));return ri?y.createElement(ot.Z,{onResize:Hi,disabled:!ve},C):C}var d=y.forwardRef(St);d.displayName="Overflow",d.Item=A,d.RESPONSIVE=H,d.INVALIDATE=Y;var O=d,D=O}}]);