@a2simcode/dui 0.0.58 → 0.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dui.css +1 -1
- package/dist/dui.es.js +33 -31
- package/dist/dui.umd.js +2 -2
- package/package.json +4 -4
package/dist/dui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ne,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("@a2simcode/ui")):typeof define=="function"&&define.amd?define(["exports","vue","@a2simcode/ui"],o):(ne=typeof globalThis<"u"?globalThis:ne||self,o(ne.DuiUI={},ne.Vue,ne.SimCodeUI))})(this,function(ne,o,me){Object.defineProperties(ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var bu=Object.create,ur=Object.defineProperty,Hu=Object.getOwnPropertyDescriptor,Iu=Object.getOwnPropertyNames,_u=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty,xu=(e,A)=>()=>(A||(e((A={exports:{}}).exports,A),e=null),A.exports),Du=(e,A)=>{let t={};for(var n in e)ur(t,n,{get:e[n],enumerable:!0});return A||ur(t,Symbol.toStringTag,{value:"Module"}),t},ko=(e,A,t,n)=>{if(A&&typeof A=="object"||typeof A=="function")for(var r=Iu(A),a=0,u=r.length,d;a<u;a++)d=r[a],!Su.call(e,d)&&d!==t&&ur(e,d,{get:(g=>A[g]).bind(null,d),enumerable:!(n=Hu(A,d))||n.enumerable});return e},Nu=(e,A,t)=>(ko(e,A,"default"),t&&ko(t,A,"default")),Bs=(e,A,t)=>(t=e!=null?bu(_u(e)):{},ko(A||!e||!e.__esModule?ur(t,"default",{value:e,enumerable:!0}):t,e));o=Bs(o,1);var dt=(e,A)=>(e.install=t=>{t.component(e.name,e),A&&A.forEach(n=>{t.component(n.name,n)})},e),ft=(e="")=>{const A=Date.now(),t=Math.floor(Math.random()*1e9);return e===""?String(t)+String(A):e+"_"+t+String(A)},zt=e=>{if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(zt);const A={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=zt(e[t]));return A},Lu=e=>{if(Array.isArray(e))e.length=0;else if(e&&typeof e=="object")for(const A in e)Object.prototype.hasOwnProperty.call(e,A)&&delete e[A]},Mo={},Tu=(e,A,t)=>{t[e]=t[e]||{};const n=ft();return t[e][n]=A,n},ku=(e,A,t)=>{const n=[],r=t[e]||{};return Object.keys(r).forEach(a=>{const u=r[a];try{u&&n.push(u(A))}catch(d){console.error(d)}}),n},Mu=(e,A,t)=>{if(A){const n=t[e];n&&delete n[A]}else delete t[e]},ps=(e,A)=>Tu(e,A,Mo),re=(e,A)=>ku(e,A,Mo),Ou=(e,A)=>{Mu(e,A,Mo)},ms=(e,A,t,n,r,a)=>{const u=A.id,d=A.level,{getDesignLocals:g,selectComponent:h,getComponent:B,isMyChildComponent:w,addComponent:m,deleteComponent:v,getParentComponents:y,removeComponentFromContainer:I,addComponentToContainer:L,copyComponent:T,activedComponent:K,top:b}=(0,o.inject)("d-drag-design-provide",{}),O=[],aA=(0,o.ref)(!1),Z=(0,o.ref)(!1),cA=(0,o.ref)(!1),lA=(0,o.ref)(!1),iA=(0,o.ref)(!1),oA={id:"",type:""},tA=(0,o.ref)(!1),x=(0,o.ref)(!1);let eA="",H=null;const X=J=>{if(eA===J)return H;eA=J;const{top:uA,left:wA,width:QA,height:_A}=e.value.getBoundingClientRect();return H=[{x:wA,y:uA},{x:wA+QA,y:uA},{x:wA+QA,y:uA+_A},{x:wA,y:uA+_A}],H},F=(J,uA,wA)=>{let QA=uA-wA[0].y;QA<0&&(QA=-QA);let _A=uA-wA[3].y;_A<0&&(_A=-_A);let gA=J-wA[0].x;gA<0&&(gA=-gA);let j=J-wA[1].x;return j<0&&(j=-j),{ly:QA>_A?_A:QA,typey:QA>_A?"bottom":"top",lx:gA>j?j:gA,lallx:gA+j}},D=(J,uA,wA)=>J>=wA[0].x&&J<=wA[1].x&&uA>=wA[0].y&&uA<=wA[3].y,k=()=>{if(r){re("dragClick",{id:u});return}if(!Z.value){if(h(u),d!==0){const J=e.value.getBoundingClientRect(),uA=g();J.top-uA.top<22?lA.value=!0:lA.value=!1}Z.value=!0,re("dragClick",{id:u})}},N=J=>{const uA=v(J);uA&&(0,o.nextTick)(()=>{re("dragClick",{id:uA})})},R=()=>{oA.id="",oA.type="",d===0&&(iA.value=!1)},$=()=>{re("mouseEnterOrLeave",{id:u,type:"enter"})},nA=()=>{re("mouseEnterOrLeave",{id:u,type:"leave"})},BA=J=>{re("dragClick",{id:J})},FA={mouseEnterOrLeave:({id:J,type:uA})=>{uA==="enter"?O.push(J):O.length>0&&O.splice(O.length-1,1);const wA=O.length;wA>0&&u===O[wA-1]?aA.value=!0:aA.value=!1},dragAciveChild:({type:J,id:uA})=>{uA===u?J==="top"?(tA.value=!0,x.value=!1):(x.value=!0,tA.value=!1):(x.value=!1,tA.value=!1)},dragClick({id:J,isAgain:uA}){J!==u?Z.value=!1:(uA&&(Z.value=!1),k())}};FA[`dragGetChildDistance_${u}`]=({dragX:J,dragY:uA,moveId:wA})=>F(J,uA,X(wA));const sA={isInContainer({x:J,y:uA,id:wA,moveId:QA}){if(u===wA||w(wA,u))return cA.value=!1,{isIn:!1,level:d,id:u,groupId:a};const _A=X(QA);if(D(J,uA,_A))return d===0&&(iA.value=!0),{isIn:!0,level:d,id:u,groupId:a};if(d===0){const{ly:gA,lx:j}=F(J,uA,_A);if(gA<20&&j<20)return iA.value=!0,{isIn:!0,level:d,id:u,groupId:a};iA.value=!1}return cA.value=!1,{isIn:!1,level:d,id:u,groupId:a}},dragActiveContainer:({containerId:J,containerGroupId:uA,dragX:wA,dragY:QA,moveId:_A})=>{if(J===u&&uA===a)if(cA.value=!0,n&&n.value.length>0){let gA={ly:9999999,lx:0,lallx:0,id:"",typey:""};n?.value.forEach(j=>{if(a&&j.groupId!==a)return;const _=re(`dragGetChildDistance_${j.id}`,{dragX:wA,dragY:QA,moveId:_A})[0];_&&(gA.ly>_.ly||gA.ly===_.ly&&(gA.lx>_.lx||gA.lx===_.lx&&gA.lallx>_.lallx))&&(gA=_,gA.id=j.id)}),oA.id=gA.id,oA.type=gA.typey,re("dragAciveChild",{id:gA.id,type:gA.typey})}else re("dragAciveChild",{id:""});else cA.value=!1},dragAdd:J=>{if(cA.value){let uA=n?.value.length||0;oA.id!==""&&oA.id!==void 0&&(uA=n?.value.findIndex(wA=>wA.id===oA.id)||0,oA.type==="bottom"&&(uA+=1)),m(J,u,uA,a),cA.value=!1}R()},dragAddByClick:J=>{if(!K.value&&u===b.id||K.value?.id===u||K.value?.containerId===u&&K.value?.dragType!=="container"){const uA=m(J,u,n?.value.length||0,a,!0);uA&&J.config&&Object.keys(J.config).forEach(wA=>{uA.config[wA]=J.config[wA]})}},dragUpdate(J){if(cA.value){const uA=B(J);if(uA.level=d+1,oA.id!==uA.id){I(uA.containerId,J);let wA=n?.value.findIndex(QA=>QA.id===oA.id)||0;oA.type==="bottom"&&(wA+=1),L(uA,u,wA,a)}cA.value=!1,(0,o.nextTick)(()=>{re("dragClick",{id:uA.id,isAgain:!0})})}R()}},Y={};return(0,o.onMounted)(()=>{(!r||t!=="container")&&Object.keys(FA).forEach(J=>{Y[J]=ps(J,FA[J])}),t==="container"&&Object.keys(sA).forEach(J=>{Y[J]=ps(J,sA[J])}),A.isNewAdd&&(0,o.nextTick)(()=>{k(),delete A.isNewAdd})}),(0,o.onUnmounted)(()=>{Object.keys(Y).forEach(J=>{Ou(J,Y[J])})}),{onMouseenter:$,onMouseleave:nA,activeComponent:k,handleComponentClick:BA,deleteComponentByClick:N,copyComponent:T,getParentComponents:y,isBottomToolBar:lA,isHover:aA,isSelect:Z,isToContainer:cA,isMoveingInTopLevel:iA,isTopActive:tA,isBottomActive:x}},ws=(e,A)=>{const t={x:0,y:0,clientX:0,clientY:0,dragElement:null,dragElementId:"jcode-darg-move-id",toContainerLevel:-1,toContainerId:"",groupId:"",id:""};let n=!1;const r=(v,y)=>{n!==!0&&(n=!0,setTimeout(()=>{v(),n=!1},y))},a=(0,o.ref)(!1),u=(v,y,I)=>{const L=document.createElement("div");return L.id=t.dragElementId,L.innerText=v,L.className="d-drag-move",L.style.top=`${y}px`,L.style.left=`${I}px`,document.body.appendChild(L),L},d=()=>{document.onmousemove=null,document.onmouseup=null,a.value=!1,re("dragAciveChild",{id:""})},g=()=>{d(),t.dragElement&&(t.dragElement.remove(),t.dragElement=null,A?re("dragAdd",e):re("dragUpdate",e.id))},h=v=>{const{clientY:y,clientX:I}=v;if(!t.dragElement){const L=Math.abs(t.x-I),T=Math.abs(t.y-y);if(L<=1&&T<=1)return;a.value=!0,t.dragElement=u(e.name,y-11,I-32)}t.dragElement.style.top=`${y-11}px`,t.dragElement.style.left=`${I-32}px`,t.clientX=I,t.clientY=y,r(()=>{if(!a.value)return;const L=re("isInContainer",{x:I,y,id:e.id,moveId:t.id});t.toContainerLevel=-1,t.toContainerId="",t.groupId="",L.forEach(({level:T,id:K,isIn:b,groupId:O})=>{b&&t.toContainerLevel<T&&(t.toContainerLevel=T,t.toContainerId=K,t.groupId=O)}),t.toContainerId!==""?re("dragActiveContainer",{containerId:t.toContainerId,containerGroupId:t.groupId,dragX:I,dragY:y,moveId:t.id}):re("dragAciveChild",{id:""})},100)};return{onContextmenu:()=>{d()},onMousedown:v=>{t.x=v.clientX,t.y=v.clientY,t.id=ft(),document.onmouseup=g,document.onmousemove=h},onClick:()=>{re("dragAddByClick",e)},moveActive:a}},Ku={class:"d-drag-btns-pname"},Ru={key:0,class:"d-drag-mask"},Vu=(0,o.defineComponent)({name:"DDrag",__name:"drag",props:{componentData:{default:()=>({})},isContainer:{type:Boolean,default:!1}},setup(e){const A=e,t=(0,o.ref)(),{onMouseenter:n,onMouseleave:r,activeComponent:a,handleComponentClick:u,deleteComponentByClick:d,copyComponent:g,getParentComponents:h,isHover:B,isSelect:w,isTopActive:m,isBottomActive:v,isBottomToolBar:y}=ms(t,A.componentData,"component"),{onContextmenu:I,onMousedown:L,moveActive:T}=ws(A.componentData,!1);return(K,b)=>{const O=(0,o.resolveComponent)("j-button"),aA=(0,o.resolveComponent)("el-space");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(["d-drag-component",{selected:(0,o.unref)(w),hovered:(0,o.unref)(B),isBottomToolBar:(0,o.unref)(y),active:(0,o.unref)(T),isTopActive:(0,o.unref)(m),isBottomActive:(0,o.unref)(v)}])},[b[11]||(b[11]=(0,o.createElementVNode)("div",{class:"d-drag-line"},null,-1)),(0,o.createElementVNode)("div",{class:"d-drag-btns",onMouseenter:b[4]||(b[4]=(...Z)=>(0,o.unref)(n)&&(0,o.unref)(n)(...Z)),onMouseleave:b[5]||(b[5]=(...Z)=>(0,o.unref)(r)&&(0,o.unref)(r)(...Z))},[(0,o.createVNode)(aA,{size:4},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("div",{class:"d-drag-btns-names",onClick:(0,o.withModifiers)(()=>{},["stop"])},[(0,o.createVNode)(O,{class:"d-drag-btn",type:"primary",size:"small",label:e.componentData.name},null,8,["label"]),(0,o.createElementVNode)("div",Ku,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)((0,o.unref)(h)(e.componentData.containerId),Z=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:Z.id},[(0,o.createVNode)(O,{class:"d-drag-btn",type:"primary",size:"small",label:Z.name,onClick:cA=>(0,o.unref)(u)(Z.id)},null,8,["label","onClick"])]))),128))])]),(0,o.createVNode)(O,{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:content-copy",onClick:b[0]||(b[0]=(0,o.withModifiers)(Z=>(0,o.unref)(g)(e.componentData.id),["stop"]))}),(0,o.createElementVNode)("div",{onContextmenu:b[1]||(b[1]=(0,o.withModifiers)((...Z)=>(0,o.unref)(I)&&(0,o.unref)(I)(...Z),["stop"])),onMousedown:b[2]||(b[2]=(0,o.withModifiers)((...Z)=>(0,o.unref)(L)&&(0,o.unref)(L)(...Z),["stop"])),style:{display:"flex"}},[(0,o.createVNode)(O,{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:drag"})],32),(0,o.createVNode)(O,{class:"d-drag-btn",danger:"",type:"primary",size:"small",icon:"mdi:delete",onClick:b[3]||(b[3]=(0,o.withModifiers)(Z=>(0,o.unref)(d)(e.componentData.id),["stop"]))})]),_:1})],32),(0,o.createElementVNode)("div",{ref_key:"refDrag",ref:t,class:"d-drag-body",onClick:b[6]||(b[6]=(0,o.withModifiers)((...Z)=>(0,o.unref)(a)&&(0,o.unref)(a)(...Z),["stop"])),onContextmenu:b[7]||(b[7]=(0,o.withModifiers)((...Z)=>(0,o.unref)(I)&&(0,o.unref)(I)(...Z),["stop"])),onMousedown:b[8]||(b[8]=(0,o.withModifiers)((...Z)=>(0,o.unref)(L)&&(0,o.unref)(L)(...Z),["stop"])),onMouseenter:b[9]||(b[9]=(...Z)=>(0,o.unref)(n)&&(0,o.unref)(n)(...Z)),onMouseleave:b[10]||(b[10]=(...Z)=>(0,o.unref)(r)&&(0,o.unref)(r)(...Z))},[(0,o.renderSlot)(K.$slots,"default"),e.isContainer?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Ru))],544)],2)}}}),Oo=Vu,Pu=(0,o.defineComponent)({name:"DDragTool",__name:"tool",props:{config:{}},setup(e){const{onContextmenu:A,onMousedown:t,onClick:n}=ws(e.config??{name:"",id:""},!0);return(r,a)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"d-drag-tool",onClick:a[0]||(a[0]=(0,o.withModifiers)((...u)=>(0,o.unref)(n)&&(0,o.unref)(n)(...u),["stop"])),onContextmenu:a[1]||(a[1]=(0,o.withModifiers)((...u)=>(0,o.unref)(A)&&(0,o.unref)(A)(...u),["stop"])),onMousedown:a[2]||(a[2]=(0,o.withModifiers)((...u)=>(0,o.unref)(t)&&(0,o.unref)(t)(...u),["stop"]))},[(0,o.renderSlot)(r.$slots,"default")],32))}}),Ko=Pu,Gu={key:0,class:"d-drag-line"},zu={key:1,class:"d-drag-btns"},Xu=(0,o.defineComponent)({name:"DDragContainer",__name:"container",props:{componentData:{default:()=>({})},isComponentContainer:{type:Boolean,default:!0},groupId:{default:void 0}},setup(e){const A=e,t=(0,o.ref)(),n=(0,o.computed)(()=>A.componentData?.children||[]),{onMouseenter:r,onMouseleave:a,activeComponent:u,isHover:d,isSelect:g,isToContainer:h,isMoveingInTopLevel:B,isTopActive:w,isBottomActive:m}=ms(t,A.componentData,"container",n,A.isComponentContainer,A.groupId),v=(0,o.computed)(()=>!!(n.value.findIndex(y=>y.groupId===A.groupId)===-1&&h.value));return(y,I)=>{const L=(0,o.resolveComponent)("j-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{ref_key:"refDrag",ref:t,class:(0,o.normalizeClass)(["d-drag-container",{selected:(0,o.unref)(g)&&!e.isComponentContainer,hovered:(0,o.unref)(d)&&!e.isComponentContainer,isTopLevel:e.componentData.level===0,active:v.value,isMoveingInTopLevel:(0,o.unref)(B),isTopActive:(0,o.unref)(w),isBottomActive:(0,o.unref)(m)}])},[e.isComponentContainer?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Gu)),e.isComponentContainer?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",zu,[(0,o.createElementVNode)("div",{class:"d-drag-btns-names",onClick:(0,o.withModifiers)(()=>{},["stop"])},[(0,o.createVNode)(L,{class:"d-drag-btn",type:"primary",size:"small",label:e.componentData.name},null,8,["label"])])])),(0,o.createElementVNode)("div",{class:"d-drag-body",onClick:I[0]||(I[0]=(0,o.withModifiers)((...T)=>(0,o.unref)(u)&&(0,o.unref)(u)(...T),["stop"])),onMouseenter:I[1]||(I[1]=(...T)=>(0,o.unref)(r)&&(0,o.unref)(r)(...T)),onMouseleave:I[2]||(I[2]=(...T)=>(0,o.unref)(a)&&(0,o.unref)(a)(...T))},[(0,o.renderSlot)(y.$slots,"default")],32)],2)}}}),Ro=Xu,$u=(0,o.defineComponent)({name:"DDragFormList",__name:"dragFormList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(e){const{designItemName:A}=(0,o.inject)("dui-design-provide",{});return(t,n)=>{const r=(0,o.resolveComponent)("el-col");return(0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.componentList,a=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:a.id},[a.type!="pkey"?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,span:a.config.span||24},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(Oo,{"is-container":a.dragType!=="component","component-data":a},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)((0,o.unref)(A)),{"component-data":a,"global-config":e.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["is-container","component-data"])]),_:2},1032,["span"])):(0,o.createCommentVNode)("",!0)],64))),128)}}}),Vo=$u,Yu=(0,o.defineComponent)({name:"DDragIndexList",__name:"dragIndexList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(e){const{designItemName:A}=(0,o.inject)("dui-design-provide",{}),t=n=>{if(n.flexWidth)return{width:n.flexWidth+"%"}};return(n,r)=>((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.componentList,a=>((0,o.openBlock)(),(0,o.createBlock)(Oo,{key:a.id,style:(0,o.normalizeStyle)(t(a.config)),"is-container":a.dragType!=="component","component-data":a},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)((0,o.unref)(A)),{"component-data":a,"global-config":e.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["style","is-container","component-data"]))),128))}}),Po=Yu,Cs=dt(Oo,[Ko,Ro,Vo,Po]);function Un(e){return(0,o.getCurrentScope)()?((0,o.onScopeDispose)(e),!0):!1}function je(e){return typeof e=="function"?e():(0,o.unref)(e)}var Wu=typeof window<"u"&&typeof document<"u",Ju=e=>typeof e<"u",Zu=Object.prototype.toString,ju=e=>Zu.call(e)==="[object Object]",qu=()=>{};function Ad(e,A){function t(...n){return new Promise((r,a)=>{Promise.resolve(e(()=>A.apply(this,n),{fn:A,thisArg:this,args:n})).then(r).catch(a)})}return t}var vs=e=>e();function ed(e=vs){const A=(0,o.ref)(!0);function t(){A.value=!1}function n(){A.value=!0}const r=(...a)=>{A.value&&e(...a)};return{isActive:(0,o.readonly)(A),pause:t,resume:n,eventFilter:r}}function ys(e,A=!1,t="Timeout"){return new Promise((n,r)=>{setTimeout(A?()=>r(t):n,e)})}function td(e,A,t={}){const{eventFilter:n=vs,...r}=t;return(0,o.watch)(e,Ad(n,A),r)}function Xt(e,A,t={}){const{eventFilter:n,...r}=t,{eventFilter:a,pause:u,resume:d,isActive:g}=ed(n);return{stop:td(e,A,{...r,eventFilter:a}),pause:u,resume:d,isActive:g}}function nd(e,A={}){if(!(0,o.isRef)(e))return(0,o.toRefs)(e);const t=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)t[n]=(0,o.customRef)(()=>({get(){return e.value[n]},set(r){var a;if((a=je(A.replaceRef))==null||a)if(Array.isArray(e.value)){const u=[...e.value];u[n]=r,e.value=u}else{const u={...e.value,[n]:r};Object.setPrototypeOf(u,Object.getPrototypeOf(e.value)),e.value=u}else e.value[n]=r}}));return t}function Go(e,A=!1){function t(w,{flush:m="sync",deep:v=!1,timeout:y,throwOnTimeout:I}={}){let L=null;const T=[new Promise(K=>{L=(0,o.watch)(e,b=>{w(b)!==A&&(L?.(),K(b))},{flush:m,deep:v,immediate:!0})})];return y!=null&&T.push(ys(y,I).then(()=>je(e)).finally(()=>L?.())),Promise.race(T)}function n(w,m){if(!(0,o.isRef)(w))return t(b=>b===w,m);const{flush:v="sync",deep:y=!1,timeout:I,throwOnTimeout:L}=m??{};let T=null;const K=[new Promise(b=>{T=(0,o.watch)([e,w],([O,aA])=>{A!==(O===aA)&&(T?.(),b(O))},{flush:v,deep:y,immediate:!0})})];return I!=null&&K.push(ys(I,L).then(()=>je(e)).finally(()=>(T?.(),je(e)))),Promise.race(K)}function r(w){return t(m=>!!m,w)}function a(w){return n(null,w)}function u(w){return n(void 0,w)}function d(w){return t(Number.isNaN,w)}function g(w,m){return t(v=>{const y=Array.from(v);return y.includes(w)||y.includes(je(w))},m)}function h(w){return B(1,w)}function B(w=1,m){let v=-1;return t(()=>(v+=1,v>=w),m)}return Array.isArray(je(e))?{toMatch:t,toContains:g,changed:h,changedTimes:B,get not(){return Go(e,!A)}}:{toMatch:t,toBe:n,toBeTruthy:r,toBeNull:a,toBeNaN:d,toBeUndefined:u,changed:h,changedTimes:B,get not(){return Go(e,!A)}}}function zo(e){return Go(e)}function rd(e){var A;const t=je(e);return(A=t?.$el)!=null?A:t}var Qs=Wu?window:void 0;function Es(...e){let A,t,n,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,n,r]=e,A=Qs):[A,t,n,r]=e,!A)return qu;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const a=[],u=()=>{a.forEach(B=>B()),a.length=0},d=(B,w,m,v)=>(B.addEventListener(w,m,v),()=>B.removeEventListener(w,m,v)),g=(0,o.watch)(()=>[rd(A),je(r)],([B,w])=>{if(u(),!B)return;const m=ju(w)?{...w}:w;a.push(...t.flatMap(v=>n.map(y=>d(B,v,y,m))))},{immediate:!0,flush:"post"}),h=()=>{g(),u()};return Un(h),h}function od(e){return typeof e=="function"?e:typeof e=="string"?A=>A.key===e:Array.isArray(e)?A=>e.includes(A.key):()=>!0}function Fs(...e){let A,t,n={};e.length===3?(A=e[0],t=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(A=!0,t=e[0],n=e[1]):(A=e[0],t=e[1]):(A=!0,t=e[0]);const{target:r=Qs,eventName:a="keydown",passive:u=!1,dedupe:d=!1}=n,g=od(A);return Es(r,a,B=>{B.repeat&&je(d)||g(B)&&t(B)},u)}function id(e){return JSON.parse(JSON.stringify(e))}function Xo(e,A,t,n={}){var r,a,u;const{clone:d=!1,passive:g=!1,eventName:h,deep:B=!1,defaultValue:w,shouldEmit:m}=n,v=(0,o.getCurrentInstance)(),y=t||v?.emit||((r=v?.$emit)==null?void 0:r.bind(v))||((u=(a=v?.proxy)==null?void 0:a.$emit)==null?void 0:u.bind(v?.proxy));let I=h;A||(A="modelValue"),I=I||`update:${A.toString()}`;const L=b=>d?typeof d=="function"?d(b):id(b):b,T=()=>Ju(e[A])?L(e[A]):w,K=b=>{m?m(b)&&y(I,b):y(I,b)};if(g){const b=(0,o.ref)(T());let O=!1;return(0,o.watch)(()=>e[A],aA=>{O||(O=!0,b.value=L(aA),(0,o.nextTick)(()=>O=!1))}),(0,o.watch)(b,aA=>{!O&&(aA!==e[A]||B)&&K(aA)},{deep:B}),b}else return(0,o.computed)({get(){return T()},set(b){K(b)}})}var sd={value:()=>{}};function dr(){for(var e=0,A=arguments.length,t={},n;e<A;++e){if(!(n=arguments[e]+"")||n in t||/[\s.]/.test(n))throw new Error("illegal type: "+n);t[n]=[]}return new fr(t)}function fr(e){this._=e}function ad(e,A){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!A.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}fr.prototype=dr.prototype={constructor:fr,on:function(e,A){var t=this._,n=ad(e+"",t),r,a=-1,u=n.length;if(arguments.length<2){for(;++a<u;)if((r=(e=n[a]).type)&&(r=ld(t[r],e.name)))return r;return}if(A!=null&&typeof A!="function")throw new Error("invalid callback: "+A);for(;++a<u;)if(r=(e=n[a]).type)t[r]=Us(t[r],e.name,A);else if(A==null)for(r in t)t[r]=Us(t[r],e.name,null);return this},copy:function(){var e={},A=this._;for(var t in A)e[t]=A[t].slice();return new fr(e)},call:function(e,A){if((r=arguments.length-2)>0)for(var t=new Array(r),n=0,r,a;n<r;++n)t[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],n=0,r=a.length;n<r;++n)a[n].value.apply(A,t)},apply:function(e,A,t){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],r=0,a=n.length;r<a;++r)n[r].value.apply(A,t)}};function ld(e,A){for(var t=0,n=e.length,r;t<n;++t)if((r=e[t]).name===A)return r.value}function Us(e,A,t){for(var n=0,r=e.length;n<r;++n)if(e[n].name===A){e[n]=sd,e=e.slice(0,n).concat(e.slice(n+1));break}return t!=null&&e.push({name:A,value:t}),e}var $o="http://www.w3.org/1999/xhtml",bs={svg:"http://www.w3.org/2000/svg",xhtml:$o,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function gr(e){var A=e+="",t=A.indexOf(":");return t>=0&&(A=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),bs.hasOwnProperty(A)?{space:bs[A],local:e}:e}function cd(e){return function(){var A=this.ownerDocument,t=this.namespaceURI;return t===$o&&A.documentElement.namespaceURI===$o?A.createElement(e):A.createElementNS(t,e)}}function ud(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Hs(e){var A=gr(e);return(A.local?ud:cd)(A)}function dd(){}function Yo(e){return e==null?dd:function(){return this.querySelector(e)}}function fd(e){typeof e!="function"&&(e=Yo(e));for(var A=this._groups,t=A.length,n=new Array(t),r=0;r<t;++r)for(var a=A[r],u=a.length,d=n[r]=new Array(u),g,h,B=0;B<u;++B)(g=a[B])&&(h=e.call(g,g.__data__,B,a))&&("__data__"in g&&(h.__data__=g.__data__),d[B]=h);return new Fe(n,this._parents)}function gd(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function hd(){return[]}function Is(e){return e==null?hd:function(){return this.querySelectorAll(e)}}function Bd(e){return function(){return gd(e.apply(this,arguments))}}function pd(e){typeof e=="function"?e=Bd(e):e=Is(e);for(var A=this._groups,t=A.length,n=[],r=[],a=0;a<t;++a)for(var u=A[a],d=u.length,g,h=0;h<d;++h)(g=u[h])&&(n.push(e.call(g,g.__data__,h,u)),r.push(g));return new Fe(n,r)}function _s(e){return function(){return this.matches(e)}}function Ss(e){return function(A){return A.matches(e)}}var md=Array.prototype.find;function wd(e){return function(){return md.call(this.children,e)}}function Cd(){return this.firstElementChild}function vd(e){return this.select(e==null?Cd:wd(typeof e=="function"?e:Ss(e)))}var yd=Array.prototype.filter;function Qd(){return Array.from(this.children)}function Ed(e){return function(){return yd.call(this.children,e)}}function Fd(e){return this.selectAll(e==null?Qd:Ed(typeof e=="function"?e:Ss(e)))}function Ud(e){typeof e!="function"&&(e=_s(e));for(var A=this._groups,t=A.length,n=new Array(t),r=0;r<t;++r)for(var a=A[r],u=a.length,d=n[r]=[],g,h=0;h<u;++h)(g=a[h])&&e.call(g,g.__data__,h,a)&&d.push(g);return new Fe(n,this._parents)}function xs(e){return new Array(e.length)}function bd(){return new Fe(this._enter||this._groups.map(xs),this._parents)}function hr(e,A){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=A}hr.prototype={constructor:hr,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,A){return this._parent.insertBefore(e,A)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Hd(e){return function(){return e}}function Id(e,A,t,n,r,a){for(var u=0,d,g=A.length,h=a.length;u<h;++u)(d=A[u])?(d.__data__=a[u],n[u]=d):t[u]=new hr(e,a[u]);for(;u<g;++u)(d=A[u])&&(r[u]=d)}function _d(e,A,t,n,r,a,u){var d,g,h=new Map,B=A.length,w=a.length,m=new Array(B),v;for(d=0;d<B;++d)(g=A[d])&&(m[d]=v=u.call(g,g.__data__,d,A)+"",h.has(v)?r[d]=g:h.set(v,g));for(d=0;d<w;++d)v=u.call(e,a[d],d,a)+"",(g=h.get(v))?(n[d]=g,g.__data__=a[d],h.delete(v)):t[d]=new hr(e,a[d]);for(d=0;d<B;++d)(g=A[d])&&h.get(m[d])===g&&(r[d]=g)}function Sd(e){return e.__data__}function xd(e,A){if(!arguments.length)return Array.from(this,Sd);var t=A?_d:Id,n=this._parents,r=this._groups;typeof e!="function"&&(e=Hd(e));for(var a=r.length,u=new Array(a),d=new Array(a),g=new Array(a),h=0;h<a;++h){var B=n[h],w=r[h],m=w.length,v=Dd(e.call(B,B&&B.__data__,h,n)),y=v.length,I=d[h]=new Array(y),L=u[h]=new Array(y);t(B,w,I,L,g[h]=new Array(m),v,A);for(var T=0,K=0,b,O;T<y;++T)if(b=I[T]){for(T>=K&&(K=T+1);!(O=L[K])&&++K<y;);b._next=O||null}}return u=new Fe(u,n),u._enter=d,u._exit=g,u}function Dd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Nd(){return new Fe(this._exit||this._groups.map(xs),this._parents)}function Ld(e,A,t){var n=this.enter(),r=this,a=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),A!=null&&(r=A(r),r&&(r=r.selection())),t==null?a.remove():t(a),n&&r?n.merge(r).order():r}function Td(e){for(var A=e.selection?e.selection():e,t=this._groups,n=A._groups,r=t.length,a=n.length,u=Math.min(r,a),d=new Array(r),g=0;g<u;++g)for(var h=t[g],B=n[g],w=h.length,m=d[g]=new Array(w),v,y=0;y<w;++y)(v=h[y]||B[y])&&(m[y]=v);for(;g<r;++g)d[g]=t[g];return new Fe(d,this._parents)}function kd(){for(var e=this._groups,A=-1,t=e.length;++A<t;)for(var n=e[A],r=n.length-1,a=n[r],u;--r>=0;)(u=n[r])&&(a&&u.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(u,a),a=u);return this}function Md(e){e||(e=Od);function A(w,m){return w&&m?e(w.__data__,m.__data__):!w-!m}for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a){for(var u=t[a],d=u.length,g=r[a]=new Array(d),h,B=0;B<d;++B)(h=u[B])&&(g[B]=h);g.sort(A)}return new Fe(r,this._parents).order()}function Od(e,A){return e<A?-1:e>A?1:e>=A?0:NaN}function Kd(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Rd(){return Array.from(this)}function Vd(){for(var e=this._groups,A=0,t=e.length;A<t;++A)for(var n=e[A],r=0,a=n.length;r<a;++r){var u=n[r];if(u)return u}return null}function Pd(){let e=0;for(const A of this)++e;return e}function Gd(){return!this.node()}function zd(e){for(var A=this._groups,t=0,n=A.length;t<n;++t)for(var r=A[t],a=0,u=r.length,d;a<u;++a)(d=r[a])&&e.call(d,d.__data__,a,r);return this}function Xd(e){return function(){this.removeAttribute(e)}}function $d(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Yd(e,A){return function(){this.setAttribute(e,A)}}function Wd(e,A){return function(){this.setAttributeNS(e.space,e.local,A)}}function Jd(e,A){return function(){var t=A.apply(this,arguments);t==null?this.removeAttribute(e):this.setAttribute(e,t)}}function Zd(e,A){return function(){var t=A.apply(this,arguments);t==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function jd(e,A){var t=gr(e);if(arguments.length<2){var n=this.node();return t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}return this.each((A==null?t.local?$d:Xd:typeof A=="function"?t.local?Zd:Jd:t.local?Wd:Yd)(t,A))}function Ds(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qd(e){return function(){this.style.removeProperty(e)}}function Af(e,A,t){return function(){this.style.setProperty(e,A,t)}}function ef(e,A,t){return function(){var n=A.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,t)}}function tf(e,A,t){return arguments.length>1?this.each((A==null?qd:typeof A=="function"?ef:Af)(e,A,t??"")):$t(this.node(),e)}function $t(e,A){return e.style.getPropertyValue(A)||Ds(e).getComputedStyle(e,null).getPropertyValue(A)}function nf(e){return function(){delete this[e]}}function rf(e,A){return function(){this[e]=A}}function of(e,A){return function(){var t=A.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function sf(e,A){return arguments.length>1?this.each((A==null?nf:typeof A=="function"?of:rf)(e,A)):this.node()[e]}function Ns(e){return e.trim().split(/^|\s+/)}function Wo(e){return e.classList||new Ls(e)}function Ls(e){this._node=e,this._names=Ns(e.getAttribute("class")||"")}Ls.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var A=this._names.indexOf(e);A>=0&&(this._names.splice(A,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Ts(e,A){for(var t=Wo(e),n=-1,r=A.length;++n<r;)t.add(A[n])}function ks(e,A){for(var t=Wo(e),n=-1,r=A.length;++n<r;)t.remove(A[n])}function af(e){return function(){Ts(this,e)}}function lf(e){return function(){ks(this,e)}}function cf(e,A){return function(){(A.apply(this,arguments)?Ts:ks)(this,e)}}function uf(e,A){var t=Ns(e+"");if(arguments.length<2){for(var n=Wo(this.node()),r=-1,a=t.length;++r<a;)if(!n.contains(t[r]))return!1;return!0}return this.each((typeof A=="function"?cf:A?af:lf)(t,A))}function df(){this.textContent=""}function ff(e){return function(){this.textContent=e}}function gf(e){return function(){var A=e.apply(this,arguments);this.textContent=A??""}}function hf(e){return arguments.length?this.each(e==null?df:(typeof e=="function"?gf:ff)(e)):this.node().textContent}function Bf(){this.innerHTML=""}function pf(e){return function(){this.innerHTML=e}}function mf(e){return function(){var A=e.apply(this,arguments);this.innerHTML=A??""}}function wf(e){return arguments.length?this.each(e==null?Bf:(typeof e=="function"?mf:pf)(e)):this.node().innerHTML}function Cf(){this.nextSibling&&this.parentNode.appendChild(this)}function vf(){return this.each(Cf)}function yf(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qf(){return this.each(yf)}function Ef(e){var A=typeof e=="function"?e:Hs(e);return this.select(function(){return this.appendChild(A.apply(this,arguments))})}function Ff(){return null}function Uf(e,A){var t=typeof e=="function"?e:Hs(e),n=A==null?Ff:typeof A=="function"?A:Yo(A);return this.select(function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)})}function bf(){var e=this.parentNode;e&&e.removeChild(this)}function Hf(){return this.each(bf)}function If(){var e=this.cloneNode(!1),A=this.parentNode;return A?A.insertBefore(e,this.nextSibling):e}function _f(){var e=this.cloneNode(!0),A=this.parentNode;return A?A.insertBefore(e,this.nextSibling):e}function Sf(e){return this.select(e?_f:If)}function xf(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Df(e){return function(A){e.call(this,A,this.__data__)}}function Nf(e){return e.trim().split(/^|\s+/).map(function(A){var t="",n=A.indexOf(".");return n>=0&&(t=A.slice(n+1),A=A.slice(0,n)),{type:A,name:t}})}function Lf(e){return function(){var A=this.__on;if(A){for(var t=0,n=-1,r=A.length,a;t<r;++t)a=A[t],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):A[++n]=a;++n?A.length=n:delete this.__on}}}function Tf(e,A,t){return function(){var n=this.__on,r,a=Df(A);if(n){for(var u=0,d=n.length;u<d;++u)if((r=n[u]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=t),r.value=A;return}}this.addEventListener(e.type,a,t),r={type:e.type,name:e.name,value:A,listener:a,options:t},n?n.push(r):this.__on=[r]}}function kf(e,A,t){var n=Nf(e+""),r,a=n.length,u;if(arguments.length<2){var d=this.node().__on;if(d){for(var g=0,h=d.length,B;g<h;++g)for(r=0,B=d[g];r<a;++r)if((u=n[r]).type===B.type&&u.name===B.name)return B.value}return}for(d=A?Tf:Lf,r=0;r<a;++r)this.each(d(n[r],A,t));return this}function Ms(e,A,t){var n=Ds(e),r=n.CustomEvent;typeof r=="function"?r=new r(A,t):(r=n.document.createEvent("Event"),t?(r.initEvent(A,t.bubbles,t.cancelable),r.detail=t.detail):r.initEvent(A,!1,!1)),e.dispatchEvent(r)}function Mf(e,A){return function(){return Ms(this,e,A)}}function Of(e,A){return function(){return Ms(this,e,A.apply(this,arguments))}}function Kf(e,A){return this.each((typeof A=="function"?Of:Mf)(e,A))}function*Rf(){for(var e=this._groups,A=0,t=e.length;A<t;++A)for(var n=e[A],r=0,a=n.length,u;r<a;++r)(u=n[r])&&(yield u)}var Os=[null];function Fe(e,A){this._groups=e,this._parents=A}function bn(){return new Fe([[document.documentElement]],Os)}function Vf(){return this}Fe.prototype=bn.prototype={constructor:Fe,select:fd,selectAll:pd,selectChild:vd,selectChildren:Fd,filter:Ud,data:xd,enter:bd,exit:Nd,join:Ld,merge:Td,selection:Vf,order:kd,sort:Md,call:Kd,nodes:Rd,node:Vd,size:Pd,empty:Gd,each:zd,attr:jd,style:tf,property:sf,classed:uf,text:hf,html:wf,raise:vf,lower:Qf,append:Ef,insert:Uf,remove:Hf,clone:Sf,datum:xf,on:kf,dispatch:Kf,[Symbol.iterator]:Rf};function Le(e){return typeof e=="string"?new Fe([[document.querySelector(e)]],[document.documentElement]):new Fe([[e]],Os)}function Pf(e){let A;for(;A=e.sourceEvent;)e=A;return e}function Ke(e,A){if(e=Pf(e),A===void 0&&(A=e.currentTarget),A){var t=A.ownerSVGElement||A;if(t.createSVGPoint){var n=t.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(A.getScreenCTM().inverse()),[n.x,n.y]}if(A.getBoundingClientRect){var r=A.getBoundingClientRect();return[e.clientX-r.left-A.clientLeft,e.clientY-r.top-A.clientTop]}}return[e.pageX,e.pageY]}var Gf={passive:!1},Hn={capture:!0,passive:!1};function Jo(e){e.stopImmediatePropagation()}function Yt(e){e.preventDefault(),e.stopImmediatePropagation()}function Ks(e){var A=e.document.documentElement,t=Le(e).on("dragstart.drag",Yt,Hn);"onselectstart"in A?t.on("selectstart.drag",Yt,Hn):(A.__noselect=A.style.MozUserSelect,A.style.MozUserSelect="none")}function Rs(e,A){var t=e.document.documentElement,n=Le(e).on("dragstart.drag",null);A&&(n.on("click.drag",Yt,Hn),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in t?n.on("selectstart.drag",null):(t.style.MozUserSelect=t.__noselect,delete t.__noselect)}var Br=e=>()=>e;function Zo(e,{sourceEvent:A,subject:t,target:n,identifier:r,active:a,x:u,y:d,dx:g,dy:h,dispatch:B}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:A,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:B}})}Zo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function zf(e){return!e.ctrlKey&&!e.button}function Xf(){return this.parentNode}function $f(e,A){return A??{x:e.x,y:e.y}}function Yf(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wf(){var e=zf,A=Xf,t=$f,n=Yf,r={},a=dr("start","drag","end"),u=0,d,g,h,B,w=0;function m(O){O.on("mousedown.drag",v).filter(n).on("touchstart.drag",L).on("touchmove.drag",T,Gf).on("touchend.drag touchcancel.drag",K).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(O,aA){if(!(B||!e.call(this,O,aA))){var Z=b(this,A.call(this,O,aA),O,aA,"mouse");Z&&(Le(O.view).on("mousemove.drag",y,Hn).on("mouseup.drag",I,Hn),Ks(O.view),Jo(O),h=!1,d=O.clientX,g=O.clientY,Z("start",O))}}function y(O){if(Yt(O),!h){var aA=O.clientX-d,Z=O.clientY-g;h=aA*aA+Z*Z>w}r.mouse("drag",O)}function I(O){Le(O.view).on("mousemove.drag mouseup.drag",null),Rs(O.view,h),Yt(O),r.mouse("end",O)}function L(O,aA){if(e.call(this,O,aA)){var Z=O.changedTouches,cA=A.call(this,O,aA),lA=Z.length,iA,oA;for(iA=0;iA<lA;++iA)(oA=b(this,cA,O,aA,Z[iA].identifier,Z[iA]))&&(Jo(O),oA("start",O,Z[iA]))}}function T(O){var aA=O.changedTouches,Z=aA.length,cA,lA;for(cA=0;cA<Z;++cA)(lA=r[aA[cA].identifier])&&(Yt(O),lA("drag",O,aA[cA]))}function K(O){var aA=O.changedTouches,Z=aA.length,cA,lA;for(B&&clearTimeout(B),B=setTimeout(function(){B=null},500),cA=0;cA<Z;++cA)(lA=r[aA[cA].identifier])&&(Jo(O),lA("end",O,aA[cA]))}function b(O,aA,Z,cA,lA,iA){var oA=a.copy(),tA=Ke(iA||Z,aA),x,eA,H;if((H=t.call(O,new Zo("beforestart",{sourceEvent:Z,target:m,identifier:lA,active:u,x:tA[0],y:tA[1],dx:0,dy:0,dispatch:oA}),cA))!=null)return x=H.x-tA[0]||0,eA=H.y-tA[1]||0,function X(F,D,k){var N=tA,R;switch(F){case"start":r[lA]=X,R=u++;break;case"end":delete r[lA],--u;case"drag":tA=Ke(k||D,aA),R=u;break}oA.call(F,O,new Zo(F,{sourceEvent:D,subject:H,target:m,identifier:lA,active:R,x:tA[0]+x,y:tA[1]+eA,dx:tA[0]-N[0],dy:tA[1]-N[1],dispatch:oA}),cA)}}return m.filter=function(O){return arguments.length?(e=typeof O=="function"?O:Br(!!O),m):e},m.container=function(O){return arguments.length?(A=typeof O=="function"?O:Br(O),m):A},m.subject=function(O){return arguments.length?(t=typeof O=="function"?O:Br(O),m):t},m.touchable=function(O){return arguments.length?(n=typeof O=="function"?O:Br(!!O),m):n},m.on=function(){var O=a.on.apply(a,arguments);return O===a?m:O},m.clickDistance=function(O){return arguments.length?(w=(O=+O)*O,m):Math.sqrt(w)},m}function jo(e,A,t){e.prototype=A.prototype=t,t.constructor=e}function Vs(e,A){var t=Object.create(e.prototype);for(var n in A)t[n]=A[n];return t}function In(){}var _n=.7,pr=1/_n,Wt="\\s*([+-]?\\d+)\\s*",Sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Jf=/^#([0-9a-f]{3,8})$/,Zf=new RegExp(`^rgb\\(${Wt},${Wt},${Wt}\\)$`),jf=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),qf=new RegExp(`^rgba\\(${Wt},${Wt},${Wt},${Sn}\\)$`),Ag=new RegExp(`^rgba\\(${Re},${Re},${Re},${Sn}\\)$`),eg=new RegExp(`^hsl\\(${Sn},${Re},${Re}\\)$`),tg=new RegExp(`^hsla\\(${Sn},${Re},${Re},${Sn}\\)$`),Ps={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};jo(In,Ht,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Gs,formatHex:Gs,formatHex8:ng,formatHsl:rg,formatRgb:zs,toString:zs});function Gs(){return this.rgb().formatHex()}function ng(){return this.rgb().formatHex8()}function rg(){return Js(this).formatHsl()}function zs(){return this.rgb().formatRgb()}function Ht(e){var A,t;return e=(e+"").trim().toLowerCase(),(A=Jf.exec(e))?(t=A[1].length,A=parseInt(A[1],16),t===6?Xs(A):t===3?new Ce(A>>8&15|A>>4&240,A>>4&15|A&240,(A&15)<<4|A&15,1):t===8?mr(A>>24&255,A>>16&255,A>>8&255,(A&255)/255):t===4?mr(A>>12&15|A>>8&240,A>>8&15|A>>4&240,A>>4&15|A&240,((A&15)<<4|A&15)/255):null):(A=Zf.exec(e))?new Ce(A[1],A[2],A[3],1):(A=jf.exec(e))?new Ce(A[1]*255/100,A[2]*255/100,A[3]*255/100,1):(A=qf.exec(e))?mr(A[1],A[2],A[3],A[4]):(A=Ag.exec(e))?mr(A[1]*255/100,A[2]*255/100,A[3]*255/100,A[4]):(A=eg.exec(e))?Ws(A[1],A[2]/100,A[3]/100,1):(A=tg.exec(e))?Ws(A[1],A[2]/100,A[3]/100,A[4]):Ps.hasOwnProperty(e)?Xs(Ps[e]):e==="transparent"?new Ce(NaN,NaN,NaN,0):null}function Xs(e){return new Ce(e>>16&255,e>>8&255,e&255,1)}function mr(e,A,t,n){return n<=0&&(e=A=t=NaN),new Ce(e,A,t,n)}function og(e){return e instanceof In||(e=Ht(e)),e?(e=e.rgb(),new Ce(e.r,e.g,e.b,e.opacity)):new Ce}function qo(e,A,t,n){return arguments.length===1?og(e):new Ce(e,A,t,n??1)}function Ce(e,A,t,n){this.r=+e,this.g=+A,this.b=+t,this.opacity=+n}jo(Ce,qo,Vs(In,{brighter(e){return e=e==null?pr:Math.pow(pr,e),new Ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_n:Math.pow(_n,e),new Ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ce(It(this.r),It(this.g),It(this.b),wr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$s,formatHex:$s,formatHex8:ig,formatRgb:Ys,toString:Ys}));function $s(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}`}function ig(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}${_t((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ys(){const e=wr(this.opacity);return`${e===1?"rgb(":"rgba("}${It(this.r)}, ${It(this.g)}, ${It(this.b)}${e===1?")":`, ${e})`}`}function wr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function It(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _t(e){return e=It(e),(e<16?"0":"")+e.toString(16)}function Ws(e,A,t,n){return n<=0?e=A=t=NaN:t<=0||t>=1?e=A=NaN:A<=0&&(e=NaN),new Te(e,A,t,n)}function Js(e){if(e instanceof Te)return new Te(e.h,e.s,e.l,e.opacity);if(e instanceof In||(e=Ht(e)),!e)return new Te;if(e instanceof Te)return e;e=e.rgb();var A=e.r/255,t=e.g/255,n=e.b/255,r=Math.min(A,t,n),a=Math.max(A,t,n),u=NaN,d=a-r,g=(a+r)/2;return d?(A===a?u=(t-n)/d+(t<n)*6:t===a?u=(n-A)/d+2:u=(A-t)/d+4,d/=g<.5?a+r:2-a-r,u*=60):d=g>0&&g<1?0:u,new Te(u,d,g,e.opacity)}function sg(e,A,t,n){return arguments.length===1?Js(e):new Te(e,A,t,n??1)}function Te(e,A,t,n){this.h=+e,this.s=+A,this.l=+t,this.opacity=+n}jo(Te,sg,Vs(In,{brighter(e){return e=e==null?pr:Math.pow(pr,e),new Te(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_n:Math.pow(_n,e),new Te(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,A=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*A,r=2*t-n;return new Ce(Ai(e>=240?e-240:e+120,r,n),Ai(e,r,n),Ai(e<120?e+240:e-120,r,n),this.opacity)},clamp(){return new Te(Zs(this.h),Cr(this.s),Cr(this.l),wr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wr(this.opacity);return`${e===1?"hsl(":"hsla("}${Zs(this.h)}, ${Cr(this.s)*100}%, ${Cr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Zs(e){return e=(e||0)%360,e<0?e+360:e}function Cr(e){return Math.max(0,Math.min(1,e||0))}function Ai(e,A,t){return(e<60?A+(t-A)*e/60:e<180?t:e<240?A+(t-A)*(240-e)/60:A)*255}var ei=e=>()=>e;function ag(e,A){return function(t){return e+t*A}}function lg(e,A,t){return e=Math.pow(e,t),A=Math.pow(A,t)-e,t=1/t,function(n){return Math.pow(e+n*A,t)}}function cg(e){return(e=+e)==1?js:function(A,t){return t-A?lg(A,t,e):ei(isNaN(A)?t:A)}}function js(e,A){var t=A-e;return t?ag(e,t):ei(isNaN(e)?A:e)}var vr=(function e(A){var t=cg(A);function n(r,a){var u=t((r=qo(r)).r,(a=qo(a)).r),d=t(r.g,a.g),g=t(r.b,a.b),h=js(r.opacity,a.opacity);return function(B){return r.r=u(B),r.g=d(B),r.b=g(B),r.opacity=h(B),r+""}}return n.gamma=e,n})(1);function ug(e,A){A||(A=[]);var t=e?Math.min(A.length,e.length):0,n=A.slice(),r;return function(a){for(r=0;r<t;++r)n[r]=e[r]*(1-a)+A[r]*a;return n}}function dg(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fg(e,A){var t=A?A.length:0,n=e?Math.min(t,e.length):0,r=new Array(n),a=new Array(t),u;for(u=0;u<n;++u)r[u]=xn(e[u],A[u]);for(;u<t;++u)a[u]=A[u];return function(d){for(u=0;u<n;++u)a[u]=r[u](d);return a}}function gg(e,A){var t=new Date;return e=+e,A=+A,function(n){return t.setTime(e*(1-n)+A*n),t}}function Ve(e,A){return e=+e,A=+A,function(t){return e*(1-t)+A*t}}function hg(e,A){var t={},n={},r;(e===null||typeof e!="object")&&(e={}),(A===null||typeof A!="object")&&(A={});for(r in A)r in e?t[r]=xn(e[r],A[r]):n[r]=A[r];return function(a){for(r in t)n[r]=t[r](a);return n}}var ti=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ni=new RegExp(ti.source,"g");function Bg(e){return function(){return e}}function pg(e){return function(A){return e(A)+""}}function qs(e,A){var t=ti.lastIndex=ni.lastIndex=0,n,r,a,u=-1,d=[],g=[];for(e=e+"",A=A+"";(n=ti.exec(e))&&(r=ni.exec(A));)(a=r.index)>t&&(a=A.slice(t,a),d[u]?d[u]+=a:d[++u]=a),(n=n[0])===(r=r[0])?d[u]?d[u]+=r:d[++u]=r:(d[++u]=null,g.push({i:u,x:Ve(n,r)})),t=ni.lastIndex;return t<A.length&&(a=A.slice(t),d[u]?d[u]+=a:d[++u]=a),d.length<2?g[0]?pg(g[0].x):Bg(A):(A=g.length,function(h){for(var B=0,w;B<A;++B)d[(w=g[B]).i]=w.x(h);return d.join("")})}function xn(e,A){var t=typeof A,n;return A==null||t==="boolean"?ei(A):(t==="number"?Ve:t==="string"?(n=Ht(A))?(A=n,vr):qs:A instanceof Ht?vr:A instanceof Date?gg:dg(A)?ug:Array.isArray(A)?fg:typeof A.valueOf!="function"&&typeof A.toString!="function"||isNaN(A)?hg:Ve)(e,A)}var Aa=180/Math.PI,ri={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ea(e,A,t,n,r,a){var u,d,g;return(u=Math.sqrt(e*e+A*A))&&(e/=u,A/=u),(g=e*t+A*n)&&(t-=e*g,n-=A*g),(d=Math.sqrt(t*t+n*n))&&(t/=d,n/=d,g/=d),e*n<A*t&&(e=-e,A=-A,g=-g,u=-u),{translateX:r,translateY:a,rotate:Math.atan2(A,e)*Aa,skewX:Math.atan(g)*Aa,scaleX:u,scaleY:d}}var yr;function mg(e){const A=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return A.isIdentity?ri:ea(A.a,A.b,A.c,A.d,A.e,A.f)}function wg(e){return e==null||(yr||(yr=document.createElementNS("http://www.w3.org/2000/svg","g")),yr.setAttribute("transform",e),!(e=yr.transform.baseVal.consolidate()))?ri:(e=e.matrix,ea(e.a,e.b,e.c,e.d,e.e,e.f))}function ta(e,A,t,n){function r(h){return h.length?h.pop()+" ":""}function a(h,B,w,m,v,y){if(h!==w||B!==m){var I=v.push("translate(",null,A,null,t);y.push({i:I-4,x:Ve(h,w)},{i:I-2,x:Ve(B,m)})}else(w||m)&&v.push("translate("+w+A+m+t)}function u(h,B,w,m){h!==B?(h-B>180?B+=360:B-h>180&&(h+=360),m.push({i:w.push(r(w)+"rotate(",null,n)-2,x:Ve(h,B)})):B&&w.push(r(w)+"rotate("+B+n)}function d(h,B,w,m){h!==B?m.push({i:w.push(r(w)+"skewX(",null,n)-2,x:Ve(h,B)}):B&&w.push(r(w)+"skewX("+B+n)}function g(h,B,w,m,v,y){if(h!==w||B!==m){var I=v.push(r(v)+"scale(",null,",",null,")");y.push({i:I-4,x:Ve(h,w)},{i:I-2,x:Ve(B,m)})}else(w!==1||m!==1)&&v.push(r(v)+"scale("+w+","+m+")")}return function(h,B){var w=[],m=[];return h=e(h),B=e(B),a(h.translateX,h.translateY,B.translateX,B.translateY,w,m),u(h.rotate,B.rotate,w,m),d(h.skewX,B.skewX,w,m),g(h.scaleX,h.scaleY,B.scaleX,B.scaleY,w,m),h=B=null,function(v){for(var y=-1,I=m.length,L;++y<I;)w[(L=m[y]).i]=L.x(v);return w.join("")}}}var Cg=ta(mg,"px, ","px)","deg)"),vg=ta(wg,", ",")",")"),yg=1e-12;function na(e){return((e=Math.exp(e))+1/e)/2}function Qg(e){return((e=Math.exp(e))-1/e)/2}function Eg(e){return((e=Math.exp(2*e))-1)/(e+1)}var Qr=(function e(A,t,n){function r(a,u){var d=a[0],g=a[1],h=a[2],B=u[0],w=u[1],m=u[2],v=B-d,y=w-g,I=v*v+y*y,L,T;if(I<yg)T=Math.log(m/h)/A,L=function(Z){return[d+Z*v,g+Z*y,h*Math.exp(A*Z*T)]};else{var K=Math.sqrt(I),b=(m*m-h*h+n*I)/(2*h*t*K),O=(m*m-h*h-n*I)/(2*m*t*K),aA=Math.log(Math.sqrt(b*b+1)-b);T=(Math.log(Math.sqrt(O*O+1)-O)-aA)/A,L=function(Z){var cA=Z*T,lA=na(aA),iA=h/(t*K)*(lA*Eg(A*cA+aA)-Qg(aA));return[d+iA*v,g+iA*y,h*lA/na(A*cA+aA)]}}return L.duration=T*1e3*A/Math.SQRT2,L}return r.rho=function(a){var u=Math.max(.001,+a),d=u*u;return e(u,d,d*d)},r})(Math.SQRT2,2,4),Jt=0,Dn=0,Nn=0,ra=1e3,Er,Ln,Fr=0,St=0,Ur=0,Tn=typeof performance=="object"&&performance.now?performance:Date,oa=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function oi(){return St||(oa(Fg),St=Tn.now()+Ur)}function Fg(){St=0}function br(){this._call=this._time=this._next=null}br.prototype=ia.prototype={constructor:br,restart:function(e,A,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?oi():+t)+(A==null?0:+A),!this._next&&Ln!==this&&(Ln?Ln._next=this:Er=this,Ln=this),this._call=e,this._time=t,ii()},stop:function(){this._call&&(this._call=null,this._time=1/0,ii())}};function ia(e,A,t){var n=new br;return n.restart(e,A,t),n}function Ug(){oi(),++Jt;for(var e=Er,A;e;)(A=St-e._time)>=0&&e._call.call(void 0,A),e=e._next;--Jt}function sa(){St=(Fr=Tn.now())+Ur,Jt=Dn=0;try{Ug()}finally{Jt=0,Hg(),St=0}}function bg(){var e=Tn.now(),A=e-Fr;A>ra&&(Ur-=A,Fr=e)}function Hg(){for(var e,A=Er,t,n=1/0;A;)A._call?(n>A._time&&(n=A._time),e=A,A=A._next):(t=A._next,A._next=null,A=e?e._next=t:Er=t);Ln=e,ii(n)}function ii(e){Jt||(Dn&&(Dn=clearTimeout(Dn)),e-St>24?(e<1/0&&(Dn=setTimeout(sa,e-Tn.now()-Ur)),Nn&&(Nn=clearInterval(Nn))):(Nn||(Fr=Tn.now(),Nn=setInterval(bg,ra)),Jt=1,oa(sa)))}function aa(e,A,t){var n=new br;return A=A==null?0:+A,n.restart(r=>{n.stop(),e(r+A)},A,t),n}var Ig=dr("start","end","cancel","interrupt"),_g=[],la=0,ca=1,si=2,Hr=3,ua=4,ai=5,Ir=6;function _r(e,A,t,n,r,a){var u=e.__transition;if(!u)e.__transition={};else if(t in u)return;Sg(e,t,{name:A,index:n,group:r,on:Ig,tween:_g,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:la})}function li(e,A){var t=ke(e,A);if(t.state>la)throw new Error("too late; already scheduled");return t}function Pe(e,A){var t=ke(e,A);if(t.state>Hr)throw new Error("too late; already running");return t}function ke(e,A){var t=e.__transition;if(!t||!(t=t[A]))throw new Error("transition not found");return t}function Sg(e,A,t){var n=e.__transition,r;n[A]=t,t.timer=ia(a,0,t.time);function a(h){t.state=ca,t.timer.restart(u,t.delay,t.time),t.delay<=h&&u(h-t.delay)}function u(h){var B,w,m,v;if(t.state!==ca)return g();for(B in n)if(v=n[B],v.name===t.name){if(v.state===Hr)return aa(u);v.state===ua?(v.state=Ir,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[B]):+B<A&&(v.state=Ir,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[B])}if(aa(function(){t.state===Hr&&(t.state=ua,t.timer.restart(d,t.delay,t.time),d(h))}),t.state=si,t.on.call("start",e,e.__data__,t.index,t.group),t.state===si){for(t.state=Hr,r=new Array(m=t.tween.length),B=0,w=-1;B<m;++B)(v=t.tween[B].value.call(e,e.__data__,t.index,t.group))&&(r[++w]=v);r.length=w+1}}function d(h){for(var B=h<t.duration?t.ease.call(null,h/t.duration):(t.timer.restart(g),t.state=ai,1),w=-1,m=r.length;++w<m;)r[w].call(e,B);t.state===ai&&(t.on.call("end",e,e.__data__,t.index,t.group),g())}function g(){t.state=Ir,t.timer.stop(),delete n[A];for(var h in n)return;delete e.__transition}}function Sr(e,A){var t=e.__transition,n,r,a=!0,u;if(t){A=A==null?null:A+"";for(u in t){if((n=t[u]).name!==A){a=!1;continue}r=n.state>si&&n.state<ai,n.state=Ir,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete t[u]}a&&delete e.__transition}}function xg(e){return this.each(function(){Sr(this,e)})}function Dg(e,A){var t,n;return function(){var r=Pe(this,e),a=r.tween;if(a!==t){n=t=a;for(var u=0,d=n.length;u<d;++u)if(n[u].name===A){n=n.slice(),n.splice(u,1);break}}r.tween=n}}function Ng(e,A,t){var n,r;if(typeof t!="function")throw new Error;return function(){var a=Pe(this,e),u=a.tween;if(u!==n){r=(n=u).slice();for(var d={name:A,value:t},g=0,h=r.length;g<h;++g)if(r[g].name===A){r[g]=d;break}g===h&&r.push(d)}a.tween=r}}function Lg(e,A){var t=this._id;if(e+="",arguments.length<2){for(var n=ke(this.node(),t).tween,r=0,a=n.length,u;r<a;++r)if((u=n[r]).name===e)return u.value;return null}return this.each((A==null?Dg:Ng)(t,e,A))}function ci(e,A,t){var n=e._id;return e.each(function(){var r=Pe(this,n);(r.value||(r.value={}))[A]=t.apply(this,arguments)}),function(r){return ke(r,n).value[A]}}function da(e,A){var t;return(typeof A=="number"?Ve:A instanceof Ht?vr:(t=Ht(A))?(A=t,vr):qs)(e,A)}function Tg(e){return function(){this.removeAttribute(e)}}function kg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Mg(e,A,t){var n,r=t+"",a;return function(){var u=this.getAttribute(e);return u===r?null:u===n?a:a=A(n=u,t)}}function Og(e,A,t){var n,r=t+"",a;return function(){var u=this.getAttributeNS(e.space,e.local);return u===r?null:u===n?a:a=A(n=u,t)}}function Kg(e,A,t){var n,r,a;return function(){var u,d=t(this),g;return d==null?void this.removeAttribute(e):(u=this.getAttribute(e),g=d+"",u===g?null:u===n&&g===r?a:(r=g,a=A(n=u,d)))}}function Rg(e,A,t){var n,r,a;return function(){var u,d=t(this),g;return d==null?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local),g=d+"",u===g?null:u===n&&g===r?a:(r=g,a=A(n=u,d)))}}function Vg(e,A){var t=gr(e),n=t==="transform"?vg:da;return this.attrTween(e,typeof A=="function"?(t.local?Rg:Kg)(t,n,ci(this,"attr."+e,A)):A==null?(t.local?kg:Tg)(t):(t.local?Og:Mg)(t,n,A))}function Pg(e,A){return function(t){this.setAttribute(e,A.call(this,t))}}function Gg(e,A){return function(t){this.setAttributeNS(e.space,e.local,A.call(this,t))}}function zg(e,A){var t,n;function r(){var a=A.apply(this,arguments);return a!==n&&(t=(n=a)&&Gg(e,a)),t}return r._value=A,r}function Xg(e,A){var t,n;function r(){var a=A.apply(this,arguments);return a!==n&&(t=(n=a)&&Pg(e,a)),t}return r._value=A,r}function $g(e,A){var t="attr."+e;if(arguments.length<2)return(t=this.tween(t))&&t._value;if(A==null)return this.tween(t,null);if(typeof A!="function")throw new Error;var n=gr(e);return this.tween(t,(n.local?zg:Xg)(n,A))}function Yg(e,A){return function(){li(this,e).delay=+A.apply(this,arguments)}}function Wg(e,A){return A=+A,function(){li(this,e).delay=A}}function Jg(e){var A=this._id;return arguments.length?this.each((typeof e=="function"?Yg:Wg)(A,e)):ke(this.node(),A).delay}function Zg(e,A){return function(){Pe(this,e).duration=+A.apply(this,arguments)}}function jg(e,A){return A=+A,function(){Pe(this,e).duration=A}}function qg(e){var A=this._id;return arguments.length?this.each((typeof e=="function"?Zg:jg)(A,e)):ke(this.node(),A).duration}function Ah(e,A){if(typeof A!="function")throw new Error;return function(){Pe(this,e).ease=A}}function eh(e){var A=this._id;return arguments.length?this.each(Ah(A,e)):ke(this.node(),A).ease}function th(e,A){return function(){var t=A.apply(this,arguments);if(typeof t!="function")throw new Error;Pe(this,e).ease=t}}function nh(e){if(typeof e!="function")throw new Error;return this.each(th(this._id,e))}function rh(e){typeof e!="function"&&(e=_s(e));for(var A=this._groups,t=A.length,n=new Array(t),r=0;r<t;++r)for(var a=A[r],u=a.length,d=n[r]=[],g,h=0;h<u;++h)(g=a[h])&&e.call(g,g.__data__,h,a)&&d.push(g);return new qe(n,this._parents,this._name,this._id)}function oh(e){if(e._id!==this._id)throw new Error;for(var A=this._groups,t=e._groups,n=A.length,r=t.length,a=Math.min(n,r),u=new Array(n),d=0;d<a;++d)for(var g=A[d],h=t[d],B=g.length,w=u[d]=new Array(B),m,v=0;v<B;++v)(m=g[v]||h[v])&&(w[v]=m);for(;d<n;++d)u[d]=A[d];return new qe(u,this._parents,this._name,this._id)}function ih(e){return(e+"").trim().split(/^|\s+/).every(function(A){var t=A.indexOf(".");return t>=0&&(A=A.slice(0,t)),!A||A==="start"})}function sh(e,A,t){var n,r,a=ih(A)?li:Pe;return function(){var u=a(this,e),d=u.on;d!==n&&(r=(n=d).copy()).on(A,t),u.on=r}}function ah(e,A){var t=this._id;return arguments.length<2?ke(this.node(),t).on.on(e):this.each(sh(t,e,A))}function lh(e){return function(){var A=this.parentNode;for(var t in this.__transition)if(+t!==e)return;A&&A.removeChild(this)}}function ch(){return this.on("end.remove",lh(this._id))}function uh(e){var A=this._name,t=this._id;typeof e!="function"&&(e=Yo(e));for(var n=this._groups,r=n.length,a=new Array(r),u=0;u<r;++u)for(var d=n[u],g=d.length,h=a[u]=new Array(g),B,w,m=0;m<g;++m)(B=d[m])&&(w=e.call(B,B.__data__,m,d))&&("__data__"in B&&(w.__data__=B.__data__),h[m]=w,_r(h[m],A,t,m,h,ke(B,t)));return new qe(a,this._parents,A,t)}function dh(e){var A=this._name,t=this._id;typeof e!="function"&&(e=Is(e));for(var n=this._groups,r=n.length,a=[],u=[],d=0;d<r;++d)for(var g=n[d],h=g.length,B,w=0;w<h;++w)if(B=g[w]){for(var m=e.call(B,B.__data__,w,g),v,y=ke(B,t),I=0,L=m.length;I<L;++I)(v=m[I])&&_r(v,A,t,I,m,y);a.push(m),u.push(B)}return new qe(a,u,A,t)}var fh=bn.prototype.constructor;function gh(){return new fh(this._groups,this._parents)}function hh(e,A){var t,n,r;return function(){var a=$t(this,e),u=(this.style.removeProperty(e),$t(this,e));return a===u?null:a===t&&u===n?r:r=A(t=a,n=u)}}function fa(e){return function(){this.style.removeProperty(e)}}function Bh(e,A,t){var n,r=t+"",a;return function(){var u=$t(this,e);return u===r?null:u===n?a:a=A(n=u,t)}}function ph(e,A,t){var n,r,a;return function(){var u=$t(this,e),d=t(this),g=d+"";return d==null&&(g=d=(this.style.removeProperty(e),$t(this,e))),u===g?null:u===n&&g===r?a:(r=g,a=A(n=u,d))}}function mh(e,A){var t,n,r,a="style."+A,u="end."+a,d;return function(){var g=Pe(this,e),h=g.on,B=g.value[a]==null?d||(d=fa(A)):void 0;(h!==t||r!==B)&&(n=(t=h).copy()).on(u,r=B),g.on=n}}function wh(e,A,t){var n=(e+="")=="transform"?Cg:da;return A==null?this.styleTween(e,hh(e,n)).on("end.style."+e,fa(e)):typeof A=="function"?this.styleTween(e,ph(e,n,ci(this,"style."+e,A))).each(mh(this._id,e)):this.styleTween(e,Bh(e,n,A),t).on("end.style."+e,null)}function Ch(e,A,t){return function(n){this.style.setProperty(e,A.call(this,n),t)}}function vh(e,A,t){var n,r;function a(){var u=A.apply(this,arguments);return u!==r&&(n=(r=u)&&Ch(e,u,t)),n}return a._value=A,a}function yh(e,A,t){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(A==null)return this.tween(n,null);if(typeof A!="function")throw new Error;return this.tween(n,vh(e,A,t??""))}function Qh(e){return function(){this.textContent=e}}function Eh(e){return function(){var A=e(this);this.textContent=A??""}}function Fh(e){return this.tween("text",typeof e=="function"?Eh(ci(this,"text",e)):Qh(e==null?"":e+""))}function Uh(e){return function(A){this.textContent=e.call(this,A)}}function bh(e){var A,t;function n(){var r=e.apply(this,arguments);return r!==t&&(A=(t=r)&&Uh(r)),A}return n._value=e,n}function Hh(e){var A="text";if(arguments.length<1)return(A=this.tween(A))&&A._value;if(e==null)return this.tween(A,null);if(typeof e!="function")throw new Error;return this.tween(A,bh(e))}function Ih(){for(var e=this._name,A=this._id,t=ga(),n=this._groups,r=n.length,a=0;a<r;++a)for(var u=n[a],d=u.length,g,h=0;h<d;++h)if(g=u[h]){var B=ke(g,A);_r(g,e,t,h,u,{time:B.time+B.delay+B.duration,delay:0,duration:B.duration,ease:B.ease})}return new qe(n,this._parents,e,t)}function _h(){var e,A,t=this,n=t._id,r=t.size();return new Promise(function(a,u){var d={value:u},g={value:function(){--r===0&&a()}};t.each(function(){var h=Pe(this,n),B=h.on;B!==e&&(A=(e=B).copy(),A._.cancel.push(d),A._.interrupt.push(d),A._.end.push(g)),h.on=A}),r===0&&a()})}var Sh=0;function qe(e,A,t,n){this._groups=e,this._parents=A,this._name=t,this._id=n}function ga(){return++Sh}var At=bn.prototype;qe.prototype={constructor:qe,select:uh,selectAll:dh,selectChild:At.selectChild,selectChildren:At.selectChildren,filter:rh,merge:oh,selection:gh,transition:Ih,call:At.call,nodes:At.nodes,node:At.node,size:At.size,empty:At.empty,each:At.each,on:ah,attr:Vg,attrTween:$g,style:wh,styleTween:yh,text:Fh,textTween:Hh,remove:ch,tween:Lg,delay:Jg,duration:qg,ease:eh,easeVarying:nh,end:_h,[Symbol.iterator]:At[Symbol.iterator]};function xh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Dh={time:null,delay:0,duration:250,ease:xh};function Nh(e,A){for(var t;!(t=e.__transition)||!(t=t[A]);)if(!(e=e.parentNode))throw new Error(`transition ${A} not found`);return t}function Lh(e){var A,t;e instanceof qe?(A=e._id,e=e._name):(A=ga(),(t=Dh).time=oi(),e=e==null?null:e+"");for(var n=this._groups,r=n.length,a=0;a<r;++a)for(var u=n[a],d=u.length,g,h=0;h<d;++h)(g=u[h])&&_r(g,e,A,h,u,t||Nh(g,A));return new qe(n,this._parents,e,A)}bn.prototype.interrupt=xg,bn.prototype.transition=Lh;var xr=e=>()=>e;function Th(e,{sourceEvent:A,target:t,transform:n,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:A,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:r}})}function et(e,A,t){this.k=e,this.x=A,this.y=t}et.prototype={constructor:et,scale:function(e){return e===1?this:new et(this.k*e,this.x,this.y)},translate:function(e,A){return e===0&A===0?this:new et(this.k,this.x+this.k*e,this.y+this.k*A)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Zt=new et(1,0,0);et.prototype;function ui(e){e.stopImmediatePropagation()}function kn(e){e.preventDefault(),e.stopImmediatePropagation()}function kh(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Mh(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function ha(){return this.__zoom||Zt}function Oh(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Kh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Rh(e,A,t){var n=e.invertX(A[0][0])-t[0][0],r=e.invertX(A[1][0])-t[1][0],a=e.invertY(A[0][1])-t[0][1],u=e.invertY(A[1][1])-t[1][1];return e.translate(r>n?(n+r)/2:Math.min(0,n)||Math.max(0,r),u>a?(a+u)/2:Math.min(0,a)||Math.max(0,u))}function Vh(){var e=kh,A=Mh,t=Rh,n=Oh,r=Kh,a=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],d=250,g=Qr,h=dr("start","zoom","end"),B,w,m,v=500,y=150,I=0,L=10;function T(H){H.property("__zoom",ha).on("wheel.zoom",lA,{passive:!1}).on("mousedown.zoom",iA).on("dblclick.zoom",oA).filter(r).on("touchstart.zoom",tA).on("touchmove.zoom",x).on("touchend.zoom touchcancel.zoom",eA).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}T.transform=function(H,X,F,D){var k=H.selection?H.selection():H;k.property("__zoom",ha),H!==k?aA(H,X,F,D):k.interrupt().each(function(){Z(this,arguments).event(D).start().zoom(null,typeof X=="function"?X.apply(this,arguments):X).end()})},T.scaleBy=function(H,X,F,D){T.scaleTo(H,function(){return this.__zoom.k*(typeof X=="function"?X.apply(this,arguments):X)},F,D)},T.scaleTo=function(H,X,F,D){T.transform(H,function(){var k=A.apply(this,arguments),N=this.__zoom,R=F==null?O(k):typeof F=="function"?F.apply(this,arguments):F,$=N.invert(R),nA=typeof X=="function"?X.apply(this,arguments):X;return t(b(K(N,nA),R,$),k,u)},F,D)},T.translateBy=function(H,X,F,D){T.transform(H,function(){return t(this.__zoom.translate(typeof X=="function"?X.apply(this,arguments):X,typeof F=="function"?F.apply(this,arguments):F),A.apply(this,arguments),u)},null,D)},T.translateTo=function(H,X,F,D,k){T.transform(H,function(){var N=A.apply(this,arguments),R=this.__zoom,$=D==null?O(N):typeof D=="function"?D.apply(this,arguments):D;return t(Zt.translate($[0],$[1]).scale(R.k).translate(typeof X=="function"?-X.apply(this,arguments):-X,typeof F=="function"?-F.apply(this,arguments):-F),N,u)},D,k)};function K(H,X){return X=Math.max(a[0],Math.min(a[1],X)),X===H.k?H:new et(X,H.x,H.y)}function b(H,X,F){var D=X[0]-F[0]*H.k,k=X[1]-F[1]*H.k;return D===H.x&&k===H.y?H:new et(H.k,D,k)}function O(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function aA(H,X,F,D){H.on("start.zoom",function(){Z(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){Z(this,arguments).event(D).end()}).tween("zoom",function(){var k=this,N=arguments,R=Z(k,N).event(D),$=A.apply(k,N),nA=F==null?O($):typeof F=="function"?F.apply(k,N):F,BA=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),FA=k.__zoom,sA=typeof X=="function"?X.apply(k,N):X,Y=g(FA.invert(nA).concat(BA/FA.k),sA.invert(nA).concat(BA/sA.k));return function(J){if(J===1)J=sA;else{var uA=Y(J),wA=BA/uA[2];J=new et(wA,nA[0]-uA[0]*wA,nA[1]-uA[1]*wA)}R.zoom(null,J)}})}function Z(H,X,F){return!F&&H.__zooming||new cA(H,X)}function cA(H,X){this.that=H,this.args=X,this.active=0,this.sourceEvent=null,this.extent=A.apply(H,X),this.taps=0}cA.prototype={event:function(H){return H&&(this.sourceEvent=H),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(H,X){return this.mouse&&H!=="mouse"&&(this.mouse[1]=X.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=X.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=X.invert(this.touch1[0])),this.that.__zoom=X,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var X=Le(this.that).datum();h.call(H,this.that,new Th(H,{sourceEvent:this.sourceEvent,target:T,type:H,transform:this.that.__zoom,dispatch:h}),X)}};function lA(H,...X){if(!e.apply(this,arguments))return;var F=Z(this,X).event(H),D=this.__zoom,k=Math.max(a[0],Math.min(a[1],D.k*Math.pow(2,n.apply(this,arguments)))),N=Ke(H);if(F.wheel)(F.mouse[0][0]!==N[0]||F.mouse[0][1]!==N[1])&&(F.mouse[1]=D.invert(F.mouse[0]=N)),clearTimeout(F.wheel);else{if(D.k===k)return;F.mouse=[N,D.invert(N)],Sr(this),F.start()}kn(H),F.wheel=setTimeout(R,y),F.zoom("mouse",t(b(K(D,k),F.mouse[0],F.mouse[1]),F.extent,u));function R(){F.wheel=null,F.end()}}function iA(H,...X){if(m||!e.apply(this,arguments))return;var F=H.currentTarget,D=Z(this,X,!0).event(H),k=Le(H.view).on("mousemove.zoom",nA,!0).on("mouseup.zoom",BA,!0),N=Ke(H,F),R=H.clientX,$=H.clientY;Ks(H.view),ui(H),D.mouse=[N,this.__zoom.invert(N)],Sr(this),D.start();function nA(FA){if(kn(FA),!D.moved){var sA=FA.clientX-R,Y=FA.clientY-$;D.moved=sA*sA+Y*Y>I}D.event(FA).zoom("mouse",t(b(D.that.__zoom,D.mouse[0]=Ke(FA,F),D.mouse[1]),D.extent,u))}function BA(FA){k.on("mousemove.zoom mouseup.zoom",null),Rs(FA.view,D.moved),kn(FA),D.event(FA).end()}}function oA(H,...X){if(e.apply(this,arguments)){var F=this.__zoom,D=Ke(H.changedTouches?H.changedTouches[0]:H,this),k=F.invert(D),N=F.k*(H.shiftKey?.5:2),R=t(b(K(F,N),D,k),A.apply(this,X),u);kn(H),d>0?Le(this).transition().duration(d).call(aA,R,D,H):Le(this).call(T.transform,R,D,H)}}function tA(H,...X){if(e.apply(this,arguments)){var F=H.touches,D=F.length,k=Z(this,X,H.changedTouches.length===D).event(H),N,R,$,nA;for(ui(H),R=0;R<D;++R)$=F[R],nA=Ke($,this),nA=[nA,this.__zoom.invert(nA),$.identifier],k.touch0?!k.touch1&&k.touch0[2]!==nA[2]&&(k.touch1=nA,k.taps=0):(k.touch0=nA,N=!0,k.taps=1+!!B);B&&(B=clearTimeout(B)),N&&(k.taps<2&&(w=nA[0],B=setTimeout(function(){B=null},v)),Sr(this),k.start())}}function x(H,...X){if(this.__zooming){var F=Z(this,X).event(H),D=H.changedTouches,k=D.length,N,R,$,nA;for(kn(H),N=0;N<k;++N)R=D[N],$=Ke(R,this),F.touch0&&F.touch0[2]===R.identifier?F.touch0[0]=$:F.touch1&&F.touch1[2]===R.identifier&&(F.touch1[0]=$);if(R=F.that.__zoom,F.touch1){var BA=F.touch0[0],FA=F.touch0[1],sA=F.touch1[0],Y=F.touch1[1],J=(J=sA[0]-BA[0])*J+(J=sA[1]-BA[1])*J,uA=(uA=Y[0]-FA[0])*uA+(uA=Y[1]-FA[1])*uA;R=K(R,Math.sqrt(J/uA)),$=[(BA[0]+sA[0])/2,(BA[1]+sA[1])/2],nA=[(FA[0]+Y[0])/2,(FA[1]+Y[1])/2]}else if(F.touch0)$=F.touch0[0],nA=F.touch0[1];else return;F.zoom("touch",t(b(R,$,nA),F.extent,u))}}function eA(H,...X){if(this.__zooming){var F=Z(this,X).event(H),D=H.changedTouches,k=D.length,N,R;for(ui(H),m&&clearTimeout(m),m=setTimeout(function(){m=null},v),N=0;N<k;++N)R=D[N],F.touch0&&F.touch0[2]===R.identifier?delete F.touch0:F.touch1&&F.touch1[2]===R.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(R=Ke(R,this),Math.hypot(w[0]-R[0],w[1]-R[1])<L)){var $=Le(this).on("dblclick.zoom");$&&$.apply(this,arguments)}}}return T.wheelDelta=function(H){return arguments.length?(n=typeof H=="function"?H:xr(+H),T):n},T.filter=function(H){return arguments.length?(e=typeof H=="function"?H:xr(!!H),T):e},T.touchable=function(H){return arguments.length?(r=typeof H=="function"?H:xr(!!H),T):r},T.extent=function(H){return arguments.length?(A=typeof H=="function"?H:xr([[+H[0][0],+H[0][1]],[+H[1][0],+H[1][1]]]),T):A},T.scaleExtent=function(H){return arguments.length?(a[0]=+H[0],a[1]=+H[1],T):[a[0],a[1]]},T.translateExtent=function(H){return arguments.length?(u[0][0]=+H[0][0],u[1][0]=+H[1][0],u[0][1]=+H[0][1],u[1][1]=+H[1][1],T):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},T.constrain=function(H){return arguments.length?(t=H,T):t},T.duration=function(H){return arguments.length?(d=+H,T):d},T.interpolate=function(H){return arguments.length?(g=H,T):g},T.on=function(){var H=h.on.apply(h,arguments);return H===h?T:H},T.clickDistance=function(H){return arguments.length?(I=(H=+H)*H,T):Math.sqrt(I)},T.tapDistance=function(H){return arguments.length?(L=+H,T):L},T}var IA=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(IA||{}),di=(e=>(e.Partial="partial",e.Full="full",e))(di||{}),xt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(xt||{}),tt=(e=>(e.Strict="strict",e.Loose="loose",e))(tt||{}),nt=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(nt||{}),Mn=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Mn||{}),Ba=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(Ba||{}),Ph=["INPUT","SELECT","TEXTAREA"],Gh=typeof document<"u"?document:null;function fi(e){var A,t;const n=((t=(A=e.composedPath)==null?void 0:A.call(e))==null?void 0:t[0])||e.target,r=typeof n?.hasAttribute=="function"?n.hasAttribute("contenteditable"):!1,a=typeof n?.closest=="function"?n.closest(".nokey"):null;return Ph.includes(n?.nodeName)||r||!!a}function zh(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function pa(e,A,t,n){const r=A.replace("+",`
|
|
1
|
+
(function(ne,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("@a2simcode/ui")):typeof define=="function"&&define.amd?define(["exports","vue","@a2simcode/ui"],o):(ne=typeof globalThis<"u"?globalThis:ne||self,o(ne.DuiUI={},ne.Vue,ne.SimCodeUI))})(this,function(ne,o,me){Object.defineProperties(ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var bu=Object.create,ur=Object.defineProperty,Hu=Object.getOwnPropertyDescriptor,Iu=Object.getOwnPropertyNames,_u=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty,xu=(e,A)=>()=>(A||(e((A={exports:{}}).exports,A),e=null),A.exports),Du=(e,A)=>{let t={};for(var n in e)ur(t,n,{get:e[n],enumerable:!0});return A||ur(t,Symbol.toStringTag,{value:"Module"}),t},ko=(e,A,t,n)=>{if(A&&typeof A=="object"||typeof A=="function")for(var r=Iu(A),a=0,u=r.length,d;a<u;a++)d=r[a],!Su.call(e,d)&&d!==t&&ur(e,d,{get:(g=>A[g]).bind(null,d),enumerable:!(n=Hu(A,d))||n.enumerable});return e},Nu=(e,A,t)=>(ko(e,A,"default"),t&&ko(t,A,"default")),Bs=(e,A,t)=>(t=e!=null?bu(_u(e)):{},ko(A||!e||!e.__esModule?ur(t,"default",{value:e,enumerable:!0}):t,e));o=Bs(o,1);var dt=(e,A)=>(e.install=t=>{t.component(e.name,e),A&&A.forEach(n=>{t.component(n.name,n)})},e),ft=(e="")=>{const A=Date.now(),t=Math.floor(Math.random()*1e9);return e===""?String(t)+String(A):e+"_"+t+String(A)},zt=e=>{if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(zt);const A={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=zt(e[t]));return A},Lu=e=>{if(Array.isArray(e))e.length=0;else if(e&&typeof e=="object")for(const A in e)Object.prototype.hasOwnProperty.call(e,A)&&delete e[A]},Mo={},Tu=(e,A,t)=>{t[e]=t[e]||{};const n=ft();return t[e][n]=A,n},ku=(e,A,t)=>{const n=[],r=t[e]||{};return Object.keys(r).forEach(a=>{const u=r[a];try{u&&n.push(u(A))}catch(d){console.error(d)}}),n},Mu=(e,A,t)=>{if(A){const n=t[e];n&&delete n[A]}else delete t[e]},ps=(e,A)=>Tu(e,A,Mo),re=(e,A)=>ku(e,A,Mo),Ou=(e,A)=>{Mu(e,A,Mo)},ms=(e,A,t,n,r,a)=>{const u=A.id,d=A.level,{getDesignLocals:g,selectComponent:h,getComponent:B,isMyChildComponent:w,addComponent:m,deleteComponent:v,getParentComponents:y,removeComponentFromContainer:I,addComponentToContainer:L,copyComponent:T,activedComponent:K,top:b}=(0,o.inject)("d-drag-design-provide",{}),O=[],aA=(0,o.ref)(!1),Z=(0,o.ref)(!1),cA=(0,o.ref)(!1),lA=(0,o.ref)(!1),iA=(0,o.ref)(!1),oA={id:"",type:""},tA=(0,o.ref)(!1),x=(0,o.ref)(!1);let eA="",H=null;const X=J=>{if(eA===J)return H;eA=J;const{top:uA,left:wA,width:QA,height:_A}=e.value.getBoundingClientRect();return H=[{x:wA,y:uA},{x:wA+QA,y:uA},{x:wA+QA,y:uA+_A},{x:wA,y:uA+_A}],H},F=(J,uA,wA)=>{let QA=uA-wA[0].y;QA<0&&(QA=-QA);let _A=uA-wA[3].y;_A<0&&(_A=-_A);let gA=J-wA[0].x;gA<0&&(gA=-gA);let j=J-wA[1].x;return j<0&&(j=-j),{ly:QA>_A?_A:QA,typey:QA>_A?"bottom":"top",lx:gA>j?j:gA,lallx:gA+j}},D=(J,uA,wA)=>J>=wA[0].x&&J<=wA[1].x&&uA>=wA[0].y&&uA<=wA[3].y,k=()=>{if(r){re("dragClick",{id:u});return}if(!Z.value){if(h(u),d!==0){const J=e.value.getBoundingClientRect(),uA=g();J.top-uA.top<22?lA.value=!0:lA.value=!1}Z.value=!0,re("dragClick",{id:u})}},N=J=>{const uA=v(J);uA&&(0,o.nextTick)(()=>{re("dragClick",{id:uA})})},R=()=>{oA.id="",oA.type="",d===0&&(iA.value=!1)},$=()=>{re("mouseEnterOrLeave",{id:u,type:"enter"})},nA=()=>{re("mouseEnterOrLeave",{id:u,type:"leave"})},BA=J=>{re("dragClick",{id:J})},FA={mouseEnterOrLeave:({id:J,type:uA})=>{uA==="enter"?O.push(J):O.length>0&&O.splice(O.length-1,1);const wA=O.length;wA>0&&u===O[wA-1]?aA.value=!0:aA.value=!1},dragAciveChild:({type:J,id:uA})=>{uA===u?J==="top"?(tA.value=!0,x.value=!1):(x.value=!0,tA.value=!1):(x.value=!1,tA.value=!1)},dragClick({id:J,isAgain:uA}){J!==u?Z.value=!1:(uA&&(Z.value=!1),k())}};FA[`dragGetChildDistance_${u}`]=({dragX:J,dragY:uA,moveId:wA})=>F(J,uA,X(wA));const sA={isInContainer({x:J,y:uA,id:wA,moveId:QA}){if(u===wA||w(wA,u))return cA.value=!1,{isIn:!1,level:d,id:u,groupId:a};const _A=X(QA);if(D(J,uA,_A))return d===0&&(iA.value=!0),{isIn:!0,level:d,id:u,groupId:a};if(d===0){const{ly:gA,lx:j}=F(J,uA,_A);if(gA<20&&j<20)return iA.value=!0,{isIn:!0,level:d,id:u,groupId:a};iA.value=!1}return cA.value=!1,{isIn:!1,level:d,id:u,groupId:a}},dragActiveContainer:({containerId:J,containerGroupId:uA,dragX:wA,dragY:QA,moveId:_A})=>{if(J===u&&uA===a)if(cA.value=!0,n&&n.value.length>0){let gA={ly:9999999,lx:0,lallx:0,id:"",typey:""};n?.value.forEach(j=>{if(a&&j.groupId!==a)return;const _=re(`dragGetChildDistance_${j.id}`,{dragX:wA,dragY:QA,moveId:_A})[0];_&&(gA.ly>_.ly||gA.ly===_.ly&&(gA.lx>_.lx||gA.lx===_.lx&&gA.lallx>_.lallx))&&(gA=_,gA.id=j.id)}),oA.id=gA.id,oA.type=gA.typey,re("dragAciveChild",{id:gA.id,type:gA.typey})}else re("dragAciveChild",{id:""});else cA.value=!1},dragAdd:J=>{if(cA.value){let uA=n?.value.length||0;oA.id!==""&&oA.id!==void 0&&(uA=n?.value.findIndex(wA=>wA.id===oA.id)||0,oA.type==="bottom"&&(uA+=1)),m(J,u,uA,a),cA.value=!1}R()},dragAddByClick:J=>{if(!K.value&&u===b.id||K.value?.id===u||K.value?.containerId===u&&K.value?.dragType!=="container"){const uA=m(J,u,n?.value.length||0,a,!0);uA&&J.config&&Object.keys(J.config).forEach(wA=>{uA.config[wA]=J.config[wA]})}},dragUpdate(J){if(cA.value){const uA=B(J);if(uA.level=d+1,oA.id!==uA.id){I(uA.containerId,J);let wA=n?.value.findIndex(QA=>QA.id===oA.id)||0;oA.type==="bottom"&&(wA+=1),L(uA,u,wA,a)}cA.value=!1,(0,o.nextTick)(()=>{re("dragClick",{id:uA.id,isAgain:!0})})}R()}},Y={};return(0,o.onMounted)(()=>{(!r||t!=="container")&&Object.keys(FA).forEach(J=>{Y[J]=ps(J,FA[J])}),t==="container"&&Object.keys(sA).forEach(J=>{Y[J]=ps(J,sA[J])}),A.isNewAdd&&(0,o.nextTick)(()=>{k(),delete A.isNewAdd})}),(0,o.onUnmounted)(()=>{Object.keys(Y).forEach(J=>{Ou(J,Y[J])})}),{onMouseenter:$,onMouseleave:nA,activeComponent:k,handleComponentClick:BA,deleteComponentByClick:N,copyComponent:T,getParentComponents:y,isBottomToolBar:lA,isHover:aA,isSelect:Z,isToContainer:cA,isMoveingInTopLevel:iA,isTopActive:tA,isBottomActive:x}},ws=(e,A)=>{const t={x:0,y:0,clientX:0,clientY:0,dragElement:null,dragElementId:"jcode-darg-move-id",toContainerLevel:-1,toContainerId:"",groupId:"",id:""};let n=!1;const r=(v,y)=>{n!==!0&&(n=!0,setTimeout(()=>{v(),n=!1},y))},a=(0,o.ref)(!1),u=(v,y,I)=>{const L=document.createElement("div");return L.id=t.dragElementId,L.innerText=v,L.className="d-drag-move",L.style.top=`${y}px`,L.style.left=`${I}px`,document.body.appendChild(L),L},d=()=>{document.onmousemove=null,document.onmouseup=null,a.value=!1,re("dragAciveChild",{id:""})},g=()=>{d(),t.dragElement&&(t.dragElement.remove(),t.dragElement=null,A?re("dragAdd",e):re("dragUpdate",e.id))},h=v=>{const{clientY:y,clientX:I}=v;if(!t.dragElement){const L=Math.abs(t.x-I),T=Math.abs(t.y-y);if(L<=1&&T<=1)return;a.value=!0,t.dragElement=u(e.name,y-11,I-32)}t.dragElement.style.top=`${y-11}px`,t.dragElement.style.left=`${I-32}px`,t.clientX=I,t.clientY=y,r(()=>{if(!a.value)return;const L=re("isInContainer",{x:I,y,id:e.id,moveId:t.id});t.toContainerLevel=-1,t.toContainerId="",t.groupId="",L.forEach(({level:T,id:K,isIn:b,groupId:O})=>{b&&t.toContainerLevel<T&&(t.toContainerLevel=T,t.toContainerId=K,t.groupId=O)}),t.toContainerId!==""?re("dragActiveContainer",{containerId:t.toContainerId,containerGroupId:t.groupId,dragX:I,dragY:y,moveId:t.id}):re("dragAciveChild",{id:""})},100)};return{onContextmenu:()=>{d()},onMousedown:v=>{t.x=v.clientX,t.y=v.clientY,t.id=ft(),document.onmouseup=g,document.onmousemove=h},onClick:()=>{re("dragAddByClick",e)},moveActive:a}},Ku={class:"d-drag-btns-pname"},Ru={key:0,class:"d-drag-mask"},Vu=(0,o.defineComponent)({name:"DDrag",__name:"drag",props:{componentData:{default:()=>({})},isContainer:{type:Boolean,default:!1}},setup(e){const A=e,t=(0,o.ref)(),{onMouseenter:n,onMouseleave:r,activeComponent:a,handleComponentClick:u,deleteComponentByClick:d,copyComponent:g,getParentComponents:h,isHover:B,isSelect:w,isTopActive:m,isBottomActive:v,isBottomToolBar:y}=ms(t,A.componentData,"component"),{onContextmenu:I,onMousedown:L,moveActive:T}=ws(A.componentData,!1);return(K,b)=>{const O=(0,o.resolveComponent)("j-button"),aA=(0,o.resolveComponent)("el-space");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(["d-drag-component",{selected:(0,o.unref)(w),hovered:(0,o.unref)(B),isBottomToolBar:(0,o.unref)(y),active:(0,o.unref)(T),isTopActive:(0,o.unref)(m),isBottomActive:(0,o.unref)(v)}])},[b[11]||(b[11]=(0,o.createElementVNode)("div",{class:"d-drag-line"},null,-1)),(0,o.createElementVNode)("div",{class:"d-drag-btns",onMouseenter:b[4]||(b[4]=(...Z)=>(0,o.unref)(n)&&(0,o.unref)(n)(...Z)),onMouseleave:b[5]||(b[5]=(...Z)=>(0,o.unref)(r)&&(0,o.unref)(r)(...Z))},[(0,o.createVNode)(aA,{size:4},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("div",{class:"d-drag-btns-names",onClick:(0,o.withModifiers)(()=>{},["stop"])},[(0,o.createVNode)(O,{class:"d-drag-btn",type:"primary",size:"small",label:e.componentData.name},null,8,["label"]),(0,o.createElementVNode)("div",Ku,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)((0,o.unref)(h)(e.componentData.containerId),Z=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:Z.id},[(0,o.createVNode)(O,{class:"d-drag-btn",type:"primary",size:"small",label:Z.name,onClick:cA=>(0,o.unref)(u)(Z.id)},null,8,["label","onClick"])]))),128))])]),(0,o.createVNode)(O,{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:content-copy",onClick:b[0]||(b[0]=(0,o.withModifiers)(Z=>(0,o.unref)(g)(e.componentData.id),["stop"]))}),(0,o.createElementVNode)("div",{onContextmenu:b[1]||(b[1]=(0,o.withModifiers)((...Z)=>(0,o.unref)(I)&&(0,o.unref)(I)(...Z),["stop"])),onMousedown:b[2]||(b[2]=(0,o.withModifiers)((...Z)=>(0,o.unref)(L)&&(0,o.unref)(L)(...Z),["stop"])),style:{display:"flex"}},[(0,o.createVNode)(O,{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:drag"})],32),(0,o.createVNode)(O,{class:"d-drag-btn",status:"danger",type:"primary",size:"small",icon:"mdi:delete",onClick:b[3]||(b[3]=(0,o.withModifiers)(Z=>(0,o.unref)(d)(e.componentData.id),["stop"]))})]),_:1})],32),(0,o.createElementVNode)("div",{ref_key:"refDrag",ref:t,class:"d-drag-body",onClick:b[6]||(b[6]=(0,o.withModifiers)((...Z)=>(0,o.unref)(a)&&(0,o.unref)(a)(...Z),["stop"])),onContextmenu:b[7]||(b[7]=(0,o.withModifiers)((...Z)=>(0,o.unref)(I)&&(0,o.unref)(I)(...Z),["stop"])),onMousedown:b[8]||(b[8]=(0,o.withModifiers)((...Z)=>(0,o.unref)(L)&&(0,o.unref)(L)(...Z),["stop"])),onMouseenter:b[9]||(b[9]=(...Z)=>(0,o.unref)(n)&&(0,o.unref)(n)(...Z)),onMouseleave:b[10]||(b[10]=(...Z)=>(0,o.unref)(r)&&(0,o.unref)(r)(...Z))},[(0,o.renderSlot)(K.$slots,"default"),e.isContainer?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Ru))],544)],2)}}}),Oo=Vu,Pu=(0,o.defineComponent)({name:"DDragTool",__name:"tool",props:{config:{}},setup(e){const{onContextmenu:A,onMousedown:t,onClick:n}=ws(e.config??{name:"",id:""},!0);return(r,a)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"d-drag-tool",onClick:a[0]||(a[0]=(0,o.withModifiers)((...u)=>(0,o.unref)(n)&&(0,o.unref)(n)(...u),["stop"])),onContextmenu:a[1]||(a[1]=(0,o.withModifiers)((...u)=>(0,o.unref)(A)&&(0,o.unref)(A)(...u),["stop"])),onMousedown:a[2]||(a[2]=(0,o.withModifiers)((...u)=>(0,o.unref)(t)&&(0,o.unref)(t)(...u),["stop"]))},[(0,o.renderSlot)(r.$slots,"default")],32))}}),Ko=Pu,Gu={key:0,class:"d-drag-line"},zu={key:1,class:"d-drag-btns"},Xu=(0,o.defineComponent)({name:"DDragContainer",__name:"container",props:{componentData:{default:()=>({})},isComponentContainer:{type:Boolean,default:!0},groupId:{default:void 0}},setup(e){const A=e,t=(0,o.ref)(),n=(0,o.computed)(()=>A.componentData?.children||[]),{onMouseenter:r,onMouseleave:a,activeComponent:u,isHover:d,isSelect:g,isToContainer:h,isMoveingInTopLevel:B,isTopActive:w,isBottomActive:m}=ms(t,A.componentData,"container",n,A.isComponentContainer,A.groupId),v=(0,o.computed)(()=>!!(n.value.findIndex(y=>y.groupId===A.groupId)===-1&&h.value));return(y,I)=>{const L=(0,o.resolveComponent)("j-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{ref_key:"refDrag",ref:t,class:(0,o.normalizeClass)(["d-drag-container",{selected:(0,o.unref)(g)&&!e.isComponentContainer,hovered:(0,o.unref)(d)&&!e.isComponentContainer,isTopLevel:e.componentData.level===0,active:v.value,isMoveingInTopLevel:(0,o.unref)(B),isTopActive:(0,o.unref)(w),isBottomActive:(0,o.unref)(m)}])},[e.isComponentContainer?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Gu)),e.isComponentContainer?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",zu,[(0,o.createElementVNode)("div",{class:"d-drag-btns-names",onClick:(0,o.withModifiers)(()=>{},["stop"])},[(0,o.createVNode)(L,{class:"d-drag-btn",type:"primary",size:"small",label:e.componentData.name},null,8,["label"])])])),(0,o.createElementVNode)("div",{class:"d-drag-body",onClick:I[0]||(I[0]=(0,o.withModifiers)((...T)=>(0,o.unref)(u)&&(0,o.unref)(u)(...T),["stop"])),onMouseenter:I[1]||(I[1]=(...T)=>(0,o.unref)(r)&&(0,o.unref)(r)(...T)),onMouseleave:I[2]||(I[2]=(...T)=>(0,o.unref)(a)&&(0,o.unref)(a)(...T))},[(0,o.renderSlot)(y.$slots,"default")],32)],2)}}}),Ro=Xu,$u=(0,o.defineComponent)({name:"DDragFormList",__name:"dragFormList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(e){const{designItemName:A}=(0,o.inject)("dui-design-provide",{});return(t,n)=>{const r=(0,o.resolveComponent)("el-col");return(0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.componentList,a=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:a.id},[a.type!="pkey"?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,span:a.config.span||24},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(Oo,{"is-container":a.dragType!=="component","component-data":a},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)((0,o.unref)(A)),{"component-data":a,"global-config":e.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["is-container","component-data"])]),_:2},1032,["span"])):(0,o.createCommentVNode)("",!0)],64))),128)}}}),Vo=$u,Yu=(0,o.defineComponent)({name:"DDragIndexList",__name:"dragIndexList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(e){const{designItemName:A}=(0,o.inject)("dui-design-provide",{}),t=n=>{if(n.flexWidth)return{width:n.flexWidth+"%"}};return(n,r)=>((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.componentList,a=>((0,o.openBlock)(),(0,o.createBlock)(Oo,{key:a.id,style:(0,o.normalizeStyle)(t(a.config)),"is-container":a.dragType!=="component","component-data":a},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)((0,o.unref)(A)),{"component-data":a,"global-config":e.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["style","is-container","component-data"]))),128))}}),Po=Yu,Cs=dt(Oo,[Ko,Ro,Vo,Po]);function Un(e){return(0,o.getCurrentScope)()?((0,o.onScopeDispose)(e),!0):!1}function je(e){return typeof e=="function"?e():(0,o.unref)(e)}var Wu=typeof window<"u"&&typeof document<"u",Ju=e=>typeof e<"u",Zu=Object.prototype.toString,ju=e=>Zu.call(e)==="[object Object]",qu=()=>{};function Ad(e,A){function t(...n){return new Promise((r,a)=>{Promise.resolve(e(()=>A.apply(this,n),{fn:A,thisArg:this,args:n})).then(r).catch(a)})}return t}var vs=e=>e();function ed(e=vs){const A=(0,o.ref)(!0);function t(){A.value=!1}function n(){A.value=!0}const r=(...a)=>{A.value&&e(...a)};return{isActive:(0,o.readonly)(A),pause:t,resume:n,eventFilter:r}}function ys(e,A=!1,t="Timeout"){return new Promise((n,r)=>{setTimeout(A?()=>r(t):n,e)})}function td(e,A,t={}){const{eventFilter:n=vs,...r}=t;return(0,o.watch)(e,Ad(n,A),r)}function Xt(e,A,t={}){const{eventFilter:n,...r}=t,{eventFilter:a,pause:u,resume:d,isActive:g}=ed(n);return{stop:td(e,A,{...r,eventFilter:a}),pause:u,resume:d,isActive:g}}function nd(e,A={}){if(!(0,o.isRef)(e))return(0,o.toRefs)(e);const t=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)t[n]=(0,o.customRef)(()=>({get(){return e.value[n]},set(r){var a;if((a=je(A.replaceRef))==null||a)if(Array.isArray(e.value)){const u=[...e.value];u[n]=r,e.value=u}else{const u={...e.value,[n]:r};Object.setPrototypeOf(u,Object.getPrototypeOf(e.value)),e.value=u}else e.value[n]=r}}));return t}function Go(e,A=!1){function t(w,{flush:m="sync",deep:v=!1,timeout:y,throwOnTimeout:I}={}){let L=null;const T=[new Promise(K=>{L=(0,o.watch)(e,b=>{w(b)!==A&&(L?.(),K(b))},{flush:m,deep:v,immediate:!0})})];return y!=null&&T.push(ys(y,I).then(()=>je(e)).finally(()=>L?.())),Promise.race(T)}function n(w,m){if(!(0,o.isRef)(w))return t(b=>b===w,m);const{flush:v="sync",deep:y=!1,timeout:I,throwOnTimeout:L}=m??{};let T=null;const K=[new Promise(b=>{T=(0,o.watch)([e,w],([O,aA])=>{A!==(O===aA)&&(T?.(),b(O))},{flush:v,deep:y,immediate:!0})})];return I!=null&&K.push(ys(I,L).then(()=>je(e)).finally(()=>(T?.(),je(e)))),Promise.race(K)}function r(w){return t(m=>!!m,w)}function a(w){return n(null,w)}function u(w){return n(void 0,w)}function d(w){return t(Number.isNaN,w)}function g(w,m){return t(v=>{const y=Array.from(v);return y.includes(w)||y.includes(je(w))},m)}function h(w){return B(1,w)}function B(w=1,m){let v=-1;return t(()=>(v+=1,v>=w),m)}return Array.isArray(je(e))?{toMatch:t,toContains:g,changed:h,changedTimes:B,get not(){return Go(e,!A)}}:{toMatch:t,toBe:n,toBeTruthy:r,toBeNull:a,toBeNaN:d,toBeUndefined:u,changed:h,changedTimes:B,get not(){return Go(e,!A)}}}function zo(e){return Go(e)}function rd(e){var A;const t=je(e);return(A=t?.$el)!=null?A:t}var Qs=Wu?window:void 0;function Es(...e){let A,t,n,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,n,r]=e,A=Qs):[A,t,n,r]=e,!A)return qu;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const a=[],u=()=>{a.forEach(B=>B()),a.length=0},d=(B,w,m,v)=>(B.addEventListener(w,m,v),()=>B.removeEventListener(w,m,v)),g=(0,o.watch)(()=>[rd(A),je(r)],([B,w])=>{if(u(),!B)return;const m=ju(w)?{...w}:w;a.push(...t.flatMap(v=>n.map(y=>d(B,v,y,m))))},{immediate:!0,flush:"post"}),h=()=>{g(),u()};return Un(h),h}function od(e){return typeof e=="function"?e:typeof e=="string"?A=>A.key===e:Array.isArray(e)?A=>e.includes(A.key):()=>!0}function Fs(...e){let A,t,n={};e.length===3?(A=e[0],t=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(A=!0,t=e[0],n=e[1]):(A=e[0],t=e[1]):(A=!0,t=e[0]);const{target:r=Qs,eventName:a="keydown",passive:u=!1,dedupe:d=!1}=n,g=od(A);return Es(r,a,B=>{B.repeat&&je(d)||g(B)&&t(B)},u)}function id(e){return JSON.parse(JSON.stringify(e))}function Xo(e,A,t,n={}){var r,a,u;const{clone:d=!1,passive:g=!1,eventName:h,deep:B=!1,defaultValue:w,shouldEmit:m}=n,v=(0,o.getCurrentInstance)(),y=t||v?.emit||((r=v?.$emit)==null?void 0:r.bind(v))||((u=(a=v?.proxy)==null?void 0:a.$emit)==null?void 0:u.bind(v?.proxy));let I=h;A||(A="modelValue"),I=I||`update:${A.toString()}`;const L=b=>d?typeof d=="function"?d(b):id(b):b,T=()=>Ju(e[A])?L(e[A]):w,K=b=>{m?m(b)&&y(I,b):y(I,b)};if(g){const b=(0,o.ref)(T());let O=!1;return(0,o.watch)(()=>e[A],aA=>{O||(O=!0,b.value=L(aA),(0,o.nextTick)(()=>O=!1))}),(0,o.watch)(b,aA=>{!O&&(aA!==e[A]||B)&&K(aA)},{deep:B}),b}else return(0,o.computed)({get(){return T()},set(b){K(b)}})}var sd={value:()=>{}};function dr(){for(var e=0,A=arguments.length,t={},n;e<A;++e){if(!(n=arguments[e]+"")||n in t||/[\s.]/.test(n))throw new Error("illegal type: "+n);t[n]=[]}return new fr(t)}function fr(e){this._=e}function ad(e,A){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!A.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}fr.prototype=dr.prototype={constructor:fr,on:function(e,A){var t=this._,n=ad(e+"",t),r,a=-1,u=n.length;if(arguments.length<2){for(;++a<u;)if((r=(e=n[a]).type)&&(r=ld(t[r],e.name)))return r;return}if(A!=null&&typeof A!="function")throw new Error("invalid callback: "+A);for(;++a<u;)if(r=(e=n[a]).type)t[r]=Us(t[r],e.name,A);else if(A==null)for(r in t)t[r]=Us(t[r],e.name,null);return this},copy:function(){var e={},A=this._;for(var t in A)e[t]=A[t].slice();return new fr(e)},call:function(e,A){if((r=arguments.length-2)>0)for(var t=new Array(r),n=0,r,a;n<r;++n)t[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],n=0,r=a.length;n<r;++n)a[n].value.apply(A,t)},apply:function(e,A,t){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],r=0,a=n.length;r<a;++r)n[r].value.apply(A,t)}};function ld(e,A){for(var t=0,n=e.length,r;t<n;++t)if((r=e[t]).name===A)return r.value}function Us(e,A,t){for(var n=0,r=e.length;n<r;++n)if(e[n].name===A){e[n]=sd,e=e.slice(0,n).concat(e.slice(n+1));break}return t!=null&&e.push({name:A,value:t}),e}var $o="http://www.w3.org/1999/xhtml",bs={svg:"http://www.w3.org/2000/svg",xhtml:$o,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function gr(e){var A=e+="",t=A.indexOf(":");return t>=0&&(A=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),bs.hasOwnProperty(A)?{space:bs[A],local:e}:e}function cd(e){return function(){var A=this.ownerDocument,t=this.namespaceURI;return t===$o&&A.documentElement.namespaceURI===$o?A.createElement(e):A.createElementNS(t,e)}}function ud(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Hs(e){var A=gr(e);return(A.local?ud:cd)(A)}function dd(){}function Yo(e){return e==null?dd:function(){return this.querySelector(e)}}function fd(e){typeof e!="function"&&(e=Yo(e));for(var A=this._groups,t=A.length,n=new Array(t),r=0;r<t;++r)for(var a=A[r],u=a.length,d=n[r]=new Array(u),g,h,B=0;B<u;++B)(g=a[B])&&(h=e.call(g,g.__data__,B,a))&&("__data__"in g&&(h.__data__=g.__data__),d[B]=h);return new Fe(n,this._parents)}function gd(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function hd(){return[]}function Is(e){return e==null?hd:function(){return this.querySelectorAll(e)}}function Bd(e){return function(){return gd(e.apply(this,arguments))}}function pd(e){typeof e=="function"?e=Bd(e):e=Is(e);for(var A=this._groups,t=A.length,n=[],r=[],a=0;a<t;++a)for(var u=A[a],d=u.length,g,h=0;h<d;++h)(g=u[h])&&(n.push(e.call(g,g.__data__,h,u)),r.push(g));return new Fe(n,r)}function _s(e){return function(){return this.matches(e)}}function Ss(e){return function(A){return A.matches(e)}}var md=Array.prototype.find;function wd(e){return function(){return md.call(this.children,e)}}function Cd(){return this.firstElementChild}function vd(e){return this.select(e==null?Cd:wd(typeof e=="function"?e:Ss(e)))}var yd=Array.prototype.filter;function Qd(){return Array.from(this.children)}function Ed(e){return function(){return yd.call(this.children,e)}}function Fd(e){return this.selectAll(e==null?Qd:Ed(typeof e=="function"?e:Ss(e)))}function Ud(e){typeof e!="function"&&(e=_s(e));for(var A=this._groups,t=A.length,n=new Array(t),r=0;r<t;++r)for(var a=A[r],u=a.length,d=n[r]=[],g,h=0;h<u;++h)(g=a[h])&&e.call(g,g.__data__,h,a)&&d.push(g);return new Fe(n,this._parents)}function xs(e){return new Array(e.length)}function bd(){return new Fe(this._enter||this._groups.map(xs),this._parents)}function hr(e,A){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=A}hr.prototype={constructor:hr,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,A){return this._parent.insertBefore(e,A)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Hd(e){return function(){return e}}function Id(e,A,t,n,r,a){for(var u=0,d,g=A.length,h=a.length;u<h;++u)(d=A[u])?(d.__data__=a[u],n[u]=d):t[u]=new hr(e,a[u]);for(;u<g;++u)(d=A[u])&&(r[u]=d)}function _d(e,A,t,n,r,a,u){var d,g,h=new Map,B=A.length,w=a.length,m=new Array(B),v;for(d=0;d<B;++d)(g=A[d])&&(m[d]=v=u.call(g,g.__data__,d,A)+"",h.has(v)?r[d]=g:h.set(v,g));for(d=0;d<w;++d)v=u.call(e,a[d],d,a)+"",(g=h.get(v))?(n[d]=g,g.__data__=a[d],h.delete(v)):t[d]=new hr(e,a[d]);for(d=0;d<B;++d)(g=A[d])&&h.get(m[d])===g&&(r[d]=g)}function Sd(e){return e.__data__}function xd(e,A){if(!arguments.length)return Array.from(this,Sd);var t=A?_d:Id,n=this._parents,r=this._groups;typeof e!="function"&&(e=Hd(e));for(var a=r.length,u=new Array(a),d=new Array(a),g=new Array(a),h=0;h<a;++h){var B=n[h],w=r[h],m=w.length,v=Dd(e.call(B,B&&B.__data__,h,n)),y=v.length,I=d[h]=new Array(y),L=u[h]=new Array(y);t(B,w,I,L,g[h]=new Array(m),v,A);for(var T=0,K=0,b,O;T<y;++T)if(b=I[T]){for(T>=K&&(K=T+1);!(O=L[K])&&++K<y;);b._next=O||null}}return u=new Fe(u,n),u._enter=d,u._exit=g,u}function Dd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Nd(){return new Fe(this._exit||this._groups.map(xs),this._parents)}function Ld(e,A,t){var n=this.enter(),r=this,a=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),A!=null&&(r=A(r),r&&(r=r.selection())),t==null?a.remove():t(a),n&&r?n.merge(r).order():r}function Td(e){for(var A=e.selection?e.selection():e,t=this._groups,n=A._groups,r=t.length,a=n.length,u=Math.min(r,a),d=new Array(r),g=0;g<u;++g)for(var h=t[g],B=n[g],w=h.length,m=d[g]=new Array(w),v,y=0;y<w;++y)(v=h[y]||B[y])&&(m[y]=v);for(;g<r;++g)d[g]=t[g];return new Fe(d,this._parents)}function kd(){for(var e=this._groups,A=-1,t=e.length;++A<t;)for(var n=e[A],r=n.length-1,a=n[r],u;--r>=0;)(u=n[r])&&(a&&u.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(u,a),a=u);return this}function Md(e){e||(e=Od);function A(w,m){return w&&m?e(w.__data__,m.__data__):!w-!m}for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a){for(var u=t[a],d=u.length,g=r[a]=new Array(d),h,B=0;B<d;++B)(h=u[B])&&(g[B]=h);g.sort(A)}return new Fe(r,this._parents).order()}function Od(e,A){return e<A?-1:e>A?1:e>=A?0:NaN}function Kd(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Rd(){return Array.from(this)}function Vd(){for(var e=this._groups,A=0,t=e.length;A<t;++A)for(var n=e[A],r=0,a=n.length;r<a;++r){var u=n[r];if(u)return u}return null}function Pd(){let e=0;for(const A of this)++e;return e}function Gd(){return!this.node()}function zd(e){for(var A=this._groups,t=0,n=A.length;t<n;++t)for(var r=A[t],a=0,u=r.length,d;a<u;++a)(d=r[a])&&e.call(d,d.__data__,a,r);return this}function Xd(e){return function(){this.removeAttribute(e)}}function $d(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Yd(e,A){return function(){this.setAttribute(e,A)}}function Wd(e,A){return function(){this.setAttributeNS(e.space,e.local,A)}}function Jd(e,A){return function(){var t=A.apply(this,arguments);t==null?this.removeAttribute(e):this.setAttribute(e,t)}}function Zd(e,A){return function(){var t=A.apply(this,arguments);t==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function jd(e,A){var t=gr(e);if(arguments.length<2){var n=this.node();return t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}return this.each((A==null?t.local?$d:Xd:typeof A=="function"?t.local?Zd:Jd:t.local?Wd:Yd)(t,A))}function Ds(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qd(e){return function(){this.style.removeProperty(e)}}function Af(e,A,t){return function(){this.style.setProperty(e,A,t)}}function ef(e,A,t){return function(){var n=A.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,t)}}function tf(e,A,t){return arguments.length>1?this.each((A==null?qd:typeof A=="function"?ef:Af)(e,A,t??"")):$t(this.node(),e)}function $t(e,A){return e.style.getPropertyValue(A)||Ds(e).getComputedStyle(e,null).getPropertyValue(A)}function nf(e){return function(){delete this[e]}}function rf(e,A){return function(){this[e]=A}}function of(e,A){return function(){var t=A.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function sf(e,A){return arguments.length>1?this.each((A==null?nf:typeof A=="function"?of:rf)(e,A)):this.node()[e]}function Ns(e){return e.trim().split(/^|\s+/)}function Wo(e){return e.classList||new Ls(e)}function Ls(e){this._node=e,this._names=Ns(e.getAttribute("class")||"")}Ls.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var A=this._names.indexOf(e);A>=0&&(this._names.splice(A,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Ts(e,A){for(var t=Wo(e),n=-1,r=A.length;++n<r;)t.add(A[n])}function ks(e,A){for(var t=Wo(e),n=-1,r=A.length;++n<r;)t.remove(A[n])}function af(e){return function(){Ts(this,e)}}function lf(e){return function(){ks(this,e)}}function cf(e,A){return function(){(A.apply(this,arguments)?Ts:ks)(this,e)}}function uf(e,A){var t=Ns(e+"");if(arguments.length<2){for(var n=Wo(this.node()),r=-1,a=t.length;++r<a;)if(!n.contains(t[r]))return!1;return!0}return this.each((typeof A=="function"?cf:A?af:lf)(t,A))}function df(){this.textContent=""}function ff(e){return function(){this.textContent=e}}function gf(e){return function(){var A=e.apply(this,arguments);this.textContent=A??""}}function hf(e){return arguments.length?this.each(e==null?df:(typeof e=="function"?gf:ff)(e)):this.node().textContent}function Bf(){this.innerHTML=""}function pf(e){return function(){this.innerHTML=e}}function mf(e){return function(){var A=e.apply(this,arguments);this.innerHTML=A??""}}function wf(e){return arguments.length?this.each(e==null?Bf:(typeof e=="function"?mf:pf)(e)):this.node().innerHTML}function Cf(){this.nextSibling&&this.parentNode.appendChild(this)}function vf(){return this.each(Cf)}function yf(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qf(){return this.each(yf)}function Ef(e){var A=typeof e=="function"?e:Hs(e);return this.select(function(){return this.appendChild(A.apply(this,arguments))})}function Ff(){return null}function Uf(e,A){var t=typeof e=="function"?e:Hs(e),n=A==null?Ff:typeof A=="function"?A:Yo(A);return this.select(function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)})}function bf(){var e=this.parentNode;e&&e.removeChild(this)}function Hf(){return this.each(bf)}function If(){var e=this.cloneNode(!1),A=this.parentNode;return A?A.insertBefore(e,this.nextSibling):e}function _f(){var e=this.cloneNode(!0),A=this.parentNode;return A?A.insertBefore(e,this.nextSibling):e}function Sf(e){return this.select(e?_f:If)}function xf(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Df(e){return function(A){e.call(this,A,this.__data__)}}function Nf(e){return e.trim().split(/^|\s+/).map(function(A){var t="",n=A.indexOf(".");return n>=0&&(t=A.slice(n+1),A=A.slice(0,n)),{type:A,name:t}})}function Lf(e){return function(){var A=this.__on;if(A){for(var t=0,n=-1,r=A.length,a;t<r;++t)a=A[t],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):A[++n]=a;++n?A.length=n:delete this.__on}}}function Tf(e,A,t){return function(){var n=this.__on,r,a=Df(A);if(n){for(var u=0,d=n.length;u<d;++u)if((r=n[u]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=t),r.value=A;return}}this.addEventListener(e.type,a,t),r={type:e.type,name:e.name,value:A,listener:a,options:t},n?n.push(r):this.__on=[r]}}function kf(e,A,t){var n=Nf(e+""),r,a=n.length,u;if(arguments.length<2){var d=this.node().__on;if(d){for(var g=0,h=d.length,B;g<h;++g)for(r=0,B=d[g];r<a;++r)if((u=n[r]).type===B.type&&u.name===B.name)return B.value}return}for(d=A?Tf:Lf,r=0;r<a;++r)this.each(d(n[r],A,t));return this}function Ms(e,A,t){var n=Ds(e),r=n.CustomEvent;typeof r=="function"?r=new r(A,t):(r=n.document.createEvent("Event"),t?(r.initEvent(A,t.bubbles,t.cancelable),r.detail=t.detail):r.initEvent(A,!1,!1)),e.dispatchEvent(r)}function Mf(e,A){return function(){return Ms(this,e,A)}}function Of(e,A){return function(){return Ms(this,e,A.apply(this,arguments))}}function Kf(e,A){return this.each((typeof A=="function"?Of:Mf)(e,A))}function*Rf(){for(var e=this._groups,A=0,t=e.length;A<t;++A)for(var n=e[A],r=0,a=n.length,u;r<a;++r)(u=n[r])&&(yield u)}var Os=[null];function Fe(e,A){this._groups=e,this._parents=A}function bn(){return new Fe([[document.documentElement]],Os)}function Vf(){return this}Fe.prototype=bn.prototype={constructor:Fe,select:fd,selectAll:pd,selectChild:vd,selectChildren:Fd,filter:Ud,data:xd,enter:bd,exit:Nd,join:Ld,merge:Td,selection:Vf,order:kd,sort:Md,call:Kd,nodes:Rd,node:Vd,size:Pd,empty:Gd,each:zd,attr:jd,style:tf,property:sf,classed:uf,text:hf,html:wf,raise:vf,lower:Qf,append:Ef,insert:Uf,remove:Hf,clone:Sf,datum:xf,on:kf,dispatch:Kf,[Symbol.iterator]:Rf};function Le(e){return typeof e=="string"?new Fe([[document.querySelector(e)]],[document.documentElement]):new Fe([[e]],Os)}function Pf(e){let A;for(;A=e.sourceEvent;)e=A;return e}function Ke(e,A){if(e=Pf(e),A===void 0&&(A=e.currentTarget),A){var t=A.ownerSVGElement||A;if(t.createSVGPoint){var n=t.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(A.getScreenCTM().inverse()),[n.x,n.y]}if(A.getBoundingClientRect){var r=A.getBoundingClientRect();return[e.clientX-r.left-A.clientLeft,e.clientY-r.top-A.clientTop]}}return[e.pageX,e.pageY]}var Gf={passive:!1},Hn={capture:!0,passive:!1};function Jo(e){e.stopImmediatePropagation()}function Yt(e){e.preventDefault(),e.stopImmediatePropagation()}function Ks(e){var A=e.document.documentElement,t=Le(e).on("dragstart.drag",Yt,Hn);"onselectstart"in A?t.on("selectstart.drag",Yt,Hn):(A.__noselect=A.style.MozUserSelect,A.style.MozUserSelect="none")}function Rs(e,A){var t=e.document.documentElement,n=Le(e).on("dragstart.drag",null);A&&(n.on("click.drag",Yt,Hn),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in t?n.on("selectstart.drag",null):(t.style.MozUserSelect=t.__noselect,delete t.__noselect)}var Br=e=>()=>e;function Zo(e,{sourceEvent:A,subject:t,target:n,identifier:r,active:a,x:u,y:d,dx:g,dy:h,dispatch:B}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:A,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:B}})}Zo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function zf(e){return!e.ctrlKey&&!e.button}function Xf(){return this.parentNode}function $f(e,A){return A??{x:e.x,y:e.y}}function Yf(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wf(){var e=zf,A=Xf,t=$f,n=Yf,r={},a=dr("start","drag","end"),u=0,d,g,h,B,w=0;function m(O){O.on("mousedown.drag",v).filter(n).on("touchstart.drag",L).on("touchmove.drag",T,Gf).on("touchend.drag touchcancel.drag",K).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(O,aA){if(!(B||!e.call(this,O,aA))){var Z=b(this,A.call(this,O,aA),O,aA,"mouse");Z&&(Le(O.view).on("mousemove.drag",y,Hn).on("mouseup.drag",I,Hn),Ks(O.view),Jo(O),h=!1,d=O.clientX,g=O.clientY,Z("start",O))}}function y(O){if(Yt(O),!h){var aA=O.clientX-d,Z=O.clientY-g;h=aA*aA+Z*Z>w}r.mouse("drag",O)}function I(O){Le(O.view).on("mousemove.drag mouseup.drag",null),Rs(O.view,h),Yt(O),r.mouse("end",O)}function L(O,aA){if(e.call(this,O,aA)){var Z=O.changedTouches,cA=A.call(this,O,aA),lA=Z.length,iA,oA;for(iA=0;iA<lA;++iA)(oA=b(this,cA,O,aA,Z[iA].identifier,Z[iA]))&&(Jo(O),oA("start",O,Z[iA]))}}function T(O){var aA=O.changedTouches,Z=aA.length,cA,lA;for(cA=0;cA<Z;++cA)(lA=r[aA[cA].identifier])&&(Yt(O),lA("drag",O,aA[cA]))}function K(O){var aA=O.changedTouches,Z=aA.length,cA,lA;for(B&&clearTimeout(B),B=setTimeout(function(){B=null},500),cA=0;cA<Z;++cA)(lA=r[aA[cA].identifier])&&(Jo(O),lA("end",O,aA[cA]))}function b(O,aA,Z,cA,lA,iA){var oA=a.copy(),tA=Ke(iA||Z,aA),x,eA,H;if((H=t.call(O,new Zo("beforestart",{sourceEvent:Z,target:m,identifier:lA,active:u,x:tA[0],y:tA[1],dx:0,dy:0,dispatch:oA}),cA))!=null)return x=H.x-tA[0]||0,eA=H.y-tA[1]||0,function X(F,D,k){var N=tA,R;switch(F){case"start":r[lA]=X,R=u++;break;case"end":delete r[lA],--u;case"drag":tA=Ke(k||D,aA),R=u;break}oA.call(F,O,new Zo(F,{sourceEvent:D,subject:H,target:m,identifier:lA,active:R,x:tA[0]+x,y:tA[1]+eA,dx:tA[0]-N[0],dy:tA[1]-N[1],dispatch:oA}),cA)}}return m.filter=function(O){return arguments.length?(e=typeof O=="function"?O:Br(!!O),m):e},m.container=function(O){return arguments.length?(A=typeof O=="function"?O:Br(O),m):A},m.subject=function(O){return arguments.length?(t=typeof O=="function"?O:Br(O),m):t},m.touchable=function(O){return arguments.length?(n=typeof O=="function"?O:Br(!!O),m):n},m.on=function(){var O=a.on.apply(a,arguments);return O===a?m:O},m.clickDistance=function(O){return arguments.length?(w=(O=+O)*O,m):Math.sqrt(w)},m}function jo(e,A,t){e.prototype=A.prototype=t,t.constructor=e}function Vs(e,A){var t=Object.create(e.prototype);for(var n in A)t[n]=A[n];return t}function In(){}var _n=.7,pr=1/_n,Wt="\\s*([+-]?\\d+)\\s*",Sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Jf=/^#([0-9a-f]{3,8})$/,Zf=new RegExp(`^rgb\\(${Wt},${Wt},${Wt}\\)$`),jf=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),qf=new RegExp(`^rgba\\(${Wt},${Wt},${Wt},${Sn}\\)$`),Ag=new RegExp(`^rgba\\(${Re},${Re},${Re},${Sn}\\)$`),eg=new RegExp(`^hsl\\(${Sn},${Re},${Re}\\)$`),tg=new RegExp(`^hsla\\(${Sn},${Re},${Re},${Sn}\\)$`),Ps={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};jo(In,Ht,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Gs,formatHex:Gs,formatHex8:ng,formatHsl:rg,formatRgb:zs,toString:zs});function Gs(){return this.rgb().formatHex()}function ng(){return this.rgb().formatHex8()}function rg(){return Js(this).formatHsl()}function zs(){return this.rgb().formatRgb()}function Ht(e){var A,t;return e=(e+"").trim().toLowerCase(),(A=Jf.exec(e))?(t=A[1].length,A=parseInt(A[1],16),t===6?Xs(A):t===3?new Ce(A>>8&15|A>>4&240,A>>4&15|A&240,(A&15)<<4|A&15,1):t===8?mr(A>>24&255,A>>16&255,A>>8&255,(A&255)/255):t===4?mr(A>>12&15|A>>8&240,A>>8&15|A>>4&240,A>>4&15|A&240,((A&15)<<4|A&15)/255):null):(A=Zf.exec(e))?new Ce(A[1],A[2],A[3],1):(A=jf.exec(e))?new Ce(A[1]*255/100,A[2]*255/100,A[3]*255/100,1):(A=qf.exec(e))?mr(A[1],A[2],A[3],A[4]):(A=Ag.exec(e))?mr(A[1]*255/100,A[2]*255/100,A[3]*255/100,A[4]):(A=eg.exec(e))?Ws(A[1],A[2]/100,A[3]/100,1):(A=tg.exec(e))?Ws(A[1],A[2]/100,A[3]/100,A[4]):Ps.hasOwnProperty(e)?Xs(Ps[e]):e==="transparent"?new Ce(NaN,NaN,NaN,0):null}function Xs(e){return new Ce(e>>16&255,e>>8&255,e&255,1)}function mr(e,A,t,n){return n<=0&&(e=A=t=NaN),new Ce(e,A,t,n)}function og(e){return e instanceof In||(e=Ht(e)),e?(e=e.rgb(),new Ce(e.r,e.g,e.b,e.opacity)):new Ce}function qo(e,A,t,n){return arguments.length===1?og(e):new Ce(e,A,t,n??1)}function Ce(e,A,t,n){this.r=+e,this.g=+A,this.b=+t,this.opacity=+n}jo(Ce,qo,Vs(In,{brighter(e){return e=e==null?pr:Math.pow(pr,e),new Ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_n:Math.pow(_n,e),new Ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ce(It(this.r),It(this.g),It(this.b),wr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$s,formatHex:$s,formatHex8:ig,formatRgb:Ys,toString:Ys}));function $s(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}`}function ig(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}${_t((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ys(){const e=wr(this.opacity);return`${e===1?"rgb(":"rgba("}${It(this.r)}, ${It(this.g)}, ${It(this.b)}${e===1?")":`, ${e})`}`}function wr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function It(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _t(e){return e=It(e),(e<16?"0":"")+e.toString(16)}function Ws(e,A,t,n){return n<=0?e=A=t=NaN:t<=0||t>=1?e=A=NaN:A<=0&&(e=NaN),new Te(e,A,t,n)}function Js(e){if(e instanceof Te)return new Te(e.h,e.s,e.l,e.opacity);if(e instanceof In||(e=Ht(e)),!e)return new Te;if(e instanceof Te)return e;e=e.rgb();var A=e.r/255,t=e.g/255,n=e.b/255,r=Math.min(A,t,n),a=Math.max(A,t,n),u=NaN,d=a-r,g=(a+r)/2;return d?(A===a?u=(t-n)/d+(t<n)*6:t===a?u=(n-A)/d+2:u=(A-t)/d+4,d/=g<.5?a+r:2-a-r,u*=60):d=g>0&&g<1?0:u,new Te(u,d,g,e.opacity)}function sg(e,A,t,n){return arguments.length===1?Js(e):new Te(e,A,t,n??1)}function Te(e,A,t,n){this.h=+e,this.s=+A,this.l=+t,this.opacity=+n}jo(Te,sg,Vs(In,{brighter(e){return e=e==null?pr:Math.pow(pr,e),new Te(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_n:Math.pow(_n,e),new Te(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,A=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*A,r=2*t-n;return new Ce(Ai(e>=240?e-240:e+120,r,n),Ai(e,r,n),Ai(e<120?e+240:e-120,r,n),this.opacity)},clamp(){return new Te(Zs(this.h),Cr(this.s),Cr(this.l),wr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wr(this.opacity);return`${e===1?"hsl(":"hsla("}${Zs(this.h)}, ${Cr(this.s)*100}%, ${Cr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Zs(e){return e=(e||0)%360,e<0?e+360:e}function Cr(e){return Math.max(0,Math.min(1,e||0))}function Ai(e,A,t){return(e<60?A+(t-A)*e/60:e<180?t:e<240?A+(t-A)*(240-e)/60:A)*255}var ei=e=>()=>e;function ag(e,A){return function(t){return e+t*A}}function lg(e,A,t){return e=Math.pow(e,t),A=Math.pow(A,t)-e,t=1/t,function(n){return Math.pow(e+n*A,t)}}function cg(e){return(e=+e)==1?js:function(A,t){return t-A?lg(A,t,e):ei(isNaN(A)?t:A)}}function js(e,A){var t=A-e;return t?ag(e,t):ei(isNaN(e)?A:e)}var vr=(function e(A){var t=cg(A);function n(r,a){var u=t((r=qo(r)).r,(a=qo(a)).r),d=t(r.g,a.g),g=t(r.b,a.b),h=js(r.opacity,a.opacity);return function(B){return r.r=u(B),r.g=d(B),r.b=g(B),r.opacity=h(B),r+""}}return n.gamma=e,n})(1);function ug(e,A){A||(A=[]);var t=e?Math.min(A.length,e.length):0,n=A.slice(),r;return function(a){for(r=0;r<t;++r)n[r]=e[r]*(1-a)+A[r]*a;return n}}function dg(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fg(e,A){var t=A?A.length:0,n=e?Math.min(t,e.length):0,r=new Array(n),a=new Array(t),u;for(u=0;u<n;++u)r[u]=xn(e[u],A[u]);for(;u<t;++u)a[u]=A[u];return function(d){for(u=0;u<n;++u)a[u]=r[u](d);return a}}function gg(e,A){var t=new Date;return e=+e,A=+A,function(n){return t.setTime(e*(1-n)+A*n),t}}function Ve(e,A){return e=+e,A=+A,function(t){return e*(1-t)+A*t}}function hg(e,A){var t={},n={},r;(e===null||typeof e!="object")&&(e={}),(A===null||typeof A!="object")&&(A={});for(r in A)r in e?t[r]=xn(e[r],A[r]):n[r]=A[r];return function(a){for(r in t)n[r]=t[r](a);return n}}var ti=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ni=new RegExp(ti.source,"g");function Bg(e){return function(){return e}}function pg(e){return function(A){return e(A)+""}}function qs(e,A){var t=ti.lastIndex=ni.lastIndex=0,n,r,a,u=-1,d=[],g=[];for(e=e+"",A=A+"";(n=ti.exec(e))&&(r=ni.exec(A));)(a=r.index)>t&&(a=A.slice(t,a),d[u]?d[u]+=a:d[++u]=a),(n=n[0])===(r=r[0])?d[u]?d[u]+=r:d[++u]=r:(d[++u]=null,g.push({i:u,x:Ve(n,r)})),t=ni.lastIndex;return t<A.length&&(a=A.slice(t),d[u]?d[u]+=a:d[++u]=a),d.length<2?g[0]?pg(g[0].x):Bg(A):(A=g.length,function(h){for(var B=0,w;B<A;++B)d[(w=g[B]).i]=w.x(h);return d.join("")})}function xn(e,A){var t=typeof A,n;return A==null||t==="boolean"?ei(A):(t==="number"?Ve:t==="string"?(n=Ht(A))?(A=n,vr):qs:A instanceof Ht?vr:A instanceof Date?gg:dg(A)?ug:Array.isArray(A)?fg:typeof A.valueOf!="function"&&typeof A.toString!="function"||isNaN(A)?hg:Ve)(e,A)}var Aa=180/Math.PI,ri={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ea(e,A,t,n,r,a){var u,d,g;return(u=Math.sqrt(e*e+A*A))&&(e/=u,A/=u),(g=e*t+A*n)&&(t-=e*g,n-=A*g),(d=Math.sqrt(t*t+n*n))&&(t/=d,n/=d,g/=d),e*n<A*t&&(e=-e,A=-A,g=-g,u=-u),{translateX:r,translateY:a,rotate:Math.atan2(A,e)*Aa,skewX:Math.atan(g)*Aa,scaleX:u,scaleY:d}}var yr;function mg(e){const A=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return A.isIdentity?ri:ea(A.a,A.b,A.c,A.d,A.e,A.f)}function wg(e){return e==null||(yr||(yr=document.createElementNS("http://www.w3.org/2000/svg","g")),yr.setAttribute("transform",e),!(e=yr.transform.baseVal.consolidate()))?ri:(e=e.matrix,ea(e.a,e.b,e.c,e.d,e.e,e.f))}function ta(e,A,t,n){function r(h){return h.length?h.pop()+" ":""}function a(h,B,w,m,v,y){if(h!==w||B!==m){var I=v.push("translate(",null,A,null,t);y.push({i:I-4,x:Ve(h,w)},{i:I-2,x:Ve(B,m)})}else(w||m)&&v.push("translate("+w+A+m+t)}function u(h,B,w,m){h!==B?(h-B>180?B+=360:B-h>180&&(h+=360),m.push({i:w.push(r(w)+"rotate(",null,n)-2,x:Ve(h,B)})):B&&w.push(r(w)+"rotate("+B+n)}function d(h,B,w,m){h!==B?m.push({i:w.push(r(w)+"skewX(",null,n)-2,x:Ve(h,B)}):B&&w.push(r(w)+"skewX("+B+n)}function g(h,B,w,m,v,y){if(h!==w||B!==m){var I=v.push(r(v)+"scale(",null,",",null,")");y.push({i:I-4,x:Ve(h,w)},{i:I-2,x:Ve(B,m)})}else(w!==1||m!==1)&&v.push(r(v)+"scale("+w+","+m+")")}return function(h,B){var w=[],m=[];return h=e(h),B=e(B),a(h.translateX,h.translateY,B.translateX,B.translateY,w,m),u(h.rotate,B.rotate,w,m),d(h.skewX,B.skewX,w,m),g(h.scaleX,h.scaleY,B.scaleX,B.scaleY,w,m),h=B=null,function(v){for(var y=-1,I=m.length,L;++y<I;)w[(L=m[y]).i]=L.x(v);return w.join("")}}}var Cg=ta(mg,"px, ","px)","deg)"),vg=ta(wg,", ",")",")"),yg=1e-12;function na(e){return((e=Math.exp(e))+1/e)/2}function Qg(e){return((e=Math.exp(e))-1/e)/2}function Eg(e){return((e=Math.exp(2*e))-1)/(e+1)}var Qr=(function e(A,t,n){function r(a,u){var d=a[0],g=a[1],h=a[2],B=u[0],w=u[1],m=u[2],v=B-d,y=w-g,I=v*v+y*y,L,T;if(I<yg)T=Math.log(m/h)/A,L=function(Z){return[d+Z*v,g+Z*y,h*Math.exp(A*Z*T)]};else{var K=Math.sqrt(I),b=(m*m-h*h+n*I)/(2*h*t*K),O=(m*m-h*h-n*I)/(2*m*t*K),aA=Math.log(Math.sqrt(b*b+1)-b);T=(Math.log(Math.sqrt(O*O+1)-O)-aA)/A,L=function(Z){var cA=Z*T,lA=na(aA),iA=h/(t*K)*(lA*Eg(A*cA+aA)-Qg(aA));return[d+iA*v,g+iA*y,h*lA/na(A*cA+aA)]}}return L.duration=T*1e3*A/Math.SQRT2,L}return r.rho=function(a){var u=Math.max(.001,+a),d=u*u;return e(u,d,d*d)},r})(Math.SQRT2,2,4),Jt=0,Dn=0,Nn=0,ra=1e3,Er,Ln,Fr=0,St=0,Ur=0,Tn=typeof performance=="object"&&performance.now?performance:Date,oa=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function oi(){return St||(oa(Fg),St=Tn.now()+Ur)}function Fg(){St=0}function br(){this._call=this._time=this._next=null}br.prototype=ia.prototype={constructor:br,restart:function(e,A,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?oi():+t)+(A==null?0:+A),!this._next&&Ln!==this&&(Ln?Ln._next=this:Er=this,Ln=this),this._call=e,this._time=t,ii()},stop:function(){this._call&&(this._call=null,this._time=1/0,ii())}};function ia(e,A,t){var n=new br;return n.restart(e,A,t),n}function Ug(){oi(),++Jt;for(var e=Er,A;e;)(A=St-e._time)>=0&&e._call.call(void 0,A),e=e._next;--Jt}function sa(){St=(Fr=Tn.now())+Ur,Jt=Dn=0;try{Ug()}finally{Jt=0,Hg(),St=0}}function bg(){var e=Tn.now(),A=e-Fr;A>ra&&(Ur-=A,Fr=e)}function Hg(){for(var e,A=Er,t,n=1/0;A;)A._call?(n>A._time&&(n=A._time),e=A,A=A._next):(t=A._next,A._next=null,A=e?e._next=t:Er=t);Ln=e,ii(n)}function ii(e){Jt||(Dn&&(Dn=clearTimeout(Dn)),e-St>24?(e<1/0&&(Dn=setTimeout(sa,e-Tn.now()-Ur)),Nn&&(Nn=clearInterval(Nn))):(Nn||(Fr=Tn.now(),Nn=setInterval(bg,ra)),Jt=1,oa(sa)))}function aa(e,A,t){var n=new br;return A=A==null?0:+A,n.restart(r=>{n.stop(),e(r+A)},A,t),n}var Ig=dr("start","end","cancel","interrupt"),_g=[],la=0,ca=1,si=2,Hr=3,ua=4,ai=5,Ir=6;function _r(e,A,t,n,r,a){var u=e.__transition;if(!u)e.__transition={};else if(t in u)return;Sg(e,t,{name:A,index:n,group:r,on:Ig,tween:_g,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:la})}function li(e,A){var t=ke(e,A);if(t.state>la)throw new Error("too late; already scheduled");return t}function Pe(e,A){var t=ke(e,A);if(t.state>Hr)throw new Error("too late; already running");return t}function ke(e,A){var t=e.__transition;if(!t||!(t=t[A]))throw new Error("transition not found");return t}function Sg(e,A,t){var n=e.__transition,r;n[A]=t,t.timer=ia(a,0,t.time);function a(h){t.state=ca,t.timer.restart(u,t.delay,t.time),t.delay<=h&&u(h-t.delay)}function u(h){var B,w,m,v;if(t.state!==ca)return g();for(B in n)if(v=n[B],v.name===t.name){if(v.state===Hr)return aa(u);v.state===ua?(v.state=Ir,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[B]):+B<A&&(v.state=Ir,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[B])}if(aa(function(){t.state===Hr&&(t.state=ua,t.timer.restart(d,t.delay,t.time),d(h))}),t.state=si,t.on.call("start",e,e.__data__,t.index,t.group),t.state===si){for(t.state=Hr,r=new Array(m=t.tween.length),B=0,w=-1;B<m;++B)(v=t.tween[B].value.call(e,e.__data__,t.index,t.group))&&(r[++w]=v);r.length=w+1}}function d(h){for(var B=h<t.duration?t.ease.call(null,h/t.duration):(t.timer.restart(g),t.state=ai,1),w=-1,m=r.length;++w<m;)r[w].call(e,B);t.state===ai&&(t.on.call("end",e,e.__data__,t.index,t.group),g())}function g(){t.state=Ir,t.timer.stop(),delete n[A];for(var h in n)return;delete e.__transition}}function Sr(e,A){var t=e.__transition,n,r,a=!0,u;if(t){A=A==null?null:A+"";for(u in t){if((n=t[u]).name!==A){a=!1;continue}r=n.state>si&&n.state<ai,n.state=Ir,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete t[u]}a&&delete e.__transition}}function xg(e){return this.each(function(){Sr(this,e)})}function Dg(e,A){var t,n;return function(){var r=Pe(this,e),a=r.tween;if(a!==t){n=t=a;for(var u=0,d=n.length;u<d;++u)if(n[u].name===A){n=n.slice(),n.splice(u,1);break}}r.tween=n}}function Ng(e,A,t){var n,r;if(typeof t!="function")throw new Error;return function(){var a=Pe(this,e),u=a.tween;if(u!==n){r=(n=u).slice();for(var d={name:A,value:t},g=0,h=r.length;g<h;++g)if(r[g].name===A){r[g]=d;break}g===h&&r.push(d)}a.tween=r}}function Lg(e,A){var t=this._id;if(e+="",arguments.length<2){for(var n=ke(this.node(),t).tween,r=0,a=n.length,u;r<a;++r)if((u=n[r]).name===e)return u.value;return null}return this.each((A==null?Dg:Ng)(t,e,A))}function ci(e,A,t){var n=e._id;return e.each(function(){var r=Pe(this,n);(r.value||(r.value={}))[A]=t.apply(this,arguments)}),function(r){return ke(r,n).value[A]}}function da(e,A){var t;return(typeof A=="number"?Ve:A instanceof Ht?vr:(t=Ht(A))?(A=t,vr):qs)(e,A)}function Tg(e){return function(){this.removeAttribute(e)}}function kg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Mg(e,A,t){var n,r=t+"",a;return function(){var u=this.getAttribute(e);return u===r?null:u===n?a:a=A(n=u,t)}}function Og(e,A,t){var n,r=t+"",a;return function(){var u=this.getAttributeNS(e.space,e.local);return u===r?null:u===n?a:a=A(n=u,t)}}function Kg(e,A,t){var n,r,a;return function(){var u,d=t(this),g;return d==null?void this.removeAttribute(e):(u=this.getAttribute(e),g=d+"",u===g?null:u===n&&g===r?a:(r=g,a=A(n=u,d)))}}function Rg(e,A,t){var n,r,a;return function(){var u,d=t(this),g;return d==null?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local),g=d+"",u===g?null:u===n&&g===r?a:(r=g,a=A(n=u,d)))}}function Vg(e,A){var t=gr(e),n=t==="transform"?vg:da;return this.attrTween(e,typeof A=="function"?(t.local?Rg:Kg)(t,n,ci(this,"attr."+e,A)):A==null?(t.local?kg:Tg)(t):(t.local?Og:Mg)(t,n,A))}function Pg(e,A){return function(t){this.setAttribute(e,A.call(this,t))}}function Gg(e,A){return function(t){this.setAttributeNS(e.space,e.local,A.call(this,t))}}function zg(e,A){var t,n;function r(){var a=A.apply(this,arguments);return a!==n&&(t=(n=a)&&Gg(e,a)),t}return r._value=A,r}function Xg(e,A){var t,n;function r(){var a=A.apply(this,arguments);return a!==n&&(t=(n=a)&&Pg(e,a)),t}return r._value=A,r}function $g(e,A){var t="attr."+e;if(arguments.length<2)return(t=this.tween(t))&&t._value;if(A==null)return this.tween(t,null);if(typeof A!="function")throw new Error;var n=gr(e);return this.tween(t,(n.local?zg:Xg)(n,A))}function Yg(e,A){return function(){li(this,e).delay=+A.apply(this,arguments)}}function Wg(e,A){return A=+A,function(){li(this,e).delay=A}}function Jg(e){var A=this._id;return arguments.length?this.each((typeof e=="function"?Yg:Wg)(A,e)):ke(this.node(),A).delay}function Zg(e,A){return function(){Pe(this,e).duration=+A.apply(this,arguments)}}function jg(e,A){return A=+A,function(){Pe(this,e).duration=A}}function qg(e){var A=this._id;return arguments.length?this.each((typeof e=="function"?Zg:jg)(A,e)):ke(this.node(),A).duration}function Ah(e,A){if(typeof A!="function")throw new Error;return function(){Pe(this,e).ease=A}}function eh(e){var A=this._id;return arguments.length?this.each(Ah(A,e)):ke(this.node(),A).ease}function th(e,A){return function(){var t=A.apply(this,arguments);if(typeof t!="function")throw new Error;Pe(this,e).ease=t}}function nh(e){if(typeof e!="function")throw new Error;return this.each(th(this._id,e))}function rh(e){typeof e!="function"&&(e=_s(e));for(var A=this._groups,t=A.length,n=new Array(t),r=0;r<t;++r)for(var a=A[r],u=a.length,d=n[r]=[],g,h=0;h<u;++h)(g=a[h])&&e.call(g,g.__data__,h,a)&&d.push(g);return new qe(n,this._parents,this._name,this._id)}function oh(e){if(e._id!==this._id)throw new Error;for(var A=this._groups,t=e._groups,n=A.length,r=t.length,a=Math.min(n,r),u=new Array(n),d=0;d<a;++d)for(var g=A[d],h=t[d],B=g.length,w=u[d]=new Array(B),m,v=0;v<B;++v)(m=g[v]||h[v])&&(w[v]=m);for(;d<n;++d)u[d]=A[d];return new qe(u,this._parents,this._name,this._id)}function ih(e){return(e+"").trim().split(/^|\s+/).every(function(A){var t=A.indexOf(".");return t>=0&&(A=A.slice(0,t)),!A||A==="start"})}function sh(e,A,t){var n,r,a=ih(A)?li:Pe;return function(){var u=a(this,e),d=u.on;d!==n&&(r=(n=d).copy()).on(A,t),u.on=r}}function ah(e,A){var t=this._id;return arguments.length<2?ke(this.node(),t).on.on(e):this.each(sh(t,e,A))}function lh(e){return function(){var A=this.parentNode;for(var t in this.__transition)if(+t!==e)return;A&&A.removeChild(this)}}function ch(){return this.on("end.remove",lh(this._id))}function uh(e){var A=this._name,t=this._id;typeof e!="function"&&(e=Yo(e));for(var n=this._groups,r=n.length,a=new Array(r),u=0;u<r;++u)for(var d=n[u],g=d.length,h=a[u]=new Array(g),B,w,m=0;m<g;++m)(B=d[m])&&(w=e.call(B,B.__data__,m,d))&&("__data__"in B&&(w.__data__=B.__data__),h[m]=w,_r(h[m],A,t,m,h,ke(B,t)));return new qe(a,this._parents,A,t)}function dh(e){var A=this._name,t=this._id;typeof e!="function"&&(e=Is(e));for(var n=this._groups,r=n.length,a=[],u=[],d=0;d<r;++d)for(var g=n[d],h=g.length,B,w=0;w<h;++w)if(B=g[w]){for(var m=e.call(B,B.__data__,w,g),v,y=ke(B,t),I=0,L=m.length;I<L;++I)(v=m[I])&&_r(v,A,t,I,m,y);a.push(m),u.push(B)}return new qe(a,u,A,t)}var fh=bn.prototype.constructor;function gh(){return new fh(this._groups,this._parents)}function hh(e,A){var t,n,r;return function(){var a=$t(this,e),u=(this.style.removeProperty(e),$t(this,e));return a===u?null:a===t&&u===n?r:r=A(t=a,n=u)}}function fa(e){return function(){this.style.removeProperty(e)}}function Bh(e,A,t){var n,r=t+"",a;return function(){var u=$t(this,e);return u===r?null:u===n?a:a=A(n=u,t)}}function ph(e,A,t){var n,r,a;return function(){var u=$t(this,e),d=t(this),g=d+"";return d==null&&(g=d=(this.style.removeProperty(e),$t(this,e))),u===g?null:u===n&&g===r?a:(r=g,a=A(n=u,d))}}function mh(e,A){var t,n,r,a="style."+A,u="end."+a,d;return function(){var g=Pe(this,e),h=g.on,B=g.value[a]==null?d||(d=fa(A)):void 0;(h!==t||r!==B)&&(n=(t=h).copy()).on(u,r=B),g.on=n}}function wh(e,A,t){var n=(e+="")=="transform"?Cg:da;return A==null?this.styleTween(e,hh(e,n)).on("end.style."+e,fa(e)):typeof A=="function"?this.styleTween(e,ph(e,n,ci(this,"style."+e,A))).each(mh(this._id,e)):this.styleTween(e,Bh(e,n,A),t).on("end.style."+e,null)}function Ch(e,A,t){return function(n){this.style.setProperty(e,A.call(this,n),t)}}function vh(e,A,t){var n,r;function a(){var u=A.apply(this,arguments);return u!==r&&(n=(r=u)&&Ch(e,u,t)),n}return a._value=A,a}function yh(e,A,t){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(A==null)return this.tween(n,null);if(typeof A!="function")throw new Error;return this.tween(n,vh(e,A,t??""))}function Qh(e){return function(){this.textContent=e}}function Eh(e){return function(){var A=e(this);this.textContent=A??""}}function Fh(e){return this.tween("text",typeof e=="function"?Eh(ci(this,"text",e)):Qh(e==null?"":e+""))}function Uh(e){return function(A){this.textContent=e.call(this,A)}}function bh(e){var A,t;function n(){var r=e.apply(this,arguments);return r!==t&&(A=(t=r)&&Uh(r)),A}return n._value=e,n}function Hh(e){var A="text";if(arguments.length<1)return(A=this.tween(A))&&A._value;if(e==null)return this.tween(A,null);if(typeof e!="function")throw new Error;return this.tween(A,bh(e))}function Ih(){for(var e=this._name,A=this._id,t=ga(),n=this._groups,r=n.length,a=0;a<r;++a)for(var u=n[a],d=u.length,g,h=0;h<d;++h)if(g=u[h]){var B=ke(g,A);_r(g,e,t,h,u,{time:B.time+B.delay+B.duration,delay:0,duration:B.duration,ease:B.ease})}return new qe(n,this._parents,e,t)}function _h(){var e,A,t=this,n=t._id,r=t.size();return new Promise(function(a,u){var d={value:u},g={value:function(){--r===0&&a()}};t.each(function(){var h=Pe(this,n),B=h.on;B!==e&&(A=(e=B).copy(),A._.cancel.push(d),A._.interrupt.push(d),A._.end.push(g)),h.on=A}),r===0&&a()})}var Sh=0;function qe(e,A,t,n){this._groups=e,this._parents=A,this._name=t,this._id=n}function ga(){return++Sh}var At=bn.prototype;qe.prototype={constructor:qe,select:uh,selectAll:dh,selectChild:At.selectChild,selectChildren:At.selectChildren,filter:rh,merge:oh,selection:gh,transition:Ih,call:At.call,nodes:At.nodes,node:At.node,size:At.size,empty:At.empty,each:At.each,on:ah,attr:Vg,attrTween:$g,style:wh,styleTween:yh,text:Fh,textTween:Hh,remove:ch,tween:Lg,delay:Jg,duration:qg,ease:eh,easeVarying:nh,end:_h,[Symbol.iterator]:At[Symbol.iterator]};function xh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Dh={time:null,delay:0,duration:250,ease:xh};function Nh(e,A){for(var t;!(t=e.__transition)||!(t=t[A]);)if(!(e=e.parentNode))throw new Error(`transition ${A} not found`);return t}function Lh(e){var A,t;e instanceof qe?(A=e._id,e=e._name):(A=ga(),(t=Dh).time=oi(),e=e==null?null:e+"");for(var n=this._groups,r=n.length,a=0;a<r;++a)for(var u=n[a],d=u.length,g,h=0;h<d;++h)(g=u[h])&&_r(g,e,A,h,u,t||Nh(g,A));return new qe(n,this._parents,e,A)}bn.prototype.interrupt=xg,bn.prototype.transition=Lh;var xr=e=>()=>e;function Th(e,{sourceEvent:A,target:t,transform:n,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:A,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:r}})}function et(e,A,t){this.k=e,this.x=A,this.y=t}et.prototype={constructor:et,scale:function(e){return e===1?this:new et(this.k*e,this.x,this.y)},translate:function(e,A){return e===0&A===0?this:new et(this.k,this.x+this.k*e,this.y+this.k*A)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Zt=new et(1,0,0);et.prototype;function ui(e){e.stopImmediatePropagation()}function kn(e){e.preventDefault(),e.stopImmediatePropagation()}function kh(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Mh(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function ha(){return this.__zoom||Zt}function Oh(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Kh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Rh(e,A,t){var n=e.invertX(A[0][0])-t[0][0],r=e.invertX(A[1][0])-t[1][0],a=e.invertY(A[0][1])-t[0][1],u=e.invertY(A[1][1])-t[1][1];return e.translate(r>n?(n+r)/2:Math.min(0,n)||Math.max(0,r),u>a?(a+u)/2:Math.min(0,a)||Math.max(0,u))}function Vh(){var e=kh,A=Mh,t=Rh,n=Oh,r=Kh,a=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],d=250,g=Qr,h=dr("start","zoom","end"),B,w,m,v=500,y=150,I=0,L=10;function T(H){H.property("__zoom",ha).on("wheel.zoom",lA,{passive:!1}).on("mousedown.zoom",iA).on("dblclick.zoom",oA).filter(r).on("touchstart.zoom",tA).on("touchmove.zoom",x).on("touchend.zoom touchcancel.zoom",eA).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}T.transform=function(H,X,F,D){var k=H.selection?H.selection():H;k.property("__zoom",ha),H!==k?aA(H,X,F,D):k.interrupt().each(function(){Z(this,arguments).event(D).start().zoom(null,typeof X=="function"?X.apply(this,arguments):X).end()})},T.scaleBy=function(H,X,F,D){T.scaleTo(H,function(){return this.__zoom.k*(typeof X=="function"?X.apply(this,arguments):X)},F,D)},T.scaleTo=function(H,X,F,D){T.transform(H,function(){var k=A.apply(this,arguments),N=this.__zoom,R=F==null?O(k):typeof F=="function"?F.apply(this,arguments):F,$=N.invert(R),nA=typeof X=="function"?X.apply(this,arguments):X;return t(b(K(N,nA),R,$),k,u)},F,D)},T.translateBy=function(H,X,F,D){T.transform(H,function(){return t(this.__zoom.translate(typeof X=="function"?X.apply(this,arguments):X,typeof F=="function"?F.apply(this,arguments):F),A.apply(this,arguments),u)},null,D)},T.translateTo=function(H,X,F,D,k){T.transform(H,function(){var N=A.apply(this,arguments),R=this.__zoom,$=D==null?O(N):typeof D=="function"?D.apply(this,arguments):D;return t(Zt.translate($[0],$[1]).scale(R.k).translate(typeof X=="function"?-X.apply(this,arguments):-X,typeof F=="function"?-F.apply(this,arguments):-F),N,u)},D,k)};function K(H,X){return X=Math.max(a[0],Math.min(a[1],X)),X===H.k?H:new et(X,H.x,H.y)}function b(H,X,F){var D=X[0]-F[0]*H.k,k=X[1]-F[1]*H.k;return D===H.x&&k===H.y?H:new et(H.k,D,k)}function O(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function aA(H,X,F,D){H.on("start.zoom",function(){Z(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){Z(this,arguments).event(D).end()}).tween("zoom",function(){var k=this,N=arguments,R=Z(k,N).event(D),$=A.apply(k,N),nA=F==null?O($):typeof F=="function"?F.apply(k,N):F,BA=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),FA=k.__zoom,sA=typeof X=="function"?X.apply(k,N):X,Y=g(FA.invert(nA).concat(BA/FA.k),sA.invert(nA).concat(BA/sA.k));return function(J){if(J===1)J=sA;else{var uA=Y(J),wA=BA/uA[2];J=new et(wA,nA[0]-uA[0]*wA,nA[1]-uA[1]*wA)}R.zoom(null,J)}})}function Z(H,X,F){return!F&&H.__zooming||new cA(H,X)}function cA(H,X){this.that=H,this.args=X,this.active=0,this.sourceEvent=null,this.extent=A.apply(H,X),this.taps=0}cA.prototype={event:function(H){return H&&(this.sourceEvent=H),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(H,X){return this.mouse&&H!=="mouse"&&(this.mouse[1]=X.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=X.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=X.invert(this.touch1[0])),this.that.__zoom=X,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var X=Le(this.that).datum();h.call(H,this.that,new Th(H,{sourceEvent:this.sourceEvent,target:T,type:H,transform:this.that.__zoom,dispatch:h}),X)}};function lA(H,...X){if(!e.apply(this,arguments))return;var F=Z(this,X).event(H),D=this.__zoom,k=Math.max(a[0],Math.min(a[1],D.k*Math.pow(2,n.apply(this,arguments)))),N=Ke(H);if(F.wheel)(F.mouse[0][0]!==N[0]||F.mouse[0][1]!==N[1])&&(F.mouse[1]=D.invert(F.mouse[0]=N)),clearTimeout(F.wheel);else{if(D.k===k)return;F.mouse=[N,D.invert(N)],Sr(this),F.start()}kn(H),F.wheel=setTimeout(R,y),F.zoom("mouse",t(b(K(D,k),F.mouse[0],F.mouse[1]),F.extent,u));function R(){F.wheel=null,F.end()}}function iA(H,...X){if(m||!e.apply(this,arguments))return;var F=H.currentTarget,D=Z(this,X,!0).event(H),k=Le(H.view).on("mousemove.zoom",nA,!0).on("mouseup.zoom",BA,!0),N=Ke(H,F),R=H.clientX,$=H.clientY;Ks(H.view),ui(H),D.mouse=[N,this.__zoom.invert(N)],Sr(this),D.start();function nA(FA){if(kn(FA),!D.moved){var sA=FA.clientX-R,Y=FA.clientY-$;D.moved=sA*sA+Y*Y>I}D.event(FA).zoom("mouse",t(b(D.that.__zoom,D.mouse[0]=Ke(FA,F),D.mouse[1]),D.extent,u))}function BA(FA){k.on("mousemove.zoom mouseup.zoom",null),Rs(FA.view,D.moved),kn(FA),D.event(FA).end()}}function oA(H,...X){if(e.apply(this,arguments)){var F=this.__zoom,D=Ke(H.changedTouches?H.changedTouches[0]:H,this),k=F.invert(D),N=F.k*(H.shiftKey?.5:2),R=t(b(K(F,N),D,k),A.apply(this,X),u);kn(H),d>0?Le(this).transition().duration(d).call(aA,R,D,H):Le(this).call(T.transform,R,D,H)}}function tA(H,...X){if(e.apply(this,arguments)){var F=H.touches,D=F.length,k=Z(this,X,H.changedTouches.length===D).event(H),N,R,$,nA;for(ui(H),R=0;R<D;++R)$=F[R],nA=Ke($,this),nA=[nA,this.__zoom.invert(nA),$.identifier],k.touch0?!k.touch1&&k.touch0[2]!==nA[2]&&(k.touch1=nA,k.taps=0):(k.touch0=nA,N=!0,k.taps=1+!!B);B&&(B=clearTimeout(B)),N&&(k.taps<2&&(w=nA[0],B=setTimeout(function(){B=null},v)),Sr(this),k.start())}}function x(H,...X){if(this.__zooming){var F=Z(this,X).event(H),D=H.changedTouches,k=D.length,N,R,$,nA;for(kn(H),N=0;N<k;++N)R=D[N],$=Ke(R,this),F.touch0&&F.touch0[2]===R.identifier?F.touch0[0]=$:F.touch1&&F.touch1[2]===R.identifier&&(F.touch1[0]=$);if(R=F.that.__zoom,F.touch1){var BA=F.touch0[0],FA=F.touch0[1],sA=F.touch1[0],Y=F.touch1[1],J=(J=sA[0]-BA[0])*J+(J=sA[1]-BA[1])*J,uA=(uA=Y[0]-FA[0])*uA+(uA=Y[1]-FA[1])*uA;R=K(R,Math.sqrt(J/uA)),$=[(BA[0]+sA[0])/2,(BA[1]+sA[1])/2],nA=[(FA[0]+Y[0])/2,(FA[1]+Y[1])/2]}else if(F.touch0)$=F.touch0[0],nA=F.touch0[1];else return;F.zoom("touch",t(b(R,$,nA),F.extent,u))}}function eA(H,...X){if(this.__zooming){var F=Z(this,X).event(H),D=H.changedTouches,k=D.length,N,R;for(ui(H),m&&clearTimeout(m),m=setTimeout(function(){m=null},v),N=0;N<k;++N)R=D[N],F.touch0&&F.touch0[2]===R.identifier?delete F.touch0:F.touch1&&F.touch1[2]===R.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(R=Ke(R,this),Math.hypot(w[0]-R[0],w[1]-R[1])<L)){var $=Le(this).on("dblclick.zoom");$&&$.apply(this,arguments)}}}return T.wheelDelta=function(H){return arguments.length?(n=typeof H=="function"?H:xr(+H),T):n},T.filter=function(H){return arguments.length?(e=typeof H=="function"?H:xr(!!H),T):e},T.touchable=function(H){return arguments.length?(r=typeof H=="function"?H:xr(!!H),T):r},T.extent=function(H){return arguments.length?(A=typeof H=="function"?H:xr([[+H[0][0],+H[0][1]],[+H[1][0],+H[1][1]]]),T):A},T.scaleExtent=function(H){return arguments.length?(a[0]=+H[0],a[1]=+H[1],T):[a[0],a[1]]},T.translateExtent=function(H){return arguments.length?(u[0][0]=+H[0][0],u[1][0]=+H[1][0],u[0][1]=+H[0][1],u[1][1]=+H[1][1],T):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},T.constrain=function(H){return arguments.length?(t=H,T):t},T.duration=function(H){return arguments.length?(d=+H,T):d},T.interpolate=function(H){return arguments.length?(g=H,T):g},T.on=function(){var H=h.on.apply(h,arguments);return H===h?T:H},T.clickDistance=function(H){return arguments.length?(I=(H=+H)*H,T):Math.sqrt(I)},T.tapDistance=function(H){return arguments.length?(L=+H,T):L},T}var IA=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(IA||{}),di=(e=>(e.Partial="partial",e.Full="full",e))(di||{}),xt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(xt||{}),tt=(e=>(e.Strict="strict",e.Loose="loose",e))(tt||{}),nt=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(nt||{}),Mn=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Mn||{}),Ba=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(Ba||{}),Ph=["INPUT","SELECT","TEXTAREA"],Gh=typeof document<"u"?document:null;function fi(e){var A,t;const n=((t=(A=e.composedPath)==null?void 0:A.call(e))==null?void 0:t[0])||e.target,r=typeof n?.hasAttribute=="function"?n.hasAttribute("contenteditable"):!1,a=typeof n?.closest=="function"?n.closest(".nokey"):null;return Ph.includes(n?.nodeName)||r||!!a}function zh(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function pa(e,A,t,n){const r=A.replace("+",`
|
|
2
2
|
`).replace(`
|
|
3
3
|
|
|
4
4
|
`,`
|
|
@@ -25,7 +25,7 @@ Target: ${t}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or ta
|
|
|
25
25
|
Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
|
|
26
26
|
Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"},ce=class extends Error{constructor(e,...A){var t;super((t=Pa[e])==null?void 0:t.call(Pa,...A)),this.name="VueFlowError",this.code=e,this.args=A}};function pi(e){return"clientX"in e}function uB(e){return"sourceEvent"in e}function Ge(e,A){const t=pi(e);let n,r;return t?(n=e.clientX,r=e.clientY):"touches"in e&&e.touches.length>0?(n=e.touches[0].clientX,r=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(n=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY):(n=0,r=0),{x:n-(A?.left??0),y:r-(A?.top??0)}}var kr=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function dB(e){var A,t;return{width:((A=e.dimensions)==null?void 0:A.width)??e.width??0,height:((t=e.dimensions)==null?void 0:t.height)??e.height??0}}function Mr(e,A=[1,1]){return{x:A[0]*Math.round(e.x/A[0]),y:A[1]*Math.round(e.y/A[1])}}var fB=()=>!0;function mi(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function gB(e,A,t){const n=[],r={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of A.values())Nr(r,Dr(a))>0&&n.push(a);return n}var hB=250;function BB(e,A,t,n){var r,a;let u=[],d=Number.POSITIVE_INFINITY;const g=gB(e,t,A+hB);for(const h of g){const B=[...((r=h.handleBounds)==null?void 0:r.source)??[],...((a=h.handleBounds)==null?void 0:a.target)??[]];for(const w of B){if(n.nodeId===w.nodeId&&n.type===w.type&&n.id===w.id)continue;const{x:m,y:v}=An(h,w,w.position,!0),y=Math.sqrt((m-e.x)**2+(v-e.y)**2);y>A||(y<d?(u=[{...w,x:m,y:v}],d=y):y===d&&u.push({...w,x:m,y:v}))}}if(!u.length)return null;if(u.length>1){const h=n.type==="source"?"target":"source";return u.find(B=>B.type===h)??u[0]}return u[0]}function Ga(e,{handle:A,connectionMode:t,fromNodeId:n,fromHandleId:r,fromType:a,doc:u,lib:d,flowId:g,isValidConnection:h=fB},B,w,m,v){const y=a==="target",I=A?u.querySelector(`.${d}-flow__handle[data-id="${g}-${A?.nodeId}-${A?.id}-${A?.type}"]`):null,{x:L,y:T}=Ge(e),K=u.elementFromPoint(L,T),b=K?.classList.contains(`${d}-flow__handle`)?K:I,O={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const aA=za(void 0,b),Z=b.getAttribute("data-nodeid"),cA=b.getAttribute("data-handleid"),lA=b.classList.contains("connectable"),iA=b.classList.contains("connectableend");if(!Z||!aA)return O;const oA={source:y?Z:n,sourceHandle:y?cA:r,target:y?n:Z,targetHandle:y?r:cA};O.connection=oA,O.isValid=lA&&iA&&(t===tt.Strict?y&&aA==="source"||!y&&aA==="target":Z!==n||cA!==r)&&h(oA,{nodes:w,edges:B,sourceNode:m(oA.source),targetNode:m(oA.target)}),O.toHandle=Xa(Z,aA,cA,v,t,!0)}return O}function za(e,A){return e||(A?.classList.contains("target")?"target":A?.classList.contains("source")?"source":null)}function pB(e,A){let t=null;return A?t="valid":e&&!A&&(t="invalid"),t}function mB(e,A){let t=null;return A?t=!0:e&&!A&&(t=!1),t}function Xa(e,A,t,n,r,a=!1){var u,d,g;const h=n.get(e);if(!h)return null;const B=r===tt.Strict?(u=h.handleBounds)==null?void 0:u[A]:[...((d=h.handleBounds)==null?void 0:d.source)??[],...((g=h.handleBounds)==null?void 0:g.target)??[]],w=(t?B?.find(m=>m.id===t):B?.[0])??null;return w&&a?{...w,...An(h,w,w.position,!0)}:w}var wi={[IA.Left]:IA.Right,[IA.Right]:IA.Left,[IA.Top]:IA.Bottom,[IA.Bottom]:IA.Top},wB=["production","prod"];function Gn(e,...A){$a()&&console.warn(`[Vue Flow]: ${e}`,...A)}function $a(){return!wB.includes(process.env.NODE_ENV||"")}function Ya(e,A,t,n,r){const a=A.querySelectorAll(`.vue-flow__handle.${e}`);return a?.length?Array.from(a).map(u=>{const d=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:e,nodeId:r,position:u.getAttribute("data-handlepos"),x:(d.left-t.left)/n,y:(d.top-t.top)/n,...Lr(u)}}):null}function Ci(e,A,t,n,r,a=!1,u){r.value=!1,e.selected?(a||e.selected&&A)&&(n([e]),(0,o.nextTick)(()=>{u.blur()})):t([e])}function se(e){return typeof(0,o.unref)(e)<"u"}function CB(e,A,t,n){if(!e||!e.source||!e.target)return t(new ce(ie.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let r;return gt(e)?r=e:r={...e,id:Fa(e)},r=Qa(r,void 0,n),qh(r,A)?!1:r}function vB(e,A,t,n,r){if(!A.source||!A.target)return r(new ce(ie.EDGE_INVALID,e.id)),!1;if(!t)return r(new ce(ie.EDGE_NOT_FOUND,e.id)),!1;const{id:a,...u}=e;return{...u,id:n?Fa(A):a,source:A.source,target:A.target,sourceHandle:A.sourceHandle,targetHandle:A.targetHandle}}function Wa(e,A,t){const n={},r=[];for(let a=0;a<e.length;++a){const u=e[a];if(!Nt(u)){t(new ce(ie.NODE_INVALID,u?.id));continue}const d=Jh(u,A(u.id),u.parentNode);u.parentNode&&(n[u.parentNode]=!0),r[a]=d}for(const a of r){const u=A(a.parentNode)||r.find(d=>d.id===a.parentNode);a.parentNode&&!u&&t(new ce(ie.NODE_MISSING_PARENT,a.id,a.parentNode)),(a.parentNode||n[a.id])&&(n[a.id]&&(a.isParent=!0),u&&(u.isParent=!0))}return r}function Ja(e,A,t,n,r,a){let u=r;const d=n.get(u)||new Map;n.set(u,d.set(t,A)),u=`${r}-${e}`;const g=n.get(u)||new Map;if(n.set(u,g.set(t,A)),a){u=`${r}-${e}-${a}`;const h=n.get(u)||new Map;n.set(u,h.set(t,A))}}function vi(e,A,t){e.clear();for(const n of t){const{source:r,target:a,sourceHandle:u=null,targetHandle:d=null}=n,g={edgeId:n.id,source:r,target:a,sourceHandle:u,targetHandle:d},h=`${r}-${u}--${a}-${d}`;Ja("source",g,`${a}-${d}--${r}-${u}`,e,r,u),Ja("target",g,h,e,a,d)}}function Za(e,A){if(e.size!==A.size)return!1;for(const t of e)if(!A.has(t))return!1;return!0}function yi(e,A,t,n,r,a,u,d){const g=[];for(const h of e){const B=gt(h)?h:CB(h,d,r,a);if(!B)continue;const w=t(B.source),m=t(B.target);if(!w||!m){r(new ce(ie.EDGE_SOURCE_TARGET_MISSING,B.id,B.source,B.target));continue}if(!w){r(new ce(ie.EDGE_SOURCE_MISSING,B.id,B.source));continue}if(!m){r(new ce(ie.EDGE_TARGET_MISSING,B.id,B.target));continue}if(A&&!A(B,{edges:d,nodes:u,sourceNode:w,targetNode:m})){r(new ce(ie.EDGE_INVALID,B.id));continue}const v=n(B.id);g.push({...Qa(B,v,a),sourceNode:w,targetNode:m})}return g}var ja=Symbol("vueFlow"),qa=Symbol("nodeId"),Al=Symbol("nodeRef"),yB=Symbol("edgeId"),QB=Symbol("edgeRef"),Or=Symbol("slots");function el(e){const{vueFlowRef:A,snapToGrid:t,snapGrid:n,noDragClassName:r,nodeLookup:a,nodeExtent:u,nodeDragThreshold:d,viewport:g,autoPanOnNodeDrag:h,autoPanSpeed:B,nodesDraggable:w,panBy:m,findNode:v,multiSelectionActive:y,nodesSelectionActive:I,selectNodesOnDrag:L,removeSelectedElements:T,addSelectedNodes:K,updateNodePositions:b,emits:O}=$A(),{onStart:aA,onDrag:Z,onStop:cA,onClick:lA,el:iA,disabled:oA,id:tA,selectable:x,dragHandle:eA}=e,H=(0,o.shallowRef)(!1);let X=[],F,D=null,k={x:void 0,y:void 0},N={x:0,y:0},R=null,$=!1,nA=!1,BA=0,FA=!1;const sA=UB(),Y=({x:gA,y:j})=>{k={x:gA,y:j};let _=!1;if(X=X.map(U=>{const S={x:gA-U.distance.x,y:j-U.distance.y},{computedPosition:G}=Bi(U,t.value?Mr(S,n.value):S,O.error,u.value,U.parentNode?v(U.parentNode):void 0);return _=_||U.position.x!==G.x||U.position.y!==G.y,U.position=G,U}),nA=nA||_,!!_&&(b(X,!0,!0),H.value=!0,R)){const[U,S]=hi({id:tA,dragItems:X,findNode:v});Z({event:R,node:U,nodes:S})}},J=()=>{if(!D)return;const[gA,j]=Na(N,D,B.value);if(gA!==0||j!==0){const _={x:(k.x??0)-gA/g.value.zoom,y:(k.y??0)-j/g.value.zoom};m({x:gA,y:j})&&Y(_)}BA=requestAnimationFrame(J)},uA=(gA,j)=>{$=!0;const _=v(tA);!L.value&&!y.value&&_&&(_.selected||T()),_&&(0,o.toValue)(x)&&L.value&&Ci(_,y.value,K,T,I,!1,j);const U=sA(gA.sourceEvent);if(k=U,X=oB(a.value,w.value,U,tA),X.length){const[S,G]=hi({id:tA,dragItems:X,findNode:v});aA({event:gA.sourceEvent,node:S,nodes:G})}},wA=(gA,j)=>{var _;gA.sourceEvent.type==="touchmove"&&gA.sourceEvent.touches.length>1||(nA=!1,d.value===0&&uA(gA,j),k=sA(gA.sourceEvent),D=((_=A.value)==null?void 0:_.getBoundingClientRect())||null,N=Ge(gA.sourceEvent,D))},QA=(gA,j)=>{const _=sA(gA.sourceEvent);if(!FA&&$&&h.value&&(FA=!0,J()),!$){const U=_.xSnapped-(k.x??0),S=_.ySnapped-(k.y??0);Math.sqrt(U*U+S*S)>d.value&&uA(gA,j)}(k.x!==_.xSnapped||k.y!==_.ySnapped)&&X.length&&$&&(R=gA.sourceEvent,N=Ge(gA.sourceEvent,D),Y(_))},_A=gA=>{let j=!1;if(!$&&!H.value&&!y.value){const _=gA.sourceEvent,U=sA(_),S=U.xSnapped-(k.x??0),G=U.ySnapped-(k.y??0),P=Math.sqrt(S*S+G*G);P!==0&&P<=d.value&&(lA?.(_),j=!0)}if(X.length&&!j){nA&&(b(X,!1,!1),nA=!1);const[_,U]=hi({id:tA,dragItems:X,findNode:v});cA({event:gA.sourceEvent,node:_,nodes:U})}X=[],H.value=!1,FA=!1,$=!1,k={x:void 0,y:void 0},cancelAnimationFrame(BA)};return(0,o.watch)([()=>(0,o.toValue)(oA),iA],([gA,j],_,U)=>{if(j){const S=Le(j);gA||(F=Wf().on("start",G=>wA(G,j)).on("drag",G=>QA(G,j)).on("end",G=>_A(G)).filter(G=>{const P=G.target,dA=(0,o.toValue)(eA);return!G.button&&(!r.value||!Ka(P,`.${r.value}`,j)&&(!dA||Ka(P,dA,j)))}),S.call(F)),U(()=>{S.on(".drag",null),F&&(F.on("start",null),F.on("drag",null),F.on("end",null))})}}),H}function EB(){return{doubleClick:yA(),click:yA(),mouseEnter:yA(),mouseMove:yA(),mouseLeave:yA(),contextMenu:yA(),updateStart:yA(),update:yA(),updateEnd:yA()}}function FB(e,A){const t=EB();return t.doubleClick.on(n=>{var r,a;A.edgeDoubleClick(n),(a=(r=e.events)==null?void 0:r.doubleClick)==null||a.call(r,n)}),t.click.on(n=>{var r,a;A.edgeClick(n),(a=(r=e.events)==null?void 0:r.click)==null||a.call(r,n)}),t.mouseEnter.on(n=>{var r,a;A.edgeMouseEnter(n),(a=(r=e.events)==null?void 0:r.mouseEnter)==null||a.call(r,n)}),t.mouseMove.on(n=>{var r,a;A.edgeMouseMove(n),(a=(r=e.events)==null?void 0:r.mouseMove)==null||a.call(r,n)}),t.mouseLeave.on(n=>{var r,a;A.edgeMouseLeave(n),(a=(r=e.events)==null?void 0:r.mouseLeave)==null||a.call(r,n)}),t.contextMenu.on(n=>{var r,a;A.edgeContextMenu(n),(a=(r=e.events)==null?void 0:r.contextMenu)==null||a.call(r,n)}),t.updateStart.on(n=>{var r,a;A.edgeUpdateStart(n),(a=(r=e.events)==null?void 0:r.updateStart)==null||a.call(r,n)}),t.update.on(n=>{var r,a;A.edgeUpdate(n),(a=(r=e.events)==null?void 0:r.update)==null||a.call(r,n)}),t.updateEnd.on(n=>{var r,a;A.edgeUpdateEnd(n),(a=(r=e.events)==null?void 0:r.updateEnd)==null||a.call(r,n)}),Object.entries(t).reduce((n,[r,a])=>(n.emit[r]=a.trigger,n.on[r]=a.on,n),{emit:{},on:{}})}function UB(){const{viewport:e,snapGrid:A,snapToGrid:t,vueFlowRef:n}=$A();return r=>{var a;const u=((a=n.value)==null?void 0:a.getBoundingClientRect())??{left:0,top:0},{x:d,y:g}=Ge(uB(r)?r.sourceEvent:r,u),h=Vn({x:d,y:g},e.value),{x:B,y:w}=t.value?Mr(h,A.value):h;return{xSnapped:B,ySnapped:w,...h}}}function Kr(){return!0}function tl({handleId:e,nodeId:A,type:t,isValidConnection:n,edgeUpdaterType:r,onEdgeUpdate:a,onEdgeUpdateEnd:u}){const{id:d,vueFlowRef:g,connectionMode:h,connectionRadius:B,connectOnClick:w,connectionClickStartHandle:m,nodesConnectable:v,autoPanOnConnect:y,autoPanSpeed:I,findNode:L,panBy:T,startConnection:K,updateConnection:b,endConnection:O,emits:aA,viewport:Z,edges:cA,nodes:lA,isValidConnection:iA,nodeLookup:oA}=$A();let tA=null,x=!1,eA=null;function H(F){var D;const k=(0,o.toValue)(t)==="target",N=pi(F),R=ya(F.target),$=F.currentTarget;if($&&(N&&F.button===0||!N)){let nA=function(bA){_=Ge(bA,_A),Y=BB(Vn(_,Z.value,!1,[1,1]),B.value,oA.value,G),U||(S(),U=!0);const pA=Ga(bA,{handle:Y,connectionMode:h.value,fromNodeId:(0,o.toValue)(A),fromHandleId:(0,o.toValue)(e),fromType:k?"target":"source",isValidConnection:sA,doc:R,lib:"vue",flowId:d,nodeLookup:oA.value},cA.value,lA.value,L,oA.value);eA=pA.handleDomNode,tA=pA.connection,x=mB(!!Y,pA.isValid);const DA={...fA,isValid:x,to:pA.toHandle&&x?Rn({x:pA.toHandle.x,y:pA.toHandle.y},Z.value):_,toHandle:pA.toHandle,toPosition:x&&pA.toHandle?pA.toHandle.position:wi[G.position],toNode:pA.toHandle?oA.value.get(pA.toHandle.nodeId):null};if(x&&Y&&fA?.toHandle&&DA.toHandle&&fA.toHandle.type===DA.toHandle.type&&fA.toHandle.nodeId===DA.toHandle.nodeId&&fA.toHandle.id===DA.toHandle.id&&fA.to.x===DA.to.x&&fA.to.y===DA.to.y)return;const OA=Y??pA.toHandle;if(b(OA&&x?Rn({x:OA.x,y:OA.y},Z.value):_,OA,pB(!!OA,x)),fA=DA,!Y&&!x&&!eA)return mi(j);tA&&tA.source!==tA.target&&eA&&(mi(j),j=eA,eA.classList.add("connecting","vue-flow__handle-connecting"),eA.classList.toggle("valid",!!x),eA.classList.toggle("vue-flow__handle-valid",!!x))},BA=function(bA){"touches"in bA&&bA.touches.length>0||((Y||eA)&&tA&&x&&(a?a(bA,tA):aA.connect(tA)),aA.connectEnd(bA),r&&u?.(bA),mi(j),cancelAnimationFrame(J),O(bA),U=!1,x=!1,tA=null,eA=null,R.removeEventListener("mousemove",nA),R.removeEventListener("mouseup",BA),R.removeEventListener("touchmove",nA),R.removeEventListener("touchend",BA))};const FA=L((0,o.toValue)(A));let sA=(0,o.toValue)(n)||iA.value||Kr;!sA&&FA&&(sA=(k?FA.isValidSourcePos:FA.isValidTargetPos)||Kr);let Y,J=0;const{x:uA,y:wA}=Ge(F),QA=za((0,o.toValue)(r),$),_A=(D=g.value)==null?void 0:D.getBoundingClientRect();if(!_A||!QA)return;const gA=Xa((0,o.toValue)(A),QA,(0,o.toValue)(e),oA.value,h.value);if(!gA)return;let j,_=Ge(F,_A),U=!1;const S=()=>{if(!y.value)return;const[bA,pA]=Na(_,_A,I.value);T({x:bA,y:pA}),J=requestAnimationFrame(S)},G={...gA,nodeId:(0,o.toValue)(A),type:QA,position:gA.position},P=oA.value.get((0,o.toValue)(A)),dA={inProgress:!0,isValid:null,from:An(P,G,IA.Left,!0),fromHandle:G,fromPosition:G.position,fromNode:P,to:_,toHandle:null,toPosition:wi[G.position],toNode:null};K({nodeId:(0,o.toValue)(A),id:(0,o.toValue)(e),type:QA,position:$?.getAttribute("data-handlepos")||IA.Top,..._},{x:uA-_A.left,y:wA-_A.top}),aA.connectStart({event:F,nodeId:(0,o.toValue)(A),handleId:(0,o.toValue)(e),handleType:QA});let fA=dA;R.addEventListener("mousemove",nA),R.addEventListener("mouseup",BA),R.addEventListener("touchmove",nA),R.addEventListener("touchend",BA)}}function X(F){var D,k;if(!w.value)return;const N=(0,o.toValue)(t)==="target";if(!m.value){aA.clickConnectStart({event:F,nodeId:(0,o.toValue)(A),handleId:(0,o.toValue)(e)}),K({nodeId:(0,o.toValue)(A),type:(0,o.toValue)(t),id:(0,o.toValue)(e),position:IA.Top,...Ge(F)},void 0,!0);return}let R=(0,o.toValue)(n)||iA.value||Kr;const $=L((0,o.toValue)(A));if(!R&&$&&(R=(N?$.isValidSourcePos:$.isValidTargetPos)||Kr),$&&(typeof $.connectable>"u"?v.value:$.connectable)===!1)return;const nA=ya(F.target),BA=Ga(F,{handle:{nodeId:(0,o.toValue)(A),id:(0,o.toValue)(e),type:(0,o.toValue)(t),position:IA.Top,...Ge(F)},connectionMode:h.value,fromNodeId:m.value.nodeId,fromHandleId:m.value.id??null,fromType:m.value.type,isValidConnection:R,doc:nA,lib:"vue",flowId:d,nodeLookup:oA.value},cA.value,lA.value,L,oA.value),FA=((D=BA.connection)==null?void 0:D.source)===((k=BA.connection)==null?void 0:k.target);BA.isValid&&BA.connection&&!FA&&aA.connect(BA.connection),aA.clickConnectEnd(F),O(F,!0)}return{handlePointerDown:H,handleClick:X}}function bB(){return(0,o.inject)(qa,"")}function nl(e){const A=e??bB()??"",t=(0,o.inject)(Al,(0,o.ref)(null)),{findNode:n,edges:r,emits:a}=$A(),u=n(A);return u||a.error(new ce(ie.NODE_NOT_FOUND,A)),{id:A,nodeEl:t,node:u,parentNode:(0,o.computed)(()=>n(u.parentNode)),connectedEdges:(0,o.computed)(()=>Ia([u],r.value))}}function HB(){return{doubleClick:yA(),click:yA(),mouseEnter:yA(),mouseMove:yA(),mouseLeave:yA(),contextMenu:yA(),dragStart:yA(),drag:yA(),dragStop:yA()}}function IB(e,A){const t=HB();return t.doubleClick.on(n=>{var r,a;A.nodeDoubleClick(n),(a=(r=e.events)==null?void 0:r.doubleClick)==null||a.call(r,n)}),t.click.on(n=>{var r,a;A.nodeClick(n),(a=(r=e.events)==null?void 0:r.click)==null||a.call(r,n)}),t.mouseEnter.on(n=>{var r,a;A.nodeMouseEnter(n),(a=(r=e.events)==null?void 0:r.mouseEnter)==null||a.call(r,n)}),t.mouseMove.on(n=>{var r,a;A.nodeMouseMove(n),(a=(r=e.events)==null?void 0:r.mouseMove)==null||a.call(r,n)}),t.mouseLeave.on(n=>{var r,a;A.nodeMouseLeave(n),(a=(r=e.events)==null?void 0:r.mouseLeave)==null||a.call(r,n)}),t.contextMenu.on(n=>{var r,a;A.nodeContextMenu(n),(a=(r=e.events)==null?void 0:r.contextMenu)==null||a.call(r,n)}),t.dragStart.on(n=>{var r,a;A.nodeDragStart(n),(a=(r=e.events)==null?void 0:r.dragStart)==null||a.call(r,n)}),t.drag.on(n=>{var r,a;A.nodeDrag(n),(a=(r=e.events)==null?void 0:r.drag)==null||a.call(r,n)}),t.dragStop.on(n=>{var r,a;A.nodeDragStop(n),(a=(r=e.events)==null?void 0:r.dragStop)==null||a.call(r,n)}),Object.entries(t).reduce((n,[r,a])=>(n.emit[r]=a.trigger,n.on[r]=a.on,n),{emit:{},on:{}})}function rl(){const{getSelectedNodes:e,nodeExtent:A,updateNodePositions:t,findNode:n,snapGrid:r,snapToGrid:a,nodesDraggable:u,emits:d}=$A();return(g,h=!1)=>{const B=a.value?r.value[0]:5,w=a.value?r.value[1]:5,m=h?4:1,v=g.x*B*m,y=g.y*w*m,I=[];for(const L of e.value)if(L.draggable||u&&typeof L.draggable>"u"){const{position:T}=Bi(L,{x:L.computedPosition.x+v,y:L.computedPosition.y+y},d.error,A.value,L.parentNode?n(L.parentNode):void 0);I.push({id:L.id,position:T,from:L.position,distance:{x:g.x,y:g.y},dimensions:L.dimensions})}t(I,!0,!1)}}var Rr=.1,_B=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function pt(){return Gn("Viewport not initialized yet."),Promise.resolve(!1)}var SB={zoomIn:pt,zoomOut:pt,zoomTo:pt,fitView:pt,setCenter:pt,fitBounds:pt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:pt,setTransform:pt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function xB(e){function A(n,r){return new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(r?.interpolate==="linear"?xn:Qr).scaleBy(Qi(e.d3Selection,r?.duration,r?.ease,()=>{a(!0)}),n):a(!1)})}function t(n,r,a,u){return new Promise(d=>{var g;const{x:h,y:B}=va({x:-n,y:-r},e.translateExtent),w=Zt.translate(-h,-B).scale(a);e.d3Selection&&e.d3Zoom?(g=e.d3Zoom)==null||g.interpolate(u?.interpolate==="linear"?xn:Qr).transform(Qi(e.d3Selection,u?.duration,u?.ease,()=>{d(!0)}),w):d(!1)})}return(0,o.computed)(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:n=>A(1.2,n),zoomOut:n=>A(1/1.2,n),zoomTo:(n,r)=>new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(r?.interpolate==="linear"?xn:Qr).scaleTo(Qi(e.d3Selection,r?.duration,r?.ease,()=>{a(!0)}),n):a(!1)}),setViewport:(n,r)=>t(n.x,n.y,n.zoom,r),setTransform:(n,r)=>t(n.x,n.y,n.zoom,r),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(n={padding:Rr,includeHiddenNodes:!1,duration:0})=>{var r,a;const u=[];for(const B of e.nodes)B.dimensions.width&&B.dimensions.height&&(n?.includeHiddenNodes||!B.hidden)&&(!((r=n.nodes)!=null&&r.length)||(a=n.nodes)!=null&&a.length&&n.nodes.includes(B.id))&&u.push(B);if(!u.length)return Promise.resolve(!1);const{x:d,y:g,zoom:h}=_a(ba(u),e.dimensions.width,e.dimensions.height,n.minZoom??e.minZoom,n.maxZoom??e.maxZoom,n.padding??Rr);return t(d,g,h,n)},setCenter:(n,r,a)=>{const u=typeof a?.zoom<"u"?a.zoom:e.maxZoom;return t(e.dimensions.width/2-n*u,e.dimensions.height/2-r*u,u,a)},fitBounds:(n,r={padding:Rr})=>{const{x:a,y:u,zoom:d}=_a(n,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,r.padding??Rr);return t(a,u,d,r)},project:n=>Vn(n,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:n=>{if(e.vueFlowRef){const{x:r,y:a}=e.vueFlowRef.getBoundingClientRect();return Vn({x:n.x-r,y:n.y-a},e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:n=>{if(e.vueFlowRef){const{x:r,y:a}=e.vueFlowRef.getBoundingClientRect();return Rn({x:n.x+r,y:n.y+a},e.viewport)}return{x:0,y:0}}}:SB)}function Qi(e,A=0,t=_B,n=()=>{}){const r=typeof A=="number"&&A>0;return r||n(),r?e.transition().duration(A).ease(t).on("end",n):e}function DB(e,A,t){const n=(0,o.effectScope)(!0);return n.run(()=>{const r=()=>{n.run(()=>{let I,L,T=!!(t.nodes.value.length||t.edges.value.length);I=Xt([e.modelValue,()=>{var K,b;return(b=(K=e.modelValue)==null?void 0:K.value)==null?void 0:b.length}],([K])=>{K&&Array.isArray(K)&&(L?.pause(),t.setElements(K),!L&&!T&&K.length?T=!0:L?.resume())}),L=Xt([t.nodes,t.edges,()=>t.edges.value.length,()=>t.nodes.value.length],([K,b])=>{var O;(O=e.modelValue)!=null&&O.value&&Array.isArray(e.modelValue.value)&&(I?.pause(),e.modelValue.value=[...K,...b],(0,o.nextTick)(()=>{I?.resume()}))},{immediate:T}),(0,o.onScopeDispose)(()=>{I?.stop(),L?.stop()})})},a=()=>{n.run(()=>{let I,L,T=!!t.nodes.value.length;I=Xt([e.nodes,()=>{var K,b;return(b=(K=e.nodes)==null?void 0:K.value)==null?void 0:b.length}],([K])=>{K&&Array.isArray(K)&&(L?.pause(),t.setNodes(K),!L&&!T&&K.length?T=!0:L?.resume())}),L=Xt([t.nodes,()=>t.nodes.value.length],([K])=>{var b;(b=e.nodes)!=null&&b.value&&Array.isArray(e.nodes.value)&&(I?.pause(),e.nodes.value=[...K],(0,o.nextTick)(()=>{I?.resume()}))},{immediate:T}),(0,o.onScopeDispose)(()=>{I?.stop(),L?.stop()})})},u=()=>{n.run(()=>{let I,L,T=!!t.edges.value.length;I=Xt([e.edges,()=>{var K,b;return(b=(K=e.edges)==null?void 0:K.value)==null?void 0:b.length}],([K])=>{K&&Array.isArray(K)&&(L?.pause(),t.setEdges(K),!L&&!T&&K.length?T=!0:L?.resume())}),L=Xt([t.edges,()=>t.edges.value.length],([K])=>{var b;(b=e.edges)!=null&&b.value&&Array.isArray(e.edges.value)&&(I?.pause(),e.edges.value=[...K],(0,o.nextTick)(()=>{I?.resume()}))},{immediate:T}),(0,o.onScopeDispose)(()=>{I?.stop(),L?.stop()})})},d=()=>{n.run(()=>{(0,o.watch)(()=>A.maxZoom,()=>{A.maxZoom&&se(A.maxZoom)&&t.setMaxZoom(A.maxZoom)},{immediate:!0})})},g=()=>{n.run(()=>{(0,o.watch)(()=>A.minZoom,()=>{A.minZoom&&se(A.minZoom)&&t.setMinZoom(A.minZoom)},{immediate:!0})})},h=()=>{n.run(()=>{(0,o.watch)(()=>A.translateExtent,()=>{A.translateExtent&&se(A.translateExtent)&&t.setTranslateExtent(A.translateExtent)},{immediate:!0})})},B=()=>{n.run(()=>{(0,o.watch)(()=>A.nodeExtent,()=>{A.nodeExtent&&se(A.nodeExtent)&&t.setNodeExtent(A.nodeExtent)},{immediate:!0})})},w=()=>{n.run(()=>{(0,o.watch)(()=>A.applyDefault,()=>{se(A.applyDefault)&&(t.applyDefault.value=A.applyDefault)},{immediate:!0})})},m=()=>{n.run(()=>{const I=async L=>{let T=L;typeof A.autoConnect=="function"&&(T=await A.autoConnect(L)),T!==!1&&t.addEdges([T])};(0,o.watch)(()=>A.autoConnect,()=>{se(A.autoConnect)&&(t.autoConnect.value=A.autoConnect)},{immediate:!0}),(0,o.watch)(t.autoConnect,(L,T,K)=>{L?t.onConnect(I):t.hooks.value.connect.off(I),K(()=>{t.hooks.value.connect.off(I)})},{immediate:!0})})},v=()=>{const I=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const L of Object.keys(A)){const T=L;if(!I.includes(T)){const K=(0,o.toRef)(()=>A[T]),b=t[T];(0,o.isRef)(b)&&n.run(()=>{(0,o.watch)(K,O=>{se(O)&&(b.value=O)},{immediate:!0})})}}};r(),a(),u(),g(),d(),h(),B(),w(),m(),v()}),()=>n.stop()}function NB(){return{edgesChange:yA(),nodesChange:yA(),nodeDoubleClick:yA(),nodeClick:yA(),nodeMouseEnter:yA(),nodeMouseMove:yA(),nodeMouseLeave:yA(),nodeContextMenu:yA(),nodeDragStart:yA(),nodeDrag:yA(),nodeDragStop:yA(),nodesInitialized:yA(),miniMapNodeClick:yA(),miniMapNodeDoubleClick:yA(),miniMapNodeMouseEnter:yA(),miniMapNodeMouseMove:yA(),miniMapNodeMouseLeave:yA(),connect:yA(),connectStart:yA(),connectEnd:yA(),clickConnectStart:yA(),clickConnectEnd:yA(),paneReady:yA(),init:yA(),move:yA(),moveStart:yA(),moveEnd:yA(),selectionDragStart:yA(),selectionDrag:yA(),selectionDragStop:yA(),selectionContextMenu:yA(),selectionStart:yA(),selectionEnd:yA(),viewportChangeStart:yA(),viewportChange:yA(),viewportChangeEnd:yA(),paneScroll:yA(),paneClick:yA(),paneContextMenu:yA(),paneMouseEnter:yA(),paneMouseMove:yA(),paneMouseLeave:yA(),edgeContextMenu:yA(),edgeMouseEnter:yA(),edgeMouseMove:yA(),edgeMouseLeave:yA(),edgeDoubleClick:yA(),edgeClick:yA(),edgeUpdateStart:yA(),edgeUpdate:yA(),edgeUpdateEnd:yA(),updateNodeInternals:yA(),error:yA(e=>Gn(e.message))}}function LB(e,A){const t=(0,o.getCurrentInstance)();(0,o.onBeforeMount)(()=>{for(const[r,a]of Object.entries(A.value)){const u=d=>{e(r,d)};a.setEmitter(u),Un(a.removeEmitter),a.setHasEmitListeners(()=>n(r)),Un(a.removeHasEmitListeners)}});function n(r){var a;const u=TB(r);return!!((a=t?.vnode.props)!=null&&a[u])}}function TB(e){const[A,...t]=e.split(":");return`on${A.replace(/(?:^|-)(\w)/g,(n,r)=>r.toUpperCase())}${t.length?`:${t.join(":")}`:""}`}function ol(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:di.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Mn.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:xt.Bezier,style:{}},connectionMode:tt.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:NaN,y:NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:kr()?"Meta":"Control",zoomActivationKeyCode:kr()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:NB(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}var kB=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function MB(e,A,t){const n=xB(e),r=_=>{const U=_??[];e.hooks.updateNodeInternals.trigger(U)},a=_=>jh(_,e.nodes,e.edges),u=_=>Zh(_,e.nodes,e.edges),d=_=>Ia(_,e.edges),g=({id:_,type:U,nodeId:S})=>{var G;const P=_?`-${U}-${_}`:`-${U}`;return Array.from(((G=e.connectionLookup.get(`${S}${P}`))==null?void 0:G.values())??[])},h=_=>{if(_)return A.value.get(_)},B=_=>{if(_)return t.value.get(_)},w=(_,U,S)=>{var G,P;const dA=[];for(const fA of _){const bA={id:fA.id,type:"position",dragging:S,from:fA.from};if(U&&(bA.position=fA.position,fA.parentNode)){const pA=h(fA.parentNode);bA.position={x:bA.position.x-(((G=pA?.computedPosition)==null?void 0:G.x)??0),y:bA.position.y-(((P=pA?.computedPosition)==null?void 0:P.y)??0)}}dA.push(bA)}dA?.length&&e.hooks.nodesChange.trigger(dA)},m=_=>{if(!e.vueFlowRef)return;const U=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!U)return;const S=window.getComputedStyle(U),{m22:G}=new window.DOMMatrixReadOnly(S.transform),P=[];for(const dA of _){const fA=dA,bA=h(fA.id);if(bA){const pA=Lr(fA.nodeElement);if(pA.width&&pA.height&&(bA.dimensions.width!==pA.width||bA.dimensions.height!==pA.height||fA.forceUpdate)){const DA=fA.nodeElement.getBoundingClientRect();bA.dimensions=pA,bA.handleBounds.source=Ya("source",fA.nodeElement,DA,G,bA.id),bA.handleBounds.target=Ya("target",fA.nodeElement,DA,G,bA.id),P.push({id:bA.id,type:"dimensions",dimensions:pA})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&n.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),P.length&&e.hooks.nodesChange.trigger(P)},v=(_,U)=>{const S=new Set,G=new Set;for(const fA of _)Nt(fA)?S.add(fA.id):gt(fA)&&G.add(fA.id);const P=Bt(A.value,S,!0),dA=Bt(t.value,G);if(e.multiSelectionActive){for(const fA of S)P.push(ht(fA,U));for(const fA of G)dA.push(ht(fA,U))}P.length&&e.hooks.nodesChange.trigger(P),dA.length&&e.hooks.edgesChange.trigger(dA)},y=_=>{if(e.multiSelectionActive){const U=_.map(S=>ht(S.id,!0));e.hooks.nodesChange.trigger(U);return}e.hooks.nodesChange.trigger(Bt(A.value,new Set(_.map(U=>U.id)),!0)),e.hooks.edgesChange.trigger(Bt(t.value))},I=_=>{if(e.multiSelectionActive){const U=_.map(S=>ht(S.id,!0));e.hooks.edgesChange.trigger(U);return}e.hooks.edgesChange.trigger(Bt(t.value,new Set(_.map(U=>U.id)))),e.hooks.nodesChange.trigger(Bt(A.value,new Set,!0))},L=_=>{v(_,!0)},T=_=>{const U=(_||e.nodes).map(S=>(S.selected=!1,ht(S.id,!1)));e.hooks.nodesChange.trigger(U)},K=_=>{const U=(_||e.edges).map(S=>(S.selected=!1,ht(S.id,!1)));e.hooks.edgesChange.trigger(U)},b=_=>{if(!_||!_.length)return v([],!1);const U=_.reduce((S,G)=>{const P=ht(G.id,!1);return Nt(G)?S.nodes.push(P):S.edges.push(P),S},{nodes:[],edges:[]});U.nodes.length&&e.hooks.nodesChange.trigger(U.nodes),U.edges.length&&e.hooks.edgesChange.trigger(U.edges)},O=_=>{var U;(U=e.d3Zoom)==null||U.scaleExtent([_,e.maxZoom]),e.minZoom=_},aA=_=>{var U;(U=e.d3Zoom)==null||U.scaleExtent([e.minZoom,_]),e.maxZoom=_},Z=_=>{var U;(U=e.d3Zoom)==null||U.translateExtent(_),e.translateExtent=_},cA=_=>{e.nodeExtent=_,r()},lA=_=>{var U;(U=e.d3Zoom)==null||U.clickDistance(_)},iA=_=>{e.nodesDraggable=_,e.nodesConnectable=_,e.elementsSelectable=_},oA=_=>{const U=_ instanceof Function?_(e.nodes):_;!e.initialized&&!U.length||(e.nodes=Wa(U,h,e.hooks.error.trigger))},tA=_=>{const U=_ instanceof Function?_(e.edges):_;if(!e.initialized&&!U.length)return;const S=yi(U,e.isValidConnection,h,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);vi(e.connectionLookup,t.value,S),e.edges=S},x=_=>{const U=_ instanceof Function?_([...e.nodes,...e.edges]):_;!e.initialized&&!U.length||(oA(U.filter(Nt)),tA(U.filter(gt)))},eA=_=>{let U=_ instanceof Function?_(e.nodes):_;U=Array.isArray(U)?U:[U];const S=Wa(U,h,e.hooks.error.trigger),G=[];for(const P of S)G.push(Ta(P));G.length&&e.hooks.nodesChange.trigger(G)},H=_=>{let U=_ instanceof Function?_(e.edges):_;U=Array.isArray(U)?U:[U];const S=yi(U,e.isValidConnection,h,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),G=[];for(const P of S)G.push(Ta(P));G.length&&e.hooks.edgesChange.trigger(G)},X=(_,U=!0,S=!1)=>{const G=_ instanceof Function?_(e.nodes):_,P=Array.isArray(G)?G:[G],dA=[],fA=[];function bA(DA){const OA=d(DA);for(const KA of OA)(!se(KA.deletable)||KA.deletable)&&fA.push(Ma(KA.id,KA.source,KA.target,KA.sourceHandle,KA.targetHandle))}function pA(DA){const OA=[];for(const KA of e.nodes)KA.parentNode===DA&&OA.push(KA);if(OA.length){for(const KA of OA)dA.push(ka(KA.id));U&&bA(OA);for(const KA of OA)pA(KA.id)}}for(const DA of P){const OA=typeof DA=="string"?h(DA):DA;OA&&(se(OA.deletable)&&!OA.deletable||(dA.push(ka(OA.id)),U&&bA([OA]),S&&pA(OA.id)))}fA.length&&e.hooks.edgesChange.trigger(fA),dA.length&&e.hooks.nodesChange.trigger(dA)},F=_=>{const U=_ instanceof Function?_(e.edges):_,S=Array.isArray(U)?U:[U],G=[];for(const P of S){const dA=typeof P=="string"?B(P):P;dA&&(se(dA.deletable)&&!dA.deletable||G.push(Ma(typeof P=="string"?P:P.id,dA.source,dA.target,dA.sourceHandle,dA.targetHandle)))}e.hooks.edgesChange.trigger(G)},D=(_,U,S=!0)=>{const G=B(_.id);if(!G)return!1;const P=e.edges.indexOf(G),dA=vB(_,U,G,S,e.hooks.error.trigger);if(dA){const[fA]=yi([dA],e.isValidConnection,h,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((bA,pA)=>pA===P?fA:bA),vi(e.connectionLookup,t.value,[fA]),fA}return!1},k=(_,U,S={replace:!1})=>{const G=B(_);if(!G)return;const P=typeof U=="function"?U(G):U;G.data=S.replace?P:{...G.data,...P}},N=_=>La(_,e.nodes),R=_=>{const U=La(_,e.edges);return vi(e.connectionLookup,t.value,U),U},$=(_,U,S={replace:!1})=>{const G=h(_);if(!G)return;const P=typeof U=="function"?U(G):U;S.replace?e.nodes.splice(e.nodes.indexOf(G),1,P):Object.assign(G,P)},nA=(_,U,S={replace:!1})=>{const G=h(_);if(!G)return;const P=typeof U=="function"?U(G):U;G.data=S.replace?P:{...G.data,...P}},BA=(_,U,S=!1)=>{S?e.connectionClickStartHandle=_:e.connectionStartHandle=_,e.connectionEndHandle=null,e.connectionStatus=null,U&&(e.connectionPosition=U)},FA=(_,U=null,S=null)=>{e.connectionStartHandle&&(e.connectionPosition=_,e.connectionEndHandle=U,e.connectionStatus=S)},sA=(_,U)=>{e.connectionPosition={x:NaN,y:NaN},e.connectionEndHandle=null,e.connectionStatus=null,U?e.connectionClickStartHandle=null:e.connectionStartHandle=null},Y=_=>{const U=Wh(_),S=U?null:Kn(_)?_:h(_.id);return!U&&!S?[null,null,U]:[U?_:Dr(S),S,U]},J=(_,U=!0,S=e.nodes)=>{const[G,P,dA]=Y(_);if(!G)return[];const fA=[];for(const bA of S||e.nodes){if(!dA&&(bA.id===P.id||!bA.computedPosition))continue;const pA=Dr(bA),DA=Nr(pA,G);(U&&DA>0||DA>=pA.width*pA.height||DA>=Number(G.width)*Number(G.height))&&fA.push(bA)}return fA},uA=(_,U,S=!0)=>{const[G]=Y(_);if(!G)return!1;const P=Nr(G,U);return S&&P>0||P>=Number(G.width)*Number(G.height)},wA=_=>{const{viewport:U,dimensions:S,d3Zoom:G,d3Selection:P,translateExtent:dA}=e;if(!G||!P||!_.x&&!_.y)return!1;const fA=Zt.translate(U.x+_.x,U.y+_.y).scale(U.zoom),bA=[[0,0],[S.width,S.height]],pA=G.constrain()(fA,bA,dA),DA=e.viewport.x!==pA.x||e.viewport.y!==pA.y||e.viewport.zoom!==pA.k;return G.transform(P,pA),DA},QA=_=>{const U=_ instanceof Function?_(e):_,S=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];se(U.defaultEdgeOptions)&&(e.defaultEdgeOptions=U.defaultEdgeOptions);const G=U.modelValue||U.nodes||U.edges?[]:void 0;G&&(U.modelValue&&G.push(...U.modelValue),U.nodes&&G.push(...U.nodes),U.edges&&G.push(...U.edges),x(G));const P=()=>{se(U.maxZoom)&&aA(U.maxZoom),se(U.minZoom)&&O(U.minZoom),se(U.translateExtent)&&Z(U.translateExtent)};for(const dA of Object.keys(U)){const fA=dA,bA=U[fA];![...kB,...S].includes(fA)&&se(bA)&&(e[fA]=bA)}zo(()=>e.d3Zoom).not.toBeNull().then(P),e.initialized||(e.initialized=!0)};return{updateNodePositions:w,updateNodeDimensions:m,setElements:x,setNodes:oA,setEdges:tA,addNodes:eA,addEdges:H,removeNodes:X,removeEdges:F,findNode:h,findEdge:B,updateEdge:D,updateEdgeData:k,updateNode:$,updateNodeData:nA,applyEdgeChanges:R,applyNodeChanges:N,addSelectedElements:L,addSelectedNodes:y,addSelectedEdges:I,setMinZoom:O,setMaxZoom:aA,setTranslateExtent:Z,setNodeExtent:cA,setPaneClickDistance:lA,removeSelectedElements:b,removeSelectedNodes:T,removeSelectedEdges:K,startConnection:BA,updateConnection:FA,endConnection:sA,setInteractive:iA,setState:QA,getIntersectingNodes:J,getIncomers:a,getOutgoers:u,getConnectedEdges:d,getHandleConnections:g,isNodeIntersecting:uA,panBy:wA,fitView:_=>n.value.fitView(_),zoomIn:_=>n.value.zoomIn(_),zoomOut:_=>n.value.zoomOut(_),zoomTo:(_,U)=>n.value.zoomTo(_,U),setViewport:(_,U)=>n.value.setViewport(_,U),setTransform:(_,U)=>n.value.setTransform(_,U),getViewport:()=>n.value.getViewport(),getTransform:()=>n.value.getTransform(),setCenter:(_,U,S)=>n.value.setCenter(_,U,S),fitBounds:(_,U)=>n.value.fitBounds(_,U),project:_=>n.value.project(_),screenToFlowCoordinate:_=>n.value.screenToFlowCoordinate(_),flowToScreenCoordinate:_=>n.value.flowToScreenCoordinate(_),toObject:()=>{const _=[],U=[];for(const S of e.nodes){const{computedPosition:G,handleBounds:P,selected:dA,dimensions:fA,isParent:bA,resizing:pA,dragging:DA,events:OA,...KA}=S;_.push(KA)}for(const S of e.edges){const{selected:G,sourceNode:P,targetNode:dA,events:fA,...bA}=S;U.push(bA)}return JSON.parse(JSON.stringify({nodes:_,edges:U,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:_=>new Promise(U=>{const{nodes:S,edges:G,position:P,zoom:dA,viewport:fA}=_;S&&oA(S),G&&tA(G);const[bA,pA]=fA?.x&&fA?.y?[fA.x,fA.y]:P??[null,null];if(bA&&pA){const DA=fA?.zoom||dA||e.viewport.zoom;return zo(()=>n.value.viewportInitialized).toBe(!0).then(()=>{n.value.setViewport({x:bA,y:pA,zoom:DA}).then(()=>{U(!0)})})}else U(!0)}),updateNodeInternals:r,viewportHelper:n,$reset:()=>{const _=ol();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const U=Zt.translate(_.defaultViewport.x??0,_.defaultViewport.y??0).scale(Dt(_.defaultViewport.zoom??1,_.minZoom,_.maxZoom)),S=e.viewportRef.getBoundingClientRect(),G=[[0,0],[S.width,S.height]],P=e.d3Zoom.constrain()(U,G,_.translateExtent);e.d3Zoom.transform(e.d3Selection,P)}QA(_)},$destroy:()=>{}}}var OB=["data-id","data-handleid","data-nodeid","data-handlepos"],en=(0,o.defineComponent)({name:"Handle",compatConfig:{MODE:3},props:{id:{default:null},type:{},position:{default:()=>IA.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:A}){const t=(0,o.createPropsRestProxy)(e,["position","connectable","connectableStart","connectableEnd","id"]),n=(0,o.toRef)(()=>t.type??"source"),r=(0,o.toRef)(()=>t.isValidConnection??null),{id:a,connectionStartHandle:u,connectionClickStartHandle:d,connectionEndHandle:g,vueFlowRef:h,nodesConnectable:B,noDragClassName:w,noPanClassName:m}=$A(),{id:v,node:y,nodeEl:I,connectedEdges:L}=nl(),T=(0,o.ref)(),K=(0,o.toRef)(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),b=(0,o.toRef)(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),O=(0,o.toRef)(()=>{var tA,x,eA,H,X,F;return((tA=u.value)==null?void 0:tA.nodeId)===v&&((x=u.value)==null?void 0:x.id)===e.id&&((eA=u.value)==null?void 0:eA.type)===n.value||((H=g.value)==null?void 0:H.nodeId)===v&&((X=g.value)==null?void 0:X.id)===e.id&&((F=g.value)==null?void 0:F.type)===n.value}),aA=(0,o.toRef)(()=>{var tA,x,eA;return((tA=d.value)==null?void 0:tA.nodeId)===v&&((x=d.value)==null?void 0:x.id)===e.id&&((eA=d.value)==null?void 0:eA.type)===n.value}),{handlePointerDown:Z,handleClick:cA}=tl({nodeId:v,handleId:e.id,isValidConnection:r,type:n}),lA=(0,o.computed)(()=>typeof e.connectable=="string"&&e.connectable==="single"?!L.value.some(tA=>{const x=tA[`${n.value}Handle`];return tA[n.value]!==v?!1:x?x===e.id:!0}):typeof e.connectable=="number"?L.value.filter(tA=>{const x=tA[`${n.value}Handle`];return tA[n.value]!==v?!1:x?x===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(y,L.value):se(e.connectable)?e.connectable:B.value);(0,o.onMounted)(()=>{var tA;if(!y.dimensions.width||!y.dimensions.height)return;const x=(tA=y.handleBounds[n.value])==null?void 0:tA.find(N=>N.id===e.id);if(!h.value||x)return;const eA=h.value.querySelector(".vue-flow__transformationpane");if(!I.value||!T.value||!eA||!e.id)return;const H=I.value.getBoundingClientRect(),X=T.value.getBoundingClientRect(),F=window.getComputedStyle(eA),{m22:D}=new window.DOMMatrixReadOnly(F.transform),k={id:e.id,position:e.position,x:(X.left-H.left)/D,y:(X.top-H.top)/D,type:n.value,nodeId:v,...Lr(T.value)};y.handleBounds[n.value]=[...y.handleBounds[n.value]??[],k]});function iA(tA){const x=pi(tA);lA.value&&K.value&&(x&&tA.button===0||!x)&&Z(tA)}function oA(tA){!v||!d.value&&!K.value||lA.value&&cA(tA)}return A({handleClick:cA,handlePointerDown:Z,onClick:oA,onPointerDown:iA}),(tA,x)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{ref_key:"handle",ref:T,"data-id":`${(0,o.unref)(a)}-${(0,o.unref)(v)}-${e.id}-${n.value}`,"data-handleid":e.id,"data-nodeid":(0,o.unref)(v),"data-handlepos":tA.position,class:(0,o.normalizeClass)(["vue-flow__handle",[`vue-flow__handle-${tA.position}`,`vue-flow__handle-${e.id}`,(0,o.unref)(w),(0,o.unref)(m),n.value,{connectable:lA.value,connecting:aA.value,connectablestart:K.value,connectableend:b.value,connectionindicator:lA.value&&(K.value&&!O.value||b.value&&O.value)}]]),onMousedown:iA,onTouchstartPassive:iA,onClick:oA},[(0,o.renderSlot)(tA.$slots,"default",{id:tA.id})],42,OB))}}),Vr=function({sourcePosition:e=IA.Bottom,targetPosition:A=IA.Top,label:t,connectable:n=!0,isValidTargetPos:r,isValidSourcePos:a,data:u}){const d=u.label??t;return[(0,o.h)(en,{type:"target",position:A,connectable:n,isValidConnection:r}),typeof d!="string"&&d?(0,o.h)(d):(0,o.h)(o.Fragment,[d]),(0,o.h)(en,{type:"source",position:e,connectable:n,isValidConnection:a})]};Vr.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],Vr.inheritAttrs=!1,Vr.compatConfig={MODE:3};var KB=Vr,Pr=function({targetPosition:e=IA.Top,label:A,connectable:t=!0,isValidTargetPos:n,data:r}){const a=r.label??A;return[(0,o.h)(en,{type:"target",position:e,connectable:t,isValidConnection:n}),typeof a!="string"&&a?(0,o.h)(a):(0,o.h)(o.Fragment,[a])]};Pr.props=["targetPosition","label","isValidTargetPos","connectable","data"],Pr.inheritAttrs=!1,Pr.compatConfig={MODE:3};var RB=Pr,Gr=function({sourcePosition:e=IA.Bottom,label:A,connectable:t=!0,isValidSourcePos:n,data:r}){const a=r.label??A;return[typeof a!="string"&&a?(0,o.h)(a):(0,o.h)(o.Fragment,[a]),(0,o.h)(en,{type:"source",position:e,connectable:t,isValidConnection:n})]};Gr.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Gr.inheritAttrs=!1,Gr.compatConfig={MODE:3};var VB=Gr,PB=["transform"],GB=["width","height","x","y","rx","ry"],zB=["y"],XB=(0,o.defineComponent)({name:"EdgeText",compatConfig:{MODE:3},props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const A=(0,o.ref)({x:0,y:0,width:0,height:0}),t=(0,o.ref)(null),n=(0,o.computed)(()=>`translate(${e.x-A.value.width/2} ${e.y-A.value.height/2})`);(0,o.onMounted)(r),(0,o.watch)([()=>e.x,()=>e.y,t,()=>e.label],r);function r(){if(!t.value)return;const a=t.value.getBBox();(a.width!==A.value.width||a.height!==A.value.height)&&(A.value=a)}return(a,u)=>((0,o.openBlock)(),(0,o.createElementBlock)("g",{transform:n.value,class:"vue-flow__edge-textwrapper"},[a.labelShowBg?((0,o.openBlock)(),(0,o.createElementBlock)("rect",{key:0,class:"vue-flow__edge-textbg",width:`${A.value.width+2*a.labelBgPadding[0]}px`,height:`${A.value.height+2*a.labelBgPadding[1]}px`,x:-a.labelBgPadding[0],y:-a.labelBgPadding[1],style:(0,o.normalizeStyle)(a.labelBgStyle),rx:a.labelBgBorderRadius,ry:a.labelBgBorderRadius},null,12,GB)):(0,o.createCommentVNode)("",!0),(0,o.createElementVNode)("text",(0,o.mergeProps)(a.$attrs,{ref_key:"el",ref:t,class:"vue-flow__edge-text",y:A.value.height/2,dy:"0.3em",style:a.labelStyle}),[(0,o.renderSlot)(a.$slots,"default",{},()=>[typeof a.label!="string"?((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(a.label),{key:0})):((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:1},[(0,o.createTextVNode)((0,o.toDisplayString)(a.label),1)],64))])],16,zB)],8,PB))}}),$B=["id","d","marker-end","marker-start"],YB=["d","stroke-width"],zn=(0,o.defineComponent)({name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3},props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:A}){const t=(0,o.ref)(null),n=(0,o.ref)(null),r=(0,o.ref)(null),a=(0,o.useAttrs)();return A({pathEl:t,interactionEl:n,labelEl:r}),(u,d)=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,null,[(0,o.createElementVNode)("path",(0,o.mergeProps)((0,o.unref)(a),{id:u.id,ref_key:"pathEl",ref:t,d:u.path,class:"vue-flow__edge-path","marker-end":u.markerEnd,"marker-start":u.markerStart}),null,16,$B),u.interactionWidth?((0,o.openBlock)(),(0,o.createElementBlock)("path",{key:0,ref_key:"interactionEl",ref:n,fill:"none",d:u.path,"stroke-width":u.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,YB)):(0,o.createCommentVNode)("",!0),u.label&&u.labelX&&u.labelY?((0,o.openBlock)(),(0,o.createBlock)(XB,{key:1,ref_key:"labelEl",ref:r,x:u.labelX,y:u.labelY,label:u.label,"label-show-bg":u.labelShowBg,"label-bg-style":u.labelBgStyle,"label-bg-padding":u.labelBgPadding,"label-bg-border-radius":u.labelBgBorderRadius,"label-style":u.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):(0,o.createCommentVNode)("",!0)],64))}});function il({sourceX:e,sourceY:A,targetX:t,targetY:n}){const r=Math.abs(t-e)/2,a=t<e?t+r:t-r,u=Math.abs(n-A)/2;return[a,n<A?n+u:n-u,r,u]}function sl({sourceX:e,sourceY:A,targetX:t,targetY:n,sourceControlX:r,sourceControlY:a,targetControlX:u,targetControlY:d}){const g=e*.125+r*.375+u*.375+t*.125,h=A*.125+a*.375+d*.375+n*.125;return[g,h,Math.abs(g-e),Math.abs(h-A)]}function zr(e,A){return e>=0?.5*e:A*25*Math.sqrt(-e)}function al({pos:e,x1:A,y1:t,x2:n,y2:r,c:a}){let u,d;switch(e){case IA.Left:u=A-zr(A-n,a),d=t;break;case IA.Right:u=A+zr(n-A,a),d=t;break;case IA.Top:u=A,d=t-zr(t-r,a);break;case IA.Bottom:u=A,d=t+zr(r-t,a);break}return[u,d]}function Ei(e){const{sourceX:A,sourceY:t,sourcePosition:n=IA.Bottom,targetX:r,targetY:a,targetPosition:u=IA.Top,curvature:d=.25}=e,[g,h]=al({pos:n,x1:A,y1:t,x2:r,y2:a,c:d}),[B,w]=al({pos:u,x1:r,y1:a,x2:A,y2:t,c:d}),[m,v,y,I]=sl({sourceX:A,sourceY:t,targetX:r,targetY:a,sourceControlX:g,sourceControlY:h,targetControlX:B,targetControlY:w});return[`M${A},${t} C${g},${h} ${B},${w} ${r},${a}`,m,v,y,I]}function ll({pos:e,x1:A,y1:t,x2:n,y2:r}){let a,u;switch(e){case IA.Left:case IA.Right:a=.5*(A+n),u=t;break;case IA.Top:case IA.Bottom:a=A,u=.5*(t+r);break}return[a,u]}function cl(e){const{sourceX:A,sourceY:t,sourcePosition:n=IA.Bottom,targetX:r,targetY:a,targetPosition:u=IA.Top}=e,[d,g]=ll({pos:n,x1:A,y1:t,x2:r,y2:a}),[h,B]=ll({pos:u,x1:r,y1:a,x2:A,y2:t}),[w,m,v,y]=sl({sourceX:A,sourceY:t,targetX:r,targetY:a,sourceControlX:d,sourceControlY:g,targetControlX:h,targetControlY:B});return[`M${A},${t} C${d},${g} ${h},${B} ${r},${a}`,w,m,v,y]}var ul={[IA.Left]:{x:-1,y:0},[IA.Right]:{x:1,y:0},[IA.Top]:{x:0,y:-1},[IA.Bottom]:{x:0,y:1}};function WB({source:e,sourcePosition:A=IA.Bottom,target:t}){return A===IA.Left||A===IA.Right?e.x<t.x?{x:1,y:0}:{x:-1,y:0}:e.y<t.y?{x:0,y:1}:{x:0,y:-1}}function dl(e,A){return Math.sqrt((A.x-e.x)**2+(A.y-e.y)**2)}function JB({source:e,sourcePosition:A=IA.Bottom,target:t,targetPosition:n=IA.Top,center:r,offset:a}){const u=ul[A],d=ul[n],g={x:e.x+u.x*a,y:e.y+u.y*a},h={x:t.x+d.x*a,y:t.y+d.y*a},B=WB({source:g,sourcePosition:A,target:h}),w=B.x!==0?"x":"y",m=B[w];let v,y,I;const L={x:0,y:0},T={x:0,y:0},[K,b,O,aA]=il({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(u[w]*d[w]===-1){y=r.x??K,I=r.y??b;const Z=[{x:y,y:g.y},{x:y,y:h.y}],cA=[{x:g.x,y:I},{x:h.x,y:I}];u[w]===m?v=w==="x"?Z:cA:v=w==="x"?cA:Z}else{const Z=[{x:g.x,y:h.y}],cA=[{x:h.x,y:g.y}];if(w==="x"?v=u.x===m?cA:Z:v=u.y===m?Z:cA,A===n){const oA=Math.abs(e[w]-t[w]);if(oA<=a){const tA=Math.min(a-1,a-oA);u[w]===m?L[w]=(g[w]>e[w]?-1:1)*tA:T[w]=(h[w]>t[w]?-1:1)*tA}}if(A!==n){const oA=w==="x"?"y":"x",tA=u[w]===d[oA],x=g[oA]>h[oA],eA=g[oA]<h[oA];(u[w]===1&&(!tA&&x||tA&&eA)||u[w]!==1&&(!tA&&eA||tA&&x))&&(v=w==="x"?Z:cA)}const lA={x:g.x+L.x,y:g.y+L.y},iA={x:h.x+T.x,y:h.y+T.y};Math.max(Math.abs(lA.x-v[0].x),Math.abs(iA.x-v[0].x))>=Math.max(Math.abs(lA.y-v[0].y),Math.abs(iA.y-v[0].y))?(y=(lA.x+iA.x)/2,I=v[0].y):(y=v[0].x,I=(lA.y+iA.y)/2)}return[[e,{x:g.x+L.x,y:g.y+L.y},...v,{x:h.x+T.x,y:h.y+T.y},t],y,I,O,aA]}function ZB(e,A,t,n){const r=Math.min(dl(e,A)/2,dl(A,t)/2,n),{x:a,y:u}=A;if(e.x===a&&a===t.x||e.y===u&&u===t.y)return`L${a} ${u}`;if(e.y===u){const g=e.x<t.x?-1:1,h=e.y<t.y?1:-1;return`L ${a+r*g},${u}Q ${a},${u} ${a},${u+r*h}`}const d=e.x<t.x?1:-1;return`L ${a},${u+r*(e.y<t.y?-1:1)}Q ${a},${u} ${a+r*d},${u}`}function Fi(e){const{sourceX:A,sourceY:t,sourcePosition:n=IA.Bottom,targetX:r,targetY:a,targetPosition:u=IA.Top,borderRadius:d=5,centerX:g,centerY:h,offset:B=20}=e,[w,m,v,y,I]=JB({source:{x:A,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:u,center:{x:g,y:h},offset:B});return[w.reduce((L,T,K)=>{let b;return K>0&&K<w.length-1?b=ZB(w[K-1],T,w[K+1],d):b=`${K===0?"M":"L"}${T.x} ${T.y}`,L+=b,L},""),m,v,y,I]}function jB(e){const{sourceX:A,sourceY:t,targetX:n,targetY:r}=e,[a,u,d,g]=il({sourceX:A,sourceY:t,targetX:n,targetY:r});return[`M ${A},${t}L ${n},${r}`,a,u,d,g]}var qB=(0,o.defineComponent)({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,r]=jB(e);return(0,o.h)(zn,{path:t,labelX:n,labelY:r,...A,...e})}}}),fl=(0,o.defineComponent)({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,r]=Fi({...e,sourcePosition:e.sourcePosition??IA.Bottom,targetPosition:e.targetPosition??IA.Top});return(0,o.h)(zn,{path:t,labelX:n,labelY:r,...A,...e})}}}),Ap=(0,o.defineComponent)({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:A}){return()=>(0,o.h)(fl,{...e,...A,borderRadius:0})}}),ep=(0,o.defineComponent)({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,r]=Ei({...e,sourcePosition:e.sourcePosition??IA.Bottom,targetPosition:e.targetPosition??IA.Top});return(0,o.h)(zn,{path:t,labelX:n,labelY:r,...A,...e})}}}),tp=(0,o.defineComponent)({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,r]=cl({...e,sourcePosition:e.sourcePosition??IA.Bottom,targetPosition:e.targetPosition??IA.Top});return(0,o.h)(zn,{path:t,labelX:n,labelY:r,...A,...e})}}}),np={input:VB,default:KB,output:RB},rp={default:ep,straight:qB,step:Ap,smoothstep:fl,simplebezier:tp};function op(e,A,t){const n=(0,o.computed)(()=>y=>A.value.get(y)),r=(0,o.computed)(()=>y=>t.value.get(y)),a=(0,o.computed)(()=>{const y={...rp,...e.edgeTypes},I=Object.keys(y);for(const L of e.edges)L.type&&!I.includes(L.type)&&(y[L.type]=L.type);return y}),u=(0,o.computed)(()=>{const y={...np,...e.nodeTypes},I=Object.keys(y);for(const L of e.nodes)L.type&&!I.includes(L.type)&&(y[L.type]=L.type);return y}),d=(0,o.computed)(()=>e.onlyRenderVisibleElements?Ha(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),g=(0,o.computed)(()=>{if(e.onlyRenderVisibleElements){const y=[];for(const I of e.edges){const L=A.value.get(I.source),T=A.value.get(I.target);lB({sourcePos:L.computedPosition||{x:0,y:0},targetPos:T.computedPosition||{x:0,y:0},sourceWidth:L.dimensions.width,sourceHeight:L.dimensions.height,targetWidth:T.dimensions.width,targetHeight:T.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&y.push(I)}return y}return e.edges}),h=(0,o.computed)(()=>[...d.value,...g.value]),B=(0,o.computed)(()=>{const y=[];for(const I of e.nodes)I.selected&&y.push(I);return y}),w=(0,o.computed)(()=>{const y=[];for(const I of e.edges)I.selected&&y.push(I);return y}),m=(0,o.computed)(()=>[...B.value,...w.value]),v=(0,o.computed)(()=>{const y=[];for(const I of e.nodes)I.dimensions.width&&I.dimensions.height&&I.handleBounds!==void 0&&y.push(I);return y});return{getNode:n,getEdge:r,getElements:h,getEdgeTypes:a,getNodeTypes:u,getEdges:g,getNodes:d,getSelectedElements:m,getSelectedNodes:B,getSelectedEdges:w,getNodesInitialized:v,areNodesInitialized:(0,o.computed)(()=>d.value.length>0&&v.value.length===d.value.length)}}var ip=class En{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var A;const t=(A=(0,o.getCurrentInstance)())==null?void 0:A.appContext.app;return En.instance=t?.config.globalProperties.$vueFlowStorage??En.instance??new En,t&&(t.config.globalProperties.$vueFlowStorage=En.instance),En.instance}set(A,t){return this.flows.set(A,t)}get(A){return this.flows.get(A)}remove(A){return this.flows.delete(A)}create(A,t){const n=(0,o.reactive)(ol()),r={};for(const[w,m]of Object.entries(n.hooks)){const v=`on${w.charAt(0).toUpperCase()+w.slice(1)}`;r[v]=m.on}const a={};for(const[w,m]of Object.entries(n.hooks))a[w]=m.trigger;const u=(0,o.computed)(()=>{const w=new Map;for(const m of n.nodes)w.set(m.id,m);return w}),d=(0,o.computed)(()=>{const w=new Map;for(const m of n.edges)w.set(m.id,m);return w}),g=op(n,u,d),h=MB(n,u,d);h.setState({...n,...t});const B={...r,...g,...h,...nd(n),nodeLookup:u,edgeLookup:d,emits:a,id:A,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(A)}};return this.set(A,B),B}getId(){return`vue-flow-${this.currentId++}`}};function $A(e){const A=ip.getInstance(),t=(0,o.getCurrentScope)(),n=typeof e=="object",r=n?e:{id:e},a=r.id,u=a??t?.vueFlowId;let d;if(t){const g=(0,o.inject)(ja,null);typeof g<"u"&&g!==null&&(!u||g.id===u)&&(d=g)}if(d||u&&(d=A.get(u)),!d||u&&d.id!==u){const g=a??A.getId(),h=A.create(g,r);d=h,(t??(0,o.effectScope)(!0)).run(()=>{(0,o.watch)(h.applyDefault,(B,w,m)=>{const v=I=>{h.applyNodeChanges(I)},y=I=>{h.applyEdgeChanges(I)};B?(h.onNodesChange(v),h.onEdgesChange(y)):(h.hooks.value.nodesChange.off(v),h.hooks.value.edgesChange.off(y)),m(()=>{h.hooks.value.nodesChange.off(v),h.hooks.value.edgesChange.off(y)})},{immediate:!0}),Un(()=>{if(d){const B=A.get(d.id);B?B.$destroy():Gn(`No store instance found for id ${d.id} in storage.`)}})})}else n&&d.setState(r);if(t&&((0,o.provide)(ja,d),t.vueFlowId=d.id),n){const g=(0,o.getCurrentInstance)();g?.type.name!=="VueFlow"&&d.emits.error(new ce(ie.USEVUEFLOW_OPTIONS))}return d}function sp(e){const{emits:A,dimensions:t}=$A();let n;(0,o.onMounted)(()=>{const r=()=>{var a,u;if(!e.value||!(((u=(a=e.value).checkVisibility)==null?void 0:u.call(a))??!0))return;const d=Lr(e.value);(d.width===0||d.height===0)&&A.error(new ce(ie.MISSING_VIEWPORT_DIMENSIONS)),t.value={width:d.width||500,height:d.height||500}};r(),window.addEventListener("resize",r),e.value&&(n=new ResizeObserver(()=>r()),n.observe(e.value)),(0,o.onBeforeUnmount)(()=>{window.removeEventListener("resize",r),n&&e.value&&n.unobserve(e.value)})})}var ap=(0,o.defineComponent)({name:"UserSelection",compatConfig:{MODE:3},props:{userSelectionRect:{}},setup(e){return(A,t)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"vue-flow__selection vue-flow__container",style:(0,o.normalizeStyle)({width:`${A.userSelectionRect.width}px`,height:`${A.userSelectionRect.height}px`,transform:`translate(${A.userSelectionRect.x}px, ${A.userSelectionRect.y}px)`})},null,4))}}),lp=["tabIndex"],cp=(0,o.defineComponent)({name:"NodesSelection",compatConfig:{MODE:3},setup(e){const{emits:A,viewport:t,getSelectedNodes:n,noPanClassName:r,disableKeyboardA11y:a,userSelectionActive:u}=$A(),d=rl(),g=(0,o.ref)(null),h=el({el:g,onStart(y){A.selectionDragStart(y),A.nodeDragStart(y)},onDrag(y){A.selectionDrag(y),A.nodeDrag(y)},onStop(y){A.selectionDragStop(y),A.nodeDragStop(y)}});(0,o.onMounted)(()=>{var y;a.value||(y=g.value)==null||y.focus({preventScroll:!0})});const B=(0,o.computed)(()=>ba(n.value)),w=(0,o.computed)(()=>({width:`${B.value.width}px`,height:`${B.value.height}px`,top:`${B.value.y}px`,left:`${B.value.x}px`}));function m(y){A.selectionContextMenu({event:y,nodes:n.value})}function v(y){a.value||jt[y.key]&&(y.preventDefault(),d({x:jt[y.key].x,y:jt[y.key].y},y.shiftKey))}return(y,I)=>!(0,o.unref)(u)&&B.value.width&&B.value.height?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["vue-flow__nodesselection vue-flow__container",(0,o.unref)(r)]),style:(0,o.normalizeStyle)({transform:`translate(${(0,o.unref)(t).x}px,${(0,o.unref)(t).y}px) scale(${(0,o.unref)(t).zoom})`})},[(0,o.createElementVNode)("div",{ref_key:"el",ref:g,class:(0,o.normalizeClass)([{dragging:(0,o.unref)(h)},"vue-flow__nodesselection-rect"]),style:(0,o.normalizeStyle)(w.value),tabIndex:(0,o.unref)(a)?void 0:-1,onContextmenu:m,onKeydown:v},null,46,lp)],6)):(0,o.createCommentVNode)("",!0)}});function up(e,A){return{x:e.clientX-A.left,y:e.clientY-A.top}}var dp=(0,o.defineComponent)({name:"Pane",compatConfig:{MODE:3},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:A,nodes:t,viewport:n,emits:r,userSelectionActive:a,removeSelectedElements:u,userSelectionRect:d,elementsSelectable:g,nodesSelectionActive:h,getSelectedEdges:B,getSelectedNodes:w,removeNodes:m,removeEdges:v,selectionMode:y,deleteKeyCode:I,multiSelectionKeyCode:L,multiSelectionActive:T,edgeLookup:K,nodeLookup:b,connectionLookup:O,defaultEdgeOptions:aA,connectionStartHandle:Z,panOnDrag:cA}=$A(),lA=(0,o.shallowRef)(null),iA=(0,o.shallowRef)(new Set),oA=(0,o.shallowRef)(new Set),tA=(0,o.shallowRef)(null),x=(0,o.toRef)(()=>g.value&&(e.isSelecting||a.value)),eA=(0,o.toRef)(()=>Z.value!==null);let H=!1,X=!1;const F=On(I,{actInsideInputWithModifier:!1}),D=On(L);(0,o.watch)(F,sA=>{sA&&(m(w.value),v(B.value),h.value=!1)}),(0,o.watch)(D,sA=>{T.value=sA});function k(sA,Y){return J=>{J.target===Y&&sA?.(J)}}function N(sA){if(H||eA.value){H=!1;return}r.paneClick(sA),u(),h.value=!1}function R(sA){var Y;if(Array.isArray(cA.value)&&((Y=cA.value)!=null&&Y.includes(2))){sA.preventDefault();return}r.paneContextMenu(sA)}function $(sA){r.paneScroll(sA)}function nA(sA){var Y,J,uA;if(tA.value=((Y=A.value)==null?void 0:Y.getBoundingClientRect())??null,!g.value||!e.isSelecting||sA.button!==0||sA.target!==lA.value||!tA.value)return;(uA=(J=sA.target)==null?void 0:J.setPointerCapture)==null||uA.call(J,sA.pointerId);const{x:wA,y:QA}=up(sA,tA.value);X=!0,H=!1,u(),d.value={width:0,height:0,startX:wA,startY:QA,x:wA,y:QA},r.selectionStart(sA)}function BA(sA){var Y;if(!tA.value||!d.value)return;H=!0;const{x:J,y:uA}=Ge(sA,tA.value),{startX:wA=0,startY:QA=0}=d.value,_A={startX:wA,startY:QA,x:J<wA?J:wA,y:uA<QA?uA:QA,width:Math.abs(J-wA),height:Math.abs(uA-QA)},gA=iA.value,j=oA.value;iA.value=new Set(Ha(t.value,_A,n.value,y.value===di.Partial,!0).map(U=>U.id)),oA.value=new Set;const _=((Y=aA.value)==null?void 0:Y.selectable)??!0;for(const U of iA.value){const S=O.value.get(U);if(S)for(const{edgeId:G}of S.values()){const P=K.value.get(G);P&&(P.selectable??_)&&oA.value.add(G)}}if(!Za(gA,iA.value)){const U=Bt(b.value,iA.value,!0);r.nodesChange(U)}if(!Za(j,oA.value)){const U=Bt(K.value,oA.value);r.edgesChange(U)}d.value=_A,a.value=!0,h.value=!1}function FA(sA){var Y;sA.button!==0||!X||((Y=sA.target)==null||Y.releasePointerCapture(sA.pointerId),!a.value&&d.value&&sA.target===lA.value&&N(sA),a.value=!1,d.value=null,h.value=iA.value.size>0,r.selectionEnd(sA),e.selectionKeyPressed&&(H=!1),X=!1)}return(sA,Y)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{ref_key:"container",ref:lA,class:(0,o.normalizeClass)(["vue-flow__pane vue-flow__container",{selection:sA.isSelecting}]),onClick:Y[0]||(Y[0]=J=>x.value?void 0:k(N,lA.value)(J)),onContextmenu:Y[1]||(Y[1]=J=>k(R,lA.value)(J)),onWheelPassive:Y[2]||(Y[2]=J=>k($,lA.value)(J)),onPointerenter:Y[3]||(Y[3]=J=>x.value?void 0:(0,o.unref)(r).paneMouseEnter(J)),onPointerdown:Y[4]||(Y[4]=J=>x.value?nA(J):(0,o.unref)(r).paneMouseMove(J)),onPointermove:Y[5]||(Y[5]=J=>x.value?BA(J):(0,o.unref)(r).paneMouseMove(J)),onPointerup:Y[6]||(Y[6]=J=>x.value?FA(J):void 0),onPointerleave:Y[7]||(Y[7]=J=>(0,o.unref)(r).paneMouseLeave(J))},[(0,o.renderSlot)(sA.$slots,"default"),(0,o.unref)(a)&&(0,o.unref)(d)?((0,o.openBlock)(),(0,o.createBlock)(ap,{key:0,"user-selection-rect":(0,o.unref)(d)},null,8,["user-selection-rect"])):(0,o.createCommentVNode)("",!0),(0,o.unref)(h)&&(0,o.unref)(w).length?((0,o.openBlock)(),(0,o.createBlock)(cp,{key:1})):(0,o.createCommentVNode)("",!0)],34))}}),fp=(0,o.defineComponent)({name:"Transform",compatConfig:{MODE:3},setup(e){const{viewport:A,fitViewOnInit:t,fitViewOnInitDone:n}=$A(),r=(0,o.computed)(()=>t.value?!n.value:!1),a=(0,o.computed)(()=>`translate(${A.value.x}px,${A.value.y}px) scale(${A.value.zoom})`);return(u,d)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"vue-flow__transformationpane vue-flow__container",style:(0,o.normalizeStyle)({transform:a.value,opacity:r.value?0:void 0})},[(0,o.renderSlot)(u.$slots,"default")],4))}}),gp=(0,o.defineComponent)({name:"Viewport",compatConfig:{MODE:3},setup(e){const{minZoom:A,maxZoom:t,defaultViewport:n,translateExtent:r,zoomActivationKeyCode:a,selectionKeyCode:u,panActivationKeyCode:d,panOnScroll:g,panOnScrollMode:h,panOnScrollSpeed:B,panOnDrag:w,zoomOnDoubleClick:m,zoomOnPinch:v,zoomOnScroll:y,preventScrolling:I,noWheelClassName:L,noPanClassName:T,emits:K,connectionStartHandle:b,userSelectionActive:O,paneDragging:aA,d3Zoom:Z,d3Selection:cA,d3ZoomHandler:lA,viewport:iA,viewportRef:oA,paneClickDistance:tA}=$A();sp(oA);const x=(0,o.shallowRef)(!1),eA=(0,o.shallowRef)(!1);let H=null,X=!1,F=0,D={x:0,y:0,zoom:0};const k=On(d),N=On(u),R=On(a),$=(0,o.toRef)(()=>(!N.value||N.value&&u.value===!0)&&(k.value||w.value)),nA=(0,o.toRef)(()=>k.value||g.value),BA=(0,o.toRef)(()=>u.value===!0&&$.value!==!0),FA=(0,o.toRef)(()=>N.value&&u.value!==!0||O.value||BA.value),sA=(0,o.toRef)(()=>b.value!==null);(0,o.onMounted)(()=>{if(!oA.value){Gn("Viewport element is missing");return}const QA=oA.value,_A=QA.getBoundingClientRect(),gA=Vh().clickDistance(tA.value).scaleExtent([A.value,t.value]).translateExtent(r.value),j=Le(QA).call(gA),_=j.on("wheel.zoom"),U=Zt.translate(n.value.x??0,n.value.y??0).scale(Dt(n.value.zoom??1,A.value,t.value)),S=[[0,0],[_A.width,_A.height]],G=gA.constrain()(U,S,r.value);gA.transform(j,G),gA.wheelDelta(xa),Z.value=gA,cA.value=j,lA.value=_,iA.value={x:G.x,y:G.y,zoom:G.k},gA.on("start",P=>{var dA;if(!P.sourceEvent)return null;F=P.sourceEvent.button,x.value=!0;const fA=uA(P.transform);((dA=P.sourceEvent)==null?void 0:dA.type)==="mousedown"&&(aA.value=!0),D=fA,K.viewportChangeStart(fA),K.moveStart({event:P,flowTransform:fA})}),gA.on("end",P=>{if(!P.sourceEvent)return null;if(x.value=!1,aA.value=!1,Y($.value,F??0)&&!X&&K.paneContextMenu(P.sourceEvent),X=!1,J(D,P.transform)){const dA=uA(P.transform);D=dA,K.viewportChangeEnd(dA),K.moveEnd({event:P,flowTransform:dA})}}),gA.filter(P=>{var dA;const fA=R.value||y.value,bA=v.value&&P.ctrlKey,pA=P.button,DA=P.type==="wheel";if(pA===1&&P.type==="mousedown"&&(wA(P,"vue-flow__node")||wA(P,"vue-flow__edge")))return!0;if(!$.value&&!fA&&!nA.value&&!m.value&&!v.value||O.value||sA.value&&!DA||!m.value&&P.type==="dblclick"||wA(P,L.value)&&DA||wA(P,T.value)&&(!DA||nA.value&&DA&&!R.value)||!v.value&&P.ctrlKey&&DA||!fA&&!nA.value&&!bA&&DA)return!1;if(!v&&P.type==="touchstart"&&((dA=P.touches)==null?void 0:dA.length)>1)return P.preventDefault(),!1;if(!$.value&&(P.type==="mousedown"||P.type==="touchstart")||BA.value&&Array.isArray(w.value)&&w.value.includes(0)&&pA===0||Array.isArray(w.value)&&!w.value.includes(pA)&&(P.type==="mousedown"||P.type==="touchstart"))return!1;const OA=Array.isArray(w.value)&&w.value.includes(pA)||u.value===!0&&Array.isArray(w.value)&&!w.value.includes(0)||!pA||pA<=1;return(!P.ctrlKey||k.value||DA)&&OA}),(0,o.watch)([O,$],()=>{O.value&&!x.value?gA.on("zoom",null):O.value||gA.on("zoom",P=>{iA.value={x:P.transform.x,y:P.transform.y,zoom:P.transform.k};const dA=uA(P.transform);X=Y($.value,F??0),K.viewportChange(dA),K.move({event:P,flowTransform:dA})})},{immediate:!0}),(0,o.watch)([O,nA,h,R,v,I,L],()=>{nA.value&&!R.value&&!O.value?j.on("wheel.zoom",P=>{if(wA(P,L.value))return!1;const dA=R.value||y.value,fA=v.value&&P.ctrlKey;if(!(!I.value||nA.value||dA||fA))return!1;P.preventDefault(),P.stopImmediatePropagation();const bA=j.property("__zoom").k||1,pA=kr();if(!k.value&&P.ctrlKey&&v.value&&pA){const ee=Ke(P),Xe=bA*2**xa(P);gA.scaleTo(j,Xe,ee,P);return}const DA=P.deltaMode===1?20:1;let OA=h.value===Mn.Vertical?0:P.deltaX*DA,KA=h.value===Mn.Horizontal?0:P.deltaY*DA;!pA&&P.shiftKey&&h.value!==Mn.Vertical&&!OA&&KA&&(OA=KA,KA=0),gA.translateBy(j,-(OA/bA)*B.value,-(KA/bA)*B.value);const JA=uA(j.property("__zoom"));H&&clearTimeout(H),eA.value?(K.move({event:P,flowTransform:JA}),K.viewportChange(JA),H=setTimeout(()=>{K.moveEnd({event:P,flowTransform:JA}),K.viewportChangeEnd(JA),eA.value=!1},150)):(eA.value=!0,K.moveStart({event:P,flowTransform:JA}),K.viewportChangeStart(JA))},{passive:!1}):typeof _<"u"&&j.on("wheel.zoom",function(P,dA){const fA=!I.value&&P.type==="wheel"&&!P.ctrlKey,bA=R.value||y.value,pA=v.value&&P.ctrlKey;if(!bA&&!g.value&&!pA&&P.type==="wheel"||fA||wA(P,L.value))return null;P.preventDefault(),_.call(this,P,dA)},{passive:!1})},{immediate:!0})});function Y(QA,_A){return _A===2&&Array.isArray(QA)&&QA.includes(2)}function J(QA,_A){return QA.x!==_A.x&&!Number.isNaN(_A.x)||QA.y!==_A.y&&!Number.isNaN(_A.y)||QA.zoom!==_A.k&&!Number.isNaN(_A.k)}function uA(QA){return{x:QA.x,y:QA.y,zoom:QA.k}}function wA(QA,_A){return QA.target.closest(`.${_A}`)}return(QA,_A)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{ref_key:"viewportRef",ref:oA,class:"vue-flow__viewport vue-flow__container"},[(0,o.createVNode)(dp,{"is-selecting":FA.value,"selection-key-pressed":(0,o.unref)(N),class:(0,o.normalizeClass)({connecting:sA.value,dragging:(0,o.unref)(aA),draggable:(0,o.unref)(w)===!0||Array.isArray((0,o.unref)(w))&&(0,o.unref)(w).includes(0)})},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(fp,null,{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(QA.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),hp=["id"],Bp=["id"],pp=["id"],mp=(0,o.defineComponent)({name:"A11yDescriptions",compatConfig:{MODE:3},setup(e){const{id:A,disableKeyboardA11y:t,ariaLiveMessage:n}=$A();return(r,a)=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,null,[(0,o.createElementVNode)("div",{id:`${(0,o.unref)(ma)}-${(0,o.unref)(A)}`,style:{display:"none"}}," Press enter or space to select a node. "+(0,o.toDisplayString)((0,o.unref)(t)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,hp),(0,o.createElementVNode)("div",{id:`${(0,o.unref)(wa)}-${(0,o.unref)(A)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,Bp),(0,o.unref)(t)?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,id:`${(0,o.unref)(Yh)}-${(0,o.unref)(A)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},(0,o.toDisplayString)((0,o.unref)(n)),9,pp))],64))}});function wp(){const e=$A();(0,o.watch)(()=>e.viewportHelper.value.viewportInitialized,A=>{A&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function Cp(e,A,t){return t===IA.Left?e-A:t===IA.Right?e+A:e}function vp(e,A,t){return t===IA.Top?e-A:t===IA.Bottom?e+A:e}var Ui=function({radius:e=10,centerX:A=0,centerY:t=0,position:n=IA.Top,type:r}){return(0,o.h)("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${r}`,cx:Cp(A,e,n),cy:vp(t,e,n),r:e,stroke:"transparent",fill:"transparent"})};Ui.props=["radius","centerX","centerY","position","type"],Ui.compatConfig={MODE:3};var gl=Ui,yp=(0,o.defineComponent)({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:A,addSelectedEdges:t,connectionMode:n,edgeUpdaterRadius:r,emits:a,nodesSelectionActive:u,noPanClassName:d,getEdgeTypes:g,removeSelectedEdges:h,findEdge:B,findNode:w,isValidConnection:m,multiSelectionActive:v,disableKeyboardA11y:y,elementsSelectable:I,edgesUpdatable:L,edgesFocusable:T,hooks:K}=$A(),b=(0,o.computed)(()=>B(e.id)),{emit:O,on:aA}=FB(b.value,a),Z=(0,o.inject)(Or),cA=(0,o.getCurrentInstance)(),lA=(0,o.ref)(!1),iA=(0,o.ref)(!1),oA=(0,o.ref)(""),tA=(0,o.ref)(null),x=(0,o.ref)("source"),eA=(0,o.ref)(null),H=(0,o.toRef)(()=>typeof b.value.selectable>"u"?I.value:b.value.selectable),X=(0,o.toRef)(()=>typeof b.value.updatable>"u"?L.value:b.value.updatable),F=(0,o.toRef)(()=>typeof b.value.focusable>"u"?T.value:b.value.focusable);(0,o.provide)(yB,e.id),(0,o.provide)(QB,eA);const D=(0,o.computed)(()=>b.value.class instanceof Function?b.value.class(b.value):b.value.class),k=(0,o.computed)(()=>b.value.style instanceof Function?b.value.style(b.value):b.value.style),N=(0,o.computed)(()=>{const U=b.value.type||"default",S=Z?.[`edge-${U}`];if(S)return S;let G=b.value.template??g.value[U];if(typeof G=="string"&&cA){const P=Object.keys(cA.appContext.components);P&&P.includes(U)&&(G=(0,o.resolveComponent)(U,!1))}return G&&typeof G!="string"?G:(a.error(new ce(ie.EDGE_TYPE_MISSING,G)),!1)}),{handlePointerDown:R}=tl({nodeId:oA,handleId:tA,type:x,isValidConnection:m,edgeUpdaterType:x,onEdgeUpdate:BA,onEdgeUpdateEnd:FA});return()=>{const U=w(b.value.source),S=w(b.value.target),G="pathOptions"in b.value?b.value.pathOptions:{};if(!U&&!S)return a.error(new ce(ie.EDGE_SOURCE_TARGET_MISSING,b.value.id,b.value.source,b.value.target)),null;if(!U)return a.error(new ce(ie.EDGE_SOURCE_MISSING,b.value.id,b.value.source)),null;if(!S)return a.error(new ce(ie.EDGE_TARGET_MISSING,b.value.id,b.value.target)),null;if(!b.value||b.value.hidden||U.hidden||S.hidden)return null;let P;n.value===tt.Strict?P=U.handleBounds.source:P=[...U.handleBounds.source||[],...U.handleBounds.target||[]];const dA=Va(P,b.value.sourceHandle);let fA;n.value===tt.Strict?fA=S.handleBounds.target:fA=[...S.handleBounds.target||[],...S.handleBounds.source||[]];const bA=Va(fA,b.value.targetHandle),pA=dA?.position||IA.Bottom,DA=bA?.position||IA.Top,{x:OA,y:KA}=An(U,dA,pA),{x:JA,y:ee}=An(S,bA,DA);return b.value.sourceX=OA,b.value.sourceY=KA,b.value.targetX=JA,b.value.targetY=ee,(0,o.h)("g",{ref:eA,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${N.value===!1?"default":b.value.type||"default"}`,d.value,D.value,{updating:lA.value,selected:b.value.selected,animated:b.value.animated,inactive:!H.value&&!K.value.edgeClick.hasListeners()}],tabIndex:F.value?0:void 0,"aria-label":b.value.ariaLabel===null?void 0:b.value.ariaLabel??`Edge from ${b.value.source} to ${b.value.target}`,"aria-describedby":F.value?`${wa}-${A}`:void 0,"aria-roledescription":"edge",role:F.value?"group":"img",...b.value.domAttributes,onClick:Y,onContextmenu:J,onDblclick:uA,onMouseenter:wA,onMousemove:QA,onMouseleave:_A,onKeyDown:F.value?_:void 0},[iA.value?null:(0,o.h)(N.value===!1?g.value.default:N.value,{id:e.id,sourceNode:U,targetNode:S,source:b.value.source,target:b.value.target,type:b.value.type,updatable:X.value,selected:b.value.selected,animated:b.value.animated,label:b.value.label,labelStyle:b.value.labelStyle,labelShowBg:b.value.labelShowBg,labelBgStyle:b.value.labelBgStyle,labelBgPadding:b.value.labelBgPadding,labelBgBorderRadius:b.value.labelBgBorderRadius,data:b.value.data,events:{...b.value.events,...aA},style:k.value,markerStart:`url('#${Pn(b.value.markerStart,A)}')`,markerEnd:`url('#${Pn(b.value.markerEnd,A)}')`,sourcePosition:pA,targetPosition:DA,sourceX:OA,sourceY:KA,targetX:JA,targetY:ee,sourceHandleId:b.value.sourceHandle,targetHandleId:b.value.targetHandle,interactionWidth:b.value.interactionWidth,...G}),[X.value==="source"||X.value===!0?[(0,o.h)("g",{onMousedown:gA,onMouseenter:$,onMouseout:nA},(0,o.h)(gl,{position:pA,centerX:OA,centerY:KA,radius:r.value,type:"source","data-type":"source"}))]:null,X.value==="target"||X.value===!0?[(0,o.h)("g",{onMousedown:j,onMouseenter:$,onMouseout:nA},(0,o.h)(gl,{position:DA,centerX:JA,centerY:ee,radius:r.value,type:"target","data-type":"target"}))]:null]])};function $(){lA.value=!0}function nA(){lA.value=!1}function BA(U,S){O.update({event:U,edge:b.value,connection:S})}function FA(U){O.updateEnd({event:U,edge:b.value}),iA.value=!1}function sA(U,S){U.button===0&&(iA.value=!0,oA.value=S?b.value.target:b.value.source,tA.value=(S?b.value.targetHandle:b.value.sourceHandle)??null,x.value=S?"target":"source",O.updateStart({event:U,edge:b.value}),R(U))}function Y(U){var S;const G={event:U,edge:b.value};H.value&&(u.value=!1,b.value.selected&&v.value?(h([b.value]),(S=eA.value)==null||S.blur()):t([b.value])),O.click(G)}function J(U){O.contextMenu({event:U,edge:b.value})}function uA(U){O.doubleClick({event:U,edge:b.value})}function wA(U){O.mouseEnter({event:U,edge:b.value})}function QA(U){O.mouseMove({event:U,edge:b.value})}function _A(U){O.mouseLeave({event:U,edge:b.value})}function gA(U){sA(U,!0)}function j(U){sA(U,!1)}function _(U){var S;!y.value&&Ca.includes(U.key)&&H.value&&(U.key==="Escape"?((S=eA.value)==null||S.blur(),h([B(e.id)])):t([B(e.id)]))}}}),Qp=(0,o.defineComponent)({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:A,connectionMode:t,connectionStartHandle:n,connectionEndHandle:r,connectionPosition:a,connectionLineType:u,connectionLineStyle:d,connectionLineOptions:g,connectionStatus:h,viewport:B,findNode:w}=$A(),m=(e=(0,o.inject)(Or))==null?void 0:e["connection-line"],v=(0,o.computed)(()=>{var K;return w((K=n.value)==null?void 0:K.nodeId)}),y=(0,o.computed)(()=>{var K;return w((K=r.value)==null?void 0:K.nodeId)??null}),I=(0,o.computed)(()=>({x:(a.value.x-B.value.x)/B.value.zoom,y:(a.value.y-B.value.y)/B.value.zoom})),L=(0,o.computed)(()=>g.value.markerStart?`url(#${Pn(g.value.markerStart,A)})`:""),T=(0,o.computed)(()=>g.value.markerEnd?`url(#${Pn(g.value.markerEnd,A)})`:"");return()=>{var K,b,O;if(!v.value||!n.value)return null;const aA=n.value.id,Z=n.value.type,cA=v.value.handleBounds;let lA=cA?.[Z]??[];if(t.value===tt.Loose){const k=cA?.[Z==="source"?"target":"source"]??[];lA=[...lA,...k]}if(!lA)return null;const iA=(aA?lA.find(k=>k.id===aA):lA[0])??null,oA=iA?.position??IA.Top,{x:tA,y:x}=An(v.value,iA,oA);let eA=null;y.value&&(t.value===tt.Strict?eA=((K=y.value.handleBounds[Z==="source"?"target":"source"])==null?void 0:K.find(k=>{var N;return k.id===((N=r.value)==null?void 0:N.id)}))||null:eA=((b=[...y.value.handleBounds.source??[],...y.value.handleBounds.target??[]])==null?void 0:b.find(k=>{var N;return k.id===((N=r.value)==null?void 0:N.id)}))||null);const H=((O=r.value)==null?void 0:O.position)??(oA?wi[oA]:null);if(!oA||!H)return null;const X=u.value??g.value.type??xt.Bezier;let F="";const D={sourceX:tA,sourceY:x,sourcePosition:oA,targetX:I.value.x,targetY:I.value.y,targetPosition:H};return X===xt.Bezier?[F]=Ei(D):X===xt.Step?[F]=Fi({...D,borderRadius:0}):X===xt.SmoothStep?[F]=Fi(D):X===xt.SimpleBezier?[F]=cl(D):F=`M${tA},${x} ${I.value.x},${I.value.y}`,(0,o.h)("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},(0,o.h)("g",{class:"vue-flow__connection"},m?(0,o.h)(m,{sourceX:tA,sourceY:x,sourcePosition:oA,targetX:I.value.x,targetY:I.value.y,targetPosition:H,sourceNode:v.value,sourceHandle:iA,targetNode:y.value,targetHandle:eA,markerEnd:T.value,markerStart:L.value,connectionStatus:h.value}):(0,o.h)("path",{d:F,class:[g.value.class,h.value,"vue-flow__connection-path"],style:{...d.value,...g.value.style},"marker-end":T.value,"marker-start":L.value})))}}}),Ep=["id","markerWidth","markerHeight","markerUnits","orient"],Fp=(0,o.defineComponent)({name:"MarkerType",compatConfig:{MODE:3},props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(A,t)=>((0,o.openBlock)(),(0,o.createElementBlock)("marker",{id:A.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${A.width}`,markerHeight:`${A.height}`,markerUnits:A.markerUnits,orient:A.orient},[A.type===(0,o.unref)(nt).ArrowClosed?((0,o.openBlock)(),(0,o.createElementBlock)("polyline",{key:0,style:(0,o.normalizeStyle)({stroke:A.color,fill:A.color,strokeWidth:A.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):(0,o.createCommentVNode)("",!0),A.type===(0,o.unref)(nt).Arrow?((0,o.openBlock)(),(0,o.createElementBlock)("polyline",{key:1,style:(0,o.normalizeStyle)({stroke:A.color,strokeWidth:A.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):(0,o.createCommentVNode)("",!0)],8,Ep))}}),Up={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},bp=(0,o.defineComponent)({name:"MarkerDefinitions",compatConfig:{MODE:3},setup(e){const{id:A,edges:t,connectionLineOptions:n,defaultMarkerColor:r}=$A(),a=(0,o.computed)(()=>{const u=new Set,d=[],g=h=>{if(h){const B=Pn(h,A);u.has(B)||(typeof h=="object"?d.push({...h,id:B,color:h.color||r.value}):d.push({id:B,color:r.value,type:h}),u.add(B))}};for(const h of[n.value.markerEnd,n.value.markerStart])g(h);for(const h of t.value)for(const B of[h.markerStart,h.markerEnd])g(B);return d.sort((h,B)=>h.id.localeCompare(B.id))});return(u,d)=>((0,o.openBlock)(),(0,o.createElementBlock)("svg",Up,[(0,o.createElementVNode)("defs",null,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(a.value,g=>((0,o.openBlock)(),(0,o.createBlock)(Fp,{id:g.id,key:g.id,type:g.type,color:g.color,width:g.width,height:g.height,markerUnits:g.markerUnits,"stroke-width":g.strokeWidth,orient:g.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),Hp=(0,o.defineComponent)({name:"Edges",compatConfig:{MODE:3},setup(e){const{findNode:A,getEdges:t,elevateEdgesOnSelect:n}=$A();return(r,a)=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,null,[(0,o.createVNode)(bp),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)((0,o.unref)(t),u=>((0,o.openBlock)(),(0,o.createElementBlock)("svg",{key:u.id,class:"vue-flow__edges vue-flow__container",style:(0,o.normalizeStyle)({zIndex:(0,o.unref)(cB)(u,(0,o.unref)(A),(0,o.unref)(n))})},[(0,o.createVNode)((0,o.unref)(yp),{id:u.id},null,8,["id"])],4))),128)),(0,o.createVNode)((0,o.unref)(Qp))],64))}}),Ip=(0,o.defineComponent)({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:A,noPanClassName:t,selectNodesOnDrag:n,nodesSelectionActive:r,multiSelectionActive:a,emits:u,removeSelectedNodes:d,addSelectedNodes:g,updateNodeDimensions:h,onUpdateNodeInternals:B,getNodeTypes:w,nodeExtent:m,elevateNodesOnSelect:v,disableKeyboardA11y:y,ariaLiveMessage:I,snapToGrid:L,snapGrid:T,nodeDragThreshold:K,nodesDraggable:b,elementsSelectable:O,nodesConnectable:aA,nodesFocusable:Z,hooks:cA}=$A(),lA=(0,o.ref)(null);(0,o.provide)(Al,lA),(0,o.provide)(qa,e.id);const iA=(0,o.inject)(Or),oA=(0,o.getCurrentInstance)(),tA=rl(),{node:x,parentNode:eA}=nl(e.id),{emit:H,on:X}=IB(x,u),F=(0,o.toRef)(()=>typeof x.draggable>"u"?b.value:x.draggable),D=(0,o.toRef)(()=>typeof x.selectable>"u"?O.value:x.selectable),k=(0,o.toRef)(()=>typeof x.connectable>"u"?aA.value:x.connectable),N=(0,o.toRef)(()=>typeof x.focusable>"u"?Z.value:x.focusable),R=(0,o.computed)(()=>D.value||F.value||cA.value.nodeClick.hasListeners()||cA.value.nodeDoubleClick.hasListeners()||cA.value.nodeMouseEnter.hasListeners()||cA.value.nodeMouseMove.hasListeners()||cA.value.nodeMouseLeave.hasListeners()),$=(0,o.toRef)(()=>!!x.dimensions.width&&!!x.dimensions.height),nA=(0,o.computed)(()=>{const S=x.type||"default",G=iA?.[`node-${S}`];if(G)return G;let P=x.template||w.value[S];if(typeof P=="string"&&oA){const dA=Object.keys(oA.appContext.components);dA&&dA.includes(S)&&(P=(0,o.resolveComponent)(S,!1))}return P&&typeof P!="string"?P:(u.error(new ce(ie.NODE_TYPE_MISSING,P)),!1)}),BA=el({id:e.id,el:lA,disabled:()=>!F.value,selectable:D,dragHandle:()=>x.dragHandle,onStart(S){H.dragStart(S)},onDrag(S){H.drag(S)},onStop(S){H.dragStop(S)},onClick(S){_(S)}}),FA=(0,o.computed)(()=>x.class instanceof Function?x.class(x):x.class),sA=(0,o.computed)(()=>{const S=(x.style instanceof Function?x.style(x):x.style)||{},G=x.width instanceof Function?x.width(x):x.width,P=x.height instanceof Function?x.height(x):x.height;return!S.width&&G&&(S.width=typeof G=="string"?G:`${G}px`),!S.height&&P&&(S.height=typeof P=="string"?P:`${P}px`),S}),Y=(0,o.toRef)(()=>Number(x.zIndex??sA.value.zIndex??0));return B(S=>{(S.includes(e.id)||!S.length)&&uA()}),(0,o.onMounted)(()=>{(0,o.watch)(()=>x.hidden,(S=!1,G,P)=>{!S&&lA.value&&(e.resizeObserver.observe(lA.value),P(()=>{lA.value&&e.resizeObserver.unobserve(lA.value)}))},{immediate:!0,flush:"post"})}),(0,o.watch)([()=>x.type,()=>x.sourcePosition,()=>x.targetPosition],()=>{(0,o.nextTick)(()=>{h([{id:e.id,nodeElement:lA.value,forceUpdate:!0}])})}),(0,o.watch)([()=>x.position.x,()=>x.position.y,()=>{var S;return(S=eA.value)==null?void 0:S.computedPosition.x},()=>{var S;return(S=eA.value)==null?void 0:S.computedPosition.y},()=>{var S;return(S=eA.value)==null?void 0:S.computedPosition.z},Y,()=>x.selected,()=>x.dimensions.height,()=>x.dimensions.width,()=>{var S;return(S=eA.value)==null?void 0:S.dimensions.height},()=>{var S;return(S=eA.value)==null?void 0:S.dimensions.width}],([S,G,P,dA,fA,bA])=>{const pA={x:S,y:G,z:bA+(v.value&&x.selected?1e3:0)};typeof P<"u"&&typeof dA<"u"?x.computedPosition=rB({x:P,y:dA,z:fA},pA):x.computedPosition=pA},{flush:"post",immediate:!0}),(0,o.watch)([()=>x.extent,m],([S,G],[P,dA])=>{(S!==P||G!==dA)&&J()}),x.extent==="parent"||typeof x.extent=="object"&&"range"in x.extent&&x.extent.range==="parent"?zo(()=>$).toBe(!0).then(J):J(),()=>x.hidden?null:(0,o.h)("div",{ref:lA,"data-id":x.id,class:["vue-flow__node",`vue-flow__node-${nA.value===!1?"default":x.type||"default"}`,{[t.value]:F.value,dragging:BA?.value,draggable:F.value,selected:x.selected,selectable:D.value,parent:x.isParent},FA.value],style:{visibility:$.value?"visible":"hidden",zIndex:x.computedPosition.z??Y.value,transform:`translate(${x.computedPosition.x}px,${x.computedPosition.y}px)`,pointerEvents:R.value?"all":"none",...sA.value},tabIndex:N.value?0:void 0,role:N.value?"group":void 0,"aria-describedby":y.value?void 0:`${ma}-${A}`,"aria-label":x.ariaLabel,"aria-roledescription":"node",...x.domAttributes,onMouseenter:wA,onMousemove:QA,onMouseleave:_A,onContextmenu:gA,onClick:_,onDblclick:j,onKeydown:U},[(0,o.h)(nA.value===!1?w.value.default:nA.value,{id:x.id,type:x.type,data:x.data,events:{...x.events,...X},selected:x.selected,resizing:x.resizing,dragging:BA.value,connectable:k.value,position:x.computedPosition,dimensions:x.dimensions,isValidTargetPos:x.isValidTargetPos,isValidSourcePos:x.isValidSourcePos,parent:x.parentNode,parentNodeId:x.parentNode,zIndex:x.computedPosition.z??Y.value,targetPosition:x.targetPosition,sourcePosition:x.sourcePosition,label:x.label,dragHandle:x.dragHandle,onUpdateNodeInternals:uA})]);function J(){const S=x.computedPosition,{computedPosition:G,position:P}=Bi(x,L.value?Mr(S,T.value):S,u.error,m.value,eA.value);(x.computedPosition.x!==G.x||x.computedPosition.y!==G.y)&&(x.computedPosition={...x.computedPosition,...G}),(x.position.x!==P.x||x.position.y!==P.y)&&(x.position=P)}function uA(){lA.value&&h([{id:e.id,nodeElement:lA.value,forceUpdate:!0}])}function wA(S){BA?.value||H.mouseEnter({event:S,node:x})}function QA(S){BA?.value||H.mouseMove({event:S,node:x})}function _A(S){BA?.value||H.mouseLeave({event:S,node:x})}function gA(S){return H.contextMenu({event:S,node:x})}function j(S){return H.doubleClick({event:S,node:x})}function _(S){D.value&&(!n.value||!F.value||K.value>0)&&Ci(x,a.value,g,d,r,!1,lA.value),H.click({event:S,node:x})}function U(S){if(!(fi(S)||y.value))if(Ca.includes(S.key)&&D.value){const G=S.key==="Escape";Ci(x,a.value,g,d,r,G,lA.value)}else F.value&&x.selected&&jt[S.key]&&(S.preventDefault(),I.value=`Moved selected node ${S.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~x.position.x}, y: ${~~x.position.y}`,tA({x:jt[S.key].x,y:jt[S.key].y},S.shiftKey))}}}),_p={height:"0",width:"0"},Sp=(0,o.defineComponent)({name:"EdgeLabelRenderer",compatConfig:{MODE:3},setup(e){const{viewportRef:A}=$A(),t=(0,o.toRef)(()=>{var n;return(n=A.value)==null?void 0:n.getElementsByClassName("vue-flow__edge-labels")[0]});return(n,r)=>((0,o.openBlock)(),(0,o.createElementBlock)("svg",null,[((0,o.openBlock)(),(0,o.createElementBlock)("foreignObject",_p,[((0,o.openBlock)(),(0,o.createBlock)(o.Teleport,{to:t.value,disabled:!t.value},[(0,o.renderSlot)(n.$slots,"default")],8,["to","disabled"]))]))]))}});function xp(e={includeHiddenNodes:!1}){const{nodes:A}=$A();return(0,o.computed)(()=>{if(A.value.length===0)return!1;for(const t of A.value)if((e.includeHiddenNodes||!t.hidden)&&(t?.handleBounds===void 0||t.dimensions.width===0||t.dimensions.height===0))return!1;return!0})}var Dp={class:"vue-flow__nodes vue-flow__container"},Np=(0,o.defineComponent)({name:"Nodes",compatConfig:{MODE:3},setup(e){const{getNodes:A,updateNodeDimensions:t,emits:n}=$A(),r=xp(),a=(0,o.ref)();return(0,o.watch)(r,u=>{u&&(0,o.nextTick)(()=>{n.nodesInitialized(A.value)})},{immediate:!0}),(0,o.onMounted)(()=>{a.value=new ResizeObserver(u=>{const d=u.map(g=>({id:g.target.getAttribute("data-id"),nodeElement:g.target,forceUpdate:!0}));(0,o.nextTick)(()=>t(d))})}),(0,o.onBeforeUnmount)(()=>{var u;return(u=a.value)==null?void 0:u.disconnect()}),(u,d)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",Dp,[a.value?((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:0},(0,o.renderList)((0,o.unref)(A),(g,h,B,w)=>{const m=[g.id];if(w&&w.key===g.id&&(0,o.isMemoSame)(w,m))return w;const v=((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(Ip),{id:g.id,key:g.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return v.memo=m,v},d,0),128)):(0,o.createCommentVNode)("",!0)]))}});function Lp(){const{emits:e}=$A();(0,o.onMounted)(()=>{if($a()){const A=document.querySelector(".vue-flow__pane");A&&window.getComputedStyle(A).zIndex!=="1"&&e.error(new ce(ie.MISSING_STYLES))}})}var Tp=(0,o.createElementVNode)("div",{class:"vue-flow__edge-labels"},null,-1),kp=(0,o.defineComponent)({name:"VueFlow",compatConfig:{MODE:3},props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:A,emit:t}){const n=e,r=(0,o.useSlots)(),a=Xo(n,"modelValue",t),u=Xo(n,"nodes",t),d=Xo(n,"edges",t),g=$A(n),h=DB({modelValue:a,nodes:u,edges:d},n,g);return LB(t,g.hooks),wp(),Lp(),(0,o.provide)(Or,r),(0,o.onUnmounted)(h),A(g),(B,w)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{ref:(0,o.unref)(g).vueFlowRef,class:"vue-flow"},[(0,o.createVNode)(gp,null,{default:(0,o.withCtx)(()=>[(0,o.createVNode)(Hp),Tp,(0,o.createVNode)(Np),(0,o.renderSlot)(B.$slots,"zoom-pane")]),_:3}),(0,o.renderSlot)(B.$slots,"default"),(0,o.createVNode)(mp)],512))}}),Mp=(0,o.defineComponent)({name:"Panel",compatConfig:{MODE:3},props:{position:{}},setup(e){const A=e,{userSelectionActive:t}=$A(),n=(0,o.computed)(()=>`${A.position}`.split("-"));return(r,a)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(["vue-flow__panel",n.value]),style:(0,o.normalizeStyle)({pointerEvents:(0,o.unref)(t)?"none":"all"})},[(0,o.renderSlot)(r.$slots,"default")],6))}}),rt=(e=>(e.Lines="lines",e.Dots="dots",e))(rt||{}),Op=function({dimensions:e,size:A,color:t}){return(0,o.h)("path",{stroke:t,"stroke-width":A,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Kp=function({radius:e,color:A}){return(0,o.h)("circle",{cx:e,cy:e,r:e,fill:A})};rt.Lines,rt.Dots;var Rp={[rt.Dots]:"#81818a",[rt.Lines]:"#eee"},Vp=["id","x","y","width","height","patternTransform"],Pp={key:2,height:"100",width:"100"},Gp=["fill"],zp=["x","y","fill"],Xp=(0,o.defineComponent)({name:"Background",compatConfig:{MODE:3},props:{id:{},variant:{default:()=>rt.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:A,viewport:t}=$A(),n=(0,o.computed)(()=>{const u=t.value.zoom,[d,g]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],h=[d*u||1,g*u||1],B=e.size*u,[w,m]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset];return{scaledGap:h,offset:[w*u||1+h[0]/2,m*u||1+h[1]/2],size:B}}),r=(0,o.toRef)(()=>`pattern-${A}${e.id?`-${e.id}`:""}`),a=(0,o.toRef)(()=>e.color||e.patternColor||Rp[e.variant||rt.Dots]);return(u,d)=>((0,o.openBlock)(),(0,o.createElementBlock)("svg",{class:"vue-flow__background vue-flow__container",style:(0,o.normalizeStyle)({height:`${u.height>100?100:u.height}%`,width:`${u.width>100?100:u.width}%`})},[(0,o.renderSlot)(u.$slots,"pattern-container",{id:r.value},()=>[(0,o.createElementVNode)("pattern",{id:r.value,x:(0,o.unref)(t).x%n.value.scaledGap[0],y:(0,o.unref)(t).y%n.value.scaledGap[1],width:n.value.scaledGap[0],height:n.value.scaledGap[1],patternTransform:`translate(-${n.value.offset[0]},-${n.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[(0,o.renderSlot)(u.$slots,"pattern",{},()=>[u.variant===(0,o.unref)(rt).Lines?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(Op),{key:0,size:u.lineWidth,color:a.value,dimensions:n.value.scaledGap},null,8,["size","color","dimensions"])):u.variant===(0,o.unref)(rt).Dots?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(Kp),{key:1,color:a.value,radius:n.value.size/2},null,8,["color","radius"])):(0,o.createCommentVNode)("",!0),u.bgColor?((0,o.openBlock)(),(0,o.createElementBlock)("svg",Pp,[(0,o.createElementVNode)("rect",{width:"100%",height:"100%",fill:u.bgColor},null,8,Gp)])):(0,o.createCommentVNode)("",!0)])],8,Vp)]),(0,o.createElementVNode)("rect",{x:u.x,y:u.y,width:"100%",height:"100%",fill:`url(#${r.value})`},null,8,zp),(0,o.renderSlot)(u.$slots,"default",{id:r.value})],4))}}),$p={name:"ControlButton",compatConfig:{MODE:3}},Yp=(e,A)=>{const t=e.__vccOpts||e;for(const[n,r]of A)t[n]=r;return t},Wp={type:"button",class:"vue-flow__controls-button"};function Jp(e,A,t,n,r,a){return(0,o.openBlock)(),(0,o.createElementBlock)("button",Wp,[(0,o.renderSlot)(e.$slots,"default")])}var Xr=Yp($p,[["render",Jp]]),Zp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},jp=[(0,o.createElementVNode)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function qp(e,A){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Zp,jp)}var Am={render:qp},em={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},tm=[(0,o.createElementVNode)("path",{d:"M0 0h32v4.2H0z"},null,-1)];function nm(e,A){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",em,tm)}var rm={render:nm},om={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},im=[(0,o.createElementVNode)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function sm(e,A){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",om,im)}var am={render:sm},lm={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},cm=[(0,o.createElementVNode)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1)];function um(e,A){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",lm,cm)}var dm={render:um},fm={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},gm=[(0,o.createElementVNode)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function hm(e,A){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",fm,gm)}var Bm={render:hm},pm=(0,o.defineComponent)({name:"Controls",compatConfig:{MODE:3},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Ba.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:A}){const{nodesDraggable:t,nodesConnectable:n,elementsSelectable:r,setInteractive:a,zoomIn:u,zoomOut:d,fitView:g,viewport:h,minZoom:B,maxZoom:w}=$A(),m=(0,o.toRef)(()=>t.value||n.value||r.value),v=(0,o.toRef)(()=>h.value.zoom<=B.value),y=(0,o.toRef)(()=>h.value.zoom>=w.value);function I(){u(),A("zoomIn")}function L(){d(),A("zoomOut")}function T(){g(e.fitViewParams),A("fitView")}function K(){a(!m.value),A("interactionChange",!m.value)}return(b,O)=>((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(Mp),{class:"vue-flow__controls",position:b.position},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(b.$slots,"top"),b.showZoom?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[(0,o.renderSlot)(b.$slots,"control-zoom-in",{},()=>[(0,o.createVNode)(Xr,{class:"vue-flow__controls-zoomin",disabled:y.value,onClick:I},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(b.$slots,"icon-zoom-in",{},()=>[((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)((0,o.unref)(Am))))])]),_:3},8,["disabled"])]),(0,o.renderSlot)(b.$slots,"control-zoom-out",{},()=>[(0,o.createVNode)(Xr,{class:"vue-flow__controls-zoomout",disabled:v.value,onClick:L},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(b.$slots,"icon-zoom-out",{},()=>[((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)((0,o.unref)(rm))))])]),_:3},8,["disabled"])])],64)):(0,o.createCommentVNode)("",!0),b.showFitView?(0,o.renderSlot)(b.$slots,"control-fit-view",{key:1},()=>[(0,o.createVNode)(Xr,{class:"vue-flow__controls-fitview",onClick:T},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(b.$slots,"icon-fit-view",{},()=>[((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)((0,o.unref)(am))))])]),_:3})]):(0,o.createCommentVNode)("",!0),b.showInteractive?(0,o.renderSlot)(b.$slots,"control-interactive",{key:2},()=>[b.showInteractive?((0,o.openBlock)(),(0,o.createBlock)(Xr,{key:0,class:"vue-flow__controls-interactive",onClick:K},{default:(0,o.withCtx)(()=>[m.value?(0,o.renderSlot)(b.$slots,"icon-unlock",{key:0},()=>[((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)((0,o.unref)(Bm))))]):(0,o.createCommentVNode)("",!0),m.value?(0,o.createCommentVNode)("",!0):(0,o.renderSlot)(b.$slots,"icon-lock",{key:1},()=>[((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)((0,o.unref)(dm))))])]),_:3})):(0,o.createCommentVNode)("",!0)]):(0,o.createCommentVNode)("",!0),(0,o.renderSlot)(b.$slots,"default")]),_:3},8,["position"]))}}),mm=["onClick"],wm={class:"d-flow-node-menus-item-name"},Cm=(0,o.defineComponent)({name:"DNodeMenus",__name:"nodeMenus",props:{fromNodeId:{},handleId:{}},emits:["addNode"],setup(e,{emit:A}){const t=e,n=A,r=(0,o.inject)("d_flow_design_provide",{}),a=r.getFlowComponents?.()||[],u=d=>{n("addNode",d.type),(0,o.nextTick)(()=>{t.handleId==="line"?r.addNodeByLine?.(d.type,t.fromNodeId||""):r.addNode?.(d.type,t.fromNodeId||"",t.handleId||"")})};return(d,g)=>{const h=(0,o.resolveComponent)("j-icon");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"d-flow-node-menus",onClick:(0,o.withModifiers)(()=>{},["stop"])},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)((0,o.unref)(a),(B,w)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:w,class:"d-flow-node-menus-item",onClick:m=>u(B)},[(0,o.createElementVNode)("div",{class:"d-flow-node-menus-item-icon",style:(0,o.normalizeStyle)({backgroundColor:B.iconColor||"var(--j-color-primary)"})},[(0,o.createVNode)(h,{icon:B.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,o.createElementVNode)("div",wm,(0,o.toDisplayString)(B.name),1)],8,mm))),128))])}}}),bi=Cm,vm={class:"d-flow-step-name"},ym={key:0,style:{color:"var(--j-color-text-2)"}},Qm={style:{color:"var(--j-color-text)"}},Em=(0,o.defineComponent)({name:"DStepNode",__name:"stepNode",props:{id:{},data:{}},setup(e){const A=e,{onNodeClick:t,onEdgeClick:n,onMoveStart:r,onConnectStart:a,onNodeDragStart:u,removeNodes:d,getEdges:g,getNodes:h,onNodesChange:B}=$A(),w=(0,o.inject)("d_flow_design_provide",{}),m=(0,o.computed)(()=>w.getFlowComponentMap?.value?.[A.data.type]||{}),v=()=>{d(A.id),w.onRemoveNode?.(A.id)},y=(0,o.ref)({});B(eA=>{if(A.data.isInit&&eA.findIndex(H=>H.type==="select"&&H.id===A.id&&H.id==="start"&&H.selected)!==-1){const H=h.value.find(X=>X.id==="start");H&&(H.data.isInit=!1),y.value.s1=!0}});const I=(0,o.ref)(!1),L=eA=>{eA.indexOf("t")!==-1&&!T.value||(I.value=!0,y.value[eA]=!0)},T=(0,o.computed)(()=>g.value.findIndex(eA=>eA.target===A.id)===-1),K=(0,o.ref)(!1),b=()=>{K.value=!0},O=(eA,H)=>{if(g.value.find(F=>F.source===H&&F.target===eA))return!0;const X=g.value.filter(F=>F.target===eA);for(let F=0;F<X.length;F++)if(O(X[F].source,H))return!0;return!1},aA=eA=>K.value?(K.value=!1,!1):O(eA.source,eA.target)?!1:eA.source!==eA.target&&eA.sourceHandle!==eA.targetHandle&&eA.sourceHandle.indexOf("s")!==-1&&eA.targetHandle.indexOf("t")!==-1,Z=()=>{tA(),Object.keys(y.value).forEach(eA=>{y.value[eA]=!1})},cA=()=>{Z()};t(()=>{console.log("onNodeClick"),I.value?I.value=!1:Z()}),n(()=>{Z()}),r(()=>{Z()}),a(()=>{Z()}),u(()=>{Z()});const lA=(0,o.ref)(),iA=(0,o.ref)({top:0,left:0,bottom:0,right:0}),oA=(0,o.ref)({getBoundingClientRect:()=>iA.value}),tA=()=>{lA.value?.handleClose()},x=eA=>{const{clientX:H,clientY:X}=eA;iA.value=DOMRect.fromRect({x:H,y:X}),eA.preventDefault(),lA.value?.handleOpen()};return(eA,H)=>{const X=(0,o.resolveComponent)("j-icon"),F=(0,o.resolveComponent)("el-popover"),D=(0,o.resolveComponent)("el-tooltip"),k=(0,o.resolveComponent)("el-dropdown-item"),N=(0,o.resolveComponent)("el-dropdown-menu"),R=(0,o.resolveComponent)("el-dropdown");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"d-flow-step",onContextmenu:(0,o.withModifiers)(x,["stop"])},[(0,o.createElementVNode)("div",{class:"d-flow-step-icon",style:(0,o.normalizeStyle)({backgroundColor:m.value.iconColor||"var(--j-color-primary)"})},[(0,o.createVNode)(X,{icon:m.value.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,o.createElementVNode)("div",vm,(0,o.toDisplayString)(m.value.name),1),e.data.type!=="start"?((0,o.openBlock)(),(0,o.createBlock)(D,{key:0,placement:"top","show-arrow":!1,"popper-class":"d-flow-step-tooltip"},{content:(0,o.withCtx)(()=>[T.value?((0,o.openBlock)(),(0,o.createElementBlock)("div",ym,[...H[4]||(H[4]=[(0,o.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"点击",-1),(0,o.createTextVNode)("添加节点 ",-1)])])):(0,o.createCommentVNode)("",!0),H[5]||(H[5]=(0,o.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,o.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"拖拽"),(0,o.createTextVNode)("连接节点 ")],-1))]),default:(0,o.withCtx)(()=>[(0,o.createVNode)((0,o.unref)(en),{onClick:H[1]||(H[1]=$=>L("t1")),onMousedown:b,id:"t1",class:(0,o.normalizeClass)(["d-flow-step-target-handle",{"d-flow-step-target-handle-notadd":!T.value}]),type:"target",position:(0,o.unref)(IA).Left,"is-valid-connection":aA},{default:(0,o.withCtx)(()=>[T.value?((0,o.openBlock)(),(0,o.createBlock)(F,{key:0,visible:y.value.t1,"onUpdate:visible":H[0]||(H[0]=$=>y.value.t1=$),placement:"left","popper-class":"d-flow-step-popper",trigger:"click","show-arrow":!1,"popper-options":{strategy:"fixed"}},{reference:(0,o.withCtx)(()=>[(0,o.createVNode)(X,{class:"d-flow-step-handle-plus",icon:"mdi:plus-circle"})]),default:(0,o.withCtx)(()=>[(0,o.createVNode)(bi,{"handle-id":"t1","from-node-id":e.id,onAddNode:cA},null,8,["from-node-id"])]),_:1},8,["visible"])):(0,o.createCommentVNode)("",!0)]),_:1},8,["class","position"])]),_:1})):(0,o.createCommentVNode)("",!0),(0,o.createVNode)(D,{placement:"top","show-arrow":!1,"popper-class":"d-flow-step-tooltip"},{content:(0,o.withCtx)(()=>[...H[6]||(H[6]=[(0,o.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,o.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"点击"),(0,o.createTextVNode)("添加节点 ")],-1),(0,o.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,o.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"拖拽"),(0,o.createTextVNode)("连接节点 ")],-1)])]),default:(0,o.withCtx)(()=>[(0,o.createVNode)((0,o.unref)(en),{onClick:H[3]||(H[3]=$=>L("s1")),onMousedown:b,id:"s1",class:"d-flow-step-source-handle",type:"source",position:(0,o.unref)(IA).Right,"is-valid-connection":aA},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(F,{visible:y.value.s1,"onUpdate:visible":H[2]||(H[2]=$=>y.value.s1=$),placement:"right",trigger:"click","popper-class":"d-flow-step-popper","show-arrow":!1,"popper-options":{strategy:"fixed"}},{reference:(0,o.withCtx)(()=>[(0,o.createVNode)(X,{class:"d-flow-step-handle-plus",icon:"mdi:plus-circle"})]),default:(0,o.withCtx)(()=>[(0,o.createVNode)(bi,{"handle-id":"s1","from-node-id":e.id,onAddNode:cA},null,8,["from-node-id"])]),_:1},8,["visible"])]),_:1},8,["position"])]),_:1}),(0,o.createVNode)(R,{ref_key:"dropdownRef",ref:lA,"popper-class":"d-flow-step-dropdown","virtual-ref":oA.value,"show-arrow":!1,"popper-options":{modifiers:[{name:"offset",options:{offset:[0,0]}}]},"virtual-triggering":"",trigger:"contextmenu",placement:"bottom-start"},{dropdown:(0,o.withCtx)(()=>[(0,o.createVNode)(N,null,{default:(0,o.withCtx)(()=>[e.data.type!="start"?((0,o.openBlock)(),(0,o.createBlock)(k,{key:0,onClick:v},{default:(0,o.withCtx)(()=>[...H[7]||(H[7]=[(0,o.createTextVNode)("删除",-1)])]),_:1})):(0,o.createCommentVNode)("",!0),m.value.des?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,style:(0,o.normalizeStyle)({width:"160px",padding:"4px 16px 0 16px","font-size":"12px","border-top":e.data.type!="start"?"1px solid var(--j-color-border)":void 0,"margin-top":e.data.type!="start"?"4px":void 0})},[H[8]||(H[8]=(0,o.createElementVNode)("div",{style:{"margin-bottom":"4px",color:"var(--j-color-text-2)"}},"关于",-1)),(0,o.createElementVNode)("div",Qm,(0,o.toDisplayString)(m.value.des),1)],4)):(0,o.createCommentVNode)("",!0)]),_:1})]),_:1},8,["virtual-ref"])],32)}}}),Fm=Em,Um=(0,o.defineComponent)({name:"DEdgeWithButton",__name:"edgeWithButton",props:{id:{},sourceX:{},sourceY:{},targetX:{},targetY:{},sourcePosition:{},targetPosition:{},markerEnd:{},style:{}},setup(e){const A=e,{onEdgeMouseEnter:t,onEdgeMouseLeave:n,onNodeClick:r,onEdgeClick:a,onMoveStart:u,onConnectStart:d,onNodeDragStart:g}=$A(),h=(0,o.computed)(()=>Ei(A)),B=(0,o.ref)(!1),w=(0,o.ref)(!1);t(({edge:L})=>{L.id===A.id&&(B.value=!0)}),n(()=>{B.value=!1});const m=(0,o.ref)(!1),v=()=>{m.value=!1,(0,o.nextTick)(()=>{w.value=!1})},y=()=>{w.value=!0,m.value=!0},I=()=>{v()};return r(()=>{v()}),a(()=>{v()}),u(()=>{v()}),d(()=>{v()}),g(()=>{v()}),(L,T)=>{const K=(0,o.resolveComponent)("j-icon"),b=(0,o.resolveComponent)("el-popover");return(0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,null,[(0,o.createVNode)((0,o.unref)(zn),{id:e.id,style:(0,o.normalizeStyle)(e.style),path:h.value[0],"marker-end":e.markerEnd},null,8,["id","style","path","marker-end"]),(0,o.createVNode)((0,o.unref)(Sp),null,{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("div",{style:(0,o.normalizeStyle)({pointerEvents:"all",position:"absolute",transform:`translate(-50%, -50%) translate(${h.value[1]}px,${h.value[2]}px)`}),class:"nodrag nopan"},[(0,o.createVNode)(b,{visible:m.value,"show-arrow":!1,placement:"right","popper-class":"d-flow-step-popper"},{reference:(0,o.withCtx)(()=>[(0,o.withDirectives)((0,o.createElementVNode)("div",{onClick:(0,o.withModifiers)(y,["stop"]),class:"d-flow-edge-button"},[(0,o.createVNode)(K,{icon:"mdi:plus-circle"})],512),[[o.vShow,B.value||w.value]])]),default:(0,o.withCtx)(()=>[(0,o.createVNode)(bi,{"handle-id":"line","from-node-id":e.id,onAddNode:I},null,8,["from-node-id"])]),_:1},8,["visible"])],4)]),_:1})],64)}}}),bm=Um,Hm=(0,o.defineComponent)({name:"DFlow",__name:"flow",props:{nodes:{default:()=>[]},edges:{default:()=>[]}},setup(e){return(A,t)=>((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(kp),{"min-zoom":.2,"max-zoom":4,"default-viewport":{zoom:1},"connection-mode":(0,o.unref)(tt).Strict,nodes:e.nodes,edges:e.edges},{"edge-button":(0,o.withCtx)(n=>[(0,o.createVNode)(bm,{id:n.id,"source-x":n.sourceX,"source-y":n.sourceY,"target-x":n.targetX,"target-y":n.targetY,"source-position":n.sourcePosition,"target-position":n.targetPosition,"marker-end":n.markerEnd,style:(0,o.normalizeStyle)(n.style)},null,8,["id","source-x","source-y","target-x","target-y","source-position","target-position","marker-end","style"])]),"node-step":(0,o.withCtx)(n=>[(0,o.createVNode)(Fm,(0,o.normalizeProps)((0,o.guardReactiveProps)(n)),null,16)]),default:(0,o.withCtx)(()=>[(0,o.createVNode)((0,o.unref)(pm),{position:"bottom-left"}),(0,o.createVNode)((0,o.unref)(Xp))]),_:1},8,["connection-mode","nodes","edges"]))}}),Im=Hm,_m={class:"d-flow-design"},Sm={class:"d-flow-design-canvas"},xm={class:"d-flow-design-right"},Dm={class:"d-flow-design-title"},Nm={class:"d-flow-design-title-name"},Lm={class:"d-flow-design-panel"},Tm=(0,o.defineComponent)({name:"DFlowDesign",__name:"flowDesign",props:{components:{default:()=>[]},inputParams:{default:()=>({})},flowInit:{},flowComponentConfigInit:{},flowComponentConfigs:{default:()=>({})},flowComponentConfigChange:{}},emits:["nodeClick","edgeClick","paneClick","connect"],setup(e,{expose:A,emit:t}){const n=e,r=t,{addNodes:a,addEdges:u,removeEdges:d,addSelectedNodes:g,removeSelectedNodes:h,onConnect:B,onNodeClick:w,onPaneClick:m,onEdgeClick:v,getNodes:y,getEdges:I}=$A(),L=(0,o.computed)(()=>{const N={};return n.components.forEach(R=>{N[R.type]=R}),N.start={name:"开始",type:"start",icon:"ant-design:play-circle-outlined",des:"执行开始节点"},N}),T={id:"start",type:"step",data:{type:"start",isInit:!1},position:{x:80,y:160}},K=(0,o.ref)([T]),b=(0,o.ref)([]),O=(N,R)=>{if(R.indexOf("t")===-1){const $=I.value.filter(nA=>nA.source===N.id);if($.length>0){let nA=-1e6,BA=0;return $.forEach(FA=>{nA=Math.max(nA,FA.targetNode.position.y+FA.targetNode.dimensions.height+32),BA=FA.targetNode.position.x||0}),{x:BA,y:nA}}return{x:N.position.x+N.dimensions.width+100,y:N.position.y}}return{x:N.position.x-100-N.dimensions.width,y:N.position.y}},aA=(N,R,$)=>{const nA=y.value.find(FA=>FA.id===R);if(!nA)return;const BA={id:ft(),type:"step",data:{type:N},position:O(nA,$)};if(n.flowInit){const FA=n.flowInit(BA.data.type);FA&&Object.keys(FA).forEach(sA=>{BA.data[sA]=FA[sA]})}a(BA),$.indexOf("t")===-1?u({id:`${R}-${BA.id}`,source:R,target:BA.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:nt.Arrow}):u({id:`${R}-${BA.id}`,source:BA.id,target:R,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:nt.Arrow}),x(BA.id)},Z=N=>{const R=y.value.find($=>$.id===N);R&&(R.position.x+=100+R.dimensions.width,I.value.filter($=>$.source===N).forEach($=>{Z($.target)}))},cA=(N,R)=>{const $=I.value.find(BA=>BA.id===R);if(!$)return;const nA={id:ft(),type:"step",data:{type:N},position:{x:$.targetNode.position.x,y:$.targetNode.position.y}};if(n.flowInit){const BA=n.flowInit(nA.data.type);BA&&Object.keys(BA).forEach(FA=>{nA.data[FA]=BA[FA]})}a(nA),u({id:`${$.sourceNode.id}-${nA.id}`,source:$.sourceNode.id,target:nA.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:nt.Arrow}),u({id:`${nA.id}-${$.targetNode.id}`,source:nA.id,target:$.targetNode.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:nt.Arrow}),d(R),Z($.target),x(nA.id)};B(N=>{console.log("onConnect",N),N.type="button",N.markerEnd=nt.Arrow,u(N),r("connect",N)});const lA=()=>n.components||[],iA=(0,o.ref)(),oA=(0,o.computed)(()=>iA.value?L.value[iA.value.data.type]:void 0);w(N=>{iA.value?.id!==N.node.id&&(iA.value=N.node,X()),r("nodeClick",N.node)}),m(()=>{iA.value=void 0,r("paneClick")}),v(N=>{iA.value=void 0,r("edgeClick",N.edge)});const tA=N=>{iA.value?.id===N&&(iA.value=void 0)},x=N=>{iA.value&&h([iA.value]),iA.value=y.value.find(R=>R.id===N),iA.value&&(X(),setTimeout(()=>{iA.value&&g([iA.value])},100))},eA=(0,o.ref)(),H={};Object.keys(n.flowComponentConfigs).forEach(N=>{const R={type:"j-collapse",config:{defaultValue:[]},children:[]};n.flowComponentConfigs[N].forEach(($,nA)=>{const BA=`_collapse${nA}`;R.config?.defaultValue.push(BA),R.children?.push($)}),H[N]=[R]});const X=()=>{const N=H[iA.value?.data.type||""];N&&eA.value?(eA.value.init&&eA.value.init(N,iA.value?.data),n.flowComponentConfigInit&&n.flowComponentConfigInit({configRef:eA,inputParams:n.inputParams,components:y.value,configData:iA.value?.data})):eA.value&&eA.value.init&&eA.value.init([])},F=N=>{iA.value&&n.flowComponentConfigChange&&n.flowComponentConfigChange(iA.value.data.type,{configRef:eA,configData:iA.value.data,...N,isFlowNode:!0})};return(0,o.provide)("d_flow_design_provide",{getFlowComponents:lA,addNode:aA,addNodeByLine:cA,onRemoveNode:tA,getFlowComponentMap:L}),A({getData:()=>{const N=[];return y.value.forEach(R=>{N.push({config:R.data,id:R.id,position:R.position,type:R.type})}),I.value.forEach(R=>{N.push({id:R.id,source:R.source,target:R.target,sourceHandle:R.sourceHandle,targetHandle:R.targetHandle,type:"line",config:{},position:{x:0,y:0}})}),N},setData:N=>{if(!N||N.length===0)T.data.isInit=!0,K.value=[T],x(T.id);else{T.data.isInit=!1;const R=[],$=[];N.forEach(nA=>{if(nA.type==="line")nA.type="button",nA.markerEnd=nt.Arrow,$.push(nA);else{const BA={id:nA.id,type:nA.type,data:nA.config,position:nA.position};R.push(BA)}}),K.value=R,b.value=$}}}),(N,R)=>{const $=(0,o.resolveComponent)("j-icon"),nA=(0,o.resolveComponent)("j-form");return(0,o.openBlock)(),(0,o.createElementBlock)("div",_m,[(0,o.createElementVNode)("div",Sm,[(0,o.createVNode)(Im,{nodes:K.value,edges:b.value},null,8,["nodes","edges"])]),(0,o.withDirectives)((0,o.createElementVNode)("div",xm,[(0,o.createElementVNode)("div",Dm,[(0,o.createElementVNode)("div",{class:"d-flow-design-title-icon",style:(0,o.normalizeStyle)({backgroundColor:oA.value?.iconColor||"var(--j-color-primary)"})},[(0,o.createVNode)($,{icon:oA.value?.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,o.createElementVNode)("div",Nm,(0,o.toDisplayString)(oA.value?.name||""),1)]),(0,o.createElementVNode)("div",Lm,[(0,o.createVNode)(nA,{config:{labelPosition:"top"},style:{padding:"0"},ref_key:"configRef",ref:eA,onChange:F},null,512)])],512),[[o.vShow,iA.value&&H[iA.value.data.type]]])])}}}),km=Tm,hl=dt(km),Mm={class:"d-input-flow j-block"},Om=(0,o.defineComponent)({name:"DInputFlow",__name:"inputFlow",props:{modelValue:{},type:{},btnText:{default:"事件"},title:{},size:{default:"default"},width:{default:1200},height:{default:800},beforeClose:{},flowComponents:{default:()=>[]},inputParams:{default:()=>({})},flowInit:{},flowComponentConfigInit:{},flowComponentConfigs:{default:()=>({})},flowComponentConfigChange:{}},emits:["update:modelValue","change"],setup(e,{emit:A}){const t=e,n=A,r=(0,o.ref)(),a=(0,o.computed)({get(){return t.modelValue},set(w){n("update:modelValue",w)}}),u=(0,o.computed)(()=>(t.modelValue?.trim(),t.btnText)),d=w=>{const m=typeof w=="string"?w:void 0;try{r.value?.setData(JSON.parse(m||"[]"))}catch{r.value?.setData([])}},g=async()=>{const w=r.value?.getData();return w?JSON.stringify(w):void 0},h=w=>{if(t.beforeClose){const m=typeof w=="string"?w:void 0;return t.beforeClose(m)}return!0},B=w=>{const m=w.value;n("change",{value:typeof m=="string"?m:void 0})};return(w,m)=>{const v=(0,o.resolveComponent)("d-flow-design"),y=(0,o.resolveComponent)("j-input-button");return(0,o.openBlock)(),(0,o.createBlock)(y,(0,o.mergeProps)(w.$attrs,{type:e.type,"btn-text":u.value,title:e.title,size:e.size,width:e.width,height:e.height,"before-close":h,ok:g,open:d,"destroy-on-close":"",modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=I=>a.value=I),onChange:B}),{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("div",Mm,[(0,o.createVNode)(v,{ref_key:"flowRef",ref:r,components:e.flowComponents,"flow-init":e.flowInit,"flow-component-config-init":e.flowComponentConfigInit,"flow-component-configs":e.flowComponentConfigs,"flow-component-config-change":e.flowComponentConfigChange,"input-params":e.inputParams},null,8,["components","flow-init","flow-component-config-init","flow-component-configs","flow-component-config-change","input-params"])])]),_:1},16,["type","btn-text","title","size","width","height","modelValue"])}}}),Km=Om,Bl=dt(Km),AA=class Ne{static getElements(A,t=document){if(typeof A=="string"){const n="getElementById"in t?t:void 0;if(n&&!isNaN(+A[0])){const a=n.getElementById(A);return a?[a]:[]}let r=t.querySelectorAll(A);if(!r.length&&A[0]!=="."&&A[0]!=="#"&&(r=t.querySelectorAll("."+A),r.length||(r=t.querySelectorAll("#"+A)),!r.length)){const a=t.querySelector(`[gs-id="${A}"]`);return a?[a]:[]}return Array.from(r)}return[A]}static getElement(A,t=document){if(typeof A=="string"){const n="getElementById"in t?t:void 0;if(!A.length)return null;if(n&&A[0]==="#")return n.getElementById(A.substring(1));if(A[0]==="#"||A[0]==="."||A[0]==="[")return t.querySelector(A);if(n&&!isNaN(+A[0]))return n.getElementById(A);let r=t.querySelector(A);return n&&!r&&(r=n.getElementById(A)),r||(r=t.querySelector("."+A)),r}return A}static lazyLoad(A){return A.lazyLoad||A.grid?.opts?.lazyLoad&&A.lazyLoad!==!1}static createDiv(A,t){const n=document.createElement("div");return A.forEach(r=>{r&&n.classList.add(r)}),t?.appendChild(n),n}static shouldSizeToContent(A,t=!1){return A?.grid&&(t?A.sizeToContent===!0||A.grid.opts.sizeToContent===!0&&A.sizeToContent===void 0:!!A.sizeToContent||A.grid.opts.sizeToContent&&A.sizeToContent!==!1)}static isIntercepted(A,t){return!(A.y>=t.y+t.h||A.y+A.h<=t.y||A.x+A.w<=t.x||A.x>=t.x+t.w)}static isTouching(A,t){return Ne.isIntercepted(A,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(A,t){const n=A.x>t.x?A.x:t.x,r=A.x+A.w<t.x+t.w?A.x+A.w:t.x+t.w;if(r<=n)return 0;const a=A.y>t.y?A.y:t.y,u=A.y+A.h<t.y+t.h?A.y+A.h:t.y+t.h;return u<=a?0:(r-n)*(u-a)}static area(A){return A.w*A.h}static sort(A,t=1){return A.sort((r,a)=>{const u=t*((r.y??1e4)-(a.y??1e4));return u===0?t*((r.x??1e4)-(a.x??1e4)):u})}static find(A,t){return t?A.find(n=>n.id===t):void 0}static toBool(A){return typeof A=="boolean"?A:typeof A=="string"?(A=A.toLowerCase(),!(A===""||A==="no"||A==="false"||A==="0")):!!A}static toNumber(A){return A===null||A.length===0?void 0:Number(A)}static parseHeight(A){let t,n="px";if(typeof A=="string")if(A==="auto"||A==="")t=0;else{const r=A.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!r)throw new Error(`Invalid height val = ${A}`);n=r[2]||"px",t=parseFloat(r[1])}else t=A;return{h:t,unit:n}}static defaults(A,...t){return t.forEach(n=>{for(const r in n){if(!n.hasOwnProperty(r))return;A[r]===null||A[r]===void 0?A[r]=n[r]:typeof n[r]=="object"&&typeof A[r]=="object"&&Ne.defaults(A[r],n[r])}}),A}static same(A,t){if(typeof A!="object")return A==t;if(typeof A!=typeof t||Object.keys(A).length!==Object.keys(t).length)return!1;for(const n in A)if(A[n]!==t[n])return!1;return!0}static copyPos(A,t,n=!1){return t.x!==void 0&&(A.x=t.x),t.y!==void 0&&(A.y=t.y),t.w!==void 0&&(A.w=t.w),t.h!==void 0&&(A.h=t.h),n&&(t.minW&&(A.minW=t.minW),t.minH&&(A.minH=t.minH),t.maxW&&(A.maxW=t.maxW),t.maxH&&(A.maxH=t.maxH)),A}static samePos(A,t){return A&&t&&A.x===t.x&&A.y===t.y&&(A.w||1)===(t.w||1)&&(A.h||1)===(t.h||1)}static sanitizeMinMax(A){A.minW||delete A.minW,A.minH||delete A.minH,A.maxW||delete A.maxW,A.maxH||delete A.maxH}static removeInternalAndSame(A,t){if(!(typeof A!="object"||typeof t!="object")&&!(Array.isArray(A)||Array.isArray(t)))for(let n in A){const r=A[n],a=t[n];n[0]==="_"||r===a?delete A[n]:r&&typeof r=="object"&&a!==void 0&&(Ne.removeInternalAndSame(r,a),Object.keys(r).length||delete A[n])}}static removeInternalForSave(A,t=!0){for(let n in A)(n[0]==="_"||A[n]===null||A[n]===void 0)&&delete A[n];delete A.grid,t&&delete A.el,A.autoPosition||delete A.autoPosition,A.noResize||delete A.noResize,A.noMove||delete A.noMove,A.locked||delete A.locked,(A.w===1||A.w===A.minW)&&delete A.w,(A.h===1||A.h===A.minH)&&delete A.h}static throttle(A,t){let n=!1;return(...r)=>{n||(n=!0,setTimeout(()=>{A(...r),n=!1},t))}}static removePositioningStyles(A){const t=A.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(A){if(!A)return document.scrollingElement||document.documentElement;const t=getComputedStyle(A);return/(auto|scroll)/.test(t.overflow+t.overflowY)?A:Ne.getScrollElement(A.parentElement)}static updateScrollPosition(A,t,n){const r=Ne.getScrollElement(A);if(!r)return;const a=A.getBoundingClientRect(),u=r.getBoundingClientRect(),d=window.innerHeight||document.documentElement.clientHeight,g=a.bottom-Math.min(u.bottom,d),h=a.top-Math.max(u.top,0),B=r.scrollTop;h<0&&n<0?A.offsetHeight>u.height?r.scrollTop+=n:r.scrollTop+=Math.abs(h)>Math.abs(n)?n:h:g>0&&n>0&&(A.offsetHeight>u.height?r.scrollTop+=n:r.scrollTop+=g>n?n:g),t.top+=r.scrollTop-B}static updateScrollResize(A,t,n){const r=Ne.getScrollElement(t),a=r.clientHeight,u=r===Ne.getScrollElement()?0:r.getBoundingClientRect().top,d=A.clientY-u,g=d<n,h=d>a-n;g?r.scrollBy({behavior:"smooth",top:d-n}):h&&r.scrollBy({behavior:"smooth",top:n-(a-d)})}static clone(A){return A==null||typeof A!="object"?A:A instanceof Array?[...A]:{...A}}static cloneDeep(A){const t=["parentGrid","el","grid","subGrid","engine"],n=Ne.clone(A);for(const r in n)n.hasOwnProperty(r)&&typeof n[r]=="object"&&r.substring(0,2)!=="__"&&!t.find(a=>a===r)&&(n[r]=Ne.cloneDeep(A[r]));return n}static cloneNode(A){const t=A.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(A,t){let n;typeof t=="string"?n=Ne.getElement(t):n=t,n&&n.appendChild(A)}static addElStyles(A,t){if(t instanceof Object)for(const n in t)t.hasOwnProperty(n)&&(Array.isArray(t[n])?t[n].forEach(r=>{A.style[n]=r}):A.style[n]=t[n])}static initEvent(A,t){const n={type:t.type},r={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:A.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(a=>n[a]=A[a]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(a=>n[a]=A[a]),{...n,...r}}static simulateMouseEvent(A,t,n){const r=A,a=new MouseEvent(t,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:A.screenX,screenY:A.screenY,clientX:A.clientX,clientY:A.clientY,ctrlKey:r.ctrlKey??!1,altKey:r.altKey??!1,shiftKey:r.shiftKey??!1,metaKey:r.metaKey??!1,button:0,relatedTarget:A.target});(n||A.target).dispatchEvent(a)}static getValuesFromTransformedElement(A){const t=document.createElement("div");Ne.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),A.appendChild(t);const n=t.getBoundingClientRect();return A.removeChild(t),t.remove(),{xScale:1/n.width,yScale:1/n.height,xOffset:n.left,yOffset:n.top}}static swap(A,t,n){if(!A)return;const r=A[t];A[t]=A[n],A[n]=r}static canBeRotated(A){return!(!A||A.w===A.h||A.locked||A.noResize||A.grid?.opts.disableResize||A.minW&&A.minW===A.maxW||A.minH&&A.minH===A.maxH)}},Hi=class Fn{constructor(A={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=A.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=A.maxRow,this._float=A.float,this.nodes=A.nodes||[],this.onChange=A.onChange}batchUpdate(A=!0,t=!0){return!!this.batchMode===A?this:(this.batchMode=A,A?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,t&&this._packNodes(),this._notify()),this)}_useEntireRowArea(A,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!A._moving||A._skipDown||t.y<=A.y)}_fixCollisions(A,t=A,n,r={}){if(this.sortNodes(-1),n=n||this.collide(A,t),!n)return!1;if(A._moving&&!r.nested&&!this.float&&this.swap(A,n))return!0;let a=t;!this._loading&&this._useEntireRowArea(A,t)&&(a={x:0,w:this.column,y:t.y,h:t.h},n=this.collide(A,a,r.skip));let u=!1;const d={nested:!0,pack:!1};let g=0;for(;n=n||this.collide(A,a,r.skip);){if(g++>this.nodes.length*2)throw new Error("Infinite collide check");let h;if(n.locked||this._loading||A._moving&&!A._skipDown&&t.y>A.y&&!this.float&&(!this.collide(n,{...n,y:A.y},A)||!this.collide(n,{...n,y:t.y-n.h},A))){A._skipDown=A._skipDown||t.y>A.y;const B={...t,y:n.y+n.h,...d};h=this._loading&&AA.samePos(A,B)?!0:this.moveNode(A,B),(n.locked||this._loading)&&h?AA.copyPos(t,A):!n.locked&&h&&r.pack&&(this._packNodes(),t.y=n.y+n.h,AA.copyPos(A,t)),u=u||h}else h=this.moveNode(n,{...n,y:t.y+t.h,skip:A,...d});if(!h)return u;n=void 0}return u}collide(A,t=A,n){const r=A._id,a=n?._id;return this.nodes.find(u=>u._id!==r&&u._id!==a&&AA.isIntercepted(u,t))}collideAll(A,t=A,n){const r=A._id,a=n?._id;return this.nodes.filter(u=>u._id!==r&&u._id!==a&&AA.isIntercepted(u,t))}directionCollideCoverage(A,t,n){if(!t.rect||!A._rect)return;const r=A._rect,a={...t.rect};a.y>r.y?(a.h+=a.y-r.y,a.y=r.y):a.h+=r.y-a.y,a.x>r.x?(a.w+=a.x-r.x,a.x=r.x):a.w+=r.x-a.x;let u,d=.5;for(let g of n){if(g.locked||!g._rect)break;const h=g._rect;let B=Number.MAX_VALUE,w=Number.MAX_VALUE;r.y<h.y?B=(a.y+a.h-h.y)/h.h:r.y+r.h>h.y+h.h&&(B=(h.y+h.h-a.y)/h.h),r.x<h.x?w=(a.x+a.w-h.x)/h.w:r.x+r.w>h.x+h.w&&(w=(h.x+h.w-a.x)/h.w);const m=Math.min(w,B);m>d&&(d=m,u=g)}return t.collide=u,u}cacheRects(A,t,n,r,a,u){return this.nodes.forEach(d=>d._rect={y:d.y*t+n,x:d.x*A+u,w:d.w*A-u-r,h:d.h*t-n-a}),this}swap(A,t){if(!t||t.locked||!A||A.locked)return!1;function n(){const a=t.x,u=t.y;return t.x=A.x,t.y=A.y,A.h!=t.h?(A.x=a,A.y=t.y+t.h):A.w!=t.w?(A.x=t.x+t.w,A.y=u):(A.x=a,A.y=u),A._dirty=t._dirty=!0,!0}let r;if(A.w===t.w&&A.h===t.h&&(A.x===t.x||A.y===t.y)&&(r=AA.isTouching(A,t)))return n();if(r!==!1){if(A.w===t.w&&A.x===t.x&&(r||(r=AA.isTouching(A,t)))){if(t.y<A.y){const a=A;A=t,t=a}return n()}if(r!==!1){if(A.h===t.h&&A.y===t.y&&(r||(r=AA.isTouching(A,t)))){if(t.x<A.x){const a=A;A=t,t=a}return n()}return!1}}}isAreaEmpty(A,t,n,r){const a={x:A||0,y:t||0,w:n||1,h:r||1};return!this.collide(a)}compact(A="compact",t=!0){if(this.nodes.length===0)return this;t&&this.sortNodes();const n=this.batchMode;n||this.batchUpdate();const r=this._inColumnResize;r||(this._inColumnResize=!0);const a=this.nodes;return this.nodes=[],a.forEach((u,d,g)=>{let h;u.locked||(u.autoPosition=!0,A==="list"&&d&&(h=g[d-1])),this.addNode(u,!1,h)}),r||delete this._inColumnResize,n||this.batchUpdate(!1),this}set float(A){this._float!==A&&(this._float=A||!1,A||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(A=1){return this.nodes=AA.sort(this.nodes,A),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(A=>{if(A._updating||A._orig===void 0||A.y===A._orig.y)return;let t=A.y;for(;t>A._orig.y;)--t,this.collide(A,{x:A.x,y:t,w:A.w,h:A.h})||(A._dirty=!0,A.y=t)}):this.nodes.forEach((A,t)=>{if(!A.locked)for(;A.y>0;){const n=t===0?0:A.y-1;if(!(t===0||!this.collide(A,{x:A.x,y:n,w:A.w,h:A.h})))break;A._dirty=A.y!==n,A.y=n}}),this)}prepareNode(A,t){A._id=A._id??Fn._idSeq++;const n=A.id;if(n){let a=1;for(;this.nodes.find(u=>u.id===A.id&&u!==A);)A.id=n+"_"+a++}(A.x===void 0||A.y===void 0||A.x===null||A.y===null)&&(A.autoPosition=!0);const r={x:0,y:0,w:1,h:1};return AA.defaults(A,r),A.autoPosition||delete A.autoPosition,A.noResize||delete A.noResize,A.noMove||delete A.noMove,AA.sanitizeMinMax(A),typeof A.x=="string"&&(A.x=Number(A.x)),typeof A.y=="string"&&(A.y=Number(A.y)),typeof A.w=="string"&&(A.w=Number(A.w)),typeof A.h=="string"&&(A.h=Number(A.h)),isNaN(A.x)&&(A.x=r.x,A.autoPosition=!0),isNaN(A.y)&&(A.y=r.y,A.autoPosition=!0),isNaN(A.w)&&(A.w=r.w),isNaN(A.h)&&(A.h=r.h),this.nodeBoundFix(A,t),A}nodeBoundFix(A,t){const n=A._orig||AA.copyPos({},A);if(A.maxW&&(A.w=Math.min(A.w||1,A.maxW)),A.maxH&&(A.h=Math.min(A.h||1,A.maxH)),A.minW&&(A.w=Math.max(A.w||1,A.minW)),A.minH&&(A.h=Math.max(A.h||1,A.minH)),(A.x||0)+(A.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&A._id!=null&&this.findCacheLayout(A,this.defaultColumn)===-1){const r={...A};r.autoPosition||r.x===void 0?(delete r.x,delete r.y):r.x=Math.min(this.defaultColumn-1,r.x),r.w=Math.min(this.defaultColumn,r.w||1),this.cacheOneLayout(r,this.defaultColumn)}return A.w>this.column?A.w=this.column:A.w<1&&(A.w=1),this.maxRow&&A.h>this.maxRow?A.h=this.maxRow:A.h<1&&(A.h=1),A.x<0&&(A.x=0),A.y<0&&(A.y=0),A.x+A.w>this.column&&(t?A.w=this.column-A.x:A.x=this.column-A.w),this.maxRow&&A.y+A.h>this.maxRow&&(t?A.h=this.maxRow-A.y:A.y=this.maxRow-A.h),AA.samePos(A,n)||(A._dirty=!0),this}getDirtyNodes(A){return A?this.nodes.filter(t=>t._dirty&&!AA.samePos(t,t._orig)):this.nodes.filter(t=>t._dirty)}_notify(A){if(this.batchMode||!this.onChange)return this;const t=(A||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(A=>{delete A._dirty,delete A._lastTried}),this)}saveInitial(){return this.nodes.forEach(A=>{A._orig=AA.copyPos({},A),delete A._dirty}),this._hasLocked=this.nodes.some(A=>A.locked),this}restoreInitial(){return this.nodes.forEach(A=>{!A._orig||AA.samePos(A,A._orig)||(AA.copyPos(A,A._orig),A._dirty=!0)}),this._notify(),this}findEmptyPosition(A,t=this.nodes,n=this.column,r){const a=r?r.y*n+(r.x+r.w):0;let u=!1;for(let d=a;!u;++d){const g=d%n,h=Math.floor(d/n);if(g+A.w>n)continue;const B={x:g,y:h,w:A.w,h:A.h};t.find(w=>AA.isIntercepted(B,w))||((A.x!==g||A.y!==h)&&(A._dirty=!0),A.x=g,A.y=h,delete A.autoPosition,u=!0)}return u}addNode(A,t=!1,n){const r=this.nodes.find(u=>u._id===A._id);if(r)return r;this._inColumnResize?this.nodeBoundFix(A):this.prepareNode(A),delete A._temporaryRemoved,delete A._removeDOM;let a;return A.autoPosition&&this.findEmptyPosition(A,this.nodes,this.column,n)&&(delete A.autoPosition,a=!0),this.nodes.push(A),t&&this.addedNodes.push(A),a||this._fixCollisions(A),this.batchMode||this._packNodes()._notify(),A}removeNode(A,t=!0,n=!1){return this.nodes.find(r=>r._id===A._id)?(n&&this.removedNodes.push(A),t&&(A._removeDOM=!0),this.nodes=this.nodes.filter(r=>r._id!==A._id),A._isAboutToRemove||this._packNodes(),this._notify([A]),this):this}removeAll(A=!0,t=!0){if(delete this._layouts,!this.nodes.length)return this;A&&this.nodes.forEach(r=>r._removeDOM=!0);const n=this.nodes;return this.removedNodes=t?n:[],this.nodes=[],this._notify(n)}moveNodeCheck(A,t){if(!this.changedPosConstrain(A,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(A,t);let n;const r=new Fn({column:this.column,float:this.float,nodes:this.nodes.map(u=>u._id===A._id?(n={...u},n):{...u})});if(!n)return!1;const a=r.moveNode(n,t)&&r.getRow()<=Math.max(this.getRow(),this.maxRow);if(!a&&!t.resizing&&t.collide){const u=t.collide.el.gridstackNode;if(this.swap(A,u))return this._notify(),!0}return a?(r.nodes.filter(u=>u._dirty).forEach(u=>{const d=this.nodes.find(g=>g._id===u._id);d&&(AA.copyPos(d,u),d._dirty=!0)}),this._notify(),!0):!1}willItFit(A){if(delete A._willFitPos,!this.maxRow)return!0;const t=new Fn({column:this.column,float:this.float,nodes:this.nodes.map(r=>({...r}))}),n={...A};return this.cleanupNode(n),delete n.el,delete n._id,delete n.content,delete n.grid,t.addNode(n),t.getRow()<=this.maxRow?(A._willFitPos=AA.copyPos({},n),!0):!1}changedPosConstrain(A,t){return t.w=t.w||A.w,t.h=t.h||A.h,A.x!==t.x||A.y!==t.y?!0:(A.maxW&&(t.w=Math.min(t.w,A.maxW)),A.maxH&&(t.h=Math.min(t.h,A.maxH)),A.minW&&(t.w=Math.max(t.w,A.minW)),A.minH&&(t.h=Math.max(t.h,A.minH)),A.w!==t.w||A.h!==t.h)}moveNode(A,t){if(!A||!t)return!1;let n;t.pack===void 0&&!this.batchMode&&(n=t.pack=!0),typeof t.x!="number"&&(t.x=A.x),typeof t.y!="number"&&(t.y=A.y),typeof t.w!="number"&&(t.w=A.w),typeof t.h!="number"&&(t.h=A.h);const r=A.w!==t.w||A.h!==t.h,a=AA.copyPos({},A,!0);if(AA.copyPos(a,t),this.nodeBoundFix(a,r),AA.copyPos(t,a),!t.forceCollide&&AA.samePos(A,t))return!1;const u=AA.copyPos({},A),d=this.collideAll(A,a,t.skip);let g=!0;if(d.length){const h=A._moving&&!t.nested;let B=h?this.directionCollideCoverage(A,t,d):d[0];if(h&&B&&A.grid?.opts?.subGridDynamic&&!A.grid._isTemp){const w=AA.areaIntercept(t.rect,B._rect),m=AA.area(t.rect),v=AA.area(B._rect);w/(m<v?m:v)>.8&&(B.grid.makeSubGrid(B.el,void 0,A),B=void 0)}B?g=!this._fixCollisions(A,a,B,t):(g=!1,n&&delete t.pack)}return g&&!AA.samePos(A,a)&&(A._dirty=!0,AA.copyPos(A,a)),t.pack&&this._packNodes()._notify(),!AA.samePos(A,u)}getRow(){return this.nodes.reduce((A,t)=>Math.max(A,t.y+t.h),0)}beginUpdate(A){return A._updating||(A._updating=!0,delete A._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const A=this.nodes.find(t=>t._updating);return A&&(delete A._updating,delete A._skipDown),this}save(A=!0,t,n){const r=this._layouts?.length||0;let a;r&&(n?n!==this.column&&(a=this._layouts[n]):this.column!==r-1&&(a=this._layouts[r-1]));const u=[];return this.sortNodes(),this.nodes.forEach(d=>{const g=a?.find(B=>B._id===d._id),h={...d,...g||{}};AA.removeInternalForSave(h,!A),t&&t(d,h),u.push(h)}),u}layoutsNodesChange(A){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((t,n)=>{if(!t||n===this.column)return this;if(n<this.column)this._layouts[n]=void 0;else{const r=n/this.column;A.forEach(a=>{if(!a._orig)return;const u=t.find(d=>d._id===a._id);u&&(u.y>=0&&a.y!==a._orig.y&&(u.y+=a.y-a._orig.y,u.y<0&&(u.y=0)),a.x!==a._orig.x&&(u.x=Math.round(a.x*r),u.x<0&&(u.x=0)),a.w!==a._orig.w&&(u.w=Math.round(a.w*r),u.w<1&&(u.w=1)))})}}),this)}columnChanged(A,t,n="moveScale"){if(!this.nodes.length||!t||A===t)return this;const r=n==="compact"||n==="list";r&&this.sortNodes(1),t<A&&this.cacheLayout(this.nodes,A),this.batchUpdate();let a=[],u=r?this.nodes:AA.sort(this.nodes,-1);if(t>A&&this._layouts){const d=this._layouts[t]||[],g=this._layouts.length-1;!d.length&&A!==g&&this._layouts[g]?.length&&(A=g,this._layouts[g].forEach(h=>{const B=u.find(w=>w._id===h._id);B&&(!r&&!h.autoPosition&&(B.x=h.x??B.x,B.y=h.y??B.y),B.w=h.w??B.w,(h.x==null||h.y===void 0)&&(B.autoPosition=!0))})),d.forEach(h=>{const B=u.findIndex(w=>w._id===h._id);if(B!==-1){const w=u[B];if(r){w.w=h.w;return}(h.autoPosition||isNaN(h.x)||isNaN(h.y))&&this.findEmptyPosition(h,a),h.autoPosition||(w.x=h.x??w.x,w.y=h.y??w.y,w.w=h.w??w.w,a.push(w)),u.splice(B,1)}})}if(r)this.compact(n,!1);else{if(u.length)if(typeof n=="function")n(t,A,a,u);else{const d=r||n==="none"?1:t/A,g=n==="move"||n==="moveScale",h=n==="scale"||n==="moveScale";u.forEach(B=>{B.x=t===1?0:g?Math.round(B.x*d):Math.min(B.x,t-1),B.w=t===1||A===1?1:h?Math.round(B.w*d)||1:Math.min(B.w,t),a.push(B)}),u=[]}a=AA.sort(a,-1),this._inColumnResize=!0,this.nodes=[],a.forEach(d=>{this.addNode(d,!1),delete d._orig})}return this.nodes.forEach(d=>delete d._orig),this.batchUpdate(!1,!r),delete this._inColumnResize,this}cacheLayout(A,t,n=!1){const r=[];return A.forEach((a,u)=>{a._id===void 0&&(a._id=(a.id?this.nodes.find(d=>d.id===a.id):void 0)?._id??Fn._idSeq++),r[u]={x:a.x,y:a.y,w:a.w,_id:a._id}}),this._layouts=n?[]:this._layouts||[],this._layouts[t]=r,this}cacheOneLayout(A,t){A._id=A._id??Fn._idSeq++;const n={x:A.x,y:A.y,w:A.w,_id:A._id};(A.autoPosition||A.x===void 0)&&(delete n.x,delete n.y,A.autoPosition&&(n.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];const r=this.findCacheLayout(A,t);return r===-1?this._layouts[t].push(n):this._layouts[t][r]=n,this}findCacheLayout(A,t){return this._layouts?.[t]?.findIndex(n=>n._id===A._id)??-1}removeNodeFromLayoutCache(A){if(this._layouts)for(let t=0;t<this._layouts.length;t++){const n=this.findCacheLayout(A,t);n!==-1&&this._layouts[t].splice(n,1)}}cleanupNode(A){for(const t in A)t[0]==="_"&&t!=="_id"&&delete A[t];return this}};Hi._idSeq=0;var Ue={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"},LA=class{},Me=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),be=class{};function $r(e,A){e.touches.length>1||(e.cancelable&&e.preventDefault(),AA.simulateMouseEvent(e.changedTouches[0],A))}function pl(e,A){e.cancelable&&e.preventDefault(),AA.simulateMouseEvent(e,A)}function Yr(e){be.touchHandled||(be.touchHandled=!0,$r(e,"mousedown"))}function Wr(e){be.touchHandled&&$r(e,"mousemove")}function Jr(e){if(!be.touchHandled)return;be.pointerLeaveTimeout&&(window.clearTimeout(be.pointerLeaveTimeout),delete be.pointerLeaveTimeout);const A=!!LA.dragElement;$r(e,"mouseup"),A||$r(e,"click"),be.touchHandled=!1}function Zr(e){e.pointerType!=="mouse"&&e.target.releasePointerCapture(e.pointerId)}function ml(e){LA.dragElement&&e.pointerType!=="mouse"&&pl(e,"mouseenter")}function wl(e){LA.dragElement&&e.pointerType!=="mouse"&&(be.pointerLeaveTimeout=window.setTimeout(()=>{delete be.pointerLeaveTimeout,pl(e,"mouseleave")},10))}var Cl=class Fu{constructor(A,t,n){this.host=A,this.dir=t,this.option=n,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){if(this.option.element)try{this.el=this.option.element instanceof HTMLElement?this.option.element:this.host.querySelector(this.option.element)}catch(A){this.option.element=void 0,console.error("Query for resizeable handle failed, falling back",A)}return this.el||(this.el=document.createElement("div"),this.host.appendChild(this.el)),this.el.classList.add("ui-resizable-handle"),this.el.classList.add(`${Fu.prefix}${this.dir}`),this.el.style.zIndex="100",this.el.style.userSelect="none",this.el.addEventListener("mousedown",this._mouseDown),Me&&(this.el.addEventListener("touchstart",Yr),this.el.addEventListener("pointerdown",Zr)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),Me&&(this.el.removeEventListener("touchstart",Yr),this.el.removeEventListener("pointerdown",Zr)),this.option.element||this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(A){this.mouseDownEvent=A,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),Me&&(this.el.addEventListener("touchmove",Wr),this.el.addEventListener("touchend",Jr)),A.stopPropagation(),A.preventDefault()}_mouseMove(A){const t=this.mouseDownEvent;this.moving?this._triggerEvent("move",A):Math.abs(A.x-t.x)+Math.abs(A.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",A),document.addEventListener("keydown",this._keyEvent)),A.stopPropagation()}_mouseUp(A){this.moving&&(this._triggerEvent("stop",A),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),Me&&(this.el.removeEventListener("touchmove",Wr),this.el.removeEventListener("touchend",Jr)),delete this.moving,delete this.mouseDownEvent,A.stopPropagation(),A.preventDefault()}_keyEvent(A){A.key==="Escape"&&(this.host.gridstackNode?.grid?.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(A,t){return this.option[A]&&this.option[A](t),this}};Cl.prefix="ui-resizable-";var Ii=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,A){this._eventRegister[e]=A}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,A){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](A)}},vl=class gs extends Ii{constructor(A,t={}){super(),this.el=A,this.option=t,this.rectScale={x:1,y:1},this._ui=()=>{const n=this.el.parentElement.getBoundingClientRect(),r={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=this.temporalRect||r;return{position:{left:(a.left-n.left)*this.rectScale.x,top:(a.top-n.top)*this.rectScale.y},size:{width:a.width*this.rectScale.x,height:a.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(A,t){super.on(A,t)}off(A){super.off(A)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(A){const t=A.handles&&A.handles!==this.option.handles,n=A.autoHide&&A.autoHide!==this.option.autoHide;return Object.keys(A).forEach(r=>this.option[r]=A[r]),t&&(this._removeHandlers(),this._setupHandlers()),n&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(A){return A?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),LA.overResizeElement===this&&delete LA.overResizeElement),this}_mouseOver(A){LA.overResizeElement||LA.dragElement||(LA.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(A){LA.overResizeElement===this&&(delete LA.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(A=>A.trim()).map(A=>new Cl(this.el,A,{element:this.option.element,start:t=>this._resizeStart(t),stop:t=>this._resizeStop(t),move:t=>this._resizing(t,A)})),this}_resizeStart(A){this.sizeToContent=AA.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=AA.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=A,this._setupHelper(),this._applyChange();const t=AA.initEvent(A,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(A,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(A,t),this._applyChange();const n=AA.initEvent(A,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(n,this._ui()),this.triggerEvent("resize",n),this}_resizeStop(A){const t=AA.initEvent(A,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=gs._originStyleProp.map(n=>this.el.style[n]),this.parentOriginStylePosition=this.el.parentElement.style.position;const A=this.el.parentElement,t=AA.getValuesFromTransformedElement(A);return this.rectScale={x:t.xScale,y:t.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return gs._originStyleProp.forEach((A,t)=>{this.el.style[A]=this.elOriginStyleVal[t]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(A,t){const n=this.startEvent,r={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=A.clientX-n.clientX,u=this.sizeToContent?0:A.clientY-n.clientY;let d,g;t.indexOf("e")>-1?r.width+=a:t.indexOf("w")>-1&&(r.width-=a,r.left+=a,d=!0),t.indexOf("s")>-1?r.height+=u:t.indexOf("n")>-1&&(r.height-=u,r.top+=u,g=!0);const h=this._constrainSize(r.width,r.height,d,g);return Math.round(r.width)!==Math.round(h.width)&&(t.indexOf("w")>-1&&(r.left+=r.width-h.width),r.width=h.width),Math.round(r.height)!==Math.round(h.height)&&(t.indexOf("n")>-1&&(r.top+=r.height-h.height),r.height=h.height),r}_constrainSize(A,t,n,r){const a=this.option,u=(n?a.maxWidthMoveLeft:a.maxWidth)||Number.MAX_SAFE_INTEGER,d=a.minWidth/this.rectScale.x||A,g=(r?a.maxHeightMoveUp:a.maxHeight)||Number.MAX_SAFE_INTEGER,h=a.minHeight/this.rectScale.y||t;return{width:Math.min(u,Math.max(d,A)),height:Math.min(g,Math.max(h,t))}}_applyChange(){let A={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const{left:t,top:n}=this.el.parentElement.getBoundingClientRect();A={left:t,top:n,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(t=>{const n=this.temporalRect[t],r=t==="width"||t==="left"?this.rectScale.x:t==="height"||t==="top"?this.rectScale.y:1;this.el.style[t]=(n-A[t])*r+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(A=>A.destroy()),delete this.handlers,this}};vl._originStyleProp=["width","height","position","left","top","opacity","zIndex"];var Rm='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',yl=class hs extends Ii{constructor(A,t={}){super(),this.el=A,this.option=t,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const n=t?.handle?.substring(1),r=A.gridstackNode;this.dragEls=!n||A.classList.contains(n)?[A]:r?.subGrid?[A.querySelector(t.handle)||A]:Array.from(A.querySelectorAll(t.handle)),this.dragEls.length===0&&(this.dragEls=[A]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(A,t){super.on(A,t)}off(A){super.off(A)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(A=>{A.addEventListener("mousedown",this._mouseDown),Me&&(A.addEventListener("touchstart",Yr),A.addEventListener("pointerdown",Zr))}),this.el.classList.remove("ui-draggable-disabled"))}disable(A=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),Me&&(t.removeEventListener("touchstart",Yr),t.removeEventListener("pointerdown",Zr))}),A||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(A){return Object.keys(A).forEach(t=>this.option[t]=A[t]),this}_mouseDown(A){if(be.touchHandled&&A.isTrusted&&(be.touchHandled=!1),!LA.mouseHandled)return A.button!==0||!this.dragEls.find(t=>t===A.target)&&A.target.closest(Rm)||this.option.cancel&&A.target.closest(this.option.cancel)||(this.mouseDownEvent=A,delete this.dragging,delete LA.dragElement,delete LA.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),Me&&(A.currentTarget.addEventListener("touchmove",Wr),A.currentTarget.addEventListener("touchend",Jr)),A.preventDefault(),document.activeElement&&document.activeElement.blur(),LA.mouseHandled=!0),!0}_callDrag(A){if(!this.dragging)return;const t=AA.initEvent(A,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(A){const t=this.mouseDownEvent;if(this.lastDrag=A,this.dragging)if(this._dragFollow(A),LA.pauseDrag){const n=Number.isInteger(LA.pauseDrag)?LA.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(A),n)}else this._callDrag(A);else if(Math.abs(A.x-t.x)+Math.abs(A.y-t.y)>3){this.dragging=!0,LA.dragElement=this;const n=this.el.gridstackNode?.grid;n?LA.dropElement=n.el.ddElement.ddDroppable:delete LA.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=AA.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(A,this.el,this.helperContainment),this._setupHelperStyle(A);const r=AA.initEvent(A,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(r,this.ui()),this.triggerEvent("dragstart",r),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(A){if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),Me&&A.currentTarget&&(A.currentTarget.removeEventListener("touchmove",Wr,!0),A.currentTarget.removeEventListener("touchend",Jr,!0)),this.dragging){delete this.dragging,delete this.el.gridstackNode?._origRotate,document.removeEventListener("keydown",this._keyEvent),LA.dropElement?.el===this.el.parentElement&&delete LA.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const t=AA.initEvent(A,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(t),this.triggerEvent("dragstop",t),LA.dropElement&&LA.dropElement.drop(A)}delete this.helper,delete this.mouseDownEvent,delete LA.dragElement,delete LA.dropElement,delete LA.mouseHandled,A.preventDefault()}_keyEvent(A){const t=this.el.gridstackNode,n=t?.grid||LA.dropElement?.el?.gridstack;if(A.key==="Escape")t&&t._origRotate&&(t._orig=t._origRotate,delete t._origRotate),n?.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(t&&n&&(A.key==="r"||A.key==="R")){if(!AA.canBeRotated(t))return;t._origRotate=t._origRotate||{...t._orig},delete t._moving,n.setAnimation(!1).rotate(t.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),t._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,t.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",AA.swap(t._orig,"w","h"),delete t._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let A=this.el;return typeof this.option.helper=="function"?A=this.option.helper(this.el):this.option.helper==="clone"&&(A=AA.cloneNode(this.el)),A.parentElement||AA.appendTo(A,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=hs.originStyleProp.map(t=>this.el.style[t]),A}_setupHelperStyle(A){this.helper.classList.add("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");const t=this.helper.style;return t.pointerEvents="none",t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(A),t.transition="none",setTimeout(()=>{this.helper&&(t.transition=null)},0),this}_removeHelperStyle(){if(this.helper.classList.remove("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.remove("grid-stack-dragging"),!this.helper?.gridstackNode?._isAboutToRemove&&this.dragElementOriginStyle){const A=this.helper,t=this.dragElementOriginStyle.transition||null;A.style.transition=this.dragElementOriginStyle.transition="none",hs.originStyleProp.forEach(n=>A.style[n]=this.dragElementOriginStyle[n]||null),setTimeout(()=>A.style.transition=t,50)}return delete this.dragElementOriginStyle,this}_dragFollow(A){const t={left:0,top:0},n=this.helper.style,r=this.dragOffset;n.left=(A.clientX+r.offsetLeft-t.left)*this.dragTransform.xScale+"px",n.top=(A.clientY+r.offsetTop-t.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(A,t,n){let r=0,a=0;n&&(r=this.dragTransform.xOffset,a=this.dragTransform.yOffset);const u=t.getBoundingClientRect();return{left:u.left,top:u.top,offsetLeft:-A.clientX+u.left-r,offsetTop:-A.clientY+u.top-a,width:u.width*this.dragTransform.xScale,height:u.height*this.dragTransform.yScale}}ui(){const A=this.el.parentElement.getBoundingClientRect(),t=this.helper.getBoundingClientRect();return{position:{top:(t.top-A.top)*this.dragTransform.yScale,left:(t.left-A.left)*this.dragTransform.xScale}}}};yl.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];var Vm=class extends Ii{constructor(e,A={}){super(),this.el=e,this.option=A,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,A){super.on(e,A)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),Me&&(this.el.addEventListener("pointerenter",ml),this.el.addEventListener("pointerleave",wl)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),Me&&(this.el.removeEventListener("pointerenter",ml),this.el.removeEventListener("pointerleave",wl)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(A=>this.option[A]=e[A]),this._setupAccept(),this}_mouseEnter(e){if(!LA.dragElement||be.touchHandled&&e.isTrusted||!this._canDrop(LA.dragElement.el))return;e.preventDefault(),e.stopPropagation(),LA.dropElement&&LA.dropElement!==this&&LA.dropElement._mouseLeave(e,!0),LA.dropElement=this;const A=AA.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(A,this._ui(LA.dragElement)),this.triggerEvent("dropover",A),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,A=!1){if(!LA.dragElement||LA.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const t=AA.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(t,this._ui(LA.dragElement)),this.triggerEvent("dropout",t),LA.dropElement===this&&(delete LA.dropElement,!A)){let n,r=this.el.parentElement;for(;!n&&r;)n=r.ddElement?.ddDroppable,r=r.parentElement;n&&n._mouseEnter(e)}}drop(e){e.preventDefault();const A=AA.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(A,this._ui(LA.dragElement)),this.triggerEvent("drop",A)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}},Pm=class Uu{static init(A){return A.ddElement||(A.ddElement=new Uu(A)),A.ddElement}constructor(A){this.el=A}on(A,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(A)>-1?this.ddDraggable.on(A,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(A)>-1?this.ddDroppable.on(A,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(A)>-1&&this.ddResizable.on(A,t),this}off(A){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(A)>-1?this.ddDraggable.off(A):this.ddDroppable&&["drop","dropover","dropout"].indexOf(A)>-1?this.ddDroppable.off(A):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(A)>-1&&this.ddResizable.off(A),this}setupDraggable(A){return this.ddDraggable?this.ddDraggable.updateOption(A):this.ddDraggable=new yl(this.el,A),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(A){return this.ddResizable?this.ddResizable.updateOption(A):this.ddResizable=new vl(this.el,A),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(A){return this.ddDroppable?this.ddDroppable.updateOption(A):this.ddDroppable=new Vm(this.el,A),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}},Gm=class{resizable(e,A,t,n){return this._getDDElements(e,A).forEach(r=>{if(A==="disable"||A==="enable")r.ddResizable&&r.ddResizable[A]();else if(A==="destroy")r.ddResizable&&r.cleanResizable();else if(A==="option")r.setupResizable({[t]:n});else{const a=r.el.gridstackNode.grid;let u=r.el.getAttribute("gs-resize-handles")||a.opts.resizable.handles||"e,s,se";u==="all"&&(u="n,e,s,w,se,sw,ne,nw");const d=!a.opts.alwaysShowResizeHandle;r.setupResizable({...a.opts.resizable,handles:u,autoHide:d,start:A.start,stop:A.stop,resize:A.resize})}}),this}draggable(e,A,t,n){return this._getDDElements(e,A).forEach(r=>{if(A==="disable"||A==="enable")r.ddDraggable&&r.ddDraggable[A]();else if(A==="destroy")r.ddDraggable&&r.cleanDraggable();else if(A==="option")r.setupDraggable({[t]:n});else{const a=r.el.gridstackNode.grid;r.setupDraggable({...a.opts.draggable,start:A.start,stop:A.stop,drag:A.drag})}}),this}dragIn(e,A){return this._getDDElements(e).forEach(t=>t.setupDraggable(A)),this}droppable(e,A,t,n){return typeof A.accept=="function"&&!A._accept&&(A._accept=A.accept,A.accept=r=>A._accept(r)),this._getDDElements(e,A).forEach(r=>{A==="disable"||A==="enable"?r.ddDroppable&&r.ddDroppable[A]():A==="destroy"?r.ddDroppable&&r.cleanDroppable():A==="option"?r.setupDroppable({[t]:n}):r.setupDroppable(A)}),this}isDroppable(e){return!!(e?.ddElement?.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){return!!(e?.ddElement?.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){return!!(e?.ddElement?.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,A,t){return this._getDDElements(e).forEach(n=>n.on(A,r=>{t(r,LA.dragElement?LA.dragElement.el:r.target,LA.dragElement?LA.dragElement.helper:null)})),this}off(e,A){return this._getDDElements(e).forEach(t=>t.off(A)),this}_getDDElements(e,A){const t=e.gridstack||A!=="destroy"&&A!=="disable",n=AA.getElements(e);return n.length?n.map(r=>r.ddElement||(t?Pm.init(r):null)).filter(r=>r):[]}},we=new Gm,tn=class NA{static init(A={},t=".grid-stack"){if(typeof document>"u")return null;const n=NA.getGridElement(t);return n?(n.gridstack||(n.gridstack=new NA(n,AA.cloneDeep(A))),n.gridstack):(console.error(typeof t=="string"?'GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
|
|
27
27
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(A={},t=".grid-stack"){const n=[];return typeof document>"u"||(NA.getGridElements(t).forEach(r=>{r.gridstack||(r.gridstack=new NA(r,AA.cloneDeep(A))),n.push(r.gridstack)}),n.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
|
|
28
|
-
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),n}static addGrid(A,t={}){if(!A)return null;let n=A;if(n.gridstack){const r=n.gridstack;return t&&(r.opts={...r.opts,...t}),t.children!==void 0&&r.load(t.children),r}return(!A.classList.contains("grid-stack")||NA.addRemoveCB)&&(NA.addRemoveCB?n=NA.addRemoveCB(A,t,!0,!0):n=AA.createDiv(["grid-stack",t.class],A)),NA.init(t,n)}static registerEngine(A){NA.engineClass=A}get placeholder(){if(!this._placeholder){this._placeholder=AA.createDiv([this.opts.placeholderClass,Ue.itemClass,this.opts.itemClass]);const A=AA.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(A.textContent=this.opts.placeholderText)}return this._placeholder}constructor(A,t={}){this.el=A,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},A.gridstack=this,this.opts=t=t||{},A.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const n=AA.toNumber(A.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);const r=t.columnOpts;if(r){const g=r.breakpoints;!r.columnWidth&&!g?.length?delete t.columnOpts:(r.columnMax=r.columnMax||12,g?.length>1&&g.sort((h,B)=>(B.w||0)-(h.w||0)))}const a={...AA.cloneDeep(Ue),column:AA.toNumber(A.getAttribute("gs-column"))||Ue.column,minRow:n||AA.toNumber(A.getAttribute("gs-min-row"))||Ue.minRow,maxRow:n||AA.toNumber(A.getAttribute("gs-max-row"))||Ue.maxRow,staticGrid:AA.toBool(A.getAttribute("gs-static"))||Ue.staticGrid,sizeToContent:AA.toBool(A.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||Ue.draggable.handle},removableOptions:{accept:t.itemClass||Ue.removableOptions.accept,decline:Ue.removableOptions.decline}};A.getAttribute("gs-animate")&&(a.animate=AA.toBool(A.getAttribute("gs-animate"))),t=AA.defaults(t,a),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(t),t.rtl==="auto"&&(t.rtl=A.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const u=this.el.closest("."+Ue.itemClass)?.gridstackNode;if(u&&(u.subGrid=this,this.parentGridNode=u,this.el.classList.add("grid-stack-nested"),u.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial")this.cellHeight(void 0);else{typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==Ue.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit);const g=t.cellHeight;delete t.cellHeight,this.cellHeight(g)}t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=Me),this._setStaticClass();const d=t.engineClass||NA.engineClass||Hi;if(this.engine=new d({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:g=>{g.forEach(h=>{const B=h.el;B&&(h._removeDOM?(B&&B.remove(),delete h._removeDOM):this._writePosAttr(B,h))}),this._updateContainerHeight()}}),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(g=>this._prepareElement(g)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const g=t.children;delete t.children,g.length&&this.load(g)}this.setAnimation(),t.subGridDynamic&&!LA.pauseDrag&&(LA.pauseDrag=!0),t.draggable?.pause!==void 0&&(LA.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(A=this.opts){this.el.classList.add("gs-"+A.column),typeof A.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/A.column}%`)}addWidget(A){if(!A)return;if(typeof A=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(A.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(A);let t,n=A;if(n.grid=this,n.el?t=n.el:NA.addRemoveCB?t=NA.addRemoveCB(this.el,A,!0,!1):t=this.createWidgetDivs(n),!t)return;if(n=t.gridstackNode,n&&t.parentElement===this.el&&this.engine.nodes.find(a=>a._id===n._id))return t;const r=this._readAttr(t);return AA.defaults(A,r),this.engine.prepareNode(A),this.el.appendChild(t),this.makeWidget(t,A),t}createWidgetDivs(A){const t=AA.createDiv(["grid-stack-item",this.opts.itemClass]),n=AA.createDiv(["grid-stack-item-content"],t);return AA.lazyLoad(A)?A.visibleObservable||(A.visibleObservable=new IntersectionObserver(([r])=>{r.isIntersecting&&(A.visibleObservable?.disconnect(),delete A.visibleObservable,NA.renderCB(n,A),A.grid?.prepareDragDrop(A.el))}),window.setTimeout(()=>A.visibleObservable?.observe(t))):NA.renderCB(n,A),t}makeSubGrid(A,t,n,r=!0){let a=A.gridstackNode;if(a||(a=this.makeWidget(A).gridstackNode),a.subGrid?.el)return a.subGrid;let u,d=this;for(;d&&!u;)u=d.opts?.subGridOpts,d=d.parentGridNode?.grid;t=AA.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...u||{},...t||a.subGridOpts||{}}),a.subGridOpts=t;let g;t.column==="auto"&&(g=!0,t.column=Math.max(a.w||1,n?.w||1),delete t.columnOpts);let h=a.el.querySelector(".grid-stack-item-content"),B,w;if(r&&(this._removeDD(a.el),w={...a,x:0,y:0},AA.removeInternalForSave(w),delete w.subGridOpts,a.content&&(w.content=a.content,delete a.content),NA.addRemoveCB?B=NA.addRemoveCB(this.el,w,!0,!1):(B=AA.createDiv(["grid-stack-item"]),B.appendChild(h),h=AA.createDiv(["grid-stack-item-content"],a.el)),this.prepareDragDrop(a.el)),n){const v=g?t.column:a.w,y=a.h+n.h,I=a.el.style;I.transition="none",this.update(a.el,{w:v,h:y}),setTimeout(()=>I.transition=null)}const m=a.subGrid=NA.addGrid(h,t);return n?._moving&&(m._isTemp=!0),g&&(m._autoColumn=!0),r&&m.makeWidget(B,w),n&&(n._moving?window.setTimeout(()=>AA.simulateMouseEvent(n._event,"mouseenter",m.el),0):m.makeWidget(a.el,a)),this.resizeToContentCheck(!1,a),m}removeAsSubGrid(A){const t=this.parentGridNode?.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(n=>{n.x+=this.parentGridNode.x,n.y+=this.parentGridNode.y,t.makeWidget(n.el,n)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,A&&window.setTimeout(()=>AA.simulateMouseEvent(A._event,"mouseenter",t.el),0))}save(A=!0,t=!1,n=NA.saveCB,r){const a=this.engine.save(A,n,r);if(a.forEach(u=>{if(A&&u.el&&!u.subGrid&&!n)u.content=u.el.querySelector(".grid-stack-item-content")?.innerHTML,u.content||delete u.content;else if(!A&&!n&&delete u.content,u.subGrid?.el){const d=u.w||u.subGrid.getColumn(),g=u.subGrid.save(A,t,n,d);u.subGridOpts=t?g:{children:g},delete u.subGrid}delete u.el}),t){const u=AA.cloneDeep(this.opts);u.marginBottom===u.marginTop&&u.marginRight===u.marginLeft&&u.marginTop===u.marginRight&&(u.margin=u.marginTop,delete u.marginTop,delete u.marginRight,delete u.marginBottom,delete u.marginLeft),u.rtl===(this.el.style.direction==="rtl")&&(u.rtl="auto"),this._isAutoCellHeight&&(u.cellHeight="auto"),this._autoColumn&&(u.column="auto");const d=u._alwaysShowResizeHandle;return delete u._alwaysShowResizeHandle,d!==void 0?u.alwaysShowResizeHandle=d:delete u.alwaysShowResizeHandle,AA.removeInternalAndSame(u,Ue),u.children=a,u}return a}load(A,t=NA.addRemoveCB||!0){A=AA.cloneDeep(A);const n=this.getColumn();A.forEach(B=>{B.w=B.w||B.minW||1,B.h=B.h||B.minH||1}),A=AA.sort(A),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let r=0;A.forEach(B=>{r=Math.max(r,(B.x||0)+B.w)}),r>this.engine.defaultColumn&&(this.engine.defaultColumn=r),r>n&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=A,this.engine.columnChanged(r,n,this.responseLayout),A=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(A,r,!0));const a=NA.addRemoveCB;typeof t=="function"&&(NA.addRemoveCB=t);const u=[];this.batchUpdate();const d=!this.engine.nodes.length,g=d&&this.opts.animate;g&&this.setAnimation(!1),!d&&t&&[...this.engine.nodes].forEach(B=>{B.id&&(AA.find(A,B.id)||(NA.addRemoveCB&&NA.addRemoveCB(this.el,B,!1,!1),u.push(B),this.removeWidget(B.el,!0,!1)))}),this.engine._loading=!0;const h=[];return this.engine.nodes=this.engine.nodes.filter(B=>AA.find(A,B.id)?(h.push(B),!1):!0),A.forEach(B=>{const w=AA.find(h,B.id);if(w){if(AA.shouldSizeToContent(w)&&(B.h=w.h),this.engine.nodeBoundFix(B),(B.autoPosition||B.x===void 0||B.y===void 0)&&(B.w=B.w||w.w,B.h=B.h||w.h,this.engine.findEmptyPosition(B)),this.engine.nodes.push(w),AA.samePos(w,B)&&this.engine.nodes.length>1&&(this.moveNode(w,{...B,forceCollide:!0}),AA.copyPos(B,w)),this.update(w.el,B),B.subGridOpts?.children){const m=w.el.querySelector(".grid-stack");m&&m.gridstack&&m.gridstack.load(B.subGridOpts.children)}}else t&&this.addWidget(B)}),delete this.engine._loading,this.engine.removedNodes=u,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,a?NA.addRemoveCB=a:delete NA.addRemoveCB,g&&this.setAnimation(!0,!0),this}batchUpdate(A=!0){return this.engine.batchUpdate(A),A||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(A=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!A||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const r=AA.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/r)}const n=parseInt(this.el.getAttribute("gs-current-row"));return n?Math.round(this.el.getBoundingClientRect().height/n):this.opts.cellHeight}cellHeight(A){if(A!==void 0&&this._isAutoCellHeight!==(A==="auto")&&(this._isAutoCellHeight=A==="auto",this._updateResizeEvent()),(A==="initial"||A==="auto")&&(A=void 0),A===void 0){const n=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;A=this.cellWidth()+n}const t=AA.parseHeight(A);return this.opts.cellHeightUnit===t.unit&&this.opts.cellHeight===t.h?this:(this.opts.cellHeightUnit=t.unit,this.opts.cellHeight=t.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(A=!1){return A&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){const A=this.opts.columnOpts;if(!A||!A.columnWidth&&!A.breakpoints?.length)return!1;const t=this.getColumn();let n=t;const r=this._widthOrContainer(!0);if(A.columnWidth)n=Math.min(Math.round(r/A.columnWidth)||1,A.columnMax);else{n=A.columnMax;let a=0;for(;a<A.breakpoints.length&&r<=A.breakpoints[a].w;)n=A.breakpoints[a++].c||t}if(n!==t){const a=A.breakpoints?.find(u=>u.c===n);return this.column(n,a?.layout||A.layout),!0}return!1}compact(A="compact",t=!0){return this.engine.compact(A,t),this._triggerChangeEvent(),this}column(A,t="moveScale"){if(!A||A<1||this.opts.column===A)return this;const n=this.getColumn();return this.opts.column=A,this.engine?(this.engine.column=A,this.el.classList.remove("gs-"+n),this._updateColumnVar(),this.engine.columnChanged(n,A,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=t,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(A=>A.matches("."+this.opts.itemClass)&&!A.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(A=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),A?this.el.parentNode.removeChild(this.el):(this.removeAll(A),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(A){return this.opts.float!==A&&(this.opts.float=this.engine.float=A,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(A,t=!1){const n=this.el.getBoundingClientRect();let r;t?r={top:n.top+document.documentElement.scrollTop,left:n.left}:r={top:this.el.offsetTop,left:this.el.offsetLeft};const a=A.left-r.left,u=A.top-r.top,d=n.width/this.getColumn(),g=n.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(a/d),y:Math.floor(u/g)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(A,t,n,r){return this.engine.isAreaEmpty(A,t,n,r)}makeWidget(A,t){const n=NA.getElement(A);if(!n||n.gridstackNode)return n;n.parentElement||this.el.appendChild(n),this._prepareElement(n,!0,t);const r=n.gridstackNode;this._updateContainerHeight(),r.subGridOpts&&this.makeSubGrid(n,r.subGridOpts,void 0,!1);let a;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(a=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),a&&delete this._ignoreLayoutsNodeChange,n}on(A,t){return A.indexOf(" ")!==-1?(A.split(" ").forEach(n=>this.on(n,t)),this):(A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable"?(A==="enable"||A==="disable"?this._gsEventHandler[A]=n=>t(n):this._gsEventHandler[A]=n=>{n.detail&&t(n,n.detail)},this.el.addEventListener(A,this._gsEventHandler[A])):A==="drag"||A==="dragstart"||A==="dragstop"||A==="resizestart"||A==="resize"||A==="resizestop"||A==="dropped"||A==="resizecontent"?this._gsEventHandler[A]=t:console.error("GridStack.on("+A+") event not supported"),this)}off(A){return A.indexOf(" ")!==-1?(A.split(" ").forEach(t=>this.off(t)),this):((A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable")&&this._gsEventHandler[A]&&this.el.removeEventListener(A,this._gsEventHandler[A]),delete this._gsEventHandler[A],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(A=>this.off(A)),this}removeWidget(A,t=!0,n=!0){return A?(NA.getElements(A).forEach(r=>{if(r.parentElement&&r.parentElement!==this.el)return;let a=r.gridstackNode;a||(a=this.engine.nodes.find(u=>r===u.el)),a&&(t&&NA.addRemoveCB&&NA.addRemoveCB(this.el,a,!1,!1),delete r.gridstackNode,this._removeDD(r),this.engine.removeNode(a,t,n),t&&r.parentElement&&r.remove())}),n&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(A=!0,t=!0){return this.engine.nodes.forEach(n=>{A&&NA.addRemoveCB&&NA.addRemoveCB(this.el,n,!1,!1),delete n.el.gridstackNode,this.opts.staticGrid||this._removeDD(n.el)}),this.engine.removeAll(A,t),t&&this._triggerRemoveEvent(),this}setAnimation(A=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(A)}):A?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=A,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(A,t=!0,n=!0){return!!this.opts.staticGrid===A?this:(A?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(r=>{this.prepareDragDrop(r.el),r.subGrid&&n&&r.subGrid.setStatic(A,t,n)}),t&&this._setStaticClass(),this)}updateOptions(A){const t=this.opts;return A===t?this:(A.acceptWidgets!==void 0&&(t.acceptWidgets=A.acceptWidgets,this._setupAcceptWidget()),A.animate!==void 0&&this.setAnimation(A.animate),A.cellHeight&&this.cellHeight(A.cellHeight),A.class!==void 0&&A.class!==t.class&&(t.class&&this.el.classList.remove(t.class),A.class&&this.el.classList.add(A.class)),A.columnOpts?(this.opts.columnOpts=A.columnOpts,this.checkDynamicColumn()):A.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof A.column=="number"&&this.column(A.column),A.margin!==void 0&&this.margin(A.margin),A.staticGrid!==void 0&&this.setStatic(A.staticGrid),A.disableDrag!==void 0&&!A.staticGrid&&this.enableMove(!A.disableDrag),A.disableResize!==void 0&&!A.staticGrid&&this.enableResize(!A.disableResize),A.float!==void 0&&this.float(A.float),A.row!==void 0?(t.minRow=t.maxRow=t.row=A.row,this._updateContainerHeight()):(A.minRow!==void 0&&(t.minRow=A.minRow,this._updateContainerHeight()),A.maxRow!==void 0&&(t.maxRow=A.maxRow)),A.lazyLoad!==void 0&&(t.lazyLoad=A.lazyLoad),A.children?.length&&this.load(A.children),this)}update(A,t){return NA.getElements(A).forEach(n=>{const r=n?.gridstackNode;if(!r)return;const a={...AA.copyPos({},r),...AA.cloneDeep(t)};this.engine.nodeBoundFix(a),delete a.autoPosition;const u=["x","y","w","h"];let d;if(u.some(B=>a[B]!==void 0&&a[B]!==r[B])&&(d={},u.forEach(B=>{d[B]=a[B]!==void 0?a[B]:r[B],delete a[B]})),!d&&(a.minW||a.minH||a.maxW||a.maxH)&&(d={}),a.content!==void 0){const B=n.querySelector(".grid-stack-item-content");B&&B.textContent!==a.content&&(r.content=a.content,NA.renderCB(B,a),r.subGrid?.el&&(B.appendChild(r.subGrid.el),r.subGrid._updateContainerHeight())),delete a.content}let g=!1,h=!1;for(const B in a)B[0]!=="_"&&r[B]!==a[B]&&(r[B]=a[B],g=!0,h=h||!this.opts.staticGrid&&(B==="noResize"||B==="noMove"||B==="locked"));if(AA.sanitizeMinMax(r),d){const B=d.w!==void 0&&d.w!==r.w;this.moveNode(r,d),B&&r.subGrid?r.subGrid.onResize(this.hasAnimationCSS()?r.w:void 0):this.resizeToContentCheck(B,r),delete r._orig}(d||g)&&this._writeAttr(n,r),h&&this.prepareDragDrop(r.el),NA.updateCB&&NA.updateCB(r)}),this}moveNode(A,t){const n=A._updating;n||this.engine.cleanNodes().beginUpdate(A),this.engine.moveNode(A,t),this._updateContainerHeight(),n||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(A){if(!A||(A.classList.remove("size-to-content-max"),!A.clientHeight))return;const t=A.gridstackNode;if(!t)return;const n=t.grid;if(!n||A.parentElement!==n.el)return;const r=n.getCellHeight(!0);if(!r)return;let a=t.h?t.h*r:A.clientHeight,u;if(t.resizeToContentParent&&(u=A.querySelector(t.resizeToContentParent)),u||(u=A.querySelector(NA.resizeToContentParent)),!u)return;const d=A.clientHeight-u.clientHeight,g=t.h?t.h*r-d:u.clientHeight;let h;if(t.subGrid){h=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const m=t.subGrid.el.getBoundingClientRect(),v=A.getBoundingClientRect();h+=m.top-v.top}else{if(t.subGridOpts?.children?.length)return;{const m=u.firstElementChild;if(!m){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${NA.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}h=m.getBoundingClientRect().height||g}}if(g===h)return;a+=h-g;let B=Math.ceil(a/r);const w=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;w&&B>w&&(B=w,A.classList.add("size-to-content-max")),t.minH&&B<t.minH?B=t.minH:t.maxH&&B>t.maxH&&(B=t.maxH),B!==t.h&&(n._ignoreLayoutsNodeChange=!0,n.moveNode(t,{h:B}),delete n._ignoreLayoutsNodeChange)}resizeToContentCBCheck(A){NA.resizeToContentCB?NA.resizeToContentCB(A):this.resizeToContent(A)}rotate(A,t){return NA.getElements(A).forEach(n=>{const r=n.gridstackNode;if(!AA.canBeRotated(r))return;const a={w:r.h,h:r.w,minH:r.minW,minW:r.minH,maxH:r.maxW,maxW:r.maxH};if(t){const d=t.left>0?Math.floor(t.left/this.cellWidth()):0,g=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;a.x=r.x+d-(r.h-(g+1)),a.y=r.y+g-d}Object.keys(a).forEach(d=>{a[d]===void 0&&delete a[d]});const u=r._orig;this.update(n,a),r._orig=u}),this}margin(A){if(!(typeof A=="string"&&A.split(" ").length>1)){const t=AA.parseHeight(A);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=A,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(A){return this.engine.willItFit(A)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const A=this.engine.getDirtyNodes(!0);return A&&A.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(A),this._triggerEvent("change",A)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty});const A=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",A)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){const A=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",A)}return this}_triggerEvent(A,t){const n=t?new CustomEvent(A,{bubbles:!1,detail:t}):new Event(A);let r=this;for(;r.parentGridNode;)r=r.parentGridNode.grid;return r.el.dispatchEvent(n),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const A=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const n=this.opts.cellHeight,r=this.opts.cellHeightUnit;if(!n)return this;if(!A&&!this.opts.minRow){const a=AA.parseHeight(getComputedStyle(this.el).minHeight);if(a.h>0&&a.unit===r){const u=Math.floor(a.h/n);t<u&&(t=u)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[A?"minHeight":"height"]=t*n+r),A&&AA.shouldSizeToContent(A)&&A.grid.resizeToContentCBCheck(A.el),this}_prepareElement(A,t=!1,n){n=n||this._readAttr(A),A.gridstackNode=n,n.el=A,n.grid=this,n=this.engine.addNode(n,t),this._writeAttr(A,n),A.classList.add(Ue.itemClass,this.opts.itemClass);const r=AA.shouldSizeToContent(n);return r?A.classList.add("size-to-content"):A.classList.remove("size-to-content"),r&&this.resizeToContentCheck(!1,n),AA.lazyLoad(n)||this.prepareDragDrop(n.el),this}_writePosAttr(A,t){return(!t._moving&&!t._resizing||this._placeholder===A)&&(A.style.top=t.y?t.y===1?"var(--gs-cell-height)":`calc(${t.y} * var(--gs-cell-height))`:null,A.style.left=t.x?t.x===1?"var(--gs-column-width)":`calc(${t.x} * var(--gs-column-width))`:null,A.style.width=t.w>1?`calc(${t.w} * var(--gs-column-width))`:null,A.style.height=t.h>1?`calc(${t.h} * var(--gs-cell-height))`:null),A.setAttribute("gs-x",String(t.x)),A.setAttribute("gs-y",String(t.y)),t.w>1?A.setAttribute("gs-w",String(t.w)):A.removeAttribute("gs-w"),t.h>1?A.setAttribute("gs-h",String(t.h)):A.removeAttribute("gs-h"),this}_writeAttr(A,t){if(!t)return this;this._writePosAttr(A,t);const n={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const r in n)t[r]?A.setAttribute(n[r],String(t[r])):A.removeAttribute(n[r]);return this}_readAttr(A,t=!0){const n={};n.x=AA.toNumber(A.getAttribute("gs-x")),n.y=AA.toNumber(A.getAttribute("gs-y")),n.w=AA.toNumber(A.getAttribute("gs-w")),n.h=AA.toNumber(A.getAttribute("gs-h")),n.autoPosition=AA.toBool(A.getAttribute("gs-auto-position")),n.noResize=AA.toBool(A.getAttribute("gs-no-resize")),n.noMove=AA.toBool(A.getAttribute("gs-no-move")),n.locked=AA.toBool(A.getAttribute("gs-locked"));const r=A.getAttribute("gs-size-to-content");r&&(r==="true"||r==="false"?n.sizeToContent=AA.toBool(r):n.sizeToContent=parseInt(r,10)),n.id=A.getAttribute("gs-id"),n.maxW=AA.toNumber(A.getAttribute("gs-max-w")),n.minW=AA.toNumber(A.getAttribute("gs-min-w")),n.maxH=AA.toNumber(A.getAttribute("gs-max-h")),n.minH=AA.toNumber(A.getAttribute("gs-min-h")),t&&(n.w===1&&A.removeAttribute("gs-w"),n.h===1&&A.removeAttribute("gs-h"),n.maxW&&A.removeAttribute("gs-max-w"),n.minW&&A.removeAttribute("gs-min-w"),n.maxH&&A.removeAttribute("gs-max-h"),n.minH&&A.removeAttribute("gs-min-h"));for(const a in n){if(!n.hasOwnProperty(a))return;!n[a]&&n[a]!==0&&a!=="sizeToContent"&&delete n[a]}return n}_setStaticClass(){const A=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...A),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...A),this.el.removeAttribute("gs-static")),this}onResize(A=this.el?.clientWidth){if(!A||this.prevWidth===A)return;this.prevWidth=A,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(n=>{n.subGrid&&n.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(A=!1,t=void 0){if(this.engine){if(A&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)AA.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(n=>AA.shouldSizeToContent(n))){const n=[...this.engine.nodes];this.batchUpdate(),n.forEach(r=>{AA.shouldSizeToContent(r)&&this.resizeToContentCBCheck(r.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(A=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(n=>n.sizeToContent));return!A&&t&&!this.resizeObserver?(this._sizeThrottle=AA.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(A||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(A=".grid-stack-item"){return AA.getElement(A)}static getElements(A=".grid-stack-item"){return AA.getElements(A)}static getGridElement(A){return NA.getElement(A)}static getGridElements(A){return AA.getElements(A)}_initMargin(){let A,t=0,n=[];typeof this.opts.margin=="string"&&(n=this.opts.margin.split(" ")),n.length===2?(this.opts.marginTop=this.opts.marginBottom=n[0],this.opts.marginLeft=this.opts.marginRight=n[1]):n.length===4?(this.opts.marginTop=n[0],this.opts.marginRight=n[1],this.opts.marginBottom=n[2],this.opts.marginLeft=n[3]):(A=AA.parseHeight(this.opts.margin),this.opts.marginUnit=A.unit,t=this.opts.margin=A.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(a=>{this.opts[a]===void 0?this.opts[a]=t:(A=AA.parseHeight(this.opts[a]),this.opts[a]=A.h,delete this.opts.margin)}),this.opts.marginUnit=A.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const r=this.el.style;return r.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),r.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),r.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),r.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return we}static setupDragIn(A,t,n,r=document){t?.pause!==void 0&&(LA.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof A=="string"?AA.getElements(A,r):A).forEach((a,u)=>{we.isDraggable(a)||we.dragIn(a,t),n?.[u]&&(a.gridstackNode=n[u])})}movable(A,t){return this.opts.staticGrid?this:(NA.getElements(A).forEach(n=>{const r=n.gridstackNode;r&&(t?delete r.noMove:r.noMove=!0,this.prepareDragDrop(r.el))}),this)}resizable(A,t){return this.opts.staticGrid?this:(NA.getElements(A).forEach(n=>{const r=n.gridstackNode;r&&(t?delete r.noResize:r.noResize=!0,this.prepareDragDrop(r.el))}),this)}disable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!1,A),this.enableResize(!1,A),this._triggerEvent("disable"),this}enable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!0,A),this.enableResize(!0,A),this._triggerEvent("enable"),this}enableMove(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableMove(A,t)}),this)}enableResize(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableResize(A,t)}),this)}cancelDrag(){const A=this._placeholder?.gridstackNode;A&&(A._isExternal?(A._isAboutToRemove=!0,this.engine.removeNode(A)):A._isAboutToRemove&&NA._itemRemoving(A.el,!1),this.engine.restoreInitial())}_removeDD(A){return we.draggable(A,"destroy").resizable(A,"destroy"),A.gridstackNode&&delete A.gridstackNode._initDD,delete A.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return we.droppable(this.el,"destroy"),this;let A,t;const n=(r,a,u)=>{u=u||a;const d=u.gridstackNode;if(!d)return;if(!d.grid?.el){u.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const m=u.getBoundingClientRect();u.style.left=m.x+(this.dragTransform.xScale-1)*(r.clientX-m.x)/this.dragTransform.xScale+"px",u.style.top=m.y+(this.dragTransform.yScale-1)*(r.clientY-m.y)/this.dragTransform.yScale+"px",u.style.transformOrigin="0px 0px"}let{top:g,left:h}=u.getBoundingClientRect();const B=this.el.getBoundingClientRect();h-=B.left,g-=B.top;const w={position:{top:g*this.dragTransform.xScale,left:h*this.dragTransform.yScale}};if(d._temporaryRemoved){if(d.x=Math.max(0,Math.round(h/t)),d.y=Math.max(0,Math.round(g/A)),delete d.autoPosition,this.engine.nodeBoundFix(d),!this.engine.willItFit(d)){if(d.autoPosition=!0,!this.engine.willItFit(d)){we.off(a,"drag");return}d._willFitPos&&(AA.copyPos(d,d._willFitPos),delete d._willFitPos)}this._onStartMoving(u,r,w,d,t,A)}else this._dragOrResize(u,r,w,d,t,A)};return we.droppable(this.el,{accept:r=>{const a=r.gridstackNode||this._readAttr(r,!1);if(a?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let u=!0;if(typeof this.opts.acceptWidgets=="function")u=this.opts.acceptWidgets(r);else{const d=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;u=r.matches(d)}if(u&&a&&this.opts.maxRow){const d={w:a.w,h:a.h,minW:a.minW,minH:a.minH};u=this.engine.willItFit(d)}return u}}).on(this.el,"dropover",(r,a,u)=>{let d=u?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._temporaryRemoved)return!1;if(d?._sidebarOrig&&(d.w=d._sidebarOrig.w,d.h=d._sidebarOrig.h),d?.grid&&d.grid!==this&&!d._temporaryRemoved&&d.grid._leave(a,u),u=u||a,t=this.cellWidth(),A=this.getCellHeight(!0),!d){const B=u.getAttribute("data-gs-widget")||u.getAttribute("gridstacknode");if(B){try{d=JSON.parse(B)}catch{console.error("Gridstack dropover: Bad JSON format: ",B)}u.removeAttribute("data-gs-widget"),u.removeAttribute("gridstacknode")}d||(d=this._readAttr(u)),d._sidebarOrig={w:d.w,h:d.h}}d.grid||(d.el||(d={...d}),d._isExternal=!0,u.gridstackNode=d);const g=d.w||Math.round(u.offsetWidth/t)||1,h=d.h||Math.round(u.offsetHeight/A)||1;return d.grid&&d.grid!==this?(a._gridstackNodeOrig||(a._gridstackNodeOrig=d),a.gridstackNode=d={...d,w:g,h,grid:this},delete d.x,delete d.y,this.engine.cleanupNode(d).nodeBoundFix(d),d._initDD=d._isExternal=d._temporaryRemoved=!0):(d.w=g,d.h=h,d._temporaryRemoved=!0),NA._itemRemoving(d.el,!1),we.on(a,"drag",n),n(r,a,u),!1}).on(this.el,"dropout",(r,a,u)=>{const d=u?.gridstackNode||a.gridstackNode;return d&&(!d.grid||d.grid===this)&&(this._leave(a,u),this._isTemp&&this.removeAsSubGrid(d)),!1}).on(this.el,"drop",(r,a,u)=>{const d=u?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._isExternal)return!1;const g=!!this.placeholder.parentElement,h=a!==u;this.placeholder.remove(),delete this.placeholder.gridstackNode,g&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const B=a._gridstackNodeOrig;if(delete a._gridstackNodeOrig,g&&B?.grid&&B.grid!==this){const m=B.grid;m.engine.removeNodeFromLayoutCache(B),m.engine.removedNodes.push(B),m._triggerRemoveEvent()._triggerChangeEvent(),m.parentGridNode&&!m.engine.nodes.length&&m.opts.subGridDynamic&&m.removeAsSubGrid()}if(!d||(g&&(this.engine.cleanupNode(d),d.grid=this),delete d.grid?._isTemp,we.off(a,"drag"),u!==a?(u.remove(),a=u):a.remove(),this._removeDD(a),!g))return!1;const w=d.subGrid?.el?.gridstack;return AA.copyPos(d,this._readAttr(this.placeholder)),AA.removePositioningStyles(a),h&&(d.content||d.subGridOpts||NA.addRemoveCB)?(delete d.el,a=this.addWidget(d)):(this._prepareElement(a,!0,d),this.el.appendChild(a),this.resizeToContentCheck(!1,d),w&&(w.parentGridNode=d),this._updateContainerHeight()),this.engine.addedNodes.push(d),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...r,type:"dropped"},B&&B.grid?B:void 0,d),!1}),this}static _itemRemoving(A,t){if(!A)return;const n=A?A.gridstackNode:void 0;!n?.grid||A.classList.contains(n.grid.opts.removableOptions.decline)||(t?n._isAboutToRemove=!0:delete n._isAboutToRemove,t?A.classList.add("grid-stack-item-removing"):A.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const A=document.querySelector(this.opts.removable);return A?(!this.opts.staticGrid&&!we.isDroppable(A)&&we.droppable(A,this.opts.removableOptions).on(A,"dropover",(t,n)=>NA._itemRemoving(n,!0)).on(A,"dropout",(t,n)=>NA._itemRemoving(n,!1)),this):this}prepareDragDrop(A,t=!1){const n=A?.gridstackNode;if(!n)return;const r=n.noMove||this.opts.disableDrag,a=n.noResize||this.opts.disableResize,u=this.opts.staticGrid||r&&a;if((t||u)&&(n._initDD&&(this._removeDD(A),delete n._initDD),u&&A.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!t))return this;if(!n._initDD){let d,g;const h=(m,v)=>{this.triggerEvent(m,m.target),d=this.cellWidth(),g=this.getCellHeight(!0),this._onStartMoving(A,m,v,n,d,g)},B=(m,v)=>{this._dragOrResize(A,m,v,n,d,g)},w=m=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete n._moving,delete n._resizing,delete n._event,delete n._lastTried;const v=n.w!==n._orig.w,y=m.target;if(!(!y.gridstackNode||y.gridstackNode.grid!==this)){if(n.el=y,n._isAboutToRemove){const I=A.gridstackNode.grid;I._gsEventHandler[m.type]&&I._gsEventHandler[m.type](m,y),I.engine.nodes.push(n),I.removeWidget(A,!0,!0)}else AA.removePositioningStyles(y),n._temporaryRemoved?(this._writePosAttr(y,n),this.engine.addNode(n)):this._writePosAttr(y,n),this.triggerEvent(m,y);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),m.type==="resizestop"&&(Number.isInteger(n.sizeToContent)&&(n.sizeToContent=n.h),this.resizeToContentCheck(v,n))}};we.draggable(A,{start:h,stop:w,drag:B}).resizable(A,{start:h,stop:w,resize:B}),n._initDD=!0}return we.draggable(A,r?"disable":"enable").resizable(A,a?"disable":"enable"),this}_onStartMoving(A,t,n,r,a,u){if(this.engine.cleanNodes().beginUpdate(r),this._writePosAttr(this.placeholder,r),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=r,r.grid?.el)this.dragTransform=AA.getValuesFromTransformedElement(A);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const d=this.placeholder.closest(".grid-stack");this.dragTransform=AA.getValuesFromTransformedElement(d)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(r.el=this.placeholder,r._lastUiPosition=n.position,r._prevYPix=n.position.top,r._moving=t.type==="dragstart",r._resizing=t.type==="resizestart",delete r._lastTried,t.type==="dropover"&&r._temporaryRemoved&&(this.engine.addNode(r),r._moving=!0),this.engine.cacheRects(a,u,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const d=this.getColumn()-r.x,g=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-r.y;we.resizable(A,"option","minWidth",a*Math.min(r.minW||1,d)).resizable(A,"option","minHeight",u*Math.min(r.minH||1,g)).resizable(A,"option","maxWidth",a*Math.min(r.maxW||Number.MAX_SAFE_INTEGER,d)).resizable(A,"option","maxWidthMoveLeft",a*Math.min(r.maxW||Number.MAX_SAFE_INTEGER,r.x+r.w)).resizable(A,"option","maxHeight",u*Math.min(r.maxH||Number.MAX_SAFE_INTEGER,g)).resizable(A,"option","maxHeightMoveUp",u*Math.min(r.maxH||Number.MAX_SAFE_INTEGER,r.y+r.h))}}_dragOrResize(A,t,n,r,a,u){const d={...r._orig};let g,h=this.opts.marginLeft,B=this.opts.marginRight,w=this.opts.marginTop,m=this.opts.marginBottom;const v=Math.round(u*.1),y=Math.round(a*.1);if(h=Math.min(h,y),B=Math.min(B,y),w=Math.min(w,v),m=Math.min(m,v),t.type==="drag"){if(r._temporaryRemoved)return;const L=n.position.top-r._prevYPix;r._prevYPix=n.position.top,this.opts.draggable.scroll!==!1&&AA.updateScrollPosition(A,n.position,L);const T=n.position.left+(n.position.left>r._lastUiPosition.left?-B:h),K=n.position.top+(n.position.top>r._lastUiPosition.top?-m:w);d.x=Math.round(T/a),d.y=Math.round(K/u);const b=this._extraDragRow;if(this.engine.collide(r,d)){const O=this.getRow();let aA=Math.max(0,d.y+r.h-O);this.opts.maxRow&&O+aA>this.opts.maxRow&&(aA=Math.max(0,this.opts.maxRow-O)),this._extraDragRow=aA}else this._extraDragRow=0;if(this._extraDragRow!==b&&this._updateContainerHeight(),r.x===d.x&&r.y===d.y)return}else if(t.type==="resize"){if(d.x<0||(AA.updateScrollResize(t,A,u),d.w=Math.round((n.size.width-h)/a),d.h=Math.round((n.size.height-w)/u),r.w===d.w&&r.h===d.h)||r._lastTried&&r._lastTried.w===d.w&&r._lastTried.h===d.h)return;const L=n.position.left+h,T=n.position.top+w;d.x=Math.round(L/a),d.y=Math.round(T/u),g=!0}r._event=t,r._lastTried=d;const I={x:n.position.left+h,y:n.position.top+w,w:(n.size?n.size.width:r.w*a)-h-B,h:(n.size?n.size.height:r.h*u)-w-m};if(this.engine.moveNodeCheck(r,{...d,cellWidth:a,cellHeight:u,rect:I,resizing:g})){r._lastUiPosition=n.position,this.engine.cacheRects(a,u,w,B,m,h),delete r._skipDown,g&&r.subGrid&&r.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const L=t.target;r._sidebarOrig||this._writePosAttr(L,r),this.triggerEvent(t,L)}}triggerEvent(A,t){let n=this;for(;n.parentGridNode;)n=n.parentGridNode.grid;n._gsEventHandler[A.type]&&n._gsEventHandler[A.type](A,t)}_leave(A,t){t=t||A;const n=t.gridstackNode;if(!n||(t.style.transform=t.style.transformOrigin=null,we.off(A,"drag"),n._temporaryRemoved))return;n._temporaryRemoved=!0,this.engine.removeNode(n),n.el=n._isExternal&&t?t:A;const r=n._sidebarOrig;n._isExternal&&this.engine.cleanupNode(n),n._sidebarOrig=r,this.opts.removable===!0&&NA._itemRemoving(A,!0),A._gridstackNodeOrig?(A.gridstackNode=A._gridstackNodeOrig,delete A._gridstackNodeOrig):n._isExternal&&this.engine.restoreInitial()}};tn.renderCB=(e,A)=>{e&&A?.content&&(e.textContent=A.content)},tn.resizeToContentParent=".grid-stack-item-content",tn.Utils=AA,tn.Engine=Hi,tn.GDRev="12.4.2";var zm={class:"d-layout"},Xm=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-locked","gs-no-resize","gs-no-move","gs-min-w","gs-min-h","gs-max-w","gs-max-h"],$m=(0,o.defineComponent)({name:"DLayout",__name:"layout",props:{modelValue:{default:()=>[]},column:{default:24},cellHeight:{default:60},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},animate:{type:Boolean,default:!0},float:{type:Boolean,default:!0},removable:{type:Boolean,default:!1},removableOptions:{}},emits:["update:modelValue","added","removed","changed","dragStart","dragStop","resizeStart","resizeStop"],setup(e,{expose:A,emit:t}){const n=e,r=t,a=(0,o.ref)();let u=null;const d=async()=>{a.value&&(await(0,o.nextTick)(),u&&u.destroy(!1),u=tn.init({column:n.column,cellHeight:n.cellHeight,disableDrag:!(n.draggable&&!n.disable),disableResize:!(n.resizable&&!n.disable),animate:n.animate,float:n.float,removable:n.removable,removableOptions:n.removableOptions},a.value),u.on("added",(m,v)=>{const y=v[0];y&&(r("added",g(y)),B())}),u.on("removed",(m,v)=>{const y=v[0];y&&(r("removed",g(y)),B())}),u.on("change",()=>{B(),r("changed",(u?.save()||[]).map(m=>g(m)))}),u.on("dragstart",(m,v)=>{v&&r("dragStart",m,g(v.gridstackNode||v))}),u.on("dragstop",(m,v)=>{v&&r("dragStop",m,g(v.gridstackNode||v))}),u.on("resizestart",(m,v)=>{v&&r("resizeStart",m,g(v.gridstackNode||v))}),u.on("resizestop",(m,v)=>{v&&r("resizeStop",m,g(v.gridstackNode||v))}))},g=m=>({id:m.id||m.el?.getAttribute("gs-id")||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1,locked:m.locked||!1,noResize:m.noResize||!1,noMove:m.noMove||!1,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}),h=async()=>{if(!u||!a.value)return;await(0,o.nextTick)();const m=u.engine.nodes;new Set(m.map(y=>y.id));const v=new Set(n.modelValue.map(y=>y.id));m.forEach(y=>{if(!v.has(y.id||"")){const I=y.el;I&&u&&u.removeWidget(I,!1)}}),n.modelValue.forEach(y=>{const I=m.find(L=>L.id===y.id);if(I)I.el&&u&&u.update(I.el,{x:y.x,y:y.y,w:y.w,h:y.h,locked:y.locked,noResize:y.noResize,noMove:y.noMove,minW:y.minW,minH:y.minH,maxW:y.maxW,maxH:y.maxH});else{if(!a.value||!u)return;const L=a.value.querySelector(`[gs-id="${y.id}"]`);L&&u.makeWidget(L)}})},B=()=>{u&&r("update:modelValue",u.save().map(m=>{const v={id:m.id||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1},y=n.modelValue.find(I=>I.id===v.id);return y&&Object.keys(y).forEach(I=>{["id","x","y","w","h"].includes(I)||(v[I]=y[I])}),v}))},w=(0,o.computed)(()=>n.modelValue);return(0,o.watch)(()=>n.modelValue,async()=>{u&&(await(0,o.nextTick)(),h())},{deep:!0}),(0,o.watch)(()=>[n.column,n.cellHeight,n.draggable,n.resizable,n.disable,n.animate,n.float,n.removable],()=>{d()}),(0,o.onMounted)(()=>{d()}),(0,o.onBeforeUnmount)(()=>{u&&(u.destroy(!1),u=null)}),A({addItem:async m=>{if(u&&a.value){await(0,o.nextTick)();const v=a.value.querySelector(`[gs-id="${m.id}"]`);v&&(u.makeWidget(v),u.update(v,{x:m.x,y:m.y,w:m.w,h:m.h,locked:m.locked,noResize:m.noResize,noMove:m.noMove,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}))}},removeItem:m=>{if(u&&a.value){const v=a.value.querySelector(`[gs-id="${m}"]`);v&&u.removeWidget(v,!1)}},clear:()=>{u&&u.removeAll(!1)},getGrid:()=>u}),(m,v)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",zm,[(0,o.createElementVNode)("div",{ref_key:"gridContainerRef",ref:a},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(w.value,y=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:y.id,"gs-id":y.id,"gs-x":y.x,"gs-y":y.y,"gs-w":y.w,"gs-h":y.h,"gs-locked":y.locked,"gs-no-resize":y.noResize,"gs-no-move":y.noMove,"gs-min-w":y.minW,"gs-min-h":y.minH,"gs-max-w":y.maxW,"gs-max-h":y.maxH,class:"d-layout-item"},[(0,o.renderSlot)(m.$slots,"item",{item:y})],8,Xm))),128))],512)]))}}),Ym=$m,Ql=dt(Ym),ZA=(e,A="",t=!1)=>t?`${e}pt`:A?`${e}${A}`:`${e}px`,ze=(e,A=0)=>e==null||isNaN(e)?0:Number(Number(e).toFixed(A)),Wm=e=>e*3/4,Jm=e=>e*4/3,Zm=["onMousedown"],jm={key:2,class:"d-draggable__mask"},qm=(0,o.defineComponent)({name:"DDraggable",__name:"draggable",props:{index:{},mask:{type:Boolean,default:!0},scale:{default:1},readonly:{type:Boolean,default:!1},resize:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},step:{default:1},zIndex:{default:1},isActiveBgTransparent:{type:Boolean,default:!1},left:{default:0},top:{default:0},width:{},height:{},activeFlag:{type:Boolean,default:!1},isPt:{type:Boolean,default:!1}},emits:["focus","blur","over","out"],setup(e,{expose:A,emit:t}){let n=0;const r=e,a=t,u=[{classname:"left"},{classname:"right"},{classname:"top"},{classname:"bottom"},{classname:"top-left"},{classname:"top-right"},{classname:"bottom-left"},{classname:"bottom-right"}],d={right:{resizeX:!0},left:{resizeX:!0,moveLeft:!0,invertX:!0},top:{resizeY:!0,moveTop:!0,invertY:!0},bottom:{resizeY:!0},"bottom-right":{resizeX:!0,resizeY:!0},"bottom-left":{resizeX:!0,resizeY:!0,moveLeft:!0,invertX:!0},"top-right":{resizeX:!0,resizeY:!0,moveTop:!0,invertY:!0},"top-left":{resizeX:!0,resizeY:!0,moveLeft:!0,moveTop:!0,invertX:!0,invertY:!0}},g=(0,o.ref)(),h=(0,o.ref)(),B=()=>h.value?.firstElementChild,w=(0,o.ref)(0),m=(0,o.ref)(0),v=(0,o.ref)(0),y=(0,o.ref)(0),I=(0,o.ref)(!1),L=(0,o.ref)(!1),T=(0,o.ref)(!1);let K=null;const b=(0,o.computed)(()=>r.scale),O=(0,o.computed)(()=>!r.readonly&&!r.disabled),aA=(0,o.computed)(()=>O.value&&(T.value||L.value||I.value)),Z=(0,o.computed)(()=>!r.disabled&&r.mask),cA=(0,o.computed)(()=>{const j=8*b.value;return{width:ZA(j,"",r.isPt),height:ZA(j,"",r.isPt)}}),lA=(0,o.computed)(()=>({fontSize:ZA(14*b.value,"",r.isPt),padding:ZA(4*b.value,"",r.isPt),"border-radius":ZA(2*b.value,"",r.isPt)})),iA=(0,o.computed)(()=>{const j={zIndex:T.value?9999:r.zIndex,top:ZA(y.value,"",r.isPt),width:ZA(w.value,"",r.isPt),height:ZA(m.value,"",r.isPt),left:ZA(v.value,"",r.isPt)};return T.value&&r.isActiveBgTransparent&&O.value&&(j.backgroundColor="color-mix(in srgb, var(--j-color-primary-bg) 60%, transparent)"),j});(0,o.watch)(()=>r.width,j=>x(j)),(0,o.watch)(()=>r.height,j=>eA(j)),(0,o.watch)(()=>r.left,j=>H(j)),(0,o.watch)(()=>r.top,j=>X(j)),(0,o.watch)(w,j=>{g.value&&(g.value.style.width=ZA(j,"",r.isPt),r.resize&&B()?.style&&(B().style.width=ZA(j,"",r.isPt)))}),(0,o.watch)(m,j=>{g.value&&(g.value.style.height=ZA(j,"",r.isPt),r.resize&&B()?.style&&(B().style.height=ZA(j,"",r.isPt)))}),(0,o.watch)(()=>r.activeFlag,j=>{oA(j)});const oA=j=>{T.value=j},tA=j=>j===void 0?0:r.isPt?Jm(j):j,x=j=>{w.value=ze(tA(j))||(B()?.offsetWidth??0)},eA=j=>{m.value=ze(tA(j))||(B()?.offsetHeight??0)},H=j=>{v.value=ze(tA(j))},X=j=>{y.value=ze(tA(j))},F=()=>({index:r.index,width:BA(w.value),height:BA(m.value),left:BA(v.value),top:BA(y.value)}),D=j=>{const _=F();switch(j){case"focus":a("focus",_);break;case"blur":a("blur",_);break;case"over":a("over",_);break;case"out":a("out",_);break}},k=()=>{x(r.width),eA(r.height),H(r.left),X(r.top),oA(r.activeFlag)},N=j=>{v.value=j},R=j=>{y.value=j},$=j=>{const _=8*b.value/2,U={};return j.split("-").forEach(S=>{U[S]=ZA(-_,"",r.isPt)}),U},nA=j=>{L.value=j},BA=j=>r.isPt?Wm(j):j,FA=(j=!0)=>{n+=1,I.value=!0,j&&D("focus")},sA=()=>{n=Math.max(0,n-1),I.value=!1,D("blur")},Y=()=>{K?.(),K=null},J=(j,_)=>{let U=j.clientX,S=j.clientY,G=0,P=0,dA=0,fA=!1;const bA=document.body.style.userSelect;document.body.style.userSelect="none";const pA=()=>{if(dA=0,G===0&&P===0)return;const KA=G,JA=P;G=0,P=0,_(KA,JA)},DA=KA=>{I.value=!0;const JA=KA.clientX-U,ee=KA.clientY-S;if(U=KA.clientX,S=KA.clientY,!fA){fA=!0,_(JA,ee);return}G+=JA,P+=ee,dA||(dA=requestAnimationFrame(pA))},OA=()=>{dA&&(cancelAnimationFrame(dA),pA()),Y(),sA()};Y(),document.addEventListener("mousemove",DA),document.addEventListener("mouseup",OA),K=()=>{dA&&(cancelAnimationFrame(dA),dA=0),document.body.style.userSelect=bA,document.removeEventListener("mousemove",DA),document.removeEventListener("mouseup",OA)}},uA=(j,_,U)=>{if(j.resizeX){let S=_*r.step;j.invertX&&(S=-S),j.moveLeft&&(v.value=ze(v.value-S)),w.value=ze(w.value+S)}if(j.resizeY){let S=U*r.step;j.invertY&&(S=-S),j.moveTop&&(y.value=ze(y.value-S)),m.value=ze(m.value+S)}},wA=(j,_)=>{if(!O.value)return;const U=d[_];FA(!1),J(j,(S,G)=>uA(U,S,G))},QA=()=>{n>0||(L.value=!1,D("out"))},_A=()=>{n>0||O.value&&(L.value=!0,D("over"))},gA=j=>{if(!O.value)return;const _=T.value;T.value=!0,FA(!_),J(j,(U,S)=>{v.value=ze(v.value+U*r.step),y.value=ze(y.value+S*r.step)})};return(0,o.onMounted)(()=>{k()}),(0,o.onBeforeUnmount)(()=>{Y()}),A({setActive:oA,setLeft:N,setTop:R,setOverActive:nA}),(j,_)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(["d-draggable",{"d-draggable--active":(T.value||L.value)&&O.value},{"d-draggable--pt":e.isPt&&O.value},{"d-draggable--move":I.value},{"d-draggable--click":e.disabled}]),onMousedown:(0,o.withModifiers)(gA,["stop"]),onMouseenter:(0,o.withModifiers)(_A,["stop"]),onMouseleave:(0,o.withModifiers)(QA,["stop"]),style:(0,o.normalizeStyle)(iA.value)},[(0,o.createElementVNode)("div",{class:"d-draggable__wrapper",ref_key:"wrapper",ref:g},[aA.value?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[e.isPt?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:"d-draggable__line d-draggable__line--label",style:(0,o.normalizeStyle)(lA.value)}," X:"+(0,o.toDisplayString)(v.value)+", Y:"+(0,o.toDisplayString)(y.value),5))],64)):(0,o.createCommentVNode)("",!0),O.value?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:1},(0,o.renderList)(u,U=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:U.classname},[T.value?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["d-draggable__range",`d-draggable__range--${U.classname}`]),style:(0,o.normalizeStyle)([cA.value,$(U.classname)]),onMousedown:(0,o.withModifiers)(S=>wA(S,U.classname),["stop"])},null,46,Zm)):(0,o.createCommentVNode)("",!0)],64))),64)):(0,o.createCommentVNode)("",!0),(0,o.createElementVNode)("div",{class:"d-draggable__item",ref_key:"item",ref:h},[(0,o.renderSlot)(j.$slots,"default")],512),Z.value?((0,o.openBlock)(),(0,o.createElementBlock)("div",jm)):(0,o.createCommentVNode)("",!0)],512)],38))}}),Aw=qm,El=dt(Aw),Fl=e=>{const A=ew(e.components);return{formConfig:e.form,componentList:A}},Ul=(e,A)=>{let t={},n=[];const r={},a=e;t=a.form;const u={};return a.components.forEach(d=>{const g=A[d.type];u[d.containerId]=u[d.containerId]||[];const h={id:d.id,name:d.name,type:d.type,dragType:g?.dragType||"component",componentName:g?.componentName||"",runtimeType:g?.runtimeType,groupId:d.groupId,config:d.config,isInput:g?.isInput!==!1,containerId:d.containerId,level:d.level};g?.dragType==="container"&&(h.children=[]),r[h.id]=h,u[d.containerId].push(h)}),Object.keys(u).forEach(d=>{r[d]&&(r[d].children=u[d])}),n=u.form||[],{formConfig:t,componentList:n,componentDic:r}},jr=(e,A)=>{const t={ver:"j1",form:{...e},components:[],db:{}};return bl(A||[],t.components),t},bl=(e,A)=>{e.forEach(t=>{if(t.type==="pkey")return;const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&bl(t.children||[],A),A.push(n)})},ew=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const r={id:n.id,type:n.runtimeType,slot:n.groupId,config:{rule:[]}};n.config&&Object.keys(n.config).forEach(a=>{if(a==="required"){n.config.required&&r.config?.rule?.push({required:!0,message:n.config.requiredMsg||"请输入"});return}if(a==="patterns"){n.config.patterns.forEach(u=>{u.reg&&u.msg&&r.config?.rule?.push({pattern:new RegExp(u.reg),message:`请输入${u.msg||""}`})});return}r.config[a]=n.config[a]}),n.type==="pkey"&&(r.config.isPkey=!0),A[n.containerId].push(r),t[n.id]=r}),Object.keys(A).forEach(n=>{const r=t[n];if(r){const a=A[n];if(["j-tabs","j-collapse"].includes(r.type||"")&&r.config?.groups){const u={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const g=d.slot.toString();u[g]||(u[g]=[]),delete d.slot,u[g].push(d)}}),r.children=r.config.groups.map(d=>{const g=u[d._i]||[],h={label:d.label};d.active&&r.type==="j-collapse"&&(h.active=d.active);let B;if(r.type==="j-tabs"&&r.config?.tabKey&&r.config?.options.length>0){const m=r.config.options.find(v=>v.label===d._i);m&&(B=({formData:v})=>({display:m.value.includes(v[r.config?.tabKey||""])?m.display:!m.display}))}const w={config:h,children:g};return B&&(w.getCompConfig=B),w}),delete r.config.groups}else r.children=a}}),A.form},Hl=(e,A,t,n,r,a,u,d)=>{const g=(0,o.ref)(),h=(0,o.reactive)({}),B=(0,o.computed)(()=>{const F=[];return Object.keys(h).forEach(D=>{const k=h[D];k.dragType==="component"&&k.type!=="pkey"&&F.push(k)}),F}),w=(F=[],D)=>{const k=A?.value?.init;typeof k=="function"&&k(F,D)},m=F=>r?r(F,{componentDic:h,components:B.value,configData:g.value.config}):{},v=(F,D)=>{if(g.value?.id===F)return;const k=h[F]||D;if(k?g.value=k:F===t.id?g.value=t:g.value=null,g.value){const N=a[g.value.type];N?(w(N,g.value.config),m(g.value.type)):w([])}else w([]);D&&re("dragClick",{id:D.id})},y=()=>e.value.$el.getBoundingClientRect(),I=F=>F===t.id?t:h[F]||{},L=F=>{const D=[];if(F===t.id)D.push({id:F,name:t.name});else{const k=h[F];if(k){D.push({id:F,name:k.name});const N=L(k.containerId);D.push(...N)}}return D},T=(F,D)=>{const k=h[D];if(k===void 0)return!1;const N=k.containerId;return F===N?!0:N===t.id?!1:T(F,N)},K=F=>n?n(F)||{}:{},b=(F,D,k,N)=>{if(d){const R=I(F);return d(k.componentType,{container:R,groupId:D,configData:k},N)}return!1},O=({name:F,type:D,dragType:k,isInput:N,componentName:R,runtimeType:$},nA,BA,FA,sA=!1)=>{const Y=K(D);if(Y.id=ft(),Y.span=24,Y.componentType=D,aA(nA,Y.componentType))return;b(nA,FA,Y,!0);const J={id:Y.id,name:F,type:D,runtimeType:$,componentName:R||"",dragType:k||"component",containerId:nA,isInput:!!N,level:h[nA]?h[nA].level+1:1,config:Y,isNewAdd:!sA,groupId:FA};return J.dragType==="container"&&(J.children=[]),h[J.id]=J,I(nA).children?.splice(BA,0,J),J},aA=(F,D)=>!!(I(F).config.componentType==="gridtable"&&["divider","label","text","textEditor","viewTable","card","collapse","tabs","qrcode","barcode","tableLayout"].includes(D)),Z=(F,D,k=!1)=>{let N=null;const R=I(F).children,$=R?.findIndex(nA=>nA.id===D)||0;if(k&&R&&R.length>1){let nA=$+1;$>0&&(nA=$-1),N=R[nA]}return R?.splice($,1),N?.id},cA=(F,D,k,N)=>{const R=I(D).children,$=F.containerId!==D;F.containerId=D,F.groupId=N,R?.splice(k,0,F),b(D,N,F.config,$)&&(eA(),v(F.id))},lA=F=>{let D="";const k=I(F);return k&&(k.children&&k.children.length>0&&k.children.forEach(N=>{lA(N.id)}),D=Z(k.containerId,F,!0)||"",delete h[F]),g.value&&g.value.id===F&&(g.value=null,A.value.init([])),D},iA=(F,D=[])=>{const k=I(F);if(k&&k.children&&k.children.length>0){const N=[];k.children.forEach(R=>{R.groupId&&D.includes(R.groupId)&&N.push(R.id)}),N.forEach(R=>{lA(R),delete h[R]})}},oA=(F,D)=>{const k=I(F);k&&(k.children&&k.children.length>0&&k.children.forEach(N=>{N.groupId===D&&lA(N.id)}),delete h[F])},tA=F=>{const D=zt(I(F));D.id=ft(),D.config.id=D.id,h[D.id]=D;const k=I(D.containerId).children,N=k?.findIndex(R=>R.id===F)||0;k?.splice(N+1,0,D)},x=()=>{t.children=[],Lu(h),g.value&&(re("dragClick",{id:""}),g.value=null,A.value.init([]))},eA=()=>{g.value&&(re("dragClick",{id:""}),g.value=null,A.value.init([]))},H=F=>{const D=g.value,k=I(D.containerId).children,N=k?.findIndex(R=>R.id===D.id)||0;lA(D.id),(0,o.nextTick)(()=>{const R=u[F],$=K(F);$.id=D.id,$.span=D.config.span,$.componentType=F,$.table=D.config.table,$.field=D.config.field,D.config.isSubTable&&($.isSubTable=D.config.isSubTable);const nA={id:$.id,name:R.name,type:F,runtimeType:R.runtimeType,componentName:R.componentName||"",dragType:D.dragType,groupId:D.groupId,containerId:D.containerId,isInput:D.isInput,level:D.level,config:$,isNewAdd:!0};h[nA.id]=nA,k?.splice(N,0,nA)})},X=F=>{re("dragAddByClick",F)};return(0,o.provide)("d-drag-design-provide",{activedComponent:g,getDesignLocals:y,getComponent:I,getParentComponents:L,isMyChildComponent:T,selectComponent:v,addComponent:O,deleteComponent:lA,copyComponent:tA,removeComponentFromContainer:Z,addComponentToContainer:cA,top:t,deleteChildren:oA,deleteChildrens:iA}),{activedComponent:g,clearComponents:x,changeComponent:H,schemaComponentDic:h,clearSelect:eA,addComponent:O,addComponentByTable:X,designComponentList:B}},tw=(0,o.defineComponent)({__name:"formDesignItem",props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){const A=e,{t}=(0,me.useAppInject)(),n=(0,o.computed)(()=>A.componentData.config?.notShowLabel?"":A.componentData.config?.label||""),r=(0,o.computed)(()=>n.value===""?0:A.componentData.config?.labelWidth===void 0&&A.globalConfig.labelWidth!==void 0?`${A.globalConfig.labelWidth}px`:A.componentData.config?.labelWidth?`${A.componentData.config?.labelWidth}px`:void 0),a=(0,o.computed)(()=>{const u={...A.componentData?.config};return u.size===void 0&&(u.size=A.globalConfig.size),u.display=!0,u});return(u,d)=>{const g=(0,o.resolveComponent)("j-comp"),h=(0,o.resolveComponent)("el-form-item");return e.componentData.isInput?((0,o.openBlock)(),(0,o.createBlock)(h,{key:0,"label-width":r.value,label:(0,o.unref)(t)(n.value),"label-position":A.componentData.config?.labelPosition||e.globalConfig?.labelPosition,rules:e.componentData.config?.required?[{required:!0,message:""}]:[]},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(g,{type:e.componentData?.componentName||e.componentData?.type,config:a.value,modelValue:e.componentData?.config.defaultValue},null,8,["type","config","modelValue"])]),_:1},8,["label-width","label","label-position","rules"])):e.componentData?.children?((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(e.componentData?.componentName),(0,o.mergeProps)({key:1},e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"])):((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(e.componentData?.componentName),(0,o.normalizeProps)((0,o.mergeProps)({key:2},e.componentData?.config)),null,16))}}}),Il=tw,nw={class:"d-form-design j-block"},rw={class:"d-form-design-left"},ow={class:"d-form-design-component-list"},iw={class:"j-component-tool"},sw={class:"j-component-tool-name"},aw={class:"d-form-design-center"},lw={class:"d-form-design-container"},cw={key:0,class:"j-block d-form-design-empty"},uw={class:"d-form-design-right"},dw={class:"d-form-design-panel-title"},fw={style:{margin:"0","font-size":"14px"}},gw={class:"d-form-design-panel"},hw=(0,o.defineComponent)({name:"DFormDesign",__name:"formDesign",props:{components:{default:()=>[]},componentConfigs:{default:()=>({})},componentInit:{type:Function,default:void 0},containerAddComponent:{type:Function,default:void 0},componentConfigInit:{type:Function,default:void 0},componentConfigChange:{type:Function,default:void 0},componentConfigValidate:{type:Function,default:void 0},flowComponents:{default:()=>[]},flowInit:{type:Function,default:void 0},flowComponentConfigInit:{type:Function,default:void 0},flowComponentConfigChange:{type:Function,default:void 0},flowComponentConfigs:{default:()=>({})},actions:{}},setup(e,{expose:A}){const t=e,{t:n,error:r}=(0,me.useAppInject)(),a=(0,o.reactive)({name:"表单",id:"form",type:"form",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}}),u=(0,o.ref)([]),d=t.components.length;for(let sA=0;sA<d;sA++)u.value.push(sA);t.componentInit&&(a.config=t.componentInit("form")||{});const g={},h=[];t.components.forEach(({children:sA})=>{sA.forEach(Y=>{g[Y.type]=Y,Y.dragType=Y.dragType||"component",Y.isInput!==!1&&(Y.isInput=!0,h.push({label:Y.name,value:Y.type}))})});const B=sA=>{sA.forEach(Y=>{Y.type==="d-input-flow"&&(Y.config=Y.config||{},Y.config.flowComponents=t.flowComponents,Y.config.flowInit=t.flowInit,Y.config.flowComponentConfigInit=J=>{t.flowComponentConfigInit&&(J.designComponents=aA.value,J.component=T.value,t.flowComponentConfigInit(J))},Y.config.flowComponentConfigs=t.flowComponentConfigs,Y.config.flowComponentConfigChange=t.flowComponentConfigChange),Y.children&&B(Y.children)})},w={};Object.keys(t.componentConfigs||{}).forEach(sA=>{const{hasBase:Y,isInput:J,hasTwoPlaceholder:uA,hasPlaceholder:wA,hasSpan:QA,hasLabel:_A,bindTable:gA,labelTitle:j}=g[sA]||{hasBase:!1},_=[{id:"componentType",type:"j-select",config:{label:"类型",allowClear:!1,display:J,options:h}},{id:"label",type:"j-input",config:{label:j||"标题"},getCompConfig:({formData:S})=>({display:_A!==!1&&!S.notShowLabel})},{id:"notShowLabel",type:"j-switch",config:{label:"不显示"+(j||"标题"),activeValue:!0,inactiveValue:!1},getCompConfig:({formData:S})=>({display:_A!==!1&&!S.isSubTable})},{id:"labelWidth",type:"j-number",config:{label:"标题宽度"},getCompConfig:({formData:S})=>({display:J&&!S.notShowLabel&&!S.isSubTable})},{id:"labelPosition",type:"j-radio",config:{label:"标题对齐",options:[{value:"right",label:"右"},{value:"left",label:"左"},{value:"top",label:"顶部"}]},getCompConfig:({formData:S})=>({display:J&&!S.notShowLabel&&!S.isSubTable})},{id:"placeholder",type:"j-input",config:{display:J&&!uA&&wA!==!1,label:"占位提示"}},{id:"startPlaceholder",type:"j-input",config:{display:!!uA,label:"开始占位"}},{id:"endPlaceholder",type:"j-input",config:{display:!!uA,label:"结束占位"}},{id:"span",type:"j-slider",config:{label:"表单栅栏",min:6,max:24,showTooltip:!0,step:6,showStops:!0,defautValue:24},getCompConfig:({formData:S})=>({display:QA!==!1&&!S.isSubTable})},{id:"width",type:"j-number",config:{label:"单元格宽度",min:1},getCompConfig:({formData:S})=>({display:!!S.isSubTable})}],U={type:"j-collapse",config:{defaultValue:[]},children:[]};Y!==!1&&U.children?.push({config:{label:"基础信息"},children:[..._]}),U.children?.push(...t.componentConfigs[sA]),U.children?.forEach((S,G)=>{U.config?.defaultValue.push(`_collapse${G}`)}),B(U.children||[]),w[sA]=[U]});const m=sA=>{const{value:Y}=sA||{};sA.id==="componentType"&&b(Y),T.value&&t.componentConfigChange&&t.componentConfigChange(T.value.type,{configRef:L,configData:T.value.config,...sA})},v=(sA,Y)=>{t.componentConfigInit&&t.componentConfigInit(sA,{configRef:L,...Y})},y=(sA,Y,J)=>{let uA=!1;return Y.container.type==="gridtable"?(!Y.configData.isSubTable||J)&&(Y.configData.isSubTable=!0,uA=!0):Y.configData.isSubTable&&(uA=!0,Y.configData.isSubTable=!1),t.containerAddComponent&&t.containerAddComponent(sA,Y),uA},I=(0,o.ref)(),L=(0,o.ref)(),{activedComponent:T,clearComponents:K,changeComponent:b,schemaComponentDic:O,designComponentList:aA}=Hl(I,L,a,t.componentInit,v,w,g,y),Z=(0,o.computed)(()=>T.value?.id!="form"?T.value?`${T.value.name}-${T.value.id}`:"":T.value?`${T.value.name}`:"");(0,o.provide)("dui-design-provide",{designItemName:Il});const cA=()=>{K()},lA=()=>{t.componentInit&&(a.config=t.componentInit("form")||{}),K()},iA=()=>jr(a.config,a.children||[]),oA=sA=>{const Y=Ul(sA,g);a.config=Y.formConfig,a.children?.push(...Y.componentList),Object.keys(Y.componentDic).forEach(J=>{O[J]=Y.componentDic[J]})},tA=()=>x(jr(a.config,a.children||[]).components),x=sA=>{for(const Y of sA)if(t.componentConfigValidate&&!t.componentConfigValidate(Y.type,{configData:Y.config,errorTip:r}))return!1;return!0},eA=(0,o.ref)(),H=(0,o.ref)(),X=(0,o.ref)({});let F=0;const D=sA=>{if(H.value)F=0,H.value.init(sA||[]);else{if(F>600){console.warn("表单组件加载超时");return}F++,setTimeout(()=>{D(sA)},100)}},k=()=>{},N=()=>{};return A({getSchema:()=>iA(),setSchema:sA=>oA(sA),reset:()=>lA(),validate:()=>tA(),preview:()=>{const sA=jr(a.config,a.children||[]);eA.value.open("表单预览",sA.form.layerType);const{formConfig:Y,componentList:J}=Fl(sA);X.value=Y,(0,o.nextTick)(()=>{D(J)})},clear:cA}),(sA,Y)=>{const J=(0,o.resolveComponent)("j-icon"),uA=(0,o.resolveComponent)("d-drag-tool"),wA=(0,o.resolveComponent)("el-collapse-item"),QA=(0,o.resolveComponent)("el-collapse"),_A=(0,o.resolveComponent)("el-empty"),gA=(0,o.resolveComponent)("d-drag-form-list"),j=(0,o.resolveComponent)("el-row"),_=(0,o.resolveComponent)("d-drag-container"),U=(0,o.resolveComponent)("j-form"),S=(0,o.resolveComponent)("j-layer");return(0,o.openBlock)(),(0,o.createElementBlock)("div",nw,[(0,o.createElementVNode)("div",rw,[(0,o.createElementVNode)("div",ow,[(0,o.createVNode)(QA,{modelValue:u.value,"onUpdate:modelValue":Y[0]||(Y[0]=G=>u.value=G)},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.components,(G,P)=>((0,o.openBlock)(),(0,o.createBlock)(wA,{key:P,title:G.name,name:P},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(G.children,(dA,fA)=>((0,o.openBlock)(),(0,o.createBlock)(uA,{key:fA,config:dA},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("div",iw,[(0,o.createVNode)(J,{class:"j-component-tool-icon",icon:dA.icon,size:14},null,8,["icon"]),(0,o.createElementVNode)("div",sw,(0,o.toDisplayString)((0,o.unref)(n)(dA.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,o.createElementVNode)("div",aw,[(0,o.createElementVNode)("div",lw,[(0,o.createVNode)(_,{ref_key:"dragContainer",ref:I,class:"d-form-design-drag-container","is-component-container":!1,"component-data":a},{default:(0,o.withCtx)(()=>[!a.children||a.children.length===0?((0,o.openBlock)(),(0,o.createElementBlock)("div",cw,[(0,o.createVNode)(_A,{description:(0,o.unref)(n)("请从左侧拖拽组件到此处"),"image-size":100},null,8,["description"])])):((0,o.openBlock)(),(0,o.createBlock)(j,{key:1},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(gA,{"component-list":a.children,"global-config":a.config},null,8,["component-list","global-config"])]),_:1}))]),_:1},8,["component-data"])])]),(0,o.withDirectives)((0,o.createElementVNode)("div",uw,[(0,o.createElementVNode)("div",dw,[(0,o.createElementVNode)("span",fw,(0,o.toDisplayString)(`${Z.value}`),1)]),(0,o.createElementVNode)("div",gw,[(0,o.createVNode)(U,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:L,onChange:m},null,512)])],512),[[o.vShow,(0,o.unref)(T)]]),(0,o.createVNode)(S,{ref_key:"previewFormLayerRef",ref:eA,width:1e3,height:800,onOk:k,onClosed:N},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(U,{config:X.value,"is-preview":!0,ref_key:"previewFormRef",ref:H,actions:e.actions},null,8,["config","actions"])]),_:1},512)])}}}),Bw=hw,_l=dt(Bw,[Il]),Sl=(e,A)=>{const t={ver:"V3",indexPage:{...e},components:[]};return xl(A||[],t.components),t},xl=(e,A)=>{e.forEach(t=>{const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&xl(t.children||[],A),A.push(n)})},pw=e=>{const A=mw(e.components);return{pageConfig:e.indexPage,componentList:A}},mw=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const r={id:n.id,type:n.runtimeType,slot:n.groupId,config:{}};n.config&&Object.keys(n.config).forEach(a=>{r.config[a]=n.config[a]}),A[n.containerId].push(r),t[n.id]=r}),Object.keys(A).forEach(n=>{const r=t[n];if(r){const a=A[n];if(["j-tabs","j-collapse"].includes(r.type||"")&&r.config?.groups){const u={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const g=d.slot.toString();u[g]||(u[g]=[]),delete d.slot,u[g].push(d)}}),r.children=r.config.groups.map(d=>{const g=u[d._i]||[];return{config:{label:d.label},children:g}}),delete r.config.groups}else r.children=a}}),A.indexPage||[]},ww=(e,A)=>{let t={},n=[];const r={};if(e.ver==="V3"){const a=e;t=a.indexPage;const u={};a.components.forEach(d=>{const g=A[d.type];if(!g)return;u[d.containerId]=u[d.containerId]||[];const h={id:d.id,name:d.name,type:d.type,dragType:g.dragType||"component",componentName:g.componentName||"",runtimeType:g.runtimeType,groupId:d.groupId,config:d.config,isInput:!1,containerId:d.containerId,level:d.level};r[h.id]=h,u[d.containerId].push(h),h.dragType==="container"&&(h.children=[])}),Object.keys(u).forEach(d=>{r[d]&&(r[d].children=u[d])}),n=u.indexPage||[]}return{pageConfig:t,componentList:n,componentDic:r}},Cw=(0,o.defineComponent)({name:"DIndexDesignItem",__name:"indexDesignItem",props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){return(A,t)=>((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(e.componentData?.componentName),(0,o.mergeProps)(e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"]))}}),Dl=Cw,vw={class:"d-index-design j-block"},yw={class:"d-index-design-left"},Qw={class:"j-component-list"},Ew={class:"j-component-tool"},Fw={class:"j-component-tool-name"},Uw={class:"d-index-design-center"},bw={class:"design-container"},Hw={key:0,class:"j-block design-empty"},Iw={class:"d-index-design-right"},_w={class:"d-index-design-panel-title"},Sw={style:{margin:"0","font-size":"14px"}},xw={class:"d-index-design-panel"},Dw=(0,o.defineComponent)({name:"DIndexDesign",__name:"indexDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,containerAddComponent:Function,componentConfigInit:Function,componentConfigChange:Function,flowComponents:{type:Array,default:()=>[]},flowInit:Function,flowComponentConfigInit:Function,flowComponentConfigChange:Function,flowComponentConfigs:{type:Object,default:()=>({})},actions:{type:Object,default:()=>({})}},setup(e,{expose:A}){const{t}=(0,me.useAppInject)(),n=e,r=F=>{F.forEach(D=>{D.type==="d-input-flow"&&(D.config=D.config||{},D.config.flowComponents=n.flowComponents,D.config.flowInit=n.flowInit,D.config.flowComponentConfigInit=k=>{n.flowComponentConfigInit&&(k.designComponents=L.value,k.component=v.value,n.flowComponentConfigInit(k))},D.config.flowComponentConfigs=n.flowComponentConfigs,D.config.flowComponentConfigChange=n.flowComponentConfigChange),D.children&&r(D.children)})},a=(0,o.reactive)({name:"页面",id:"indexPage",type:"indexPage",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}});n.componentInit&&(a.config=n.componentInit("indexPage")||{});const u={},d=[];n.components.forEach(({children:F})=>{F.forEach(D=>{u[D.type]=D,D.dragType=D.dragType||"component",d.push({label:D.name,value:D.type})})});const g={};Object.keys(n.componentConfigs).forEach(F=>{const{hasBase:D}=u[F]||{hasBase:!1},k=[{id:"label",type:"j-input",config:{label:"名称"}}],N={type:"j-collapse",config:{defaultValue:[]},children:[]};D!==!1&&(N.children?.push({config:{label:"基础信息"},children:[...k]}),N.config?.defaultValue.push("_collapse0")),N.children?.push(...n.componentConfigs[F]),r(N.children||[]),g[F]=[N]});const h=F=>{v.value&&n.componentConfigChange&&n.componentConfigChange(v.value.type,{configRef:m,configData:v.value.config,...F})},B=(F,D)=>{n.componentConfigInit&&n.componentConfigInit(F,{configRef:m,...D})},w=(0,o.ref)(),m=(0,o.ref)(),{activedComponent:v,clearComponents:y,schemaComponentDic:I,designComponentList:L}=Hl(w,m,a,n.componentInit,B,g,u,n.containerAddComponent),T=(0,o.computed)(()=>v.value?.id!="form"?v.value?`${v.value.name}-${v.value.id}`:"":v.value?`${v.value.name}`:""),K=(0,o.ref)([]),b=n.components.length;for(let F=0;F<b;F++)K.value.push(F);(0,o.provide)("dui-design-provide",{designItemName:Dl});const O=()=>{y()},aA=()=>{n.componentInit&&(a.config=n.componentInit("indexPage")||{}),y()},Z=()=>(console.log("pValidate"),!0),cA=()=>Sl(a.config,a.children||[]),lA=F=>{const D=ww(F,u);a.config=D.pageConfig,a.children?.push(...D.componentList),Object.keys(D.componentDic).forEach(k=>{I[k]=D.componentDic[k]})},iA=(0,o.ref)(),oA=(0,o.ref)();(0,o.ref)(""),(0,o.reactive)({formConfig:{}});let tA=0;const x=F=>{if(oA.value)tA=0,oA.value.init(F);else{if(tA>600){console.warn("组件加载超时");return}tA++,setTimeout(()=>{x(F)},100)}},eA=()=>{},H=()=>{};return A({reset:aA,validate:Z,getSchema:cA,setSchema:lA,preview:()=>{const{componentList:F}=pw(Sl(a.config,a.children||[]));iA.value.open("页面预览","full"),(0,o.nextTick)(()=>{x(F)})},clear:O}),(F,D)=>{const k=(0,o.resolveComponent)("j-icon"),N=(0,o.resolveComponent)("d-drag-tool"),R=(0,o.resolveComponent)("el-collapse-item"),$=(0,o.resolveComponent)("el-collapse"),nA=(0,o.resolveComponent)("el-empty"),BA=(0,o.resolveComponent)("d-drag-index-list"),FA=(0,o.resolveComponent)("d-drag-container"),sA=(0,o.resolveComponent)("j-form"),Y=(0,o.resolveComponent)("j-page"),J=(0,o.resolveComponent)("j-layer");return(0,o.openBlock)(),(0,o.createElementBlock)("div",vw,[(0,o.createElementVNode)("div",yw,[(0,o.createElementVNode)("div",Qw,[(0,o.createVNode)($,{modelValue:K.value,"onUpdate:modelValue":D[0]||(D[0]=uA=>K.value=uA)},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.components,(uA,wA)=>((0,o.openBlock)(),(0,o.createBlock)(R,{key:wA,title:uA.name,name:wA},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(uA.children,(QA,_A)=>((0,o.openBlock)(),(0,o.createBlock)(N,{key:_A,config:QA},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("div",Ew,[(0,o.createVNode)(k,{class:"j-component-tool-icon",icon:QA.icon,size:14},null,8,["icon"]),(0,o.createElementVNode)("div",Fw,(0,o.toDisplayString)((0,o.unref)(t)(QA.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,o.createElementVNode)("div",Uw,[(0,o.createElementVNode)("div",bw,[(0,o.createVNode)(FA,{ref_key:"dragContainer",ref:w,class:"design-drag-container","is-component-container":!1,"component-data":a},{default:(0,o.withCtx)(()=>[!a.children||a.children.length===0?((0,o.openBlock)(),(0,o.createElementBlock)("div",Hw,[(0,o.createVNode)(nA,{description:(0,o.unref)(t)("请从左侧拖拽组件到此处"),"image-size":100},null,8,["description"])])):((0,o.openBlock)(),(0,o.createBlock)(BA,{key:1,"component-list":a.children,"global-config":a.config},null,8,["component-list","global-config"]))]),_:1},8,["component-data"])])]),(0,o.withDirectives)((0,o.createElementVNode)("div",Iw,[(0,o.createElementVNode)("div",_w,[(0,o.createElementVNode)("span",Sw,(0,o.toDisplayString)(`${T.value}`),1)]),(0,o.createElementVNode)("div",xw,[(0,o.createVNode)(sA,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:m,onChange:h},null,512)])],512),[[o.vShow,(0,o.unref)(v)&&g[(0,o.unref)(v).type]]]),(0,o.createVNode)(J,{ref_key:"previewLayerRef",ref:iA,"has-btns":!1,onOk:eA,onClosed:H},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(Y,{ref_key:"previewRef",ref:oA,actions:e.actions},null,8,["actions"])]),_:1},512)])}}}),Nw=Dw,Nl=dt(Nw,[Dl]),qA=Du({Vue:()=>o,Vue2:()=>{},del:()=>kw,install:()=>Lw,isVue2:()=>!1,isVue3:()=>!0,set:()=>Tw});Nu(qA,require("vue"));var fE=!1,gE=!0,hE=void 0;function Lw(){}function Tw(e,A,t){return Array.isArray(e)?(e.length=Math.max(e.length,A),e.splice(A,1,t),t):(e[A]=t,t)}function kw(e,A){if(Array.isArray(e)){e.splice(A,1);return}delete e[A]}var qr=(e,A)=>{const t=e.__vccOpts||e;for(const[n,r]of A)t[n]=r;return t},Mw=(0,qA.defineComponent)({name:"LineRuler",props:{scale:Number,thick:Number,palette:Object,index:Number,start:Number,vertical:Boolean,value:Number,isShowReferLine:Boolean},emits:["onMouseDown","onRelease","onRemove"],setup(e,{emit:A}){const t=(0,qA.ref)(0),n=(0,qA.ref)(!0);(0,qA.onMounted)(()=>{t.value=e.value});const r=B=>{n.value=B>=0},a=(0,qA.computed)(()=>{const B=(t.value-e.start)*e.scale;r(B);const w=B+"px";return e.vertical?{top:w}:{left:w}}),u=(0,qA.computed)(()=>{var B;const w=`1px solid ${(B=e.palette)==null?void 0:B.lineColor}`,m=e.vertical?{borderTop:w}:{borderLeft:w};return{cursor:e.isShowReferLine?e.vertical?"ns-resize":"ew-resize":"none",...m}}),d=(0,qA.computed)(()=>e.vertical?{left:e.thick+"px"}:{top:e.thick+"px"});return{startValue:t,showLine:n,offset:a,borderCursor:u,actionStyle:d,handleDown:B=>{const w=e.vertical?B.clientY:B.clientX,m=t.value;A("onMouseDown");const v=I=>{const L=e.vertical?I.clientY:I.clientX;t.value=Math.round(m+(L-w)/e.scale)},y=()=>{A("onRelease",t.value,e.index),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",y)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",y)},handleRemove:()=>{A("onRemove",e.index)}}}}),Ow={class:"value"};function Kw(e,A,t,n,r,a){return(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"line",style:(0,o.normalizeStyle)([e.offset,e.borderCursor]),onMousedown:A[1]||(A[1]=(...u)=>e.handleDown&&e.handleDown(...u))},[(0,o.createElementVNode)("div",{class:"action",style:(0,o.normalizeStyle)(e.actionStyle)},[(0,o.createElementVNode)("span",{class:"del",onClick:A[0]||(A[0]=(...u)=>e.handleRemove&&e.handleRemove(...u))},"×"),(0,o.createElementVNode)("span",Ow,(0,o.toDisplayString)(e.startValue),1)],4)],36)),[[o.vShow,e.showLine]])}var Rw=qr(Mw,[["render",Kw],["__scopeId","data-v-5dea28d6"]]),Vw=e=>e<=.25?40:e<=.5?20:e<=1?10:e<=2?5:e<=4?2:1,Ll=.83,Pw=(e,A,t,n,r,a)=>{const{scale:u,width:d,height:g,ratio:h,palette:B}=r,{bgColor:w,fontColor:m,shadowColor:v,longfgColor:y,shortfgColor:I}=B;if(e.scale(h,h),e.clearRect(0,0,d,g),e.fillStyle=w,e.fillRect(0,0,d,g),n){const iA=(t-A)*u,oA=n*u;e.fillStyle=v,a?e.fillRect(iA,0,oA,g*3/8):e.fillRect(0,iA,d*3/8,oA)}const L=Vw(u),T=L*u,K=L*10,b=K*u,O=Math.floor(A/L)*L,aA=Math.floor(A/K)*K,Z=(O-A)/L*T,cA=(aA-A)/K*b,lA=A+Math.ceil((a?d:g)/u);e.beginPath(),e.fillStyle=m,e.strokeStyle=y;for(let iA=aA,oA=0;iA<lA;iA+=K,oA++){const tA=cA+oA*b+.5;a?e.moveTo(tA,0):e.moveTo(0,tA),e.save(),a?e.translate(tA,g*.4):e.translate(d*.4,tA),a||e.rotate(-Math.PI/2),e.scale(Ll/h,Ll/h),e.fillText(iA.toString(),4*h,7*h),e.restore(),a?e.lineTo(tA,g*9/16):e.lineTo(d*9/16,tA)}e.stroke(),e.closePath(),e.beginPath(),e.strokeStyle=I;for(let iA=O,oA=0;iA<lA;iA+=L,oA++){const tA=Z+oA*T+.5;a?e.moveTo(tA,0):e.moveTo(0,tA),iA%K!==0&&(a?e.lineTo(tA,g*1/4):e.lineTo(d*1/4,tA))}e.stroke(),e.closePath(),e.setTransform(1,0,0,1,0,0)},Gw=(0,qA.defineComponent)({name:"CanvasRuler",props:{showIndicator:Boolean,valueNum:Number,scale:Number,ratio:Number,palette:Object,vertical:Boolean,start:Number,width:Number,height:Number,selectStart:Number,selectLength:Number},emits:["onAddLine","update:showIndicator","update:valueNum"],setup(e,{emit:A}){const t=(0,qA.reactive)({canvasContext:null});let n=1;const r=(0,qA.ref)(null);(0,qA.onMounted)(()=>{n=e.ratio||window.devicePixelRatio||1,a(),u(n),d(n)});const a=()=>{t.canvasContext=r.value&&r.value.getContext("2d")},u=h=>{if(r.value){r.value.width=e.width*h,r.value.height=e.height*h;const B=t.canvasContext;B&&(B.font=`${12*h}px -apple-system,
|
|
28
|
+
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),n}static addGrid(A,t={}){if(!A)return null;let n=A;if(n.gridstack){const r=n.gridstack;return t&&(r.opts={...r.opts,...t}),t.children!==void 0&&r.load(t.children),r}return(!A.classList.contains("grid-stack")||NA.addRemoveCB)&&(NA.addRemoveCB?n=NA.addRemoveCB(A,t,!0,!0):n=AA.createDiv(["grid-stack",t.class],A)),NA.init(t,n)}static registerEngine(A){NA.engineClass=A}get placeholder(){if(!this._placeholder){this._placeholder=AA.createDiv([this.opts.placeholderClass,Ue.itemClass,this.opts.itemClass]);const A=AA.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(A.textContent=this.opts.placeholderText)}return this._placeholder}constructor(A,t={}){this.el=A,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},A.gridstack=this,this.opts=t=t||{},A.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const n=AA.toNumber(A.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);const r=t.columnOpts;if(r){const g=r.breakpoints;!r.columnWidth&&!g?.length?delete t.columnOpts:(r.columnMax=r.columnMax||12,g?.length>1&&g.sort((h,B)=>(B.w||0)-(h.w||0)))}const a={...AA.cloneDeep(Ue),column:AA.toNumber(A.getAttribute("gs-column"))||Ue.column,minRow:n||AA.toNumber(A.getAttribute("gs-min-row"))||Ue.minRow,maxRow:n||AA.toNumber(A.getAttribute("gs-max-row"))||Ue.maxRow,staticGrid:AA.toBool(A.getAttribute("gs-static"))||Ue.staticGrid,sizeToContent:AA.toBool(A.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||Ue.draggable.handle},removableOptions:{accept:t.itemClass||Ue.removableOptions.accept,decline:Ue.removableOptions.decline}};A.getAttribute("gs-animate")&&(a.animate=AA.toBool(A.getAttribute("gs-animate"))),t=AA.defaults(t,a),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(t),t.rtl==="auto"&&(t.rtl=A.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const u=this.el.closest("."+Ue.itemClass)?.gridstackNode;if(u&&(u.subGrid=this,this.parentGridNode=u,this.el.classList.add("grid-stack-nested"),u.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial")this.cellHeight(void 0);else{typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==Ue.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit);const g=t.cellHeight;delete t.cellHeight,this.cellHeight(g)}t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=Me),this._setStaticClass();const d=t.engineClass||NA.engineClass||Hi;if(this.engine=new d({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:g=>{g.forEach(h=>{const B=h.el;B&&(h._removeDOM?(B&&B.remove(),delete h._removeDOM):this._writePosAttr(B,h))}),this._updateContainerHeight()}}),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(g=>this._prepareElement(g)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const g=t.children;delete t.children,g.length&&this.load(g)}this.setAnimation(),t.subGridDynamic&&!LA.pauseDrag&&(LA.pauseDrag=!0),t.draggable?.pause!==void 0&&(LA.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(A=this.opts){this.el.classList.add("gs-"+A.column),typeof A.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/A.column}%`)}addWidget(A){if(!A)return;if(typeof A=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(A.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(A);let t,n=A;if(n.grid=this,n.el?t=n.el:NA.addRemoveCB?t=NA.addRemoveCB(this.el,A,!0,!1):t=this.createWidgetDivs(n),!t)return;if(n=t.gridstackNode,n&&t.parentElement===this.el&&this.engine.nodes.find(a=>a._id===n._id))return t;const r=this._readAttr(t);return AA.defaults(A,r),this.engine.prepareNode(A),this.el.appendChild(t),this.makeWidget(t,A),t}createWidgetDivs(A){const t=AA.createDiv(["grid-stack-item",this.opts.itemClass]),n=AA.createDiv(["grid-stack-item-content"],t);return AA.lazyLoad(A)?A.visibleObservable||(A.visibleObservable=new IntersectionObserver(([r])=>{r.isIntersecting&&(A.visibleObservable?.disconnect(),delete A.visibleObservable,NA.renderCB(n,A),A.grid?.prepareDragDrop(A.el))}),window.setTimeout(()=>A.visibleObservable?.observe(t))):NA.renderCB(n,A),t}makeSubGrid(A,t,n,r=!0){let a=A.gridstackNode;if(a||(a=this.makeWidget(A).gridstackNode),a.subGrid?.el)return a.subGrid;let u,d=this;for(;d&&!u;)u=d.opts?.subGridOpts,d=d.parentGridNode?.grid;t=AA.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...u||{},...t||a.subGridOpts||{}}),a.subGridOpts=t;let g;t.column==="auto"&&(g=!0,t.column=Math.max(a.w||1,n?.w||1),delete t.columnOpts);let h=a.el.querySelector(".grid-stack-item-content"),B,w;if(r&&(this._removeDD(a.el),w={...a,x:0,y:0},AA.removeInternalForSave(w),delete w.subGridOpts,a.content&&(w.content=a.content,delete a.content),NA.addRemoveCB?B=NA.addRemoveCB(this.el,w,!0,!1):(B=AA.createDiv(["grid-stack-item"]),B.appendChild(h),h=AA.createDiv(["grid-stack-item-content"],a.el)),this.prepareDragDrop(a.el)),n){const v=g?t.column:a.w,y=a.h+n.h,I=a.el.style;I.transition="none",this.update(a.el,{w:v,h:y}),setTimeout(()=>I.transition=null)}const m=a.subGrid=NA.addGrid(h,t);return n?._moving&&(m._isTemp=!0),g&&(m._autoColumn=!0),r&&m.makeWidget(B,w),n&&(n._moving?window.setTimeout(()=>AA.simulateMouseEvent(n._event,"mouseenter",m.el),0):m.makeWidget(a.el,a)),this.resizeToContentCheck(!1,a),m}removeAsSubGrid(A){const t=this.parentGridNode?.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(n=>{n.x+=this.parentGridNode.x,n.y+=this.parentGridNode.y,t.makeWidget(n.el,n)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,A&&window.setTimeout(()=>AA.simulateMouseEvent(A._event,"mouseenter",t.el),0))}save(A=!0,t=!1,n=NA.saveCB,r){const a=this.engine.save(A,n,r);if(a.forEach(u=>{if(A&&u.el&&!u.subGrid&&!n)u.content=u.el.querySelector(".grid-stack-item-content")?.innerHTML,u.content||delete u.content;else if(!A&&!n&&delete u.content,u.subGrid?.el){const d=u.w||u.subGrid.getColumn(),g=u.subGrid.save(A,t,n,d);u.subGridOpts=t?g:{children:g},delete u.subGrid}delete u.el}),t){const u=AA.cloneDeep(this.opts);u.marginBottom===u.marginTop&&u.marginRight===u.marginLeft&&u.marginTop===u.marginRight&&(u.margin=u.marginTop,delete u.marginTop,delete u.marginRight,delete u.marginBottom,delete u.marginLeft),u.rtl===(this.el.style.direction==="rtl")&&(u.rtl="auto"),this._isAutoCellHeight&&(u.cellHeight="auto"),this._autoColumn&&(u.column="auto");const d=u._alwaysShowResizeHandle;return delete u._alwaysShowResizeHandle,d!==void 0?u.alwaysShowResizeHandle=d:delete u.alwaysShowResizeHandle,AA.removeInternalAndSame(u,Ue),u.children=a,u}return a}load(A,t=NA.addRemoveCB||!0){A=AA.cloneDeep(A);const n=this.getColumn();A.forEach(B=>{B.w=B.w||B.minW||1,B.h=B.h||B.minH||1}),A=AA.sort(A),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let r=0;A.forEach(B=>{r=Math.max(r,(B.x||0)+B.w)}),r>this.engine.defaultColumn&&(this.engine.defaultColumn=r),r>n&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=A,this.engine.columnChanged(r,n,this.responseLayout),A=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(A,r,!0));const a=NA.addRemoveCB;typeof t=="function"&&(NA.addRemoveCB=t);const u=[];this.batchUpdate();const d=!this.engine.nodes.length,g=d&&this.opts.animate;g&&this.setAnimation(!1),!d&&t&&[...this.engine.nodes].forEach(B=>{B.id&&(AA.find(A,B.id)||(NA.addRemoveCB&&NA.addRemoveCB(this.el,B,!1,!1),u.push(B),this.removeWidget(B.el,!0,!1)))}),this.engine._loading=!0;const h=[];return this.engine.nodes=this.engine.nodes.filter(B=>AA.find(A,B.id)?(h.push(B),!1):!0),A.forEach(B=>{const w=AA.find(h,B.id);if(w){if(AA.shouldSizeToContent(w)&&(B.h=w.h),this.engine.nodeBoundFix(B),(B.autoPosition||B.x===void 0||B.y===void 0)&&(B.w=B.w||w.w,B.h=B.h||w.h,this.engine.findEmptyPosition(B)),this.engine.nodes.push(w),AA.samePos(w,B)&&this.engine.nodes.length>1&&(this.moveNode(w,{...B,forceCollide:!0}),AA.copyPos(B,w)),this.update(w.el,B),B.subGridOpts?.children){const m=w.el.querySelector(".grid-stack");m&&m.gridstack&&m.gridstack.load(B.subGridOpts.children)}}else t&&this.addWidget(B)}),delete this.engine._loading,this.engine.removedNodes=u,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,a?NA.addRemoveCB=a:delete NA.addRemoveCB,g&&this.setAnimation(!0,!0),this}batchUpdate(A=!0){return this.engine.batchUpdate(A),A||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(A=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!A||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const r=AA.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/r)}const n=parseInt(this.el.getAttribute("gs-current-row"));return n?Math.round(this.el.getBoundingClientRect().height/n):this.opts.cellHeight}cellHeight(A){if(A!==void 0&&this._isAutoCellHeight!==(A==="auto")&&(this._isAutoCellHeight=A==="auto",this._updateResizeEvent()),(A==="initial"||A==="auto")&&(A=void 0),A===void 0){const n=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;A=this.cellWidth()+n}const t=AA.parseHeight(A);return this.opts.cellHeightUnit===t.unit&&this.opts.cellHeight===t.h?this:(this.opts.cellHeightUnit=t.unit,this.opts.cellHeight=t.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(A=!1){return A&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){const A=this.opts.columnOpts;if(!A||!A.columnWidth&&!A.breakpoints?.length)return!1;const t=this.getColumn();let n=t;const r=this._widthOrContainer(!0);if(A.columnWidth)n=Math.min(Math.round(r/A.columnWidth)||1,A.columnMax);else{n=A.columnMax;let a=0;for(;a<A.breakpoints.length&&r<=A.breakpoints[a].w;)n=A.breakpoints[a++].c||t}if(n!==t){const a=A.breakpoints?.find(u=>u.c===n);return this.column(n,a?.layout||A.layout),!0}return!1}compact(A="compact",t=!0){return this.engine.compact(A,t),this._triggerChangeEvent(),this}column(A,t="moveScale"){if(!A||A<1||this.opts.column===A)return this;const n=this.getColumn();return this.opts.column=A,this.engine?(this.engine.column=A,this.el.classList.remove("gs-"+n),this._updateColumnVar(),this.engine.columnChanged(n,A,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=t,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(A=>A.matches("."+this.opts.itemClass)&&!A.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(A=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),A?this.el.parentNode.removeChild(this.el):(this.removeAll(A),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(A){return this.opts.float!==A&&(this.opts.float=this.engine.float=A,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(A,t=!1){const n=this.el.getBoundingClientRect();let r;t?r={top:n.top+document.documentElement.scrollTop,left:n.left}:r={top:this.el.offsetTop,left:this.el.offsetLeft};const a=A.left-r.left,u=A.top-r.top,d=n.width/this.getColumn(),g=n.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(a/d),y:Math.floor(u/g)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(A,t,n,r){return this.engine.isAreaEmpty(A,t,n,r)}makeWidget(A,t){const n=NA.getElement(A);if(!n||n.gridstackNode)return n;n.parentElement||this.el.appendChild(n),this._prepareElement(n,!0,t);const r=n.gridstackNode;this._updateContainerHeight(),r.subGridOpts&&this.makeSubGrid(n,r.subGridOpts,void 0,!1);let a;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(a=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),a&&delete this._ignoreLayoutsNodeChange,n}on(A,t){return A.indexOf(" ")!==-1?(A.split(" ").forEach(n=>this.on(n,t)),this):(A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable"?(A==="enable"||A==="disable"?this._gsEventHandler[A]=n=>t(n):this._gsEventHandler[A]=n=>{n.detail&&t(n,n.detail)},this.el.addEventListener(A,this._gsEventHandler[A])):A==="drag"||A==="dragstart"||A==="dragstop"||A==="resizestart"||A==="resize"||A==="resizestop"||A==="dropped"||A==="resizecontent"?this._gsEventHandler[A]=t:console.error("GridStack.on("+A+") event not supported"),this)}off(A){return A.indexOf(" ")!==-1?(A.split(" ").forEach(t=>this.off(t)),this):((A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable")&&this._gsEventHandler[A]&&this.el.removeEventListener(A,this._gsEventHandler[A]),delete this._gsEventHandler[A],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(A=>this.off(A)),this}removeWidget(A,t=!0,n=!0){return A?(NA.getElements(A).forEach(r=>{if(r.parentElement&&r.parentElement!==this.el)return;let a=r.gridstackNode;a||(a=this.engine.nodes.find(u=>r===u.el)),a&&(t&&NA.addRemoveCB&&NA.addRemoveCB(this.el,a,!1,!1),delete r.gridstackNode,this._removeDD(r),this.engine.removeNode(a,t,n),t&&r.parentElement&&r.remove())}),n&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(A=!0,t=!0){return this.engine.nodes.forEach(n=>{A&&NA.addRemoveCB&&NA.addRemoveCB(this.el,n,!1,!1),delete n.el.gridstackNode,this.opts.staticGrid||this._removeDD(n.el)}),this.engine.removeAll(A,t),t&&this._triggerRemoveEvent(),this}setAnimation(A=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(A)}):A?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=A,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(A,t=!0,n=!0){return!!this.opts.staticGrid===A?this:(A?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(r=>{this.prepareDragDrop(r.el),r.subGrid&&n&&r.subGrid.setStatic(A,t,n)}),t&&this._setStaticClass(),this)}updateOptions(A){const t=this.opts;return A===t?this:(A.acceptWidgets!==void 0&&(t.acceptWidgets=A.acceptWidgets,this._setupAcceptWidget()),A.animate!==void 0&&this.setAnimation(A.animate),A.cellHeight&&this.cellHeight(A.cellHeight),A.class!==void 0&&A.class!==t.class&&(t.class&&this.el.classList.remove(t.class),A.class&&this.el.classList.add(A.class)),A.columnOpts?(this.opts.columnOpts=A.columnOpts,this.checkDynamicColumn()):A.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof A.column=="number"&&this.column(A.column),A.margin!==void 0&&this.margin(A.margin),A.staticGrid!==void 0&&this.setStatic(A.staticGrid),A.disableDrag!==void 0&&!A.staticGrid&&this.enableMove(!A.disableDrag),A.disableResize!==void 0&&!A.staticGrid&&this.enableResize(!A.disableResize),A.float!==void 0&&this.float(A.float),A.row!==void 0?(t.minRow=t.maxRow=t.row=A.row,this._updateContainerHeight()):(A.minRow!==void 0&&(t.minRow=A.minRow,this._updateContainerHeight()),A.maxRow!==void 0&&(t.maxRow=A.maxRow)),A.lazyLoad!==void 0&&(t.lazyLoad=A.lazyLoad),A.children?.length&&this.load(A.children),this)}update(A,t){return NA.getElements(A).forEach(n=>{const r=n?.gridstackNode;if(!r)return;const a={...AA.copyPos({},r),...AA.cloneDeep(t)};this.engine.nodeBoundFix(a),delete a.autoPosition;const u=["x","y","w","h"];let d;if(u.some(B=>a[B]!==void 0&&a[B]!==r[B])&&(d={},u.forEach(B=>{d[B]=a[B]!==void 0?a[B]:r[B],delete a[B]})),!d&&(a.minW||a.minH||a.maxW||a.maxH)&&(d={}),a.content!==void 0){const B=n.querySelector(".grid-stack-item-content");B&&B.textContent!==a.content&&(r.content=a.content,NA.renderCB(B,a),r.subGrid?.el&&(B.appendChild(r.subGrid.el),r.subGrid._updateContainerHeight())),delete a.content}let g=!1,h=!1;for(const B in a)B[0]!=="_"&&r[B]!==a[B]&&(r[B]=a[B],g=!0,h=h||!this.opts.staticGrid&&(B==="noResize"||B==="noMove"||B==="locked"));if(AA.sanitizeMinMax(r),d){const B=d.w!==void 0&&d.w!==r.w;this.moveNode(r,d),B&&r.subGrid?r.subGrid.onResize(this.hasAnimationCSS()?r.w:void 0):this.resizeToContentCheck(B,r),delete r._orig}(d||g)&&this._writeAttr(n,r),h&&this.prepareDragDrop(r.el),NA.updateCB&&NA.updateCB(r)}),this}moveNode(A,t){const n=A._updating;n||this.engine.cleanNodes().beginUpdate(A),this.engine.moveNode(A,t),this._updateContainerHeight(),n||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(A){if(!A||(A.classList.remove("size-to-content-max"),!A.clientHeight))return;const t=A.gridstackNode;if(!t)return;const n=t.grid;if(!n||A.parentElement!==n.el)return;const r=n.getCellHeight(!0);if(!r)return;let a=t.h?t.h*r:A.clientHeight,u;if(t.resizeToContentParent&&(u=A.querySelector(t.resizeToContentParent)),u||(u=A.querySelector(NA.resizeToContentParent)),!u)return;const d=A.clientHeight-u.clientHeight,g=t.h?t.h*r-d:u.clientHeight;let h;if(t.subGrid){h=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const m=t.subGrid.el.getBoundingClientRect(),v=A.getBoundingClientRect();h+=m.top-v.top}else{if(t.subGridOpts?.children?.length)return;{const m=u.firstElementChild;if(!m){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${NA.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}h=m.getBoundingClientRect().height||g}}if(g===h)return;a+=h-g;let B=Math.ceil(a/r);const w=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;w&&B>w&&(B=w,A.classList.add("size-to-content-max")),t.minH&&B<t.minH?B=t.minH:t.maxH&&B>t.maxH&&(B=t.maxH),B!==t.h&&(n._ignoreLayoutsNodeChange=!0,n.moveNode(t,{h:B}),delete n._ignoreLayoutsNodeChange)}resizeToContentCBCheck(A){NA.resizeToContentCB?NA.resizeToContentCB(A):this.resizeToContent(A)}rotate(A,t){return NA.getElements(A).forEach(n=>{const r=n.gridstackNode;if(!AA.canBeRotated(r))return;const a={w:r.h,h:r.w,minH:r.minW,minW:r.minH,maxH:r.maxW,maxW:r.maxH};if(t){const d=t.left>0?Math.floor(t.left/this.cellWidth()):0,g=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;a.x=r.x+d-(r.h-(g+1)),a.y=r.y+g-d}Object.keys(a).forEach(d=>{a[d]===void 0&&delete a[d]});const u=r._orig;this.update(n,a),r._orig=u}),this}margin(A){if(!(typeof A=="string"&&A.split(" ").length>1)){const t=AA.parseHeight(A);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=A,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(A){return this.engine.willItFit(A)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const A=this.engine.getDirtyNodes(!0);return A&&A.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(A),this._triggerEvent("change",A)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty});const A=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",A)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){const A=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",A)}return this}_triggerEvent(A,t){const n=t?new CustomEvent(A,{bubbles:!1,detail:t}):new Event(A);let r=this;for(;r.parentGridNode;)r=r.parentGridNode.grid;return r.el.dispatchEvent(n),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const A=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const n=this.opts.cellHeight,r=this.opts.cellHeightUnit;if(!n)return this;if(!A&&!this.opts.minRow){const a=AA.parseHeight(getComputedStyle(this.el).minHeight);if(a.h>0&&a.unit===r){const u=Math.floor(a.h/n);t<u&&(t=u)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[A?"minHeight":"height"]=t*n+r),A&&AA.shouldSizeToContent(A)&&A.grid.resizeToContentCBCheck(A.el),this}_prepareElement(A,t=!1,n){n=n||this._readAttr(A),A.gridstackNode=n,n.el=A,n.grid=this,n=this.engine.addNode(n,t),this._writeAttr(A,n),A.classList.add(Ue.itemClass,this.opts.itemClass);const r=AA.shouldSizeToContent(n);return r?A.classList.add("size-to-content"):A.classList.remove("size-to-content"),r&&this.resizeToContentCheck(!1,n),AA.lazyLoad(n)||this.prepareDragDrop(n.el),this}_writePosAttr(A,t){return(!t._moving&&!t._resizing||this._placeholder===A)&&(A.style.top=t.y?t.y===1?"var(--gs-cell-height)":`calc(${t.y} * var(--gs-cell-height))`:null,A.style.left=t.x?t.x===1?"var(--gs-column-width)":`calc(${t.x} * var(--gs-column-width))`:null,A.style.width=t.w>1?`calc(${t.w} * var(--gs-column-width))`:null,A.style.height=t.h>1?`calc(${t.h} * var(--gs-cell-height))`:null),A.setAttribute("gs-x",String(t.x)),A.setAttribute("gs-y",String(t.y)),t.w>1?A.setAttribute("gs-w",String(t.w)):A.removeAttribute("gs-w"),t.h>1?A.setAttribute("gs-h",String(t.h)):A.removeAttribute("gs-h"),this}_writeAttr(A,t){if(!t)return this;this._writePosAttr(A,t);const n={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const r in n)t[r]?A.setAttribute(n[r],String(t[r])):A.removeAttribute(n[r]);return this}_readAttr(A,t=!0){const n={};n.x=AA.toNumber(A.getAttribute("gs-x")),n.y=AA.toNumber(A.getAttribute("gs-y")),n.w=AA.toNumber(A.getAttribute("gs-w")),n.h=AA.toNumber(A.getAttribute("gs-h")),n.autoPosition=AA.toBool(A.getAttribute("gs-auto-position")),n.noResize=AA.toBool(A.getAttribute("gs-no-resize")),n.noMove=AA.toBool(A.getAttribute("gs-no-move")),n.locked=AA.toBool(A.getAttribute("gs-locked"));const r=A.getAttribute("gs-size-to-content");r&&(r==="true"||r==="false"?n.sizeToContent=AA.toBool(r):n.sizeToContent=parseInt(r,10)),n.id=A.getAttribute("gs-id"),n.maxW=AA.toNumber(A.getAttribute("gs-max-w")),n.minW=AA.toNumber(A.getAttribute("gs-min-w")),n.maxH=AA.toNumber(A.getAttribute("gs-max-h")),n.minH=AA.toNumber(A.getAttribute("gs-min-h")),t&&(n.w===1&&A.removeAttribute("gs-w"),n.h===1&&A.removeAttribute("gs-h"),n.maxW&&A.removeAttribute("gs-max-w"),n.minW&&A.removeAttribute("gs-min-w"),n.maxH&&A.removeAttribute("gs-max-h"),n.minH&&A.removeAttribute("gs-min-h"));for(const a in n){if(!n.hasOwnProperty(a))return;!n[a]&&n[a]!==0&&a!=="sizeToContent"&&delete n[a]}return n}_setStaticClass(){const A=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...A),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...A),this.el.removeAttribute("gs-static")),this}onResize(A=this.el?.clientWidth){if(!A||this.prevWidth===A)return;this.prevWidth=A,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(n=>{n.subGrid&&n.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(A=!1,t=void 0){if(this.engine){if(A&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)AA.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(n=>AA.shouldSizeToContent(n))){const n=[...this.engine.nodes];this.batchUpdate(),n.forEach(r=>{AA.shouldSizeToContent(r)&&this.resizeToContentCBCheck(r.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(A=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(n=>n.sizeToContent));return!A&&t&&!this.resizeObserver?(this._sizeThrottle=AA.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(A||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(A=".grid-stack-item"){return AA.getElement(A)}static getElements(A=".grid-stack-item"){return AA.getElements(A)}static getGridElement(A){return NA.getElement(A)}static getGridElements(A){return AA.getElements(A)}_initMargin(){let A,t=0,n=[];typeof this.opts.margin=="string"&&(n=this.opts.margin.split(" ")),n.length===2?(this.opts.marginTop=this.opts.marginBottom=n[0],this.opts.marginLeft=this.opts.marginRight=n[1]):n.length===4?(this.opts.marginTop=n[0],this.opts.marginRight=n[1],this.opts.marginBottom=n[2],this.opts.marginLeft=n[3]):(A=AA.parseHeight(this.opts.margin),this.opts.marginUnit=A.unit,t=this.opts.margin=A.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(a=>{this.opts[a]===void 0?this.opts[a]=t:(A=AA.parseHeight(this.opts[a]),this.opts[a]=A.h,delete this.opts.margin)}),this.opts.marginUnit=A.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const r=this.el.style;return r.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),r.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),r.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),r.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return we}static setupDragIn(A,t,n,r=document){t?.pause!==void 0&&(LA.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof A=="string"?AA.getElements(A,r):A).forEach((a,u)=>{we.isDraggable(a)||we.dragIn(a,t),n?.[u]&&(a.gridstackNode=n[u])})}movable(A,t){return this.opts.staticGrid?this:(NA.getElements(A).forEach(n=>{const r=n.gridstackNode;r&&(t?delete r.noMove:r.noMove=!0,this.prepareDragDrop(r.el))}),this)}resizable(A,t){return this.opts.staticGrid?this:(NA.getElements(A).forEach(n=>{const r=n.gridstackNode;r&&(t?delete r.noResize:r.noResize=!0,this.prepareDragDrop(r.el))}),this)}disable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!1,A),this.enableResize(!1,A),this._triggerEvent("disable"),this}enable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!0,A),this.enableResize(!0,A),this._triggerEvent("enable"),this}enableMove(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableMove(A,t)}),this)}enableResize(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableResize(A,t)}),this)}cancelDrag(){const A=this._placeholder?.gridstackNode;A&&(A._isExternal?(A._isAboutToRemove=!0,this.engine.removeNode(A)):A._isAboutToRemove&&NA._itemRemoving(A.el,!1),this.engine.restoreInitial())}_removeDD(A){return we.draggable(A,"destroy").resizable(A,"destroy"),A.gridstackNode&&delete A.gridstackNode._initDD,delete A.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return we.droppable(this.el,"destroy"),this;let A,t;const n=(r,a,u)=>{u=u||a;const d=u.gridstackNode;if(!d)return;if(!d.grid?.el){u.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const m=u.getBoundingClientRect();u.style.left=m.x+(this.dragTransform.xScale-1)*(r.clientX-m.x)/this.dragTransform.xScale+"px",u.style.top=m.y+(this.dragTransform.yScale-1)*(r.clientY-m.y)/this.dragTransform.yScale+"px",u.style.transformOrigin="0px 0px"}let{top:g,left:h}=u.getBoundingClientRect();const B=this.el.getBoundingClientRect();h-=B.left,g-=B.top;const w={position:{top:g*this.dragTransform.xScale,left:h*this.dragTransform.yScale}};if(d._temporaryRemoved){if(d.x=Math.max(0,Math.round(h/t)),d.y=Math.max(0,Math.round(g/A)),delete d.autoPosition,this.engine.nodeBoundFix(d),!this.engine.willItFit(d)){if(d.autoPosition=!0,!this.engine.willItFit(d)){we.off(a,"drag");return}d._willFitPos&&(AA.copyPos(d,d._willFitPos),delete d._willFitPos)}this._onStartMoving(u,r,w,d,t,A)}else this._dragOrResize(u,r,w,d,t,A)};return we.droppable(this.el,{accept:r=>{const a=r.gridstackNode||this._readAttr(r,!1);if(a?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let u=!0;if(typeof this.opts.acceptWidgets=="function")u=this.opts.acceptWidgets(r);else{const d=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;u=r.matches(d)}if(u&&a&&this.opts.maxRow){const d={w:a.w,h:a.h,minW:a.minW,minH:a.minH};u=this.engine.willItFit(d)}return u}}).on(this.el,"dropover",(r,a,u)=>{let d=u?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._temporaryRemoved)return!1;if(d?._sidebarOrig&&(d.w=d._sidebarOrig.w,d.h=d._sidebarOrig.h),d?.grid&&d.grid!==this&&!d._temporaryRemoved&&d.grid._leave(a,u),u=u||a,t=this.cellWidth(),A=this.getCellHeight(!0),!d){const B=u.getAttribute("data-gs-widget")||u.getAttribute("gridstacknode");if(B){try{d=JSON.parse(B)}catch{console.error("Gridstack dropover: Bad JSON format: ",B)}u.removeAttribute("data-gs-widget"),u.removeAttribute("gridstacknode")}d||(d=this._readAttr(u)),d._sidebarOrig={w:d.w,h:d.h}}d.grid||(d.el||(d={...d}),d._isExternal=!0,u.gridstackNode=d);const g=d.w||Math.round(u.offsetWidth/t)||1,h=d.h||Math.round(u.offsetHeight/A)||1;return d.grid&&d.grid!==this?(a._gridstackNodeOrig||(a._gridstackNodeOrig=d),a.gridstackNode=d={...d,w:g,h,grid:this},delete d.x,delete d.y,this.engine.cleanupNode(d).nodeBoundFix(d),d._initDD=d._isExternal=d._temporaryRemoved=!0):(d.w=g,d.h=h,d._temporaryRemoved=!0),NA._itemRemoving(d.el,!1),we.on(a,"drag",n),n(r,a,u),!1}).on(this.el,"dropout",(r,a,u)=>{const d=u?.gridstackNode||a.gridstackNode;return d&&(!d.grid||d.grid===this)&&(this._leave(a,u),this._isTemp&&this.removeAsSubGrid(d)),!1}).on(this.el,"drop",(r,a,u)=>{const d=u?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._isExternal)return!1;const g=!!this.placeholder.parentElement,h=a!==u;this.placeholder.remove(),delete this.placeholder.gridstackNode,g&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const B=a._gridstackNodeOrig;if(delete a._gridstackNodeOrig,g&&B?.grid&&B.grid!==this){const m=B.grid;m.engine.removeNodeFromLayoutCache(B),m.engine.removedNodes.push(B),m._triggerRemoveEvent()._triggerChangeEvent(),m.parentGridNode&&!m.engine.nodes.length&&m.opts.subGridDynamic&&m.removeAsSubGrid()}if(!d||(g&&(this.engine.cleanupNode(d),d.grid=this),delete d.grid?._isTemp,we.off(a,"drag"),u!==a?(u.remove(),a=u):a.remove(),this._removeDD(a),!g))return!1;const w=d.subGrid?.el?.gridstack;return AA.copyPos(d,this._readAttr(this.placeholder)),AA.removePositioningStyles(a),h&&(d.content||d.subGridOpts||NA.addRemoveCB)?(delete d.el,a=this.addWidget(d)):(this._prepareElement(a,!0,d),this.el.appendChild(a),this.resizeToContentCheck(!1,d),w&&(w.parentGridNode=d),this._updateContainerHeight()),this.engine.addedNodes.push(d),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...r,type:"dropped"},B&&B.grid?B:void 0,d),!1}),this}static _itemRemoving(A,t){if(!A)return;const n=A?A.gridstackNode:void 0;!n?.grid||A.classList.contains(n.grid.opts.removableOptions.decline)||(t?n._isAboutToRemove=!0:delete n._isAboutToRemove,t?A.classList.add("grid-stack-item-removing"):A.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const A=document.querySelector(this.opts.removable);return A?(!this.opts.staticGrid&&!we.isDroppable(A)&&we.droppable(A,this.opts.removableOptions).on(A,"dropover",(t,n)=>NA._itemRemoving(n,!0)).on(A,"dropout",(t,n)=>NA._itemRemoving(n,!1)),this):this}prepareDragDrop(A,t=!1){const n=A?.gridstackNode;if(!n)return;const r=n.noMove||this.opts.disableDrag,a=n.noResize||this.opts.disableResize,u=this.opts.staticGrid||r&&a;if((t||u)&&(n._initDD&&(this._removeDD(A),delete n._initDD),u&&A.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!t))return this;if(!n._initDD){let d,g;const h=(m,v)=>{this.triggerEvent(m,m.target),d=this.cellWidth(),g=this.getCellHeight(!0),this._onStartMoving(A,m,v,n,d,g)},B=(m,v)=>{this._dragOrResize(A,m,v,n,d,g)},w=m=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete n._moving,delete n._resizing,delete n._event,delete n._lastTried;const v=n.w!==n._orig.w,y=m.target;if(!(!y.gridstackNode||y.gridstackNode.grid!==this)){if(n.el=y,n._isAboutToRemove){const I=A.gridstackNode.grid;I._gsEventHandler[m.type]&&I._gsEventHandler[m.type](m,y),I.engine.nodes.push(n),I.removeWidget(A,!0,!0)}else AA.removePositioningStyles(y),n._temporaryRemoved?(this._writePosAttr(y,n),this.engine.addNode(n)):this._writePosAttr(y,n),this.triggerEvent(m,y);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),m.type==="resizestop"&&(Number.isInteger(n.sizeToContent)&&(n.sizeToContent=n.h),this.resizeToContentCheck(v,n))}};we.draggable(A,{start:h,stop:w,drag:B}).resizable(A,{start:h,stop:w,resize:B}),n._initDD=!0}return we.draggable(A,r?"disable":"enable").resizable(A,a?"disable":"enable"),this}_onStartMoving(A,t,n,r,a,u){if(this.engine.cleanNodes().beginUpdate(r),this._writePosAttr(this.placeholder,r),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=r,r.grid?.el)this.dragTransform=AA.getValuesFromTransformedElement(A);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const d=this.placeholder.closest(".grid-stack");this.dragTransform=AA.getValuesFromTransformedElement(d)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(r.el=this.placeholder,r._lastUiPosition=n.position,r._prevYPix=n.position.top,r._moving=t.type==="dragstart",r._resizing=t.type==="resizestart",delete r._lastTried,t.type==="dropover"&&r._temporaryRemoved&&(this.engine.addNode(r),r._moving=!0),this.engine.cacheRects(a,u,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const d=this.getColumn()-r.x,g=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-r.y;we.resizable(A,"option","minWidth",a*Math.min(r.minW||1,d)).resizable(A,"option","minHeight",u*Math.min(r.minH||1,g)).resizable(A,"option","maxWidth",a*Math.min(r.maxW||Number.MAX_SAFE_INTEGER,d)).resizable(A,"option","maxWidthMoveLeft",a*Math.min(r.maxW||Number.MAX_SAFE_INTEGER,r.x+r.w)).resizable(A,"option","maxHeight",u*Math.min(r.maxH||Number.MAX_SAFE_INTEGER,g)).resizable(A,"option","maxHeightMoveUp",u*Math.min(r.maxH||Number.MAX_SAFE_INTEGER,r.y+r.h))}}_dragOrResize(A,t,n,r,a,u){const d={...r._orig};let g,h=this.opts.marginLeft,B=this.opts.marginRight,w=this.opts.marginTop,m=this.opts.marginBottom;const v=Math.round(u*.1),y=Math.round(a*.1);if(h=Math.min(h,y),B=Math.min(B,y),w=Math.min(w,v),m=Math.min(m,v),t.type==="drag"){if(r._temporaryRemoved)return;const L=n.position.top-r._prevYPix;r._prevYPix=n.position.top,this.opts.draggable.scroll!==!1&&AA.updateScrollPosition(A,n.position,L);const T=n.position.left+(n.position.left>r._lastUiPosition.left?-B:h),K=n.position.top+(n.position.top>r._lastUiPosition.top?-m:w);d.x=Math.round(T/a),d.y=Math.round(K/u);const b=this._extraDragRow;if(this.engine.collide(r,d)){const O=this.getRow();let aA=Math.max(0,d.y+r.h-O);this.opts.maxRow&&O+aA>this.opts.maxRow&&(aA=Math.max(0,this.opts.maxRow-O)),this._extraDragRow=aA}else this._extraDragRow=0;if(this._extraDragRow!==b&&this._updateContainerHeight(),r.x===d.x&&r.y===d.y)return}else if(t.type==="resize"){if(d.x<0||(AA.updateScrollResize(t,A,u),d.w=Math.round((n.size.width-h)/a),d.h=Math.round((n.size.height-w)/u),r.w===d.w&&r.h===d.h)||r._lastTried&&r._lastTried.w===d.w&&r._lastTried.h===d.h)return;const L=n.position.left+h,T=n.position.top+w;d.x=Math.round(L/a),d.y=Math.round(T/u),g=!0}r._event=t,r._lastTried=d;const I={x:n.position.left+h,y:n.position.top+w,w:(n.size?n.size.width:r.w*a)-h-B,h:(n.size?n.size.height:r.h*u)-w-m};if(this.engine.moveNodeCheck(r,{...d,cellWidth:a,cellHeight:u,rect:I,resizing:g})){r._lastUiPosition=n.position,this.engine.cacheRects(a,u,w,B,m,h),delete r._skipDown,g&&r.subGrid&&r.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const L=t.target;r._sidebarOrig||this._writePosAttr(L,r),this.triggerEvent(t,L)}}triggerEvent(A,t){let n=this;for(;n.parentGridNode;)n=n.parentGridNode.grid;n._gsEventHandler[A.type]&&n._gsEventHandler[A.type](A,t)}_leave(A,t){t=t||A;const n=t.gridstackNode;if(!n||(t.style.transform=t.style.transformOrigin=null,we.off(A,"drag"),n._temporaryRemoved))return;n._temporaryRemoved=!0,this.engine.removeNode(n),n.el=n._isExternal&&t?t:A;const r=n._sidebarOrig;n._isExternal&&this.engine.cleanupNode(n),n._sidebarOrig=r,this.opts.removable===!0&&NA._itemRemoving(A,!0),A._gridstackNodeOrig?(A.gridstackNode=A._gridstackNodeOrig,delete A._gridstackNodeOrig):n._isExternal&&this.engine.restoreInitial()}};tn.renderCB=(e,A)=>{e&&A?.content&&(e.textContent=A.content)},tn.resizeToContentParent=".grid-stack-item-content",tn.Utils=AA,tn.Engine=Hi,tn.GDRev="12.4.2";var zm={class:"d-layout"},Xm=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-locked","gs-no-resize","gs-no-move","gs-min-w","gs-min-h","gs-max-w","gs-max-h"],$m=(0,o.defineComponent)({name:"DLayout",__name:"layout",props:{modelValue:{default:()=>[]},column:{default:24},cellHeight:{default:60},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},animate:{type:Boolean,default:!0},float:{type:Boolean,default:!0},removable:{type:Boolean,default:!1},removableOptions:{}},emits:["update:modelValue","added","removed","changed","dragStart","dragStop","resizeStart","resizeStop"],setup(e,{expose:A,emit:t}){const n=e,r=t,a=(0,o.ref)();let u=null;const d=async()=>{a.value&&(await(0,o.nextTick)(),u&&u.destroy(!1),u=tn.init({column:n.column,cellHeight:n.cellHeight,disableDrag:!(n.draggable&&!n.disable),disableResize:!(n.resizable&&!n.disable),animate:n.animate,float:n.float,removable:n.removable,removableOptions:n.removableOptions},a.value),u.on("added",(m,v)=>{const y=v[0];y&&(r("added",g(y)),B())}),u.on("removed",(m,v)=>{const y=v[0];y&&(r("removed",g(y)),B())}),u.on("change",()=>{B(),r("changed",(u?.save()||[]).map(m=>g(m)))}),u.on("dragstart",(m,v)=>{v&&r("dragStart",m,g(v.gridstackNode||v))}),u.on("dragstop",(m,v)=>{v&&r("dragStop",m,g(v.gridstackNode||v))}),u.on("resizestart",(m,v)=>{v&&r("resizeStart",m,g(v.gridstackNode||v))}),u.on("resizestop",(m,v)=>{v&&r("resizeStop",m,g(v.gridstackNode||v))}))},g=m=>({id:m.id||m.el?.getAttribute("gs-id")||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1,locked:m.locked||!1,noResize:m.noResize||!1,noMove:m.noMove||!1,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}),h=async()=>{if(!u||!a.value)return;await(0,o.nextTick)();const m=u.engine.nodes;new Set(m.map(y=>y.id));const v=new Set(n.modelValue.map(y=>y.id));m.forEach(y=>{if(!v.has(y.id||"")){const I=y.el;I&&u&&u.removeWidget(I,!1)}}),n.modelValue.forEach(y=>{const I=m.find(L=>L.id===y.id);if(I)I.el&&u&&u.update(I.el,{x:y.x,y:y.y,w:y.w,h:y.h,locked:y.locked,noResize:y.noResize,noMove:y.noMove,minW:y.minW,minH:y.minH,maxW:y.maxW,maxH:y.maxH});else{if(!a.value||!u)return;const L=a.value.querySelector(`[gs-id="${y.id}"]`);L&&u.makeWidget(L)}})},B=()=>{u&&r("update:modelValue",u.save().map(m=>{const v={id:m.id||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1},y=n.modelValue.find(I=>I.id===v.id);return y&&Object.keys(y).forEach(I=>{["id","x","y","w","h"].includes(I)||(v[I]=y[I])}),v}))},w=(0,o.computed)(()=>n.modelValue);return(0,o.watch)(()=>n.modelValue,async()=>{u&&(await(0,o.nextTick)(),h())},{deep:!0}),(0,o.watch)(()=>[n.column,n.cellHeight,n.draggable,n.resizable,n.disable,n.animate,n.float,n.removable],()=>{d()}),(0,o.onMounted)(()=>{d()}),(0,o.onBeforeUnmount)(()=>{u&&(u.destroy(!1),u=null)}),A({addItem:async m=>{if(u&&a.value){await(0,o.nextTick)();const v=a.value.querySelector(`[gs-id="${m.id}"]`);v&&(u.makeWidget(v),u.update(v,{x:m.x,y:m.y,w:m.w,h:m.h,locked:m.locked,noResize:m.noResize,noMove:m.noMove,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}))}},removeItem:m=>{if(u&&a.value){const v=a.value.querySelector(`[gs-id="${m}"]`);v&&u.removeWidget(v,!1)}},clear:()=>{u&&u.removeAll(!1)},getGrid:()=>u}),(m,v)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",zm,[(0,o.createElementVNode)("div",{ref_key:"gridContainerRef",ref:a},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(w.value,y=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:y.id,"gs-id":y.id,"gs-x":y.x,"gs-y":y.y,"gs-w":y.w,"gs-h":y.h,"gs-locked":y.locked,"gs-no-resize":y.noResize,"gs-no-move":y.noMove,"gs-min-w":y.minW,"gs-min-h":y.minH,"gs-max-w":y.maxW,"gs-max-h":y.maxH,class:"d-layout-item"},[(0,o.renderSlot)(m.$slots,"item",{item:y})],8,Xm))),128))],512)]))}}),Ym=$m,Ql=dt(Ym),ZA=(e,A="",t=!1)=>t?`${e}pt`:A?`${e}${A}`:`${e}px`,ze=(e,A=0)=>e==null||isNaN(e)?0:Number(Number(e).toFixed(A)),Wm=e=>e*3/4,Jm=e=>e*4/3,Zm=["onMousedown"],jm={key:2,class:"d-draggable__mask"},qm=(0,o.defineComponent)({name:"DDraggable",__name:"draggable",props:{index:{},mask:{type:Boolean,default:!0},scale:{default:1},readonly:{type:Boolean,default:!1},resize:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},step:{default:1},zIndex:{default:1},isActiveBgTransparent:{type:Boolean,default:!1},left:{default:0},top:{default:0},width:{},height:{},activeFlag:{type:Boolean,default:!1},isPt:{type:Boolean,default:!1}},emits:["focus","blur","over","out"],setup(e,{expose:A,emit:t}){let n=0;const r=e,a=t,u=[{classname:"left"},{classname:"right"},{classname:"top"},{classname:"bottom"},{classname:"top-left"},{classname:"top-right"},{classname:"bottom-left"},{classname:"bottom-right"}],d={right:{resizeX:!0},left:{resizeX:!0,moveLeft:!0,invertX:!0},top:{resizeY:!0,moveTop:!0,invertY:!0},bottom:{resizeY:!0},"bottom-right":{resizeX:!0,resizeY:!0},"bottom-left":{resizeX:!0,resizeY:!0,moveLeft:!0,invertX:!0},"top-right":{resizeX:!0,resizeY:!0,moveTop:!0,invertY:!0},"top-left":{resizeX:!0,resizeY:!0,moveLeft:!0,moveTop:!0,invertX:!0,invertY:!0}},g=(0,o.ref)(),h=(0,o.ref)(),B=()=>h.value?.firstElementChild,w=(0,o.ref)(0),m=(0,o.ref)(0),v=(0,o.ref)(0),y=(0,o.ref)(0),I=(0,o.ref)(!1),L=(0,o.ref)(!1),T=(0,o.ref)(!1);let K=null;const b=(0,o.computed)(()=>r.scale),O=(0,o.computed)(()=>!r.readonly&&!r.disabled),aA=(0,o.computed)(()=>O.value&&(T.value||L.value||I.value)),Z=(0,o.computed)(()=>!r.disabled&&r.mask),cA=(0,o.computed)(()=>{const j=8*b.value;return{width:ZA(j,"",r.isPt),height:ZA(j,"",r.isPt)}}),lA=(0,o.computed)(()=>({fontSize:ZA(14*b.value,"",r.isPt),padding:ZA(4*b.value,"",r.isPt),"border-radius":ZA(2*b.value,"",r.isPt)})),iA=(0,o.computed)(()=>{const j={zIndex:T.value?9999:r.zIndex,top:ZA(y.value,"",r.isPt),width:ZA(w.value,"",r.isPt),height:ZA(m.value,"",r.isPt),left:ZA(v.value,"",r.isPt)};return T.value&&r.isActiveBgTransparent&&O.value&&(j.backgroundColor="color-mix(in srgb, var(--j-color-primary-bg) 60%, transparent)"),j});(0,o.watch)(()=>r.width,j=>x(j)),(0,o.watch)(()=>r.height,j=>eA(j)),(0,o.watch)(()=>r.left,j=>H(j)),(0,o.watch)(()=>r.top,j=>X(j)),(0,o.watch)(w,j=>{g.value&&(g.value.style.width=ZA(j,"",r.isPt),r.resize&&B()?.style&&(B().style.width=ZA(j,"",r.isPt)))}),(0,o.watch)(m,j=>{g.value&&(g.value.style.height=ZA(j,"",r.isPt),r.resize&&B()?.style&&(B().style.height=ZA(j,"",r.isPt)))}),(0,o.watch)(()=>r.activeFlag,j=>{oA(j)});const oA=j=>{T.value=j},tA=j=>j===void 0?0:r.isPt?Jm(j):j,x=j=>{w.value=ze(tA(j))||(B()?.offsetWidth??0)},eA=j=>{m.value=ze(tA(j))||(B()?.offsetHeight??0)},H=j=>{v.value=ze(tA(j))},X=j=>{y.value=ze(tA(j))},F=()=>({index:r.index,width:BA(w.value),height:BA(m.value),left:BA(v.value),top:BA(y.value)}),D=j=>{const _=F();switch(j){case"focus":a("focus",_);break;case"blur":a("blur",_);break;case"over":a("over",_);break;case"out":a("out",_);break}},k=()=>{x(r.width),eA(r.height),H(r.left),X(r.top),oA(r.activeFlag)},N=j=>{v.value=j},R=j=>{y.value=j},$=j=>{const _=8*b.value/2,U={};return j.split("-").forEach(S=>{U[S]=ZA(-_,"",r.isPt)}),U},nA=j=>{L.value=j},BA=j=>r.isPt?Wm(j):j,FA=(j=!0)=>{n+=1,I.value=!0,j&&D("focus")},sA=()=>{n=Math.max(0,n-1),I.value=!1,D("blur")},Y=()=>{K?.(),K=null},J=(j,_)=>{let U=j.clientX,S=j.clientY,G=0,P=0,dA=0,fA=!1;const bA=document.body.style.userSelect;document.body.style.userSelect="none";const pA=()=>{if(dA=0,G===0&&P===0)return;const KA=G,JA=P;G=0,P=0,_(KA,JA)},DA=KA=>{I.value=!0;const JA=KA.clientX-U,ee=KA.clientY-S;if(U=KA.clientX,S=KA.clientY,!fA){fA=!0,_(JA,ee);return}G+=JA,P+=ee,dA||(dA=requestAnimationFrame(pA))},OA=()=>{dA&&(cancelAnimationFrame(dA),pA()),Y(),sA()};Y(),document.addEventListener("mousemove",DA),document.addEventListener("mouseup",OA),K=()=>{dA&&(cancelAnimationFrame(dA),dA=0),document.body.style.userSelect=bA,document.removeEventListener("mousemove",DA),document.removeEventListener("mouseup",OA)}},uA=(j,_,U)=>{if(j.resizeX){let S=_*r.step;j.invertX&&(S=-S),j.moveLeft&&(v.value=ze(v.value-S)),w.value=ze(w.value+S)}if(j.resizeY){let S=U*r.step;j.invertY&&(S=-S),j.moveTop&&(y.value=ze(y.value-S)),m.value=ze(m.value+S)}},wA=(j,_)=>{if(!O.value)return;const U=d[_];FA(!1),J(j,(S,G)=>uA(U,S,G))},QA=()=>{n>0||(L.value=!1,D("out"))},_A=()=>{n>0||O.value&&(L.value=!0,D("over"))},gA=j=>{if(!O.value)return;const _=T.value;T.value=!0,FA(!_),J(j,(U,S)=>{v.value=ze(v.value+U*r.step),y.value=ze(y.value+S*r.step)})};return(0,o.onMounted)(()=>{k()}),(0,o.onBeforeUnmount)(()=>{Y()}),A({setActive:oA,setLeft:N,setTop:R,setOverActive:nA}),(j,_)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(["d-draggable",{"d-draggable--active":(T.value||L.value)&&O.value},{"d-draggable--pt":e.isPt&&O.value},{"d-draggable--move":I.value},{"d-draggable--click":e.disabled}]),onMousedown:(0,o.withModifiers)(gA,["stop"]),onMouseenter:(0,o.withModifiers)(_A,["stop"]),onMouseleave:(0,o.withModifiers)(QA,["stop"]),style:(0,o.normalizeStyle)(iA.value)},[(0,o.createElementVNode)("div",{class:"d-draggable__wrapper",ref_key:"wrapper",ref:g},[aA.value?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[e.isPt?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:"d-draggable__line d-draggable__line--label",style:(0,o.normalizeStyle)(lA.value)}," X:"+(0,o.toDisplayString)(v.value)+", Y:"+(0,o.toDisplayString)(y.value),5))],64)):(0,o.createCommentVNode)("",!0),O.value?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:1},(0,o.renderList)(u,U=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:U.classname},[T.value?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["d-draggable__range",`d-draggable__range--${U.classname}`]),style:(0,o.normalizeStyle)([cA.value,$(U.classname)]),onMousedown:(0,o.withModifiers)(S=>wA(S,U.classname),["stop"])},null,46,Zm)):(0,o.createCommentVNode)("",!0)],64))),64)):(0,o.createCommentVNode)("",!0),(0,o.createElementVNode)("div",{class:"d-draggable__item",ref_key:"item",ref:h},[(0,o.renderSlot)(j.$slots,"default")],512),Z.value?((0,o.openBlock)(),(0,o.createElementBlock)("div",jm)):(0,o.createCommentVNode)("",!0)],512)],38))}}),Aw=qm,El=dt(Aw),Fl=e=>{const A=ew(e.components);return{formConfig:e.form,componentList:A}},Ul=(e,A)=>{let t={},n=[];const r={},a=e;t=a.form;const u={};return a.components.forEach(d=>{const g=A[d.type];u[d.containerId]=u[d.containerId]||[];const h={id:d.id,name:d.name,type:d.type,dragType:g?.dragType||"component",componentName:g?.componentName||"",runtimeType:g?.runtimeType,groupId:d.groupId,config:d.config,isInput:g?.isInput!==!1,containerId:d.containerId,level:d.level};g?.dragType==="container"&&(h.children=[]),r[h.id]=h,u[d.containerId].push(h)}),Object.keys(u).forEach(d=>{r[d]&&(r[d].children=u[d])}),n=u.form||[],{formConfig:t,componentList:n,componentDic:r}},jr=(e,A)=>{const t={ver:"j1",form:{...e},components:[],db:{}};return bl(A||[],t.components),t},bl=(e,A)=>{e.forEach(t=>{if(t.type==="pkey")return;const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&bl(t.children||[],A),A.push(n)})},ew=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const r={id:n.id,type:n.runtimeType,slot:n.groupId,config:{rule:[]}};n.config&&Object.keys(n.config).forEach(a=>{if(a==="required"){n.config.required&&r.config?.rule?.push({required:!0,message:n.config.requiredMsg||"请输入"});return}if(a==="patterns"){n.config.patterns.forEach(u=>{u.reg&&u.msg&&r.config?.rule?.push({pattern:new RegExp(u.reg),message:`请输入${u.msg||""}`})});return}r.config[a]=n.config[a]}),n.type==="pkey"&&(r.config.isPkey=!0),A[n.containerId].push(r),t[n.id]=r}),Object.keys(A).forEach(n=>{const r=t[n];if(r){const a=A[n];if(["j-tabs","j-collapse"].includes(r.type||"")&&r.config?.groups){const u={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const g=d.slot.toString();u[g]||(u[g]=[]),delete d.slot,u[g].push(d)}}),r.children=r.config.groups.map(d=>{const g=u[d._i]||[],h={label:d.label};d.active&&r.type==="j-collapse"&&(h.active=d.active);let B;if(r.type==="j-tabs"&&r.config?.tabKey&&r.config?.options.length>0){const m=r.config.options.find(v=>v.label===d._i);m&&(B=({formData:v})=>({display:m.value.includes(v[r.config?.tabKey||""])?m.display:!m.display}))}const w={config:h,children:g};return B&&(w.getCompConfig=B),w}),delete r.config.groups}else r.children=a}}),A.form},Hl=(e,A,t,n,r,a,u,d)=>{const g=(0,o.ref)(),h=(0,o.reactive)({}),B=(0,o.computed)(()=>{const F=[];return Object.keys(h).forEach(D=>{const k=h[D];k.dragType==="component"&&k.type!=="pkey"&&F.push(k)}),F}),w=(F=[],D)=>{const k=A?.value?.init;typeof k=="function"&&k(F,D)},m=F=>r?r(F,{componentDic:h,components:B.value,configData:g.value.config}):{},v=(F,D)=>{if(g.value?.id===F)return;const k=h[F]||D;if(k?g.value=k:F===t.id?g.value=t:g.value=null,g.value){const N=a[g.value.type];N?(w(N,g.value.config),m(g.value.type)):w([])}else w([]);D&&re("dragClick",{id:D.id})},y=()=>e.value.$el.getBoundingClientRect(),I=F=>F===t.id?t:h[F]||{},L=F=>{const D=[];if(F===t.id)D.push({id:F,name:t.name});else{const k=h[F];if(k){D.push({id:F,name:k.name});const N=L(k.containerId);D.push(...N)}}return D},T=(F,D)=>{const k=h[D];if(k===void 0)return!1;const N=k.containerId;return F===N?!0:N===t.id?!1:T(F,N)},K=F=>n?n(F)||{}:{},b=(F,D,k,N)=>{if(d){const R=I(F);return d(k.componentType,{container:R,groupId:D,configData:k},N)}return!1},O=({name:F,type:D,dragType:k,isInput:N,componentName:R,runtimeType:$},nA,BA,FA,sA=!1)=>{const Y=K(D);if(Y.id=ft(),Y.span=24,Y.componentType=D,aA(nA,Y.componentType))return;b(nA,FA,Y,!0);const J={id:Y.id,name:F,type:D,runtimeType:$,componentName:R||"",dragType:k||"component",containerId:nA,isInput:!!N,level:h[nA]?h[nA].level+1:1,config:Y,isNewAdd:!sA,groupId:FA};return J.dragType==="container"&&(J.children=[]),h[J.id]=J,I(nA).children?.splice(BA,0,J),J},aA=(F,D)=>!!(I(F).config.componentType==="gridtable"&&["divider","label","text","textEditor","viewTable","card","collapse","tabs","qrcode","barcode","tableLayout"].includes(D)),Z=(F,D,k=!1)=>{let N=null;const R=I(F).children,$=R?.findIndex(nA=>nA.id===D)||0;if(k&&R&&R.length>1){let nA=$+1;$>0&&(nA=$-1),N=R[nA]}return R?.splice($,1),N?.id},cA=(F,D,k,N)=>{const R=I(D).children,$=F.containerId!==D;F.containerId=D,F.groupId=N,R?.splice(k,0,F),b(D,N,F.config,$)&&(eA(),v(F.id))},lA=F=>{let D="";const k=I(F);return k&&(k.children&&k.children.length>0&&k.children.forEach(N=>{lA(N.id)}),D=Z(k.containerId,F,!0)||"",delete h[F]),g.value&&g.value.id===F&&(g.value=null,A.value.init([])),D},iA=(F,D=[])=>{const k=I(F);if(k&&k.children&&k.children.length>0){const N=[];k.children.forEach(R=>{R.groupId&&D.includes(R.groupId)&&N.push(R.id)}),N.forEach(R=>{lA(R),delete h[R]})}},oA=(F,D)=>{const k=I(F);k&&(k.children&&k.children.length>0&&k.children.forEach(N=>{N.groupId===D&&lA(N.id)}),delete h[F])},tA=F=>{const D=zt(I(F));D.id=ft(),D.config.id=D.id,h[D.id]=D;const k=I(D.containerId).children,N=k?.findIndex(R=>R.id===F)||0;k?.splice(N+1,0,D)},x=()=>{t.children=[],Lu(h),g.value&&(re("dragClick",{id:""}),g.value=null,A.value.init([]))},eA=()=>{g.value&&(re("dragClick",{id:""}),g.value=null,A.value.init([]))},H=F=>{const D=g.value,k=I(D.containerId).children,N=k?.findIndex(R=>R.id===D.id)||0;lA(D.id),(0,o.nextTick)(()=>{const R=u[F],$=K(F);$.id=D.id,$.span=D.config.span,$.componentType=F,$.table=D.config.table,$.field=D.config.field,D.config.isSubTable&&($.isSubTable=D.config.isSubTable);const nA={id:$.id,name:R.name,type:F,runtimeType:R.runtimeType,componentName:R.componentName||"",dragType:D.dragType,groupId:D.groupId,containerId:D.containerId,isInput:D.isInput,level:D.level,config:$,isNewAdd:!0};h[nA.id]=nA,k?.splice(N,0,nA)})},X=F=>{re("dragAddByClick",F)};return(0,o.provide)("d-drag-design-provide",{activedComponent:g,getDesignLocals:y,getComponent:I,getParentComponents:L,isMyChildComponent:T,selectComponent:v,addComponent:O,deleteComponent:lA,copyComponent:tA,removeComponentFromContainer:Z,addComponentToContainer:cA,top:t,deleteChildren:oA,deleteChildrens:iA}),{activedComponent:g,clearComponents:x,changeComponent:H,schemaComponentDic:h,clearSelect:eA,addComponent:O,addComponentByTable:X,designComponentList:B}},tw=(0,o.defineComponent)({__name:"formDesignItem",props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){const A=e,{t}=(0,me.useAppInject)(),n=(0,o.computed)(()=>A.componentData.config?.notShowLabel?"":A.componentData.config?.label||""),r=(0,o.computed)(()=>n.value===""?0:A.componentData.config?.labelWidth===void 0&&A.globalConfig.labelWidth!==void 0?`${A.globalConfig.labelWidth}px`:A.componentData.config?.labelWidth?`${A.componentData.config?.labelWidth}px`:void 0),a=(0,o.computed)(()=>{const u={...A.componentData?.config};return u.size===void 0&&(u.size=A.globalConfig.size),u.display=!0,u});return(u,d)=>{const g=(0,o.resolveComponent)("j-comp"),h=(0,o.resolveComponent)("el-form-item");return e.componentData.isInput?((0,o.openBlock)(),(0,o.createBlock)(h,{key:0,class:(0,o.normalizeClass)(`${e.componentData?.componentName||e.componentData?.type}-form-item`),"label-width":r.value,label:(0,o.unref)(t)(n.value),"label-position":A.componentData.config?.labelPosition||e.globalConfig?.labelPosition,rules:e.componentData.config?.required?[{required:!0,message:""}]:[]},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(g,{type:e.componentData?.componentName||e.componentData?.type,config:a.value,modelValue:e.componentData?.config.defaultValue},null,8,["type","config","modelValue"])]),_:1},8,["class","label-width","label","label-position","rules"])):e.componentData?.children?((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(e.componentData?.componentName),(0,o.mergeProps)({key:1},e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"])):((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(e.componentData?.componentName),(0,o.normalizeProps)((0,o.mergeProps)({key:2},e.componentData?.config)),null,16))}}}),Il=tw,nw={class:"d-form-design j-block"},rw={class:"d-form-design-left"},ow={class:"d-form-design-component-list"},iw={class:"j-component-tool"},sw={class:"j-component-tool-name"},aw={class:"d-form-design-center"},lw={class:"d-form-design-container"},cw={key:0,class:"j-block d-form-design-empty"},uw={class:"d-form-design-right"},dw={class:"d-form-design-panel-title"},fw={style:{margin:"0","font-size":"14px"}},gw={class:"d-form-design-panel"},hw=(0,o.defineComponent)({name:"DFormDesign",__name:"formDesign",props:{components:{default:()=>[]},componentConfigs:{default:()=>({})},componentInit:{type:Function,default:void 0},containerAddComponent:{type:Function,default:void 0},componentConfigInit:{type:Function,default:void 0},componentConfigChange:{type:Function,default:void 0},componentConfigValidate:{type:Function,default:void 0},flowComponents:{default:()=>[]},flowInit:{type:Function,default:void 0},flowComponentConfigInit:{type:Function,default:void 0},flowComponentConfigChange:{type:Function,default:void 0},flowComponentConfigs:{default:()=>({})},actions:{}},setup(e,{expose:A}){const t=e,{t:n,error:r}=(0,me.useAppInject)(),a=(0,o.reactive)({name:"表单",id:"form",type:"form",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}}),u=(0,o.ref)([]),d=t.components.length;for(let sA=0;sA<d;sA++)u.value.push(sA);t.componentInit&&(a.config=t.componentInit("form")||{});const g={},h=[];t.components.forEach(({children:sA})=>{sA.forEach(Y=>{g[Y.type]=Y,Y.dragType=Y.dragType||"component",Y.isInput!==!1&&(Y.isInput=!0,h.push({label:Y.name,value:Y.type}))})});const B=sA=>{sA.forEach(Y=>{Y.type==="d-input-flow"&&(Y.config=Y.config||{},Y.config.flowComponents=t.flowComponents,Y.config.flowInit=t.flowInit,Y.config.flowComponentConfigInit=J=>{t.flowComponentConfigInit&&(J.designComponents=aA.value,J.component=T.value,t.flowComponentConfigInit(J))},Y.config.flowComponentConfigs=t.flowComponentConfigs,Y.config.flowComponentConfigChange=t.flowComponentConfigChange),Y.children&&B(Y.children)})},w={};Object.keys(t.componentConfigs||{}).forEach(sA=>{const{hasBase:Y,isInput:J,hasTwoPlaceholder:uA,hasPlaceholder:wA,hasSpan:QA,hasLabel:_A,bindTable:gA,labelTitle:j}=g[sA]||{hasBase:!1},_=[{id:"componentType",type:"j-select",config:{label:"类型",allowClear:!1,display:J,options:h}},{id:"label",type:"j-input",config:{label:j||"标题"},getCompConfig:({formData:S})=>({display:_A!==!1&&!S.notShowLabel})},{id:"notShowLabel",type:"j-switch",config:{label:"不显示"+(j||"标题"),activeValue:!0,inactiveValue:!1},getCompConfig:({formData:S})=>({display:_A!==!1&&!S.isSubTable})},{id:"labelWidth",type:"j-number",config:{label:"标题宽度"},getCompConfig:({formData:S})=>({display:J&&!S.notShowLabel&&!S.isSubTable})},{id:"labelPosition",type:"j-radio",config:{label:"标题对齐",options:[{value:"right",label:"右"},{value:"left",label:"左"},{value:"top",label:"顶部"}]},getCompConfig:({formData:S})=>({display:J&&!S.notShowLabel&&!S.isSubTable})},{id:"placeholder",type:"j-input",config:{display:J&&!uA&&wA!==!1,label:"占位提示"}},{id:"startPlaceholder",type:"j-input",config:{display:!!uA,label:"开始占位"}},{id:"endPlaceholder",type:"j-input",config:{display:!!uA,label:"结束占位"}},{id:"span",type:"j-slider",config:{label:"表单栅栏",min:6,max:24,showTooltip:!0,step:6,showStops:!0,defautValue:24},getCompConfig:({formData:S})=>({display:QA!==!1&&!S.isSubTable})},{id:"width",type:"j-number",config:{label:"单元格宽度",min:1},getCompConfig:({formData:S})=>({display:!!S.isSubTable})}],U={type:"j-collapse",config:{defaultValue:[]},children:[]};Y!==!1&&U.children?.push({config:{label:"基础信息"},children:[..._]}),U.children?.push(...t.componentConfigs[sA]),U.children?.forEach((S,G)=>{U.config?.defaultValue.push(`_collapse${G}`)}),B(U.children||[]),w[sA]=[U]});const m=sA=>{const{value:Y}=sA||{};sA.id==="componentType"&&b(Y),T.value&&t.componentConfigChange&&t.componentConfigChange(T.value.type,{configRef:L,configData:T.value.config,...sA})},v=(sA,Y)=>{t.componentConfigInit&&t.componentConfigInit(sA,{configRef:L,...Y})},y=(sA,Y,J)=>{let uA=!1;return Y.container.type==="gridtable"?(!Y.configData.isSubTable||J)&&(Y.configData.isSubTable=!0,uA=!0):Y.configData.isSubTable&&(uA=!0,Y.configData.isSubTable=!1),t.containerAddComponent&&t.containerAddComponent(sA,Y),uA},I=(0,o.ref)(),L=(0,o.ref)(),{activedComponent:T,clearComponents:K,changeComponent:b,schemaComponentDic:O,designComponentList:aA}=Hl(I,L,a,t.componentInit,v,w,g,y),Z=(0,o.computed)(()=>T.value?.id!="form"?T.value?`${T.value.name}-${T.value.id}`:"":T.value?`${T.value.name}`:"");(0,o.provide)("dui-design-provide",{designItemName:Il});const cA=()=>{K()},lA=()=>{t.componentInit&&(a.config=t.componentInit("form")||{}),K()},iA=()=>jr(a.config,a.children||[]),oA=sA=>{const Y=Ul(sA,g);a.config=Y.formConfig,a.children?.push(...Y.componentList),Object.keys(Y.componentDic).forEach(J=>{O[J]=Y.componentDic[J]})},tA=()=>x(jr(a.config,a.children||[]).components),x=sA=>{for(const Y of sA)if(t.componentConfigValidate&&!t.componentConfigValidate(Y.type,{configData:Y.config,errorTip:r}))return!1;return!0},eA=(0,o.ref)(),H=(0,o.ref)(),X=(0,o.ref)({});let F=0;const D=sA=>{if(H.value)F=0,H.value.init(sA||[]);else{if(F>600){console.warn("表单组件加载超时");return}F++,setTimeout(()=>{D(sA)},100)}},k=()=>{},N=()=>{};return A({getSchema:()=>iA(),setSchema:sA=>oA(sA),reset:()=>lA(),validate:()=>tA(),preview:()=>{const sA=jr(a.config,a.children||[]);eA.value.open("表单预览",sA.form.layerType);const{formConfig:Y,componentList:J}=Fl(sA);X.value=Y,(0,o.nextTick)(()=>{D(J)})},clear:cA}),(sA,Y)=>{const J=(0,o.resolveComponent)("j-icon"),uA=(0,o.resolveComponent)("d-drag-tool"),wA=(0,o.resolveComponent)("el-collapse-item"),QA=(0,o.resolveComponent)("el-collapse"),_A=(0,o.resolveComponent)("el-empty"),gA=(0,o.resolveComponent)("d-drag-form-list"),j=(0,o.resolveComponent)("el-row"),_=(0,o.resolveComponent)("d-drag-container"),U=(0,o.resolveComponent)("j-form"),S=(0,o.resolveComponent)("j-layer");return(0,o.openBlock)(),(0,o.createElementBlock)("div",nw,[(0,o.createElementVNode)("div",rw,[(0,o.createElementVNode)("div",ow,[(0,o.createVNode)(QA,{modelValue:u.value,"onUpdate:modelValue":Y[0]||(Y[0]=G=>u.value=G)},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.components,(G,P)=>((0,o.openBlock)(),(0,o.createBlock)(wA,{key:P,title:G.name,name:P},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(G.children,(dA,fA)=>((0,o.openBlock)(),(0,o.createBlock)(uA,{key:fA,config:dA},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("div",iw,[(0,o.createVNode)(J,{class:"j-component-tool-icon",icon:dA.icon,size:14},null,8,["icon"]),(0,o.createElementVNode)("div",sw,(0,o.toDisplayString)((0,o.unref)(n)(dA.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,o.createElementVNode)("div",aw,[(0,o.createElementVNode)("div",lw,[(0,o.createVNode)(_,{ref_key:"dragContainer",ref:I,class:"d-form-design-drag-container","is-component-container":!1,"component-data":a},{default:(0,o.withCtx)(()=>[!a.children||a.children.length===0?((0,o.openBlock)(),(0,o.createElementBlock)("div",cw,[(0,o.createVNode)(_A,{description:(0,o.unref)(n)("请从左侧拖拽组件到此处"),"image-size":100},null,8,["description"])])):((0,o.openBlock)(),(0,o.createBlock)(j,{key:1},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(gA,{"component-list":a.children,"global-config":a.config},null,8,["component-list","global-config"])]),_:1}))]),_:1},8,["component-data"])])]),(0,o.withDirectives)((0,o.createElementVNode)("div",uw,[(0,o.createElementVNode)("div",dw,[(0,o.createElementVNode)("span",fw,(0,o.toDisplayString)(`${Z.value}`),1)]),(0,o.createElementVNode)("div",gw,[(0,o.createVNode)(U,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:L,onChange:m},null,512)])],512),[[o.vShow,(0,o.unref)(T)]]),(0,o.createVNode)(S,{ref_key:"previewFormLayerRef",ref:eA,width:1e3,height:800,onOk:k,onClosed:N},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(U,{config:X.value,"is-preview":!0,ref_key:"previewFormRef",ref:H,actions:e.actions},null,8,["config","actions"])]),_:1},512)])}}}),Bw=hw,_l=dt(Bw,[Il]),Sl=(e,A)=>{const t={ver:"V3",indexPage:{...e},components:[]};return xl(A||[],t.components),t},xl=(e,A)=>{e.forEach(t=>{const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&xl(t.children||[],A),A.push(n)})},pw=e=>{const A=mw(e.components);return{pageConfig:e.indexPage,componentList:A}},mw=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const r={id:n.id,type:n.runtimeType,slot:n.groupId,config:{}};n.config&&Object.keys(n.config).forEach(a=>{r.config[a]=n.config[a]}),A[n.containerId].push(r),t[n.id]=r}),Object.keys(A).forEach(n=>{const r=t[n];if(r){const a=A[n];if(["j-tabs","j-collapse"].includes(r.type||"")&&r.config?.groups){const u={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const g=d.slot.toString();u[g]||(u[g]=[]),delete d.slot,u[g].push(d)}}),r.children=r.config.groups.map(d=>{const g=u[d._i]||[];return{config:{label:d.label},children:g}}),delete r.config.groups}else r.children=a}}),A.indexPage||[]},ww=(e,A)=>{let t={},n=[];const r={};if(e.ver==="V3"){const a=e;t=a.indexPage;const u={};a.components.forEach(d=>{const g=A[d.type];if(!g)return;u[d.containerId]=u[d.containerId]||[];const h={id:d.id,name:d.name,type:d.type,dragType:g.dragType||"component",componentName:g.componentName||"",runtimeType:g.runtimeType,groupId:d.groupId,config:d.config,isInput:!1,containerId:d.containerId,level:d.level};r[h.id]=h,u[d.containerId].push(h),h.dragType==="container"&&(h.children=[])}),Object.keys(u).forEach(d=>{r[d]&&(r[d].children=u[d])}),n=u.indexPage||[]}return{pageConfig:t,componentList:n,componentDic:r}},Cw=(0,o.defineComponent)({name:"DIndexDesignItem",__name:"indexDesignItem",props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){return(A,t)=>((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(e.componentData?.componentName),(0,o.mergeProps)(e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"]))}}),Dl=Cw,vw={class:"d-index-design j-block"},yw={class:"d-index-design-left"},Qw={class:"j-component-list"},Ew={class:"j-component-tool"},Fw={class:"j-component-tool-name"},Uw={class:"d-index-design-center"},bw={class:"design-container"},Hw={key:0,class:"j-block design-empty"},Iw={class:"d-index-design-right"},_w={class:"d-index-design-panel-title"},Sw={style:{margin:"0","font-size":"14px"}},xw={class:"d-index-design-panel"},Dw=(0,o.defineComponent)({name:"DIndexDesign",__name:"indexDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,containerAddComponent:Function,componentConfigInit:Function,componentConfigChange:Function,flowComponents:{type:Array,default:()=>[]},flowInit:Function,flowComponentConfigInit:Function,flowComponentConfigChange:Function,flowComponentConfigs:{type:Object,default:()=>({})},actions:{type:Object,default:()=>({})}},setup(e,{expose:A}){const{t}=(0,me.useAppInject)(),n=e,r=F=>{F.forEach(D=>{D.type==="d-input-flow"&&(D.config=D.config||{},D.config.flowComponents=n.flowComponents,D.config.flowInit=n.flowInit,D.config.flowComponentConfigInit=k=>{n.flowComponentConfigInit&&(k.designComponents=L.value,k.component=v.value,n.flowComponentConfigInit(k))},D.config.flowComponentConfigs=n.flowComponentConfigs,D.config.flowComponentConfigChange=n.flowComponentConfigChange),D.children&&r(D.children)})},a=(0,o.reactive)({name:"页面",id:"indexPage",type:"indexPage",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}});n.componentInit&&(a.config=n.componentInit("indexPage")||{});const u={},d=[];n.components.forEach(({children:F})=>{F.forEach(D=>{u[D.type]=D,D.dragType=D.dragType||"component",d.push({label:D.name,value:D.type})})});const g={};Object.keys(n.componentConfigs).forEach(F=>{const{hasBase:D}=u[F]||{hasBase:!1},k=[{id:"label",type:"j-input",config:{label:"名称"}}],N={type:"j-collapse",config:{defaultValue:[]},children:[]};D!==!1&&(N.children?.push({config:{label:"基础信息"},children:[...k]}),N.config?.defaultValue.push("_collapse0")),N.children?.push(...n.componentConfigs[F]),r(N.children||[]),g[F]=[N]});const h=F=>{v.value&&n.componentConfigChange&&n.componentConfigChange(v.value.type,{configRef:m,configData:v.value.config,...F})},B=(F,D)=>{n.componentConfigInit&&n.componentConfigInit(F,{configRef:m,...D})},w=(0,o.ref)(),m=(0,o.ref)(),{activedComponent:v,clearComponents:y,schemaComponentDic:I,designComponentList:L}=Hl(w,m,a,n.componentInit,B,g,u,n.containerAddComponent),T=(0,o.computed)(()=>v.value?.id!="form"?v.value?`${v.value.name}-${v.value.id}`:"":v.value?`${v.value.name}`:""),K=(0,o.ref)([]),b=n.components.length;for(let F=0;F<b;F++)K.value.push(F);(0,o.provide)("dui-design-provide",{designItemName:Dl});const O=()=>{y()},aA=()=>{n.componentInit&&(a.config=n.componentInit("indexPage")||{}),y()},Z=()=>(console.log("pValidate"),!0),cA=()=>Sl(a.config,a.children||[]),lA=F=>{const D=ww(F,u);a.config=D.pageConfig,a.children?.push(...D.componentList),Object.keys(D.componentDic).forEach(k=>{I[k]=D.componentDic[k]})},iA=(0,o.ref)(),oA=(0,o.ref)();(0,o.ref)(""),(0,o.reactive)({formConfig:{}});let tA=0;const x=F=>{if(oA.value)tA=0,oA.value.init(F);else{if(tA>600){console.warn("组件加载超时");return}tA++,setTimeout(()=>{x(F)},100)}},eA=()=>{},H=()=>{};return A({reset:aA,validate:Z,getSchema:cA,setSchema:lA,preview:()=>{const{componentList:F}=pw(Sl(a.config,a.children||[]));iA.value.open("页面预览","full"),(0,o.nextTick)(()=>{x(F)})},clear:O}),(F,D)=>{const k=(0,o.resolveComponent)("j-icon"),N=(0,o.resolveComponent)("d-drag-tool"),R=(0,o.resolveComponent)("el-collapse-item"),$=(0,o.resolveComponent)("el-collapse"),nA=(0,o.resolveComponent)("el-empty"),BA=(0,o.resolveComponent)("d-drag-index-list"),FA=(0,o.resolveComponent)("d-drag-container"),sA=(0,o.resolveComponent)("j-form"),Y=(0,o.resolveComponent)("j-page"),J=(0,o.resolveComponent)("j-layer");return(0,o.openBlock)(),(0,o.createElementBlock)("div",vw,[(0,o.createElementVNode)("div",yw,[(0,o.createElementVNode)("div",Qw,[(0,o.createVNode)($,{modelValue:K.value,"onUpdate:modelValue":D[0]||(D[0]=uA=>K.value=uA)},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.components,(uA,wA)=>((0,o.openBlock)(),(0,o.createBlock)(R,{key:wA,title:uA.name,name:wA},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(uA.children,(QA,_A)=>((0,o.openBlock)(),(0,o.createBlock)(N,{key:_A,config:QA},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("div",Ew,[(0,o.createVNode)(k,{class:"j-component-tool-icon",icon:QA.icon,size:14},null,8,["icon"]),(0,o.createElementVNode)("div",Fw,(0,o.toDisplayString)((0,o.unref)(t)(QA.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,o.createElementVNode)("div",Uw,[(0,o.createElementVNode)("div",bw,[(0,o.createVNode)(FA,{ref_key:"dragContainer",ref:w,class:"design-drag-container","is-component-container":!1,"component-data":a},{default:(0,o.withCtx)(()=>[!a.children||a.children.length===0?((0,o.openBlock)(),(0,o.createElementBlock)("div",Hw,[(0,o.createVNode)(nA,{description:(0,o.unref)(t)("请从左侧拖拽组件到此处"),"image-size":100},null,8,["description"])])):((0,o.openBlock)(),(0,o.createBlock)(BA,{key:1,"component-list":a.children,"global-config":a.config},null,8,["component-list","global-config"]))]),_:1},8,["component-data"])])]),(0,o.withDirectives)((0,o.createElementVNode)("div",Iw,[(0,o.createElementVNode)("div",_w,[(0,o.createElementVNode)("span",Sw,(0,o.toDisplayString)(`${T.value}`),1)]),(0,o.createElementVNode)("div",xw,[(0,o.createVNode)(sA,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:m,onChange:h},null,512)])],512),[[o.vShow,(0,o.unref)(v)&&g[(0,o.unref)(v).type]]]),(0,o.createVNode)(J,{ref_key:"previewLayerRef",ref:iA,"has-btns":!1,onOk:eA,onClosed:H},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(Y,{ref_key:"previewRef",ref:oA,actions:e.actions},null,8,["actions"])]),_:1},512)])}}}),Nw=Dw,Nl=dt(Nw,[Dl]),qA=Du({Vue:()=>o,Vue2:()=>{},del:()=>kw,install:()=>Lw,isVue2:()=>!1,isVue3:()=>!0,set:()=>Tw});Nu(qA,require("vue"));var fE=!1,gE=!0,hE=void 0;function Lw(){}function Tw(e,A,t){return Array.isArray(e)?(e.length=Math.max(e.length,A),e.splice(A,1,t),t):(e[A]=t,t)}function kw(e,A){if(Array.isArray(e)){e.splice(A,1);return}delete e[A]}var qr=(e,A)=>{const t=e.__vccOpts||e;for(const[n,r]of A)t[n]=r;return t},Mw=(0,qA.defineComponent)({name:"LineRuler",props:{scale:Number,thick:Number,palette:Object,index:Number,start:Number,vertical:Boolean,value:Number,isShowReferLine:Boolean},emits:["onMouseDown","onRelease","onRemove"],setup(e,{emit:A}){const t=(0,qA.ref)(0),n=(0,qA.ref)(!0);(0,qA.onMounted)(()=>{t.value=e.value});const r=B=>{n.value=B>=0},a=(0,qA.computed)(()=>{const B=(t.value-e.start)*e.scale;r(B);const w=B+"px";return e.vertical?{top:w}:{left:w}}),u=(0,qA.computed)(()=>{var B;const w=`1px solid ${(B=e.palette)==null?void 0:B.lineColor}`,m=e.vertical?{borderTop:w}:{borderLeft:w};return{cursor:e.isShowReferLine?e.vertical?"ns-resize":"ew-resize":"none",...m}}),d=(0,qA.computed)(()=>e.vertical?{left:e.thick+"px"}:{top:e.thick+"px"});return{startValue:t,showLine:n,offset:a,borderCursor:u,actionStyle:d,handleDown:B=>{const w=e.vertical?B.clientY:B.clientX,m=t.value;A("onMouseDown");const v=I=>{const L=e.vertical?I.clientY:I.clientX;t.value=Math.round(m+(L-w)/e.scale)},y=()=>{A("onRelease",t.value,e.index),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",y)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",y)},handleRemove:()=>{A("onRemove",e.index)}}}}),Ow={class:"value"};function Kw(e,A,t,n,r,a){return(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"line",style:(0,o.normalizeStyle)([e.offset,e.borderCursor]),onMousedown:A[1]||(A[1]=(...u)=>e.handleDown&&e.handleDown(...u))},[(0,o.createElementVNode)("div",{class:"action",style:(0,o.normalizeStyle)(e.actionStyle)},[(0,o.createElementVNode)("span",{class:"del",onClick:A[0]||(A[0]=(...u)=>e.handleRemove&&e.handleRemove(...u))},"×"),(0,o.createElementVNode)("span",Ow,(0,o.toDisplayString)(e.startValue),1)],4)],36)),[[o.vShow,e.showLine]])}var Rw=qr(Mw,[["render",Kw],["__scopeId","data-v-5dea28d6"]]),Vw=e=>e<=.25?40:e<=.5?20:e<=1?10:e<=2?5:e<=4?2:1,Ll=.83,Pw=(e,A,t,n,r,a)=>{const{scale:u,width:d,height:g,ratio:h,palette:B}=r,{bgColor:w,fontColor:m,shadowColor:v,longfgColor:y,shortfgColor:I}=B;if(e.scale(h,h),e.clearRect(0,0,d,g),e.fillStyle=w,e.fillRect(0,0,d,g),n){const iA=(t-A)*u,oA=n*u;e.fillStyle=v,a?e.fillRect(iA,0,oA,g*3/8):e.fillRect(0,iA,d*3/8,oA)}const L=Vw(u),T=L*u,K=L*10,b=K*u,O=Math.floor(A/L)*L,aA=Math.floor(A/K)*K,Z=(O-A)/L*T,cA=(aA-A)/K*b,lA=A+Math.ceil((a?d:g)/u);e.beginPath(),e.fillStyle=m,e.strokeStyle=y;for(let iA=aA,oA=0;iA<lA;iA+=K,oA++){const tA=cA+oA*b+.5;a?e.moveTo(tA,0):e.moveTo(0,tA),e.save(),a?e.translate(tA,g*.4):e.translate(d*.4,tA),a||e.rotate(-Math.PI/2),e.scale(Ll/h,Ll/h),e.fillText(iA.toString(),4*h,7*h),e.restore(),a?e.lineTo(tA,g*9/16):e.lineTo(d*9/16,tA)}e.stroke(),e.closePath(),e.beginPath(),e.strokeStyle=I;for(let iA=O,oA=0;iA<lA;iA+=L,oA++){const tA=Z+oA*T+.5;a?e.moveTo(tA,0):e.moveTo(0,tA),iA%K!==0&&(a?e.lineTo(tA,g*1/4):e.lineTo(d*1/4,tA))}e.stroke(),e.closePath(),e.setTransform(1,0,0,1,0,0)},Gw=(0,qA.defineComponent)({name:"CanvasRuler",props:{showIndicator:Boolean,valueNum:Number,scale:Number,ratio:Number,palette:Object,vertical:Boolean,start:Number,width:Number,height:Number,selectStart:Number,selectLength:Number},emits:["onAddLine","update:showIndicator","update:valueNum"],setup(e,{emit:A}){const t=(0,qA.reactive)({canvasContext:null});let n=1;const r=(0,qA.ref)(null);(0,qA.onMounted)(()=>{n=e.ratio||window.devicePixelRatio||1,a(),u(n),d(n)});const a=()=>{t.canvasContext=r.value&&r.value.getContext("2d")},u=h=>{if(r.value){r.value.width=e.width*h,r.value.height=e.height*h;const B=t.canvasContext;B&&(B.font=`${12*h}px -apple-system,
|
|
29
29
|
"Helvetica Neue", ".SFNSText-Regular",
|
|
30
30
|
"SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB",
|
|
31
31
|
"Microsoft YaHei", "WenQuanYi Zen Hei", sans-serif`,B.lineWidth=1,B.textBaseline="middle")}},d=h=>{const B={scale:e.scale,width:e.width,height:e.height,palette:e.palette,ratio:h};t.canvasContext&&Pw(t.canvasContext,e.start,e.selectStart,e.selectLength,B,!e.vertical)};return(0,qA.watch)(()=>e.start,()=>d(n)),(0,qA.watch)([()=>e.width,()=>e.height],()=>{u(n),d(n)}),{handle:(h,B)=>{const m=((v,y,I)=>Math.round(y+v/I))(e.vertical?h.offsetY:h.offsetX,e.start,e.scale);switch(B){case"click":A("onAddLine",m);break;case"enter":A("update:valueNum",m),A("update:showIndicator",!0);break;default:A("update:valueNum",m);break}},canvas:r}}});function zw(e,A,t,n,r,a){return(0,o.openBlock)(),(0,o.createElementBlock)("canvas",{ref:"canvas",class:"ruler",onClick:A[0]||(A[0]=u=>e.handle(u,"click")),onMouseenter:A[1]||(A[1]=u=>e.handle(u,"enter")),onMousemove:A[2]||(A[2]=u=>e.handle(u,"move")),onMouseleave:A[3]||(A[3]=u=>e.$emit("update:showIndicator",!1))},null,544)}var Xw=(0,qA.defineComponent)({name:"RulerWrapper",components:{CanvasRuler:qr(Gw,[["render",zw]]),RulerLine:Rw},props:{scale:Number,ratio:Number,thick:Number,palette:Object,vertical:{type:Boolean,default:!0},width:{type:Number,default:200},height:{type:Number,default:200},start:{type:Number,default:0},lines:{type:Array,default:()=>[]},selectStart:{type:Number},selectLength:{type:Number},isShowReferLine:{type:Boolean}},setup(e){const A=(0,qA.ref)(!1),t=(0,qA.ref)(0),n=(0,qA.computed)(()=>e.vertical?"v-container":"h-container"),r=(0,qA.computed)(()=>{const h={width:`calc(100% - ${e.thick}px)`,height:`${e.thick+1}px`,left:`${e.thick}px`},B={width:`${e.thick&&e.thick+1}px`,height:`calc(100% - ${e.thick}px)`,top:`${e.thick}px`};return e.vertical?B:h}),a=(0,qA.computed)(()=>{var h;const B=(t.value-e.start)*e.scale;let w="top",m="borderLeft";return w=e.vertical?"top":"left",m=e.vertical?"borderBottom":"borderLeft",{[w]:B+"px",[m]:`1px solid ${(h=e.palette)==null?void 0:h.lineColor}`}}),u=h=>{e.lines.push(h)},d=(h,B)=>{const w=h-e.start,m=(e.vertical?e.height:e.width)/e.scale;w<0||w>m?g(B):e.lines[B]=h},g=h=>{e.lines.splice(h,1)};return{showIndicator:A,valueNum:t,rwClassName:n,rwStyle:r,indicatorStyle:a,handleNewLine:u,handleLineRelease:d,handleLineRemove:g}}}),$w={class:"lines"},Yw={class:"value"};function Ww(e,A,t,n,r,a){const u=(0,o.resolveComponent)("CanvasRuler"),d=(0,o.resolveComponent)("RulerLine");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(e.rwClassName),style:(0,o.normalizeStyle)(e.rwStyle)},[(0,o.createVNode)(u,{vertical:e.vertical,scale:e.scale,width:e.width,height:e.height,start:e.start,ratio:e.ratio,"select-start":e.selectStart,"select-length":e.selectLength,palette:e.palette,valueNum:e.valueNum,"onUpdate:valueNum":A[0]||(A[0]=g=>e.valueNum=g),showIndicator:e.showIndicator,"onUpdate:showIndicator":A[1]||(A[1]=g=>e.showIndicator=g),onOnAddLine:e.handleNewLine},null,8,["vertical","scale","width","height","start","ratio","select-start","select-length","palette","valueNum","showIndicator","onOnAddLine"]),(0,o.withDirectives)((0,o.createElementVNode)("div",$w,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.lines,(g,h)=>((0,o.openBlock)(),(0,o.createBlock)(d,{key:g+h,index:h,value:g>>0,scale:e.scale,start:e.start,thick:e.thick,palette:e.palette,vertical:e.vertical,"is-show-refer-line":e.isShowReferLine,onOnRemove:e.handleLineRemove,onOnRelease:e.handleLineRelease},null,8,["index","value","scale","start","thick","palette","vertical","is-show-refer-line","onOnRemove","onOnRelease"]))),128))],512),[[o.vShow,e.isShowReferLine]]),(0,o.withDirectives)((0,o.createElementVNode)("div",{class:"indicator",style:(0,o.normalizeStyle)(e.indicatorStyle)},[(0,o.createElementVNode)("div",Yw,(0,o.toDisplayString)(e.valueNum),1)],4),[[o.vShow,e.showIndicator]])],6)}var Jw=qr(Xw,[["render",Ww],["__scopeId","data-v-b6c23352"]]),Zw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAopJREFUOE/FlE9IVEEcx7+/N9ouds1Mu0QUSFZYdIgoUqQoKPBQHsKozpXE7jbTO/U8xLJvn6usBHWQ6hBFXupSkQeVbh0KJEPp0sH+eLGTsKs77xcj78m0ax0E8cHjzZv5zef3/c33xxA24KENYGJzoEEQbNNaN4Zh2OQ4znwYhr9c1/39vwrXVDo0NNS0tLR0GYB5D64BmAMwzMyvlFKz1es10Hw+f4mZ7wHYBeA9gNdENFepVOaEEM3M3OI4Thczn41gt6WUgQ3+C+r7/h0AWQD3mXnYqPA8L9nQ0HCemduIaFpKOWoAhUJhT6VSuQXgOjP3K6W8GLwKzeVyp4jonR0QBEErM48w8zFLyayUsjX+z+VyHhHdZebTSqkxM78CHRgYOKS1/ghgVErZY214RkQ7ADyRUj72ff8qgCtmXUrZGcf5vv8CwEUhxOF0Ov1pBRpla5dSdseBhUJhpznH6tIsZb1KqacW+BGArUaUXX63UuplHJTNZjuEEONSyhozfd/n6mQ1RkXZL2itz7mu+80EDA4ONi8vL/8AcM2UbikyR2BU9cSmmTU70YqKIAj2hWFo2uenlHK/BRg3Y2aeNO5GyU8S0ZbFxcUuz/NKEXAGQKPjOCcymcyX1dIi8DSAiWQyeaavr68cbSgCuBknYubnQoj+TCYzUywWE6VS6S2ADsdx2gxw1X3L7SNENMbMnwE8qK+vf5NKpRaMaeVyeW8ikfiaSqW+R7BuZr5BRMe11p2u607U9Gk8kc/ntzPzQwCmExYATDLzVBiGE0KIowAOADDf3QA+aK2VDaxRajto3K+rq+tl5nYAzQBamHmeiOYBTGmtR6ph/1Rqg9c73pz7dD1qN0TpHyNQRCUDJXrAAAAAAElFTkSuQmCC",jw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAjtJREFUOE/NlD9oFEEUxn9v9ghC0hpRUogIAUmniGAT/5Q2FrETPSNRJILg7RwimI0ox85eQFCEBGIUO1PYpFM0jSConQoBEZGgGPsgl+w+2eM2bC57SopAFqYZ3v7m+977ZoQt+GQLmGxPaBiGgYiMWWvXBHZUGoZhH3BERPYC+4F+4Keq/urt7b1RLpf/ZEBVHa9Wq0HWyg3QKIoGVPU8cA7wgK/pUtXPQJ8xZk+pVBpuNBqXUoUiEvi+P56fzTpo6+SbwHNg1lo7WzTITGEKXFlZeeB53tVCpa3CK8AFa+1cBgvD8LKIXAQOJkkyICJDeYVBEJS6u7s/qeoLa+1o+l9TqXNuBLhmjDlbqVQ+5ICjInIfOBPH8W9jzGCR5YmJiRNxHM+papgqzqDvgSlr7VTernPuO3An3c9bBt74vv+yrdaKyLDv+/1Sq9UGPc97nY9EVuycU2AQOA7cAm4Dr4D5TvVxHB9rKo2iaEFVp621Ln96FEUngaOqGmSxabVqsh3a2h+x1h5qQjNrae/yE4+iaCwDJkky73neTuBZe129Xk+H+BS4l7ZqLVIZ2BhzuFKpvMsDVXXWGPMxFdAedOfcKeCRqj7MYrUhpz09PfXl5eXrectFWXXODQHpOq2qd/95o/JXr6ura3J1dXU6SZIfwKKIHAD2tVYMPBGRx77vN10UXtO85fTkmZmZHUtLSzUR2QXsBhaAL6r6DXhbrVYXi1yss59GqOgub/bN3Z7v6X/tb9Zmp/q/kN8s+lJb8oEAAAAASUVORK5CYII=",qw=(0,qA.defineComponent)({name:"SketchRule",components:{RulerWrapper:Jw},props:{eyeIcon:{type:String},closeEyeIcon:{type:String},scale:{type:Number,default:1},ratio:{type:Number},thick:{type:Number,default:16},palette:Object,startX:{type:Number},startY:{type:Number,default:0},width:{type:Number,default:200},height:{type:Number,default:200},shadow:{type:Object,default:()=>({x:0,y:0,width:0,height:0})},lines:{type:Object,default:()=>({h:[],v:[]})},isShowReferLine:{type:Boolean,default:!0}},emits:["onCornerClick"],setup(e,{emit:A}){let t=(0,qA.ref)(!0);t.value=e.isShowReferLine;const n=(0,qA.computed)(()=>{function u(d,g){return Object.keys(d).forEach(h=>{h&&d.hasOwnProperty(h)&&(typeof g.key=="object"?d[h]=u(d[h],g[h]):g.hasOwnProperty(h)&&(d[h]=g[h]))}),d}return u({bgColor:"rgba(225,225,225, 0)",longfgColor:"#BABBBC",shortfgColor:"#C8CDD0",fontColor:"#7D8694",shadowColor:"#E8E8E8",lineColor:"#EB5648",borderColor:"#DADADC",cornerActiveColor:"rgb(235, 86, 72, 0.6)",menu:{bgColor:"#fff",dividerColor:"#DBDBDB",listItem:{textColor:"#415058",hoverTextColor:"#298DF8",disabledTextColor:"rgba(65, 80, 88, 0.4)",bgColor:"#fff",hoverBgColor:"#F2F2F2"}}},e.palette||{})}),r=(0,qA.computed)(()=>({backgroundImage:t.value?`url(${e.eyeIcon||Zw})`:`url(${e.closeEyeIcon||jw})`,width:e.thick+"px",height:e.thick+"px",borderRight:`1px solid ${n.value.borderColor}`,borderBottom:`1px solid ${n.value.borderColor}`})),a=u=>{t.value=!t.value,A("onCornerClick",t.value)};return(0,qA.watch)([()=>e.isShowReferLine],()=>{t.value=e.isShowReferLine}),{showReferLine:t,paletteCpu:n,cornerStyle:r,onCornerClick:a}}}),A0={id:"mb-ruler",class:"style-ruler mb-ruler"};function e0(e,A,t,n,r,a){const u=(0,o.resolveComponent)("RulerWrapper");return(0,o.openBlock)(),(0,o.createElementBlock)("div",A0,[(0,o.createVNode)(u,{vertical:!1,width:e.width,height:e.thick,"is-show-refer-line":e.showReferLine,thick:e.thick,ratio:e.ratio,start:e.startX,lines:e.lines.h,"select-start":e.shadow.x,"select-length":e.shadow.width,scale:e.scale,palette:e.paletteCpu},null,8,["width","height","is-show-refer-line","thick","ratio","start","lines","select-start","select-length","scale","palette"]),(0,o.createVNode)(u,{vertical:!0,width:e.thick,height:e.height,"is-show-refer-line":e.showReferLine,thick:e.thick,ratio:e.ratio,start:e.startY,lines:e.lines.v,"select-start":e.shadow.y,"select-length":e.shadow.height,scale:e.scale,palette:e.paletteCpu},null,8,["width","height","is-show-refer-line","thick","ratio","start","lines","select-start","select-length","scale","palette"]),(0,o.createElementVNode)("a",{class:"corner",style:(0,o.normalizeStyle)(e.cornerStyle),onClick:A[0]||(A[0]=(...d)=>e.onCornerClick&&e.onCornerClick(...d))},null,4)])}var t0=qr(qw,[["render",e0]]),n0=xu(((e,A)=>{(function(t,n){typeof e=="object"&&typeof A<"u"?A.exports=n():typeof define=="function"&&define.amd?define(n):(t=typeof globalThis<"u"?globalThis:t||self,t.html2canvas=n())})(e,(function(){"use strict";var t=function(s,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(c[f]=l[f])},t(s,i)};function n(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(s,i);function c(){this.constructor=s}s.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}var r=function(){return r=Object.assign||function(i){for(var c,l=1,f=arguments.length;l<f;l++){c=arguments[l];for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(i[p]=c[p])}return i},r.apply(this,arguments)};function a(s,i,c,l){function f(p){return p instanceof c?p:new c(function(C){C(p)})}return new(c||(c=Promise))(function(p,C){function Q(V){try{M(l.next(V))}catch(z){C(z)}}function E(V){try{M(l.throw(V))}catch(z){C(z)}}function M(V){V.done?p(V.value):f(V.value).then(Q,E)}M((l=l.apply(s,i||[])).next())})}function u(s,i){var c={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},l,f,p,C;return C={next:Q(0),throw:Q(1),return:Q(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function Q(M){return function(V){return E([M,V])}}function E(M){if(l)throw new TypeError("Generator is already executing.");for(;c;)try{if(l=1,f&&(p=M[0]&2?f.return:M[0]?f.throw||((p=f.return)&&p.call(f),0):f.next)&&!(p=p.call(f,M[1])).done)return p;switch(f=0,p&&(M=[M[0]&2,p.value]),M[0]){case 0:case 1:p=M;break;case 4:return c.label++,{value:M[1],done:!1};case 5:c.label++,f=M[1],M=[0];continue;case 7:M=c.ops.pop(),c.trys.pop();continue;default:if(p=c.trys,!(p=p.length>0&&p[p.length-1])&&(M[0]===6||M[0]===2)){c=0;continue}if(M[0]===3&&(!p||M[1]>p[0]&&M[1]<p[3])){c.label=M[1];break}if(M[0]===6&&c.label<p[1]){c.label=p[1],p=M;break}if(p&&c.label<p[2]){c.label=p[2],c.ops.push(M);break}p[2]&&c.ops.pop(),c.trys.pop();continue}M=i.call(s,c)}catch(V){M=[6,V],f=0}finally{l=p=0}if(M[0]&5)throw M[1];return{value:M[0]?M[1]:void 0,done:!0}}}function d(s,i,c){if(c||arguments.length===2)for(var l=0,f=i.length,p;l<f;l++)(p||!(l in i))&&(p||(p=Array.prototype.slice.call(i,0,l)),p[l]=i[l]);return s.concat(p||i)}for(var g=(function(){function s(i,c,l,f){this.left=i,this.top=c,this.width=l,this.height=f}return s.prototype.add=function(i,c,l,f){return new s(this.left+i,this.top+c,this.width+l,this.height+f)},s.fromClientRect=function(i,c){return new s(c.left+i.windowBounds.left,c.top+i.windowBounds.top,c.width,c.height)},s.fromDOMRectList=function(i,c){var l=Array.from(c).find(function(f){return f.width!==0});return l?new s(l.left+i.windowBounds.left,l.top+i.windowBounds.top,l.width,l.height):s.EMPTY},s.EMPTY=new s(0,0,0,0),s})(),h=function(s,i){return g.fromClientRect(s,i.getBoundingClientRect())},B=function(s){var i=s.body,c=s.documentElement;if(!i||!c)throw new Error("Unable to get document size");return new g(0,0,Math.max(Math.max(i.scrollWidth,c.scrollWidth),Math.max(i.offsetWidth,c.offsetWidth),Math.max(i.clientWidth,c.clientWidth)),Math.max(Math.max(i.scrollHeight,c.scrollHeight),Math.max(i.offsetHeight,c.offsetHeight),Math.max(i.clientHeight,c.clientHeight)))},w=function(s){for(var i=[],c=0,l=s.length;c<l;){var f=s.charCodeAt(c++);if(f>=55296&&f<=56319&&c<l){var p=s.charCodeAt(c++);(p&64512)===56320?i.push(((f&1023)<<10)+(p&1023)+65536):(i.push(f),c--)}else i.push(f)}return i},m=function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var c=s.length;if(!c)return"";for(var l=[],f=-1,p="";++f<c;){var C=s[f];C<=65535?l.push(C):(C-=65536,l.push((C>>10)+55296,C%1024+56320)),(f+1===c||l.length>16384)&&(p+=String.fromCharCode.apply(String,l),l.length=0)}return p},v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=typeof Uint8Array>"u"?[]:new Uint8Array(256),I=0;I<v.length;I++)y[v.charCodeAt(I)]=I;for(var L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=typeof Uint8Array>"u"?[]:new Uint8Array(256),K=0;K<L.length;K++)T[L.charCodeAt(K)]=K;for(var b=function(s){var i=s.length*.75,c=s.length,l,f=0,p,C,Q,E;s[s.length-1]==="="&&(i--,s[s.length-2]==="="&&i--);var M=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(i):new Array(i),V=Array.isArray(M)?M:new Uint8Array(M);for(l=0;l<c;l+=4)p=T[s.charCodeAt(l)],C=T[s.charCodeAt(l+1)],Q=T[s.charCodeAt(l+2)],E=T[s.charCodeAt(l+3)],V[f++]=p<<2|C>>4,V[f++]=(C&15)<<4|Q>>2,V[f++]=(Q&3)<<6|E&63;return M},O=function(s){for(var i=s.length,c=[],l=0;l<i;l+=2)c.push(s[l+1]<<8|s[l]);return c},aA=function(s){for(var i=s.length,c=[],l=0;l<i;l+=4)c.push(s[l+3]<<24|s[l+2]<<16|s[l+1]<<8|s[l]);return c},Z=5,cA=11,lA=2,iA=cA-Z,oA=65536>>Z,tA=(1<<Z)-1,x=oA+(1024>>Z)+32,eA=65536>>cA,H=(1<<iA)-1,X=function(s,i,c){return s.slice?s.slice(i,c):new Uint16Array(Array.prototype.slice.call(s,i,c))},F=function(s,i,c){return s.slice?s.slice(i,c):new Uint32Array(Array.prototype.slice.call(s,i,c))},D=function(s,i){var c=b(s),l=Array.isArray(c)?aA(c):new Uint32Array(c),f=Array.isArray(c)?O(c):new Uint16Array(c),p=24,C=X(f,p/2,l[4]/2),Q=l[5]===2?X(f,(p+l[4])/2):F(l,Math.ceil((p+l[4])/4));return new k(l[0],l[1],l[2],l[3],C,Q)},k=(function(){function s(i,c,l,f,p,C){this.initialValue=i,this.errorValue=c,this.highStart=l,this.highValueIndex=f,this.index=p,this.data=C}return s.prototype.get=function(i){var c;if(i>=0){if(i<55296||i>56319&&i<=65535)return c=this.index[i>>Z],c=(c<<lA)+(i&tA),this.data[c];if(i<=65535)return c=this.index[oA+(i-55296>>Z)],c=(c<<lA)+(i&tA),this.data[c];if(i<this.highStart)return c=x-eA+(i>>cA),c=this.index[c],c+=i>>Z&H,c=this.index[c],c=(c<<lA)+(i&tA),this.data[c];if(i<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=typeof Uint8Array>"u"?[]:new Uint8Array(256),$=0;$<N.length;$++)R[N.charCodeAt($)]=$;var nA="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",BA=50,FA=1,sA=2,Y=3,J=4,uA=5,wA=7,QA=8,_A=9,gA=10,j=11,_=12,U=13,S=14,G=15,P=16,dA=17,fA=18,bA=19,pA=20,DA=21,OA=22,KA=23,JA=24,ee=25,Xe=26,Lt=27,Ie=28,_i=29,ot=30,Si=31,nn=32,$e=33,Xn=34,$n=35,rn=36,Tt=37,Yn=38,on=39,sn=40,an=41,ln=42,Kl=43,Rl=[9001,65288],rA="!",W="×",HA="÷",MA=D(nA),ue=[ot,rn],it=[FA,sA,Y,uA],cn=[gA,QA],un=[Lt,Xe],Wn=it.concat(cn),dn=[Yn,on,sn,Xn,$n],xi=[G,U],Di=function(s,i){i===void 0&&(i="strict");var c=[],l=[],f=[];return s.forEach(function(p,C){var Q=MA.get(p);if(Q>BA?(f.push(!0),Q-=BA):f.push(!1),["normal","auto","loose"].indexOf(i)!==-1&&[8208,8211,12316,12448].indexOf(p)!==-1)return l.push(C),c.push(P);if(Q===J||Q===j){if(C===0)return l.push(C),c.push(ot);var E=c[C-1];return Wn.indexOf(E)===-1?(l.push(l[C-1]),c.push(E)):(l.push(C),c.push(ot))}if(l.push(C),Q===Si)return c.push(i==="strict"?DA:Tt);if(Q===ln||Q===_i)return c.push(ot);if(Q===Kl)return p>=131072&&p<=196605||p>=196608&&p<=262141?c.push(Tt):c.push(ot);c.push(Q)}),[l,c,f]},zA=function(s,i,c,l){var f=l[c];if(Array.isArray(s)?s.indexOf(f)!==-1:s===f)for(var p=c;p<=l.length;){p++;var C=l[p];if(C===i)return!0;if(C!==gA)break}if(f===gA)for(var p=c;p>0;){p--;var Q=l[p];if(Array.isArray(s)?s.indexOf(Q)!==-1:s===Q)for(var E=c;E<=l.length;){E++;var C=l[E];if(C===i)return!0;if(C!==gA)break}if(Q!==gA)break}return!1},kt=function(s,i){for(var c=s;c>=0;){var l=i[c];if(l===gA)c--;else return l}return 0},st=function(s,i,c,l,f){if(c[l]===0)return W;var p=l-1;if(Array.isArray(f)&&f[p]===!0)return W;var C=p-1,Q=p+1,E=i[p],M=C>=0?i[C]:0,V=i[Q];if(E===sA&&V===Y)return W;if(it.indexOf(E)!==-1)return rA;if(it.indexOf(V)!==-1||cn.indexOf(V)!==-1)return W;if(kt(p,i)===QA)return HA;if(MA.get(s[p])===j||(E===nn||E===$e)&&MA.get(s[Q])===j||E===wA||V===wA||E===_A||[gA,U,G].indexOf(E)===-1&&V===_A||[dA,fA,bA,JA,Ie].indexOf(V)!==-1||kt(p,i)===OA||zA(KA,OA,p,i)||zA([dA,fA],DA,p,i)||zA(_,_,p,i))return W;if(E===gA)return HA;if(E===KA||V===KA)return W;if(V===P||E===P)return HA;if([U,G,DA].indexOf(V)!==-1||E===S||M===rn&&xi.indexOf(E)!==-1||E===Ie&&V===rn||V===pA||ue.indexOf(V)!==-1&&E===ee||ue.indexOf(E)!==-1&&V===ee||E===Lt&&[Tt,nn,$e].indexOf(V)!==-1||[Tt,nn,$e].indexOf(E)!==-1&&V===Xe||ue.indexOf(E)!==-1&&un.indexOf(V)!==-1||un.indexOf(E)!==-1&&ue.indexOf(V)!==-1||[Lt,Xe].indexOf(E)!==-1&&(V===ee||[OA,G].indexOf(V)!==-1&&i[Q+1]===ee)||[OA,G].indexOf(E)!==-1&&V===ee||E===ee&&[ee,Ie,JA].indexOf(V)!==-1)return W;if([ee,Ie,JA,dA,fA].indexOf(V)!==-1)for(var z=p;z>=0;){var q=i[z];if(q===ee)return W;if([Ie,JA].indexOf(q)!==-1)z--;else break}if([Lt,Xe].indexOf(V)!==-1)for(var z=[dA,fA].indexOf(E)!==-1?C:p;z>=0;){var q=i[z];if(q===ee)return W;if([Ie,JA].indexOf(q)!==-1)z--;else break}if(Yn===E&&[Yn,on,Xn,$n].indexOf(V)!==-1||[on,Xn].indexOf(E)!==-1&&[on,sn].indexOf(V)!==-1||[sn,$n].indexOf(E)!==-1&&V===sn||dn.indexOf(E)!==-1&&[pA,Xe].indexOf(V)!==-1||dn.indexOf(V)!==-1&&E===Lt||ue.indexOf(E)!==-1&&ue.indexOf(V)!==-1||E===JA&&ue.indexOf(V)!==-1||ue.concat(ee).indexOf(E)!==-1&&V===OA&&Rl.indexOf(s[Q])===-1||ue.concat(ee).indexOf(V)!==-1&&E===fA)return W;if(E===an&&V===an){for(var CA=c[p],hA=1;CA>0&&(CA--,i[CA]===an);)hA++;if(hA%2!==0)return W}return E===nn&&V===$e?W:HA},Ni=function(s,i){i||(i={lineBreak:"normal",wordBreak:"normal"});var c=Di(s,i.lineBreak),l=c[0],f=c[1],p=c[2];(i.wordBreak==="break-all"||i.wordBreak==="break-word")&&(f=f.map(function(Q){return[ee,ot,ln].indexOf(Q)!==-1?Tt:Q}));var C=i.wordBreak==="keep-all"?p.map(function(Q,E){return Q&&s[E]>=19968&&s[E]<=40959}):void 0;return[l,f,C]},Ao=(function(){function s(i,c,l,f){this.codePoints=i,this.required=c===rA,this.start=l,this.end=f}return s.prototype.slice=function(){return m.apply(void 0,this.codePoints.slice(this.start,this.end))},s})(),I0=function(s,i){var c=w(s),l=Ni(c,i),f=l[0],p=l[1],C=l[2],Q=c.length,E=0,M=0;return{next:function(){if(M>=Q)return{done:!0,value:null};for(var V=W;M<Q&&(V=st(c,p,f,++M,C))===W;);if(V!==W||M===Q){var z=new Ao(c,V,E,M);return E=M,{value:z,done:!1}}return{done:!0,value:null}}}},_0=1,S0=2,Jn=4,Vl=8,eo=10,Pl=47,Zn=92,x0=9,D0=32,to=34,jn=61,N0=35,L0=36,T0=37,no=39,ro=40,qn=41,k0=95,ve=45,M0=33,O0=60,K0=62,R0=64,V0=91,P0=93,G0=61,z0=123,oo=63,X0=125,Gl=124,$0=126,Y0=128,zl=65533,Li=42,Mt=43,W0=44,J0=58,Z0=59,Ar=46,j0=0,q0=8,AC=11,eC=14,tC=31,nC=127,Ye=-1,Xl=48,$l=97,Yl=101,rC=102,oC=117,iC=122,Wl=65,Jl=69,Zl=70,sC=85,aC=90,pe=function(s){return s>=Xl&&s<=57},lC=function(s){return s>=55296&&s<=57343},fn=function(s){return pe(s)||s>=Wl&&s<=Zl||s>=$l&&s<=rC},cC=function(s){return s>=$l&&s<=iC},uC=function(s){return s>=Wl&&s<=aC},dC=function(s){return cC(s)||uC(s)},fC=function(s){return s>=Y0},io=function(s){return s===eo||s===x0||s===D0},so=function(s){return dC(s)||fC(s)||s===k0},jl=function(s){return so(s)||pe(s)||s===ve},gC=function(s){return s>=j0&&s<=q0||s===AC||s>=eC&&s<=tC||s===nC},mt=function(s,i){return s!==Zn?!1:i!==eo},ao=function(s,i,c){return s===ve?so(i)||mt(i,c):so(s)?!0:!!(s===Zn&&mt(s,i))},Ti=function(s,i,c){return s===Mt||s===ve?pe(i)?!0:i===Ar&&pe(c):pe(s===Ar?i:s)},hC=function(s){var i=0,c=1;(s[i]===Mt||s[i]===ve)&&(s[i]===ve&&(c=-1),i++);for(var l=[];pe(s[i]);)l.push(s[i++]);var f=l.length?parseInt(m.apply(void 0,l),10):0;s[i]===Ar&&i++;for(var p=[];pe(s[i]);)p.push(s[i++]);var C=p.length,Q=C?parseInt(m.apply(void 0,p),10):0;(s[i]===Jl||s[i]===Yl)&&i++;var E=1;(s[i]===Mt||s[i]===ve)&&(s[i]===ve&&(E=-1),i++);for(var M=[];pe(s[i]);)M.push(s[i++]);var V=M.length?parseInt(m.apply(void 0,M),10):0;return c*(f+Q*Math.pow(10,-C))*Math.pow(10,E*V)},BC={type:2},pC={type:3},mC={type:4},wC={type:13},CC={type:8},vC={type:21},yC={type:9},QC={type:10},EC={type:11},FC={type:12},UC={type:14},lo={type:23},bC={type:1},HC={type:25},IC={type:24},_C={type:26},SC={type:27},xC={type:28},DC={type:29},NC={type:31},ki={type:32},ql=(function(){function s(){this._value=[]}return s.prototype.write=function(i){this._value=this._value.concat(w(i))},s.prototype.read=function(){for(var i=[],c=this.consumeToken();c!==ki;)i.push(c),c=this.consumeToken();return i},s.prototype.consumeToken=function(){var i=this.consumeCodePoint();switch(i){case to:return this.consumeStringToken(to);case N0:var c=this.peekCodePoint(0),l=this.peekCodePoint(1),f=this.peekCodePoint(2);if(jl(c)||mt(l,f)){var p=ao(c,l,f)?S0:_0,C=this.consumeName();return{type:5,value:C,flags:p}}break;case L0:if(this.peekCodePoint(0)===jn)return this.consumeCodePoint(),wC;break;case no:return this.consumeStringToken(no);case ro:return BC;case qn:return pC;case Li:if(this.peekCodePoint(0)===jn)return this.consumeCodePoint(),UC;break;case Mt:if(Ti(i,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(i),this.consumeNumericToken();break;case W0:return mC;case ve:var Q=i,E=this.peekCodePoint(0),M=this.peekCodePoint(1);if(Ti(Q,E,M))return this.reconsumeCodePoint(i),this.consumeNumericToken();if(ao(Q,E,M))return this.reconsumeCodePoint(i),this.consumeIdentLikeToken();if(E===ve&&M===K0)return this.consumeCodePoint(),this.consumeCodePoint(),IC;break;case Ar:if(Ti(i,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(i),this.consumeNumericToken();break;case Pl:if(this.peekCodePoint(0)===Li)for(this.consumeCodePoint();;){var V=this.consumeCodePoint();if(V===Li&&(V=this.consumeCodePoint(),V===Pl))return this.consumeToken();if(V===Ye)return this.consumeToken()}break;case J0:return _C;case Z0:return SC;case O0:if(this.peekCodePoint(0)===M0&&this.peekCodePoint(1)===ve&&this.peekCodePoint(2)===ve)return this.consumeCodePoint(),this.consumeCodePoint(),HC;break;case R0:if(ao(this.peekCodePoint(0),this.peekCodePoint(1),this.peekCodePoint(2))){var C=this.consumeName();return{type:7,value:C}}break;case V0:return xC;case Zn:if(mt(i,this.peekCodePoint(0)))return this.reconsumeCodePoint(i),this.consumeIdentLikeToken();break;case P0:return DC;case G0:if(this.peekCodePoint(0)===jn)return this.consumeCodePoint(),CC;break;case z0:return EC;case X0:return FC;case oC:case sC:var z=this.peekCodePoint(0),q=this.peekCodePoint(1);return z===Mt&&(fn(q)||q===oo)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(i),this.consumeIdentLikeToken();case Gl:if(this.peekCodePoint(0)===jn)return this.consumeCodePoint(),yC;if(this.peekCodePoint(0)===Gl)return this.consumeCodePoint(),vC;break;case $0:if(this.peekCodePoint(0)===jn)return this.consumeCodePoint(),QC;break;case Ye:return ki}return io(i)?(this.consumeWhiteSpace(),NC):pe(i)?(this.reconsumeCodePoint(i),this.consumeNumericToken()):so(i)?(this.reconsumeCodePoint(i),this.consumeIdentLikeToken()):{type:6,value:m(i)}},s.prototype.consumeCodePoint=function(){var i=this._value.shift();return typeof i>"u"?-1:i},s.prototype.reconsumeCodePoint=function(i){this._value.unshift(i)},s.prototype.peekCodePoint=function(i){return i>=this._value.length?-1:this._value[i]},s.prototype.consumeUnicodeRangeToken=function(){for(var i=[],c=this.consumeCodePoint();fn(c)&&i.length<6;)i.push(c),c=this.consumeCodePoint();for(var l=!1;c===oo&&i.length<6;)i.push(c),c=this.consumeCodePoint(),l=!0;if(l){var f=parseInt(m.apply(void 0,i.map(function(E){return E===oo?Xl:E})),16),p=parseInt(m.apply(void 0,i.map(function(E){return E===oo?Zl:E})),16);return{type:30,start:f,end:p}}var C=parseInt(m.apply(void 0,i),16);if(this.peekCodePoint(0)===ve&&fn(this.peekCodePoint(1))){this.consumeCodePoint(),c=this.consumeCodePoint();for(var Q=[];fn(c)&&Q.length<6;)Q.push(c),c=this.consumeCodePoint();var p=parseInt(m.apply(void 0,Q),16);return{type:30,start:C,end:p}}else return{type:30,start:C,end:C}},s.prototype.consumeIdentLikeToken=function(){var i=this.consumeName();return i.toLowerCase()==="url"&&this.peekCodePoint(0)===ro?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===ro?(this.consumeCodePoint(),{type:19,value:i}):{type:20,value:i}},s.prototype.consumeUrlToken=function(){var i=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ye)return{type:22,value:""};var c=this.peekCodePoint(0);if(c===no||c===to){var l=this.consumeStringToken(this.consumeCodePoint());return l.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ye||this.peekCodePoint(0)===qn)?(this.consumeCodePoint(),{type:22,value:l.value}):(this.consumeBadUrlRemnants(),lo)}for(;;){var f=this.consumeCodePoint();if(f===Ye||f===qn)return{type:22,value:m.apply(void 0,i)};if(io(f))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ye||this.peekCodePoint(0)===qn?(this.consumeCodePoint(),{type:22,value:m.apply(void 0,i)}):(this.consumeBadUrlRemnants(),lo);if(f===to||f===no||f===ro||gC(f))return this.consumeBadUrlRemnants(),lo;if(f===Zn)if(mt(f,this.peekCodePoint(0)))i.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),lo;else i.push(f)}},s.prototype.consumeWhiteSpace=function(){for(;io(this.peekCodePoint(0));)this.consumeCodePoint()},s.prototype.consumeBadUrlRemnants=function(){for(;;){var i=this.consumeCodePoint();if(i===qn||i===Ye)return;mt(i,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},s.prototype.consumeStringSlice=function(i){for(var c=5e4,l="";i>0;){var f=Math.min(c,i);l+=m.apply(void 0,this._value.splice(0,f)),i-=f}return this._value.shift(),l},s.prototype.consumeStringToken=function(i){var c="",l=0;do{var f=this._value[l];if(f===Ye||f===void 0||f===i)return c+=this.consumeStringSlice(l),{type:0,value:c};if(f===eo)return this._value.splice(0,l),bC;if(f===Zn){var p=this._value[l+1];p!==Ye&&p!==void 0&&(p===eo?(c+=this.consumeStringSlice(l),l=-1,this._value.shift()):mt(f,p)&&(c+=this.consumeStringSlice(l),c+=m(this.consumeEscapedCodePoint()),l=-1))}l++}while(!0)},s.prototype.consumeNumber=function(){var i=[],c=Jn,l=this.peekCodePoint(0);for((l===Mt||l===ve)&&i.push(this.consumeCodePoint());pe(this.peekCodePoint(0));)i.push(this.consumeCodePoint());l=this.peekCodePoint(0);var f=this.peekCodePoint(1);if(l===Ar&&pe(f))for(i.push(this.consumeCodePoint(),this.consumeCodePoint()),c=Vl;pe(this.peekCodePoint(0));)i.push(this.consumeCodePoint());l=this.peekCodePoint(0),f=this.peekCodePoint(1);var p=this.peekCodePoint(2);if((l===Jl||l===Yl)&&((f===Mt||f===ve)&&pe(p)||pe(f)))for(i.push(this.consumeCodePoint(),this.consumeCodePoint()),c=Vl;pe(this.peekCodePoint(0));)i.push(this.consumeCodePoint());return[hC(i),c]},s.prototype.consumeNumericToken=function(){var i=this.consumeNumber(),c=i[0],l=i[1],f=this.peekCodePoint(0);return ao(f,this.peekCodePoint(1),this.peekCodePoint(2))?{type:15,number:c,flags:l,unit:this.consumeName()}:f===T0?(this.consumeCodePoint(),{type:16,number:c,flags:l}):{type:17,number:c,flags:l}},s.prototype.consumeEscapedCodePoint=function(){var i=this.consumeCodePoint();if(fn(i)){for(var c=m(i);fn(this.peekCodePoint(0))&&c.length<6;)c+=m(this.consumeCodePoint());io(this.peekCodePoint(0))&&this.consumeCodePoint();var l=parseInt(c,16);return l===0||lC(l)||l>1114111?zl:l}return i===Ye?zl:i},s.prototype.consumeName=function(){for(var i="";;){var c=this.consumeCodePoint();if(jl(c))i+=m(c);else if(mt(c,this.peekCodePoint(0)))i+=m(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(c),i}},s})(),Ac=(function(){function s(i){this._tokens=i}return s.create=function(i){var c=new ql;return c.write(i),new s(c.read())},s.parseValue=function(i){return s.create(i).parseComponentValue()},s.parseValues=function(i){return s.create(i).parseComponentValues()},s.prototype.parseComponentValue=function(){for(var i=this.consumeToken();i.type===31;)i=this.consumeToken();if(i.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(i);var c=this.consumeComponentValue();do i=this.consumeToken();while(i.type===31);if(i.type===32)return c;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},s.prototype.parseComponentValues=function(){for(var i=[];;){var c=this.consumeComponentValue();if(c.type===32)return i;i.push(c),i.push()}},s.prototype.consumeComponentValue=function(){var i=this.consumeToken();switch(i.type){case 11:case 28:case 2:return this.consumeSimpleBlock(i.type);case 19:return this.consumeFunction(i)}return i},s.prototype.consumeSimpleBlock=function(i){for(var c={type:i,values:[]},l=this.consumeToken();;){if(l.type===32||TC(l,i))return c;this.reconsumeToken(l),c.values.push(this.consumeComponentValue()),l=this.consumeToken()}},s.prototype.consumeFunction=function(i){for(var c={name:i.value,values:[],type:18};;){var l=this.consumeToken();if(l.type===32||l.type===3)return c;this.reconsumeToken(l),c.values.push(this.consumeComponentValue())}},s.prototype.consumeToken=function(){var i=this._tokens.shift();return typeof i>"u"?ki:i},s.prototype.reconsumeToken=function(i){this._tokens.unshift(i)},s})(),er=function(s){return s.type===15},gn=function(s){return s.type===17},YA=function(s){return s.type===20},LC=function(s){return s.type===0},Mi=function(s,i){return YA(s)&&s.value===i},ec=function(s){return s.type!==31},hn=function(s){return s.type!==31&&s.type!==4},We=function(s){var i=[],c=[];return s.forEach(function(l){if(l.type===4){if(c.length===0)throw new Error("Error parsing function args, zero tokens for arg");i.push(c),c=[];return}l.type!==31&&c.push(l)}),c.length&&i.push(c),i},TC=function(s,i){return i===11&&s.type===12||i===28&&s.type===29?!0:i===2&&s.type===3},wt=function(s){return s.type===17||s.type===15},ae=function(s){return s.type===16||wt(s)},tc=function(s){return s.length>1?[s[0],s[1]]:[s[0]]},ge={type:17,number:0,flags:Jn},Oi={type:16,number:50,flags:Jn},Ct={type:16,number:100,flags:Jn},tr=function(s,i,c){var l=s[0],f=s[1];return[jA(l,i),jA(typeof f<"u"?f:l,c)]},jA=function(s,i){if(s.type===16)return s.number/100*i;if(er(s))switch(s.unit){case"rem":case"em":return 16*s.number;default:return s.number}return s.number},nc="deg",rc="grad",oc="rad",ic="turn",co={name:"angle",parse:function(s,i){if(i.type===15)switch(i.unit){case nc:return Math.PI*i.number/180;case rc:return Math.PI/200*i.number;case oc:return i.number;case ic:return Math.PI*2*i.number}throw new Error("Unsupported angle type")}},sc=function(s){return s.type===15&&(s.unit===nc||s.unit===rc||s.unit===oc||s.unit===ic)},ac=function(s){switch(s.filter(YA).map(function(i){return i.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ge,ge];case"to top":case"bottom":return _e(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ge,Ct];case"to right":case"left":return _e(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ct,Ct];case"to bottom":case"top":return _e(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ct,ge];case"to left":case"right":return _e(270)}return 0},_e=function(s){return Math.PI*s/180},vt={name:"color",parse:function(s,i){if(i.type===18){var c=kC[i.name];if(typeof c>"u")throw new Error('Attempting to parse an unsupported color function "'+i.name+'"');return c(s,i.values)}if(i.type===5){if(i.value.length===3){var l=i.value.substring(0,1),f=i.value.substring(1,2),p=i.value.substring(2,3);return Qt(parseInt(l+l,16),parseInt(f+f,16),parseInt(p+p,16),1)}if(i.value.length===4){var l=i.value.substring(0,1),f=i.value.substring(1,2),p=i.value.substring(2,3),C=i.value.substring(3,4);return Qt(parseInt(l+l,16),parseInt(f+f,16),parseInt(p+p,16),parseInt(C+C,16)/255)}if(i.value.length===6){var l=i.value.substring(0,2),f=i.value.substring(2,4),p=i.value.substring(4,6);return Qt(parseInt(l,16),parseInt(f,16),parseInt(p,16),1)}if(i.value.length===8){var l=i.value.substring(0,2),f=i.value.substring(2,4),p=i.value.substring(4,6),C=i.value.substring(6,8);return Qt(parseInt(l,16),parseInt(f,16),parseInt(p,16),parseInt(C,16)/255)}}if(i.type===20){var Q=at[i.value.toUpperCase()];if(typeof Q<"u")return Q}return at.TRANSPARENT}},yt=function(s){return(255&s)===0},fe=function(s){var i=255&s,c=255&s>>8,l=255&s>>16,f=255&s>>24;return i<255?"rgba("+f+","+l+","+c+","+i/255+")":"rgb("+f+","+l+","+c+")"},Qt=function(s,i,c,l){return(s<<24|i<<16|c<<8|Math.round(l*255)<<0)>>>0},lc=function(s,i){if(s.type===17)return s.number;if(s.type===16){var c=i===3?1:255;return i===3?s.number/100*c:Math.round(s.number/100*c)}return 0},cc=function(s,i){var c=i.filter(hn);if(c.length===3){var l=c.map(lc),f=l[0],p=l[1],C=l[2];return Qt(f,p,C,1)}if(c.length===4){var Q=c.map(lc),f=Q[0],p=Q[1],C=Q[2],E=Q[3];return Qt(f,p,C,E)}return 0};function Ki(s,i,c){return c<0&&(c+=1),c>=1&&(c-=1),c<1/6?(i-s)*c*6+s:c<1/2?i:c<2/3?(i-s)*6*(2/3-c)+s:s}var uc=function(s,i){var c=i.filter(hn),l=c[0],f=c[1],p=c[2],C=c[3],Q=(l.type===17?_e(l.number):co.parse(s,l))/(Math.PI*2),E=ae(f)?f.number/100:0,M=ae(p)?p.number/100:0,V=typeof C<"u"&&ae(C)?jA(C,1):1;if(E===0)return Qt(M*255,M*255,M*255,1);var z=M<=.5?M*(E+1):M+E-M*E,q=M*2-z,CA=Ki(q,z,Q+1/3),hA=Ki(q,z,Q),mA=Ki(q,z,Q-1/3);return Qt(CA*255,hA*255,mA*255,V)},kC={hsl:uc,hsla:uc,rgb:cc,rgba:cc},nr=function(s,i){return vt.parse(s,Ac.create(i).parseComponentValue())},at={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},MC={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(s,i){return i.map(function(c){if(YA(c))switch(c.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},OC={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},uo=function(s,i){var c=vt.parse(s,i[0]),l=i[1];return l&&ae(l)?{color:c,stop:l}:{color:c,stop:null}},dc=function(s,i){var c=s[0],l=s[s.length-1];c.stop===null&&(c.stop=ge),l.stop===null&&(l.stop=Ct);for(var f=[],p=0,C=0;C<s.length;C++){var Q=s[C].stop;if(Q!==null){var E=jA(Q,i);E>p?f.push(E):f.push(p),p=E}else f.push(null)}for(var M=null,C=0;C<f.length;C++){var V=f[C];if(V===null)M===null&&(M=C);else if(M!==null){for(var z=C-M,q=(V-f[M-1])/(z+1),CA=1;CA<=z;CA++)f[M+CA-1]=q*CA;M=null}}return s.map(function(hA,mA){return{color:hA.color,stop:Math.max(Math.min(1,f[mA]/i),0)}})},KC=function(s,i,c){var l=i/2,f=c/2,p=jA(s[0],i)-l,C=f-jA(s[1],c);return(Math.atan2(C,p)+Math.PI*2)%(Math.PI*2)},RC=function(s,i,c){var l=typeof s=="number"?s:KC(s,i,c),f=Math.abs(i*Math.sin(l))+Math.abs(c*Math.cos(l)),p=i/2,C=c/2,Q=f/2,E=Math.sin(l-Math.PI/2)*Q,M=Math.cos(l-Math.PI/2)*Q;return[f,p-M,p+M,C-E,C+E]},Oe=function(s,i){return Math.sqrt(s*s+i*i)},fc=function(s,i,c,l,f){return[[0,0],[0,i],[s,0],[s,i]].reduce(function(p,C){var Q=C[0],E=C[1],M=Oe(c-Q,l-E);return(f?M<p.optimumDistance:M>p.optimumDistance)?{optimumCorner:C,optimumDistance:M}:p},{optimumDistance:f?1/0:-1/0,optimumCorner:null}).optimumCorner},VC=function(s,i,c,l,f){var p=0,C=0;switch(s.size){case 0:s.shape===0?p=C=Math.min(Math.abs(i),Math.abs(i-l),Math.abs(c),Math.abs(c-f)):s.shape===1&&(p=Math.min(Math.abs(i),Math.abs(i-l)),C=Math.min(Math.abs(c),Math.abs(c-f)));break;case 2:if(s.shape===0)p=C=Math.min(Oe(i,c),Oe(i,c-f),Oe(i-l,c),Oe(i-l,c-f));else if(s.shape===1){var Q=Math.min(Math.abs(c),Math.abs(c-f))/Math.min(Math.abs(i),Math.abs(i-l)),E=fc(l,f,i,c,!0),M=E[0],V=E[1];p=Oe(M-i,(V-c)/Q),C=Q*p}break;case 1:s.shape===0?p=C=Math.max(Math.abs(i),Math.abs(i-l),Math.abs(c),Math.abs(c-f)):s.shape===1&&(p=Math.max(Math.abs(i),Math.abs(i-l)),C=Math.max(Math.abs(c),Math.abs(c-f)));break;case 3:if(s.shape===0)p=C=Math.max(Oe(i,c),Oe(i,c-f),Oe(i-l,c),Oe(i-l,c-f));else if(s.shape===1){var Q=Math.max(Math.abs(c),Math.abs(c-f))/Math.max(Math.abs(i),Math.abs(i-l)),z=fc(l,f,i,c,!1),M=z[0],V=z[1];p=Oe(M-i,(V-c)/Q),C=Q*p}break}return Array.isArray(s.size)&&(p=jA(s.size[0],l),C=s.size.length===2?jA(s.size[1],f):p),[p,C]},PC=function(s,i){var c=_e(180),l=[];return We(i).forEach(function(f,p){if(p===0){var C=f[0];if(C.type===20&&C.value==="to"){c=ac(f);return}else if(sc(C)){c=co.parse(s,C);return}}var Q=uo(s,f);l.push(Q)}),{angle:c,stops:l,type:1}},fo=function(s,i){var c=_e(180),l=[];return We(i).forEach(function(f,p){if(p===0){var C=f[0];if(C.type===20&&["top","left","right","bottom"].indexOf(C.value)!==-1){c=ac(f);return}else if(sc(C)){c=(co.parse(s,C)+_e(270))%_e(360);return}}var Q=uo(s,f);l.push(Q)}),{angle:c,stops:l,type:1}},GC=function(s,i){var c=_e(180),l=[],f=1,p=0,C=3,Q=[];return We(i).forEach(function(E,M){var V=E[0];if(M===0){if(YA(V)&&V.value==="linear"){f=1;return}else if(YA(V)&&V.value==="radial"){f=2;return}}if(V.type===18){if(V.name==="from"){var z=vt.parse(s,V.values[0]);l.push({stop:ge,color:z})}else if(V.name==="to"){var z=vt.parse(s,V.values[0]);l.push({stop:Ct,color:z})}else if(V.name==="color-stop"){var q=V.values.filter(hn);if(q.length===2){var z=vt.parse(s,q[1]),CA=q[0];gn(CA)&&l.push({stop:{type:16,number:CA.number*100,flags:CA.flags},color:z})}}}}),f===1?{angle:(c+_e(180))%_e(360),stops:l,type:f}:{size:C,shape:p,stops:l,position:Q,type:f}},gc="closest-side",hc="farthest-side",Bc="closest-corner",pc="farthest-corner",mc="circle",wc="ellipse",Cc="cover",vc="contain",zC=function(s,i){var c=0,l=3,f=[],p=[];return We(i).forEach(function(C,Q){var E=!0;if(Q===0){var M=!1;E=C.reduce(function(z,q){if(M)if(YA(q))switch(q.value){case"center":return p.push(Oi),z;case"top":case"left":return p.push(ge),z;case"right":case"bottom":return p.push(Ct),z}else(ae(q)||wt(q))&&p.push(q);else if(YA(q))switch(q.value){case mc:return c=0,!1;case wc:return c=1,!1;case"at":return M=!0,!1;case gc:return l=0,!1;case Cc:case hc:return l=1,!1;case vc:case Bc:return l=2,!1;case pc:return l=3,!1}else if(wt(q)||ae(q))return Array.isArray(l)||(l=[]),l.push(q),!1;return z},E)}if(E){var V=uo(s,C);f.push(V)}}),{size:l,shape:c,stops:f,position:p,type:2}},go=function(s,i){var c=0,l=3,f=[],p=[];return We(i).forEach(function(C,Q){var E=!0;if(Q===0?E=C.reduce(function(V,z){if(YA(z))switch(z.value){case"center":return p.push(Oi),!1;case"top":case"left":return p.push(ge),!1;case"right":case"bottom":return p.push(Ct),!1}else if(ae(z)||wt(z))return p.push(z),!1;return V},E):Q===1&&(E=C.reduce(function(V,z){if(YA(z))switch(z.value){case mc:return c=0,!1;case wc:return c=1,!1;case vc:case gc:return l=0,!1;case hc:return l=1,!1;case Bc:return l=2,!1;case Cc:case pc:return l=3,!1}else if(wt(z)||ae(z))return Array.isArray(l)||(l=[]),l.push(z),!1;return V},E)),E){var M=uo(s,C);f.push(M)}}),{size:l,shape:c,stops:f,position:p,type:2}},XC=function(s){return s.type===1},$C=function(s){return s.type===2},Ri={name:"image",parse:function(s,i){if(i.type===22){var c={url:i.value,type:0};return s.cache.addImage(i.value),c}if(i.type===18){var l=yc[i.name];if(typeof l>"u")throw new Error('Attempting to parse an unsupported image function "'+i.name+'"');return l(s,i.values)}throw new Error("Unsupported image type "+i.type)}};function YC(s){return!(s.type===20&&s.value==="none")&&(s.type!==18||!!yc[s.name])}var yc={"linear-gradient":PC,"-moz-linear-gradient":fo,"-ms-linear-gradient":fo,"-o-linear-gradient":fo,"-webkit-linear-gradient":fo,"radial-gradient":zC,"-moz-radial-gradient":go,"-ms-radial-gradient":go,"-o-radial-gradient":go,"-webkit-radial-gradient":go,"-webkit-gradient":GC},WC={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(s,i){if(i.length===0)return[];var c=i[0];return c.type===20&&c.value==="none"?[]:i.filter(function(l){return hn(l)&&YC(l)}).map(function(l){return Ri.parse(s,l)})}},JC={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(s,i){return i.map(function(c){if(YA(c))switch(c.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ZC={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(s,i){return We(i).map(function(c){return c.filter(ae)}).map(tc)}},jC={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(s,i){return We(i).map(function(c){return c.filter(YA).map(function(l){return l.value}).join(" ")}).map(qC)}},qC=function(s){switch(s){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},Bn;(function(s){s.AUTO="auto",s.CONTAIN="contain",s.COVER="cover"})(Bn||(Bn={}));var Av={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(s,i){return We(i).map(function(c){return c.filter(ev)})}},ev=function(s){return YA(s)||ae(s)},ho=function(s){return{name:"border-"+s+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},tv=ho("top"),nv=ho("right"),rv=ho("bottom"),ov=ho("left"),Bo=function(s){return{name:"border-radius-"+s,initialValue:"0 0",prefix:!1,type:1,parse:function(i,c){return tc(c.filter(ae))}}},iv=Bo("top-left"),sv=Bo("top-right"),av=Bo("bottom-right"),lv=Bo("bottom-left"),po=function(s){return{name:"border-"+s+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(i,c){switch(c){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},cv=po("top"),uv=po("right"),dv=po("bottom"),fv=po("left"),mo=function(s){return{name:"border-"+s+"-width",initialValue:"0",type:0,prefix:!1,parse:function(i,c){return er(c)?c.number:0}}},gv=mo("top"),hv=mo("right"),Bv=mo("bottom"),pv=mo("left"),mv={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},wv={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(s,i){return i==="rtl"?1:0}},Cv={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(s,i){return i.filter(YA).reduce(function(c,l){return c|vv(l.value)},0)}},vv=function(s){switch(s){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},yv={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Qv={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(s,i){return i.type===20&&i.value==="normal"?0:i.type===17||i.type===15?i.number:0}},wo;(function(s){s.NORMAL="normal",s.STRICT="strict"})(wo||(wo={}));var Ev={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){return i==="strict"?wo.STRICT:wo.NORMAL}},Fv={name:"line-height",initialValue:"normal",prefix:!1,type:4},Qc=function(s,i){return YA(s)&&s.value==="normal"?1.2*i:s.type===17?i*s.number:ae(s)?jA(s,i):i},Uv={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(s,i){return i.type===20&&i.value==="none"?null:Ri.parse(s,i)}},bv={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(s,i){return i==="inside"?0:1}},Vi={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Co=function(s){return{name:"margin-"+s,initialValue:"0",prefix:!1,type:4}},Hv=Co("top"),Iv=Co("right"),_v=Co("bottom"),Sv=Co("left"),xv={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(s,i){return i.filter(YA).map(function(c){switch(c.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},Dv={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){return i==="break-word"?"break-word":"normal"}},vo=function(s){return{name:"padding-"+s,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Nv=vo("top"),Lv=vo("right"),Tv=vo("bottom"),kv=vo("left"),Mv={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(s,i){switch(i){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Ov={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(s,i){switch(i){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Kv={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.length===1&&Mi(i[0],"none")?[]:We(i).map(function(c){for(var l={color:at.TRANSPARENT,offsetX:ge,offsetY:ge,blur:ge},f=0,p=0;p<c.length;p++){var C=c[p];wt(C)?(f===0?l.offsetX=C:f===1?l.offsetY=C:l.blur=C,f++):l.color=vt.parse(s,C)}return l})}},Rv={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Vv={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(s,i){if(i.type===20&&i.value==="none")return null;if(i.type===18){var c=zv[i.name];if(typeof c>"u")throw new Error('Attempting to parse an unsupported transform function "'+i.name+'"');return c(i.values)}return null}},Pv=function(s){var i=s.filter(function(c){return c.type===17}).map(function(c){return c.number});return i.length===6?i:null},Gv=function(s){var i=s.filter(function(E){return E.type===17}).map(function(E){return E.number}),c=i[0],l=i[1];i[2],i[3];var f=i[4],p=i[5];i[6],i[7],i[8],i[9],i[10],i[11];var C=i[12],Q=i[13];return i[14],i[15],i.length===16?[c,l,f,p,C,Q]:null},zv={matrix:Pv,matrix3d:Gv},Ec={type:16,number:50,flags:Jn},Xv=[Ec,Ec],$v={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(s,i){var c=i.filter(ae);return c.length!==2?Xv:[c[0],c[1]]}},Yv={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"hidden":return 1;case"collapse":return 2;default:return 0}}},rr;(function(s){s.NORMAL="normal",s.BREAK_ALL="break-all",s.KEEP_ALL="keep-all"})(rr||(rr={}));for(var Wv={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){switch(i){case"break-all":return rr.BREAK_ALL;case"keep-all":return rr.KEEP_ALL;default:return rr.NORMAL}}},Jv={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(s,i){if(i.type===20)return{auto:!0,order:0};if(gn(i))return{auto:!1,order:i.number};throw new Error("Invalid z-index number parsed")}},Fc={name:"time",parse:function(s,i){if(i.type===15)switch(i.unit.toLowerCase()){case"s":return 1e3*i.number;case"ms":return i.number}throw new Error("Unsupported time type")}},Zv={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(s,i){return gn(i)?i.number:1}},jv={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},qv={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(s,i){return i.filter(YA).map(function(c){switch(c.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(c){return c!==0})}},Ay={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(s,i){var c=[],l=[];return i.forEach(function(f){switch(f.type){case 20:case 0:c.push(f.value);break;case 17:c.push(f.number.toString());break;case 4:l.push(c.join(" ")),c.length=0;break}}),c.length&&l.push(c.join(" ")),l.map(function(f){return f.indexOf(" ")===-1?f:"'"+f+"'"})}},ey={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ty={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(s,i){return gn(i)?i.number:YA(i)&&i.value==="bold"?700:400}},ny={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.filter(YA).map(function(c){return c.value})}},ry={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){switch(i){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},de=function(s,i){return(s&i)!==0},oy={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(s,i){if(i.length===0)return[];var c=i[0];return c.type===20&&c.value==="none"?[]:i}},iy={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return null;var c=i[0];if(c.type===20&&c.value==="none")return null;for(var l=[],f=i.filter(ec),p=0;p<f.length;p++){var C=f[p],Q=f[p+1];if(C.type===20){var E=Q&&gn(Q)?Q.number:1;l.push({counter:C.value,increment:E})}}return l}},sy={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return[];for(var c=[],l=i.filter(ec),f=0;f<l.length;f++){var p=l[f],C=l[f+1];if(YA(p)&&p.value!=="none"){var Q=C&&gn(C)?C.number:0;c.push({counter:p.value,reset:Q})}}return c}},ay={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(s,i){return i.filter(er).map(function(c){return Fc.parse(s,c)})}},ly={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return null;var c=i[0];if(c.type===20&&c.value==="none")return null;var l=[],f=i.filter(LC);if(f.length%2!==0)return null;for(var p=0;p<f.length;p+=2){var C=f[p].value,Q=f[p+1].value;l.push({open:C,close:Q})}return l}},Uc=function(s,i,c){if(!s)return"";var l=s[Math.min(i,s.length-1)];return l?c?l.open:l.close:""},cy={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.length===1&&Mi(i[0],"none")?[]:We(i).map(function(c){for(var l={color:255,offsetX:ge,offsetY:ge,blur:ge,spread:ge,inset:!1},f=0,p=0;p<c.length;p++){var C=c[p];Mi(C,"inset")?l.inset=!0:wt(C)?(f===0?l.offsetX=C:f===1?l.offsetY=C:f===2?l.blur=C:l.spread=C,f++):l.color=vt.parse(s,C)}return l})}},uy={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(s,i){var c=[0,1,2],l=[];return i.filter(YA).forEach(function(f){switch(f.value){case"stroke":l.push(1);break;case"fill":l.push(0);break;case"markers":l.push(2);break}}),c.forEach(function(f){l.indexOf(f)===-1&&l.push(f)}),l}},dy={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},fy={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(s,i){return er(i)?i.number:0}},gy=(function(){function s(i,c){var l,f;this.animationDuration=UA(i,ay,c.animationDuration),this.backgroundClip=UA(i,MC,c.backgroundClip),this.backgroundColor=UA(i,OC,c.backgroundColor),this.backgroundImage=UA(i,WC,c.backgroundImage),this.backgroundOrigin=UA(i,JC,c.backgroundOrigin),this.backgroundPosition=UA(i,ZC,c.backgroundPosition),this.backgroundRepeat=UA(i,jC,c.backgroundRepeat),this.backgroundSize=UA(i,Av,c.backgroundSize),this.borderTopColor=UA(i,tv,c.borderTopColor),this.borderRightColor=UA(i,nv,c.borderRightColor),this.borderBottomColor=UA(i,rv,c.borderBottomColor),this.borderLeftColor=UA(i,ov,c.borderLeftColor),this.borderTopLeftRadius=UA(i,iv,c.borderTopLeftRadius),this.borderTopRightRadius=UA(i,sv,c.borderTopRightRadius),this.borderBottomRightRadius=UA(i,av,c.borderBottomRightRadius),this.borderBottomLeftRadius=UA(i,lv,c.borderBottomLeftRadius),this.borderTopStyle=UA(i,cv,c.borderTopStyle),this.borderRightStyle=UA(i,uv,c.borderRightStyle),this.borderBottomStyle=UA(i,dv,c.borderBottomStyle),this.borderLeftStyle=UA(i,fv,c.borderLeftStyle),this.borderTopWidth=UA(i,gv,c.borderTopWidth),this.borderRightWidth=UA(i,hv,c.borderRightWidth),this.borderBottomWidth=UA(i,Bv,c.borderBottomWidth),this.borderLeftWidth=UA(i,pv,c.borderLeftWidth),this.boxShadow=UA(i,cy,c.boxShadow),this.color=UA(i,mv,c.color),this.direction=UA(i,wv,c.direction),this.display=UA(i,Cv,c.display),this.float=UA(i,yv,c.cssFloat),this.fontFamily=UA(i,Ay,c.fontFamily),this.fontSize=UA(i,ey,c.fontSize),this.fontStyle=UA(i,ry,c.fontStyle),this.fontVariant=UA(i,ny,c.fontVariant),this.fontWeight=UA(i,ty,c.fontWeight),this.letterSpacing=UA(i,Qv,c.letterSpacing),this.lineBreak=UA(i,Ev,c.lineBreak),this.lineHeight=UA(i,Fv,c.lineHeight),this.listStyleImage=UA(i,Uv,c.listStyleImage),this.listStylePosition=UA(i,bv,c.listStylePosition),this.listStyleType=UA(i,Vi,c.listStyleType),this.marginTop=UA(i,Hv,c.marginTop),this.marginRight=UA(i,Iv,c.marginRight),this.marginBottom=UA(i,_v,c.marginBottom),this.marginLeft=UA(i,Sv,c.marginLeft),this.opacity=UA(i,Zv,c.opacity);var p=UA(i,xv,c.overflow);this.overflowX=p[0],this.overflowY=p[p.length>1?1:0],this.overflowWrap=UA(i,Dv,c.overflowWrap),this.paddingTop=UA(i,Nv,c.paddingTop),this.paddingRight=UA(i,Lv,c.paddingRight),this.paddingBottom=UA(i,Tv,c.paddingBottom),this.paddingLeft=UA(i,kv,c.paddingLeft),this.paintOrder=UA(i,uy,c.paintOrder),this.position=UA(i,Ov,c.position),this.textAlign=UA(i,Mv,c.textAlign),this.textDecorationColor=UA(i,jv,(l=c.textDecorationColor)!==null&&l!==void 0?l:c.color),this.textDecorationLine=UA(i,qv,(f=c.textDecorationLine)!==null&&f!==void 0?f:c.textDecoration),this.textShadow=UA(i,Kv,c.textShadow),this.textTransform=UA(i,Rv,c.textTransform),this.transform=UA(i,Vv,c.transform),this.transformOrigin=UA(i,$v,c.transformOrigin),this.visibility=UA(i,Yv,c.visibility),this.webkitTextStrokeColor=UA(i,dy,c.webkitTextStrokeColor),this.webkitTextStrokeWidth=UA(i,fy,c.webkitTextStrokeWidth),this.wordBreak=UA(i,Wv,c.wordBreak),this.zIndex=UA(i,Jv,c.zIndex)}return s.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},s.prototype.isTransparent=function(){return yt(this.backgroundColor)},s.prototype.isTransformed=function(){return this.transform!==null},s.prototype.isPositioned=function(){return this.position!==0},s.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},s.prototype.isFloating=function(){return this.float!==0},s.prototype.isInlineLevel=function(){return de(this.display,4)||de(this.display,33554432)||de(this.display,268435456)||de(this.display,536870912)||de(this.display,67108864)||de(this.display,134217728)},s})(),hy=(function(){function s(i,c){this.content=UA(i,oy,c.content),this.quotes=UA(i,ly,c.quotes)}return s})(),bc=(function(){function s(i,c){this.counterIncrement=UA(i,iy,c.counterIncrement),this.counterReset=UA(i,sy,c.counterReset)}return s})(),UA=function(s,i,c){var l=new ql,f=c!==null&&typeof c<"u"?c.toString():i.initialValue;l.write(f);var p=new Ac(l.read());switch(i.type){case 2:var C=p.parseComponentValue();return i.parse(s,YA(C)?C.value:i.initialValue);case 0:return i.parse(s,p.parseComponentValue());case 1:return i.parse(s,p.parseComponentValues());case 4:return p.parseComponentValue();case 3:switch(i.format){case"angle":return co.parse(s,p.parseComponentValue());case"color":return vt.parse(s,p.parseComponentValue());case"image":return Ri.parse(s,p.parseComponentValue());case"length":var Q=p.parseComponentValue();return wt(Q)?Q:ge;case"length-percentage":var E=p.parseComponentValue();return ae(E)?E:ge;case"time":return Fc.parse(s,p.parseComponentValue())}break}},By="data-html2canvas-debug",py=function(s){switch(s.getAttribute(By)){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Pi=function(s,i){var c=py(s);return c===1||i===c},Je=(function(){function s(i,c){if(this.context=i,this.textNodes=[],this.elements=[],this.flags=0,Pi(c,3))debugger;this.styles=new gy(i,window.getComputedStyle(c,null)),ns(c)&&(this.styles.animationDuration.some(function(l){return l>0})&&(c.style.animationDuration="0s"),this.styles.transform!==null&&(c.style.transform="none")),this.bounds=h(this.context,c),Pi(c,4)&&(this.flags|=16)}return s})(),my="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Hc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",or=typeof Uint8Array>"u"?[]:new Uint8Array(256),yo=0;yo<Hc.length;yo++)or[Hc.charCodeAt(yo)]=yo;for(var wy=function(s){var i=s.length*.75,c=s.length,l,f=0,p,C,Q,E;s[s.length-1]==="="&&(i--,s[s.length-2]==="="&&i--);var M=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(i):new Array(i),V=Array.isArray(M)?M:new Uint8Array(M);for(l=0;l<c;l+=4)p=or[s.charCodeAt(l)],C=or[s.charCodeAt(l+1)],Q=or[s.charCodeAt(l+2)],E=or[s.charCodeAt(l+3)],V[f++]=p<<2|C>>4,V[f++]=(C&15)<<4|Q>>2,V[f++]=(Q&3)<<6|E&63;return M},Cy=function(s){for(var i=s.length,c=[],l=0;l<i;l+=2)c.push(s[l+1]<<8|s[l]);return c},vy=function(s){for(var i=s.length,c=[],l=0;l<i;l+=4)c.push(s[l+3]<<24|s[l+2]<<16|s[l+1]<<8|s[l]);return c},Ot=5,Gi=11,zi=2,yy=Gi-Ot,Ic=65536>>Ot,Xi=(1<<Ot)-1,Qy=Ic+(1024>>Ot)+32,Ey=65536>>Gi,Fy=(1<<yy)-1,_c=function(s,i,c){return s.slice?s.slice(i,c):new Uint16Array(Array.prototype.slice.call(s,i,c))},Uy=function(s,i,c){return s.slice?s.slice(i,c):new Uint32Array(Array.prototype.slice.call(s,i,c))},by=function(s,i){var c=wy(s),l=Array.isArray(c)?vy(c):new Uint32Array(c),f=Array.isArray(c)?Cy(c):new Uint16Array(c),p=24,C=_c(f,p/2,l[4]/2),Q=l[5]===2?_c(f,(p+l[4])/2):Uy(l,Math.ceil((p+l[4])/4));return new Hy(l[0],l[1],l[2],l[3],C,Q)},Hy=(function(){function s(i,c,l,f,p,C){this.initialValue=i,this.errorValue=c,this.highStart=l,this.highValueIndex=f,this.index=p,this.data=C}return s.prototype.get=function(i){var c;if(i>=0){if(i<55296||i>56319&&i<=65535)return c=this.index[i>>Ot],c=(c<<zi)+(i&Xi),this.data[c];if(i<=65535)return c=this.index[Ic+(i-55296>>Ot)],c=(c<<zi)+(i&Xi),this.data[c];if(i<this.highStart)return c=Qy-Ey+(i>>Gi),c=this.index[c],c+=i>>Ot&Fy,c=this.index[c],c=(c<<zi)+(i&Xi),this.data[c];if(i<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),Sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Iy=typeof Uint8Array>"u"?[]:new Uint8Array(256),Qo=0;Qo<Sc.length;Qo++)Iy[Sc.charCodeAt(Qo)]=Qo;var _y=1,$i=2,Yi=3,xc=4,Dc=5,Sy=7,Nc=8,Wi=9,Ji=10,Lc=11,Tc=12,kc=13,Mc=14,Zi=15,xy=function(s){for(var i=[],c=0,l=s.length;c<l;){var f=s.charCodeAt(c++);if(f>=55296&&f<=56319&&c<l){var p=s.charCodeAt(c++);(p&64512)===56320?i.push(((f&1023)<<10)+(p&1023)+65536):(i.push(f),c--)}else i.push(f)}return i},Dy=function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var c=s.length;if(!c)return"";for(var l=[],f=-1,p="";++f<c;){var C=s[f];C<=65535?l.push(C):(C-=65536,l.push((C>>10)+55296,C%1024+56320)),(f+1===c||l.length>16384)&&(p+=String.fromCharCode.apply(String,l),l.length=0)}return p},Ny=by(my),Se="×",ji="÷",Ly=function(s){return Ny.get(s)},Ty=function(s,i,c){var l=c-2,f=i[l],p=i[c-1],C=i[c];if(p===$i&&C===Yi)return Se;if(p===$i||p===Yi||p===xc||C===$i||C===Yi||C===xc)return ji;if(p===Nc&&[Nc,Wi,Lc,Tc].indexOf(C)!==-1||(p===Lc||p===Wi)&&(C===Wi||C===Ji)||(p===Tc||p===Ji)&&C===Ji||C===kc||C===Dc||C===Sy||p===_y)return Se;if(p===kc&&C===Mc){for(;f===Dc;)f=i[--l];if(f===Mc)return Se}if(p===Zi&&C===Zi){for(var Q=0;f===Zi;)Q++,f=i[--l];if(Q%2===0)return Se}return ji},ky=function(s){var i=xy(s),c=i.length,l=0,f=0,p=i.map(Ly);return{next:function(){if(l>=c)return{done:!0,value:null};for(var C=Se;l<c&&(C=Ty(i,p,++l))===Se;);if(C!==Se||l===c){var Q=Dy.apply(null,i.slice(f,l));return f=l,{value:Q,done:!1}}return{done:!0,value:null}}}},My=function(s){for(var i=ky(s),c=[],l;!(l=i.next()).done;)l.value&&c.push(l.value.slice());return c},Oy=function(s){var i=123;if(s.createRange){var c=s.createRange();if(c.getBoundingClientRect){var l=s.createElement("boundtest");l.style.height=i+"px",l.style.display="block",s.body.appendChild(l),c.selectNode(l);var f=c.getBoundingClientRect(),p=Math.round(f.height);if(s.body.removeChild(l),p===i)return!0}}return!1},Ky=function(s){var i=s.createElement("boundtest");i.style.width="50px",i.style.display="block",i.style.fontSize="12px",i.style.letterSpacing="0px",i.style.wordSpacing="0px",s.body.appendChild(i);var c=s.createRange();i.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var l=i.firstChild,f=w(l.data).map(function(E){return m(E)}),p=0,C={},Q=f.every(function(E,M){c.setStart(l,p),c.setEnd(l,p+E.length);var V=c.getBoundingClientRect();p+=E.length;var z=V.x>C.x||V.y>C.y;return C=V,M===0?!0:z});return s.body.removeChild(i),Q},Ry=function(){return typeof new Image().crossOrigin<"u"},Vy=function(){return typeof new XMLHttpRequest().responseType=="string"},Py=function(s){var i=new Image,c=s.createElement("canvas"),l=c.getContext("2d");if(!l)return!1;i.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{l.drawImage(i,0,0),c.toDataURL()}catch{return!1}return!0},Oc=function(s){return s[0]===0&&s[1]===255&&s[2]===0&&s[3]===255},Gy=function(s){var i=s.createElement("canvas"),c=100;i.width=c,i.height=c;var l=i.getContext("2d");if(!l)return Promise.reject(!1);l.fillStyle="rgb(0, 255, 0)",l.fillRect(0,0,c,c);var f=new Image,p=i.toDataURL();f.src=p;var C=qi(c,c,0,0,f);return l.fillStyle="red",l.fillRect(0,0,c,c),Kc(C).then(function(Q){l.drawImage(Q,0,0);var E=l.getImageData(0,0,c,c).data;l.fillStyle="red",l.fillRect(0,0,c,c);var M=s.createElement("div");return M.style.backgroundImage="url("+p+")",M.style.height=c+"px",Oc(E)?Kc(qi(c,c,0,0,M)):Promise.reject(!1)}).then(function(Q){return l.drawImage(Q,0,0),Oc(l.getImageData(0,0,c,c).data)}).catch(function(){return!1})},qi=function(s,i,c,l,f){var p="http://www.w3.org/2000/svg",C=document.createElementNS(p,"svg"),Q=document.createElementNS(p,"foreignObject");return C.setAttributeNS(null,"width",s.toString()),C.setAttributeNS(null,"height",i.toString()),Q.setAttributeNS(null,"width","100%"),Q.setAttributeNS(null,"height","100%"),Q.setAttributeNS(null,"x",c.toString()),Q.setAttributeNS(null,"y",l.toString()),Q.setAttributeNS(null,"externalResourcesRequired","true"),C.appendChild(Q),Q.appendChild(f),C},Kc=function(s){return new Promise(function(i,c){var l=new Image;l.onload=function(){return i(l)},l.onerror=c,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},he={get SUPPORT_RANGE_BOUNDS(){var s=Oy(document);return Object.defineProperty(he,"SUPPORT_RANGE_BOUNDS",{value:s}),s},get SUPPORT_WORD_BREAKING(){var s=he.SUPPORT_RANGE_BOUNDS&&Ky(document);return Object.defineProperty(he,"SUPPORT_WORD_BREAKING",{value:s}),s},get SUPPORT_SVG_DRAWING(){var s=Py(document);return Object.defineProperty(he,"SUPPORT_SVG_DRAWING",{value:s}),s},get SUPPORT_FOREIGNOBJECT_DRAWING(){var s=typeof Array.from=="function"&&typeof window.fetch=="function"?Gy(document):Promise.resolve(!1);return Object.defineProperty(he,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:s}),s},get SUPPORT_CORS_IMAGES(){var s=Ry();return Object.defineProperty(he,"SUPPORT_CORS_IMAGES",{value:s}),s},get SUPPORT_RESPONSE_TYPE(){var s=Vy();return Object.defineProperty(he,"SUPPORT_RESPONSE_TYPE",{value:s}),s},get SUPPORT_CORS_XHR(){var s="withCredentials"in new XMLHttpRequest;return Object.defineProperty(he,"SUPPORT_CORS_XHR",{value:s}),s},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var s=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(he,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:s}),s}},ir=(function(){function s(i,c){this.text=i,this.bounds=c}return s})(),zy=function(s,i,c,l){var f=Yy(i,c),p=[],C=0;return f.forEach(function(Q){if(c.textDecorationLine.length||Q.trim().length>0)if(he.SUPPORT_RANGE_BOUNDS){var E=Rc(l,C,Q.length).getClientRects();if(E.length>1){var M=As(Q),V=0;M.forEach(function(q){p.push(new ir(q,g.fromDOMRectList(s,Rc(l,V+C,q.length).getClientRects()))),V+=q.length})}else p.push(new ir(Q,g.fromDOMRectList(s,E)))}else{var z=l.splitText(Q.length);p.push(new ir(Q,Xy(s,l))),l=z}else he.SUPPORT_RANGE_BOUNDS||(l=l.splitText(Q.length));C+=Q.length}),p},Xy=function(s,i){var c=i.ownerDocument;if(c){var l=c.createElement("html2canvaswrapper");l.appendChild(i.cloneNode(!0));var f=i.parentNode;if(f){f.replaceChild(l,i);var p=h(s,l);return l.firstChild&&f.replaceChild(l.firstChild,l),p}}return g.EMPTY},Rc=function(s,i,c){var l=s.ownerDocument;if(!l)throw new Error("Node has no owner document");var f=l.createRange();return f.setStart(s,i),f.setEnd(s,i+c),f},As=function(s){if(he.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(i.segment(s)).map(function(c){return c.segment})}return My(s)},$y=function(s,i){if(he.SUPPORT_NATIVE_TEXT_SEGMENTATION){var c=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(c.segment(s)).map(function(l){return l.segment})}return Jy(s,i)},Yy=function(s,i){return i.letterSpacing!==0?As(s):$y(s,i)},Wy=[32,160,4961,65792,65793,4153,4241],Jy=function(s,i){for(var c=I0(s,{lineBreak:i.lineBreak,wordBreak:i.overflowWrap==="break-word"?"break-word":i.wordBreak}),l=[],f,p=function(){if(f.value){var C=w(f.value.slice()),Q="";C.forEach(function(E){Wy.indexOf(E)===-1?Q+=m(E):(Q.length&&l.push(Q),l.push(m(E)),Q="")}),Q.length&&l.push(Q)}};!(f=c.next()).done;)p();return l},Zy=(function(){function s(i,c,l){this.text=jy(c.data,l.textTransform),this.textBounds=zy(i,this.text,l,c)}return s})(),jy=function(s,i){switch(i){case 1:return s.toLowerCase();case 3:return s.replace(qy,AQ);case 2:return s.toUpperCase();default:return s}},qy=/(^|\s|:|-|\(|\))([a-z])/g,AQ=function(s,i,c){return s.length>0?i+c.toUpperCase():s},Vc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.src=l.currentSrc||l.src,f.intrinsicWidth=l.naturalWidth,f.intrinsicHeight=l.naturalHeight,f.context.cache.addImage(f.src),f}return i})(Je),Pc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.canvas=l,f.intrinsicWidth=l.width,f.intrinsicHeight=l.height,f}return i})(Je),Gc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this,p=new XMLSerializer,C=h(c,l);return l.setAttribute("width",C.width+"px"),l.setAttribute("height",C.height+"px"),f.svg="data:image/svg+xml,"+encodeURIComponent(p.serializeToString(l)),f.intrinsicWidth=l.width.baseVal.value,f.intrinsicHeight=l.height.baseVal.value,f.context.cache.addImage(f.svg),f}return i})(Je),zc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.value=l.value,f}return i})(Je),es=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.start=l.start,f.reversed=typeof l.reversed=="boolean"&&l.reversed===!0,f}return i})(Je),eQ=[{type:15,flags:0,unit:"px",number:3}],tQ=[{type:16,flags:0,number:50}],nQ=function(s){return s.width>s.height?new g(s.left+(s.width-s.height)/2,s.top,s.height,s.height):s.width<s.height?new g(s.left,s.top+(s.height-s.width)/2,s.width,s.width):s},rQ=function(s){var i=s.type===oQ?new Array(s.value.length+1).join("•"):s.value;return i.length===0?s.placeholder||"":i},Eo="checkbox",Fo="radio",oQ="password",Xc=707406591,ts=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;switch(f.type=l.type.toLowerCase(),f.checked=l.checked,f.value=rQ(l),(f.type===Eo||f.type===Fo)&&(f.styles.backgroundColor=3739148031,f.styles.borderTopColor=f.styles.borderRightColor=f.styles.borderBottomColor=f.styles.borderLeftColor=2779096575,f.styles.borderTopWidth=f.styles.borderRightWidth=f.styles.borderBottomWidth=f.styles.borderLeftWidth=1,f.styles.borderTopStyle=f.styles.borderRightStyle=f.styles.borderBottomStyle=f.styles.borderLeftStyle=1,f.styles.backgroundClip=[0],f.styles.backgroundOrigin=[0],f.bounds=nQ(f.bounds)),f.type){case Eo:f.styles.borderTopRightRadius=f.styles.borderTopLeftRadius=f.styles.borderBottomRightRadius=f.styles.borderBottomLeftRadius=eQ;break;case Fo:f.styles.borderTopRightRadius=f.styles.borderTopLeftRadius=f.styles.borderBottomRightRadius=f.styles.borderBottomLeftRadius=tQ;break}return f}return i})(Je),$c=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this,p=l.options[l.selectedIndex||0];return f.value=p&&p.text||"",f}return i})(Je),Yc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.value=l.value,f}return i})(Je),Wc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;f.src=l.src,f.width=parseInt(l.width,10)||0,f.height=parseInt(l.height,10)||0,f.backgroundColor=f.styles.backgroundColor;try{if(l.contentWindow&&l.contentWindow.document&&l.contentWindow.document.documentElement){f.tree=Zc(c,l.contentWindow.document.documentElement);var p=l.contentWindow.document.documentElement?nr(c,getComputedStyle(l.contentWindow.document.documentElement).backgroundColor):at.TRANSPARENT,C=l.contentWindow.document.body?nr(c,getComputedStyle(l.contentWindow.document.body).backgroundColor):at.TRANSPARENT;f.backgroundColor=yt(p)?yt(C)?f.styles.backgroundColor:C:p}}catch{}return f}return i})(Je),iQ=["OL","UL","MENU"],Uo=function(s,i,c,l){for(var f=i.firstChild,p=void 0;f;f=p)if(p=f.nextSibling,jc(f)&&f.data.trim().length>0)c.textNodes.push(new Zy(s,f,c.styles));else if(pn(f))if(ru(f)&&f.assignedNodes)f.assignedNodes().forEach(function(Q){return Uo(s,Q,c,l)});else{var C=Jc(s,f);C.styles.isVisible()&&(sQ(f,C,l)?C.flags|=4:aQ(C.styles)&&(C.flags|=2),iQ.indexOf(f.tagName)!==-1&&(C.flags|=8),c.elements.push(C),f.slot,f.shadowRoot?Uo(s,f.shadowRoot,C,l):!Ho(f)&&!qc(f)&&!Io(f)&&Uo(s,f,C,l))}},Jc=function(s,i){return os(i)?new Vc(s,i):Au(i)?new Pc(s,i):qc(i)?new Gc(s,i):lQ(i)?new zc(s,i):cQ(i)?new es(s,i):uQ(i)?new ts(s,i):Io(i)?new $c(s,i):Ho(i)?new Yc(s,i):tu(i)?new Wc(s,i):new Je(s,i)},Zc=function(s,i){var c=Jc(s,i);return c.flags|=4,Uo(s,i,c,c),c},sQ=function(s,i,c){return i.styles.isPositionedWithZIndex()||i.styles.opacity<1||i.styles.isTransformed()||rs(s)&&c.styles.isTransparent()},aQ=function(s){return s.isPositioned()||s.isFloating()},jc=function(s){return s.nodeType===Node.TEXT_NODE},pn=function(s){return s.nodeType===Node.ELEMENT_NODE},ns=function(s){return pn(s)&&typeof s.style<"u"&&!bo(s)},bo=function(s){return typeof s.className=="object"},lQ=function(s){return s.tagName==="LI"},cQ=function(s){return s.tagName==="OL"},uQ=function(s){return s.tagName==="INPUT"},dQ=function(s){return s.tagName==="HTML"},qc=function(s){return s.tagName==="svg"},rs=function(s){return s.tagName==="BODY"},Au=function(s){return s.tagName==="CANVAS"},eu=function(s){return s.tagName==="VIDEO"},os=function(s){return s.tagName==="IMG"},tu=function(s){return s.tagName==="IFRAME"},nu=function(s){return s.tagName==="STYLE"},fQ=function(s){return s.tagName==="SCRIPT"},Ho=function(s){return s.tagName==="TEXTAREA"},Io=function(s){return s.tagName==="SELECT"},ru=function(s){return s.tagName==="SLOT"},ou=function(s){return s.tagName.indexOf("-")>0},gQ=(function(){function s(){this.counters={}}return s.prototype.getCounterValue=function(i){var c=this.counters[i];return c&&c.length?c[c.length-1]:1},s.prototype.getCounterValues=function(i){var c=this.counters[i];return c||[]},s.prototype.pop=function(i){var c=this;i.forEach(function(l){return c.counters[l].pop()})},s.prototype.parse=function(i){var c=this,l=i.counterIncrement,f=i.counterReset,p=!0;l!==null&&l.forEach(function(Q){var E=c.counters[Q.counter];E&&Q.increment!==0&&(p=!1,E.length||E.push(1),E[Math.max(0,E.length-1)]+=Q.increment)});var C=[];return p&&f.forEach(function(Q){var E=c.counters[Q.counter];C.push(Q.counter),E||(E=c.counters[Q.counter]=[]),E.push(Q.reset)}),C},s})(),iu={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},su={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},hQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},BQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},mn=function(s,i,c,l,f,p){return s<i||s>c?ar(s,f,p.length>0):l.integers.reduce(function(C,Q,E){for(;s>=Q;)s-=Q,C+=l.values[E];return C},"")+p},au=function(s,i,c,l){var f="";do c||s--,f=l(s)+f,s/=i;while(s*i>=i);return f},oe=function(s,i,c,l,f){var p=c-i+1;return(s<0?"-":"")+(au(Math.abs(s),p,l,function(C){return m(Math.floor(C%p)+i)})+f)},Kt=function(s,i,c){c===void 0&&(c=". ");var l=i.length;return au(Math.abs(s),l,!1,function(f){return i[Math.floor(f%l)]})+c},wn=1,Et=2,Ft=4,sr=8,lt=function(s,i,c,l,f,p){if(s<-9999||s>9999)return ar(s,4,f.length>0);var C=Math.abs(s),Q=f;if(C===0)return i[0]+Q;for(var E=0;C>0&&E<=4;E++){var M=C%10;M===0&&de(p,wn)&&Q!==""?Q=i[M]+Q:M>1||M===1&&E===0||M===1&&E===1&&de(p,Et)||M===1&&E===1&&de(p,Ft)&&s>100||M===1&&E>1&&de(p,sr)?Q=i[M]+(E>0?c[E-1]:"")+Q:M===1&&E>0&&(Q=c[E-1]+Q),C=Math.floor(C/10)}return(s<0?l:"")+Q},lu="十百千萬",cu="拾佰仟萬",uu="マイナス",is="마이너스",ar=function(s,i,c){var l=c?". ":"",f=c?"、":"",p=c?", ":"",C=c?" ":"";switch(i){case 0:return"•"+C;case 1:return"◦"+C;case 2:return"◾"+C;case 5:var Q=oe(s,48,57,!0,l);return Q.length<4?"0"+Q:Q;case 4:return Kt(s,"〇一二三四五六七八九",f);case 6:return mn(s,1,3999,iu,3,l).toLowerCase();case 7:return mn(s,1,3999,iu,3,l);case 8:return oe(s,945,969,!1,l);case 9:return oe(s,97,122,!1,l);case 10:return oe(s,65,90,!1,l);case 11:return oe(s,1632,1641,!0,l);case 12:case 49:return mn(s,1,9999,su,3,l);case 35:return mn(s,1,9999,su,3,l).toLowerCase();case 13:return oe(s,2534,2543,!0,l);case 14:case 30:return oe(s,6112,6121,!0,l);case 15:return Kt(s,"子丑寅卯辰巳午未申酉戌亥",f);case 16:return Kt(s,"甲乙丙丁戊己庚辛壬癸",f);case 17:case 48:return lt(s,"零一二三四五六七八九",lu,"負",f,Et|Ft|sr);case 47:return lt(s,"零壹貳參肆伍陸柒捌玖",cu,"負",f,wn|Et|Ft|sr);case 42:return lt(s,"零一二三四五六七八九",lu,"负",f,Et|Ft|sr);case 41:return lt(s,"零壹贰叁肆伍陆柒捌玖",cu,"负",f,wn|Et|Ft|sr);case 26:return lt(s,"〇一二三四五六七八九","十百千万",uu,f,0);case 25:return lt(s,"零壱弐参四伍六七八九","拾百千万",uu,f,wn|Et|Ft);case 31:return lt(s,"영일이삼사오육칠팔구","십백천만",is,p,wn|Et|Ft);case 33:return lt(s,"零一二三四五六七八九","十百千萬",is,p,0);case 32:return lt(s,"零壹貳參四五六七八九","拾百千",is,p,wn|Et|Ft);case 18:return oe(s,2406,2415,!0,l);case 20:return mn(s,1,19999,BQ,3,l);case 21:return oe(s,2790,2799,!0,l);case 22:return oe(s,2662,2671,!0,l);case 22:return mn(s,1,10999,hQ,3,l);case 23:return Kt(s,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Kt(s,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return oe(s,3302,3311,!0,l);case 28:return Kt(s,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",f);case 29:return Kt(s,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",f);case 34:return oe(s,3792,3801,!0,l);case 37:return oe(s,6160,6169,!0,l);case 38:return oe(s,4160,4169,!0,l);case 39:return oe(s,2918,2927,!0,l);case 40:return oe(s,1776,1785,!0,l);case 43:return oe(s,3046,3055,!0,l);case 44:return oe(s,3174,3183,!0,l);case 45:return oe(s,3664,3673,!0,l);case 46:return oe(s,3872,3881,!0,l);default:return oe(s,48,57,!0,l)}},du="data-html2canvas-ignore",fu=(function(){function s(i,c,l){if(this.context=i,this.options=l,this.scrolledElements=[],this.referenceElement=c,this.counters=new gQ,this.quoteDepth=0,!c.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(c.ownerDocument.documentElement,!1)}return s.prototype.toIFrame=function(i,c){var l=this,f=pQ(i,c);if(!f.contentWindow)return Promise.reject("Unable to find iframe window");var p=i.defaultView.pageXOffset,C=i.defaultView.pageYOffset,Q=f.contentWindow,E=Q.document,M=CQ(f).then(function(){return a(l,void 0,void 0,function(){var V,z;return u(this,function(q){switch(q.label){case 0:return this.scrolledElements.forEach(EQ),Q&&(Q.scrollTo(c.left,c.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Q.scrollY!==c.top||Q.scrollX!==c.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Q.scrollX-c.left,Q.scrollY-c.top,0,0))),V=this.options.onclone,z=this.clonedReferenceElement,typeof z>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:E.fonts&&E.fonts.ready?[4,E.fonts.ready]:[3,2];case 1:q.sent(),q.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,wQ(E)]:[3,4];case 3:q.sent(),q.label=4;case 4:return typeof V=="function"?[2,Promise.resolve().then(function(){return V(E,z)}).then(function(){return f})]:[2,f]}})})});return E.open(),E.write(yQ(document.doctype)+"<html></html>"),QQ(this.referenceElement.ownerDocument,p,C),E.replaceChild(E.adoptNode(this.documentElement),E.documentElement),E.close(),M},s.prototype.createElementClone=function(i){if(Pi(i,2))debugger;if(Au(i))return this.createCanvasClone(i);if(eu(i))return this.createVideoClone(i);if(nu(i))return this.createStyleClone(i);var c=i.cloneNode(!1);return os(c)&&(os(i)&&i.currentSrc&&i.currentSrc!==i.src&&(c.src=i.currentSrc,c.srcset=""),c.loading==="lazy"&&(c.loading="eager")),ou(c)?this.createCustomElementClone(c):c},s.prototype.createCustomElementClone=function(i){var c=document.createElement("html2canvascustomelement");return ss(i.style,c),c},s.prototype.createStyleClone=function(i){try{var c=i.sheet;if(c&&c.cssRules){var l=[].slice.call(c.cssRules,0).reduce(function(p,C){return C&&typeof C.cssText=="string"?p+C.cssText:p},""),f=i.cloneNode(!1);return f.textContent=l,f}}catch(p){if(this.context.logger.error("Unable to access cssRules property",p),p.name!=="SecurityError")throw p}return i.cloneNode(!1)},s.prototype.createCanvasClone=function(i){var c;if(this.options.inlineImages&&i.ownerDocument){var l=i.ownerDocument.createElement("img");try{return l.src=i.toDataURL(),l}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",i)}}var f=i.cloneNode(!1);try{f.width=i.width,f.height=i.height;var p=i.getContext("2d"),C=f.getContext("2d");if(C)if(!this.options.allowTaint&&p)C.putImageData(p.getImageData(0,0,i.width,i.height),0,0);else{var Q=(c=i.getContext("webgl2"))!==null&&c!==void 0?c:i.getContext("webgl");if(Q){var E=Q.getContextAttributes();E?.preserveDrawingBuffer===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",i)}C.drawImage(i,0,0)}return f}catch{this.context.logger.info("Unable to clone canvas as it is tainted",i)}return f},s.prototype.createVideoClone=function(i){var c=i.ownerDocument.createElement("canvas");c.width=i.offsetWidth,c.height=i.offsetHeight;var l=c.getContext("2d");try{return l&&(l.drawImage(i,0,0,c.width,c.height),this.options.allowTaint||l.getImageData(0,0,c.width,c.height)),c}catch{this.context.logger.info("Unable to clone video as it is tainted",i)}var f=i.ownerDocument.createElement("canvas");return f.width=i.offsetWidth,f.height=i.offsetHeight,f},s.prototype.appendChildNode=function(i,c,l){(!pn(c)||!fQ(c)&&!c.hasAttribute(du)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(c)))&&(!this.options.copyStyles||!pn(c)||!nu(c))&&i.appendChild(this.cloneNode(c,l))},s.prototype.cloneChildNodes=function(i,c,l){for(var f=this,p=i.shadowRoot?i.shadowRoot.firstChild:i.firstChild;p;p=p.nextSibling)if(pn(p)&&ru(p)&&typeof p.assignedNodes=="function"){var C=p.assignedNodes();C.length&&C.forEach(function(Q){return f.appendChildNode(c,Q,l)})}else this.appendChildNode(c,p,l)},s.prototype.cloneNode=function(i,c){if(jc(i))return document.createTextNode(i.data);if(!i.ownerDocument)return i.cloneNode(!1);var l=i.ownerDocument.defaultView;if(l&&pn(i)&&(ns(i)||bo(i))){var f=this.createElementClone(i);f.style.transitionProperty="none";var p=l.getComputedStyle(i),C=l.getComputedStyle(i,":before"),Q=l.getComputedStyle(i,":after");this.referenceElement===i&&ns(f)&&(this.clonedReferenceElement=f),rs(f)&&bQ(f);var E=this.counters.parse(new bc(this.context,p)),M=this.resolvePseudoContent(i,f,C,lr.BEFORE);ou(i)&&(c=!0),eu(i)||this.cloneChildNodes(i,f,c),M&&f.insertBefore(M,f.firstChild);var V=this.resolvePseudoContent(i,f,Q,lr.AFTER);return V&&f.appendChild(V),this.counters.pop(E),(p&&(this.options.copyStyles||bo(i))&&!tu(i)||c)&&ss(p,f),(i.scrollTop!==0||i.scrollLeft!==0)&&this.scrolledElements.push([f,i.scrollLeft,i.scrollTop]),(Ho(i)||Io(i))&&(Ho(f)||Io(f))&&(f.value=i.value),f}return i.cloneNode(!1)},s.prototype.resolvePseudoContent=function(i,c,l,f){var p=this;if(l){var C=l.content,Q=c.ownerDocument;if(!(!Q||!C||C==="none"||C==="-moz-alt-content"||l.display==="none")){this.counters.parse(new bc(this.context,l));var E=new hy(this.context,l),M=Q.createElement("html2canvaspseudoelement");ss(l,M),E.content.forEach(function(z){if(z.type===0)M.appendChild(Q.createTextNode(z.value));else if(z.type===22){var q=Q.createElement("img");q.src=z.value,q.style.opacity="1",M.appendChild(q)}else if(z.type===18){if(z.name==="attr"){var CA=z.values.filter(YA);CA.length&&M.appendChild(Q.createTextNode(i.getAttribute(CA[0].value)||""))}else if(z.name==="counter"){var hA=z.values.filter(hn),mA=hA[0],RA=hA[1];if(mA&&YA(mA)){var xA=p.counters.getCounterValue(mA.value),SA=RA&&YA(RA)?Vi.parse(p.context,RA.value):3;M.appendChild(Q.createTextNode(ar(xA,SA,!1)))}}else if(z.name==="counters"){var Ae=z.values.filter(hn),mA=Ae[0],GA=Ae[1],RA=Ae[2];if(mA&&YA(mA)){var TA=p.counters.getCounterValues(mA.value),EA=RA&&YA(RA)?Vi.parse(p.context,RA.value):3,VA=GA&&GA.type===0?GA.value:"",PA=TA.map(function(ye){return ar(ye,EA,!1)}).join(VA);M.appendChild(Q.createTextNode(PA))}}}else if(z.type===20)switch(z.value){case"open-quote":M.appendChild(Q.createTextNode(Uc(E.quotes,p.quoteDepth++,!0)));break;case"close-quote":M.appendChild(Q.createTextNode(Uc(E.quotes,--p.quoteDepth,!1)));break;default:M.appendChild(Q.createTextNode(z.value))}}),M.className=as+" "+ls;var V=f===lr.BEFORE?" "+as:" "+ls;return bo(c)?c.className.baseValue+=V:c.className+=V,M}}},s.destroy=function(i){return i.parentNode?(i.parentNode.removeChild(i),!0):!1},s})(),lr;(function(s){s[s.BEFORE=0]="BEFORE",s[s.AFTER=1]="AFTER"})(lr||(lr={}));var pQ=function(s,i){var c=s.createElement("iframe");return c.className="html2canvas-container",c.style.visibility="hidden",c.style.position="fixed",c.style.left="-10000px",c.style.top="0px",c.style.border="0",c.width=i.width.toString(),c.height=i.height.toString(),c.scrolling="no",c.setAttribute(du,"true"),s.body.appendChild(c),c},mQ=function(s){return new Promise(function(i){if(s.complete){i();return}if(!s.src){i();return}s.onload=i,s.onerror=i})},wQ=function(s){return Promise.all([].slice.call(s.images,0).map(mQ))},CQ=function(s){return new Promise(function(i,c){var l=s.contentWindow;if(!l)return c("No window assigned for iframe");var f=l.document;l.onload=s.onload=function(){l.onload=s.onload=null;var p=setInterval(function(){f.body.childNodes.length>0&&f.readyState==="complete"&&(clearInterval(p),i(s))},50)}})},vQ=["all","d","content"],ss=function(s,i){for(var c=s.length-1;c>=0;c--){var l=s.item(c);vQ.indexOf(l)===-1&&i.style.setProperty(l,s.getPropertyValue(l))}return i},yQ=function(s){var i="";return s&&(i+="<!DOCTYPE ",s.name&&(i+=s.name),s.internalSubset&&(i+=s.internalSubset),s.publicId&&(i+='"'+s.publicId+'"'),s.systemId&&(i+='"'+s.systemId+'"'),i+=">"),i},QQ=function(s,i,c){s&&s.defaultView&&(i!==s.defaultView.pageXOffset||c!==s.defaultView.pageYOffset)&&s.defaultView.scrollTo(i,c)},EQ=function(s){var i=s[0],c=s[1],l=s[2];i.scrollLeft=c,i.scrollTop=l},FQ=":before",UQ=":after",as="___html2canvas___pseudoelement_before",ls="___html2canvas___pseudoelement_after",gu=`{
|