@pie-element/hotspot 11.1.2-next.13 → 11.1.2-next.15
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/index.iife.js
CHANGED
|
@@ -145,7 +145,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
145
145
|
animation: ${jd} 1.4s linear infinite;
|
|
146
146
|
`,Pd=typeof Md==`string`?null:sn`
|
|
147
147
|
animation: ${Md} 1.4s ease-in-out infinite;
|
|
148
|
-
`,Fd=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return Oa({root:[`root`,n,`color${ul(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${ul(n)}`,i&&`circleDisableShrink`]},kd,t)},Id=U(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ul(n.color)}`]]}})(Nc(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:Nd||{animation:`${jd} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Od()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Ld=U(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Rd=U(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${ul(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Nc(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:Pd||{animation:`${Md} 1.4s ease-in-out infinite`}}]}))),zd=U(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Nc(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),Bd=k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:d=`indeterminate`,...f}=n,p={...n,color:i,disableShrink:a,size:s,thickness:l,value:u,variant:d,enableTrackSlot:o},m=Fd(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((Ad-l)/2);h.strokeDasharray=e.toFixed(3),_[`aria-valuenow`]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform=`rotate(-90deg)`}return(0,A.jsx)(Id,{className:I(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,A.jsxs)(Ld,{className:m.svg,ownerState:p,viewBox:`${Ad/2} ${Ad/2} ${Ad} ${Ad}`,children:[o?(0,A.jsx)(zd,{className:m.track,ownerState:p,cx:Ad,cy:Ad,r:(Ad-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,A.jsx)(Rd,{className:m.circle,style:h,ownerState:p,cx:Ad,cy:Ad,r:(Ad-l)/2,fill:`none`,strokeWidth:l})]})})});function Vd(e){return si(`MuiButton`,e)}var Hd=ci(`MuiButton`,`root.text.textInherit.textPrimary.textSecondary.textSuccess.textError.textInfo.textWarning.outlined.outlinedInherit.outlinedPrimary.outlinedSecondary.outlinedSuccess.outlinedError.outlinedInfo.outlinedWarning.contained.containedInherit.containedPrimary.containedSecondary.containedSuccess.containedError.containedInfo.containedWarning.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.textSizeSmall.textSizeMedium.textSizeLarge.outlinedSizeSmall.outlinedSizeMedium.outlinedSizeLarge.containedSizeSmall.containedSizeMedium.containedSizeLarge.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.iconSizeSmall.iconSizeMedium.iconSizeLarge.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),Ud=k.createContext({}),Wd=k.createContext(void 0),Gd=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=Oa({root:[`root`,o&&`loading`,a,`${a}${ul(t)}`,`size${ul(i)}`,`${a}Size${ul(i)}`,`color${ul(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${ul(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${ul(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${ul(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Vd,c);return{...c,...l}},Kd=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],qd=U(wd,{shouldForwardProp:e=>zo(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ul(n.color)}`],t[`size${ul(n.size)}`],t[`${n.variant}Size${ul(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Nc(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${Hd.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Hd.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Hd.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${Hd.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Od()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${Hd.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${Hd.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${Hd.loading}`]:{color:`transparent`}}}]}})),Jd=U(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ul(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...Kd]})),Yd=U(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ul(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Kd]})),Xd=U(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),Zd=U(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),Qd=k.forwardRef(function(e,t){let n=k.useContext(Ud),r=k.useContext(Wd),i=cs({props:xi(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=vl(h),T=_??(0,A.jsx)(Bd,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=Gd(E),O=(b||g&&v===`start`)&&(0,A.jsx)(Jd,{className:D.startIcon,ownerState:E,children:b||(0,A.jsx)(Zd,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,A.jsx)(Yd,{className:D.endIcon,ownerState:E,children:f||(0,A.jsx)(Zd,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,j=typeof g==`boolean`?(0,A.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,A.jsx)(Xd,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:M,...ne}=D;return(0,A.jsxs)(qd,{ownerState:E,className:I(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:I(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:ne,children:[O,v!==`end`&&j,a,v===`end`&&j,ee]})}),$d=hl((0,A.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`Restore`),ef=hl((0,A.jsx)(`path`,{d:`M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`}),`Undo`),tf=U(`div`)({display:`flex`,flexDirection:`column`}),nf=U(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),rf=U(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),af=U(Qd)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),of=e=>{class t extends k.Component{static propTypes={session:O.object,onSessionChange:O.func};constructor(e){super(e),this.state={sessionInitialValues:JSON.parse(JSON.stringify(e.session)),session:e.session,changes:[]}}onSessionChange=e=>{this.setState(t=>({session:e,changes:[...t.changes,e]}),()=>this.props.onSessionChange(e))};onUndo=()=>{this.setState(e=>{let t=[...e.changes];return t.pop(),{changes:t,session:t.length?t[t.length-1]:e.sessionInitialValues}},()=>this.props.onSessionChange(this.state.session))};onReset=()=>{this.setState(e=>({session:e.sessionInitialValues,changes:[]}),()=>this.props.onSessionChange(this.state.sessionInitialValues))};render(){let{...t}=this.props,{changes:n,session:r}=this.state;return(0,A.jsxs)(tf,{children:[(0,A.jsxs)(nf,{children:[(0,A.jsxs)(af,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,A.jsx)(rf,{children:(0,A.jsx)(ef,{})}),`Undo`]}),(0,A.jsxs)(af,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,A.jsx)(rf,{children:(0,A.jsx)($d,{})}),`Start Over`]})]}),(0,A.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},sf=Fo({typography:{fontFamily:`inherit`},palette:{action:{disabled:`rgba(0, 0, 0, 0.54);`}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:`inherit`}}},MuiButton:{styleOverrides:{contained:{backgroundColor:`#e0e0e0`,color:`#000000`,"&:hover":{backgroundColor:`#bdbdbd`}}}}}}),cf=U(`div`)({"& table, th, td":{fontSize:`inherit`}}),lf=class extends k.Component{static propTypes={className:O.string,children:O.array,extraCSSRules:O.shape({names:O.arrayOf(O.string),rules:O.string}),fontSizeFactor:O.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}computeStyle(e){let t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),i=Math.max(n,r),a=e!=null&&typeof e==`number`?e:1;return a===1?null:{fontSize:`${i*a}px`}}render(){let{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...a}=r,o=this.computeStyle(n);return(0,A.jsx)(Cn,{injectFirst:!0,children:(0,A.jsxs)(Ko,{theme:sf,children:[i?.rules?(0,A.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,(0,A.jsx)(cf,{className:`${t} extraCSSRules`,...a,...o&&{style:o},children:e})]})})}},uf=U(lf)({display:`flex`,flexDirection:`column`,position:`relative`}),df=class extends k.Component{static propTypes={ariaLabel:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired,role:O.string,extraCSSRules:O.shape({names:O.arrayOf(O.string),rules:O.string}),fontSizeFactor:O.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,A.jsx)(uf,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},ff=class extends k.Component{static propTypes={tag:O.string,className:O.string,html:O.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,A.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}};function pf({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var mf=k.createContext(void 0);function hf(){return k.useContext(mf)}function gf(e){return si(`MuiFormLabel`,e)}var _f=ci(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),vf=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return Oa({root:[`root`,`color${ul(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},gf,t)},yf=U(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Nc(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Od()).map(([t])=>({props:{color:t},style:{[`&.${_f.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${_f.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${_f.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),bf=U(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Nc(({theme:e})=>({[`&.${_f.error}`]:{color:(e.vars||e).palette.error.main}}))),xf=k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,p=pf({props:n,muiFormControl:hf(),states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=vf(m);return(0,A.jsxs)(yf,{as:o,ownerState:m,className:I(h.root,i),ref:t,...f,children:[r,p.required&&(0,A.jsxs)(bf,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function Sf(e){return si(`MuiInputLabel`,e)}ci(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var Cf=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=Oa({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${ul(r)}`,o],asterisk:[s&&`asterisk`]},Sf,t);return{...t,...c}},wf=U(xf,{shouldForwardProp:e=>zo(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${_f.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Nc(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create([`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),Tf=k.forwardRef(function(e,t){let n=cs({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=hf(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=pf({props:n,muiFormControl:l,states:[`size`,`variant`,`required`,`focused`]}),f={...n,disableAnimation:r,formControl:l,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=Cf(f);return(0,A.jsx)(wf,{"data-shrink":u,ref:t,className:I(p.root,s),...c,ownerState:f,classes:p})});function Ef(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Df(e,t=!1){return e&&(Ef(e.value)&&e.value!==``||t&&Ef(e.defaultValue)&&e.defaultValue!==``)}function Of(e){return e.startAdornment}function kf(e){return si(`MuiFormControl`,e)}ci(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var Af=e=>{let{classes:t,margin:n,fullWidth:r}=e;return Oa({root:[`root`,n!==`none`&&`margin${ul(n)}`,r&&`fullWidth`]},kf,t)},jf=U(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${ul(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),Mf=U(k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=Af(_),[y,b]=k.useState(()=>{let e=!1;return r&&k.Children.forEach(r,t=>{if(!gl(t,[`Input`,`Select`]))return;let n=gl(t,[`Select`])?t.props.input:t;n&&Of(n.props)&&(e=!0)}),e}),[x,S]=k.useState(()=>{let e=!1;return r&&k.Children.forEach(r,t=>{gl(t,[`Input`,`Select`])&&(Df(t.props,!0)||Df(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=k.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;k.useRef(!1);let E=k.useCallback(()=>{S(!0)},[]),D=k.useCallback(()=>{S(!1)},[]),O=k.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:D,onFilled:E,registerEffect:void 0,required:p,variant:h}),[y,a,s,c,x,T,u,d,void 0,D,E,p,m,h]);return(0,A.jsx)(mf.Provider,{value:O,children:(0,A.jsx)(jf,{as:o,ownerState:_,className:I(v.root,i),ref:t,...g,children:r})})}))(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),Nf=U(Tf)(()=>({fontSize:`inherit`,whiteSpace:`nowrap`,margin:0,padding:0,alignSelf:`flex-start`,position:`absolute`,top:0,left:0,transformOrigin:`top left`,pointerEvents:`none`,"&.MuiInputLabel-shrink":{transform:`scale(0.75) translate(0, -0.75em)`},"&:not(.MuiInputLabel-shrink)":{transform:`translate(0, 0)`}})),Pf=({label:e,className:t,children:n})=>(0,A.jsxs)(Mf,{className:t,children:[(0,A.jsx)(Nf,{shrink:!0,children:e}),n]});Pf.propTypes={label:O.oneOfType([O.string,O.object]).isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};var Ff=U(`div`)(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:`collapse`},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:`solid`,borderColor:pu()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:hu()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:hu()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:Pl()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Pl()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),If=/\\embed\{newLine\}\[\]/g,Lf=`\\newline `,Rf=`preview-prompt`,zf=class extends k.Component{static propTypes={prompt:O.string,tagName:O.string,className:O.string,onClick:O.func,defaultClassName:O.string,autoplayAudioEnabled:O.bool,customAudioButton:O.shape({playImage:O.string,pauseImage:O.string})};static defaultProps={onClick:()=>{}};promptRef=k.createRef();parsedText=e=>{let{autoplayAudioEnabled:t,customAudioButton:n}=this.props,r=document.createElement(`div`);r.innerHTML=e;let i=r.querySelector(`audio`);if(i){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,i.getAttribute(`src`)),i.removeAttribute(`src`),i.setAttribute(`id`,`pie-prompt-audio-player`),i.appendChild(e),n){i.style.display=`none`;let e=document.createElement(`div`);e.id=`play-audio-button`,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,backgroundImage:`url(${t?n.pauseImage:n.playImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),i.parentNode.insertBefore(e,i)}}return r.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById(`play-audio-button`),r=document.getElementById(`pie-prompt-audio-player`);if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener(`ended`,a)}).catch(e=>{n&&t&&(n.style.backgroundImage=`url(${t.playImage})`),console.error(`Error playing audio`,e)}),!n||!r||!t)return;let i=()=>{r.paused&&r.play()},a=()=>{n.style.backgroundImage=`url(${t.playImage})`},o=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};n.addEventListener(`click`,i),r.addEventListener(`play`,o),r.addEventListener(`pause`,s),r.addEventListener(`ended`,a),this._handlePlayClick=i,this._handleAudioPlay=o,this._handleAudioPause=s,this._handleAudioEnded=a}removeCustomAudioButtonListeners(){let e=document.getElementById(`play-audio-button`),t=document.querySelector(`audio`);!e||!t||(e.removeEventListener(`click`,this._handlePlayClick),t.removeEventListener(`play`,this._handleAudioPlay),t.removeEventListener(`pause`,this._handleAudioPause),t.removeEventListener(`ended`,this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){let e=this.promptRef.current;e&&typeof E==`function`&&E(e)}alignImages(){let e=this.promptRef.current;if(!e)return;let t=e.getElementsByTagName(`img`);if(t&&t.length){for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){let t=e.attributes.alignment.value,n=t===`center`?`center`:t===`right`?`flex-end`:`flex-start`,r=e.parentElement;if(r.tagName===`DIV`&&r.style.display===`flex`&&r.style.width===`100%`)r.style.justifyContent=n;else{let t=document.createElement(`div`);t.style.display=`flex`,t.style.width=`100%`,t.style.justifyContent=n;let i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}}render(){let{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,a=`${n||``} ${i||``} ${t===`legend`?`legend`:``} ${Rf}`.trim();return(0,A.jsx)(Ff,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(If,Lf)}})}},Bf=e=>(0,A.jsx)(A.Fragment,{children:k.Children.map(e.children,t=>k.cloneElement(t,{"data-pie-readable":e.false===void 0}))});Bf.propTypes={children:O.node,false:O.bool};var Vf=e=>(0,A.jsx)(A.Fragment,{children:k.Children.map(e.children,t=>k.cloneElement(t,{"data-pie-purpose":e.purpose}))});Vf.propTypes={children:O.node,purpose:O.string};var Hf;typeof window<`u`&&(Hf=new DOMParser);var Uf=e=>Hf.parseFromString(e,`text/html`).body.textContent,Wf=e=>{if(!e)return!1;let t=Uf(e);return!!(t&&t.trim())},Gf;typeof window<`u`&&(Gf=new DOMParser);var Kf=e=>{if(!e)return!1;let t=Gf.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},qf=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZXhJOUldJk/8QAGwEBAQADAQEBAAAAAAAAAAAAAAcEBQYCAQP/xABBEQEAAQIDAgkJBgUFAQEBAAAAAQIDBAYRBSESMUFE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AAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function Jf(e=``,t=2){if(!e)return e;let n=new DOMParser().parseFromString(e,`text/html`);return n.body.querySelectorAll(`[data-heading]`).forEach(e=>{let r=e.getAttribute(`data-heading`)||``,i=parseInt(r.replace(`heading`,``),10);if(!Number.isFinite(i))return;let a=Math.min(6,Math.max(1,t+i-1)),o=n.createElement(`h${a}`);o.setAttribute(`data-heading`,r),Array.from(e.attributes).forEach(e=>{e.name!==`data-heading`&&o.setAttribute(e.name,e.value)}),o.innerHTML=e.innerHTML,e.replaceWith(o)}),n.body.innerHTML}function Yf(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:Fc(n,r),{props:s,internalRef:c}=Rc({...a,externalSlotProps:o}),l=nc(c,o?.ref,e.additionalProps?.ref);return Pc(t,{...s,ref:l},r)}var Xf=k.createContext({});function Zf(e){return si(`MuiList`,e)}ci(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var Qf=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Oa({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},Zf,t)},$f=U(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),ep=k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=k.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=Qf(d);return(0,A.jsx)(Xf.Provider,{value:u,children:(0,A.jsxs)($f,{as:a,className:I(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),tp=cc;function np(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function rp(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ip(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function ap(e,t,n,r,i,a){let o=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}let t=r?!1:s.disabled||s.getAttribute(`aria-disabled`)===`true`;if(!s.hasAttribute(`tabindex`)||!ip(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var op=k.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=k.useRef(null),p=k.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});_l(()=>{r&&f.current.focus()},[r]),k.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${tp(ms(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);let m=e=>{let t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){l&&l(e);return}let r=bc(fs(t));if(n===`ArrowDown`)e.preventDefault(),ap(t,r,c,s,np);else if(n===`ArrowUp`)e.preventDefault(),ap(t,r,c,s,rp);else if(n===`Home`)e.preventDefault(),ap(t,null,c,s,np);else if(n===`End`)e.preventDefault(),ap(t,null,c,s,rp);else if(n.length===1){let i=p.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);let c=r&&!i.repeating&&ip(r,i);i.previousKeyMatched&&(c||ap(t,r,!1,s,np,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=rc(f,t),g=-1;k.Children.forEach(a,(e,t)=>{if(!k.isValidElement(e)){g===t&&(g+=1,g>=a.length&&(g=-1));return}e.props.disabled||(u===`selectedMenu`&&e.props.selected||g===-1)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});let _=k.Children.map(a,(e,t)=>{if(t===g){let t={};return i&&(t.autoFocus=!0),e.props.tabIndex===void 0&&u===`selectedMenu`&&(t.tabIndex=0),k.cloneElement(e,t)}return e});return(0,A.jsx)(ep,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function sp(e){return si(`MuiMenu`,e)}ci(`MuiMenu`,[`root`,`paper`,`list`]);var cp={vertical:`top`,horizontal:`right`},lp={vertical:`top`,horizontal:`left`},up=e=>{let{classes:t}=e;return Oa({root:[`root`],paper:[`paper`],list:[`list`]},sp,t)},dp=U(kl,{shouldForwardProp:e=>zo(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),fp=U(Ol,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),pp=U(op,{name:`MuiMenu`,slot:`List`})({outline:0}),mp=k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,MenuListProps:s={},onClose:c,open:l,PaperProps:u={},PopoverClasses:d,transitionDuration:f=`auto`,TransitionProps:{onEntering:p,...m}={},variant:h=`selectedMenu`,slots:g={},slotProps:_={},...v}=n,y=qi(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=up(b),S=r&&!o&&l,C=k.useRef(null),w=(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:y?`rtl`:`ltr`}),p&&p(e,t)},T=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},E=-1;k.Children.map(i,(e,t)=>{k.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||E===-1)&&(E=t))});let D={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},O=Yf({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[ee,te]=zc(`paper`,{className:x.paper,elementType:fp,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[j,M]=zc(`list`,{className:I(x.list,s.className),elementType:pp,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),ne=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,A.jsx)(dp,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?cp:lp,slots:{root:g.root,paper:ee,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:te,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...ne,onEntering:(...e)=>{w(...e),ne?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,A.jsx)(j,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...M,children:i})})}),hp=({slotProps:e,...t})=>(0,A.jsx)(mp,{...t,disableScrollLock:!0,hideBackdrop:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,pointerEvents:`none`,...e?.root?.style}},paper:{...e?.paper,style:{pointerEvents:`auto`,...e?.paper?.style}}}}),gp=s({Collapsible:()=>od,EnableAudioAutoplayImage:()=>qf,Feedback:()=>Bu,HtmlAndMath:()=>ff,InlineMenu:()=>hp,InputContainer:()=>Pf,PreviewLayout:()=>df,PreviewPrompt:()=>zf,Purpose:()=>Vf,Readable:()=>Bf,UiLayout:()=>lf,color:()=>Ml,hasMedia:()=>Kf,hasText:()=>Wf,indicators:()=>Hu,transformDataHeadings:()=>Jf,withUndoReset:()=>of}),_p=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},vp=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}},yp=`height ease-in 300ms, opacity ease-in 300ms`,bp=U(`div`)(()=>({position:`relative`,height:0,overflow:`hidden`,display:`flex`,visibility:`hidden`,width:0,"&.enter":{transition:yp,opacity:1,height:`auto`,width:`auto`,visibility:`visible`,minHeight:`25px`},"&.enter-done":{height:`auto`,visibility:`visible`,width:`auto`,minHeight:`25px`},"&.exit":{transition:yp,opacity:0,height:0,visibility:`visible`,width:0},"&.exit-done":{opacity:0,visibility:`hidden`,height:0,width:0}})),xp=e=>{let{show:t,children:n,className:r}=e,i=(0,k.useRef)(null);return(0,A.jsx)(Hs,{nodeRef:i,in:t,appear:!0,mountOnEnter:!1,timeout:300,classNames:{enter:`enter`,enterDone:`enter-done`,exit:`exit`,exitDone:`exit-done`},children:(0,A.jsx)(bp,{ref:i,className:r,children:n})})};xp.propTypes={show:O.bool.isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};var Sp={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},ebsr:{part:`Part {{index}}`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`},imageClozeAssociation:{reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`}},graphing:{point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,redo:`Redo`,reset:`Reset`},mathInline:{primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`,printKey:`(key)`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`}},Cp={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},ebsr:{part:`Parte {{index}}`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`},imageClozeAssociation:{reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`}},graphing:{point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,redo:`Rehacer`,reset:`Reiniciar`},mathInline:{primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`,printKey:`(clave)`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`}},q=e=>typeof e==`string`,wp=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Tp=e=>e==null?``:``+e,Ep=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Dp=/###/g,Op=e=>e&&e.indexOf(`###`)>-1?e.replace(Dp,`.`):e,kp=e=>!e||q(e),Ap=(e,t,n)=>{let r=q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(kp(e))return{};let t=Op(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return kp(e)?{}:{obj:e,k:Op(r[i])}},jp=(e,t,n)=>{let{obj:r,k:i}=Ap(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Ap(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Ap(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Mp=(e,t,n,r)=>{let{obj:i,k:a}=Ap(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Np=(e,t)=>{let{obj:n,k:r}=Ap(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Pp=(e,t,n)=>{let r=Np(e,n);return r===void 0?Np(t,n):r},Fp=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?q(e[r])||e[r]instanceof String||q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Fp(e[r],t[r],n):e[r]=t[r]);return e},Ip=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Lp={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Rp=e=>q(e)?e.replace(/[&<>"'\/]/g,e=>Lp[e]):e,zp=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Bp=[` `,`,`,`?`,`!`,`;`],Vp=new zp(20),Hp=(e,t,n)=>{t||=``,n||=``;let r=Bp.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Vp.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Up=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Wp=e=>e?.replace(/_/g,`-`),Gp={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Kp=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Gp,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(q(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},qp=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},Jp=class extends qp{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):q(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Np(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!q(n)?s:Up(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),jp(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(q(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Np(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Fp(s,n,i):s={...s,...n},jp(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Yp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Xp=Symbol(`i18next/PATH_KEY`);function Zp(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Xp?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Qp(e,t){let{[Xp]:n}=e(Zp()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var $p={},em=e=>!q(e)&&typeof e!=`boolean`&&typeof e!=`number`,tm=class e extends qp{constructor(e,t={}){super(),Ep([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Kp.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=em(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Hp(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:q(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:q(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Qp(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Qp(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!q(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=em(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(q(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:em(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&q(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=q(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!q(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=q(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Yp.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return q(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Qp(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!q(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(q(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!$p[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&($p[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!q(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},nm=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kp.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Wp(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Wp(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(q(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),q(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return q(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):q(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},rm={zero:0,one:1,two:2,few:3,many:4,other:5},im={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},am=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Kp.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Wp(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),im;if(!e.match(/-|_/))return im;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>rm[e]-rm[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},om=(e,t,n,r=`.`,i=!0)=>{let a=Pp(e,t,n);return!a&&i&&q(n)&&(a=Up(e,n,r),a===void 0&&(a=Up(t,n,r))),a},sm=e=>e.replace(/\$/g,`$$$$`),cm=class{constructor(e={}){this.logger=Kp.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Rp:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Ip(i):a||`{{`,this.suffix=o?Ip(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Ip(d):f||Ip(`$t(`),this.nestingSuffix=p?Ip(p):m||Ip(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=om(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(om(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>sm(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?sm(this.escape(e)):sm(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=q(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!q(a)&&!this.useRawValueToEscape&&(a=Tp(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${Ip(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!q(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!q(i))return i;q(i)||(i=Tp(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},lm=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},um=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Wp(r),i),t[o]=s),s(n)}},dm=e=>(t,n,r)=>e(Wp(n),r)(t),fm=class{constructor(e={}){this.logger=Kp.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?um:dm;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=um(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=lm(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},pm=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},mm=class extends qp{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Kp.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Mp(n.loaded,[i],a),pm(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();q(e)&&(e=this.languageUtils.toResolveHierarchy(e)),q(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},hm=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),q(e[1])&&(t.defaultValue=e[1]),q(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),gm=e=>(q(e.ns)&&(e.ns=[e.ns]),q(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),q(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),_m=()=>{},vm=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},ym=`__i18next_supportNoticeShown`,bm=()=>!!(typeof globalThis<`u`&&globalThis[ym]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),xm=()=>{typeof globalThis<`u`&&(globalThis[ym]=!0)},Sm=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),Cm=class e extends qp{constructor(e={},t){if(super(),this.options=gm(e),this.services={},this.logger=Kp,this.modules={external:[]},vm(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(q(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=hm();this.options={...n,...this.options,...gm(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Sm(this)&&!bm()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),xm());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Kp.init(r(this.modules.logger),this.options):Kp.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:fm;let t=new nm(this.options);this.store=new Jp(this.options.resources,this.options);let i=this.services;i.logger=Kp,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new am(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new cm(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new mm(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new tm(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=_m,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=wp(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=_m){let n=t,r=q(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=wp();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=_m,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Yp.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=wp();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=q(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(q(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Qp(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Qp(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Qp(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return q(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=wp();return this.options.ns?(q(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=wp();q(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new nm(hm());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=_m){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Jp(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...hm().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new cm(n)}return a.translator=new tm(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Cm.createInstance,Cm.dir,Cm.init,Cm.loadResources,Cm.reloadResources,Cm.use,Cm.changeLanguage,Cm.getFixedT,Cm.t,Cm.exists,Cm.setDefaultNamespace,Cm.hasLoadedNamespace,Cm.loadNamespaces,Cm.loadLanguages,Cm.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Sp,es:Cp}});var wm={translator:{...Cm,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return Cm.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]};function Tm(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Em(e,t){return!e||Tm(e)?e:Tm(e.default)?e.default:t&&Tm(e[t])?e[t]:t&&Tm(e[t]?.default)?e[t].default:e}var Dm=Em(Bf,`Readable`)||Em(Am.Readable,`Readable`),Om=gp,km=Om.default,Am=km&&typeof km==`object`?km:Om,{translator:jm}=wm,Mm={WebkitTouchCallout:`none`,WebkitUserSelect:`none`,KhtmlUserSelect:`none`,MozUserSelect:`none`,msUserSelect:`none`,userSelect:`none`},Nm=U(`div`)(()=>({width:`100%`,cursor:`pointer`})),Pm=U(`div`)(()=>({margin:`0 auto`,textAlign:`center`,display:`flex`})),Fm=U(`div`)(()=>({width:`fit-content`,minWidth:`140px`,alignSelf:`center`,verticalAlign:`middle`,color:`var(--correct-answer-toggle-label-color, ${Pl()})`,fontWeight:`normal`,...Mm})),Im=U(`div`)(()=>({position:`absolute`,width:`25px`,"&.enter":{opacity:`0`},"&.enter-active":{opacity:`1`,transition:`opacity 0.3s ease-in`},"&.exit":{opacity:`1`},"&.exit-active":{opacity:`0`,transition:`opacity 0.3s ease-in`}})),Lm=U(`div`)(()=>({width:`25px`,marginRight:`5px`,display:`flex`,alignItems:`center`})),Rm=class e extends k.Component{static propTypes={onToggle:O.func,toggled:O.bool,show:O.bool,hideMessage:O.string,showMessage:O.string,className:O.string,language:O.string};static defaultProps={showMessage:`Show correct answer`,hideMessage:`Hide correct answer`,show:!1,toggled:!1};constructor(t){super(t),this.state={show:t.show},this.openIconRef=k.createRef(),this.closedIconRef=k.createRef(),e.defaultProps={...e.defaultProps,showMessage:jm.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:jm.t(`common:hideCorrectAnswer`,{lng:t.language})}}onClick(){this.props.onToggle(!this.props.toggled)}onTouch(e){e.preventDefault(),this.props.onToggle(!this.props.toggled)}UNSAFE_componentWillReceiveProps(t){this.setState({show:t.show}),t.language!==this.props?.language&&(e.defaultProps={...e.defaultProps,showMessage:jm.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:jm.t(`common:hideCorrectAnswer`,{lng:t.language})})}render(){let{className:e,toggled:t,hideMessage:n,showMessage:r}=this.props;return(0,A.jsx)(Nm,{className:e,children:(0,A.jsx)(xp,{show:this.state.show,children:(0,A.jsxs)(Pm,{onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this),children:[(0,A.jsxs)(Lm,{children:[(0,A.jsx)(Hs,{nodeRef:this.openIconRef,timeout:400,in:t,exit:!t,classNames:{enter:`enter`,enterActive:`enter-active`,exit:`exit`,exitActive:`exit-active`},children:(0,A.jsx)(Im,{ref:this.openIconRef,children:(0,A.jsx)(Xo,{open:t},`correct-open`)})}),(0,A.jsx)(Hs,{nodeRef:this.closedIconRef,timeout:5e3,in:!t,exit:t,classNames:{enter:`enter`,enterActive:`enter-active`,exit:`exit`,exitActive:`exit-active`},children:(0,A.jsx)(Im,{ref:this.closedIconRef,children:(0,A.jsx)(Xo,{open:t},`correct-closed`)})})]}),(0,A.jsx)(Dm,{false:!0,children:(0,A.jsx)(Fm,{"aria-hidden":!this.state.show,children:t?n:r})})]})})})}},zm=Math.PI/180;function Bm(){return typeof window<`u`&&({}.toString.call(window)===`[object Window]`||{}.toString.call(window)===`[object global]`)}var Vm=typeof global<`u`?global:typeof window<`u`?window:typeof WorkerGlobalScope<`u`?self:{},J={_global:Vm,version:`8.3.0`,isBrowser:Bm(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return J.angleDeg?e*zm:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<`u`&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return J.DD.isDragging},isDragReady(){return!!J.DD.node},document:Vm.document,_injectGlobal(e){Vm.Konva=e}},Hm=e=>{J[e.prototype.getClassName()]=e};J._injectGlobal(J);var Um=class e{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new e(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,i=this.m[1]*t+this.m[3]*n,a=this.m[0]*-n+this.m[2]*t,o=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,i=this.m[2]+this.m[0]*e,a=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],i=this.m[1]*e.m[2]+this.m[3]*e.m[3],a=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,i=this.m[0]*e,a=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}getMatrix(){return this.m}setAbsolutePosition(e,t){var n=this.m[0],r=this.m[1],i=this.m[2],a=this.m[3],o=this.m[4],s=(n*(t-this.m[5])-r*(e-o))/(n*a-r*i),c=(e-o-i*s)/n;return this.translate(c,s)}decompose(){var e=this.m[0],t=this.m[1],n=this.m[2],r=this.m[3],i=this.m[4],a=this.m[5],o=e*r-t*n;let s={x:i,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||t!=0){var c=Math.sqrt(e*e+t*t);s.rotation=t>0?Math.acos(e/c):-Math.acos(e/c),s.scaleX=c,s.scaleY=o/c,s.skewX=(e*n+t*r)/o,s.skewY=0}else if(n!=0||r!=0){var l=Math.sqrt(n*n+r*r);s.rotation=Math.PI/2-(r>0?Math.acos(-n/l):-Math.acos(n/l)),s.scaleX=o/l,s.scaleY=l,s.skewX=0,s.skewY=(e*n+t*r)/o}return s.rotation=Y._getRotation(s.rotation),s}},Wm=`[object Array]`,Gm=`[object Number]`,Km=`[object String]`,qm=`[object Boolean]`,Jm=Math.PI/180,Ym=180/Math.PI,Xm=`#`,Zm=``,Qm=`0`,$m=`Konva warning: `,eh=`Konva error: `,th=`rgb(`,nh={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},rh=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,ih=[],ah=typeof requestAnimationFrame<`u`&&requestAnimationFrame||function(e){setTimeout(e,60)},Y={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===Wm},_isNumber(e){return Object.prototype.toString.call(e)===Gm&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===Km},_isBoolean(e){return Object.prototype.toString.call(e)===qm},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!=`string`)return!1;var t=e[0];return t===`#`||t===`.`||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){ih.push(e),ih.length===1&&ah(function(){let e=ih;ih=[],e.forEach(function(e){e()})})},createCanvasElement(){var e=document.createElement(`canvas`);try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement(`img`)},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=Y.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Xm,Zm);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=Qm+e;return Xm+e},getRGB(e){var t;return e in nh?(t=nh[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Xm?this._hexToRgb(e.substring(1)):e.substr(0,4)===th?(t=rh.exec(e.replace(/ /g,``)),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e||=`black`,Y._namedColorToRBA(e)||Y._hex3ColorToRGBA(e)||Y._hex6ColorToRGBA(e)||Y._rgbColorToRGBA(e)||Y._rgbaColorToRGBA(e)||Y._hslColorToRGBA(e)},_namedColorToRBA(e){var t=nh[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf(`rgb(`)===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf(`rgba(`)===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]===`#`&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]===`#`&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){let[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,a=Number(n[2])/100,o,s,c;if(i===0)return c=a*255,{r:Math.round(c),g:Math.round(c),b:Math.round(c),a:1};o=a<.5?a*(1+i):a+i-a*i;let l=2*a-o,u=[0,0,0];for(let e=0;e<3;e++)s=r+1/3*-(e-1),s<0&&s++,s>1&&s--,c=6*s<1?l+(o-l)*6*s:2*s<1?o:3*s<2?l+(o-l)*(2/3-s)*6:l,u[e]=c*255;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*Jm},radToDeg(e){return e*Ym},_degToRad(e){return Y.warn(`Util._degToRad is removed. Please use public Util.degToRad instead.`),Y.degToRad(e)},_radToDeg(e){return Y.warn(`Util._radToDeg is removed. Please use public Util.radToDeg instead.`),Y.radToDeg(e)},_getRotation(e){return J.angleDeg?Y.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw Error(eh+e)},error(e){console.error(eh+e)},warn(e){J.showWarnings&&console.warn($m+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,a){var o,s,c,l=(e-n)*(e-n)+(t-r)*(t-r);if(l==0)o=e,s=t,c=(i-n)*(i-n)+(a-r)*(a-r);else{var u=((i-e)*(n-e)+(a-t)*(r-t))/l;u<0?(o=e,s=t,c=(e-i)*(e-i)+(t-a)*(t-a)):u>1?(o=n,s=r,c=(n-i)*(n-i)+(r-a)*(r-a)):(o=e+u*(n-e),s=t+u*(r-t),c=(o-i)*(o-i)+(s-a)*(s-a))}return[o,s,c]},_getProjectionToLine(e,t,n){var r=Y.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(a,o){if(!(!n&&o===t.length-1)){var s=t[(o+1)%t.length],c=Y._getProjectionToSegment(a.x,a.y,s.x,s.y,e.x,e.y),l=c[0],u=c[1],d=c[2];d<i&&(r.x=l,r.y=u,i=d)}}),r},_prepareArrayForTween(e,t,n){var r,i=[],a=[];if(e.length>t.length){var o=t;t=e,e=o}for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)a.push({x:t[r],y:t[r+1]});var s=[];return a.forEach(function(e){var t=Y._getProjectionToLine(e,i,n);s.push(t.x),s.push(t.y)}),s},_prepareToStringify(e){var t;for(var n in e.visitedByCircularReferenceRemoval=!0,e)if(e.hasOwnProperty(n)&&e[n]&&typeof e[n]==`object`){if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||Y._isElement(e[n]))if(t.configurable)delete e[n];else return null;else if(Y._prepareToStringify(e[n])===null)if(t.configurable)delete e[n];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999}};function oh(e){return Y._isString(e)?`"`+e+`"`:Object.prototype.toString.call(e)===`[object Number]`||Y._isBoolean(e)?e:Object.prototype.toString.call(e)}function sh(e){return e>255?255:e<0?0:Math.round(e)}function X(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a number.`),e}}function ch(e){if(J.isUnminified)return function(t,n){let r=Y._isNumber(t),i=Y._isArray(t)&&t.length==e;return!r&&!i&&Y.warn(oh(t)+` is a not valid value for "`+n+`" attribute. The value should be a number or Array<number>(`+e+`)`),t}}function lh(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||e===`auto`||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a number or "auto".`),e}}function uh(){if(J.isUnminified)return function(e,t){return Y._isString(e)||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a string.`),e}}function dh(){if(J.isUnminified)return function(e,t){let n=Y._isString(e),r=Object.prototype.toString.call(e)===`[object CanvasGradient]`||e&&e.addColorStop;return n||r||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a string or a native gradient.`),e}}function fh(){if(J.isUnminified)return function(e,t){return Y._isArray(e)?e.forEach(function(e){Y._isNumber(e)||Y.warn(`"`+t+`" attribute has non numeric element `+e+`. Make sure that all elements are numbers.`)}):Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a array of numbers.`),e}}function ph(){if(J.isUnminified)return function(e,t){return e===!0||e===!1||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a boolean.`),e}}function mh(e){if(J.isUnminified)return function(t,n){return Y.isObject(t)||Y.warn(oh(t)+` is a not valid value for "`+n+`" attribute. The value should be an object with properties `+e),t}}var hh=`get`,gh=`set`,Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=hh+Y._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var e=this.attrs[t];return e===void 0?n:e}},addSetter(e,t,n,r){var i=gh+Y._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=gh+Y._capitalize(t);e.prototype[i]=function(e){return n&&e!=null&&(e=n.call(this,e,t)),this._setAttr(t,e),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var a=n.length,o=Y._capitalize,s=hh+o(t),c=gh+o(t),l,u;e.prototype[s]=function(){var e={};for(l=0;l<a;l++)u=n[l],e[u]=this.getAttr(t+o(u));return e};var d=mh(n);e.prototype[c]=function(e){var n=this.attrs[t],a;for(a in r&&(e=r.call(this,e)),d&&d.call(this,e,t),e)e.hasOwnProperty(a)&&this._setAttr(t+o(a),e[a]);return this._fireChangeEvent(t,n,e),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=Y._capitalize(t),r=gh+n,i=hh+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){Y.error(`Adding deprecated `+t);var i=hh+Y._capitalize(t),a=t+` property is deprecated and will be removed soon. Look at Konva change log for more information.`;e.prototype[i]=function(){Y.error(a);var e=this.attrs[t];return e===void 0?n:e},Z.addSetter(e,t,r,function(){Y.error(a)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){Y.each(t,function(t,n){var r=e.prototype[n],i=hh+Y._capitalize(t),a=gh+Y._capitalize(t);function o(){r.apply(this,arguments),Y.error(`"`+t+`" method is deprecated and will be removed soon. Use ""`+n+`" instead.`)}e.prototype[t]=o,e.prototype[i]=o,e.prototype[a]=o})},afterSetFilter(){this._filterUpToDate=!1}};function _h(e){var t=[],n=e.length,r=Y,i,a;for(i=0;i<n;i++)a=e[i],r._isNumber(a)?a=Math.round(a*1e3)/1e3:r._isString(a)||(a+=``),t.push(a);return t}var vh=`,`,yh=`(`,bh=`)`,xh=`([`,Sh=`])`,Ch=`;`,wh=`()`,Th=`=`,Eh=`arc.arcTo.beginPath.bezierCurveTo.clearRect.clip.closePath.createLinearGradient.createPattern.createRadialGradient.drawImage.ellipse.fill.fillText.getImageData.createImageData.lineTo.moveTo.putImageData.quadraticCurveTo.rect.restore.rotate.save.scale.setLineDash.setTransform.stroke.strokeText.transform.translate`.split(`.`),Dh=[`fillStyle`,`strokeStyle`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`,`lineCap`,`lineDashOffset`,`lineJoin`,`lineWidth`,`miterLimit`,`font`,`textAlign`,`textBaseline`,`globalAlpha`,`globalCompositeOperation`,`imageSmoothingEnabled`],Oh=100,kh=class{constructor(e){this.canvas=e,this._context=e._canvas.getContext(`2d`),J.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){var n=this.traceArr,r=n.length,i=``,a,o,s,c;for(a=0;a<r;a++)o=n[a],s=o.method,s?(c=o.args,i+=s,e?i+=wh:Y._isArray(c[0])?i+=xh+c.join(vh)+Sh:(t&&(c=c.map(e=>typeof e==`number`?Math.floor(e):e)),i+=yh+c.join(vh)+bh)):(i+=o.property,e||(i+=Th+o.val)),i+=Ch;return i}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr,n;t.push(e),n=t.length,n>=Oh&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){var t=e.getLineCap();t&&this.setAttr(`lineCap`,t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();t!==1&&this.setAttr(`globalAlpha`,t)}_applyLineJoin(e){var t=e.attrs.lineJoin;t&&this.setAttr(`lineJoin`,t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,i,a){this._context.arc(e,t,n,r,i,a)}arcTo(e,t,n,r,i){this._context.arcTo(e,t,n,r,i)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,i,a){this._context.bezierCurveTo(e,t,n,r,i,a)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(e,t){var n=arguments;if(n.length===2)return this._context.createImageData(e,t);if(n.length===1)return this._context.createImageData(e)}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,i,a){return this._context.createRadialGradient(e,t,n,r,i,a)}drawImage(e,t,n,r,i,a,o,s,c){var l=arguments,u=this._context;l.length===3?u.drawImage(e,t,n):l.length===5?u.drawImage(e,t,n,r,i):l.length===9&&u.drawImage(e,t,n,r,i,a,o,s,c)}ellipse(e,t,n,r,i,a,o,s){this._context.ellipse(e,t,n,r,i,a,o,s)}isPointInPath(e,t){return this._context.isPointInPath(e,t)}fill(e){e?this._context.fill(e):this._context.fill()}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):`mozDash`in this._context?this._context.mozDash=e:`webkitLineDash`in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,t,n,r,i,a){this._context.setTransform(e,t,n,r,i,a)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,i,a){this._context.transform(e,t,n,r,i,a)}translate(e,t){this._context.translate(e,t)}_enableTrace(){var e=this,t=Eh.length,n=this.setAttr,r,i,a=function(t){var n=e[t],r;e[t]=function(){return i=_h(Array.prototype.slice.call(arguments,0)),r=n.apply(e,arguments),e._trace({method:t,args:i}),r}};for(r=0;r<t;r++)a(Eh[r]);e.setAttr=function(){n.apply(e,arguments);var t=arguments[0],r=arguments[1];(t===`shadowOffsetX`||t===`shadowOffsetY`||t===`shadowBlur`)&&(r/=this.canvas.getPixelRatio()),e._trace({property:t,val:r})}}_applyGlobalCompositeOperation(e){let t=e.attrs.globalCompositeOperation;!t||t===`source-over`||this.setAttr(`globalCompositeOperation`,t)}};Dh.forEach(function(e){Object.defineProperty(kh.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});var Ah=class extends kh{_fillColor(e){var t=e.fill();this.setAttr(`fillStyle`,t),e._fillFunc(this)}_fillPattern(e){this.setAttr(`fillStyle`,e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var t=e._getLinearGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fillRadialGradient(e){var t=e._getRadialGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fill(e){var t=e.fill(),n=e.getFillPriority();if(t&&n===`color`){this._fillColor(e);return}var r=e.getFillPatternImage();if(r&&n===`pattern`){this._fillPattern(e);return}var i=e.getFillLinearGradientColorStops();if(i&&n===`linear-gradient`){this._fillLinearGradient(e);return}var a=e.getFillRadialGradientColorStops();if(a&&n===`radial-gradient`){this._fillRadialGradient(e);return}t?this._fillColor(e):r?this._fillPattern(e):i?this._fillLinearGradient(e):a&&this._fillRadialGradient(e)}_strokeLinearGradient(e){var t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(var a=0;a<r.length;a+=2)i.addColorStop(r[a],r[a+1]);this.setAttr(`strokeStyle`,i)}}_stroke(e){var t=e.dash(),n=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(e),t&&e.dashEnabled()&&(this.setLineDash(t),this.setAttr(`lineDashOffset`,e.dashOffset())),this.setAttr(`lineWidth`,e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr(`shadowColor`,`rgba(0,0,0,0)`),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr(`strokeStyle`,e.stroke()),e._strokeFunc(this),n||this.restore()}}_applyShadow(e){var t=e.getShadowRGBA()??`black`,n=e.getShadowBlur()??5,r=e.getShadowOffset()??{x:0,y:0},i=e.getAbsoluteScale(),a=this.canvas.getPixelRatio(),o=i.x*a,s=i.y*a;this.setAttr(`shadowColor`,t),this.setAttr(`shadowBlur`,n*Math.min(Math.abs(o),Math.abs(s))),this.setAttr(`shadowOffsetX`,r.x*o),this.setAttr(`shadowOffsetY`,r.y*s)}},jh=class extends kh{_fill(e){this.save(),this.setAttr(`fillStyle`,e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){var t=e.getStrokeScaleEnabled();if(!t){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(e);var r=e.hitStrokeWidth(),i=r===`auto`?e.strokeWidth():r;this.setAttr(`lineWidth`,i),this.setAttr(`strokeStyle`,e.colorKey),e._strokeFuncHit(this),t||this.restore()}}},Mh;function Nh(){if(Mh)return Mh;var e=Y.createCanvasElement().getContext(`2d`);return Mh=(function(){return(J._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)})(),Mh}var Ph=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||J.pixelRatio||Nh();this.pixelRatio=t,this._canvas=Y.createCanvasElement(),this._canvas.style.padding=`0`,this._canvas.style.margin=`0`,this._canvas.style.border=`0`,this._canvas.style.background=`transparent`,this._canvas.style.position=`absolute`,this._canvas.style.top=`0`,this._canvas.style.left=`0`}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+`px`;var t=this.pixelRatio;this.getContext()._context.scale(t,t)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+`px`;var t=this.pixelRatio;this.getContext()._context.scale(t,t)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,t){this.setWidth(e||0),this.setHeight(t||0)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch{try{return this._canvas.toDataURL()}catch(e){return Y.error(`Unable to get data URL. `+e.message+` For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.`),``}}}};Z.addGetterSetter(Ph,`pixelRatio`,void 0,X());var Fh=class extends Ph{constructor(e={width:0,height:0}){super(e),this.context=new Ah(this),this.setSize(e.width,e.height)}},Ih=class extends Ph{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new jh(this),this.setSize(e.width,e.height)}},Lh={get isDragging(){var e=!1;return Lh._dragElements.forEach(t=>{t.dragStatus===`dragging`&&(e=!0)}),e},justDragged:!1,get node(){var e;return Lh._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){let t=[];Lh._dragElements.forEach((n,r)=>{let{node:i}=n,a=i.getStage();a.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=Y._getFirstPointerId(e));let o=a._changedPointerPositions.find(e=>e.id===n.pointerId);if(o){if(n.dragStatus!==`dragging`){var s=i.dragDistance();if(Math.max(Math.abs(o.x-n.startPointerPos.x),Math.abs(o.y-n.startPointerPos.y))<s||(i.startDrag({evt:e}),!i.isDragging()))return}i._setDragPosition(e,n),t.push(i)}}),t.forEach(t=>{t.fire(`dragmove`,{type:`dragmove`,target:t,evt:e},!0)})},_endDragBefore(e){Lh._dragElements.forEach(t=>{let{node:n}=t,r=n.getStage();if(e&&r.setPointersPositions(e),!r._changedPointerPositions.find(e=>e.id===t.pointerId))return;(t.dragStatus===`dragging`||t.dragStatus===`stopped`)&&(Lh.justDragged=!0,J._mouseListenClick=!1,J._touchListenClick=!1,J._pointerListenClick=!1,t.dragStatus=`stopped`);let i=t.node.getLayer()||t.node instanceof J.Stage&&t.node;i&&i.batchDraw()})},_endDragAfter(e){Lh._dragElements.forEach((t,n)=>{t.dragStatus===`stopped`&&t.node.fire(`dragend`,{type:`dragend`,target:t.node,evt:e},!0),t.dragStatus!==`dragging`&&Lh._dragElements.delete(n)})}};J.isBrowser&&(window.addEventListener(`mouseup`,Lh._endDragBefore,!0),window.addEventListener(`touchend`,Lh._endDragBefore,!0),window.addEventListener(`mousemove`,Lh._drag),window.addEventListener(`touchmove`,Lh._drag),window.addEventListener(`mouseup`,Lh._endDragAfter,!1),window.addEventListener(`touchend`,Lh._endDragAfter,!1));var Rh=`absoluteOpacity`,zh=`allEventListeners`,Bh=`absoluteTransform`,Vh=`absoluteScale`,Hh=`canvas`,Uh=`Change`,Wh=`children`,Gh=`konva`,Kh=`listening`,qh=`mouseenter`,Jh=`mouseleave`,Yh=`set`,Xh=`Shape`,Zh=` `,Qh=`stage`,$h=`transform`,eg=`Stage`,tg=`visible`,ng=[`xChange.konva`,`yChange.konva`,`scaleXChange.konva`,`scaleYChange.konva`,`skewXChange.konva`,`skewYChange.konva`,`rotationChange.konva`,`offsetXChange.konva`,`offsetYChange.konva`,`transformsEnabledChange.konva`].join(Zh),rg=1,Q=class e{constructor(e){this._id=rg++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===$h||e===Bh)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,t){var n=this._cache.get(e);return(n===void 0||(e===$h||e===Bh)&&n.dirty===!0)&&(n=t.call(this),this._cache.set(e,n)),n}_calculate(e,t,n){if(!this._attachedDepsListeners.get(e)){let n=t.map(e=>e+`Change.konva`).join(Zh);this.on(n,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(Hh)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===Bh&&this.fire(`absoluteTransformChange`)}clearCache(){return this._cache.delete(Hh),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var t=e||{},n={};(t.x===void 0||t.y===void 0||t.width===void 0||t.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var r=Math.ceil(t.width||n.width),i=Math.ceil(t.height||n.height),a=t.pixelRatio,o=t.x===void 0?n.x:t.x,s=t.y===void 0?n.y:t.y,c=t.offset||0,l=t.drawBorder||!1,u=t.hitCanvasPixelRatio||1;if(!r||!i){Y.error(`Can not cache the node. Width or height of the node equals 0. Caching is skipped.`);return}r+=c*2,i+=c*2,o-=c,s-=c;var d=new Fh({pixelRatio:a,width:r,height:i}),f=new Fh({pixelRatio:a,width:0,height:0}),p=new Ih({pixelRatio:u,width:r,height:i}),m=d.getContext(),h=p.getContext();return p.isCache=!0,d.isCache=!0,this._cache.delete(Hh),this._filterUpToDate=!1,t.imageSmoothingEnabled===!1&&(d.getContext()._context.imageSmoothingEnabled=!1,f.getContext()._context.imageSmoothingEnabled=!1),m.save(),h.save(),m.translate(-o,-s),h.translate(-o,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Rh),this._clearSelfAndDescendantCache(Vh),this.drawScene(d,this),this.drawHit(p,this),this._isUnderCache=!1,m.restore(),h.restore(),l&&(m.save(),m.beginPath(),m.rect(0,0,r,i),m.closePath(),m.setAttr(`strokeStyle`,`red`),m.setAttr(`lineWidth`,5),m.stroke(),m.restore()),this._cache.set(Hh,{scene:d,filter:f,hit:p,x:o,y:s}),this._requestDraw(),this}isCached(){return this._cache.has(Hh)}getClientRect(e){throw Error(`abstract "getClientRect" method call`)}_transformedRect(e,t){var n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],r,i,a,o,s=this.getAbsoluteTransform(t);return n.forEach(function(e){var t=s.point(e);r===void 0&&(r=a=t.x,i=o=t.y),r=Math.min(r,t.x),i=Math.min(i,t.y),a=Math.max(a,t.x),o=Math.max(o,t.y)}),{x:r,y:i,width:a-r,height:o-i}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);let t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e=this.filters(),t=this._getCanvasCache(),n=t.scene,r=t.filter,i=r.getContext(),a,o,s,c;if(e){if(!this._filterUpToDate){var l=n.pixelRatio;r.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio);try{for(a=e.length,i.clear(),i.drawImage(n._canvas,0,0,n.getWidth()/l,n.getHeight()/l),o=i.getImageData(0,0,r.getWidth(),r.getHeight()),s=0;s<a;s++){if(c=e[s],typeof c!=`function`){Y.error(`Filter should be type of function, but got `+typeof c+` instead. Please check correct filters`);continue}c.call(this,o),i.putImageData(o,0,0)}}catch(e){Y.error(`Unable to apply filter. `+e.message+` This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.`)}this._filterUpToDate=!0}return r}return n}on(e,t){if(this._cache&&this._cache.delete(zh),arguments.length===3)return this._delegate.apply(this,arguments);var n=e.split(Zh),r=n.length,i,a,o,s,c;for(i=0;i<r;i++)a=n[i],o=a.split(`.`),s=o[0],c=o[1]||``,this.eventListeners[s]||(this.eventListeners[s]=[]),this.eventListeners[s].push({name:c,handler:t});return this}off(e,t){var n=(e||``).split(Zh),r=n.length,i,a,o,s,c,l;if(this._cache&&this._cache.delete(zh),!e)for(a in this.eventListeners)this._off(a);for(i=0;i<r;i++)if(o=n[i],s=o.split(`.`),c=s[0],l=s[1],c)this.eventListeners[c]&&this._off(c,l,t);else for(a in this.eventListeners)this._off(a,l,t);return this}dispatchEvent(e){var t={target:this,type:e.type,evt:e};return this.fire(e.type,t),this}addEventListener(e,t){return this.on(e,function(e){t.call(this,e.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,t,n){var r=this;this.on(e,function(e){for(var i=e.target.findAncestors(t,!0,r),a=0;a<i.length;a++)e=Y.cloneObject(e),e.currentTarget=i[a],n.call(i[a],e)})}remove(){return this.isDragging()&&this.stopDrag(),Lh._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Bh),this._clearSelfAndDescendantCache(Rh),this._clearSelfAndDescendantCache(Vh),this._clearSelfAndDescendantCache(Qh),this._clearSelfAndDescendantCache(tg),this._clearSelfAndDescendantCache(Kh)}_remove(){this._clearCaches();var e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(e){var t=`get`+Y._capitalize(e);return Y._isFunction(this[t])?this[t]():this.attrs[e]}getAncestors(){for(var e=this.getParent(),t=[];e;)t.push(e),e=e.getParent();return t}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{var t,n;if(!e)return this;for(t in e)t!==Wh&&(n=Yh+Y._capitalize(t),Y._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))}),this}isListening(){return this._getCache(Kh,this._isListening)}_isListening(e){if(!this.listening())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isListening(e):!0}isVisible(){return this._getCache(tg,this._isVisible)}_isVisible(e){if(!this.visible())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isVisible(e):!0}shouldDrawHit(e,t=!1){if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;Lh._dragElements.forEach(e=>{e.dragStatus===`dragging`&&(e.node.nodeType===`Stage`||e.node.getLayer()===n)&&(r=!0)});var i=!t&&!J.hitOnDragEnabled&&r;return this.isListening()&&this.isVisible()&&!i}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e=this.getDepth(),t=this,n=0,r,i,a,o;function s(c){for(r=[],i=c.length,a=0;a<i;a++)o=c[a],n++,o.nodeType!==Xh&&(r=r.concat(o.getChildren().slice())),o._id===t._id&&(a=i);r.length>0&&r[0].getDepth()<=e&&s(r)}return t.nodeType!==eg&&s(t.getStage().getChildren()),n}getDepth(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache($h),this._clearSelfAndDescendantCache(Bh)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var t=this.getAbsoluteTransform().copy();return t.invert(),t.point(e)}getAbsolutePosition(e){let t=!1,n=this.parent;for(;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var r=this.getAbsoluteTransform(e).getMatrix(),i=new Um,a=this.offset();return i.m=r.slice(),i.translate(a.x,a.y),i.getTranslation()}setAbsolutePosition(e){var t=this._clearTransform();this.attrs.x=t.x,this.attrs.y=t.y,delete t.x,delete t.y,this._clearCache($h);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(e.x,e.y),e={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(t),this.setPosition({x:e.x,y:e.y}),this._clearCache($h),this._clearSelfAndDescendantCache(Bh),this}_setTransform(e){for(var t in e)this.attrs[t]=e[t]}_clearTransform(){var e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){var t=e.x,n=e.y,r=this.x(),i=this.y();return t!==void 0&&(r+=t),n!==void 0&&(i+=n),this.setPosition({x:r,y:i}),this}_eachAncestorReverse(e,t){var n=[],r=this.getParent(),i,a;if(!(t&&t._id===this._id)){for(n.unshift(this);r&&(!t||r._id!==t._id);)n.unshift(r),r=r.parent;for(i=n.length,a=0;a<i;a++)e(n[a])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return Y.warn(`Node has no parent. moveToTop function is ignored.`),!1;var e=this.index;return this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0}moveUp(){if(!this.parent)return Y.warn(`Node has no parent. moveUp function is ignored.`),!1;var e=this.index;return e<this.parent.getChildren().length-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return Y.warn(`Node has no parent. moveDown function is ignored.`),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return Y.warn(`Node has no parent. moveToBottom function is ignored.`),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return Y.warn(`Node has no parent. zIndex parameter is ignored.`),this;(e<0||e>=this.parent.children.length)&&Y.warn(`Unexpected value `+e+` for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to `+(this.parent.children.length-1)+`.`);var t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Rh,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e={},t=this.getAttrs(),n,r,i,a,o;for(n in e.attrs={},t)r=t[n],o=Y.isObject(r)&&!Y._isPlainObject(r)&&!Y._isArray(r),!o&&(i=typeof this[n]==`function`&&this[n],delete t[n],a=i?i.call(this):null,t[n]=r,a!==r&&(e.attrs[n]=r));return e.className=this.getClassName(),Y._prepareToStringify(e)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var i=this.parent;i;){if(i===n)return r;i._isMatch(e)&&r.push(i),i=i.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if(typeof e==`function`)return e(this);var t=e.replace(/ /g,``).split(`,`),n=t.length,r,i;for(r=0;r<n;r++)if(i=t[r],Y.isValidSelector(i)||(Y.warn(`Selector "`+i+`" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".`),Y.warn(`If you have a custom shape with such className, please change it to start with upper letter like "Triangle".`),Y.warn(`Konva is awesome, right?`)),i.charAt(0)===`#`){if(this.id()===i.slice(1))return!0}else if(i.charAt(0)===`.`){if(this.hasName(i.slice(1)))return!0}else if(this.className===i||this.nodeType===i)return!0;return!1}getLayer(){var e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(Qh,this._getStage)}_getStage(){var e=this.getParent();if(e)return e.getStage()}fire(e,t={},n){return t.target=t.target||this,n?this._fireAndBubble(e,t):this._fire(e,t),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(Bh,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var t;if(e)return t=new Um,this._eachAncestorReverse(function(e){var n=e.transformsEnabled();n===`all`?t.multiply(e.getTransform()):n===`position`&&t.translate(e.x()-e.offsetX(),e.y()-e.offsetY())},e),t;t=this._cache.get(Bh)||new Um,this.parent?this.parent.getAbsoluteTransform().copyInto(t):t.reset();var n=this.transformsEnabled();if(n===`all`)t.multiply(this.getTransform());else if(n===`position`){let e=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,i=this.attrs.offsetY||0;t.translate(e-r,n-i)}return t.dirty=!1,t}getAbsoluteScale(e){for(var t=this;t;)t._isUnderCache&&(e=t),t=t.getParent();let n=this.getAbsoluteTransform(e).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache($h,this._getTransform)}_getTransform(){var e=this._cache.get($h)||new Um;e.reset();var t=this.x(),n=this.y(),r=J.getAngle(this.rotation()),i=this.attrs.scaleX??1,a=this.attrs.scaleY??1,o=this.attrs.skewX||0,s=this.attrs.skewY||0,c=this.attrs.offsetX||0,l=this.attrs.offsetY||0;return(t!==0||n!==0)&&e.translate(t,n),r!==0&&e.rotate(r),(o!==0||s!==0)&&e.skew(o,s),(i!==1||a!==1)&&e.scale(i,a),(c!==0||l!==0)&&e.translate(-1*c,-1*l),e.dirty=!1,e}clone(e){var t=Y.cloneObject(this.attrs),n,r,i,a,o;for(n in e)t[n]=e[n];var s=new this.constructor(t);for(n in this.eventListeners)for(r=this.eventListeners[n],i=r.length,a=0;a<i;a++)o=r[a],o.name.indexOf(Gh)<0&&(s.eventListeners[n]||(s.eventListeners[n]=[]),s.eventListeners[n].push(o));return s}_toKonvaCanvas(e){e||={};var t=this.getClientRect(),n=this.getStage(),r=e.x===void 0?t.x:e.x,i=e.y===void 0?t.y:e.y,a=e.pixelRatio||1,o=new Fh({width:e.width||t.width||(n?n.width():0),height:e.height||t.height||(n?n.height():0),pixelRatio:a}),s=o.getContext();return s.save(),(r||i)&&s.translate(-1*r,-1*i),this.drawScene(o),s.restore(),o}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e||={};var t=e.mimeType||null,n=e.quality||null,r=this._toKonvaCanvas(e).toDataURL(t,n);return e.callback&&e.callback(r),r}toImage(e){if(!e||!e.callback)throw`callback required for toImage method config argument`;var t=e.callback;delete e.callback,Y._urlToImage(this.toDataURL(e),function(e){t(e)})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance===void 0?this.parent?this.parent.getDragDistance():J.dragDistance:this.attrs.dragDistance}_off(e,t,n){var r=this.eventListeners[e],i,a,o;for(i=0;i<r.length;i++)if(a=r[i].name,o=r[i].handler,(a!==`konva`||t===`konva`)&&(!t||a===t)&&(!n||n===o)){if(r.splice(i,1),r.length===0){delete this.eventListeners[e];break}i--}}_fireChangeEvent(e,t,n){this._fire(e+Uh,{oldVal:t,newVal:n})}addName(e){if(!this.hasName(e)){var t=this.name(),n=t?t+` `+e:e;this.name(n)}return this}hasName(e){if(!e)return!1;let t=this.name();return t?(t||``).split(/\s/g).indexOf(e)!==-1:!1}removeName(e){var t=(this.name()||``).split(/\s/g),n=t.indexOf(e);return n!==-1&&(t.splice(n,1),this.name(t.join(` `))),this}setAttr(e,t){var n=this[Yh+Y._capitalize(e)];return Y._isFunction(n)?n.call(this,t):this._setAttr(e,t),this}_requestDraw(){J.autoDrawEnabled&&(this.getLayer()||this.getStage())?.batchDraw()}_setAttr(e,t){var n=this.attrs[e];n===t&&!Y.isObject(t)||(t==null?delete this.attrs[e]:this.attrs[e]=t,this._shouldFireChangeEvents&&this._fireChangeEvent(e,n,t),this._requestDraw())}_setComponentAttr(e,t,n){var r;n!==void 0&&(r=this.attrs[e],r||(this.attrs[e]=this.getAttr(e)),this.attrs[e][t]=n,this._fireChangeEvent(e,r,n))}_fireAndBubble(e,t,n){if(t&&this.nodeType===Xh&&(t.target=this),!((e===qh||e===Jh)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType===`Stage`&&!n))){this._fire(e,t);var r=(e===qh||e===Jh)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(t&&!t.cancelBubble||!t)&&this.parent&&this.parent.isListening()&&!r&&(n&&n.parent?this._fireAndBubble.call(this.parent,e,t,n):this._fireAndBubble.call(this.parent,e,t))}}_getProtoListeners(e){let t=this._cache.get(zh);if(!t){t={};let e=Object.getPrototypeOf(this);for(;e;){if(!e.eventListeners){e=Object.getPrototypeOf(e);continue}for(var n in e.eventListeners){let r=e.eventListeners[n],i=t[n]||[];t[n]=r.concat(i)}e=Object.getPrototypeOf(e)}this._cache.set(zh,t)}return t[e]}_fire(e,t){t||={},t.currentTarget=this,t.type=e;let n=this._getProtoListeners(e);if(n)for(var r=0;r<n.length;r++)n[r].handler.call(this,t);let i=this.eventListeners[e];if(i)for(var r=0;r<i.length;r++)i[r].handler.call(this,t)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){var t=e?e.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition(),i=n._getPointerById(t)||n._changedPointerPositions[0]||r;Lh._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-r.x,y:i.y-r.y},dragStatus:`ready`,pointerId:t})}startDrag(e,t=!0){Lh._dragElements.has(this._id)||this._createDragElement(e);let n=Lh._dragElements.get(this._id);n.dragStatus=`dragging`,this.fire(`dragstart`,{type:`dragstart`,target:this,evt:e&&e.evt},t)}_setDragPosition(e,t){let n=this.getStage()._getPointerById(t.pointerId);if(n){var r={x:n.x-t.offset.x,y:n.y-t.offset.y},i=this.dragBoundFunc();if(i!==void 0){let t=i.call(this,r,e);t?r=t:Y.warn(`dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.`)}(!this._lastPos||this._lastPos.x!==r.x||this._lastPos.y!==r.y)&&(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}stopDrag(e){let t=Lh._dragElements.get(this._id);t&&(t.dragStatus=`stopped`),Lh._endDragBefore(e),Lh._endDragAfter(e)}setDraggable(e){this._setAttr(`draggable`,e),this._dragChange()}isDragging(){let e=Lh._dragElements.get(this._id);return e?e.dragStatus===`dragging`:!1}_listenDrag(){this._dragCleanup(),this.on(`mousedown.konva touchstart.konva`,function(e){if((e.evt.button===void 0||J.dragButtons.indexOf(e.evt.button)>=0)&&!this.isDragging()){var t=!1;Lh._dragElements.forEach(e=>{this.isAncestorOf(e.node)&&(t=!0)}),t||this._createDragElement(e)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;let e=Lh._dragElements.get(this._id),t=e&&e.dragStatus===`dragging`,n=e&&e.dragStatus===`ready`;t?this.stopDrag():n&&Lh._dragElements.delete(this._id)}}_dragCleanup(){this.off(`mousedown.konva`),this.off(`touchstart.konva`)}isClientRectOnScreen(e={x:0,y:0}){let t=this.getStage();if(!t)return!1;let n={x:-e.x,y:-e.y,width:t.width()+e.x,height:t.height()+e.y};return Y.haveIntersection(n,this.getClientRect())}static create(e,t){return Y._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(t,n){var r=e.prototype.getClassName.call(t),i=t.children,a,o,s;n&&(t.attrs.container=n),J[r]||(Y.warn(`Can not find a node with class name "`+r+`". Fallback to "Shape".`),r=`Shape`);let c=J[r];if(a=new c(t.attrs),i)for(o=i.length,s=0;s<o;s++)a.add(e._createNode(i[s]));return a}};Q.prototype.nodeType=`Node`,Q.prototype._attrsAffectingSize=[],Q.prototype.eventListeners={},Q.prototype.on.call(Q.prototype,ng,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache($h),this._clearSelfAndDescendantCache(Bh)}),Q.prototype.on.call(Q.prototype,`visibleChange.konva`,function(){this._clearSelfAndDescendantCache(tg)}),Q.prototype.on.call(Q.prototype,`listeningChange.konva`,function(){this._clearSelfAndDescendantCache(Kh)}),Q.prototype.on.call(Q.prototype,`opacityChange.konva`,function(){this._clearSelfAndDescendantCache(Rh)});var ig=Z.addGetterSetter;ig(Q,`zIndex`),ig(Q,`absolutePosition`),ig(Q,`position`),ig(Q,`x`,0,X()),ig(Q,`y`,0,X()),ig(Q,`globalCompositeOperation`,`source-over`,uh()),ig(Q,`opacity`,1,X()),ig(Q,`name`,``,uh()),ig(Q,`id`,``,uh()),ig(Q,`rotation`,0,X()),Z.addComponentsGetterSetter(Q,`scale`,[`x`,`y`]),ig(Q,`scaleX`,1,X()),ig(Q,`scaleY`,1,X()),Z.addComponentsGetterSetter(Q,`skew`,[`x`,`y`]),ig(Q,`skewX`,0,X()),ig(Q,`skewY`,0,X()),Z.addComponentsGetterSetter(Q,`offset`,[`x`,`y`]),ig(Q,`offsetX`,0,X()),ig(Q,`offsetY`,0,X()),ig(Q,`dragDistance`,null,X()),ig(Q,`width`,0,X()),ig(Q,`height`,0,X()),ig(Q,`listening`,!0,ph()),ig(Q,`preventDefault`,!0,ph()),ig(Q,`filters`,null,function(e){return this._filterUpToDate=!1,e}),ig(Q,`visible`,!0,ph()),ig(Q,`transformsEnabled`,`all`,uh()),ig(Q,`size`),ig(Q,`dragBoundFunc`),ig(Q,`draggable`,!1,ph()),Z.backCompat(Q,{rotateDeg:`rotate`,setRotationDeg:`setRotation`,getRotationDeg:`getRotation`});var ag=class extends Q{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];let t=this.children||[];var n=[];return t.forEach(function(t){e(t)&&n.push(t)}),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}var n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire(`add`,{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants(r=>{let i=r._isMatch(e);return i&&n.push(r),!!(i&&t)}),n}_descendants(e){let t=!1,n=this.getChildren();for(let r of n)if(t=e(r),t||r.hasChildren()&&(t=r._descendants(e),t))return!0;return!1}toObject(){var e=Q.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(t=>{e.children.push(t.toObject())}),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=Q.prototype.clone.call(this,e);return this.getChildren().forEach(function(e){t.add(e.clone())}),t}getAllIntersections(e){var t=[];return this.find(`Shape`).forEach(function(n){n.isVisible()&&n.intersects(e)&&t.push(n)}),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),!this.isCached()&&((t=this.children)==null||t.forEach(function(t){t._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)==null||e.forEach(function(e,t){e.index=t}),this._requestDraw()}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas(),i=r&&r.getContext(),a=this._getCanvasCache(),o=a&&a.scene,s=r&&r.isCache;if(!this.isVisible()&&!s)return this;if(o){i.save();var c=this.getAbsoluteTransform(t).getMatrix();i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren(`drawScene`,r,t);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,i=r&&r.getContext(),a=this._getCanvasCache();if(a&&a.hit){i.save();var o=this.getAbsoluteTransform(t).getMatrix();i.transform(o[0],o[1],o[2],o[3],o[4],o[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren(`drawHit`,r,t);return this}_drawChildren(e,t,n){var r,i=t&&t.getContext(),a=this.clipWidth(),o=this.clipHeight(),s=this.clipFunc(),c=a&&o||s;let l=n===this;if(c){i.save();var u=this.getAbsoluteTransform(n),d=u.getMatrix();if(i.transform(d[0],d[1],d[2],d[3],d[4],d[5]),i.beginPath(),s)s.call(this,i,this);else{var f=this.clipX(),p=this.clipY();i.rect(f,p,a,o)}i.clip(),d=u.copy().invert().getMatrix(),i.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var m=!l&&this.globalCompositeOperation()!==`source-over`&&e===`drawScene`;m&&(i.save(),i._applyGlobalCompositeOperation(this)),(r=this.children)==null||r.forEach(function(r){r[e](t,n)}),m&&i.restore(),c&&i.restore()}getClientRect(e){var t;e||={};var n=e.skipTransform,r=e.relativeTo,i,a,o,s,c={x:1/0,y:1/0,width:0,height:0},l=this;(t=this.children)==null||t.forEach(function(t){if(t.visible()){var n=t.getClientRect({relativeTo:l,skipShadow:e.skipShadow,skipStroke:e.skipStroke});n.width===0&&n.height===0||(i===void 0?(i=n.x,a=n.y,o=n.x+n.width,s=n.y+n.height):(i=Math.min(i,n.x),a=Math.min(a,n.y),o=Math.max(o,n.x+n.width),s=Math.max(s,n.y+n.height)))}});for(var u=this.find(`Shape`),d=!1,f=0;f<u.length;f++)if(u[f]._isVisible(this)){d=!0;break}return c=d&&i!==void 0?{x:i,y:a,width:o-i,height:s-a}:{x:0,y:0,width:0,height:0},n?c:this._transformedRect(c,r)}};Z.addComponentsGetterSetter(ag,`clip`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(ag,`clipX`,void 0,X()),Z.addGetterSetter(ag,`clipY`,void 0,X()),Z.addGetterSetter(ag,`clipWidth`,void 0,X()),Z.addGetterSetter(ag,`clipHeight`,void 0,X()),Z.addGetterSetter(ag,`clipFunc`);var og=new Map,sg=J._global.PointerEvent!==void 0;function cg(e){return og.get(e)}function lg(e){return{evt:e,pointerId:e.pointerId}}function ug(e,t){return og.get(e)===t}function dg(e,t){fg(e),t.getStage()&&(og.set(e,t),sg&&t._fire(`gotpointercapture`,lg(new PointerEvent(`gotpointercapture`))))}function fg(e,t){let n=og.get(e);if(!n)return;let r=n.getStage();r&&r.content,og.delete(e),sg&&n._fire(`lostpointercapture`,lg(new PointerEvent(`lostpointercapture`)))}var pg=`Stage`,mg=`string`,hg=`px`,gg=`mouseout`,_g=`mouseleave`,vg=`mouseover`,yg=`mouseenter`,bg=`mousemove`,xg=`mousedown`,Sg=`mouseup`,Cg=`pointermove`,wg=`pointerdown`,Tg=`pointerup`,Eg=`pointercancel`,Dg=`lostpointercapture`,Og=`pointerout`,kg=`pointerleave`,Ag=`pointerover`,jg=`pointerenter`,Mg=`contextmenu`,Ng=`touchstart`,Pg=`touchend`,Fg=`touchmove`,Ig=`touchcancel`,Lg=`wheel`,Rg=5,zg=[[yg,`_pointerenter`],[xg,`_pointerdown`],[bg,`_pointermove`],[Sg,`_pointerup`],[_g,`_pointerleave`],[Ng,`_pointerdown`],[Fg,`_pointermove`],[Pg,`_pointerup`],[Ig,`_pointercancel`],[vg,`_pointerover`],[Lg,`_wheel`],[Mg,`_contextmenu`],[wg,`_pointerdown`],[Cg,`_pointermove`],[Tg,`_pointerup`],[Eg,`_pointercancel`],[Dg,`_lostpointercapture`]],Bg={mouse:{[Og]:gg,[kg]:_g,[Ag]:vg,[jg]:yg,[Cg]:bg,[wg]:xg,[Tg]:Sg,[Eg]:`mousecancel`,pointerclick:`click`,pointerdblclick:`dblclick`},touch:{[Og]:`touchout`,[kg]:`touchleave`,[Ag]:`touchover`,[jg]:`touchenter`,[Cg]:Fg,[wg]:Ng,[Tg]:Pg,[Eg]:Ig,pointerclick:`tap`,pointerdblclick:`dbltap`},pointer:{[Og]:Og,[kg]:kg,[Ag]:Ag,[jg]:jg,[Cg]:Cg,[wg]:wg,[Tg]:Tg,[Eg]:Eg,pointerclick:`pointerclick`,pointerdblclick:`pointerdblclick`}},Vg=e=>e.indexOf(`pointer`)>=0?`pointer`:e.indexOf(`touch`)>=0?`touch`:`mouse`,Hg=e=>{let t=Vg(e);if(t===`pointer`)return J.pointerEventsEnabled&&Bg.pointer;if(t===`touch`)return Bg.touch;if(t===`mouse`)return Bg.mouse};function Ug(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&Y.warn(`Stage does not support clipping. Please use clip for Layers or Groups.`),e}var Wg=`Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);`,Gg=[],Kg=class extends ag{constructor(e){super(Ug(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Gg.push(this),this.on(`widthChange.konva heightChange.konva`,this._resizeDOM),this.on(`visibleChange.konva`,this._checkVisibility),this.on(`clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva`,()=>{Ug(this.attrs)}),this._checkVisibility()}_validateAdd(e){let t=e.getType()===`Layer`,n=e.getType()===`FastLayer`;t||n||Y.throw(`You may only add layers to the stage.`)}_checkVisibility(){if(!this.content)return;let e=this.visible()?``:`none`;this.content.style.display=e}setContainer(e){if(typeof e===mg){if(e.charAt(0)===`.`){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n=e.charAt(0)===`#`?e.slice(1):e;e=document.getElementById(n)}if(!e)throw`Can not find container in document with id `+n}return this._setAttr(`container`,e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e=this.children,t=e.length,n;for(n=0;n<t;n++)e[n].clear();return this}clone(e){return e||={},e.container=typeof document<`u`&&document.createElement(`div`),ag.prototype.clone.call(this,e)}destroy(){super.destroy();var e=this.content;e&&Y._isInDocument(e)&&this.container().removeChild(e);var t=Gg.indexOf(this);return t>-1&&Gg.splice(t,1),this}getPointerPosition(){let e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(Y.warn(Wg),null)}_getPointerById(e){return this._pointerPositions.find(t=>t.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e||={},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new Fh({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach(function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}}),t}getIntersection(e){if(!e)return null;var t=this.children,n=t.length-1,r;for(r=n;r>=0;r--){let n=t[r].getIntersection(e);if(n)return n}return null}_resizeDOM(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+hg,this.content.style.height=t+hg),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach(n=>{n.setSize({width:e,height:t}),n.draw()})}add(e,...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}super.add(e);var r=this.children.length;return r>Rg&&Y.warn(`The stage has `+r+` layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.`),e.setSize({width:this.width(),height:this.height()}),e.draw(),J.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return ug(e,this)}setPointerCapture(e){dg(e,this)}releaseCapture(e){fg(e,this)}getLayers(){return this.children}_bindContentEvents(){J.isBrowser&&zg.forEach(([e,t])=>{this.content.addEventListener(e,e=>{this[t](e)})})}_pointerenter(e){this.setPointersPositions(e);let t=Hg(e.type);this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);let t=Hg(e.type);this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+`targetShape`];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){let t=Hg(e.type),n=Vg(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),i=!Lh.isDragging||J.hitOnDragEnabled;r&&i?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+`targetShape`]=null):i&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(e){let t=Hg(e.type),n=Vg(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach(i=>{var a=this.getIntersection(i);if(Lh.justDragged=!1,J[`_`+n+`ListenClick`]=!0,!(a&&a.isListening()))return;J.capturePointerEventsEnabled&&a.setPointerCapture(i.id),this[n+`ClickStartShape`]=a,a._fireAndBubble(t.pointerdown,{evt:e,pointerId:i.id}),r=!0;let o=e.type.indexOf(`touch`)>=0;a.preventDefault()&&e.cancelable&&o&&e.preventDefault()}),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){let t=Hg(e.type),n=Vg(e.type);if(!t||(Lh.isDragging&&Lh.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!Lh.isDragging||J.hitOnDragEnabled)))return;var r={};let i=!1;var a=this._getTargetShape(n);this._changedPointerPositions.forEach(o=>{let s=cg(o.id)||this.getIntersection(o),c=o.id,l={evt:e,pointerId:c};var u=a!==s;if(u&&a&&(a._fireAndBubble(t.pointerout,Object.assign({},l),s),a._fireAndBubble(t.pointerleave,Object.assign({},l),s)),s){if(r[s._id])return;r[s._id]=!0}s&&s.isListening()?(i=!0,u&&(s._fireAndBubble(t.pointerover,Object.assign({},l),a),s._fireAndBubble(t.pointerenter,Object.assign({},l),a),this[n+`targetShape`]=s),s._fireAndBubble(t.pointermove,Object.assign({},l))):a&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:c}),this[n+`targetShape`]=null)}),i||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){let t=Hg(e.type),n=Vg(e.type);if(!t)return;this.setPointersPositions(e);let r=this[n+`ClickStartShape`],i=this[n+`ClickEndShape`];var a={};let o=!1;this._changedPointerPositions.forEach(s=>{let c=cg(s.id)||this.getIntersection(s);if(c){if(c.releaseCapture(s.id),a[c._id])return;a[c._id]=!0}let l=s.id,u={evt:e,pointerId:l},d=!1;J[`_`+n+`InDblClickWindow`]&&J[`_`+n+`InDblClickWindowId`]===l?(d=!0,clearTimeout(this[n+`DblTimeout`])):Lh.justDragged||(J[`_`+n+`InDblClickWindow`]=!0,J[`_`+n+`InDblClickWindowId`]=l,clearTimeout(this[n+`DblTimeout`])),this[n+`DblTimeout`]=setTimeout(function(){J[`_`+n+`InDblClickWindow`]=!1},J.dblClickWindow),c&&c.isListening()?(o=!0,this[n+`ClickEndShape`]=c,c._fireAndBubble(t.pointerup,Object.assign({},u)),J[`_`+n+`ListenClick`]&&r&&r===c&&(c._fireAndBubble(t.pointerclick,Object.assign({},u)),d&&i&&i===c&&c._fireAndBubble(t.pointerdblclick,Object.assign({},u)))):(this[n+`ClickEndShape`]=null,J[`_`+n+`ListenClick`]&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:l}),d&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:l}))}),o||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),J[`_`+n+`ListenClick`]=!1,e.cancelable&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(Mg,{evt:e}):this._fire(Mg,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(Lg,{evt:e}):this._fire(Lg,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);let t=cg(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(Tg,lg(e)),fg(e.pointerId)}_lostpointercapture(e){fg(e.pointerId)}setPointersPositions(e){var t=this._getContentPosition(),n=null,r=null;e||=window.event,e.touches===void 0?(n=(e.clientX-t.left)/t.scaleX,r=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}]):(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))}_setPointerPosition(e){Y.warn(`Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.`),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Fh({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Ih({pixelRatio:1,width:this.width(),height:this.height()}),J.isBrowser){var e=this.container();if(!e)throw`Stage has no container. A container is required.`;e.innerHTML=``,this.content=document.createElement(`div`),this.content.style.position=`relative`,this.content.style.userSelect=`none`,this.content.className=`konvajs-content`,this.content.setAttribute(`role`,`presentation`),e.appendChild(this.content),this._resizeDOM()}}cache(){return Y.warn(`Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.`),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(e){e.batchDraw()}),this}};Kg.prototype.nodeType=pg,Hm(Kg),Z.addGetterSetter(Kg,`container`);var qg=`hasShadow`,Jg=`shadowRGBA`,Yg=`patternImage`,Xg=`linearGradient`,Zg=`radialGradient`,Qg;function $g(){return Qg||(Qg=Y.createCanvasElement().getContext(`2d`),Qg)}var e_={};function t_(e){e.fill()}function n_(e){e.stroke()}function r_(e){e.fill()}function i_(e){e.stroke()}function a_(){this._clearCache(qg)}function o_(){this._clearCache(Jg)}function s_(){this._clearCache(Yg)}function c_(){this._clearCache(Xg)}function l_(){this._clearCache(Zg)}var $=class extends Q{constructor(e){super(e);let t;for(;t=Y.getRandomColor(),!(t&&!(t in e_)););this.colorKey=t,e_[t]=this}getContext(){return Y.warn(`shape.getContext() method is deprecated. Please do not use it.`),this.getLayer().getContext()}getCanvas(){return Y.warn(`shape.getCanvas() method is deprecated. Please do not use it.`),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(qg,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(Yg,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let e=$g().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||`repeat`);if(e&&e.setTransform){let t=new Um;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(J.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let n=t.getMatrix();e.setTransform({a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]})}return e}}_getLinearGradient(){return this._getCache(Xg,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=$g(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=t.createLinearGradient(n.x,n.y,r.x,r.y),a=0;a<e.length;a+=2)i.addColorStop(e[a],e[a+1]);return i}}_getRadialGradient(){return this._getCache(Zg,this.__getRadialGradient)}__getRadialGradient(){var e=this.fillRadialGradientColorStops();if(e){for(var t=$g(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=t.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),a=0;a<e.length;a+=2)i.addColorStop(e[a],e[a+1]);return i}}getShadowRGBA(){return this._getCache(Jg,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var e=Y.colorToRGBA(this.shadowColor());return`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a*(this.shadowOpacity()||1)+`)`}}hasFill(){return this._calculate(`hasFill`,[`fillEnabled`,`fill`,`fillPatternImage`,`fillLinearGradientColorStops`,`fillRadialGradientColorStops`],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate(`hasStroke`,[`strokeEnabled`,`strokeWidth`,`stroke`,`strokeLinearGradientColorStops`],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){let e=this.hitStrokeWidth();return e===`auto`?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var t=this.getStage().bufferHitCanvas,n;return t.getContext().clear(),this.drawHit(t,null,!0),n=t.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data,n[3]>0}destroy(){return Q.prototype.destroy.call(this),delete e_[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){if(!this.getStage()||!(this.attrs.perfectDrawEnabled??!0))return!1;let t=e||this.hasFill(),n=this.hasStroke(),r=this.getAbsoluteOpacity()!==1;if(t&&n&&r)return!0;let i=this.hasShadow(),a=this.shadowForStrokeEnabled();return!!(t&&n&&i&&a)}setStrokeHitEnabled(e){Y.warn(`strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.`),e?this.hitStrokeWidth(`auto`):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){let t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),i=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,a=r.width+i,o=r.height+i,s=!e.skipShadow&&this.hasShadow(),c=s?this.shadowOffsetX():0,l=s?this.shadowOffsetY():0,u=a+Math.abs(c),d=o+Math.abs(l),f=s&&this.shadowBlur()||0,p=u+f*2,m=d+f*2,h=0;Math.round(i/2)!==i/2&&(h=1);let g={width:p+h,height:m+h,x:-Math.round(i/2+f)+Math.min(c,0)+r.x,y:-Math.round(i/2+f)+Math.min(l,0)+r.y};return t?g:this._transformedRect(g,n)}drawScene(e,t){var n=this.getLayer(),r=e||n.getCanvas(),i=r.getContext(),a=this._getCanvasCache(),o=this.getSceneFunc(),s=this.hasShadow(),c,l,u,d=r.isCache,f=t===this;if(!this.isVisible()&&!f)return this;if(a){i.save();var p=this.getAbsoluteTransform(t).getMatrix();return i.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedSceneCanvas(i),i.restore(),this}if(!o)return this;if(i.save(),this._useBufferCanvas()&&!d){c=this.getStage(),l=c.bufferCanvas,u=l.getContext(),u.clear(),u.save(),u._applyLineJoin(this);var m=this.getAbsoluteTransform(t).getMatrix();u.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.call(this,u,this),u.restore();var h=l.pixelRatio;s&&i._applyShadow(this),i._applyOpacity(this),i._applyGlobalCompositeOperation(this),i.drawImage(l._canvas,0,0,l.width/h,l.height/h)}else{if(i._applyLineJoin(this),!f){var m=this.getAbsoluteTransform(t).getMatrix();i.transform(m[0],m[1],m[2],m[3],m[4],m[5]),i._applyOpacity(this),i._applyGlobalCompositeOperation(this)}s&&i._applyShadow(this),o.call(this,i,this)}return i.restore(),this}drawHit(e,t,n=!1){if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),i=e||r.hitCanvas,a=i&&i.getContext(),o=this.hitFunc()||this.sceneFunc(),s=this._getCanvasCache(),c=s&&s.hit;if(this.colorKey||Y.warn(`Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()`),c){a.save();var l=this.getAbsoluteTransform(t).getMatrix();return a.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!o)return this;if(a.save(),a._applyLineJoin(this),this!==t){var u=this.getAbsoluteTransform(t).getMatrix();a.transform(u[0],u[1],u[2],u[3],u[4],u[5])}return o.call(this,a,this),a.restore(),this}drawHitFromCache(e=0){var t=this._getCanvasCache(),n=this._getCachedSceneCanvas(),r=t.hit,i=r.getContext(),a=r.getWidth(),o=r.getHeight(),s,c,l,u,d,f;i.clear(),i.drawImage(n._canvas,0,0,a,o);try{for(s=i.getImageData(0,0,a,o),c=s.data,l=c.length,u=Y._hexToRgb(this.colorKey),d=0;d<l;d+=4)f=c[d+3],f>e?(c[d]=u.r,c[d+1]=u.g,c[d+2]=u.b,c[d+3]=255):c[d+3]=0;i.putImageData(s,0,0)}catch(e){Y.error(`Unable to draw hit graph from cached scene canvas. `+e.message)}return this}hasPointerCapture(e){return ug(e,this)}setPointerCapture(e){dg(e,this)}releaseCapture(e){fg(e,this)}};$.prototype._fillFunc=t_,$.prototype._strokeFunc=n_,$.prototype._fillFuncHit=r_,$.prototype._strokeFuncHit=i_,$.prototype._centroid=!1,$.prototype.nodeType=`Shape`,Hm($),$.prototype.eventListeners={},$.prototype.on.call($.prototype,`shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,a_),$.prototype.on.call($.prototype,`shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,o_),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva`,s_),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva`,c_),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva`,l_),Z.addGetterSetter($,`stroke`,void 0,dh()),Z.addGetterSetter($,`strokeWidth`,2,X()),Z.addGetterSetter($,`fillAfterStrokeEnabled`,!1),Z.addGetterSetter($,`hitStrokeWidth`,`auto`,lh()),Z.addGetterSetter($,`strokeHitEnabled`,!0,ph()),Z.addGetterSetter($,`perfectDrawEnabled`,!0,ph()),Z.addGetterSetter($,`shadowForStrokeEnabled`,!0,ph()),Z.addGetterSetter($,`lineJoin`),Z.addGetterSetter($,`lineCap`),Z.addGetterSetter($,`sceneFunc`),Z.addGetterSetter($,`hitFunc`),Z.addGetterSetter($,`dash`),Z.addGetterSetter($,`dashOffset`,0,X()),Z.addGetterSetter($,`shadowColor`,void 0,uh()),Z.addGetterSetter($,`shadowBlur`,0,X()),Z.addGetterSetter($,`shadowOpacity`,1,X()),Z.addComponentsGetterSetter($,`shadowOffset`,[`x`,`y`]),Z.addGetterSetter($,`shadowOffsetX`,0,X()),Z.addGetterSetter($,`shadowOffsetY`,0,X()),Z.addGetterSetter($,`fillPatternImage`),Z.addGetterSetter($,`fill`,void 0,dh()),Z.addGetterSetter($,`fillPatternX`,0,X()),Z.addGetterSetter($,`fillPatternY`,0,X()),Z.addGetterSetter($,`fillLinearGradientColorStops`),Z.addGetterSetter($,`strokeLinearGradientColorStops`),Z.addGetterSetter($,`fillRadialGradientStartRadius`,0),Z.addGetterSetter($,`fillRadialGradientEndRadius`,0),Z.addGetterSetter($,`fillRadialGradientColorStops`),Z.addGetterSetter($,`fillPatternRepeat`,`repeat`),Z.addGetterSetter($,`fillEnabled`,!0),Z.addGetterSetter($,`strokeEnabled`,!0),Z.addGetterSetter($,`shadowEnabled`,!0),Z.addGetterSetter($,`dashEnabled`,!0),Z.addGetterSetter($,`strokeScaleEnabled`,!0),Z.addGetterSetter($,`fillPriority`,`color`),Z.addComponentsGetterSetter($,`fillPatternOffset`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternOffsetX`,0,X()),Z.addGetterSetter($,`fillPatternOffsetY`,0,X()),Z.addComponentsGetterSetter($,`fillPatternScale`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternScaleX`,1,X()),Z.addGetterSetter($,`fillPatternScaleY`,1,X()),Z.addComponentsGetterSetter($,`fillLinearGradientStartPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientStartPointX`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointX`,0),Z.addGetterSetter($,`fillLinearGradientStartPointY`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillLinearGradientEndPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientEndPointX`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointX`,0),Z.addGetterSetter($,`fillLinearGradientEndPointY`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientStartPointX`,0),Z.addGetterSetter($,`fillRadialGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientEndPointX`,0),Z.addGetterSetter($,`fillRadialGradientEndPointY`,0),Z.addGetterSetter($,`fillPatternRotation`,0),Z.backCompat($,{dashArray:`dash`,getDashArray:`getDash`,setDashArray:`getDash`,drawFunc:`sceneFunc`,getDrawFunc:`getSceneFunc`,setDrawFunc:`setSceneFunc`,drawHitFunc:`hitFunc`,getDrawHitFunc:`getHitFunc`,setDrawHitFunc:`setHitFunc`});var u_=`#`,d_=`beforeDraw`,f_=`draw`,p_=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],m_=p_.length,h_=class extends ag{constructor(e){super(e),this.canvas=new Fh,this.hitCanvas=new Ih({pixelRatio:1}),this._waitingForDraw=!1,this.on(`visibleChange.konva`,this._checkVisibility),this._checkVisibility(),this.on(`imageSmoothingEnabledChange.konva`,this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[e+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Q.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!Q.prototype.moveUp.call(this))return!1;var e=this.getStage();return!e||!e.content?!1:(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Q.prototype.moveDown.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Q.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var e=this.getNativeCanvasElement();return Q.prototype.remove.call(this),e&&e.parentNode&&Y._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:t}){return this.canvas.setSize(e,t),this.hitCanvas.setSize(e,t),this._setSmoothEnabled(),this}_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to a layer.`)}_toKonvaCanvas(e){return e||={},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x===void 0?this.x():e.x,e.y=e.y===void 0?this.y():e.y,Q.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display=`block`:this.canvas._canvas.style.display=`none`}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Y.warn(`Can not change width of layer. Use "stage.width(value)" function instead.`)}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Y.warn(`Can not change height of layer. Use "stage.height(value)" function instead.`)}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Y.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r<m_;r++){let i=p_[r],a=this._getIntersection({x:e.x+i.x*t,y:e.y+i.y*t}),o=a.shape;if(o)return o;if(n=!!a.antialiased,!a.antialiased)break}if(n)t+=1;else return null}}_getIntersection(e){let t=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(e.x*t),Math.round(e.y*t),1,1).data,r=n[3];if(r===255){let e=e_[u_+Y._rgbToHex(n[0],n[1],n[2])];return e?{shape:e}:{antialiased:!0}}else if(r>0)return{antialiased:!0};return{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire(d_,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),ag.prototype.drawScene.call(this,r,t),this._fire(f_,{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),ag.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening(e)}getHitGraphEnabled(e){return Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent;this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}};h_.prototype.nodeType=`Layer`,Hm(h_),Z.addGetterSetter(h_,`imageSmoothingEnabled`,!0),Z.addGetterSetter(h_,`clearBeforeDraw`,!0),Z.addGetterSetter(h_,`hitGraphEnabled`,!0,ph());var g_=class extends h_{constructor(e){super(e),this.listening(!1),Y.warn(`Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.`)}};g_.prototype.nodeType=`FastLayer`,Hm(g_);var __=class extends ag{_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to groups.`)}};__.prototype.nodeType=`Group`,Hm(__);var v_=(function(){return Vm.performance&&Vm.performance.now?function(){return Vm.performance.now()}:function(){return new Date().getTime()}})(),y_=class e{constructor(t,n){this.id=e.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:v_(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(e){var t=[];return t=e?e.length>0?e:[e]:[],this.layers=t,this}getLayers(){return this.layers}addLayer(e){var t=this.layers,n=t.length,r;for(r=0;r<n;r++)if(t[r]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){var t=e.animations,n=t.length,r;for(r=0;r<n;r++)if(t[r].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=v_(),e._addAnimation(this),this}stop(){return e._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){var t=e.id,n=this.animations,r=n.length,i;for(i=0;i<r;i++)if(n[i].id===t){this.animations.splice(i,1);break}}static _runFrames(){var e={},t=this.animations,n,r,i,a,o,s,c,l,u;for(a=0;a<t.length;a++)if(n=t[a],r=n.layers,i=n.func,n._updateFrameObject(v_()),s=r.length,u=!i||i.call(n,n.frame)!==!1,u)for(o=0;o<s;o++)c=r[o],c._id!==void 0&&(e[c._id]=c);for(l in e)e.hasOwnProperty(l)&&e[l].batchDraw()}static _animationLoop(){var t=e;t.animations.length?(t._runFrames(),Y.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,Y.requestAnimFrame(this._animationLoop))}};y_.animations=[],y_.animIdCounter=0,y_.animRunning=!1;var b_={node:1,duration:1,easing:1,onFinish:1,yoyo:1},x_=1,S_=2,C_=3,w_=0,T_=[`fill`,`stroke`,`shadowColor`],E_=class{constructor(e,t,n,r,i,a,o){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=i-this.begin,this.pause()}fire(e){var t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=S_,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onPlay`)}reverse(){this.state=C_,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onReverse`)}seek(e){this.pause(),this._time=e,this.update(),this.fire(`onSeek`)}reset(){this.pause(),this._time=0,this.update(),this.fire(`onReset`)}finish(){this.pause(),this._time=this.duration,this.update(),this.fire(`onFinish`)}update(){this.setPosition(this.getPosition(this._time)),this.fire(`onUpdate`)}onEnterFrame(){var e=this.getTimer()-this._startTime;this.state===S_?this.setTime(e):this.state===C_&&this.setTime(this.duration-e)}pause(){this.state=x_,this.fire(`onPause`)}getTimer(){return new Date().getTime()}},D_=class e{constructor(t){var n=this,r=t.node,i=r._id,a,o=t.easing||O_.Linear,s=!!t.yoyo,c;a=t.duration===void 0?.3:t.duration===0?.001:t.duration,this.node=r,this._id=w_++;var l=r.getLayer()||(r instanceof J.Stage?r.getLayers():null);for(c in l||Y.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new y_(function(){n.tween.onEnterFrame()},l),this.tween=new E_(c,function(e){n._tweenFunc(e)},o,0,1,a*1e3,s),this._addListeners(),e.attrs[i]||(e.attrs[i]={}),e.attrs[i][this._id]||(e.attrs[i][this._id]={}),e.tweens[i]||(e.tweens[i]={}),t)b_[c]===void 0&&this._addAttr(c,t[c]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,a,o,s=e.tweens[i][t],c,l,u,d,f;if(s&&delete e.attrs[i][s][t],a=r.getAttr(t),Y._isArray(n))if(o=[],l=Math.max(n.length,a.length),t===`points`&&n.length!==a.length&&(n.length>a.length?(d=a,a=Y._prepareArrayForTween(a,n,r.closed())):(u=n,n=Y._prepareArrayForTween(n,a,r.closed()))),t.indexOf(`fill`)===0)for(c=0;c<l;c++)if(c%2==0)o.push(n[c]-a[c]);else{var p=Y.colorToRGBA(a[c]);f=Y.colorToRGBA(n[c]),a[c]=p,o.push({r:f.r-p.r,g:f.g-p.g,b:f.b-p.b,a:f.a-p.a})}else for(c=0;c<l;c++)o.push(n[c]-a[c]);else T_.indexOf(t)===-1?o=n-a:(a=Y.colorToRGBA(a),f=Y.colorToRGBA(n),o={r:f.r-a.r,g:f.g-a.g,b:f.b-a.b,a:f.a-a.a});e.attrs[i][this._id][t]={start:a,diff:o,end:n,trueEnd:u,trueStart:d},e.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=e.attrs[n._id][this._id],i,a,o,s,c,l,u,d;for(i in r){if(a=r[i],o=a.start,s=a.diff,d=a.end,Y._isArray(o))if(c=[],u=Math.max(o.length,d.length),i.indexOf(`fill`)===0)for(l=0;l<u;l++)l%2==0?c.push((o[l]||0)+s[l]*t):c.push(`rgba(`+Math.round(o[l].r+s[l].r*t)+`,`+Math.round(o[l].g+s[l].g*t)+`,`+Math.round(o[l].b+s[l].b*t)+`,`+(o[l].a+s[l].a*t)+`)`);else for(l=0;l<u;l++)c.push((o[l]||0)+s[l]*t);else c=T_.indexOf(i)===-1?o+s*t:`rgba(`+Math.round(o.r+s.r*t)+`,`+Math.round(o.g+s.g*t)+`,`+Math.round(o.b+s.b*t)+`,`+(o.a+s.a*t)+`)`;n.setAttr(i,c)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr(`points`,n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=e.tweens[t],i;for(i in this.pause(),r)delete e.tweens[t][i];delete e.attrs[t][n]}};D_.attrs={},D_.tweens={},Q.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new D_(e).play()};var O_={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),-(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t)},ElasticEaseOut(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),i*2**(-10*e)*Math.sin((e*r-o)*(2*Math.PI)/a)+n+t)},ElasticEaseInOut(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r/2)==2?t+n:(a||=.3*1.5*r,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t:i*2**(-10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a)*.5+n+t)},BounceEaseOut(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,n,r){return n-O_.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?O_.BounceEaseIn(e*2,0,n,r)*.5+t:O_.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,n,r){return n*e/r+t}},k_=Y._assign(J,{Util:Y,Transform:Um,Node:Q,Container:ag,Stage:Kg,stages:Gg,Layer:h_,FastLayer:g_,Group:__,DD:Lh,Shape:$,shapes:e_,Animation:y_,Tween:D_,Easings:O_,Context:kh,Canvas:Ph}),A_=class extends ${_sceneFunc(e){var t=J.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};A_.prototype._centroid=!0,A_.prototype.className=`Arc`,A_.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Hm(A_),Z.addGetterSetter(A_,`innerRadius`,0,X()),Z.addGetterSetter(A_,`outerRadius`,0,X()),Z.addGetterSetter(A_,`angle`,0,X()),Z.addGetterSetter(A_,`clockwise`,!1,ph());function j_(e,t,n,r,i,a,o){var s=Math.sqrt((n-e)**2+(r-t)**2),c=Math.sqrt((i-n)**2+(a-r)**2),l=o*s/(s+c),u=o*c/(s+c);return[n-l*(i-e),r-l*(a-t),n+u*(i-e),r+u*(a-t)]}function M_(e,t){var n=e.length,r=[],i,a;for(i=2;i<n-2;i+=2)a=j_(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(a[0])&&(r.push(a[0]),r.push(a[1]),r.push(e[i]),r.push(e[i+1]),r.push(a[2]),r.push(a[3]));return r}var N_=class extends ${constructor(e){super(e),this.on(`pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva`,function(){this._clearCache(`tensionPoints`)})}_sceneFunc(e){var t=this.points(),n=t.length,r=this.tension(),i=this.closed(),a=this.bezier(),o,s,c;if(n){if(e.beginPath(),e.moveTo(t[0],t[1]),r!==0&&n>4){for(o=this.getTensionPoints(),s=o.length,c=i?0:4,i||e.quadraticCurveTo(o[0],o[1],o[2],o[3]);c<s-2;)e.bezierCurveTo(o[c++],o[c++],o[c++],o[c++],o[c++],o[c++]);i||e.quadraticCurveTo(o[s-2],o[s-1],t[n-2],t[n-1])}else if(a)for(c=2;c<n;)e.bezierCurveTo(t[c++],t[c++],t[c++],t[c++],t[c++],t[c++]);else for(c=2;c<n;c+=2)e.lineTo(t[c],t[c+1]);i?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache(`tensionPoints`,this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():M_(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),t=e.length,n=this.tension(),r=j_(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),i=j_(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),a=M_(e,n);return[r[2],r[3]].concat(a,[i[0],i[1],e[t-2],e[t-1],i[2],i[3],r[0],r[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};e=this.tension()===0?this.points():[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]];for(var t=e[0],n=e[0],r=e[1],i=e[1],a,o,s=0;s<e.length/2;s++)a=e[s*2],o=e[s*2+1],t=Math.min(t,a),n=Math.max(n,a),r=Math.min(r,o),i=Math.max(i,o);return{x:t,y:r,width:n-t,height:i-r}}};N_.prototype.className=`Line`,N_.prototype._attrsAffectingSize=[`points`,`bezier`,`tension`],Hm(N_),Z.addGetterSetter(N_,`closed`,!1),Z.addGetterSetter(N_,`bezier`,!1),Z.addGetterSetter(N_,`tension`,0,X()),Z.addGetterSetter(N_,`points`,[],fh());var P_=class e extends ${constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=e.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on(`dataChange.konva`,function(){this.dataArray=e.parsePathData(this.data()),this.pathLength=0;for(var t=0;t<this.dataArray.length;++t)this.pathLength+=this.dataArray[t].pathLength})}_sceneFunc(e){var t=this.dataArray;e.beginPath();for(var n=!1,r=0;r<t.length;r++){var i=t[r].command,a=t[r].points;switch(i){case`L`:e.lineTo(a[0],a[1]);break;case`M`:e.moveTo(a[0],a[1]);break;case`C`:e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case`Q`:e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case`A`:var o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],d=a[5],f=a[6],p=a[7],m=c>l?c:l,h=c>l?1:c/l,g=c>l?l/c:1;e.translate(o,s),e.rotate(f),e.scale(h,g),e.arc(0,0,m,u,u+d,1-p),e.scale(1/h,1/g),e.rotate(-f),e.translate(-o,-s);break;case`z`:n=!0,e.closePath();break}}!n&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(n){if(n.command===`A`){var r=n.points[4],i=n.points[5],a=n.points[4]+i,o=Math.PI/180;if(Math.abs(r-a)<o&&(o=Math.abs(r-a)),i<0)for(let i=r-o;i>a;i-=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,0);t.push(r.x,r.y)}else for(let i=r+o;i<a;i+=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,0);t.push(r.x,r.y)}}else if(n.command===`C`)for(let r=0;r<=1;r+=.01){let i=e.getPointOnCubicBezier(r,n.start.x,n.start.y,n.points[0],n.points[1],n.points[2],n.points[3],n.points[4],n.points[5]);t.push(i.x,i.y)}else t=t.concat(n.points)});for(var n=t[0],r=t[0],i=t[1],a=t[1],o,s,c=0;c<t.length/2;c++)o=t[c*2],s=t[c*2+1],isNaN(o)||(n=Math.min(n,o),r=Math.max(r,o)),isNaN(s)||(i=Math.min(i,s),a=Math.max(a,s));return{x:Math.round(n),y:Math.round(i),width:Math.round(r-n),height:Math.round(a-i)}}getLength(){return this.pathLength}getPointAtLength(t){var n,r=0,i=this.dataArray.length;if(!i)return null;for(;r<i&&t>this.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var a=this.dataArray[r],o=a.points;switch(a.command){case`L`:return e.getPointOnLine(t,a.start.x,a.start.y,o[0],o[1]);case`C`:return e.getPointOnCubicBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case`Q`:return e.getPointOnQuadraticBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3]);case`A`:var s=o[0],c=o[1],l=o[2],u=o[3],d=o[4],f=o[5],p=o[6];return d+=f*t/a.pathLength,e.getPointOnEllipticalArc(s,c,l,u,d,p)}return null}static getLineLength(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}static getPointOnLine(e,t,n,r,i,a,o){a===void 0&&(a=t),o===void 0&&(o=n);var s=(i-n)/(r-t+1e-8),c=Math.sqrt(e*e/(1+s*s));r<t&&(c*=-1);var l=s*c,u;if(r===t)u={x:a,y:o+l};else if((o-n)/(a-t+1e-8)===s)u={x:a+c,y:o+l};else{var d,f,p=this.getLineLength(t,n,r,i),m=(a-t)*(r-t)+(o-n)*(i-n);m/=p*p,d=t+m*(r-t),f=n+m*(i-n);var h=this.getLineLength(a,o,d,f),g=Math.sqrt(e*e-h*h);c=Math.sqrt(g*g/(1+s*s)),r<t&&(c*=-1),l=s*c,u={x:d+c,y:f+l}}return u}static getPointOnCubicBezier(e,t,n,r,i,a,o,s,c){function l(e){return e*e*e}function u(e){return 3*e*e*(1-e)}function d(e){return 3*e*(1-e)*(1-e)}function f(e){return(1-e)*(1-e)*(1-e)}return{x:s*l(e)+a*u(e)+r*d(e)+t*f(e),y:c*l(e)+o*u(e)+i*d(e)+n*f(e)}}static getPointOnQuadraticBezier(e,t,n,r,i,a,o){function s(e){return e*e}function c(e){return 2*e*(1-e)}function l(e){return(1-e)*(1-e)}return{x:a*s(e)+r*c(e)+t*l(e),y:o*s(e)+i*c(e)+n*l(e)}}static getPointOnEllipticalArc(e,t,n,r,i,a){var o=Math.cos(a),s=Math.sin(a),c={x:n*Math.cos(i),y:r*Math.sin(i)};return{x:e+(c.x*o-c.y*s),y:t+(c.x*s+c.y*o)}}static parsePathData(e){if(!e)return[];var t=e,n=[`m`,`M`,`l`,`L`,`v`,`V`,`h`,`H`,`z`,`Z`,`c`,`C`,`q`,`Q`,`t`,`T`,`s`,`S`,`a`,`A`];t=t.replace(RegExp(` `,`g`),`,`);for(var r=0;r<n.length;r++)t=t.replace(new RegExp(n[r],`g`),`|`+n[r]);var i=t.split(`|`),a=[],o=[],s=0,c=0,l=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,u;for(r=1;r<i.length;r++){var d=i[r],f=d.charAt(0);for(d=d.slice(1),o.length=0;u=l.exec(d);)o.push(u[0]);for(var p=[],m=0,h=o.length;m<h;m++){if(o[m]===`00`){p.push(0,0);continue}var g=parseFloat(o[m]);isNaN(g)?p.push(0):p.push(g)}for(;p.length>0&&!isNaN(p[0]);){var _=null,v=[],y=s,b=c,x,S,C,w,T,E,D,O,ee,te;switch(f){case`l`:s+=p.shift(),c+=p.shift(),_=`L`,v.push(s,c);break;case`L`:s=p.shift(),c=p.shift(),v.push(s,c);break;case`m`:var k=p.shift(),A=p.shift();if(s+=k,c+=A,_=`M`,a.length>2&&a[a.length-1].command===`z`){for(var j=a.length-2;j>=0;j--)if(a[j].command===`M`){s=a[j].points[0]+k,c=a[j].points[1]+A;break}}v.push(s,c),f=`l`;break;case`M`:s=p.shift(),c=p.shift(),_=`M`,v.push(s,c),f=`L`;break;case`h`:s+=p.shift(),_=`L`,v.push(s,c);break;case`H`:s=p.shift(),_=`L`,v.push(s,c);break;case`v`:c+=p.shift(),_=`L`,v.push(s,c);break;case`V`:c=p.shift(),_=`L`,v.push(s,c);break;case`C`:v.push(p.shift(),p.shift(),p.shift(),p.shift()),s=p.shift(),c=p.shift(),v.push(s,c);break;case`c`:v.push(s+p.shift(),c+p.shift(),s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`C`,v.push(s,c);break;case`S`:S=s,C=c,x=a[a.length-1],x.command===`C`&&(S=s+(s-x.points[2]),C=c+(c-x.points[3])),v.push(S,C,p.shift(),p.shift()),s=p.shift(),c=p.shift(),_=`C`,v.push(s,c);break;case`s`:S=s,C=c,x=a[a.length-1],x.command===`C`&&(S=s+(s-x.points[2]),C=c+(c-x.points[3])),v.push(S,C,s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`C`,v.push(s,c);break;case`Q`:v.push(p.shift(),p.shift()),s=p.shift(),c=p.shift(),v.push(s,c);break;case`q`:v.push(s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`Q`,v.push(s,c);break;case`T`:S=s,C=c,x=a[a.length-1],x.command===`Q`&&(S=s+(s-x.points[0]),C=c+(c-x.points[1])),s=p.shift(),c=p.shift(),_=`Q`,v.push(S,C,s,c);break;case`t`:S=s,C=c,x=a[a.length-1],x.command===`Q`&&(S=s+(s-x.points[0]),C=c+(c-x.points[1])),s+=p.shift(),c+=p.shift(),_=`Q`,v.push(S,C,s,c);break;case`A`:w=p.shift(),T=p.shift(),E=p.shift(),D=p.shift(),O=p.shift(),ee=s,te=c,s=p.shift(),c=p.shift(),_=`A`,v=this.convertEndpointToCenterParameterization(ee,te,s,c,D,O,w,T,E);break;case`a`:w=p.shift(),T=p.shift(),E=p.shift(),D=p.shift(),O=p.shift(),ee=s,te=c,s+=p.shift(),c+=p.shift(),_=`A`,v=this.convertEndpointToCenterParameterization(ee,te,s,c,D,O,w,T,E);break}a.push({command:_||f,points:v,start:{x:y,y:b},pathLength:this.calcLength(y,b,_||f,v)})}(f===`z`||f===`Z`)&&a.push({command:`z`,points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var a,o,s,c,l=e;switch(r){case`L`:return l.getLineLength(t,n,i[0],i[1]);case`C`:for(a=0,o=l.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),c=.01;c<=1;c+=.01)s=l.getPointOnCubicBezier(c,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case`Q`:for(a=0,o=l.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),c=.01;c<=1;c+=.01)s=l.getPointOnQuadraticBezier(c,t,n,i[0],i[1],i[2],i[3]),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case`A`:a=0;var u=i[4],d=i[5],f=i[4]+d,p=Math.PI/180;if(Math.abs(u-f)<p&&(p=Math.abs(u-f)),o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),d<0)for(c=u-p;c>f;c-=p)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(c=u+p;c<f;c+=p)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],f,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),a}return 0}static convertEndpointToCenterParameterization(e,t,n,r,i,a,o,s,c){var l=Math.PI/180*c,u=Math.cos(l)*(e-n)/2+Math.sin(l)*(t-r)/2,d=-1*Math.sin(l)*(e-n)/2+Math.cos(l)*(t-r)/2,f=u*u/(o*o)+d*d/(s*s);f>1&&(o*=Math.sqrt(f),s*=Math.sqrt(f));var p=Math.sqrt((o*o*(s*s)-o*o*(d*d)-s*s*(u*u))/(o*o*(d*d)+s*s*(u*u)));i===a&&(p*=-1),isNaN(p)&&(p=0);var m=p*o*d/s,h=p*-s*u/o,g=(e+n)/2+Math.cos(l)*m-Math.sin(l)*h,_=(t+r)/2+Math.sin(l)*m+Math.cos(l)*h,v=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},y=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(v(e)*v(t))},b=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(y(e,t))},x=b([1,0],[(u-m)/o,(d-h)/s]),S=[(u-m)/o,(d-h)/s],C=[(-1*u-m)/o,(-1*d-h)/s],w=b(S,C);return y(S,C)<=-1&&(w=Math.PI),y(S,C)>=1&&(w=0),a===0&&w>0&&(w-=2*Math.PI),a===1&&w<0&&(w+=2*Math.PI),[g,_,o,s,x,w,l,a]}};P_.prototype.className=`Path`,P_.prototype._attrsAffectingSize=[`data`],Hm(P_),Z.addGetterSetter(P_,`data`);var F_=class extends N_{_sceneFunc(e){super._sceneFunc(e);var t=Math.PI*2,n=this.points(),r=n,i=this.tension()!==0&&n.length>4;i&&(r=this.getTensionPoints());var a=this.pointerLength(),o=n.length,s,c;if(i){let e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[o-2],n[o-1]],t=P_.calcLength(r[r.length-4],r[r.length-3],`C`,e),i=P_.getPointOnQuadraticBezier(Math.min(1,1-a/t),e[0],e[1],e[2],e[3],e[4],e[5]);s=n[o-2]-i.x,c=n[o-1]-i.y}else s=n[o-2]-n[o-4],c=n[o-1]-n[o-3];var l=(Math.atan2(c,s)+t)%t,u=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[o-2],n[o-1]),e.rotate(l),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),i?(s=(r[0]+r[2])/2-n[0],c=(r[1]+r[3])/2-n[1]):(s=n[2]-n[0],c=n[3]-n[1]),e.rotate((Math.atan2(-c,-s)+t)%t),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){let e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}}};F_.prototype.className=`Arrow`,Hm(F_),Z.addGetterSetter(F_,`pointerLength`,10,X()),Z.addGetterSetter(F_,`pointerWidth`,10,X()),Z.addGetterSetter(F_,`pointerAtBeginning`,!1),Z.addGetterSetter(F_,`pointerAtEnding`,!0);var I_=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}};I_.prototype._centroid=!0,I_.prototype.className=`Circle`,I_.prototype._attrsAffectingSize=[`radius`],Hm(I_),Z.addGetterSetter(I_,`radius`,0,X());var L_=class extends ${_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};L_.prototype.className=`Ellipse`,L_.prototype._centroid=!0,L_.prototype._attrsAffectingSize=[`radiusX`,`radiusY`],Hm(L_),Z.addComponentsGetterSetter(L_,`radius`,[`x`,`y`]),Z.addGetterSetter(L_,`radiusX`,0,X()),Z.addGetterSetter(L_,`radiusY`,0,X());var R_=class e extends ${constructor(e){super(e),this.on(`imageChange.konva`,()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener(`load`,()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){let t=this.getWidth(),n=this.getHeight(),r=this.attrs.image,i;if(r){let e=this.attrs.cropWidth,a=this.attrs.cropHeight;i=e&&a?[r,this.cropX(),this.cropY(),e,a,0,0,t,n]:[r,0,0,t,n]}(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),r&&e.drawImage.apply(e,i)}_hitFunc(e){var t=this.width(),n=this.height();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.attrs.width??this.image()?.width}getHeight(){return this.attrs.height??this.image()?.height}static fromURL(t,n){var r=Y.createImageElement();r.onload=function(){n(new e({image:r}))},r.crossOrigin=`Anonymous`,r.src=t}};R_.prototype.className=`Image`,Hm(R_),Z.addGetterSetter(R_,`image`),Z.addComponentsGetterSetter(R_,`crop`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(R_,`cropX`,0,X()),Z.addGetterSetter(R_,`cropY`,0,X()),Z.addGetterSetter(R_,`cropWidth`,0,X()),Z.addGetterSetter(R_,`cropHeight`,0,X());var z_=[`fontFamily`,`fontSize`,`fontStyle`,`padding`,`lineHeight`,`text`,`width`,`height`],B_=`Change.konva`,V_=`none`,H_=`up`,U_=`right`,W_=`down`,G_=`left`,K_=z_.length,q_=class extends __{constructor(e){super(e),this.on(`add.konva`,function(e){this._addListeners(e.child),this._sync()})}getText(){return this.find(`Text`)[0]}getTag(){return this.find(`Tag`)[0]}_addListeners(e){var t=this,n,r=function(){t._sync()};for(n=0;n<K_;n++)e.on(z_[n]+B_,r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e=this.getText(),t=this.getTag(),n,r,i,a,o,s,c;if(e&&t){switch(n=e.width(),r=e.height(),i=t.pointerDirection(),a=t.pointerWidth(),c=t.pointerHeight(),o=0,s=0,i){case H_:o=n/2,s=-1*c;break;case U_:o=n+a,s=r/2;break;case W_:o=n/2,s=r+c;break;case G_:o=-1*a,s=r/2;break}t.setAttrs({x:-1*o,y:-1*s,width:n,height:r}),e.setAttrs({x:-1*o,y:-1*s})}}};q_.prototype.className=`Label`,Hm(q_);var J_=class extends ${_sceneFunc(e){var t=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let s=0,c=0,l=0,u=0;typeof o==`number`?s=c=l=u=Math.min(o,t/2,n/2):(s=Math.min(o[0]||0,t/2,n/2),c=Math.min(o[1]||0,t/2,n/2),u=Math.min(o[2]||0,t/2,n/2),l=Math.min(o[3]||0,t/2,n/2)),e.beginPath(),e.moveTo(s,0),r===H_&&(e.lineTo((t-i)/2,0),e.lineTo(t/2,-1*a),e.lineTo((t+i)/2,0)),e.lineTo(t-c,0),e.arc(t-c,c,c,Math.PI*3/2,0,!1),r===U_&&(e.lineTo(t,(n-a)/2),e.lineTo(t+i,n/2),e.lineTo(t,(n+a)/2)),e.lineTo(t,n-u),e.arc(t-u,n-u,u,0,Math.PI/2,!1),r===W_&&(e.lineTo((t+i)/2,n),e.lineTo(t/2,n+a),e.lineTo((t-i)/2,n)),e.lineTo(l,n),e.arc(l,n-l,l,Math.PI/2,Math.PI,!1),r===G_&&(e.lineTo(0,(n+a)/2),e.lineTo(-1*i,n/2),e.lineTo(0,(n-a)/2)),e.lineTo(0,s),e.arc(s,s,s,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){var e=0,t=0,n=this.pointerWidth(),r=this.pointerHeight(),i=this.pointerDirection(),a=this.width(),o=this.height();return i===H_?(t-=r,o+=r):i===W_?o+=r:i===G_?(e-=n*1.5,a+=n):i===U_&&(a+=n*1.5),{x:e,y:t,width:a,height:o}}};J_.prototype.className=`Tag`,Hm(J_),Z.addGetterSetter(J_,`pointerDirection`,V_),Z.addGetterSetter(J_,`pointerWidth`,0,X()),Z.addGetterSetter(J_,`pointerHeight`,0,X()),Z.addGetterSetter(J_,`cornerRadius`,0,ch(4));var Y_=class extends ${_sceneFunc(e){var t=this.cornerRadius(),n=this.width(),r=this.height();if(e.beginPath(),!t)e.rect(0,0,n,r);else{let i=0,a=0,o=0,s=0;typeof t==`number`?i=a=o=s=Math.min(t,n/2,r/2):(i=Math.min(t[0]||0,n/2,r/2),a=Math.min(t[1]||0,n/2,r/2),s=Math.min(t[2]||0,n/2,r/2),o=Math.min(t[3]||0,n/2,r/2)),e.moveTo(i,0),e.lineTo(n-a,0),e.arc(n-a,a,a,Math.PI*3/2,0,!1),e.lineTo(n,r-s),e.arc(n-s,r-s,s,0,Math.PI/2,!1),e.lineTo(o,r),e.arc(o,r-o,o,Math.PI/2,Math.PI,!1),e.lineTo(0,i),e.arc(i,i,i,Math.PI,Math.PI*3/2,!1)}e.closePath(),e.fillStrokeShape(this)}};Y_.prototype.className=`Rect`,Hm(Y_),Z.addGetterSetter(Y_,`cornerRadius`,0,ch(4));var X_=class extends ${_sceneFunc(e){let t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){let e=this.attrs.sides,t=this.attrs.radius||0,n=[];for(var r=0;r<e;r++)n.push({x:t*Math.sin(r*2*Math.PI/e),y:-1*t*Math.cos(r*2*Math.PI/e)});return n}getSelfRect(){let e=this._getPoints();var t=e[0].x,n=e[0].y,r=e[0].x,i=e[0].y;return e.forEach(e=>{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.y)}),{x:t,y:r,width:n-t,height:i-r}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};X_.prototype.className=`RegularPolygon`,X_.prototype._centroid=!0,X_.prototype._attrsAffectingSize=[`radius`],Hm(X_),Z.addGetterSetter(X_,`radius`,0,X()),Z.addGetterSetter(X_,`sides`,0,X());var Z_=Math.PI*2,Q_=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,Z_,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),Z_,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};Q_.prototype.className=`Ring`,Q_.prototype._centroid=!0,Q_.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Hm(Q_),Z.addGetterSetter(Q_,`innerRadius`,0,X()),Z.addGetterSetter(Q_,`outerRadius`,0,X());var $_=class extends ${constructor(e){super(e),this._updated=!0,this.anim=new y_(()=>{var e=this._updated;return this._updated=!1,e}),this.on(`animationChange.konva`,function(){this.frameIndex(0)}),this.on(`frameIndexChange.konva`,function(){this._updated=!0}),this.on(`frameRateChange.konva`,function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(e){var t=this.animation(),n=this.frameIndex(),r=n*4,i=this.animations()[t],a=this.frameOffsets(),o=i[r+0],s=i[r+1],c=i[r+2],l=i[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,c,l),e.closePath(),e.fillStrokeShape(this)),u)if(a){var d=a[t],f=n*2;e.drawImage(u,o,s,c,l,d[f+0],d[f+1],c,l)}else e.drawImage(u,o,s,c,l,0,0,c,l)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=n*4,i=this.animations()[t],a=this.frameOffsets(),o=i[r+2],s=i[r+3];if(e.beginPath(),a){var c=a[t],l=n*2;e.rect(c[l+0],c[l+1],o,s)}else e.rect(0,0,o,s);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),t=this.animation();e<this.animations()[t].length/4-1?this.frameIndex(e+1):this.frameIndex(0)}};$_.prototype.className=`Sprite`,Hm($_),Z.addGetterSetter($_,`animation`),Z.addGetterSetter($_,`animations`),Z.addGetterSetter($_,`frameOffsets`),Z.addGetterSetter($_,`image`),Z.addGetterSetter($_,`frameIndex`,0,X()),Z.addGetterSetter($_,`frameRate`,17,X()),Z.backCompat($_,{index:`frameIndex`,getIndex:`getFrameIndex`,setIndex:`setFrameIndex`});var ev=class extends ${_sceneFunc(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var i=1;i<r*2;i++){var a=i%2==0?n:t,o=a*Math.sin(i*Math.PI/r),s=-1*a*Math.cos(i*Math.PI/r);e.lineTo(o,s)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};ev.prototype.className=`Star`,ev.prototype._centroid=!0,ev.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Hm(ev),Z.addGetterSetter(ev,`numPoints`,5,X()),Z.addGetterSetter(ev,`innerRadius`,0,X()),Z.addGetterSetter(ev,`outerRadius`,0,X());function tv(e){return Array.from(e)}var nv=`auto`,rv=`center`,iv=`justify`,av=`Change.konva`,ov=`2d`,sv=`-`,cv=`left`,lv=`text`,uv=`Text`,dv=`top`,fv=`bottom`,pv=`middle`,mv=`normal`,hv=`px `,gv=` `,_v=`right`,vv=`word`,yv=`char`,bv=`none`,xv=`…`,Sv=[`fontFamily`,`fontSize`,`fontStyle`,`fontVariant`,`padding`,`align`,`verticalAlign`,`lineHeight`,`text`,`width`,`height`,`wrap`,`ellipsis`,`letterSpacing`],Cv=Sv.length;function wv(e){return e.split(`,`).map(e=>{e=e.trim();let t=e.indexOf(` `)>=0,n=e.indexOf(`"`)>=0||e.indexOf(`'`)>=0;return t&&!n&&(e=`"${e}"`),e}).join(`, `)}var Tv;function Ev(){return Tv||(Tv=Y.createCanvasElement().getContext(ov),Tv)}function Dv(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Ov(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function kv(e){return e||={},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||`black`),e}var Av=class extends ${constructor(e){super(kv(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t<Cv;t++)this.on(Sv[t]+av,this._setTextData);this._setTextData()}_sceneFunc(e){var t=this.textArr,n=t.length;if(this.text()){var r=this.padding(),i=this.fontSize(),a=this.lineHeight()*i,o=this.verticalAlign(),s=0,c=this.align(),l=this.getWidth(),u=this.letterSpacing(),d=this.fill(),f=this.textDecoration(),p=f.indexOf(`underline`)!==-1,m=f.indexOf(`line-through`)!==-1,h,g=0,g=a/2,_=0,v=0;for(e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,pv),e.setAttr(`textAlign`,cv),o===pv?s=(this.getHeight()-n*a-r*2)/2:o===fv&&(s=this.getHeight()-n*a-r*2),e.translate(r,s+r),h=0;h<n;h++){var _=0,v=0,y=t[h],b=y.text,x=y.width,S=h!==n-1,C,w,T;if(e.save(),c===_v?_+=l-x-r*2:c===rv&&(_+=(l-x-r*2)/2),p&&(e.save(),e.beginPath(),e.moveTo(_,g+v+Math.round(i/2)),C=b.split(` `).length-1,w=C===0,T=c===iv&&S&&!w?l-r*2:x,e.lineTo(_+Math.round(T),g+v+Math.round(i/2)),e.lineWidth=i/15,e.strokeStyle=d,e.stroke(),e.restore()),m&&(e.save(),e.beginPath(),e.moveTo(_,g+v),C=b.split(` `).length-1,w=C===0,T=c===iv&&S&&!w?l-r*2:x,e.lineTo(_+Math.round(T),g+v),e.lineWidth=i/15,e.strokeStyle=d,e.stroke(),e.restore()),u!==0||c===iv){C=b.split(` `).length-1;for(var E=tv(b),D=0;D<E.length;D++){var O=E[D];O===` `&&h!==n-1&&c===iv&&(_+=(l-r*2-x)/C),this._partialTextX=_,this._partialTextY=g+v,this._partialText=O,e.fillStrokeShape(this),_+=this.measureSize(O).width+u}}else this._partialTextX=_,this._partialTextY=g+v,this._partialText=b,e.fillStrokeShape(this);e.restore(),n>1&&(g+=a)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=Y._isString(e)?e:e==null?``:e+``;return this._setAttr(lv,t),this}getWidth(){return this.attrs.width===nv||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===nv||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Y.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}measureSize(e){var t=Ev(),n=this.fontSize(),r;return t.save(),t.font=this._getContextFont(),r=t.measureText(e),t.restore(),{width:r.width,height:n}}_getContextFont(){return this.fontStyle()+gv+this.fontVariant()+gv+(this.fontSize()+hv)+wv(this.fontFamily())}_addTextLine(e){this.align()===iv&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return Ev().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split(`
|
|
148
|
+
`,Fd=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return Oa({root:[`root`,n,`color${ul(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${ul(n)}`,i&&`circleDisableShrink`]},kd,t)},Id=U(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ul(n.color)}`]]}})(Nc(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:Nd||{animation:`${jd} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Od()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Ld=U(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Rd=U(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${ul(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Nc(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:Pd||{animation:`${Md} 1.4s ease-in-out infinite`}}]}))),zd=U(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Nc(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),Bd=k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:d=`indeterminate`,...f}=n,p={...n,color:i,disableShrink:a,size:s,thickness:l,value:u,variant:d,enableTrackSlot:o},m=Fd(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((Ad-l)/2);h.strokeDasharray=e.toFixed(3),_[`aria-valuenow`]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform=`rotate(-90deg)`}return(0,A.jsx)(Id,{className:I(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,A.jsxs)(Ld,{className:m.svg,ownerState:p,viewBox:`${Ad/2} ${Ad/2} ${Ad} ${Ad}`,children:[o?(0,A.jsx)(zd,{className:m.track,ownerState:p,cx:Ad,cy:Ad,r:(Ad-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,A.jsx)(Rd,{className:m.circle,style:h,ownerState:p,cx:Ad,cy:Ad,r:(Ad-l)/2,fill:`none`,strokeWidth:l})]})})});function Vd(e){return si(`MuiButton`,e)}var Hd=ci(`MuiButton`,`root.text.textInherit.textPrimary.textSecondary.textSuccess.textError.textInfo.textWarning.outlined.outlinedInherit.outlinedPrimary.outlinedSecondary.outlinedSuccess.outlinedError.outlinedInfo.outlinedWarning.contained.containedInherit.containedPrimary.containedSecondary.containedSuccess.containedError.containedInfo.containedWarning.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.textSizeSmall.textSizeMedium.textSizeLarge.outlinedSizeSmall.outlinedSizeMedium.outlinedSizeLarge.containedSizeSmall.containedSizeMedium.containedSizeLarge.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.iconSizeSmall.iconSizeMedium.iconSizeLarge.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),Ud=k.createContext({}),Wd=k.createContext(void 0),Gd=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=Oa({root:[`root`,o&&`loading`,a,`${a}${ul(t)}`,`size${ul(i)}`,`${a}Size${ul(i)}`,`color${ul(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${ul(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${ul(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${ul(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Vd,c);return{...c,...l}},Kd=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],qd=U(wd,{shouldForwardProp:e=>zo(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ul(n.color)}`],t[`size${ul(n.size)}`],t[`${n.variant}Size${ul(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Nc(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${Hd.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Hd.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Hd.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${Hd.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Od()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${Hd.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${Hd.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${Hd.loading}`]:{color:`transparent`}}}]}})),Jd=U(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ul(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...Kd]})),Yd=U(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ul(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Kd]})),Xd=U(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),Zd=U(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),Qd=k.forwardRef(function(e,t){let n=k.useContext(Ud),r=k.useContext(Wd),i=cs({props:xi(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=vl(h),T=_??(0,A.jsx)(Bd,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=Gd(E),O=(b||g&&v===`start`)&&(0,A.jsx)(Jd,{className:D.startIcon,ownerState:E,children:b||(0,A.jsx)(Zd,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,A.jsx)(Yd,{className:D.endIcon,ownerState:E,children:f||(0,A.jsx)(Zd,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,j=typeof g==`boolean`?(0,A.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,A.jsx)(Xd,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:M,...ne}=D;return(0,A.jsxs)(qd,{ownerState:E,className:I(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:I(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:ne,children:[O,v!==`end`&&j,a,v===`end`&&j,ee]})}),$d=hl((0,A.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`Restore`),ef=hl((0,A.jsx)(`path`,{d:`M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`}),`Undo`),tf=U(`div`)({display:`flex`,flexDirection:`column`}),nf=U(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),rf=U(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),af=U(Qd)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),of=e=>{class t extends k.Component{static propTypes={session:O.object,onSessionChange:O.func};constructor(e){super(e),this.state={sessionInitialValues:JSON.parse(JSON.stringify(e.session)),session:e.session,changes:[]}}onSessionChange=e=>{this.setState(t=>({session:e,changes:[...t.changes,e]}),()=>this.props.onSessionChange(e))};onUndo=()=>{this.setState(e=>{let t=[...e.changes];return t.pop(),{changes:t,session:t.length?t[t.length-1]:e.sessionInitialValues}},()=>this.props.onSessionChange(this.state.session))};onReset=()=>{this.setState(e=>({session:e.sessionInitialValues,changes:[]}),()=>this.props.onSessionChange(this.state.sessionInitialValues))};render(){let{...t}=this.props,{changes:n,session:r}=this.state;return(0,A.jsxs)(tf,{children:[(0,A.jsxs)(nf,{children:[(0,A.jsxs)(af,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,A.jsx)(rf,{children:(0,A.jsx)(ef,{})}),`Undo`]}),(0,A.jsxs)(af,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,A.jsx)(rf,{children:(0,A.jsx)($d,{})}),`Start Over`]})]}),(0,A.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},sf=Fo({typography:{fontFamily:`inherit`},palette:{action:{disabled:`rgba(0, 0, 0, 0.54);`}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:`inherit`}}},MuiButton:{styleOverrides:{contained:{backgroundColor:`#e0e0e0`,color:`#000000`,"&:hover":{backgroundColor:`#bdbdbd`}}}}}}),cf=U(`div`)({"& table, th, td":{fontSize:`inherit`}}),lf=class extends k.Component{static propTypes={className:O.string,children:O.array,extraCSSRules:O.shape({names:O.arrayOf(O.string),rules:O.string}),fontSizeFactor:O.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}computeStyle(e){let t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),i=Math.max(n,r),a=e!=null&&typeof e==`number`?e:1;return a===1?null:{fontSize:`${i*a}px`}}render(){let{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...a}=r,o=this.computeStyle(n);return(0,A.jsx)(Cn,{injectFirst:!0,children:(0,A.jsxs)(Ko,{theme:sf,children:[i?.rules?(0,A.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,(0,A.jsx)(cf,{className:`${t} extraCSSRules`,...a,...o&&{style:o},children:e})]})})}},uf=U(lf)({display:`flex`,flexDirection:`column`,position:`relative`}),df=class extends k.Component{static propTypes={ariaLabel:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired,role:O.string,extraCSSRules:O.shape({names:O.arrayOf(O.string),rules:O.string}),fontSizeFactor:O.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,A.jsx)(uf,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},ff=class extends k.Component{static propTypes={tag:O.string,className:O.string,html:O.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,A.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}};function pf({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var mf=k.createContext(void 0);function hf(){return k.useContext(mf)}function gf(e){return si(`MuiFormLabel`,e)}var _f=ci(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),vf=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return Oa({root:[`root`,`color${ul(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},gf,t)},yf=U(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Nc(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Od()).map(([t])=>({props:{color:t},style:{[`&.${_f.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${_f.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${_f.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),bf=U(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Nc(({theme:e})=>({[`&.${_f.error}`]:{color:(e.vars||e).palette.error.main}}))),xf=k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,p=pf({props:n,muiFormControl:hf(),states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=vf(m);return(0,A.jsxs)(yf,{as:o,ownerState:m,className:I(h.root,i),ref:t,...f,children:[r,p.required&&(0,A.jsxs)(bf,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function Sf(e){return si(`MuiInputLabel`,e)}ci(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var Cf=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=Oa({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${ul(r)}`,o],asterisk:[s&&`asterisk`]},Sf,t);return{...t,...c}},wf=U(xf,{shouldForwardProp:e=>zo(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${_f.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Nc(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create([`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),Tf=k.forwardRef(function(e,t){let n=cs({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=hf(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=pf({props:n,muiFormControl:l,states:[`size`,`variant`,`required`,`focused`]}),f={...n,disableAnimation:r,formControl:l,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=Cf(f);return(0,A.jsx)(wf,{"data-shrink":u,ref:t,className:I(p.root,s),...c,ownerState:f,classes:p})});function Ef(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Df(e,t=!1){return e&&(Ef(e.value)&&e.value!==``||t&&Ef(e.defaultValue)&&e.defaultValue!==``)}function Of(e){return e.startAdornment}function kf(e){return si(`MuiFormControl`,e)}ci(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var Af=e=>{let{classes:t,margin:n,fullWidth:r}=e;return Oa({root:[`root`,n!==`none`&&`margin${ul(n)}`,r&&`fullWidth`]},kf,t)},jf=U(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${ul(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),Mf=U(k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=Af(_),[y,b]=k.useState(()=>{let e=!1;return r&&k.Children.forEach(r,t=>{if(!gl(t,[`Input`,`Select`]))return;let n=gl(t,[`Select`])?t.props.input:t;n&&Of(n.props)&&(e=!0)}),e}),[x,S]=k.useState(()=>{let e=!1;return r&&k.Children.forEach(r,t=>{gl(t,[`Input`,`Select`])&&(Df(t.props,!0)||Df(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=k.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;k.useRef(!1);let E=k.useCallback(()=>{S(!0)},[]),D=k.useCallback(()=>{S(!1)},[]),O=k.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:D,onFilled:E,registerEffect:void 0,required:p,variant:h}),[y,a,s,c,x,T,u,d,void 0,D,E,p,m,h]);return(0,A.jsx)(mf.Provider,{value:O,children:(0,A.jsx)(jf,{as:o,ownerState:_,className:I(v.root,i),ref:t,...g,children:r})})}))(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),Nf=U(Tf)(()=>({fontSize:`inherit`,whiteSpace:`nowrap`,margin:0,padding:0,alignSelf:`flex-start`,position:`absolute`,top:0,left:0,transformOrigin:`top left`,pointerEvents:`none`,"&.MuiInputLabel-shrink":{transform:`scale(0.75) translate(0, -0.75em)`},"&:not(.MuiInputLabel-shrink)":{transform:`translate(0, 0)`}})),Pf=({label:e,className:t,children:n})=>(0,A.jsxs)(Mf,{className:t,children:[(0,A.jsx)(Nf,{shrink:!0,children:e}),n]});Pf.propTypes={label:O.oneOfType([O.string,O.object]).isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};var Ff=U(`div`)(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:`collapse`},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:`solid`,borderColor:pu()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:hu()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:hu()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:Pl()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Pl()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),If=/\\embed\{newLine\}\[\]/g,Lf=`\\newline `,Rf=`preview-prompt`,zf=class extends k.Component{static propTypes={prompt:O.string,tagName:O.string,className:O.string,onClick:O.func,defaultClassName:O.string,autoplayAudioEnabled:O.bool,customAudioButton:O.shape({playImage:O.string,pauseImage:O.string})};static defaultProps={onClick:()=>{}};promptRef=k.createRef();parsedText=e=>{let{autoplayAudioEnabled:t,customAudioButton:n}=this.props,r=document.createElement(`div`);r.innerHTML=e;let i=r.querySelector(`audio`);if(i){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,i.getAttribute(`src`)),i.removeAttribute(`src`),i.setAttribute(`id`,`pie-prompt-audio-player`),i.appendChild(e),n){i.style.display=`none`;let e=document.createElement(`div`);e.id=`play-audio-button`,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,backgroundImage:`url(${t?n.pauseImage:n.playImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),i.parentNode.insertBefore(e,i)}}return r.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById(`play-audio-button`),r=document.getElementById(`pie-prompt-audio-player`);if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener(`ended`,a)}).catch(e=>{n&&t&&(n.style.backgroundImage=`url(${t.playImage})`),console.error(`Error playing audio`,e)}),!n||!r||!t)return;let i=()=>{r.paused&&r.play()},a=()=>{n.style.backgroundImage=`url(${t.playImage})`},o=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};n.addEventListener(`click`,i),r.addEventListener(`play`,o),r.addEventListener(`pause`,s),r.addEventListener(`ended`,a),this._handlePlayClick=i,this._handleAudioPlay=o,this._handleAudioPause=s,this._handleAudioEnded=a}removeCustomAudioButtonListeners(){let e=document.getElementById(`play-audio-button`),t=document.querySelector(`audio`);!e||!t||(e.removeEventListener(`click`,this._handlePlayClick),t.removeEventListener(`play`,this._handleAudioPlay),t.removeEventListener(`pause`,this._handleAudioPause),t.removeEventListener(`ended`,this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){let e=this.promptRef.current;e&&typeof E==`function`&&E(e)}alignImages(){let e=this.promptRef.current;if(!e)return;let t=e.getElementsByTagName(`img`);if(t&&t.length){for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){let t=e.attributes.alignment.value,n=t===`center`?`center`:t===`right`?`flex-end`:`flex-start`,r=e.parentElement;if(r.tagName===`DIV`&&r.style.display===`flex`&&r.style.width===`100%`)r.style.justifyContent=n;else{let t=document.createElement(`div`);t.style.display=`flex`,t.style.width=`100%`,t.style.justifyContent=n;let i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}}render(){let{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,a=`${n||``} ${i||``} ${t===`legend`?`legend`:``} ${Rf}`.trim();return(0,A.jsx)(Ff,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(If,Lf)}})}},Bf=e=>(0,A.jsx)(A.Fragment,{children:k.Children.map(e.children,t=>k.cloneElement(t,{"data-pie-readable":e.false===void 0}))});Bf.propTypes={children:O.node,false:O.bool};var Vf=e=>(0,A.jsx)(A.Fragment,{children:k.Children.map(e.children,t=>k.cloneElement(t,{"data-pie-purpose":e.purpose}))});Vf.propTypes={children:O.node,purpose:O.string};var Hf;typeof window<`u`&&(Hf=new DOMParser);var Uf=e=>Hf.parseFromString(e,`text/html`).body.textContent,Wf=e=>{if(!e)return!1;let t=Uf(e);return!!(t&&t.trim())},Gf;typeof window<`u`&&(Gf=new DOMParser);var Kf=e=>{if(!e)return!1;let t=Gf.parseFromString(e,`text/html`);return!!t.body.queryS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AAAAABLa3AoETvfzAUAAAAAAAABErc7gUAAAiaeqdwKAAAAAACK+t36AKAAAAAAAAAAAI72dld8gKAAAAAAAAAAAAEsr3tq+YBO6Tat5gKAAAAAAAAAjVwKAAjdrecCgAAAAAAARrhra30gUAAAARtLVuwFAAAAAAAAAAAAAAAltbgUCJ3SbVvMBQAAAAAAAAAAAAltb3+YCgAI3ZNvkBQAAAAAAAAAAAAivzYFAAAAETTuk+HECgAAAAAAAAJZXvbVcwCvrdegCgAAAAAAAAAAAAAltbgUCN2TaV/MBQAAAAAAAAAAAAjV+dgKAAAAIndJrmBQAAAAAAAAACO+ln6QKAAAAAEaTs2uHACgAAAAAAAAAEbSTbdkuLAoEd+SAoAAAAjVwKAAAAAAAAAAAAAABG+Gl7/AEAUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function Jf(e=``,t=2){if(!e)return e;let n=new DOMParser().parseFromString(e,`text/html`);return n.body.querySelectorAll(`[data-heading]`).forEach(e=>{let r=e.getAttribute(`data-heading`)||``,i=parseInt(r.replace(`heading`,``),10);if(!Number.isFinite(i))return;let a=Math.min(6,Math.max(1,t+i-1)),o=n.createElement(`h${a}`);o.setAttribute(`data-heading`,r),Array.from(e.attributes).forEach(e=>{e.name!==`data-heading`&&o.setAttribute(e.name,e.value)}),o.innerHTML=e.innerHTML,e.replaceWith(o)}),n.body.innerHTML}function Yf(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:Fc(n,r),{props:s,internalRef:c}=Rc({...a,externalSlotProps:o}),l=nc(c,o?.ref,e.additionalProps?.ref);return Pc(t,{...s,ref:l},r)}var Xf=k.createContext({});function Zf(e){return si(`MuiList`,e)}ci(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var Qf=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Oa({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},Zf,t)},$f=U(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),ep=k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=k.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=Qf(d);return(0,A.jsx)(Xf.Provider,{value:u,children:(0,A.jsxs)($f,{as:a,className:I(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),tp=cc;function np(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function rp(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ip(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function ap(e,t,n,r,i,a){let o=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}let t=r?!1:s.disabled||s.getAttribute(`aria-disabled`)===`true`;if(!s.hasAttribute(`tabindex`)||!ip(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var op=k.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=k.useRef(null),p=k.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});_l(()=>{r&&f.current.focus()},[r]),k.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${tp(ms(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);let m=e=>{let t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){l&&l(e);return}let r=bc(fs(t));if(n===`ArrowDown`)e.preventDefault(),ap(t,r,c,s,np);else if(n===`ArrowUp`)e.preventDefault(),ap(t,r,c,s,rp);else if(n===`Home`)e.preventDefault(),ap(t,null,c,s,np);else if(n===`End`)e.preventDefault(),ap(t,null,c,s,rp);else if(n.length===1){let i=p.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);let c=r&&!i.repeating&&ip(r,i);i.previousKeyMatched&&(c||ap(t,r,!1,s,np,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=rc(f,t),g=-1;k.Children.forEach(a,(e,t)=>{if(!k.isValidElement(e)){g===t&&(g+=1,g>=a.length&&(g=-1));return}e.props.disabled||(u===`selectedMenu`&&e.props.selected||g===-1)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});let _=k.Children.map(a,(e,t)=>{if(t===g){let t={};return i&&(t.autoFocus=!0),e.props.tabIndex===void 0&&u===`selectedMenu`&&(t.tabIndex=0),k.cloneElement(e,t)}return e});return(0,A.jsx)(ep,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function sp(e){return si(`MuiMenu`,e)}ci(`MuiMenu`,[`root`,`paper`,`list`]);var cp={vertical:`top`,horizontal:`right`},lp={vertical:`top`,horizontal:`left`},up=e=>{let{classes:t}=e;return Oa({root:[`root`],paper:[`paper`],list:[`list`]},sp,t)},dp=U(kl,{shouldForwardProp:e=>zo(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),fp=U(Ol,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),pp=U(op,{name:`MuiMenu`,slot:`List`})({outline:0}),mp=k.forwardRef(function(e,t){let n=cs({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,MenuListProps:s={},onClose:c,open:l,PaperProps:u={},PopoverClasses:d,transitionDuration:f=`auto`,TransitionProps:{onEntering:p,...m}={},variant:h=`selectedMenu`,slots:g={},slotProps:_={},...v}=n,y=qi(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=up(b),S=r&&!o&&l,C=k.useRef(null),w=(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:y?`rtl`:`ltr`}),p&&p(e,t)},T=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},E=-1;k.Children.map(i,(e,t)=>{k.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||E===-1)&&(E=t))});let D={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},O=Yf({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[ee,te]=zc(`paper`,{className:x.paper,elementType:fp,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[j,M]=zc(`list`,{className:I(x.list,s.className),elementType:pp,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),ne=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,A.jsx)(dp,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?cp:lp,slots:{root:g.root,paper:ee,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:te,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...ne,onEntering:(...e)=>{w(...e),ne?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,A.jsx)(j,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...M,children:i})})}),hp=({slotProps:e,...t})=>(0,A.jsx)(mp,{...t,disableScrollLock:!0,hideBackdrop:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,pointerEvents:`none`,...e?.root?.style}},paper:{...e?.paper,style:{pointerEvents:`auto`,...e?.paper?.style}}}}),gp=s({Collapsible:()=>od,EnableAudioAutoplayImage:()=>qf,Feedback:()=>Bu,HtmlAndMath:()=>ff,InlineMenu:()=>hp,InputContainer:()=>Pf,PreviewLayout:()=>df,PreviewPrompt:()=>zf,Purpose:()=>Vf,Readable:()=>Bf,UiLayout:()=>lf,color:()=>Ml,hasMedia:()=>Kf,hasText:()=>Wf,indicators:()=>Hu,transformDataHeadings:()=>Jf,withUndoReset:()=>of}),_p=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},vp=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}},yp=`height ease-in 300ms, opacity ease-in 300ms`,bp=U(`div`)(()=>({position:`relative`,height:0,overflow:`hidden`,display:`flex`,visibility:`hidden`,width:0,"&.enter":{transition:yp,opacity:1,height:`auto`,width:`auto`,visibility:`visible`,minHeight:`25px`},"&.enter-done":{height:`auto`,visibility:`visible`,width:`auto`,minHeight:`25px`},"&.exit":{transition:yp,opacity:0,height:0,visibility:`visible`,width:0},"&.exit-done":{opacity:0,visibility:`hidden`,height:0,width:0}})),xp=e=>{let{show:t,children:n,className:r}=e,i=(0,k.useRef)(null);return(0,A.jsx)(Hs,{nodeRef:i,in:t,appear:!0,mountOnEnter:!1,timeout:300,classNames:{enter:`enter`,enterDone:`enter-done`,exit:`exit`,exitDone:`exit-done`},children:(0,A.jsx)(bp,{ref:i,className:r,children:n})})};xp.propTypes={show:O.bool.isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};var Sp={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},ebsr:{part:`Part {{index}}`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`},imageClozeAssociation:{reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`}},graphing:{point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,redo:`Redo`,reset:`Reset`},mathInline:{primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`}},Cp={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},ebsr:{part:`Parte {{index}}`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`},imageClozeAssociation:{reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`}},graphing:{point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,redo:`Rehacer`,reset:`Reiniciar`},mathInline:{primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`}},q=e=>typeof e==`string`,wp=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Tp=e=>e==null?``:``+e,Ep=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Dp=/###/g,Op=e=>e&&e.indexOf(`###`)>-1?e.replace(Dp,`.`):e,kp=e=>!e||q(e),Ap=(e,t,n)=>{let r=q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(kp(e))return{};let t=Op(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return kp(e)?{}:{obj:e,k:Op(r[i])}},jp=(e,t,n)=>{let{obj:r,k:i}=Ap(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Ap(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Ap(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Mp=(e,t,n,r)=>{let{obj:i,k:a}=Ap(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Np=(e,t)=>{let{obj:n,k:r}=Ap(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Pp=(e,t,n)=>{let r=Np(e,n);return r===void 0?Np(t,n):r},Fp=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?q(e[r])||e[r]instanceof String||q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Fp(e[r],t[r],n):e[r]=t[r]);return e},Ip=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Lp={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Rp=e=>q(e)?e.replace(/[&<>"'\/]/g,e=>Lp[e]):e,zp=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Bp=[` `,`,`,`?`,`!`,`;`],Vp=new zp(20),Hp=(e,t,n)=>{t||=``,n||=``;let r=Bp.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Vp.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Up=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Wp=e=>e?.replace(/_/g,`-`),Gp={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Kp=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Gp,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(q(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},qp=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},Jp=class extends qp{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):q(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Np(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!q(n)?s:Up(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),jp(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(q(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Np(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Fp(s,n,i):s={...s,...n},jp(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Yp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Xp=Symbol(`i18next/PATH_KEY`);function Zp(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Xp?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Qp(e,t){let{[Xp]:n}=e(Zp()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var $p={},em=e=>!q(e)&&typeof e!=`boolean`&&typeof e!=`number`,tm=class e extends qp{constructor(e,t={}){super(),Ep([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Kp.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=em(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Hp(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:q(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:q(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Qp(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Qp(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!q(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=em(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(q(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:em(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&q(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=q(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!q(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=q(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Yp.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return q(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Qp(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!q(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(q(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!$p[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&($p[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!q(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},nm=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kp.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Wp(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Wp(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(q(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),q(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return q(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):q(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},rm={zero:0,one:1,two:2,few:3,many:4,other:5},im={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},am=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Kp.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Wp(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),im;if(!e.match(/-|_/))return im;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>rm[e]-rm[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},om=(e,t,n,r=`.`,i=!0)=>{let a=Pp(e,t,n);return!a&&i&&q(n)&&(a=Up(e,n,r),a===void 0&&(a=Up(t,n,r))),a},sm=e=>e.replace(/\$/g,`$$$$`),cm=class{constructor(e={}){this.logger=Kp.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Rp:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Ip(i):a||`{{`,this.suffix=o?Ip(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Ip(d):f||Ip(`$t(`),this.nestingSuffix=p?Ip(p):m||Ip(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=om(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(om(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>sm(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?sm(this.escape(e)):sm(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=q(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!q(a)&&!this.useRawValueToEscape&&(a=Tp(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${Ip(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!q(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!q(i))return i;q(i)||(i=Tp(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},lm=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},um=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Wp(r),i),t[o]=s),s(n)}},dm=e=>(t,n,r)=>e(Wp(n),r)(t),fm=class{constructor(e={}){this.logger=Kp.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?um:dm;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=um(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=lm(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},pm=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},mm=class extends qp{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Kp.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Mp(n.loaded,[i],a),pm(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();q(e)&&(e=this.languageUtils.toResolveHierarchy(e)),q(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},hm=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),q(e[1])&&(t.defaultValue=e[1]),q(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),gm=e=>(q(e.ns)&&(e.ns=[e.ns]),q(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),q(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),_m=()=>{},vm=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},ym=`__i18next_supportNoticeShown`,bm=()=>!!(typeof globalThis<`u`&&globalThis[ym]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),xm=()=>{typeof globalThis<`u`&&(globalThis[ym]=!0)},Sm=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),Cm=class e extends qp{constructor(e={},t){if(super(),this.options=gm(e),this.services={},this.logger=Kp,this.modules={external:[]},vm(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(q(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=hm();this.options={...n,...this.options,...gm(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Sm(this)&&!bm()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),xm());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Kp.init(r(this.modules.logger),this.options):Kp.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:fm;let t=new nm(this.options);this.store=new Jp(this.options.resources,this.options);let i=this.services;i.logger=Kp,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new am(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new cm(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new mm(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new tm(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=_m,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=wp(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=_m){let n=t,r=q(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=wp();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=_m,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Yp.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=wp();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=q(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(q(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Qp(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Qp(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Qp(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return q(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=wp();return this.options.ns?(q(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=wp();q(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new nm(hm());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=_m){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Jp(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...hm().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new cm(n)}return a.translator=new tm(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Cm.createInstance,Cm.dir,Cm.init,Cm.loadResources,Cm.reloadResources,Cm.use,Cm.changeLanguage,Cm.getFixedT,Cm.t,Cm.exists,Cm.setDefaultNamespace,Cm.hasLoadedNamespace,Cm.loadNamespaces,Cm.loadLanguages,Cm.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Sp,es:Cp}});var wm={translator:{...Cm,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return Cm.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]};function Tm(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Em(e,t){return!e||Tm(e)?e:Tm(e.default)?e.default:t&&Tm(e[t])?e[t]:t&&Tm(e[t]?.default)?e[t].default:e}var Dm=Em(Bf,`Readable`)||Em(Am.Readable,`Readable`),Om=gp,km=Om.default,Am=km&&typeof km==`object`?km:Om,{translator:jm}=wm,Mm={WebkitTouchCallout:`none`,WebkitUserSelect:`none`,KhtmlUserSelect:`none`,MozUserSelect:`none`,msUserSelect:`none`,userSelect:`none`},Nm=U(`div`)(()=>({width:`100%`,cursor:`pointer`})),Pm=U(`div`)(()=>({margin:`0 auto`,textAlign:`center`,display:`flex`})),Fm=U(`div`)(()=>({width:`fit-content`,minWidth:`140px`,alignSelf:`center`,verticalAlign:`middle`,color:`var(--correct-answer-toggle-label-color, ${Pl()})`,fontWeight:`normal`,...Mm})),Im=U(`div`)(()=>({position:`absolute`,width:`25px`,"&.enter":{opacity:`0`},"&.enter-active":{opacity:`1`,transition:`opacity 0.3s ease-in`},"&.exit":{opacity:`1`},"&.exit-active":{opacity:`0`,transition:`opacity 0.3s ease-in`}})),Lm=U(`div`)(()=>({width:`25px`,marginRight:`5px`,display:`flex`,alignItems:`center`})),Rm=class e extends k.Component{static propTypes={onToggle:O.func,toggled:O.bool,show:O.bool,hideMessage:O.string,showMessage:O.string,className:O.string,language:O.string};static defaultProps={showMessage:`Show correct answer`,hideMessage:`Hide correct answer`,show:!1,toggled:!1};constructor(t){super(t),this.state={show:t.show},this.openIconRef=k.createRef(),this.closedIconRef=k.createRef(),e.defaultProps={...e.defaultProps,showMessage:jm.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:jm.t(`common:hideCorrectAnswer`,{lng:t.language})}}onClick(){this.props.onToggle(!this.props.toggled)}onTouch(e){e.preventDefault(),this.props.onToggle(!this.props.toggled)}UNSAFE_componentWillReceiveProps(t){this.setState({show:t.show}),t.language!==this.props?.language&&(e.defaultProps={...e.defaultProps,showMessage:jm.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:jm.t(`common:hideCorrectAnswer`,{lng:t.language})})}render(){let{className:e,toggled:t,hideMessage:n,showMessage:r}=this.props;return(0,A.jsx)(Nm,{className:e,children:(0,A.jsx)(xp,{show:this.state.show,children:(0,A.jsxs)(Pm,{onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this),children:[(0,A.jsxs)(Lm,{children:[(0,A.jsx)(Hs,{nodeRef:this.openIconRef,timeout:400,in:t,exit:!t,classNames:{enter:`enter`,enterActive:`enter-active`,exit:`exit`,exitActive:`exit-active`},children:(0,A.jsx)(Im,{ref:this.openIconRef,children:(0,A.jsx)(Xo,{open:t},`correct-open`)})}),(0,A.jsx)(Hs,{nodeRef:this.closedIconRef,timeout:5e3,in:!t,exit:t,classNames:{enter:`enter`,enterActive:`enter-active`,exit:`exit`,exitActive:`exit-active`},children:(0,A.jsx)(Im,{ref:this.closedIconRef,children:(0,A.jsx)(Xo,{open:t},`correct-closed`)})})]}),(0,A.jsx)(Dm,{false:!0,children:(0,A.jsx)(Fm,{"aria-hidden":!this.state.show,children:t?n:r})})]})})})}},zm=Math.PI/180;function Bm(){return typeof window<`u`&&({}.toString.call(window)===`[object Window]`||{}.toString.call(window)===`[object global]`)}var Vm=typeof global<`u`?global:typeof window<`u`?window:typeof WorkerGlobalScope<`u`?self:{},J={_global:Vm,version:`8.3.0`,isBrowser:Bm(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return J.angleDeg?e*zm:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<`u`&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return J.DD.isDragging},isDragReady(){return!!J.DD.node},document:Vm.document,_injectGlobal(e){Vm.Konva=e}},Hm=e=>{J[e.prototype.getClassName()]=e};J._injectGlobal(J);var Um=class e{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new e(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,i=this.m[1]*t+this.m[3]*n,a=this.m[0]*-n+this.m[2]*t,o=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,i=this.m[2]+this.m[0]*e,a=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],i=this.m[1]*e.m[2]+this.m[3]*e.m[3],a=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,i=this.m[0]*e,a=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}getMatrix(){return this.m}setAbsolutePosition(e,t){var n=this.m[0],r=this.m[1],i=this.m[2],a=this.m[3],o=this.m[4],s=(n*(t-this.m[5])-r*(e-o))/(n*a-r*i),c=(e-o-i*s)/n;return this.translate(c,s)}decompose(){var e=this.m[0],t=this.m[1],n=this.m[2],r=this.m[3],i=this.m[4],a=this.m[5],o=e*r-t*n;let s={x:i,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||t!=0){var c=Math.sqrt(e*e+t*t);s.rotation=t>0?Math.acos(e/c):-Math.acos(e/c),s.scaleX=c,s.scaleY=o/c,s.skewX=(e*n+t*r)/o,s.skewY=0}else if(n!=0||r!=0){var l=Math.sqrt(n*n+r*r);s.rotation=Math.PI/2-(r>0?Math.acos(-n/l):-Math.acos(n/l)),s.scaleX=o/l,s.scaleY=l,s.skewX=0,s.skewY=(e*n+t*r)/o}return s.rotation=Y._getRotation(s.rotation),s}},Wm=`[object Array]`,Gm=`[object Number]`,Km=`[object String]`,qm=`[object Boolean]`,Jm=Math.PI/180,Ym=180/Math.PI,Xm=`#`,Zm=``,Qm=`0`,$m=`Konva warning: `,eh=`Konva error: `,th=`rgb(`,nh={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},rh=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,ih=[],ah=typeof requestAnimationFrame<`u`&&requestAnimationFrame||function(e){setTimeout(e,60)},Y={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===Wm},_isNumber(e){return Object.prototype.toString.call(e)===Gm&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===Km},_isBoolean(e){return Object.prototype.toString.call(e)===qm},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!=`string`)return!1;var t=e[0];return t===`#`||t===`.`||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){ih.push(e),ih.length===1&&ah(function(){let e=ih;ih=[],e.forEach(function(e){e()})})},createCanvasElement(){var e=document.createElement(`canvas`);try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement(`img`)},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=Y.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Xm,Zm);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=Qm+e;return Xm+e},getRGB(e){var t;return e in nh?(t=nh[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Xm?this._hexToRgb(e.substring(1)):e.substr(0,4)===th?(t=rh.exec(e.replace(/ /g,``)),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e||=`black`,Y._namedColorToRBA(e)||Y._hex3ColorToRGBA(e)||Y._hex6ColorToRGBA(e)||Y._rgbColorToRGBA(e)||Y._rgbaColorToRGBA(e)||Y._hslColorToRGBA(e)},_namedColorToRBA(e){var t=nh[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf(`rgb(`)===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf(`rgba(`)===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]===`#`&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]===`#`&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){let[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,a=Number(n[2])/100,o,s,c;if(i===0)return c=a*255,{r:Math.round(c),g:Math.round(c),b:Math.round(c),a:1};o=a<.5?a*(1+i):a+i-a*i;let l=2*a-o,u=[0,0,0];for(let e=0;e<3;e++)s=r+1/3*-(e-1),s<0&&s++,s>1&&s--,c=6*s<1?l+(o-l)*6*s:2*s<1?o:3*s<2?l+(o-l)*(2/3-s)*6:l,u[e]=c*255;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*Jm},radToDeg(e){return e*Ym},_degToRad(e){return Y.warn(`Util._degToRad is removed. Please use public Util.degToRad instead.`),Y.degToRad(e)},_radToDeg(e){return Y.warn(`Util._radToDeg is removed. Please use public Util.radToDeg instead.`),Y.radToDeg(e)},_getRotation(e){return J.angleDeg?Y.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw Error(eh+e)},error(e){console.error(eh+e)},warn(e){J.showWarnings&&console.warn($m+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,a){var o,s,c,l=(e-n)*(e-n)+(t-r)*(t-r);if(l==0)o=e,s=t,c=(i-n)*(i-n)+(a-r)*(a-r);else{var u=((i-e)*(n-e)+(a-t)*(r-t))/l;u<0?(o=e,s=t,c=(e-i)*(e-i)+(t-a)*(t-a)):u>1?(o=n,s=r,c=(n-i)*(n-i)+(r-a)*(r-a)):(o=e+u*(n-e),s=t+u*(r-t),c=(o-i)*(o-i)+(s-a)*(s-a))}return[o,s,c]},_getProjectionToLine(e,t,n){var r=Y.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(a,o){if(!(!n&&o===t.length-1)){var s=t[(o+1)%t.length],c=Y._getProjectionToSegment(a.x,a.y,s.x,s.y,e.x,e.y),l=c[0],u=c[1],d=c[2];d<i&&(r.x=l,r.y=u,i=d)}}),r},_prepareArrayForTween(e,t,n){var r,i=[],a=[];if(e.length>t.length){var o=t;t=e,e=o}for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)a.push({x:t[r],y:t[r+1]});var s=[];return a.forEach(function(e){var t=Y._getProjectionToLine(e,i,n);s.push(t.x),s.push(t.y)}),s},_prepareToStringify(e){var t;for(var n in e.visitedByCircularReferenceRemoval=!0,e)if(e.hasOwnProperty(n)&&e[n]&&typeof e[n]==`object`){if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||Y._isElement(e[n]))if(t.configurable)delete e[n];else return null;else if(Y._prepareToStringify(e[n])===null)if(t.configurable)delete e[n];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999}};function oh(e){return Y._isString(e)?`"`+e+`"`:Object.prototype.toString.call(e)===`[object Number]`||Y._isBoolean(e)?e:Object.prototype.toString.call(e)}function sh(e){return e>255?255:e<0?0:Math.round(e)}function X(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a number.`),e}}function ch(e){if(J.isUnminified)return function(t,n){let r=Y._isNumber(t),i=Y._isArray(t)&&t.length==e;return!r&&!i&&Y.warn(oh(t)+` is a not valid value for "`+n+`" attribute. The value should be a number or Array<number>(`+e+`)`),t}}function lh(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||e===`auto`||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a number or "auto".`),e}}function uh(){if(J.isUnminified)return function(e,t){return Y._isString(e)||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a string.`),e}}function dh(){if(J.isUnminified)return function(e,t){let n=Y._isString(e),r=Object.prototype.toString.call(e)===`[object CanvasGradient]`||e&&e.addColorStop;return n||r||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a string or a native gradient.`),e}}function fh(){if(J.isUnminified)return function(e,t){return Y._isArray(e)?e.forEach(function(e){Y._isNumber(e)||Y.warn(`"`+t+`" attribute has non numeric element `+e+`. Make sure that all elements are numbers.`)}):Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a array of numbers.`),e}}function ph(){if(J.isUnminified)return function(e,t){return e===!0||e===!1||Y.warn(oh(e)+` is a not valid value for "`+t+`" attribute. The value should be a boolean.`),e}}function mh(e){if(J.isUnminified)return function(t,n){return Y.isObject(t)||Y.warn(oh(t)+` is a not valid value for "`+n+`" attribute. The value should be an object with properties `+e),t}}var hh=`get`,gh=`set`,Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=hh+Y._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var e=this.attrs[t];return e===void 0?n:e}},addSetter(e,t,n,r){var i=gh+Y._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=gh+Y._capitalize(t);e.prototype[i]=function(e){return n&&e!=null&&(e=n.call(this,e,t)),this._setAttr(t,e),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var a=n.length,o=Y._capitalize,s=hh+o(t),c=gh+o(t),l,u;e.prototype[s]=function(){var e={};for(l=0;l<a;l++)u=n[l],e[u]=this.getAttr(t+o(u));return e};var d=mh(n);e.prototype[c]=function(e){var n=this.attrs[t],a;for(a in r&&(e=r.call(this,e)),d&&d.call(this,e,t),e)e.hasOwnProperty(a)&&this._setAttr(t+o(a),e[a]);return this._fireChangeEvent(t,n,e),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=Y._capitalize(t),r=gh+n,i=hh+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){Y.error(`Adding deprecated `+t);var i=hh+Y._capitalize(t),a=t+` property is deprecated and will be removed soon. Look at Konva change log for more information.`;e.prototype[i]=function(){Y.error(a);var e=this.attrs[t];return e===void 0?n:e},Z.addSetter(e,t,r,function(){Y.error(a)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){Y.each(t,function(t,n){var r=e.prototype[n],i=hh+Y._capitalize(t),a=gh+Y._capitalize(t);function o(){r.apply(this,arguments),Y.error(`"`+t+`" method is deprecated and will be removed soon. Use ""`+n+`" instead.`)}e.prototype[t]=o,e.prototype[i]=o,e.prototype[a]=o})},afterSetFilter(){this._filterUpToDate=!1}};function _h(e){var t=[],n=e.length,r=Y,i,a;for(i=0;i<n;i++)a=e[i],r._isNumber(a)?a=Math.round(a*1e3)/1e3:r._isString(a)||(a+=``),t.push(a);return t}var vh=`,`,yh=`(`,bh=`)`,xh=`([`,Sh=`])`,Ch=`;`,wh=`()`,Th=`=`,Eh=`arc.arcTo.beginPath.bezierCurveTo.clearRect.clip.closePath.createLinearGradient.createPattern.createRadialGradient.drawImage.ellipse.fill.fillText.getImageData.createImageData.lineTo.moveTo.putImageData.quadraticCurveTo.rect.restore.rotate.save.scale.setLineDash.setTransform.stroke.strokeText.transform.translate`.split(`.`),Dh=[`fillStyle`,`strokeStyle`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`,`lineCap`,`lineDashOffset`,`lineJoin`,`lineWidth`,`miterLimit`,`font`,`textAlign`,`textBaseline`,`globalAlpha`,`globalCompositeOperation`,`imageSmoothingEnabled`],Oh=100,kh=class{constructor(e){this.canvas=e,this._context=e._canvas.getContext(`2d`),J.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){var n=this.traceArr,r=n.length,i=``,a,o,s,c;for(a=0;a<r;a++)o=n[a],s=o.method,s?(c=o.args,i+=s,e?i+=wh:Y._isArray(c[0])?i+=xh+c.join(vh)+Sh:(t&&(c=c.map(e=>typeof e==`number`?Math.floor(e):e)),i+=yh+c.join(vh)+bh)):(i+=o.property,e||(i+=Th+o.val)),i+=Ch;return i}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr,n;t.push(e),n=t.length,n>=Oh&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){var t=e.getLineCap();t&&this.setAttr(`lineCap`,t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();t!==1&&this.setAttr(`globalAlpha`,t)}_applyLineJoin(e){var t=e.attrs.lineJoin;t&&this.setAttr(`lineJoin`,t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,i,a){this._context.arc(e,t,n,r,i,a)}arcTo(e,t,n,r,i){this._context.arcTo(e,t,n,r,i)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,i,a){this._context.bezierCurveTo(e,t,n,r,i,a)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(e,t){var n=arguments;if(n.length===2)return this._context.createImageData(e,t);if(n.length===1)return this._context.createImageData(e)}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,i,a){return this._context.createRadialGradient(e,t,n,r,i,a)}drawImage(e,t,n,r,i,a,o,s,c){var l=arguments,u=this._context;l.length===3?u.drawImage(e,t,n):l.length===5?u.drawImage(e,t,n,r,i):l.length===9&&u.drawImage(e,t,n,r,i,a,o,s,c)}ellipse(e,t,n,r,i,a,o,s){this._context.ellipse(e,t,n,r,i,a,o,s)}isPointInPath(e,t){return this._context.isPointInPath(e,t)}fill(e){e?this._context.fill(e):this._context.fill()}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):`mozDash`in this._context?this._context.mozDash=e:`webkitLineDash`in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,t,n,r,i,a){this._context.setTransform(e,t,n,r,i,a)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,i,a){this._context.transform(e,t,n,r,i,a)}translate(e,t){this._context.translate(e,t)}_enableTrace(){var e=this,t=Eh.length,n=this.setAttr,r,i,a=function(t){var n=e[t],r;e[t]=function(){return i=_h(Array.prototype.slice.call(arguments,0)),r=n.apply(e,arguments),e._trace({method:t,args:i}),r}};for(r=0;r<t;r++)a(Eh[r]);e.setAttr=function(){n.apply(e,arguments);var t=arguments[0],r=arguments[1];(t===`shadowOffsetX`||t===`shadowOffsetY`||t===`shadowBlur`)&&(r/=this.canvas.getPixelRatio()),e._trace({property:t,val:r})}}_applyGlobalCompositeOperation(e){let t=e.attrs.globalCompositeOperation;!t||t===`source-over`||this.setAttr(`globalCompositeOperation`,t)}};Dh.forEach(function(e){Object.defineProperty(kh.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});var Ah=class extends kh{_fillColor(e){var t=e.fill();this.setAttr(`fillStyle`,t),e._fillFunc(this)}_fillPattern(e){this.setAttr(`fillStyle`,e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var t=e._getLinearGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fillRadialGradient(e){var t=e._getRadialGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fill(e){var t=e.fill(),n=e.getFillPriority();if(t&&n===`color`){this._fillColor(e);return}var r=e.getFillPatternImage();if(r&&n===`pattern`){this._fillPattern(e);return}var i=e.getFillLinearGradientColorStops();if(i&&n===`linear-gradient`){this._fillLinearGradient(e);return}var a=e.getFillRadialGradientColorStops();if(a&&n===`radial-gradient`){this._fillRadialGradient(e);return}t?this._fillColor(e):r?this._fillPattern(e):i?this._fillLinearGradient(e):a&&this._fillRadialGradient(e)}_strokeLinearGradient(e){var t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(var a=0;a<r.length;a+=2)i.addColorStop(r[a],r[a+1]);this.setAttr(`strokeStyle`,i)}}_stroke(e){var t=e.dash(),n=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(e),t&&e.dashEnabled()&&(this.setLineDash(t),this.setAttr(`lineDashOffset`,e.dashOffset())),this.setAttr(`lineWidth`,e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr(`shadowColor`,`rgba(0,0,0,0)`),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr(`strokeStyle`,e.stroke()),e._strokeFunc(this),n||this.restore()}}_applyShadow(e){var t=e.getShadowRGBA()??`black`,n=e.getShadowBlur()??5,r=e.getShadowOffset()??{x:0,y:0},i=e.getAbsoluteScale(),a=this.canvas.getPixelRatio(),o=i.x*a,s=i.y*a;this.setAttr(`shadowColor`,t),this.setAttr(`shadowBlur`,n*Math.min(Math.abs(o),Math.abs(s))),this.setAttr(`shadowOffsetX`,r.x*o),this.setAttr(`shadowOffsetY`,r.y*s)}},jh=class extends kh{_fill(e){this.save(),this.setAttr(`fillStyle`,e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){var t=e.getStrokeScaleEnabled();if(!t){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(e);var r=e.hitStrokeWidth(),i=r===`auto`?e.strokeWidth():r;this.setAttr(`lineWidth`,i),this.setAttr(`strokeStyle`,e.colorKey),e._strokeFuncHit(this),t||this.restore()}}},Mh;function Nh(){if(Mh)return Mh;var e=Y.createCanvasElement().getContext(`2d`);return Mh=(function(){return(J._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)})(),Mh}var Ph=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||J.pixelRatio||Nh();this.pixelRatio=t,this._canvas=Y.createCanvasElement(),this._canvas.style.padding=`0`,this._canvas.style.margin=`0`,this._canvas.style.border=`0`,this._canvas.style.background=`transparent`,this._canvas.style.position=`absolute`,this._canvas.style.top=`0`,this._canvas.style.left=`0`}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+`px`;var t=this.pixelRatio;this.getContext()._context.scale(t,t)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+`px`;var t=this.pixelRatio;this.getContext()._context.scale(t,t)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,t){this.setWidth(e||0),this.setHeight(t||0)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch{try{return this._canvas.toDataURL()}catch(e){return Y.error(`Unable to get data URL. `+e.message+` For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.`),``}}}};Z.addGetterSetter(Ph,`pixelRatio`,void 0,X());var Fh=class extends Ph{constructor(e={width:0,height:0}){super(e),this.context=new Ah(this),this.setSize(e.width,e.height)}},Ih=class extends Ph{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new jh(this),this.setSize(e.width,e.height)}},Lh={get isDragging(){var e=!1;return Lh._dragElements.forEach(t=>{t.dragStatus===`dragging`&&(e=!0)}),e},justDragged:!1,get node(){var e;return Lh._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){let t=[];Lh._dragElements.forEach((n,r)=>{let{node:i}=n,a=i.getStage();a.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=Y._getFirstPointerId(e));let o=a._changedPointerPositions.find(e=>e.id===n.pointerId);if(o){if(n.dragStatus!==`dragging`){var s=i.dragDistance();if(Math.max(Math.abs(o.x-n.startPointerPos.x),Math.abs(o.y-n.startPointerPos.y))<s||(i.startDrag({evt:e}),!i.isDragging()))return}i._setDragPosition(e,n),t.push(i)}}),t.forEach(t=>{t.fire(`dragmove`,{type:`dragmove`,target:t,evt:e},!0)})},_endDragBefore(e){Lh._dragElements.forEach(t=>{let{node:n}=t,r=n.getStage();if(e&&r.setPointersPositions(e),!r._changedPointerPositions.find(e=>e.id===t.pointerId))return;(t.dragStatus===`dragging`||t.dragStatus===`stopped`)&&(Lh.justDragged=!0,J._mouseListenClick=!1,J._touchListenClick=!1,J._pointerListenClick=!1,t.dragStatus=`stopped`);let i=t.node.getLayer()||t.node instanceof J.Stage&&t.node;i&&i.batchDraw()})},_endDragAfter(e){Lh._dragElements.forEach((t,n)=>{t.dragStatus===`stopped`&&t.node.fire(`dragend`,{type:`dragend`,target:t.node,evt:e},!0),t.dragStatus!==`dragging`&&Lh._dragElements.delete(n)})}};J.isBrowser&&(window.addEventListener(`mouseup`,Lh._endDragBefore,!0),window.addEventListener(`touchend`,Lh._endDragBefore,!0),window.addEventListener(`mousemove`,Lh._drag),window.addEventListener(`touchmove`,Lh._drag),window.addEventListener(`mouseup`,Lh._endDragAfter,!1),window.addEventListener(`touchend`,Lh._endDragAfter,!1));var Rh=`absoluteOpacity`,zh=`allEventListeners`,Bh=`absoluteTransform`,Vh=`absoluteScale`,Hh=`canvas`,Uh=`Change`,Wh=`children`,Gh=`konva`,Kh=`listening`,qh=`mouseenter`,Jh=`mouseleave`,Yh=`set`,Xh=`Shape`,Zh=` `,Qh=`stage`,$h=`transform`,eg=`Stage`,tg=`visible`,ng=[`xChange.konva`,`yChange.konva`,`scaleXChange.konva`,`scaleYChange.konva`,`skewXChange.konva`,`skewYChange.konva`,`rotationChange.konva`,`offsetXChange.konva`,`offsetYChange.konva`,`transformsEnabledChange.konva`].join(Zh),rg=1,Q=class e{constructor(e){this._id=rg++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===$h||e===Bh)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,t){var n=this._cache.get(e);return(n===void 0||(e===$h||e===Bh)&&n.dirty===!0)&&(n=t.call(this),this._cache.set(e,n)),n}_calculate(e,t,n){if(!this._attachedDepsListeners.get(e)){let n=t.map(e=>e+`Change.konva`).join(Zh);this.on(n,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(Hh)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===Bh&&this.fire(`absoluteTransformChange`)}clearCache(){return this._cache.delete(Hh),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var t=e||{},n={};(t.x===void 0||t.y===void 0||t.width===void 0||t.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var r=Math.ceil(t.width||n.width),i=Math.ceil(t.height||n.height),a=t.pixelRatio,o=t.x===void 0?n.x:t.x,s=t.y===void 0?n.y:t.y,c=t.offset||0,l=t.drawBorder||!1,u=t.hitCanvasPixelRatio||1;if(!r||!i){Y.error(`Can not cache the node. Width or height of the node equals 0. Caching is skipped.`);return}r+=c*2,i+=c*2,o-=c,s-=c;var d=new Fh({pixelRatio:a,width:r,height:i}),f=new Fh({pixelRatio:a,width:0,height:0}),p=new Ih({pixelRatio:u,width:r,height:i}),m=d.getContext(),h=p.getContext();return p.isCache=!0,d.isCache=!0,this._cache.delete(Hh),this._filterUpToDate=!1,t.imageSmoothingEnabled===!1&&(d.getContext()._context.imageSmoothingEnabled=!1,f.getContext()._context.imageSmoothingEnabled=!1),m.save(),h.save(),m.translate(-o,-s),h.translate(-o,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Rh),this._clearSelfAndDescendantCache(Vh),this.drawScene(d,this),this.drawHit(p,this),this._isUnderCache=!1,m.restore(),h.restore(),l&&(m.save(),m.beginPath(),m.rect(0,0,r,i),m.closePath(),m.setAttr(`strokeStyle`,`red`),m.setAttr(`lineWidth`,5),m.stroke(),m.restore()),this._cache.set(Hh,{scene:d,filter:f,hit:p,x:o,y:s}),this._requestDraw(),this}isCached(){return this._cache.has(Hh)}getClientRect(e){throw Error(`abstract "getClientRect" method call`)}_transformedRect(e,t){var n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],r,i,a,o,s=this.getAbsoluteTransform(t);return n.forEach(function(e){var t=s.point(e);r===void 0&&(r=a=t.x,i=o=t.y),r=Math.min(r,t.x),i=Math.min(i,t.y),a=Math.max(a,t.x),o=Math.max(o,t.y)}),{x:r,y:i,width:a-r,height:o-i}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);let t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e=this.filters(),t=this._getCanvasCache(),n=t.scene,r=t.filter,i=r.getContext(),a,o,s,c;if(e){if(!this._filterUpToDate){var l=n.pixelRatio;r.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio);try{for(a=e.length,i.clear(),i.drawImage(n._canvas,0,0,n.getWidth()/l,n.getHeight()/l),o=i.getImageData(0,0,r.getWidth(),r.getHeight()),s=0;s<a;s++){if(c=e[s],typeof c!=`function`){Y.error(`Filter should be type of function, but got `+typeof c+` instead. Please check correct filters`);continue}c.call(this,o),i.putImageData(o,0,0)}}catch(e){Y.error(`Unable to apply filter. `+e.message+` This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.`)}this._filterUpToDate=!0}return r}return n}on(e,t){if(this._cache&&this._cache.delete(zh),arguments.length===3)return this._delegate.apply(this,arguments);var n=e.split(Zh),r=n.length,i,a,o,s,c;for(i=0;i<r;i++)a=n[i],o=a.split(`.`),s=o[0],c=o[1]||``,this.eventListeners[s]||(this.eventListeners[s]=[]),this.eventListeners[s].push({name:c,handler:t});return this}off(e,t){var n=(e||``).split(Zh),r=n.length,i,a,o,s,c,l;if(this._cache&&this._cache.delete(zh),!e)for(a in this.eventListeners)this._off(a);for(i=0;i<r;i++)if(o=n[i],s=o.split(`.`),c=s[0],l=s[1],c)this.eventListeners[c]&&this._off(c,l,t);else for(a in this.eventListeners)this._off(a,l,t);return this}dispatchEvent(e){var t={target:this,type:e.type,evt:e};return this.fire(e.type,t),this}addEventListener(e,t){return this.on(e,function(e){t.call(this,e.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,t,n){var r=this;this.on(e,function(e){for(var i=e.target.findAncestors(t,!0,r),a=0;a<i.length;a++)e=Y.cloneObject(e),e.currentTarget=i[a],n.call(i[a],e)})}remove(){return this.isDragging()&&this.stopDrag(),Lh._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Bh),this._clearSelfAndDescendantCache(Rh),this._clearSelfAndDescendantCache(Vh),this._clearSelfAndDescendantCache(Qh),this._clearSelfAndDescendantCache(tg),this._clearSelfAndDescendantCache(Kh)}_remove(){this._clearCaches();var e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(e){var t=`get`+Y._capitalize(e);return Y._isFunction(this[t])?this[t]():this.attrs[e]}getAncestors(){for(var e=this.getParent(),t=[];e;)t.push(e),e=e.getParent();return t}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{var t,n;if(!e)return this;for(t in e)t!==Wh&&(n=Yh+Y._capitalize(t),Y._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))}),this}isListening(){return this._getCache(Kh,this._isListening)}_isListening(e){if(!this.listening())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isListening(e):!0}isVisible(){return this._getCache(tg,this._isVisible)}_isVisible(e){if(!this.visible())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isVisible(e):!0}shouldDrawHit(e,t=!1){if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;Lh._dragElements.forEach(e=>{e.dragStatus===`dragging`&&(e.node.nodeType===`Stage`||e.node.getLayer()===n)&&(r=!0)});var i=!t&&!J.hitOnDragEnabled&&r;return this.isListening()&&this.isVisible()&&!i}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e=this.getDepth(),t=this,n=0,r,i,a,o;function s(c){for(r=[],i=c.length,a=0;a<i;a++)o=c[a],n++,o.nodeType!==Xh&&(r=r.concat(o.getChildren().slice())),o._id===t._id&&(a=i);r.length>0&&r[0].getDepth()<=e&&s(r)}return t.nodeType!==eg&&s(t.getStage().getChildren()),n}getDepth(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache($h),this._clearSelfAndDescendantCache(Bh)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var t=this.getAbsoluteTransform().copy();return t.invert(),t.point(e)}getAbsolutePosition(e){let t=!1,n=this.parent;for(;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var r=this.getAbsoluteTransform(e).getMatrix(),i=new Um,a=this.offset();return i.m=r.slice(),i.translate(a.x,a.y),i.getTranslation()}setAbsolutePosition(e){var t=this._clearTransform();this.attrs.x=t.x,this.attrs.y=t.y,delete t.x,delete t.y,this._clearCache($h);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(e.x,e.y),e={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(t),this.setPosition({x:e.x,y:e.y}),this._clearCache($h),this._clearSelfAndDescendantCache(Bh),this}_setTransform(e){for(var t in e)this.attrs[t]=e[t]}_clearTransform(){var e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){var t=e.x,n=e.y,r=this.x(),i=this.y();return t!==void 0&&(r+=t),n!==void 0&&(i+=n),this.setPosition({x:r,y:i}),this}_eachAncestorReverse(e,t){var n=[],r=this.getParent(),i,a;if(!(t&&t._id===this._id)){for(n.unshift(this);r&&(!t||r._id!==t._id);)n.unshift(r),r=r.parent;for(i=n.length,a=0;a<i;a++)e(n[a])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return Y.warn(`Node has no parent. moveToTop function is ignored.`),!1;var e=this.index;return this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0}moveUp(){if(!this.parent)return Y.warn(`Node has no parent. moveUp function is ignored.`),!1;var e=this.index;return e<this.parent.getChildren().length-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return Y.warn(`Node has no parent. moveDown function is ignored.`),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return Y.warn(`Node has no parent. moveToBottom function is ignored.`),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return Y.warn(`Node has no parent. zIndex parameter is ignored.`),this;(e<0||e>=this.parent.children.length)&&Y.warn(`Unexpected value `+e+` for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to `+(this.parent.children.length-1)+`.`);var t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Rh,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e={},t=this.getAttrs(),n,r,i,a,o;for(n in e.attrs={},t)r=t[n],o=Y.isObject(r)&&!Y._isPlainObject(r)&&!Y._isArray(r),!o&&(i=typeof this[n]==`function`&&this[n],delete t[n],a=i?i.call(this):null,t[n]=r,a!==r&&(e.attrs[n]=r));return e.className=this.getClassName(),Y._prepareToStringify(e)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var i=this.parent;i;){if(i===n)return r;i._isMatch(e)&&r.push(i),i=i.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if(typeof e==`function`)return e(this);var t=e.replace(/ /g,``).split(`,`),n=t.length,r,i;for(r=0;r<n;r++)if(i=t[r],Y.isValidSelector(i)||(Y.warn(`Selector "`+i+`" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".`),Y.warn(`If you have a custom shape with such className, please change it to start with upper letter like "Triangle".`),Y.warn(`Konva is awesome, right?`)),i.charAt(0)===`#`){if(this.id()===i.slice(1))return!0}else if(i.charAt(0)===`.`){if(this.hasName(i.slice(1)))return!0}else if(this.className===i||this.nodeType===i)return!0;return!1}getLayer(){var e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(Qh,this._getStage)}_getStage(){var e=this.getParent();if(e)return e.getStage()}fire(e,t={},n){return t.target=t.target||this,n?this._fireAndBubble(e,t):this._fire(e,t),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(Bh,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var t;if(e)return t=new Um,this._eachAncestorReverse(function(e){var n=e.transformsEnabled();n===`all`?t.multiply(e.getTransform()):n===`position`&&t.translate(e.x()-e.offsetX(),e.y()-e.offsetY())},e),t;t=this._cache.get(Bh)||new Um,this.parent?this.parent.getAbsoluteTransform().copyInto(t):t.reset();var n=this.transformsEnabled();if(n===`all`)t.multiply(this.getTransform());else if(n===`position`){let e=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,i=this.attrs.offsetY||0;t.translate(e-r,n-i)}return t.dirty=!1,t}getAbsoluteScale(e){for(var t=this;t;)t._isUnderCache&&(e=t),t=t.getParent();let n=this.getAbsoluteTransform(e).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache($h,this._getTransform)}_getTransform(){var e=this._cache.get($h)||new Um;e.reset();var t=this.x(),n=this.y(),r=J.getAngle(this.rotation()),i=this.attrs.scaleX??1,a=this.attrs.scaleY??1,o=this.attrs.skewX||0,s=this.attrs.skewY||0,c=this.attrs.offsetX||0,l=this.attrs.offsetY||0;return(t!==0||n!==0)&&e.translate(t,n),r!==0&&e.rotate(r),(o!==0||s!==0)&&e.skew(o,s),(i!==1||a!==1)&&e.scale(i,a),(c!==0||l!==0)&&e.translate(-1*c,-1*l),e.dirty=!1,e}clone(e){var t=Y.cloneObject(this.attrs),n,r,i,a,o;for(n in e)t[n]=e[n];var s=new this.constructor(t);for(n in this.eventListeners)for(r=this.eventListeners[n],i=r.length,a=0;a<i;a++)o=r[a],o.name.indexOf(Gh)<0&&(s.eventListeners[n]||(s.eventListeners[n]=[]),s.eventListeners[n].push(o));return s}_toKonvaCanvas(e){e||={};var t=this.getClientRect(),n=this.getStage(),r=e.x===void 0?t.x:e.x,i=e.y===void 0?t.y:e.y,a=e.pixelRatio||1,o=new Fh({width:e.width||t.width||(n?n.width():0),height:e.height||t.height||(n?n.height():0),pixelRatio:a}),s=o.getContext();return s.save(),(r||i)&&s.translate(-1*r,-1*i),this.drawScene(o),s.restore(),o}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e||={};var t=e.mimeType||null,n=e.quality||null,r=this._toKonvaCanvas(e).toDataURL(t,n);return e.callback&&e.callback(r),r}toImage(e){if(!e||!e.callback)throw`callback required for toImage method config argument`;var t=e.callback;delete e.callback,Y._urlToImage(this.toDataURL(e),function(e){t(e)})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance===void 0?this.parent?this.parent.getDragDistance():J.dragDistance:this.attrs.dragDistance}_off(e,t,n){var r=this.eventListeners[e],i,a,o;for(i=0;i<r.length;i++)if(a=r[i].name,o=r[i].handler,(a!==`konva`||t===`konva`)&&(!t||a===t)&&(!n||n===o)){if(r.splice(i,1),r.length===0){delete this.eventListeners[e];break}i--}}_fireChangeEvent(e,t,n){this._fire(e+Uh,{oldVal:t,newVal:n})}addName(e){if(!this.hasName(e)){var t=this.name(),n=t?t+` `+e:e;this.name(n)}return this}hasName(e){if(!e)return!1;let t=this.name();return t?(t||``).split(/\s/g).indexOf(e)!==-1:!1}removeName(e){var t=(this.name()||``).split(/\s/g),n=t.indexOf(e);return n!==-1&&(t.splice(n,1),this.name(t.join(` `))),this}setAttr(e,t){var n=this[Yh+Y._capitalize(e)];return Y._isFunction(n)?n.call(this,t):this._setAttr(e,t),this}_requestDraw(){J.autoDrawEnabled&&(this.getLayer()||this.getStage())?.batchDraw()}_setAttr(e,t){var n=this.attrs[e];n===t&&!Y.isObject(t)||(t==null?delete this.attrs[e]:this.attrs[e]=t,this._shouldFireChangeEvents&&this._fireChangeEvent(e,n,t),this._requestDraw())}_setComponentAttr(e,t,n){var r;n!==void 0&&(r=this.attrs[e],r||(this.attrs[e]=this.getAttr(e)),this.attrs[e][t]=n,this._fireChangeEvent(e,r,n))}_fireAndBubble(e,t,n){if(t&&this.nodeType===Xh&&(t.target=this),!((e===qh||e===Jh)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType===`Stage`&&!n))){this._fire(e,t);var r=(e===qh||e===Jh)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(t&&!t.cancelBubble||!t)&&this.parent&&this.parent.isListening()&&!r&&(n&&n.parent?this._fireAndBubble.call(this.parent,e,t,n):this._fireAndBubble.call(this.parent,e,t))}}_getProtoListeners(e){let t=this._cache.get(zh);if(!t){t={};let e=Object.getPrototypeOf(this);for(;e;){if(!e.eventListeners){e=Object.getPrototypeOf(e);continue}for(var n in e.eventListeners){let r=e.eventListeners[n],i=t[n]||[];t[n]=r.concat(i)}e=Object.getPrototypeOf(e)}this._cache.set(zh,t)}return t[e]}_fire(e,t){t||={},t.currentTarget=this,t.type=e;let n=this._getProtoListeners(e);if(n)for(var r=0;r<n.length;r++)n[r].handler.call(this,t);let i=this.eventListeners[e];if(i)for(var r=0;r<i.length;r++)i[r].handler.call(this,t)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){var t=e?e.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition(),i=n._getPointerById(t)||n._changedPointerPositions[0]||r;Lh._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-r.x,y:i.y-r.y},dragStatus:`ready`,pointerId:t})}startDrag(e,t=!0){Lh._dragElements.has(this._id)||this._createDragElement(e);let n=Lh._dragElements.get(this._id);n.dragStatus=`dragging`,this.fire(`dragstart`,{type:`dragstart`,target:this,evt:e&&e.evt},t)}_setDragPosition(e,t){let n=this.getStage()._getPointerById(t.pointerId);if(n){var r={x:n.x-t.offset.x,y:n.y-t.offset.y},i=this.dragBoundFunc();if(i!==void 0){let t=i.call(this,r,e);t?r=t:Y.warn(`dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.`)}(!this._lastPos||this._lastPos.x!==r.x||this._lastPos.y!==r.y)&&(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}stopDrag(e){let t=Lh._dragElements.get(this._id);t&&(t.dragStatus=`stopped`),Lh._endDragBefore(e),Lh._endDragAfter(e)}setDraggable(e){this._setAttr(`draggable`,e),this._dragChange()}isDragging(){let e=Lh._dragElements.get(this._id);return e?e.dragStatus===`dragging`:!1}_listenDrag(){this._dragCleanup(),this.on(`mousedown.konva touchstart.konva`,function(e){if((e.evt.button===void 0||J.dragButtons.indexOf(e.evt.button)>=0)&&!this.isDragging()){var t=!1;Lh._dragElements.forEach(e=>{this.isAncestorOf(e.node)&&(t=!0)}),t||this._createDragElement(e)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;let e=Lh._dragElements.get(this._id),t=e&&e.dragStatus===`dragging`,n=e&&e.dragStatus===`ready`;t?this.stopDrag():n&&Lh._dragElements.delete(this._id)}}_dragCleanup(){this.off(`mousedown.konva`),this.off(`touchstart.konva`)}isClientRectOnScreen(e={x:0,y:0}){let t=this.getStage();if(!t)return!1;let n={x:-e.x,y:-e.y,width:t.width()+e.x,height:t.height()+e.y};return Y.haveIntersection(n,this.getClientRect())}static create(e,t){return Y._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(t,n){var r=e.prototype.getClassName.call(t),i=t.children,a,o,s;n&&(t.attrs.container=n),J[r]||(Y.warn(`Can not find a node with class name "`+r+`". Fallback to "Shape".`),r=`Shape`);let c=J[r];if(a=new c(t.attrs),i)for(o=i.length,s=0;s<o;s++)a.add(e._createNode(i[s]));return a}};Q.prototype.nodeType=`Node`,Q.prototype._attrsAffectingSize=[],Q.prototype.eventListeners={},Q.prototype.on.call(Q.prototype,ng,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache($h),this._clearSelfAndDescendantCache(Bh)}),Q.prototype.on.call(Q.prototype,`visibleChange.konva`,function(){this._clearSelfAndDescendantCache(tg)}),Q.prototype.on.call(Q.prototype,`listeningChange.konva`,function(){this._clearSelfAndDescendantCache(Kh)}),Q.prototype.on.call(Q.prototype,`opacityChange.konva`,function(){this._clearSelfAndDescendantCache(Rh)});var ig=Z.addGetterSetter;ig(Q,`zIndex`),ig(Q,`absolutePosition`),ig(Q,`position`),ig(Q,`x`,0,X()),ig(Q,`y`,0,X()),ig(Q,`globalCompositeOperation`,`source-over`,uh()),ig(Q,`opacity`,1,X()),ig(Q,`name`,``,uh()),ig(Q,`id`,``,uh()),ig(Q,`rotation`,0,X()),Z.addComponentsGetterSetter(Q,`scale`,[`x`,`y`]),ig(Q,`scaleX`,1,X()),ig(Q,`scaleY`,1,X()),Z.addComponentsGetterSetter(Q,`skew`,[`x`,`y`]),ig(Q,`skewX`,0,X()),ig(Q,`skewY`,0,X()),Z.addComponentsGetterSetter(Q,`offset`,[`x`,`y`]),ig(Q,`offsetX`,0,X()),ig(Q,`offsetY`,0,X()),ig(Q,`dragDistance`,null,X()),ig(Q,`width`,0,X()),ig(Q,`height`,0,X()),ig(Q,`listening`,!0,ph()),ig(Q,`preventDefault`,!0,ph()),ig(Q,`filters`,null,function(e){return this._filterUpToDate=!1,e}),ig(Q,`visible`,!0,ph()),ig(Q,`transformsEnabled`,`all`,uh()),ig(Q,`size`),ig(Q,`dragBoundFunc`),ig(Q,`draggable`,!1,ph()),Z.backCompat(Q,{rotateDeg:`rotate`,setRotationDeg:`setRotation`,getRotationDeg:`getRotation`});var ag=class extends Q{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];let t=this.children||[];var n=[];return t.forEach(function(t){e(t)&&n.push(t)}),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}var n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire(`add`,{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants(r=>{let i=r._isMatch(e);return i&&n.push(r),!!(i&&t)}),n}_descendants(e){let t=!1,n=this.getChildren();for(let r of n)if(t=e(r),t||r.hasChildren()&&(t=r._descendants(e),t))return!0;return!1}toObject(){var e=Q.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(t=>{e.children.push(t.toObject())}),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=Q.prototype.clone.call(this,e);return this.getChildren().forEach(function(e){t.add(e.clone())}),t}getAllIntersections(e){var t=[];return this.find(`Shape`).forEach(function(n){n.isVisible()&&n.intersects(e)&&t.push(n)}),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),!this.isCached()&&((t=this.children)==null||t.forEach(function(t){t._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)==null||e.forEach(function(e,t){e.index=t}),this._requestDraw()}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas(),i=r&&r.getContext(),a=this._getCanvasCache(),o=a&&a.scene,s=r&&r.isCache;if(!this.isVisible()&&!s)return this;if(o){i.save();var c=this.getAbsoluteTransform(t).getMatrix();i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren(`drawScene`,r,t);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,i=r&&r.getContext(),a=this._getCanvasCache();if(a&&a.hit){i.save();var o=this.getAbsoluteTransform(t).getMatrix();i.transform(o[0],o[1],o[2],o[3],o[4],o[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren(`drawHit`,r,t);return this}_drawChildren(e,t,n){var r,i=t&&t.getContext(),a=this.clipWidth(),o=this.clipHeight(),s=this.clipFunc(),c=a&&o||s;let l=n===this;if(c){i.save();var u=this.getAbsoluteTransform(n),d=u.getMatrix();if(i.transform(d[0],d[1],d[2],d[3],d[4],d[5]),i.beginPath(),s)s.call(this,i,this);else{var f=this.clipX(),p=this.clipY();i.rect(f,p,a,o)}i.clip(),d=u.copy().invert().getMatrix(),i.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var m=!l&&this.globalCompositeOperation()!==`source-over`&&e===`drawScene`;m&&(i.save(),i._applyGlobalCompositeOperation(this)),(r=this.children)==null||r.forEach(function(r){r[e](t,n)}),m&&i.restore(),c&&i.restore()}getClientRect(e){var t;e||={};var n=e.skipTransform,r=e.relativeTo,i,a,o,s,c={x:1/0,y:1/0,width:0,height:0},l=this;(t=this.children)==null||t.forEach(function(t){if(t.visible()){var n=t.getClientRect({relativeTo:l,skipShadow:e.skipShadow,skipStroke:e.skipStroke});n.width===0&&n.height===0||(i===void 0?(i=n.x,a=n.y,o=n.x+n.width,s=n.y+n.height):(i=Math.min(i,n.x),a=Math.min(a,n.y),o=Math.max(o,n.x+n.width),s=Math.max(s,n.y+n.height)))}});for(var u=this.find(`Shape`),d=!1,f=0;f<u.length;f++)if(u[f]._isVisible(this)){d=!0;break}return c=d&&i!==void 0?{x:i,y:a,width:o-i,height:s-a}:{x:0,y:0,width:0,height:0},n?c:this._transformedRect(c,r)}};Z.addComponentsGetterSetter(ag,`clip`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(ag,`clipX`,void 0,X()),Z.addGetterSetter(ag,`clipY`,void 0,X()),Z.addGetterSetter(ag,`clipWidth`,void 0,X()),Z.addGetterSetter(ag,`clipHeight`,void 0,X()),Z.addGetterSetter(ag,`clipFunc`);var og=new Map,sg=J._global.PointerEvent!==void 0;function cg(e){return og.get(e)}function lg(e){return{evt:e,pointerId:e.pointerId}}function ug(e,t){return og.get(e)===t}function dg(e,t){fg(e),t.getStage()&&(og.set(e,t),sg&&t._fire(`gotpointercapture`,lg(new PointerEvent(`gotpointercapture`))))}function fg(e,t){let n=og.get(e);if(!n)return;let r=n.getStage();r&&r.content,og.delete(e),sg&&n._fire(`lostpointercapture`,lg(new PointerEvent(`lostpointercapture`)))}var pg=`Stage`,mg=`string`,hg=`px`,gg=`mouseout`,_g=`mouseleave`,vg=`mouseover`,yg=`mouseenter`,bg=`mousemove`,xg=`mousedown`,Sg=`mouseup`,Cg=`pointermove`,wg=`pointerdown`,Tg=`pointerup`,Eg=`pointercancel`,Dg=`lostpointercapture`,Og=`pointerout`,kg=`pointerleave`,Ag=`pointerover`,jg=`pointerenter`,Mg=`contextmenu`,Ng=`touchstart`,Pg=`touchend`,Fg=`touchmove`,Ig=`touchcancel`,Lg=`wheel`,Rg=5,zg=[[yg,`_pointerenter`],[xg,`_pointerdown`],[bg,`_pointermove`],[Sg,`_pointerup`],[_g,`_pointerleave`],[Ng,`_pointerdown`],[Fg,`_pointermove`],[Pg,`_pointerup`],[Ig,`_pointercancel`],[vg,`_pointerover`],[Lg,`_wheel`],[Mg,`_contextmenu`],[wg,`_pointerdown`],[Cg,`_pointermove`],[Tg,`_pointerup`],[Eg,`_pointercancel`],[Dg,`_lostpointercapture`]],Bg={mouse:{[Og]:gg,[kg]:_g,[Ag]:vg,[jg]:yg,[Cg]:bg,[wg]:xg,[Tg]:Sg,[Eg]:`mousecancel`,pointerclick:`click`,pointerdblclick:`dblclick`},touch:{[Og]:`touchout`,[kg]:`touchleave`,[Ag]:`touchover`,[jg]:`touchenter`,[Cg]:Fg,[wg]:Ng,[Tg]:Pg,[Eg]:Ig,pointerclick:`tap`,pointerdblclick:`dbltap`},pointer:{[Og]:Og,[kg]:kg,[Ag]:Ag,[jg]:jg,[Cg]:Cg,[wg]:wg,[Tg]:Tg,[Eg]:Eg,pointerclick:`pointerclick`,pointerdblclick:`pointerdblclick`}},Vg=e=>e.indexOf(`pointer`)>=0?`pointer`:e.indexOf(`touch`)>=0?`touch`:`mouse`,Hg=e=>{let t=Vg(e);if(t===`pointer`)return J.pointerEventsEnabled&&Bg.pointer;if(t===`touch`)return Bg.touch;if(t===`mouse`)return Bg.mouse};function Ug(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&Y.warn(`Stage does not support clipping. Please use clip for Layers or Groups.`),e}var Wg=`Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);`,Gg=[],Kg=class extends ag{constructor(e){super(Ug(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Gg.push(this),this.on(`widthChange.konva heightChange.konva`,this._resizeDOM),this.on(`visibleChange.konva`,this._checkVisibility),this.on(`clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva`,()=>{Ug(this.attrs)}),this._checkVisibility()}_validateAdd(e){let t=e.getType()===`Layer`,n=e.getType()===`FastLayer`;t||n||Y.throw(`You may only add layers to the stage.`)}_checkVisibility(){if(!this.content)return;let e=this.visible()?``:`none`;this.content.style.display=e}setContainer(e){if(typeof e===mg){if(e.charAt(0)===`.`){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n=e.charAt(0)===`#`?e.slice(1):e;e=document.getElementById(n)}if(!e)throw`Can not find container in document with id `+n}return this._setAttr(`container`,e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e=this.children,t=e.length,n;for(n=0;n<t;n++)e[n].clear();return this}clone(e){return e||={},e.container=typeof document<`u`&&document.createElement(`div`),ag.prototype.clone.call(this,e)}destroy(){super.destroy();var e=this.content;e&&Y._isInDocument(e)&&this.container().removeChild(e);var t=Gg.indexOf(this);return t>-1&&Gg.splice(t,1),this}getPointerPosition(){let e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(Y.warn(Wg),null)}_getPointerById(e){return this._pointerPositions.find(t=>t.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e||={},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new Fh({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach(function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}}),t}getIntersection(e){if(!e)return null;var t=this.children,n=t.length-1,r;for(r=n;r>=0;r--){let n=t[r].getIntersection(e);if(n)return n}return null}_resizeDOM(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+hg,this.content.style.height=t+hg),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach(n=>{n.setSize({width:e,height:t}),n.draw()})}add(e,...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}super.add(e);var r=this.children.length;return r>Rg&&Y.warn(`The stage has `+r+` layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.`),e.setSize({width:this.width(),height:this.height()}),e.draw(),J.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return ug(e,this)}setPointerCapture(e){dg(e,this)}releaseCapture(e){fg(e,this)}getLayers(){return this.children}_bindContentEvents(){J.isBrowser&&zg.forEach(([e,t])=>{this.content.addEventListener(e,e=>{this[t](e)})})}_pointerenter(e){this.setPointersPositions(e);let t=Hg(e.type);this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);let t=Hg(e.type);this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+`targetShape`];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){let t=Hg(e.type),n=Vg(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),i=!Lh.isDragging||J.hitOnDragEnabled;r&&i?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+`targetShape`]=null):i&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(e){let t=Hg(e.type),n=Vg(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach(i=>{var a=this.getIntersection(i);if(Lh.justDragged=!1,J[`_`+n+`ListenClick`]=!0,!(a&&a.isListening()))return;J.capturePointerEventsEnabled&&a.setPointerCapture(i.id),this[n+`ClickStartShape`]=a,a._fireAndBubble(t.pointerdown,{evt:e,pointerId:i.id}),r=!0;let o=e.type.indexOf(`touch`)>=0;a.preventDefault()&&e.cancelable&&o&&e.preventDefault()}),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){let t=Hg(e.type),n=Vg(e.type);if(!t||(Lh.isDragging&&Lh.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!Lh.isDragging||J.hitOnDragEnabled)))return;var r={};let i=!1;var a=this._getTargetShape(n);this._changedPointerPositions.forEach(o=>{let s=cg(o.id)||this.getIntersection(o),c=o.id,l={evt:e,pointerId:c};var u=a!==s;if(u&&a&&(a._fireAndBubble(t.pointerout,Object.assign({},l),s),a._fireAndBubble(t.pointerleave,Object.assign({},l),s)),s){if(r[s._id])return;r[s._id]=!0}s&&s.isListening()?(i=!0,u&&(s._fireAndBubble(t.pointerover,Object.assign({},l),a),s._fireAndBubble(t.pointerenter,Object.assign({},l),a),this[n+`targetShape`]=s),s._fireAndBubble(t.pointermove,Object.assign({},l))):a&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:c}),this[n+`targetShape`]=null)}),i||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){let t=Hg(e.type),n=Vg(e.type);if(!t)return;this.setPointersPositions(e);let r=this[n+`ClickStartShape`],i=this[n+`ClickEndShape`];var a={};let o=!1;this._changedPointerPositions.forEach(s=>{let c=cg(s.id)||this.getIntersection(s);if(c){if(c.releaseCapture(s.id),a[c._id])return;a[c._id]=!0}let l=s.id,u={evt:e,pointerId:l},d=!1;J[`_`+n+`InDblClickWindow`]&&J[`_`+n+`InDblClickWindowId`]===l?(d=!0,clearTimeout(this[n+`DblTimeout`])):Lh.justDragged||(J[`_`+n+`InDblClickWindow`]=!0,J[`_`+n+`InDblClickWindowId`]=l,clearTimeout(this[n+`DblTimeout`])),this[n+`DblTimeout`]=setTimeout(function(){J[`_`+n+`InDblClickWindow`]=!1},J.dblClickWindow),c&&c.isListening()?(o=!0,this[n+`ClickEndShape`]=c,c._fireAndBubble(t.pointerup,Object.assign({},u)),J[`_`+n+`ListenClick`]&&r&&r===c&&(c._fireAndBubble(t.pointerclick,Object.assign({},u)),d&&i&&i===c&&c._fireAndBubble(t.pointerdblclick,Object.assign({},u)))):(this[n+`ClickEndShape`]=null,J[`_`+n+`ListenClick`]&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:l}),d&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:l}))}),o||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),J[`_`+n+`ListenClick`]=!1,e.cancelable&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(Mg,{evt:e}):this._fire(Mg,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(Lg,{evt:e}):this._fire(Lg,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);let t=cg(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(Tg,lg(e)),fg(e.pointerId)}_lostpointercapture(e){fg(e.pointerId)}setPointersPositions(e){var t=this._getContentPosition(),n=null,r=null;e||=window.event,e.touches===void 0?(n=(e.clientX-t.left)/t.scaleX,r=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}]):(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))}_setPointerPosition(e){Y.warn(`Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.`),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Fh({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Ih({pixelRatio:1,width:this.width(),height:this.height()}),J.isBrowser){var e=this.container();if(!e)throw`Stage has no container. A container is required.`;e.innerHTML=``,this.content=document.createElement(`div`),this.content.style.position=`relative`,this.content.style.userSelect=`none`,this.content.className=`konvajs-content`,this.content.setAttribute(`role`,`presentation`),e.appendChild(this.content),this._resizeDOM()}}cache(){return Y.warn(`Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.`),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(e){e.batchDraw()}),this}};Kg.prototype.nodeType=pg,Hm(Kg),Z.addGetterSetter(Kg,`container`);var qg=`hasShadow`,Jg=`shadowRGBA`,Yg=`patternImage`,Xg=`linearGradient`,Zg=`radialGradient`,Qg;function $g(){return Qg||(Qg=Y.createCanvasElement().getContext(`2d`),Qg)}var e_={};function t_(e){e.fill()}function n_(e){e.stroke()}function r_(e){e.fill()}function i_(e){e.stroke()}function a_(){this._clearCache(qg)}function o_(){this._clearCache(Jg)}function s_(){this._clearCache(Yg)}function c_(){this._clearCache(Xg)}function l_(){this._clearCache(Zg)}var $=class extends Q{constructor(e){super(e);let t;for(;t=Y.getRandomColor(),!(t&&!(t in e_)););this.colorKey=t,e_[t]=this}getContext(){return Y.warn(`shape.getContext() method is deprecated. Please do not use it.`),this.getLayer().getContext()}getCanvas(){return Y.warn(`shape.getCanvas() method is deprecated. Please do not use it.`),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(qg,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(Yg,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let e=$g().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||`repeat`);if(e&&e.setTransform){let t=new Um;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(J.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let n=t.getMatrix();e.setTransform({a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]})}return e}}_getLinearGradient(){return this._getCache(Xg,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=$g(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=t.createLinearGradient(n.x,n.y,r.x,r.y),a=0;a<e.length;a+=2)i.addColorStop(e[a],e[a+1]);return i}}_getRadialGradient(){return this._getCache(Zg,this.__getRadialGradient)}__getRadialGradient(){var e=this.fillRadialGradientColorStops();if(e){for(var t=$g(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=t.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),a=0;a<e.length;a+=2)i.addColorStop(e[a],e[a+1]);return i}}getShadowRGBA(){return this._getCache(Jg,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var e=Y.colorToRGBA(this.shadowColor());return`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a*(this.shadowOpacity()||1)+`)`}}hasFill(){return this._calculate(`hasFill`,[`fillEnabled`,`fill`,`fillPatternImage`,`fillLinearGradientColorStops`,`fillRadialGradientColorStops`],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate(`hasStroke`,[`strokeEnabled`,`strokeWidth`,`stroke`,`strokeLinearGradientColorStops`],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){let e=this.hitStrokeWidth();return e===`auto`?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var t=this.getStage().bufferHitCanvas,n;return t.getContext().clear(),this.drawHit(t,null,!0),n=t.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data,n[3]>0}destroy(){return Q.prototype.destroy.call(this),delete e_[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){if(!this.getStage()||!(this.attrs.perfectDrawEnabled??!0))return!1;let t=e||this.hasFill(),n=this.hasStroke(),r=this.getAbsoluteOpacity()!==1;if(t&&n&&r)return!0;let i=this.hasShadow(),a=this.shadowForStrokeEnabled();return!!(t&&n&&i&&a)}setStrokeHitEnabled(e){Y.warn(`strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.`),e?this.hitStrokeWidth(`auto`):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){let t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),i=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,a=r.width+i,o=r.height+i,s=!e.skipShadow&&this.hasShadow(),c=s?this.shadowOffsetX():0,l=s?this.shadowOffsetY():0,u=a+Math.abs(c),d=o+Math.abs(l),f=s&&this.shadowBlur()||0,p=u+f*2,m=d+f*2,h=0;Math.round(i/2)!==i/2&&(h=1);let g={width:p+h,height:m+h,x:-Math.round(i/2+f)+Math.min(c,0)+r.x,y:-Math.round(i/2+f)+Math.min(l,0)+r.y};return t?g:this._transformedRect(g,n)}drawScene(e,t){var n=this.getLayer(),r=e||n.getCanvas(),i=r.getContext(),a=this._getCanvasCache(),o=this.getSceneFunc(),s=this.hasShadow(),c,l,u,d=r.isCache,f=t===this;if(!this.isVisible()&&!f)return this;if(a){i.save();var p=this.getAbsoluteTransform(t).getMatrix();return i.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedSceneCanvas(i),i.restore(),this}if(!o)return this;if(i.save(),this._useBufferCanvas()&&!d){c=this.getStage(),l=c.bufferCanvas,u=l.getContext(),u.clear(),u.save(),u._applyLineJoin(this);var m=this.getAbsoluteTransform(t).getMatrix();u.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.call(this,u,this),u.restore();var h=l.pixelRatio;s&&i._applyShadow(this),i._applyOpacity(this),i._applyGlobalCompositeOperation(this),i.drawImage(l._canvas,0,0,l.width/h,l.height/h)}else{if(i._applyLineJoin(this),!f){var m=this.getAbsoluteTransform(t).getMatrix();i.transform(m[0],m[1],m[2],m[3],m[4],m[5]),i._applyOpacity(this),i._applyGlobalCompositeOperation(this)}s&&i._applyShadow(this),o.call(this,i,this)}return i.restore(),this}drawHit(e,t,n=!1){if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),i=e||r.hitCanvas,a=i&&i.getContext(),o=this.hitFunc()||this.sceneFunc(),s=this._getCanvasCache(),c=s&&s.hit;if(this.colorKey||Y.warn(`Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()`),c){a.save();var l=this.getAbsoluteTransform(t).getMatrix();return a.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!o)return this;if(a.save(),a._applyLineJoin(this),this!==t){var u=this.getAbsoluteTransform(t).getMatrix();a.transform(u[0],u[1],u[2],u[3],u[4],u[5])}return o.call(this,a,this),a.restore(),this}drawHitFromCache(e=0){var t=this._getCanvasCache(),n=this._getCachedSceneCanvas(),r=t.hit,i=r.getContext(),a=r.getWidth(),o=r.getHeight(),s,c,l,u,d,f;i.clear(),i.drawImage(n._canvas,0,0,a,o);try{for(s=i.getImageData(0,0,a,o),c=s.data,l=c.length,u=Y._hexToRgb(this.colorKey),d=0;d<l;d+=4)f=c[d+3],f>e?(c[d]=u.r,c[d+1]=u.g,c[d+2]=u.b,c[d+3]=255):c[d+3]=0;i.putImageData(s,0,0)}catch(e){Y.error(`Unable to draw hit graph from cached scene canvas. `+e.message)}return this}hasPointerCapture(e){return ug(e,this)}setPointerCapture(e){dg(e,this)}releaseCapture(e){fg(e,this)}};$.prototype._fillFunc=t_,$.prototype._strokeFunc=n_,$.prototype._fillFuncHit=r_,$.prototype._strokeFuncHit=i_,$.prototype._centroid=!1,$.prototype.nodeType=`Shape`,Hm($),$.prototype.eventListeners={},$.prototype.on.call($.prototype,`shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,a_),$.prototype.on.call($.prototype,`shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,o_),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva`,s_),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva`,c_),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva`,l_),Z.addGetterSetter($,`stroke`,void 0,dh()),Z.addGetterSetter($,`strokeWidth`,2,X()),Z.addGetterSetter($,`fillAfterStrokeEnabled`,!1),Z.addGetterSetter($,`hitStrokeWidth`,`auto`,lh()),Z.addGetterSetter($,`strokeHitEnabled`,!0,ph()),Z.addGetterSetter($,`perfectDrawEnabled`,!0,ph()),Z.addGetterSetter($,`shadowForStrokeEnabled`,!0,ph()),Z.addGetterSetter($,`lineJoin`),Z.addGetterSetter($,`lineCap`),Z.addGetterSetter($,`sceneFunc`),Z.addGetterSetter($,`hitFunc`),Z.addGetterSetter($,`dash`),Z.addGetterSetter($,`dashOffset`,0,X()),Z.addGetterSetter($,`shadowColor`,void 0,uh()),Z.addGetterSetter($,`shadowBlur`,0,X()),Z.addGetterSetter($,`shadowOpacity`,1,X()),Z.addComponentsGetterSetter($,`shadowOffset`,[`x`,`y`]),Z.addGetterSetter($,`shadowOffsetX`,0,X()),Z.addGetterSetter($,`shadowOffsetY`,0,X()),Z.addGetterSetter($,`fillPatternImage`),Z.addGetterSetter($,`fill`,void 0,dh()),Z.addGetterSetter($,`fillPatternX`,0,X()),Z.addGetterSetter($,`fillPatternY`,0,X()),Z.addGetterSetter($,`fillLinearGradientColorStops`),Z.addGetterSetter($,`strokeLinearGradientColorStops`),Z.addGetterSetter($,`fillRadialGradientStartRadius`,0),Z.addGetterSetter($,`fillRadialGradientEndRadius`,0),Z.addGetterSetter($,`fillRadialGradientColorStops`),Z.addGetterSetter($,`fillPatternRepeat`,`repeat`),Z.addGetterSetter($,`fillEnabled`,!0),Z.addGetterSetter($,`strokeEnabled`,!0),Z.addGetterSetter($,`shadowEnabled`,!0),Z.addGetterSetter($,`dashEnabled`,!0),Z.addGetterSetter($,`strokeScaleEnabled`,!0),Z.addGetterSetter($,`fillPriority`,`color`),Z.addComponentsGetterSetter($,`fillPatternOffset`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternOffsetX`,0,X()),Z.addGetterSetter($,`fillPatternOffsetY`,0,X()),Z.addComponentsGetterSetter($,`fillPatternScale`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternScaleX`,1,X()),Z.addGetterSetter($,`fillPatternScaleY`,1,X()),Z.addComponentsGetterSetter($,`fillLinearGradientStartPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientStartPointX`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointX`,0),Z.addGetterSetter($,`fillLinearGradientStartPointY`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillLinearGradientEndPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientEndPointX`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointX`,0),Z.addGetterSetter($,`fillLinearGradientEndPointY`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientStartPointX`,0),Z.addGetterSetter($,`fillRadialGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientEndPointX`,0),Z.addGetterSetter($,`fillRadialGradientEndPointY`,0),Z.addGetterSetter($,`fillPatternRotation`,0),Z.backCompat($,{dashArray:`dash`,getDashArray:`getDash`,setDashArray:`getDash`,drawFunc:`sceneFunc`,getDrawFunc:`getSceneFunc`,setDrawFunc:`setSceneFunc`,drawHitFunc:`hitFunc`,getDrawHitFunc:`getHitFunc`,setDrawHitFunc:`setHitFunc`});var u_=`#`,d_=`beforeDraw`,f_=`draw`,p_=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],m_=p_.length,h_=class extends ag{constructor(e){super(e),this.canvas=new Fh,this.hitCanvas=new Ih({pixelRatio:1}),this._waitingForDraw=!1,this.on(`visibleChange.konva`,this._checkVisibility),this._checkVisibility(),this.on(`imageSmoothingEnabledChange.konva`,this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[e+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Q.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!Q.prototype.moveUp.call(this))return!1;var e=this.getStage();return!e||!e.content?!1:(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Q.prototype.moveDown.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Q.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var e=this.getNativeCanvasElement();return Q.prototype.remove.call(this),e&&e.parentNode&&Y._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:t}){return this.canvas.setSize(e,t),this.hitCanvas.setSize(e,t),this._setSmoothEnabled(),this}_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to a layer.`)}_toKonvaCanvas(e){return e||={},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x===void 0?this.x():e.x,e.y=e.y===void 0?this.y():e.y,Q.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display=`block`:this.canvas._canvas.style.display=`none`}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Y.warn(`Can not change width of layer. Use "stage.width(value)" function instead.`)}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Y.warn(`Can not change height of layer. Use "stage.height(value)" function instead.`)}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Y.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r<m_;r++){let i=p_[r],a=this._getIntersection({x:e.x+i.x*t,y:e.y+i.y*t}),o=a.shape;if(o)return o;if(n=!!a.antialiased,!a.antialiased)break}if(n)t+=1;else return null}}_getIntersection(e){let t=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(e.x*t),Math.round(e.y*t),1,1).data,r=n[3];if(r===255){let e=e_[u_+Y._rgbToHex(n[0],n[1],n[2])];return e?{shape:e}:{antialiased:!0}}else if(r>0)return{antialiased:!0};return{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire(d_,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),ag.prototype.drawScene.call(this,r,t),this._fire(f_,{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),ag.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening(e)}getHitGraphEnabled(e){return Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent;this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}};h_.prototype.nodeType=`Layer`,Hm(h_),Z.addGetterSetter(h_,`imageSmoothingEnabled`,!0),Z.addGetterSetter(h_,`clearBeforeDraw`,!0),Z.addGetterSetter(h_,`hitGraphEnabled`,!0,ph());var g_=class extends h_{constructor(e){super(e),this.listening(!1),Y.warn(`Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.`)}};g_.prototype.nodeType=`FastLayer`,Hm(g_);var __=class extends ag{_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to groups.`)}};__.prototype.nodeType=`Group`,Hm(__);var v_=(function(){return Vm.performance&&Vm.performance.now?function(){return Vm.performance.now()}:function(){return new Date().getTime()}})(),y_=class e{constructor(t,n){this.id=e.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:v_(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(e){var t=[];return t=e?e.length>0?e:[e]:[],this.layers=t,this}getLayers(){return this.layers}addLayer(e){var t=this.layers,n=t.length,r;for(r=0;r<n;r++)if(t[r]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){var t=e.animations,n=t.length,r;for(r=0;r<n;r++)if(t[r].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=v_(),e._addAnimation(this),this}stop(){return e._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){var t=e.id,n=this.animations,r=n.length,i;for(i=0;i<r;i++)if(n[i].id===t){this.animations.splice(i,1);break}}static _runFrames(){var e={},t=this.animations,n,r,i,a,o,s,c,l,u;for(a=0;a<t.length;a++)if(n=t[a],r=n.layers,i=n.func,n._updateFrameObject(v_()),s=r.length,u=!i||i.call(n,n.frame)!==!1,u)for(o=0;o<s;o++)c=r[o],c._id!==void 0&&(e[c._id]=c);for(l in e)e.hasOwnProperty(l)&&e[l].batchDraw()}static _animationLoop(){var t=e;t.animations.length?(t._runFrames(),Y.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,Y.requestAnimFrame(this._animationLoop))}};y_.animations=[],y_.animIdCounter=0,y_.animRunning=!1;var b_={node:1,duration:1,easing:1,onFinish:1,yoyo:1},x_=1,S_=2,C_=3,w_=0,T_=[`fill`,`stroke`,`shadowColor`],E_=class{constructor(e,t,n,r,i,a,o){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=i-this.begin,this.pause()}fire(e){var t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=S_,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onPlay`)}reverse(){this.state=C_,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onReverse`)}seek(e){this.pause(),this._time=e,this.update(),this.fire(`onSeek`)}reset(){this.pause(),this._time=0,this.update(),this.fire(`onReset`)}finish(){this.pause(),this._time=this.duration,this.update(),this.fire(`onFinish`)}update(){this.setPosition(this.getPosition(this._time)),this.fire(`onUpdate`)}onEnterFrame(){var e=this.getTimer()-this._startTime;this.state===S_?this.setTime(e):this.state===C_&&this.setTime(this.duration-e)}pause(){this.state=x_,this.fire(`onPause`)}getTimer(){return new Date().getTime()}},D_=class e{constructor(t){var n=this,r=t.node,i=r._id,a,o=t.easing||O_.Linear,s=!!t.yoyo,c;a=t.duration===void 0?.3:t.duration===0?.001:t.duration,this.node=r,this._id=w_++;var l=r.getLayer()||(r instanceof J.Stage?r.getLayers():null);for(c in l||Y.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new y_(function(){n.tween.onEnterFrame()},l),this.tween=new E_(c,function(e){n._tweenFunc(e)},o,0,1,a*1e3,s),this._addListeners(),e.attrs[i]||(e.attrs[i]={}),e.attrs[i][this._id]||(e.attrs[i][this._id]={}),e.tweens[i]||(e.tweens[i]={}),t)b_[c]===void 0&&this._addAttr(c,t[c]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,a,o,s=e.tweens[i][t],c,l,u,d,f;if(s&&delete e.attrs[i][s][t],a=r.getAttr(t),Y._isArray(n))if(o=[],l=Math.max(n.length,a.length),t===`points`&&n.length!==a.length&&(n.length>a.length?(d=a,a=Y._prepareArrayForTween(a,n,r.closed())):(u=n,n=Y._prepareArrayForTween(n,a,r.closed()))),t.indexOf(`fill`)===0)for(c=0;c<l;c++)if(c%2==0)o.push(n[c]-a[c]);else{var p=Y.colorToRGBA(a[c]);f=Y.colorToRGBA(n[c]),a[c]=p,o.push({r:f.r-p.r,g:f.g-p.g,b:f.b-p.b,a:f.a-p.a})}else for(c=0;c<l;c++)o.push(n[c]-a[c]);else T_.indexOf(t)===-1?o=n-a:(a=Y.colorToRGBA(a),f=Y.colorToRGBA(n),o={r:f.r-a.r,g:f.g-a.g,b:f.b-a.b,a:f.a-a.a});e.attrs[i][this._id][t]={start:a,diff:o,end:n,trueEnd:u,trueStart:d},e.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=e.attrs[n._id][this._id],i,a,o,s,c,l,u,d;for(i in r){if(a=r[i],o=a.start,s=a.diff,d=a.end,Y._isArray(o))if(c=[],u=Math.max(o.length,d.length),i.indexOf(`fill`)===0)for(l=0;l<u;l++)l%2==0?c.push((o[l]||0)+s[l]*t):c.push(`rgba(`+Math.round(o[l].r+s[l].r*t)+`,`+Math.round(o[l].g+s[l].g*t)+`,`+Math.round(o[l].b+s[l].b*t)+`,`+(o[l].a+s[l].a*t)+`)`);else for(l=0;l<u;l++)c.push((o[l]||0)+s[l]*t);else c=T_.indexOf(i)===-1?o+s*t:`rgba(`+Math.round(o.r+s.r*t)+`,`+Math.round(o.g+s.g*t)+`,`+Math.round(o.b+s.b*t)+`,`+(o.a+s.a*t)+`)`;n.setAttr(i,c)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr(`points`,n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=e.tweens[t],i;for(i in this.pause(),r)delete e.tweens[t][i];delete e.attrs[t][n]}};D_.attrs={},D_.tweens={},Q.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new D_(e).play()};var O_={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),-(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t)},ElasticEaseOut(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),i*2**(-10*e)*Math.sin((e*r-o)*(2*Math.PI)/a)+n+t)},ElasticEaseInOut(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r/2)==2?t+n:(a||=.3*1.5*r,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t:i*2**(-10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a)*.5+n+t)},BounceEaseOut(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,n,r){return n-O_.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?O_.BounceEaseIn(e*2,0,n,r)*.5+t:O_.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,n,r){return n*e/r+t}},k_=Y._assign(J,{Util:Y,Transform:Um,Node:Q,Container:ag,Stage:Kg,stages:Gg,Layer:h_,FastLayer:g_,Group:__,DD:Lh,Shape:$,shapes:e_,Animation:y_,Tween:D_,Easings:O_,Context:kh,Canvas:Ph}),A_=class extends ${_sceneFunc(e){var t=J.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};A_.prototype._centroid=!0,A_.prototype.className=`Arc`,A_.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Hm(A_),Z.addGetterSetter(A_,`innerRadius`,0,X()),Z.addGetterSetter(A_,`outerRadius`,0,X()),Z.addGetterSetter(A_,`angle`,0,X()),Z.addGetterSetter(A_,`clockwise`,!1,ph());function j_(e,t,n,r,i,a,o){var s=Math.sqrt((n-e)**2+(r-t)**2),c=Math.sqrt((i-n)**2+(a-r)**2),l=o*s/(s+c),u=o*c/(s+c);return[n-l*(i-e),r-l*(a-t),n+u*(i-e),r+u*(a-t)]}function M_(e,t){var n=e.length,r=[],i,a;for(i=2;i<n-2;i+=2)a=j_(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(a[0])&&(r.push(a[0]),r.push(a[1]),r.push(e[i]),r.push(e[i+1]),r.push(a[2]),r.push(a[3]));return r}var N_=class extends ${constructor(e){super(e),this.on(`pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva`,function(){this._clearCache(`tensionPoints`)})}_sceneFunc(e){var t=this.points(),n=t.length,r=this.tension(),i=this.closed(),a=this.bezier(),o,s,c;if(n){if(e.beginPath(),e.moveTo(t[0],t[1]),r!==0&&n>4){for(o=this.getTensionPoints(),s=o.length,c=i?0:4,i||e.quadraticCurveTo(o[0],o[1],o[2],o[3]);c<s-2;)e.bezierCurveTo(o[c++],o[c++],o[c++],o[c++],o[c++],o[c++]);i||e.quadraticCurveTo(o[s-2],o[s-1],t[n-2],t[n-1])}else if(a)for(c=2;c<n;)e.bezierCurveTo(t[c++],t[c++],t[c++],t[c++],t[c++],t[c++]);else for(c=2;c<n;c+=2)e.lineTo(t[c],t[c+1]);i?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache(`tensionPoints`,this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():M_(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),t=e.length,n=this.tension(),r=j_(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),i=j_(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),a=M_(e,n);return[r[2],r[3]].concat(a,[i[0],i[1],e[t-2],e[t-1],i[2],i[3],r[0],r[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};e=this.tension()===0?this.points():[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]];for(var t=e[0],n=e[0],r=e[1],i=e[1],a,o,s=0;s<e.length/2;s++)a=e[s*2],o=e[s*2+1],t=Math.min(t,a),n=Math.max(n,a),r=Math.min(r,o),i=Math.max(i,o);return{x:t,y:r,width:n-t,height:i-r}}};N_.prototype.className=`Line`,N_.prototype._attrsAffectingSize=[`points`,`bezier`,`tension`],Hm(N_),Z.addGetterSetter(N_,`closed`,!1),Z.addGetterSetter(N_,`bezier`,!1),Z.addGetterSetter(N_,`tension`,0,X()),Z.addGetterSetter(N_,`points`,[],fh());var P_=class e extends ${constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=e.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on(`dataChange.konva`,function(){this.dataArray=e.parsePathData(this.data()),this.pathLength=0;for(var t=0;t<this.dataArray.length;++t)this.pathLength+=this.dataArray[t].pathLength})}_sceneFunc(e){var t=this.dataArray;e.beginPath();for(var n=!1,r=0;r<t.length;r++){var i=t[r].command,a=t[r].points;switch(i){case`L`:e.lineTo(a[0],a[1]);break;case`M`:e.moveTo(a[0],a[1]);break;case`C`:e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case`Q`:e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case`A`:var o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],d=a[5],f=a[6],p=a[7],m=c>l?c:l,h=c>l?1:c/l,g=c>l?l/c:1;e.translate(o,s),e.rotate(f),e.scale(h,g),e.arc(0,0,m,u,u+d,1-p),e.scale(1/h,1/g),e.rotate(-f),e.translate(-o,-s);break;case`z`:n=!0,e.closePath();break}}!n&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(n){if(n.command===`A`){var r=n.points[4],i=n.points[5],a=n.points[4]+i,o=Math.PI/180;if(Math.abs(r-a)<o&&(o=Math.abs(r-a)),i<0)for(let i=r-o;i>a;i-=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,0);t.push(r.x,r.y)}else for(let i=r+o;i<a;i+=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,0);t.push(r.x,r.y)}}else if(n.command===`C`)for(let r=0;r<=1;r+=.01){let i=e.getPointOnCubicBezier(r,n.start.x,n.start.y,n.points[0],n.points[1],n.points[2],n.points[3],n.points[4],n.points[5]);t.push(i.x,i.y)}else t=t.concat(n.points)});for(var n=t[0],r=t[0],i=t[1],a=t[1],o,s,c=0;c<t.length/2;c++)o=t[c*2],s=t[c*2+1],isNaN(o)||(n=Math.min(n,o),r=Math.max(r,o)),isNaN(s)||(i=Math.min(i,s),a=Math.max(a,s));return{x:Math.round(n),y:Math.round(i),width:Math.round(r-n),height:Math.round(a-i)}}getLength(){return this.pathLength}getPointAtLength(t){var n,r=0,i=this.dataArray.length;if(!i)return null;for(;r<i&&t>this.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var a=this.dataArray[r],o=a.points;switch(a.command){case`L`:return e.getPointOnLine(t,a.start.x,a.start.y,o[0],o[1]);case`C`:return e.getPointOnCubicBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case`Q`:return e.getPointOnQuadraticBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3]);case`A`:var s=o[0],c=o[1],l=o[2],u=o[3],d=o[4],f=o[5],p=o[6];return d+=f*t/a.pathLength,e.getPointOnEllipticalArc(s,c,l,u,d,p)}return null}static getLineLength(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}static getPointOnLine(e,t,n,r,i,a,o){a===void 0&&(a=t),o===void 0&&(o=n);var s=(i-n)/(r-t+1e-8),c=Math.sqrt(e*e/(1+s*s));r<t&&(c*=-1);var l=s*c,u;if(r===t)u={x:a,y:o+l};else if((o-n)/(a-t+1e-8)===s)u={x:a+c,y:o+l};else{var d,f,p=this.getLineLength(t,n,r,i),m=(a-t)*(r-t)+(o-n)*(i-n);m/=p*p,d=t+m*(r-t),f=n+m*(i-n);var h=this.getLineLength(a,o,d,f),g=Math.sqrt(e*e-h*h);c=Math.sqrt(g*g/(1+s*s)),r<t&&(c*=-1),l=s*c,u={x:d+c,y:f+l}}return u}static getPointOnCubicBezier(e,t,n,r,i,a,o,s,c){function l(e){return e*e*e}function u(e){return 3*e*e*(1-e)}function d(e){return 3*e*(1-e)*(1-e)}function f(e){return(1-e)*(1-e)*(1-e)}return{x:s*l(e)+a*u(e)+r*d(e)+t*f(e),y:c*l(e)+o*u(e)+i*d(e)+n*f(e)}}static getPointOnQuadraticBezier(e,t,n,r,i,a,o){function s(e){return e*e}function c(e){return 2*e*(1-e)}function l(e){return(1-e)*(1-e)}return{x:a*s(e)+r*c(e)+t*l(e),y:o*s(e)+i*c(e)+n*l(e)}}static getPointOnEllipticalArc(e,t,n,r,i,a){var o=Math.cos(a),s=Math.sin(a),c={x:n*Math.cos(i),y:r*Math.sin(i)};return{x:e+(c.x*o-c.y*s),y:t+(c.x*s+c.y*o)}}static parsePathData(e){if(!e)return[];var t=e,n=[`m`,`M`,`l`,`L`,`v`,`V`,`h`,`H`,`z`,`Z`,`c`,`C`,`q`,`Q`,`t`,`T`,`s`,`S`,`a`,`A`];t=t.replace(RegExp(` `,`g`),`,`);for(var r=0;r<n.length;r++)t=t.replace(new RegExp(n[r],`g`),`|`+n[r]);var i=t.split(`|`),a=[],o=[],s=0,c=0,l=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,u;for(r=1;r<i.length;r++){var d=i[r],f=d.charAt(0);for(d=d.slice(1),o.length=0;u=l.exec(d);)o.push(u[0]);for(var p=[],m=0,h=o.length;m<h;m++){if(o[m]===`00`){p.push(0,0);continue}var g=parseFloat(o[m]);isNaN(g)?p.push(0):p.push(g)}for(;p.length>0&&!isNaN(p[0]);){var _=null,v=[],y=s,b=c,x,S,C,w,T,E,D,O,ee,te;switch(f){case`l`:s+=p.shift(),c+=p.shift(),_=`L`,v.push(s,c);break;case`L`:s=p.shift(),c=p.shift(),v.push(s,c);break;case`m`:var k=p.shift(),A=p.shift();if(s+=k,c+=A,_=`M`,a.length>2&&a[a.length-1].command===`z`){for(var j=a.length-2;j>=0;j--)if(a[j].command===`M`){s=a[j].points[0]+k,c=a[j].points[1]+A;break}}v.push(s,c),f=`l`;break;case`M`:s=p.shift(),c=p.shift(),_=`M`,v.push(s,c),f=`L`;break;case`h`:s+=p.shift(),_=`L`,v.push(s,c);break;case`H`:s=p.shift(),_=`L`,v.push(s,c);break;case`v`:c+=p.shift(),_=`L`,v.push(s,c);break;case`V`:c=p.shift(),_=`L`,v.push(s,c);break;case`C`:v.push(p.shift(),p.shift(),p.shift(),p.shift()),s=p.shift(),c=p.shift(),v.push(s,c);break;case`c`:v.push(s+p.shift(),c+p.shift(),s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`C`,v.push(s,c);break;case`S`:S=s,C=c,x=a[a.length-1],x.command===`C`&&(S=s+(s-x.points[2]),C=c+(c-x.points[3])),v.push(S,C,p.shift(),p.shift()),s=p.shift(),c=p.shift(),_=`C`,v.push(s,c);break;case`s`:S=s,C=c,x=a[a.length-1],x.command===`C`&&(S=s+(s-x.points[2]),C=c+(c-x.points[3])),v.push(S,C,s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`C`,v.push(s,c);break;case`Q`:v.push(p.shift(),p.shift()),s=p.shift(),c=p.shift(),v.push(s,c);break;case`q`:v.push(s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`Q`,v.push(s,c);break;case`T`:S=s,C=c,x=a[a.length-1],x.command===`Q`&&(S=s+(s-x.points[0]),C=c+(c-x.points[1])),s=p.shift(),c=p.shift(),_=`Q`,v.push(S,C,s,c);break;case`t`:S=s,C=c,x=a[a.length-1],x.command===`Q`&&(S=s+(s-x.points[0]),C=c+(c-x.points[1])),s+=p.shift(),c+=p.shift(),_=`Q`,v.push(S,C,s,c);break;case`A`:w=p.shift(),T=p.shift(),E=p.shift(),D=p.shift(),O=p.shift(),ee=s,te=c,s=p.shift(),c=p.shift(),_=`A`,v=this.convertEndpointToCenterParameterization(ee,te,s,c,D,O,w,T,E);break;case`a`:w=p.shift(),T=p.shift(),E=p.shift(),D=p.shift(),O=p.shift(),ee=s,te=c,s+=p.shift(),c+=p.shift(),_=`A`,v=this.convertEndpointToCenterParameterization(ee,te,s,c,D,O,w,T,E);break}a.push({command:_||f,points:v,start:{x:y,y:b},pathLength:this.calcLength(y,b,_||f,v)})}(f===`z`||f===`Z`)&&a.push({command:`z`,points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var a,o,s,c,l=e;switch(r){case`L`:return l.getLineLength(t,n,i[0],i[1]);case`C`:for(a=0,o=l.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),c=.01;c<=1;c+=.01)s=l.getPointOnCubicBezier(c,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case`Q`:for(a=0,o=l.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),c=.01;c<=1;c+=.01)s=l.getPointOnQuadraticBezier(c,t,n,i[0],i[1],i[2],i[3]),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case`A`:a=0;var u=i[4],d=i[5],f=i[4]+d,p=Math.PI/180;if(Math.abs(u-f)<p&&(p=Math.abs(u-f)),o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),d<0)for(c=u-p;c>f;c-=p)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(c=u+p;c<f;c+=p)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],f,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),a}return 0}static convertEndpointToCenterParameterization(e,t,n,r,i,a,o,s,c){var l=Math.PI/180*c,u=Math.cos(l)*(e-n)/2+Math.sin(l)*(t-r)/2,d=-1*Math.sin(l)*(e-n)/2+Math.cos(l)*(t-r)/2,f=u*u/(o*o)+d*d/(s*s);f>1&&(o*=Math.sqrt(f),s*=Math.sqrt(f));var p=Math.sqrt((o*o*(s*s)-o*o*(d*d)-s*s*(u*u))/(o*o*(d*d)+s*s*(u*u)));i===a&&(p*=-1),isNaN(p)&&(p=0);var m=p*o*d/s,h=p*-s*u/o,g=(e+n)/2+Math.cos(l)*m-Math.sin(l)*h,_=(t+r)/2+Math.sin(l)*m+Math.cos(l)*h,v=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},y=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(v(e)*v(t))},b=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(y(e,t))},x=b([1,0],[(u-m)/o,(d-h)/s]),S=[(u-m)/o,(d-h)/s],C=[(-1*u-m)/o,(-1*d-h)/s],w=b(S,C);return y(S,C)<=-1&&(w=Math.PI),y(S,C)>=1&&(w=0),a===0&&w>0&&(w-=2*Math.PI),a===1&&w<0&&(w+=2*Math.PI),[g,_,o,s,x,w,l,a]}};P_.prototype.className=`Path`,P_.prototype._attrsAffectingSize=[`data`],Hm(P_),Z.addGetterSetter(P_,`data`);var F_=class extends N_{_sceneFunc(e){super._sceneFunc(e);var t=Math.PI*2,n=this.points(),r=n,i=this.tension()!==0&&n.length>4;i&&(r=this.getTensionPoints());var a=this.pointerLength(),o=n.length,s,c;if(i){let e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[o-2],n[o-1]],t=P_.calcLength(r[r.length-4],r[r.length-3],`C`,e),i=P_.getPointOnQuadraticBezier(Math.min(1,1-a/t),e[0],e[1],e[2],e[3],e[4],e[5]);s=n[o-2]-i.x,c=n[o-1]-i.y}else s=n[o-2]-n[o-4],c=n[o-1]-n[o-3];var l=(Math.atan2(c,s)+t)%t,u=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[o-2],n[o-1]),e.rotate(l),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),i?(s=(r[0]+r[2])/2-n[0],c=(r[1]+r[3])/2-n[1]):(s=n[2]-n[0],c=n[3]-n[1]),e.rotate((Math.atan2(-c,-s)+t)%t),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){let e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}}};F_.prototype.className=`Arrow`,Hm(F_),Z.addGetterSetter(F_,`pointerLength`,10,X()),Z.addGetterSetter(F_,`pointerWidth`,10,X()),Z.addGetterSetter(F_,`pointerAtBeginning`,!1),Z.addGetterSetter(F_,`pointerAtEnding`,!0);var I_=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}};I_.prototype._centroid=!0,I_.prototype.className=`Circle`,I_.prototype._attrsAffectingSize=[`radius`],Hm(I_),Z.addGetterSetter(I_,`radius`,0,X());var L_=class extends ${_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};L_.prototype.className=`Ellipse`,L_.prototype._centroid=!0,L_.prototype._attrsAffectingSize=[`radiusX`,`radiusY`],Hm(L_),Z.addComponentsGetterSetter(L_,`radius`,[`x`,`y`]),Z.addGetterSetter(L_,`radiusX`,0,X()),Z.addGetterSetter(L_,`radiusY`,0,X());var R_=class e extends ${constructor(e){super(e),this.on(`imageChange.konva`,()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener(`load`,()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){let t=this.getWidth(),n=this.getHeight(),r=this.attrs.image,i;if(r){let e=this.attrs.cropWidth,a=this.attrs.cropHeight;i=e&&a?[r,this.cropX(),this.cropY(),e,a,0,0,t,n]:[r,0,0,t,n]}(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),r&&e.drawImage.apply(e,i)}_hitFunc(e){var t=this.width(),n=this.height();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.attrs.width??this.image()?.width}getHeight(){return this.attrs.height??this.image()?.height}static fromURL(t,n){var r=Y.createImageElement();r.onload=function(){n(new e({image:r}))},r.crossOrigin=`Anonymous`,r.src=t}};R_.prototype.className=`Image`,Hm(R_),Z.addGetterSetter(R_,`image`),Z.addComponentsGetterSetter(R_,`crop`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(R_,`cropX`,0,X()),Z.addGetterSetter(R_,`cropY`,0,X()),Z.addGetterSetter(R_,`cropWidth`,0,X()),Z.addGetterSetter(R_,`cropHeight`,0,X());var z_=[`fontFamily`,`fontSize`,`fontStyle`,`padding`,`lineHeight`,`text`,`width`,`height`],B_=`Change.konva`,V_=`none`,H_=`up`,U_=`right`,W_=`down`,G_=`left`,K_=z_.length,q_=class extends __{constructor(e){super(e),this.on(`add.konva`,function(e){this._addListeners(e.child),this._sync()})}getText(){return this.find(`Text`)[0]}getTag(){return this.find(`Tag`)[0]}_addListeners(e){var t=this,n,r=function(){t._sync()};for(n=0;n<K_;n++)e.on(z_[n]+B_,r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e=this.getText(),t=this.getTag(),n,r,i,a,o,s,c;if(e&&t){switch(n=e.width(),r=e.height(),i=t.pointerDirection(),a=t.pointerWidth(),c=t.pointerHeight(),o=0,s=0,i){case H_:o=n/2,s=-1*c;break;case U_:o=n+a,s=r/2;break;case W_:o=n/2,s=r+c;break;case G_:o=-1*a,s=r/2;break}t.setAttrs({x:-1*o,y:-1*s,width:n,height:r}),e.setAttrs({x:-1*o,y:-1*s})}}};q_.prototype.className=`Label`,Hm(q_);var J_=class extends ${_sceneFunc(e){var t=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let s=0,c=0,l=0,u=0;typeof o==`number`?s=c=l=u=Math.min(o,t/2,n/2):(s=Math.min(o[0]||0,t/2,n/2),c=Math.min(o[1]||0,t/2,n/2),u=Math.min(o[2]||0,t/2,n/2),l=Math.min(o[3]||0,t/2,n/2)),e.beginPath(),e.moveTo(s,0),r===H_&&(e.lineTo((t-i)/2,0),e.lineTo(t/2,-1*a),e.lineTo((t+i)/2,0)),e.lineTo(t-c,0),e.arc(t-c,c,c,Math.PI*3/2,0,!1),r===U_&&(e.lineTo(t,(n-a)/2),e.lineTo(t+i,n/2),e.lineTo(t,(n+a)/2)),e.lineTo(t,n-u),e.arc(t-u,n-u,u,0,Math.PI/2,!1),r===W_&&(e.lineTo((t+i)/2,n),e.lineTo(t/2,n+a),e.lineTo((t-i)/2,n)),e.lineTo(l,n),e.arc(l,n-l,l,Math.PI/2,Math.PI,!1),r===G_&&(e.lineTo(0,(n+a)/2),e.lineTo(-1*i,n/2),e.lineTo(0,(n-a)/2)),e.lineTo(0,s),e.arc(s,s,s,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){var e=0,t=0,n=this.pointerWidth(),r=this.pointerHeight(),i=this.pointerDirection(),a=this.width(),o=this.height();return i===H_?(t-=r,o+=r):i===W_?o+=r:i===G_?(e-=n*1.5,a+=n):i===U_&&(a+=n*1.5),{x:e,y:t,width:a,height:o}}};J_.prototype.className=`Tag`,Hm(J_),Z.addGetterSetter(J_,`pointerDirection`,V_),Z.addGetterSetter(J_,`pointerWidth`,0,X()),Z.addGetterSetter(J_,`pointerHeight`,0,X()),Z.addGetterSetter(J_,`cornerRadius`,0,ch(4));var Y_=class extends ${_sceneFunc(e){var t=this.cornerRadius(),n=this.width(),r=this.height();if(e.beginPath(),!t)e.rect(0,0,n,r);else{let i=0,a=0,o=0,s=0;typeof t==`number`?i=a=o=s=Math.min(t,n/2,r/2):(i=Math.min(t[0]||0,n/2,r/2),a=Math.min(t[1]||0,n/2,r/2),s=Math.min(t[2]||0,n/2,r/2),o=Math.min(t[3]||0,n/2,r/2)),e.moveTo(i,0),e.lineTo(n-a,0),e.arc(n-a,a,a,Math.PI*3/2,0,!1),e.lineTo(n,r-s),e.arc(n-s,r-s,s,0,Math.PI/2,!1),e.lineTo(o,r),e.arc(o,r-o,o,Math.PI/2,Math.PI,!1),e.lineTo(0,i),e.arc(i,i,i,Math.PI,Math.PI*3/2,!1)}e.closePath(),e.fillStrokeShape(this)}};Y_.prototype.className=`Rect`,Hm(Y_),Z.addGetterSetter(Y_,`cornerRadius`,0,ch(4));var X_=class extends ${_sceneFunc(e){let t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){let e=this.attrs.sides,t=this.attrs.radius||0,n=[];for(var r=0;r<e;r++)n.push({x:t*Math.sin(r*2*Math.PI/e),y:-1*t*Math.cos(r*2*Math.PI/e)});return n}getSelfRect(){let e=this._getPoints();var t=e[0].x,n=e[0].y,r=e[0].x,i=e[0].y;return e.forEach(e=>{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.y)}),{x:t,y:r,width:n-t,height:i-r}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};X_.prototype.className=`RegularPolygon`,X_.prototype._centroid=!0,X_.prototype._attrsAffectingSize=[`radius`],Hm(X_),Z.addGetterSetter(X_,`radius`,0,X()),Z.addGetterSetter(X_,`sides`,0,X());var Z_=Math.PI*2,Q_=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,Z_,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),Z_,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};Q_.prototype.className=`Ring`,Q_.prototype._centroid=!0,Q_.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Hm(Q_),Z.addGetterSetter(Q_,`innerRadius`,0,X()),Z.addGetterSetter(Q_,`outerRadius`,0,X());var $_=class extends ${constructor(e){super(e),this._updated=!0,this.anim=new y_(()=>{var e=this._updated;return this._updated=!1,e}),this.on(`animationChange.konva`,function(){this.frameIndex(0)}),this.on(`frameIndexChange.konva`,function(){this._updated=!0}),this.on(`frameRateChange.konva`,function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(e){var t=this.animation(),n=this.frameIndex(),r=n*4,i=this.animations()[t],a=this.frameOffsets(),o=i[r+0],s=i[r+1],c=i[r+2],l=i[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,c,l),e.closePath(),e.fillStrokeShape(this)),u)if(a){var d=a[t],f=n*2;e.drawImage(u,o,s,c,l,d[f+0],d[f+1],c,l)}else e.drawImage(u,o,s,c,l,0,0,c,l)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=n*4,i=this.animations()[t],a=this.frameOffsets(),o=i[r+2],s=i[r+3];if(e.beginPath(),a){var c=a[t],l=n*2;e.rect(c[l+0],c[l+1],o,s)}else e.rect(0,0,o,s);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),t=this.animation();e<this.animations()[t].length/4-1?this.frameIndex(e+1):this.frameIndex(0)}};$_.prototype.className=`Sprite`,Hm($_),Z.addGetterSetter($_,`animation`),Z.addGetterSetter($_,`animations`),Z.addGetterSetter($_,`frameOffsets`),Z.addGetterSetter($_,`image`),Z.addGetterSetter($_,`frameIndex`,0,X()),Z.addGetterSetter($_,`frameRate`,17,X()),Z.backCompat($_,{index:`frameIndex`,getIndex:`getFrameIndex`,setIndex:`setFrameIndex`});var ev=class extends ${_sceneFunc(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var i=1;i<r*2;i++){var a=i%2==0?n:t,o=a*Math.sin(i*Math.PI/r),s=-1*a*Math.cos(i*Math.PI/r);e.lineTo(o,s)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};ev.prototype.className=`Star`,ev.prototype._centroid=!0,ev.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Hm(ev),Z.addGetterSetter(ev,`numPoints`,5,X()),Z.addGetterSetter(ev,`innerRadius`,0,X()),Z.addGetterSetter(ev,`outerRadius`,0,X());function tv(e){return Array.from(e)}var nv=`auto`,rv=`center`,iv=`justify`,av=`Change.konva`,ov=`2d`,sv=`-`,cv=`left`,lv=`text`,uv=`Text`,dv=`top`,fv=`bottom`,pv=`middle`,mv=`normal`,hv=`px `,gv=` `,_v=`right`,vv=`word`,yv=`char`,bv=`none`,xv=`…`,Sv=[`fontFamily`,`fontSize`,`fontStyle`,`fontVariant`,`padding`,`align`,`verticalAlign`,`lineHeight`,`text`,`width`,`height`,`wrap`,`ellipsis`,`letterSpacing`],Cv=Sv.length;function wv(e){return e.split(`,`).map(e=>{e=e.trim();let t=e.indexOf(` `)>=0,n=e.indexOf(`"`)>=0||e.indexOf(`'`)>=0;return t&&!n&&(e=`"${e}"`),e}).join(`, `)}var Tv;function Ev(){return Tv||(Tv=Y.createCanvasElement().getContext(ov),Tv)}function Dv(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Ov(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function kv(e){return e||={},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||`black`),e}var Av=class extends ${constructor(e){super(kv(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t<Cv;t++)this.on(Sv[t]+av,this._setTextData);this._setTextData()}_sceneFunc(e){var t=this.textArr,n=t.length;if(this.text()){var r=this.padding(),i=this.fontSize(),a=this.lineHeight()*i,o=this.verticalAlign(),s=0,c=this.align(),l=this.getWidth(),u=this.letterSpacing(),d=this.fill(),f=this.textDecoration(),p=f.indexOf(`underline`)!==-1,m=f.indexOf(`line-through`)!==-1,h,g=0,g=a/2,_=0,v=0;for(e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,pv),e.setAttr(`textAlign`,cv),o===pv?s=(this.getHeight()-n*a-r*2)/2:o===fv&&(s=this.getHeight()-n*a-r*2),e.translate(r,s+r),h=0;h<n;h++){var _=0,v=0,y=t[h],b=y.text,x=y.width,S=h!==n-1,C,w,T;if(e.save(),c===_v?_+=l-x-r*2:c===rv&&(_+=(l-x-r*2)/2),p&&(e.save(),e.beginPath(),e.moveTo(_,g+v+Math.round(i/2)),C=b.split(` `).length-1,w=C===0,T=c===iv&&S&&!w?l-r*2:x,e.lineTo(_+Math.round(T),g+v+Math.round(i/2)),e.lineWidth=i/15,e.strokeStyle=d,e.stroke(),e.restore()),m&&(e.save(),e.beginPath(),e.moveTo(_,g+v),C=b.split(` `).length-1,w=C===0,T=c===iv&&S&&!w?l-r*2:x,e.lineTo(_+Math.round(T),g+v),e.lineWidth=i/15,e.strokeStyle=d,e.stroke(),e.restore()),u!==0||c===iv){C=b.split(` `).length-1;for(var E=tv(b),D=0;D<E.length;D++){var O=E[D];O===` `&&h!==n-1&&c===iv&&(_+=(l-r*2-x)/C),this._partialTextX=_,this._partialTextY=g+v,this._partialText=O,e.fillStrokeShape(this),_+=this.measureSize(O).width+u}}else this._partialTextX=_,this._partialTextY=g+v,this._partialText=b,e.fillStrokeShape(this);e.restore(),n>1&&(g+=a)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=Y._isString(e)?e:e==null?``:e+``;return this._setAttr(lv,t),this}getWidth(){return this.attrs.width===nv||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===nv||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Y.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}measureSize(e){var t=Ev(),n=this.fontSize(),r;return t.save(),t.font=this._getContextFont(),r=t.measureText(e),t.restore(),{width:r.width,height:n}}_getContextFont(){return this.fontStyle()+gv+this.fontVariant()+gv+(this.fontSize()+hv)+wv(this.fontFamily())}_addTextLine(e){this.align()===iv&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return Ev().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split(`
|
|
149
149
|
`),t=+this.fontSize(),n=0,r=this.lineHeight()*t,i=this.attrs.width,a=this.attrs.height,o=i!==nv&&i!==void 0,s=a!==nv&&a!==void 0,c=this.padding(),l=i-c*2,u=a-c*2,d=0,f=this.wrap(),p=f!==bv,m=f!==yv&&p,h=this.ellipsis();this.textArr=[],Ev().font=this._getContextFont();for(var g=h?this._getTextWidth(xv):0,_=0,v=e.length;_<v;++_){var y=e[_],b=this._getTextWidth(y);if(o&&b>l)for(;y.length>0;){for(var x=0,S=y.length,C=``,w=0;x<S;){var T=x+S>>>1,E=y.slice(0,T+1),D=this._getTextWidth(E)+g;D<=l?(x=T+1,C=E,w=D):S=T}if(C){if(m){var O,ee=y[C.length];O=(ee===gv||ee===sv)&&w<=l?C.length:Math.max(C.lastIndexOf(gv),C.lastIndexOf(sv))+1,O>0&&(x=O,C=C.slice(0,x),w=this._getTextWidth(C))}if(C=C.trimRight(),this._addTextLine(C),n=Math.max(n,w),d+=r,!p||s&&d+r>u){var te=this.textArr[this.textArr.length-1];te&&h&&(this._getTextWidth(te.text+xv)<l||(te.text=te.text.slice(0,te.text.length-3)),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(te.text+xv));break}if(y=y.slice(x),y=y.trimLeft(),y.length>0&&(b=this._getTextWidth(y),b<=l)){this._addTextLine(y),d+=r,n=Math.max(n,b);break}}else break}else this._addTextLine(y),d+=r,n=Math.max(n,b);if(s&&d+r>u)break}this.textHeight=t,this.textWidth=n}getStrokeScaleEnabled(){return!0}};Av.prototype._fillFunc=Dv,Av.prototype._strokeFunc=Ov,Av.prototype.className=uv,Av.prototype._attrsAffectingSize=[`text`,`fontSize`,`padding`,`wrap`,`lineHeight`,`letterSpacing`],Hm(Av),Z.overWriteSetter(Av,`width`,lh()),Z.overWriteSetter(Av,`height`,lh()),Z.addGetterSetter(Av,`fontFamily`,`Arial`),Z.addGetterSetter(Av,`fontSize`,12,X()),Z.addGetterSetter(Av,`fontStyle`,mv),Z.addGetterSetter(Av,`fontVariant`,mv),Z.addGetterSetter(Av,`padding`,0,X()),Z.addGetterSetter(Av,`align`,cv),Z.addGetterSetter(Av,`verticalAlign`,dv),Z.addGetterSetter(Av,`lineHeight`,1,X()),Z.addGetterSetter(Av,`wrap`,vv),Z.addGetterSetter(Av,`ellipsis`,!1,ph()),Z.addGetterSetter(Av,`letterSpacing`,0,X()),Z.addGetterSetter(Av,`text`,``,uh()),Z.addGetterSetter(Av,`textDecoration`,``);var jv=``,Mv=`normal`;function Nv(e){e.fillText(this.partialText,0,0)}function Pv(e){e.strokeText(this.partialText,0,0)}var Fv=class extends ${constructor(e){super(e),this.dummyCanvas=Y.createCanvasElement(),this.dataArray=[],this.dataArray=P_.parsePathData(this.attrs.data),this.on(`dataChange.konva`,function(){this.dataArray=P_.parsePathData(this.attrs.data),this._setTextData()}),this.on(`textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva`,this._setTextData),this._setTextData()}_sceneFunc(e){e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,this.textBaseline()),e.setAttr(`textAlign`,`left`),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;t===`underline`&&e.beginPath();for(var a=0;a<i.length;a++){e.save();var o=i[a].p0;e.translate(o.x,o.y),e.rotate(i[a].rotation),this.partialText=i[a].text,e.fillStrokeShape(this),t===`underline`&&(a===0&&e.moveTo(0,r/2+1),e.lineTo(r,r/2+1)),e.restore()}t===`underline`&&(e.strokeStyle=n,e.lineWidth=r/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();var t=this.glyphInfo;if(t.length>=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r<t.length;r++){var i=t[r].p1;e.lineTo(i.x,i.y)}e.setAttr(`lineWidth`,this.fontSize()),e.setAttr(`strokeStyle`,this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return Y.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}setText(e){return Av.prototype.setText.call(this,e)}_getContextFont(){return Av.prototype._getContextFont.call(this)}_getTextSize(e){var t=this.dummyCanvas.getContext(`2d`);t.save(),t.font=this._getContextFont();var n=t.measureText(e);return t.restore(),{width:n.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var e=this,t=this._getTextSize(this.attrs.text),n=this.letterSpacing(),r=this.align(),i=this.kerningFunc();this.textWidth=t.width,this.textHeight=t.height;var a=Math.max(this.textWidth+((this.attrs.text||``).length-1)*n,0);this.glyphInfo=[];for(var o=0,s=0;s<e.dataArray.length;s++)e.dataArray[s].pathLength>0&&(o+=e.dataArray[s].pathLength);var c=0;r===`center`&&(c=Math.max(0,o/2-a/2)),r===`right`&&(c=Math.max(0,o-a));for(var l=tv(this.text()),u=this.text().split(` `).length-1,d,f,p,m=-1,h=0,g=function(){h=0;for(var t=e.dataArray,n=m+1;n<t.length;n++)if(t[n].pathLength>0)return m=n,t[n];else t[n].command===`M`&&(d={x:t[n].points[0],y:t[n].points[1]});return{}},_=function(t){var i=e._getTextSize(t).width+n;t===` `&&r===`justify`&&(i+=(o-a)/u);var s=0,c=0;for(f=void 0;Math.abs(i-s)/i>.01&&c<20;){c++;for(var l=s;p===void 0;)p=g(),p&&l+p.pathLength<i&&(l+=p.pathLength,p=void 0);if(p==={}||d===void 0)return;var m=!1;switch(p.command){case`L`:P_.getLineLength(d.x,d.y,p.points[0],p.points[1])>i?f=P_.getPointOnLine(i,d.x,d.y,p.points[0],p.points[1],d.x,d.y):p=void 0;break;case`A`:var _=p.points[4],v=p.points[5],y=p.points[4]+v;h===0?h=_+1e-8:i>s?h+=Math.PI/180*v/Math.abs(v):h-=Math.PI/360*v/Math.abs(v),(v<0&&h<y||v>=0&&h>y)&&(h=y,m=!0),f=P_.getPointOnEllipticalArc(p.points[0],p.points[1],p.points[2],p.points[3],h,p.points[6]);break;case`C`:h===0?h=i>p.pathLength?1e-8:i/p.pathLength:i>s?h+=(i-s)/p.pathLength/2:h=Math.max(h-(s-i)/p.pathLength/2,0),h>1&&(h=1,m=!0),f=P_.getPointOnCubicBezier(h,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3],p.points[4],p.points[5]);break;case`Q`:h===0?h=i/p.pathLength:i>s?h+=(i-s)/p.pathLength:h-=(s-i)/p.pathLength,h>1&&(h=1,m=!0),f=P_.getPointOnQuadraticBezier(h,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3]);break}f!==void 0&&(s=P_.getLineLength(d.x,d.y,f.x,f.y)),m&&(m=!1,p=void 0)}},v=`C`,y=e._getTextSize(v).width+n,b=c/y-1,x=0;x<b&&(_(v),!(d===void 0||f===void 0));x++)d=f;for(var S=0;S<l.length&&(_(l[S]),!(d===void 0||f===void 0));S++){var C=P_.getLineLength(d.x,d.y,f.x,f.y),w=0;if(i)try{w=i(l[S-1],l[S])*this.fontSize()}catch{w=0}d.x+=w,f.x+=w,this.textWidth+=w;var T=P_.getPointOnLine(w+C/2,d.x,d.y,f.x,f.y),E=Math.atan2(f.y-d.y,f.x-d.x);this.glyphInfo.push({transposeX:T.x,transposeY:T.y,text:l[S],rotation:E,p0:d,p1:f}),d=f}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var e=[];this.glyphInfo.forEach(function(t){e.push(t.p0.x),e.push(t.p0.y),e.push(t.p1.x),e.push(t.p1.y)});for(var t=e[0]||0,n=e[0]||0,r=e[1]||0,i=e[1]||0,a,o,s=0;s<e.length/2;s++)a=e[s*2],o=e[s*2+1],t=Math.min(t,a),n=Math.max(n,a),r=Math.min(r,o),i=Math.max(i,o);var c=this.fontSize();return{x:t-c/2,y:r-c/2,width:n-t+c,height:i-r+c}}};Fv.prototype._fillFunc=Nv,Fv.prototype._strokeFunc=Pv,Fv.prototype._fillFuncHit=Nv,Fv.prototype._strokeFuncHit=Pv,Fv.prototype.className=`TextPath`,Fv.prototype._attrsAffectingSize=[`text`,`fontSize`,`data`],Hm(Fv),Z.addGetterSetter(Fv,`data`),Z.addGetterSetter(Fv,`fontFamily`,`Arial`),Z.addGetterSetter(Fv,`fontSize`,12,X()),Z.addGetterSetter(Fv,`fontStyle`,Mv),Z.addGetterSetter(Fv,`align`,`left`),Z.addGetterSetter(Fv,`letterSpacing`,0,X()),Z.addGetterSetter(Fv,`textBaseline`,`middle`),Z.addGetterSetter(Fv,`fontVariant`,Mv),Z.addGetterSetter(Fv,`text`,jv),Z.addGetterSetter(Fv,`textDecoration`,null),Z.addGetterSetter(Fv,`kerningFunc`,null);var Iv=`tr-konva`,Lv=[`resizeEnabledChange`,`rotateAnchorOffsetChange`,`rotateEnabledChange`,`enabledAnchorsChange`,`anchorSizeChange`,`borderEnabledChange`,`borderStrokeChange`,`borderStrokeWidthChange`,`borderDashChange`,`anchorStrokeChange`,`anchorStrokeWidthChange`,`anchorFillChange`,`anchorCornerRadiusChange`,`ignoreStrokeChange`].map(e=>e+`.${Iv}`).join(` `),Rv=`nodesRect`,zv=[`widthChange`,`heightChange`,`scaleXChange`,`scaleYChange`,`skewXChange`,`skewYChange`,`rotationChange`,`offsetXChange`,`offsetYChange`,`transformsEnabledChange`,`strokeWidthChange`],Bv={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},Vv=`ontouchstart`in J._global;function Hv(e,t){if(e===`rotater`)return`crosshair`;t+=Y.degToRad(Bv[e]||0);var n=(Y.radToDeg(t)%360+360)%360;return Y._inRange(n,337.5,360)||Y._inRange(n,0,22.5)?`ns-resize`:Y._inRange(n,22.5,67.5)?`nesw-resize`:Y._inRange(n,67.5,112.5)?`ew-resize`:Y._inRange(n,112.5,157.5)?`nwse-resize`:Y._inRange(n,157.5,202.5)?`ns-resize`:Y._inRange(n,202.5,247.5)?`nesw-resize`:Y._inRange(n,247.5,292.5)?`ew-resize`:Y._inRange(n,292.5,337.5)?`nwse-resize`:(Y.error(`Transformer has unknown angle for cursor detection: `+n),`pointer`)}var Uv=[`top-left`,`top-center`,`top-right`,`middle-right`,`middle-left`,`bottom-left`,`bottom-center`,`bottom-right`],Wv=1e8;function Gv(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function Kv(e,t,n){let r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function qv(e,t){return Kv(e,t,Gv(e))}function Jv(e,t,n){let r=t;for(let i=0;i<e.length;i++){let a=J.getAngle(e[i]),o=Math.abs(a-t)%(Math.PI*2);Math.min(o,Math.PI*2-o)<n&&(r=a)}return r}var Yv=class extends __{constructor(e){super(e),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(Lv,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return Y.warn(`tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead.`),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return Iv+this._id}setNodes(e=[]){return this._nodes&&this._nodes.length&&this.detach(),this._nodes=e,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(e=>{let t=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},n=e._attrsAffectingSize.map(e=>e+`Change.`+this._getEventNamespace()).join(` `);e.on(n,t),e.on(zv.map(e=>e+`.${this._getEventNamespace()}`).join(` `),t),e.on(`absoluteTransformChange.${this._getEventNamespace()}`,t),this._proxyDrag(e)}),this._resetTransformCache(),this.findOne(`.top-left`)&&this.update(),this}_proxyDrag(e){let t;e.on(`dragstart.${this._getEventNamespace()}`,n=>{t=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(`.back`)&&this.startDrag(n,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!t)return;let r=e.getAbsolutePosition(),i=r.x-t.x,a=r.y-t.y;this.nodes().forEach(t=>{if(t===e||t.isDragging())return;let r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+i,y:r.y+a}),t.startDrag(n)}),t=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off(`.`+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(Rv),this._clearCache(`transform`),this._clearSelfAndDescendantCache(`absoluteTransform`)}_getNodeRect(){return this._getCache(Rv,this.__getNodeRect)}__getNodeShape(e,t=this.rotation(),n){var r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=e.getAbsoluteScale(n),a=e.getAbsolutePosition(n),o=r.x*i.x-e.offsetX()*i.x,s=r.y*i.y-e.offsetY()*i.y;let c=(J.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2);return Kv({x:a.x+o*Math.cos(c)+s*Math.sin(-c),y:a.y+s*Math.cos(c)+o*Math.sin(c),width:r.width*i.x,height:r.height*i.y,rotation:c},-J.getAngle(t),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-Wv,y:-Wv,width:0,height:0,rotation:0};let e=[];this.nodes().map(t=>{let n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],i=t.getAbsoluteTransform();r.forEach(function(t){var n=i.point(t);e.push(n)})});let t=new Um;t.rotate(-J.getAngle(this.rotation()));var n,r,i,a;e.forEach(function(e){var o=t.point(e);n===void 0&&(n=i=o.x,r=a=o.y),n=Math.min(n,o.x),r=Math.min(r,o.y),i=Math.max(i,o.x),a=Math.max(a,o.y)}),t.invert();let o=t.point({x:n,y:r});return{x:o.x,y:o.y,width:i-n,height:a-r,rotation:J.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),Uv.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor(`rotater`)}_createAnchor(e){var t=new Y_({stroke:`rgb(0, 161, 255)`,fill:`white`,strokeWidth:1,name:e+` _anchor`,dragDistance:0,draggable:!0,hitStrokeWidth:Vv?10:`auto`}),n=this;t.on(`mousedown touchstart`,function(e){n._handleMouseDown(e)}),t.on(`dragstart`,e=>{t.stopDrag(),e.cancelBubble=!0}),t.on(`dragend`,e=>{e.cancelBubble=!0}),t.on(`mouseenter`,()=>{var n=Hv(e,J.getAngle(this.rotation()));t.getStage().content&&(t.getStage().content.style.cursor=n),this._cursorChange=!0}),t.on(`mouseout`,()=>{t.getStage().content&&(t.getStage().content.style.cursor=``),this._cursorChange=!1}),this.add(t)}_createBack(){var e=new $({name:`back`,width:0,height:0,draggable:!0,sceneFunc(e){var t=this.getParent(),n=t.padding();e.beginPath(),e.rect(-n,-n,this.width()+n*2,this.height()+n*2),e.moveTo(this.width()/2,-n),t.rotateEnabled()&&e.lineTo(this.width()/2,-t.rotateAnchorOffset()*Y._sign(this.height())-n),e.fillStrokeShape(this)},hitFunc:(e,t)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+n*2,t.height()+n*2),e.fillStrokeShape(t)}}});this.add(e),this._proxyDrag(e),e.on(`dragstart`,e=>{e.cancelBubble=!0}),e.on(`dragmove`,e=>{e.cancelBubble=!0}),e.on(`dragend`,e=>{e.cancelBubble=!0}),this.on(`dragmove`,e=>{this.update()})}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(` `)[0];var t=this._getNodeRect(),n=t.width,r=t.height,i=Math.sqrt(n**2+r**2);this.sin=Math.abs(r/i),this.cos=Math.abs(n/i),typeof window<`u`&&(window.addEventListener(`mousemove`,this._handleMouseMove),window.addEventListener(`touchmove`,this._handleMouseMove),window.addEventListener(`mouseup`,this._handleMouseUp,!0),window.addEventListener(`touchend`,this._handleMouseUp,!0)),this._transforming=!0;var a=e.target.getAbsolutePosition(),o=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.y-a.y},this._fire(`transformstart`,{evt:e,target:this.getNode()}),this._nodes.forEach(t=>{t._fire(`transformstart`,{evt:e,target:t})})}_handleMouseMove(e){var t,n,r,i=this.findOne(`.`+this._movingAnchorName),a=i.getStage();a.setPointersPositions(e);let o=a.getPointerPosition(),s={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y},c=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(c,s,e)),i.setAbsolutePosition(s);let l=i.getAbsolutePosition();if(!(c.x===l.x&&c.y===l.y)){if(this._movingAnchorName===`rotater`){var u=this._getNodeRect();t=i.x()-u.width/2,n=-i.y()+u.height/2;let r=Math.atan2(-n,t)+Math.PI/2;u.height<0&&(r-=Math.PI);let a=J.getAngle(this.rotation())+r,o=J.getAngle(this.rotationSnapTolerance()),s=qv(u,Jv(this.rotationSnaps(),a,o)-u.rotation);this._fitNodesInto(s,e);return}var d=this.keepRatio()||e.shiftKey,f=this.centeredScaling()||e.altKey;if(this._movingAnchorName===`top-left`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.bottom-right`).x(),y:this.findOne(`.bottom-right`).y()};r=Math.sqrt((p.x-i.x())**2+(p.y-i.y())**2);var m=this.findOne(`.top-left`).x()>p.x?-1:1,h=this.findOne(`.top-left`).y()>p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,this.findOne(`.top-left`).x(p.x-t),this.findOne(`.top-left`).y(p.y-n)}}else if(this._movingAnchorName===`top-center`)this.findOne(`.top-left`).y(i.y());else if(this._movingAnchorName===`top-right`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.bottom-left`).x(),y:this.findOne(`.bottom-left`).y()};r=Math.sqrt((i.x()-p.x)**2+(p.y-i.y())**2);var m=this.findOne(`.top-right`).x()<p.x?-1:1,h=this.findOne(`.top-right`).y()>p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,this.findOne(`.top-right`).x(p.x+t),this.findOne(`.top-right`).y(p.y-n)}var g=i.position();this.findOne(`.top-left`).y(g.y),this.findOne(`.bottom-right`).x(g.x)}else if(this._movingAnchorName===`middle-left`)this.findOne(`.top-left`).x(i.x());else if(this._movingAnchorName===`middle-right`)this.findOne(`.bottom-right`).x(i.x());else if(this._movingAnchorName===`bottom-left`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.top-right`).x(),y:this.findOne(`.top-right`).y()};r=Math.sqrt((p.x-i.x())**2+(i.y()-p.y)**2);var m=p.x<i.x()?-1:1,h=i.y()<p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,i.x(p.x-t),i.y(p.y+n)}g=i.position(),this.findOne(`.top-left`).x(g.x),this.findOne(`.bottom-right`).y(g.y)}else if(this._movingAnchorName===`bottom-center`)this.findOne(`.bottom-right`).y(i.y());else if(this._movingAnchorName===`bottom-right`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.top-left`).x(),y:this.findOne(`.top-left`).y()};r=Math.sqrt((i.x()-p.x)**2+(i.y()-p.y)**2);var m=this.findOne(`.bottom-right`).x()<p.x?-1:1,h=this.findOne(`.bottom-right`).y()<p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,this.findOne(`.bottom-right`).x(p.x+t),this.findOne(`.bottom-right`).y(p.y+n)}}else console.error(Error(`Wrong position argument of selection resizer: `+this._movingAnchorName));var f=this.centeredScaling()||e.altKey;if(f){var _=this.findOne(`.top-left`),v=this.findOne(`.bottom-right`),y=_.x(),b=_.y(),x=this.getWidth()-v.x(),S=this.getHeight()-v.y();v.move({x:-y,y:-b}),_.move({x,y:S})}var C=this.findOne(`.top-left`).getAbsolutePosition();t=C.x,n=C.y;var w=this.findOne(`.bottom-right`).x()-this.findOne(`.top-left`).x(),T=this.findOne(`.bottom-right`).y()-this.findOne(`.top-left`).y();this._fitNodesInto({x:t,y:n,width:w,height:T,rotation:J.getAngle(this.rotation())},e)}}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){if(this._transforming){this._transforming=!1,typeof window<`u`&&(window.removeEventListener(`mousemove`,this._handleMouseMove),window.removeEventListener(`touchmove`,this._handleMouseMove),window.removeEventListener(`mouseup`,this._handleMouseUp,!0),window.removeEventListener(`touchend`,this._handleMouseUp,!0));var t=this.getNode();this._fire(`transformend`,{evt:e,target:t}),t&&this._nodes.forEach(t=>{t._fire(`transformend`,{evt:e,target:t})}),this._movingAnchorName=null}}_fitNodesInto(e,t){var n=this._getNodeRect();if(Y._inRange(e.width,-this.padding()*2-1,1)){this.update();return}if(Y._inRange(e.height,-this.padding()*2-1,1)){this.update();return}let r=this.flipEnabled();var i=new Um;if(i.rotate(J.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`left`)>=0){let t=i.point({x:-this.padding()*2,y:0});if(e.x+=t.x,e.y+=t.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace(`left`,`right`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,!r){this.update();return}}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`right`)>=0){let t=i.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace(`right`,`left`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=this.padding()*2,!r){this.update();return}}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`top`)>=0){let t=i.point({x:0,y:-this.padding()*2});if(e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace(`top`,`bottom`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=this.padding()*2,!r){this.update();return}}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`bottom`)>=0){let t=i.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace(`bottom`,`top`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=this.padding()*2,!r){this.update();return}}if(this.boundBoxFunc()){let t=this.boundBoxFunc()(n,e);t?e=t:Y.warn(`boundBoxFunc returned falsy. You should return new bound rect from it!`)}let a=1e7,o=new Um;o.translate(n.x,n.y),o.rotate(n.rotation),o.scale(n.width/a,n.height/a);let s=new Um;s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.width/a,e.height/a);let c=s.multiply(o.invert());this._nodes.forEach(e=>{var n;let r=e.getParent().getAbsoluteTransform(),i=e.getTransform().copy();i.translate(e.offsetX(),e.offsetY());let a=new Um;a.multiply(r.copy().invert()).multiply(c).multiply(r).multiply(i);let o=a.decompose();e.setAttrs(o),this._fire(`transform`,{evt:t,target:e}),e._fire(`transform`,{evt:t,target:e}),(n=e.getLayer())==null||n.batchDraw()}),this.rotation(Y._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,t){this.findOne(e).setAttrs(t)}update(){var e,t=this._getNodeRect();this.rotation(Y._getRotation(t.rotation));var n=t.width,r=t.height,i=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),s=this.anchorSize();this.find(`._anchor`).forEach(e=>{e.setAttrs({width:s,height:s,offsetX:s/2,offsetY:s/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(`.top-left`,{x:0,y:0,offsetX:s/2+o,offsetY:s/2+o,visible:a&&i.indexOf(`top-left`)>=0}),this._batchChangeChild(`.top-center`,{x:n/2,y:0,offsetY:s/2+o,visible:a&&i.indexOf(`top-center`)>=0}),this._batchChangeChild(`.top-right`,{x:n,y:0,offsetX:s/2-o,offsetY:s/2+o,visible:a&&i.indexOf(`top-right`)>=0}),this._batchChangeChild(`.middle-left`,{x:0,y:r/2,offsetX:s/2+o,visible:a&&i.indexOf(`middle-left`)>=0}),this._batchChangeChild(`.middle-right`,{x:n,y:r/2,offsetX:s/2-o,visible:a&&i.indexOf(`middle-right`)>=0}),this._batchChangeChild(`.bottom-left`,{x:0,y:r,offsetX:s/2+o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-left`)>=0}),this._batchChangeChild(`.bottom-center`,{x:n/2,y:r,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-center`)>=0}),this._batchChangeChild(`.bottom-right`,{x:n,y:r,offsetX:s/2-o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-right`)>=0}),this._batchChangeChild(`.rotater`,{x:n/2,y:-this.rotateAnchorOffset()*Y._sign(r)-o,visible:this.rotateEnabled()}),this._batchChangeChild(`.back`,{width:n,height:r,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(e=this.getLayer())==null||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne(`.`+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=``),__.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Q.prototype.toObject.call(this)}};function Xv(e){return e instanceof Array||Y.warn(`enabledAnchors value should be an array`),e instanceof Array&&e.forEach(function(e){Uv.indexOf(e)===-1&&Y.warn(`Unknown anchor name: `+e+`. Available names are: `+Uv.join(`, `))}),e||[]}Yv.prototype.className=`Transformer`,Hm(Yv),Z.addGetterSetter(Yv,`enabledAnchors`,Uv,Xv),Z.addGetterSetter(Yv,`flipEnabled`,!0,ph()),Z.addGetterSetter(Yv,`resizeEnabled`,!0),Z.addGetterSetter(Yv,`anchorSize`,10,X()),Z.addGetterSetter(Yv,`rotateEnabled`,!0),Z.addGetterSetter(Yv,`rotationSnaps`,[]),Z.addGetterSetter(Yv,`rotateAnchorOffset`,50,X()),Z.addGetterSetter(Yv,`rotationSnapTolerance`,5,X()),Z.addGetterSetter(Yv,`borderEnabled`,!0),Z.addGetterSetter(Yv,`anchorStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(Yv,`anchorStrokeWidth`,1,X()),Z.addGetterSetter(Yv,`anchorFill`,`white`),Z.addGetterSetter(Yv,`anchorCornerRadius`,0,X()),Z.addGetterSetter(Yv,`borderStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(Yv,`borderStrokeWidth`,1,X()),Z.addGetterSetter(Yv,`borderDash`),Z.addGetterSetter(Yv,`keepRatio`,!0),Z.addGetterSetter(Yv,`centeredScaling`,!1),Z.addGetterSetter(Yv,`ignoreStroke`,!1),Z.addGetterSetter(Yv,`padding`,0,X()),Z.addGetterSetter(Yv,`node`),Z.addGetterSetter(Yv,`nodes`),Z.addGetterSetter(Yv,`boundBoxFunc`),Z.addGetterSetter(Yv,`anchorDragBoundFunc`),Z.addGetterSetter(Yv,`shouldOverdrawWholeArea`,!1),Z.addGetterSetter(Yv,`useSingleNodeRotation`,!0),Z.backCompat(Yv,{lineEnabled:`borderEnabled`,rotateHandlerOffset:`rotateAnchorOffset`,enabledHandlers:`enabledAnchors`});var Zv=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,J.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};Zv.prototype.className=`Wedge`,Zv.prototype._centroid=!0,Zv.prototype._attrsAffectingSize=[`radius`],Hm(Zv),Z.addGetterSetter(Zv,`radius`,0,X()),Z.addGetterSetter(Zv,`angle`,0,X()),Z.addGetterSetter(Zv,`clockwise`,!1),Z.backCompat(Zv,{angleDeg:`angle`,getAngleDeg:`getAngle`,setAngleDeg:`setAngle`});function Qv(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var $v=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],ey=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function ty(e,t){var n=e.data,r=e.width,i=e.height,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee=t+t+1,te=r-1,k=i-1,A=t+1,j=A*(A+1)/2,M=new Qv,ne=null,N=M,re=null,ie=null,P=$v[t],ae=ey[t];for(s=1;s<ee;s++)N=N.next=new Qv,s===A&&(ne=N);for(N.next=M,d=u=0,o=0;o<i;o++){for(b=x=S=C=f=p=m=h=0,g=A*(w=n[u]),_=A*(T=n[u+1]),v=A*(E=n[u+2]),y=A*(D=n[u+3]),f+=j*w,p+=j*T,m+=j*E,h+=j*D,N=M,s=0;s<A;s++)N.r=w,N.g=T,N.b=E,N.a=D,N=N.next;for(s=1;s<A;s++)c=u+((te<s?te:s)<<2),f+=(N.r=w=n[c])*(O=A-s),p+=(N.g=T=n[c+1])*O,m+=(N.b=E=n[c+2])*O,h+=(N.a=D=n[c+3])*O,b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D,ie=ie.next,u+=r}}var ny=function(e){var t=Math.round(this.blurRadius());t>0&&ty(e,t)};Z.addGetterSetter(Q,`blurRadius`,0,X(),Z.afterSetFilter);var ry=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=4)n[i]+=t,n[i+1]+=t,n[i+2]+=t};Z.addGetterSetter(Q,`brightness`,0,X(),Z.afterSetFilter);var iy=function(e){var t=((this.contrast()+100)/100)**2,n=e.data,r=n.length,i=150,a=150,o=150,s;for(s=0;s<r;s+=4)i=n[s],a=n[s+1],o=n[s+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,i=i<0?0:i>255?255:i,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,n[s]=i,n[s+1]=a,n[s+2]=o};Z.addGetterSetter(Q,`contrast`,0,X(),Z.afterSetFilter);var ay=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),a=0,o=0,s=e.data,c=e.width,l=e.height,u=c*4,d=l;switch(r){case`top-left`:a=-1,o=-1;break;case`top`:a=-1,o=0;break;case`top-right`:a=-1,o=1;break;case`right`:a=0,o=1;break;case`bottom-right`:a=1,o=1;break;case`bottom`:a=1,o=0;break;case`bottom-left`:a=1,o=-1;break;case`left`:a=0,o=-1;break;default:Y.error(`Unknown emboss direction: `+r)}do{var f=(d-1)*u,p=a;d+p<1&&(p=0),d+p>l&&(p=0);var m=(d-1+p)*c*4,h=c;do{var g=f+(h-1)*4,_=o;h+_<1&&(_=0),h+_>c&&(_=0);var v=m+(h-1+_)*4,y=s[g]-s[v],b=s[g+1]-s[v+1],x=s[g+2]-s[v+2],S=y,C=S>0?S:-S,w=b>0?b:-b,T=x>0?x:-x;if(w>C&&(S=b),T>C&&(S=x),S*=t,i){var E=s[g]+S,D=s[g+1]+S,O=s[g+2]+S;s[g]=E>255?255:E<0?0:E,s[g+1]=D>255?255:D<0?0:D,s[g+2]=O>255?255:O<0?0:O}else{var ee=n-S;ee<0?ee=0:ee>255&&(ee=255),s[g]=s[g+1]=s[g+2]=ee}}while(--h)}while(--d)};Z.addGetterSetter(Q,`embossStrength`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`embossWhiteLevel`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`embossDirection`,`top-left`,null,Z.afterSetFilter),Z.addGetterSetter(Q,`embossBlend`,!1,null,Z.afterSetFilter);function oy(e,t,n,r,i){var a=n-t,o=i-r,s;return a===0?r+o/2:o===0?r:(s=(e-t)/a,s=o*s+r,s)}var sy=function(e){var t=e.data,n=t.length,r=t[0],i=r,a,o=t[1],s=o,c,l=t[2],u=l,d,f,p=this.enhance();if(p!==0){for(f=0;f<n;f+=4)a=t[f+0],a<r?r=a:a>i&&(i=a),c=t[f+1],c<o?o=c:c>s&&(s=c),d=t[f+2],d<l?l=d:d>u&&(u=d);i===r&&(i=255,r=0),s===o&&(s=255,o=0),u===l&&(u=255,l=0);var m,h,g,_,v,y,b,x,S;for(p>0?(h=i+p*(255-i),g=r-p*(r-0),v=s+p*(255-s),y=o-p*(o-0),x=u+p*(255-u),S=l-p*(l-0)):(m=(i+r)*.5,h=i+p*(i-m),g=r+p*(r-m),_=(s+o)*.5,v=s+p*(s-_),y=o+p*(o-_),b=(u+l)*.5,x=u+p*(u-b),S=l+p*(l-b)),f=0;f<n;f+=4)t[f+0]=oy(t[f+0],r,i,g,h),t[f+1]=oy(t[f+1],o,s,y,v),t[f+2]=oy(t[f+2],l,u,S,x)}};Z.addGetterSetter(Q,`enhance`,0,X(),Z.afterSetFilter);var cy=function(e){var t=e.data,n=t.length,r,i;for(r=0;r<n;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};Z.addGetterSetter(Q,`hue`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`saturation`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`luminance`,0,X(),Z.afterSetFilter);var ly=function(e){var t=e.data,n=t.length,r=1,i=2**this.saturation(),a=Math.abs(this.hue()+360)%360,o=this.luminance()*127,s,c=r*i*Math.cos(a*Math.PI/180),l=r*i*Math.sin(a*Math.PI/180),u=.299*r+.701*c+.167*l,d=.587*r-.587*c+.33*l,f=.114*r-.114*c-.497*l,p=.299*r-.299*c-.328*l,m=.587*r+.413*c+.035*l,h=.114*r-.114*c+.293*l,g=.299*r-.3*c+1.25*l,_=.587*r-.586*c-1.05*l,v=.114*r+.886*c-.2*l,y,b,x,S;for(s=0;s<n;s+=4)y=t[s+0],b=t[s+1],x=t[s+2],S=t[s+3],t[s+0]=u*y+d*b+f*x+o,t[s+1]=p*y+m*b+h*x+o,t[s+2]=g*y+_*b+v*x+o,t[s+3]=S},uy=function(e){var t=e.data,n=t.length,r=2**this.value(),i=2**this.saturation(),a=Math.abs(this.hue()+360)%360,o,s=r*i*Math.cos(a*Math.PI/180),c=r*i*Math.sin(a*Math.PI/180),l=.299*r+.701*s+.167*c,u=.587*r-.587*s+.33*c,d=.114*r-.114*s-.497*c,f=.299*r-.299*s-.328*c,p=.587*r+.413*s+.035*c,m=.114*r-.114*s+.293*c,h=.299*r-.3*s+1.25*c,g=.587*r-.586*s-1.05*c,_=.114*r+.886*s-.2*c,v,y,b,x;for(o=0;o<n;o+=4)v=t[o+0],y=t[o+1],b=t[o+2],x=t[o+3],t[o+0]=l*v+u*y+d*b,t[o+1]=f*v+p*y+m*b,t[o+2]=h*v+g*y+_*b,t[o+3]=x};Z.addGetterSetter(Q,`hue`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`saturation`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`value`,0,X(),Z.afterSetFilter);var dy=function(e){var t=e.data,n=t.length,r;for(r=0;r<n;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]},fy=function(e,t,n){var r=e.data,i=t.data,a=e.width,o=e.height,s=n.polarCenterX||a/2,c=n.polarCenterY||o/2,l,u,d,f=0,p=0,m=0,h=0,g,_=Math.sqrt(s*s+c*c);u=a-s,d=o-c,g=Math.sqrt(u*u+d*d),_=g>_?g:_;var v=o,y=a,b,x,S=360/y*Math.PI/180,C,w;for(x=0;x<y;x+=1)for(C=Math.sin(x*S),w=Math.cos(x*S),b=0;b<v;b+=1)u=Math.floor(s+_*b/v*w),d=Math.floor(c+_*b/v*C),l=(d*a+u)*4,f=r[l+0],p=r[l+1],m=r[l+2],h=r[l+3],l=(x+b*a)*4,i[l+0]=f,i[l+1]=p,i[l+2]=m,i[l+3]=h},py=function(e,t,n){var r=e.data,i=t.data,a=e.width,o=e.height,s=n.polarCenterX||a/2,c=n.polarCenterY||o/2,l,u,d,f,p,m=0,h=0,g=0,_=0,v,y=Math.sqrt(s*s+c*c);u=a-s,d=o-c,v=Math.sqrt(u*u+d*d),y=v>y?v:y;var b=o,x=a,S,C,w=n.polarRotation||0,T,E;for(u=0;u<a;u+=1)for(d=0;d<o;d+=1)f=u-s,p=d-c,S=Math.sqrt(f*f+p*p)*b/y,C=(Math.atan2(p,f)*180/Math.PI+360+w)%360,C=C*x/360,T=Math.floor(C),E=Math.floor(S),l=(E*a+T)*4,m=r[l+0],h=r[l+1],g=r[l+2],_=r[l+3],l=(d*a+u)*4,i[l+0]=m,i[l+1]=h,i[l+2]=g,i[l+3]=_},my=function(e){var t=e.width,n=e.height,r,i,a,o,s,c,l,u,d,f,p=Math.round(this.kaleidoscopePower()),m=Math.round(this.kaleidoscopeAngle()),h=Math.floor(m%360*t/360);if(!(p<1)){var g=Y.createCanvasElement();g.width=t,g.height=n;var _=g.getContext(`2d`).getImageData(0,0,t,n);fy(e,_,{polarCenterX:t/2,polarCenterY:n/2});for(var v=t/2**p;v<=8;)v*=2,--p;v=Math.ceil(v);var y=v,b=0,x=y,S=1;for(h+v>t&&(b=y,x=0,S=-1),i=0;i<n;i+=1)for(r=b;r!==x;r+=S)a=Math.round(r+h)%t,d=(t*i+a)*4,s=_.data[d+0],c=_.data[d+1],l=_.data[d+2],u=_.data[d+3],f=(t*i+r)*4,_.data[f+0]=s,_.data[f+1]=c,_.data[f+2]=l,_.data[f+3]=u;for(i=0;i<n;i+=1)for(y=Math.floor(v),o=0;o<p;o+=1){for(r=0;r<y+1;r+=1)d=(t*i+r)*4,s=_.data[d+0],c=_.data[d+1],l=_.data[d+2],u=_.data[d+3],f=(t*i+y*2-r-1)*4,_.data[f+0]=s,_.data[f+1]=c,_.data[f+2]=l,_.data[f+3]=u;y*=2}py(_,e,{polarRotation:0})}};Z.addGetterSetter(Q,`kaleidoscopePower`,2,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`kaleidoscopeAngle`,0,X(),Z.afterSetFilter);function hy(e,t,n){var r=(n*e.width+t)*4,i=[];return i.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),i}function gy(e,t){return Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2)}function _y(e){for(var t=[0,0,0],n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function vy(e,t){var n=hy(e,0,0),r=hy(e,e.width-1,0),i=hy(e,0,e.height-1),a=hy(e,e.width-1,e.height-1),o=t||10;if(gy(n,r)<o&&gy(r,a)<o&&gy(a,i)<o&&gy(i,n)<o){for(var s=_y([r,n,a,i]),c=[],l=0;l<e.width*e.height;l++)c[l]=gy(s,[e.data[l*4],e.data[l*4+1],e.data[l*4+2]])<o?0:255;return c}}function yy(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function by(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var l=s*t+c,u=0,d=0;d<i;d++)for(var f=0;f<i;f++){var p=s+d-a,m=c+f-a;if(p>=0&&p<n&&m>=0&&m<t){var h=p*t+m,g=r[d*i+f];u+=e[h]*g}}o[l]=u===2040?255:0}return o}function xy(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var l=s*t+c,u=0,d=0;d<i;d++)for(var f=0;f<i;f++){var p=s+d-a,m=c+f-a;if(p>=0&&p<n&&m>=0&&m<t){var h=p*t+m,g=r[d*i+f];u+=e[h]*g}}o[l]=u>=1020?255:0}return o}function Sy(e,t,n){for(var r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var l=s*t+c,u=0,d=0;d<i;d++)for(var f=0;f<i;f++){var p=s+d-a,m=c+f-a;if(p>=0&&p<n&&m>=0&&m<t){var h=p*t+m,g=r[d*i+f];u+=e[h]*g}}o[l]=u}return o}Z.addGetterSetter(Q,`threshold`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`noise`,.2,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`pixelSize`,8,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`levels`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`red`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`green`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`blue`,0,sh,Z.afterSetFilter),Z.addGetterSetter(Q,`red`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`green`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`blue`,0,sh,Z.afterSetFilter),Z.addGetterSetter(Q,`alpha`,1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}),Z.addGetterSetter(Q,`threshold`,.5,X(),Z.afterSetFilter),k_.Util._assign(k_,{Arc:A_,Arrow:F_,Circle:I_,Ellipse:L_,Image:R_,Label:q_,Tag:J_,Line:N_,Path:P_,Rect:Y_,RegularPolygon:X_,Ring:Q_,Sprite:$_,Star:ev,Text:Av,TextPath:Fv,Transformer:Yv,Wedge:Zv,Filters:{Blur:ny,Brighten:ry,Contrast:iy,Emboss:ay,Enhance:sy,Grayscale:cy,HSL:ly,HSV:uy,Invert:dy,Kaleidoscope:my,Mask:function(e){var t=vy(e,this.threshold());return t&&(t=by(t,e.width,e.height),t=xy(t,e.width,e.height),t=Sy(t,e.width,e.height),yy(e,t)),e},Noise:function(e){var t=this.noise()*255,n=e.data,r=n.length,i=t/2,a;for(a=0;a<r;a+=4)n[a+0]+=i-2*i*Math.random(),n[a+1]+=i-2*i*Math.random(),n[a+2]+=i-2*i*Math.random()},Pixelate:function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,a,o,s,c,l,u,d=Math.ceil(n/t),f=Math.ceil(r/t),p,m,h,g,_,v,y,b=e.data;if(t<=0){Y.error(`pixelSize value can not be <= 0`);return}for(_=0;_<d;_+=1)for(v=0;v<f;v+=1){for(s=0,c=0,l=0,u=0,p=_*t,m=p+t,h=v*t,g=h+t,y=0,i=p;i<m;i+=1)if(!(i>=n))for(a=h;a<g;a+=1)a>=r||(o=(n*a+i)*4,s+=b[o+0],c+=b[o+1],l+=b[o+2],u+=b[o+3],y+=1);for(s/=y,c/=y,l/=y,u/=y,i=p;i<m;i+=1)if(!(i>=n))for(a=h;a<g;a+=1)a>=r||(o=(n*a+i)*4,b[o+0]=s,b[o+1]=c,b[o+2]=l,b[o+3]=u)}},Posterize:function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,a;for(a=0;a<r;a+=1)n[a]=Math.floor(n[a]/i)*i},RGB:function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),a=this.blue(),o,s;for(o=0;o<n;o+=4)s=(.34*t[o]+.5*t[o+1]+.16*t[o+2])/255,t[o]=s*r,t[o+1]=s*i,t[o+2]=s*a,t[o+3]=t[o+3]},RGBA:function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),a=this.blue(),o=this.alpha(),s,c;for(s=0;s<n;s+=4)c=1-o,t[s]=r*o+t[s]*c,t[s+1]=i*o+t[s+1]*c,t[s+2]=a*o+t[s+2]*c},Sepia:function(e){var t=e.data,n=t.length,r,i,a,o;for(r=0;r<n;r+=4)i=t[r+0],a=t[r+1],o=t[r+2],t[r+0]=Math.min(255,i*.393+a*.769+o*.189),t[r+1]=Math.min(255,i*.349+a*.686+o*.168),t[r+2]=Math.min(255,i*.272+a*.534+o*.131)},Solarize:function(e){var t=e.data,n=e.width,r=e.height,i=n*4,a=r;do{var o=(a-1)*i,s=n;do{var c=o+(s-1)*4,l=t[c],u=t[c+1],d=t[c+2];l>127&&(l=255-l),u>127&&(u=255-u),d>127&&(d=255-d),t[c]=l,t[c+1]=u,t[c+2]=d}while(--s)}while(--a)},Threshold:function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=1)n[i]=n[i]<t?0:255}}});var Cy=k_,wy=o(((e,t)=>{t.exports=function(e){var t={},n=d(),r=p(),i=Object.assign;function a(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,s=Symbol.for(`react.element`),c=Symbol.for(`react.portal`),l=Symbol.for(`react.fragment`),u=Symbol.for(`react.strict_mode`),f=Symbol.for(`react.profiler`),m=Symbol.for(`react.provider`),h=Symbol.for(`react.context`),g=Symbol.for(`react.forward_ref`),_=Symbol.for(`react.suspense`),v=Symbol.for(`react.suspense_list`),y=Symbol.for(`react.memo`),b=Symbol.for(`react.lazy`),x=Symbol.for(`react.offscreen`),S=Symbol.iterator;function C(e){return typeof e!=`object`||!e?null:(e=S&&e[S]||e[`@@iterator`],typeof e==`function`?e:null)}function w(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case l:return`Fragment`;case c:return`Portal`;case f:return`Profiler`;case u:return`StrictMode`;case _:return`Suspense`;case v:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case h:return(e.displayName||`Context`)+`.Consumer`;case m:return(e._context.displayName||`Context`)+`.Provider`;case g:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case y:return t=e.displayName||null,t===null?w(e.type)||`Memo`:t;case b:t=e._payload,e=e._init;try{return w(e(t))}catch{}}return null}function T(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return w(t);case 8:return t===u?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function E(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function D(e){if(E(e)!==e)throw Error(a(188))}function O(e){var t=e.alternate;if(!t){if(t=E(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return D(i),e;if(o===r)return D(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function ee(e){return e=O(e),e===null?null:te(e)}function te(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=te(e);if(t!==null)return t;e=e.sibling}return null}function k(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){if(e.tag!==4){var t=k(e);if(t!==null)return t}e=e.sibling}return null}var A=Array.isArray,j=e.getPublicInstance,M=e.getRootHostContext,ne=e.getChildHostContext,N=e.prepareForCommit,re=e.resetAfterCommit,ie=e.createInstance,P=e.appendInitialChild,ae=e.finalizeInitialChildren,oe=e.prepareUpdate,se=e.shouldSetTextContent,ce=e.createTextInstance,le=e.scheduleTimeout,ue=e.cancelTimeout,de=e.noTimeout,fe=e.isPrimaryRenderer,pe=e.supportsMutation,me=e.supportsPersistence,he=e.supportsHydration,ge=e.getInstanceFromNode,_e=e.preparePortalMount,ve=e.getCurrentEventPriority,ye=e.detachDeletedInstance,be=e.supportsMicrotasks,xe=e.scheduleMicrotask,Se=e.supportsTestSelectors,Ce=e.findFiberRoot,we=e.getBoundingRect,Te=e.getTextContent,Ee=e.isHiddenSubtree,De=e.matchAccessibilityRole,Oe=e.setFocusIfFocusable,ke=e.setupIntersectionObserver,Ae=e.appendChild,je=e.appendChildToContainer,Me=e.commitTextUpdate,Ne=e.commitMount,Pe=e.commitUpdate,Fe=e.insertBefore,Ie=e.insertInContainerBefore,Le=e.removeChild,Re=e.removeChildFromContainer,ze=e.resetTextContent,Be=e.hideInstance,Ve=e.hideTextInstance,He=e.unhideInstance,Ue=e.unhideTextInstance,We=e.clearContainer,Ge=e.cloneInstance,Ke=e.createContainerChildSet,qe=e.appendChildToContainerChildSet,Je=e.finalizeContainerChildren,Ye=e.replaceContainerChildren,Xe=e.cloneHiddenInstance,Ze=e.cloneHiddenTextInstance,Qe=e.canHydrateInstance,$e=e.canHydrateTextInstance,et=e.canHydrateSuspenseInstance,tt=e.isSuspenseInstancePending,nt=e.isSuspenseInstanceFallback,rt=e.getSuspenseInstanceFallbackErrorDetails,it=e.registerSuspenseInstanceRetry,at=e.getNextHydratableSibling,ot=e.getFirstHydratableChild,st=e.getFirstHydratableChildWithinContainer,ct=e.getFirstHydratableChildWithinSuspenseInstance,lt=e.hydrateInstance,ut=e.hydrateTextInstance,dt=e.hydrateSuspenseInstance,ft=e.getNextHydratableInstanceAfterSuspenseInstance,pt=e.commitHydratedContainer,mt=e.commitHydratedSuspenseInstance,ht=e.clearSuspenseBoundary,gt=e.clearSuspenseBoundaryFromContainer,_t=e.shouldDeleteUnhydratedTailInstances,vt=e.didNotMatchHydratedContainerTextInstance,yt=e.didNotMatchHydratedTextInstance,bt;function xt(e){if(bt===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);bt=t&&t[1]||``}return`
|
|
150
150
|
`+bt+e}var St=!1;function Ct(e,t){if(!e||St)return``;St=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
151
151
|
`),a=r.stack.split(`
|