@pie-element/drawing-response 12.1.2-next.12 → 12.1.2-next.14
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/author.js +2 -0
- package/dist/browser/delivery/index.js +106 -4
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/index.iife.js +7 -7
- package/package.json +3 -2
package/dist/index.iife.js
CHANGED
|
@@ -142,10 +142,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
142
142
|
animation: ${Ud} 1.4s linear infinite;
|
|
143
143
|
`,Kd=typeof Wd==`string`?null:gn`
|
|
144
144
|
animation: ${Wd} 1.4s ease-in-out infinite;
|
|
145
|
-
`,qd=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return La({root:[`root`,n,`color${G(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${G(n)}`,i&&`circleDisableShrink`]},Vd,t)},Jd=U(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${G(n.color)}`]]}})(Wc(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:Gd||{animation:`${Ud} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Bd()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Yd=U(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Xd=U(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${G(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Wc(({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:Kd||{animation:`${Wd} 1.4s ease-in-out infinite`}}]}))),Zd=U(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Wc(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),Qd=L.forwardRef(function(e,t){let n=ys({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=qd(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((Hd-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,R.jsx)(Jd,{className:B(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,R.jsxs)(Yd,{className:m.svg,ownerState:p,viewBox:`${Hd/2} ${Hd/2} ${Hd} ${Hd}`,children:[o?(0,R.jsx)(Zd,{className:m.track,ownerState:p,cx:Hd,cy:Hd,r:(Hd-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,R.jsx)(Xd,{className:m.circle,style:h,ownerState:p,cx:Hd,cy:Hd,r:(Hd-l)/2,fill:`none`,strokeWidth:l})]})})});function $d(e){return gi(`MuiButton`,e)}var ef=_i(`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(`.`)),tf=L.createContext({}),nf=L.createContext(void 0);I();var rf=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=La({root:[`root`,o&&`loading`,a,`${a}${G(t)}`,`size${G(i)}`,`${a}Size${G(i)}`,`color${G(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${G(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${G(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${G(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},$d,c);return{...c,...l}},af=[{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}}}],of=U(Id,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${G(n.color)}`],t[`size${G(n.size)}`],t[`${n.variant}Size${G(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Wc(({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`},[`&.${ef.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]},[`&.${ef.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${ef.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)`,[`&.${ef.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(Bd()).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`},[`&.${ef.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${ef.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}),[`&.${ef.loading}`]:{color:`transparent`}}}]}})),sf=U(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${G(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}},...af]})),cf=U(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${G(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}},...af]})),lf=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}}]})),uf=U(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),df=L.forwardRef(function(e,t){let n=L.useContext(tf),r=L.useContext(nf),i=ys({props:Ai(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=Ol(h),T=_??(0,R.jsx)(Qd,{"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=rf(E),O=(b||g&&v===`start`)&&(0,R.jsx)(sf,{className:D.startIcon,ownerState:E,children:b||(0,R.jsx)(uf,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,R.jsx)(cf,{className:D.endIcon,ownerState:E,children:f||(0,R.jsx)(uf,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,k=typeof g==`boolean`?(0,R.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,R.jsx)(lf,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:A,...ne}=D;return(0,R.jsxs)(of,{ownerState:E,className:B(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:B(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:ne,children:[O,v!==`end`&&k,a,v===`end`&&k,ee]})}),ff=Tl((0,R.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`),pf=Tl((0,R.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`);I();var mf=U(`div`)({display:`flex`,flexDirection:`column`}),hf=U(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),gf=U(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),_f=U(df)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),vf=e=>{class t extends L.Component{static propTypes={session:F.object,onSessionChange:F.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,R.jsxs)(mf,{children:[(0,R.jsxs)(hf,{children:[(0,R.jsxs)(_f,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,R.jsx)(gf,{children:(0,R.jsx)(pf,{})}),`Undo`]}),(0,R.jsxs)(_f,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,R.jsx)(gf,{children:(0,R.jsx)(ff,{})}),`Start Over`]})]}),(0,R.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t};I();var yf=Jo({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`}}}}}}),bf=U(`div`)({"& table, th, td":{fontSize:`inherit`}}),xf=class extends L.Component{static propTypes={className:F.string,children:F.array,extraCSSRules:F.shape({names:F.arrayOf(F.string),rules:F.string}),fontSizeFactor:F.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,R.jsx)(Mn,{injectFirst:!0,children:(0,R.jsxs)(as,{theme:yf,children:[i?.rules?(0,R.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,(0,R.jsx)(bf,{className:`${t} extraCSSRules`,...a,...o&&{style:o},children:e})]})})}};I();var Sf=U(xf)({display:`flex`,flexDirection:`column`,position:`relative`}),Cf=class extends L.Component{static propTypes={ariaLabel:F.string,children:F.oneOfType([F.arrayOf(F.node),F.node]).isRequired,role:F.string,extraCSSRules:F.shape({names:F.arrayOf(F.string),rules:F.string}),fontSizeFactor:F.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,R.jsx)(Sf,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}};I();var wf=class extends L.Component{static propTypes={tag:F.string,className:F.string,html:F.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,R.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}};function Tf({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 Ef=L.createContext(void 0);function Df(){return L.useContext(Ef)}function Of(e){return gi(`MuiFormLabel`,e)}var kf=_i(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]);I();var Af=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return La({root:[`root`,`color${G(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},Of,t)},jf=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]}})(Wc(({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(Bd()).map(([t])=>({props:{color:t},style:{[`&.${kf.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${kf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${kf.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Mf=U(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Wc(({theme:e})=>({[`&.${kf.error}`]:{color:(e.vars||e).palette.error.main}}))),Nf=L.forwardRef(function(e,t){let n=ys({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=Tf({props:n,muiFormControl:Df(),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=Af(m);return(0,R.jsxs)(jf,{as:o,ownerState:m,className:B(h.root,i),ref:t,...f,children:[r,p.required&&(0,R.jsxs)(Mf,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function Pf(e){return gi(`MuiInputLabel`,e)}_i(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),I();var Ff=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=La({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${G(r)}`,o],asterisk:[s&&`asterisk`]},Pf,t);return{...t,...c}},If=U(Nf,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${kf.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]]}})(Wc(({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)`}}]}))),Lf=L.forwardRef(function(e,t){let n=ys({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=Df(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=Tf({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=Ff(f);return(0,R.jsx)(If,{"data-shrink":u,ref:t,className:B(p.root,s),...c,ownerState:f,classes:p})});function Rf(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function zf(e,t=!1){return e&&(Rf(e.value)&&e.value!==``||t&&Rf(e.defaultValue)&&e.defaultValue!==``)}function Bf(e){return e.startAdornment}function Vf(e){return gi(`MuiFormControl`,e)}_i(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]),I();var Hf=e=>{let{classes:t,margin:n,fullWidth:r}=e;return La({root:[`root`,n!==`none`&&`margin${G(n)}`,r&&`fullWidth`]},Vf,t)},Uf=U(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${G(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%`}}]}),Wf=L.forwardRef(function(e,t){let n=ys({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=Hf(_),[y,b]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{if(!El(t,[`Input`,`Select`]))return;let n=El(t,[`Select`])?t.props.input:t;n&&Bf(n.props)&&(e=!0)}),e}),[x,S]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{El(t,[`Input`,`Select`])&&(zf(t.props,!0)||zf(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=L.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;L.useRef(!1);let E=L.useCallback(()=>{S(!0)},[]),D=L.useCallback(()=>{S(!1)},[]),O=L.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,R.jsx)(Ef.Provider,{value:O,children:(0,R.jsx)(Uf,{as:o,ownerState:_,className:B(v.root,i),ref:t,...g,children:r})})});I();var Gf=U(Wf)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),Kf=U(Lf)(()=>({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)`}})),qf=({label:e,className:t,children:n})=>(0,R.jsxs)(Gf,{className:t,children:[(0,R.jsx)(Kf,{shrink:!0,children:e}),n]});qf.propTypes={label:F.oneOfType([F.string,F.object]).isRequired,className:F.string,children:F.oneOfType([F.arrayOf(F.node),F.node]).isRequired},I();var Jf=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:Tu()},'&: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:Du()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:Du()},'&: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:Kl()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Kl()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),Yf=/\\embed\{newLine\}\[\]/g,Xf=`\\newline `,Zf=`preview-prompt`,Qf=class extends L.Component{static propTypes={prompt:F.string,tagName:F.string,className:F.string,onClick:F.func,defaultClassName:F.string,autoplayAudioEnabled:F.bool,customAudioButton:F.shape({playImage:F.string,pauseImage:F.string})};static defaultProps={onClick:()=>{}};promptRef=L.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 re==`function`&&re(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`:``} ${Zf}`.trim();return(0,R.jsx)(Jf,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(Yf,Xf)}})}};I();var $f=e=>(0,R.jsx)(R.Fragment,{children:L.Children.map(e.children,t=>L.cloneElement(t,{"data-pie-readable":e.false===void 0}))});$f.propTypes={children:F.node,false:F.bool},I();var ep=e=>(0,R.jsx)(R.Fragment,{children:L.Children.map(e.children,t=>L.cloneElement(t,{"data-pie-purpose":e.purpose}))});ep.propTypes={children:F.node,purpose:F.string};var tp;typeof window<`u`&&(tp=new DOMParser);var np=e=>tp.parseFromString(e,`text/html`).body.textContent,rp=e=>{if(!e)return!1;let t=np(e);return!!(t&&t.trim())},ip;typeof window<`u`&&(ip=new DOMParser);var ap=e=>{if(!e)return!1;let t=ip.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},op=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZ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wFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function sp(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 cp(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:Kc(n,r),{props:s,internalRef:c}=Yc({...a,externalSlotProps:o}),l=pc(c,o?.ref,e.additionalProps?.ref);return Gc(t,{...s,ref:l},r)}var lp=L.createContext({});function up(e){return gi(`MuiList`,e)}_i(`MuiList`,[`root`,`padding`,`dense`,`subheader`]),I();var dp=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return La({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},up,t)},fp=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}}]}),pp=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=L.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=dp(d);return(0,R.jsx)(lp.Provider,{value:u,children:(0,R.jsxs)(fp,{as:a,className:B(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),mp=yc;I();function hp(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function gp(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function _p(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 vp(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`)||!_p(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var yp=L.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=L.useRef(null),p=L.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Dl(()=>{r&&f.current.focus()},[r]),L.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${mp(Ts(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=jc(Cs(t));if(n===`ArrowDown`)e.preventDefault(),vp(t,r,c,s,hp);else if(n===`ArrowUp`)e.preventDefault(),vp(t,r,c,s,gp);else if(n===`Home`)e.preventDefault(),vp(t,null,c,s,hp);else if(n===`End`)e.preventDefault(),vp(t,null,c,s,gp);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&&_p(r,i);i.previousKeyMatched&&(c||vp(t,r,!1,s,hp,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=mc(f,t),g=-1;L.Children.forEach(a,(e,t)=>{if(!L.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 _=L.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),L.cloneElement(e,t)}return e});return(0,R.jsx)(pp,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function bp(e){return gi(`MuiMenu`,e)}_i(`MuiMenu`,[`root`,`paper`,`list`]),I();var xp={vertical:`top`,horizontal:`right`},Sp={vertical:`top`,horizontal:`left`},Cp=e=>{let{classes:t}=e;return La({root:[`root`],paper:[`paper`],list:[`list`]},bp,t)},wp=U(Vl,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),Tp=U(Bl,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),Ep=U(yp,{name:`MuiMenu`,slot:`List`})({outline:0}),Dp=L.forwardRef(function(e,t){let n=ys({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=ra(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=Cp(b),S=r&&!o&&l,C=L.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;L.Children.map(i,(e,t)=>{L.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=cp({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[ee,te]=Xc(`paper`,{className:x.paper,elementType:Tp,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[k,A]=Xc(`list`,{className:B(x.list,s.className),elementType:Ep,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,R.jsx)(wp,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?xp:Sp,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,R.jsx)(k,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...A,children:i})})}),Op=({slotProps:e,...t})=>(0,R.jsx)(Dp,{...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}}}}),kp=c({Collapsible:()=>vd,EnableAudioAutoplayImage:()=>op,Feedback:()=>Qu,HtmlAndMath:()=>wf,InlineMenu:()=>Op,InputContainer:()=>qf,PreviewLayout:()=>Cf,PreviewPrompt:()=>Qf,Purpose:()=>ep,Readable:()=>$f,UiLayout:()=>xf,color:()=>Wl,hasMedia:()=>ap,hasText:()=>rp,indicators:()=>ed,transformDataHeadings:()=>sp,withUndoReset:()=>vf}),Ap=e=>typeof e==`string`,jp=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Mp=e=>e==null?``:``+e,Np=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Pp=/###/g,Fp=e=>e&&e.indexOf(`###`)>-1?e.replace(Pp,`.`):e,Ip=e=>!e||Ap(e),Lp=(e,t,n)=>{let r=Ap(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Ip(e))return{};let t=Fp(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Ip(e)?{}:{obj:e,k:Fp(r[i])}},Rp=(e,t,n)=>{let{obj:r,k:i}=Lp(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=Lp(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Lp(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},zp=(e,t,n,r)=>{let{obj:i,k:a}=Lp(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Bp=(e,t)=>{let{obj:n,k:r}=Lp(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Vp=(e,t,n)=>{let r=Bp(e,n);return r===void 0?Bp(t,n):r},Hp=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Ap(e[r])||e[r]instanceof String||Ap(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Hp(e[r],t[r],n):e[r]=t[r]);return e},Up=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Wp={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Gp=e=>Ap(e)?e.replace(/[&<>"'\/]/g,e=>Wp[e]):e,Kp=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}},qp=[` `,`,`,`?`,`!`,`;`],Jp=new Kp(20),Yp=(e,t,n)=>{t||=``,n||=``;let r=qp.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Jp.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},Xp=(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},Zp=e=>e?.replace(/_/g,`-`),Qp={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)}},$p=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Qp,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:(Ap(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)}},em=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])})}},tm=class extends em{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):Ap(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Bp(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Ap(n)?s:Xp(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),Rp(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)(Ap(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=Bp(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Hp(s,n,i):s={...s,...n},Rp(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}},nm={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}},rm=Symbol(`i18next/PATH_KEY`);function im(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===rm?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function am(e,t){let{[rm]:n}=e(im()),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 om={},sm=e=>!Ap(e)&&typeof e!=`boolean`&&typeof e!=`number`,cm=class e extends em{constructor(e,t={}){super(),Np([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=$p.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=sm(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&&!Yp(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Ap(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:Ap(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=am(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?am(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&&!Ap(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=sm(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(Ap(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:sm(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&&Ap(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=Ap(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&&!Ap(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=Ap(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=nm.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 Ap(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?am(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&&!Ap(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Ap(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,!om[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(om[`${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&&!Ap(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}},lm=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$p.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Zp(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=Zp(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Ap(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)),Ap(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 Ap(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))):Ap(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},um={zero:0,one:1,two:2,few:3,many:4,other:5},dm={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},fm=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=$p.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Zp(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!`),dm;if(!e.match(/-|_/))return dm;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)=>um[e]-um[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))}},pm=(e,t,n,r=`.`,i=!0)=>{let a=Vp(e,t,n);return!a&&i&&Ap(n)&&(a=Xp(e,n,r),a===void 0&&(a=Xp(t,n,r))),a},mm=e=>e.replace(/\$/g,`$$$$`),hm=class{constructor(e={}){this.logger=$p.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?Gp:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Up(i):a||`{{`,this.suffix=o?Up(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Up(d):f||Up(`$t(`),this.nestingSuffix=p?Up(p):m||Up(`)`),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=pm(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(pm(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=>mm(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?mm(this.escape(e)):mm(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=Ap(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!Ap(a)&&!this.useRawValueToEscape&&(a=Mp(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(`${Up(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&&!Ap(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&&!Ap(i))return i;Ap(i)||(i=Mp(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}},gm=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}},_m=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(Zp(r),i),t[o]=s),s(n)}},vm=e=>(t,n,r)=>e(Zp(n),r)(t),ym=class{constructor(e={}){this.logger=$p.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?_m:vm;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()]=_m(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}=gm(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)}},bm=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},xm=class extends em{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=$p.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=>{zp(n.loaded,[i],a),bm(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();Ap(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Ap(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)}}},Sm=()=>({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]),Ap(e[1])&&(t.defaultValue=e[1]),Ap(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}),Cm=e=>(Ap(e.ns)&&(e.ns=[e.ns]),Ap(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ap(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),wm=()=>{},Tm=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Em=`__i18next_supportNoticeShown`,Dm=()=>!!(typeof globalThis<`u`&&globalThis[Em]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),Om=()=>{typeof globalThis<`u`&&(globalThis[Em]=!0)},km=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)),Am=class e extends em{constructor(e={},t){if(super(),this.options=Cm(e),this.services={},this.logger=$p,this.modules={external:[]},Tm(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&&(Ap(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=Sm();this.options={...n,...this.options,...Cm(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&&!km(this)&&!Dm()&&(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 💙`),Om());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?$p.init(r(this.modules.logger),this.options):$p.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ym;let t=new lm(this.options);this.store=new tm(this.options.resources,this.options);let i=this.services;i.logger=$p,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new fm(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 hm(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new xm(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 cm(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||=wm,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=jp(),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=wm){let n=t,r=Ap(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=jp();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||=wm,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`&&nm.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=jp();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=Ap(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Ap(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=am(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=am(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=am(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return Ap(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=jp();return this.options.ns?(Ap(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=jp();Ap(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 lm(Sm());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=wm){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 tm(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={...Sm().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new hm(n)}return a.translator=new cm(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();Am.createInstance,Am.dir,Am.init,Am.loadResources,Am.reloadResources,Am.use,Am.changeLanguage,Am.getFixedT,Am.t,Am.exists,Am.setDefaultNamespace,Am.hasLoadedNamespace,Am.loadNamespaces,Am.loadLanguages,Am.init({fallbackLng:`en`,lng:`en`,debug:!0,resources:{en:{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.`},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`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,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`}},es:{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.`},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`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,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`}}}});var jm={translator:{...Am,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 Am.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},Mm={tools:[{type:`Select`,label:`Select`,icon:`mdiCursorDefault`},{type:`FreePathDrawable`,label:`Free Draw`,icon:`mdiPencil`},{type:`LineDrawable`,label:`Line`,icon:`mdiMinus`},{type:`RectangleDrawable`,label:`Rectangle`,icon:`mdiRectangle`},{type:`CircleDrawable`,label:`Circle`,icon:`mdiCircle`},{type:`Text`,label:`Text Entry`,icon:`mdiFormatColorText`},{type:`EraserDrawable`,label:`Eraser`,icon:`mdiEraser`}]};I();var Nm=U(df)({fontSize:`0.9em`,marginLeft:8,minWidth:32,height:32,"& span":{"& svg":{width:`1.3em !important`,height:`1.3em !important`}}}),Pm=({label:e,onClick:t,disabled:n,title:r})=>(0,R.jsx)(Nm,{title:r,onClick:t,disabled:n,size:`small`,variant:`contained`,children:e});Pm.propTypes={disabled:F.bool,label:F.oneOfType([F.string,F.object]),onClick:F.func,title:F.string},Pm.defaultProps={disabled:!1,label:`Add`,onClick:()=>{},title:``};function Fm(e){return gi(`MuiNativeSelect`,e)}var Im=_i(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);I();var Lm=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return La({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${G(n)}`,a&&`iconOpen`,r&&`disabled`]},Fm,t)},Rm=U(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${Im.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),zm=U(Rm,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:Qo,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Im.multiple}`]:t.multiple}]}})({}),Bm=U(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${Im.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),Vm=U(Bm,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${G(n.variant)}`],n.open&&t.iconOpen]}})({}),Hm=L.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=Lm(l);return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(zm,{ownerState:l,className:B(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,R.jsx)(Vm,{as:a,ownerState:l,className:u.icon})]})});function Um(e){return gi(`MuiSelect`,e)}var Wm=_i(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function Gm(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function Km(e){return e==null||typeof e==`string`&&!e.trim()}function qm(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var Jm=L.createContext(null);function Ym(){return L.useContext(Jm)}var Xm=Jm.Provider;I();var Zm,Qm=U(Rm,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${Wm.select}`]:t.select},{[`&.${Wm.select}`]:t[n.variant]},{[`&.${Wm.error}`]:t.error},{[`&.${Wm.multiple}`]:t.multiple}]}})({[`&.${Wm.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),$m=U(Bm,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${G(n.variant)}`],n.open&&t.iconOpen]}})({}),eh=U(`input`,{shouldForwardProp:e=>Zo(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),th=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return La({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${G(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},Um,t)},nh=L.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:D,renderValue:O,required:ee,SelectDisplayProps:te={},tabIndex:k,type:A,value:ne,variant:j=`standard`,...re}=e,[M,N]=Al({controlled:ne,default:l,name:`Select`}),[ie,P]=Al({controlled:E,default:c,name:`Select`}),F=L.useRef(null),I=L.useRef(null),[ae,oe]=L.useState(null),{current:se}=L.useRef(E!=null),[ce,le]=L.useState(),[ue,de]=L.useState(null),fe=mc(t,m),pe=L.useCallback(e=>{I.current=e,e&&oe(e)},[]),me=ae?.parentNode;L.useImperativeHandle(fe,()=>({focus:()=>{I.current.focus()},node:F.current,value:M}),[M]);let he=ae!==null&&ie;L.useEffect(()=>{if(!he||!me||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{le(me.clientWidth)});return e.observe(me),()=>{e.disconnect()}},[he,me,a]),L.useEffect(()=>{c&&ie&&ae&&!se&&(le(a?null:me.clientWidth),I.current.focus())},[ae,a]),L.useEffect(()=>{i&&I.current.focus()},[i]),L.useEffect(()=>{if(!h)return;let e=Cs(I.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&I.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let ge=(e,t)=>{e?(de(Gm(t)),T&&T(t)):(de(null),x&&x(t)),se||(le(a?null:me.clientWidth),P(e))},_e=e=>{w?.(e),e.button===0&&(e.preventDefault(),I.current.focus(),ge(!0,e))},ve=e=>{ge(!1,e)},be=L.Children.toArray(o),xe=e=>{let t=be.find(t=>t.props.value===e.target.value);t!==void 0&&(N(t.props.value),b&&b(e,t))},Se=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(M)?M.slice():[];let t=M.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),M!==n&&(N(n),b)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,e)}_||ge(!1,t)}},Ce=e=>{D||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),ge(!0,e)),C?.(e))},we=e=>{!he&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:M,name:v}}),y(e))};delete re[`aria-invalid`];let Te,Ee,De=[],Oe=!1;(zf({value:M})||d)&&(O?Te=O(M):Oe=!0);let ke=be.map(e=>{if(!L.isValidElement(e))return null;let t;if(_){if(!Array.isArray(M))throw Error(ye(2));t=M.some(t=>qm(t,e.props.value)),t&&Oe&&De.push(e.props.children)}else t=qm(M,e.props.value),t&&Oe&&(Ee=e.props.children);return L.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:Se(e),onKeyUp:t=>{t.key===` `&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:`option`,selected:t,value:void 0,"data-value":e.props.value})});Oe&&(Te=_?De.length===0?null:De.reduce((e,t,n)=>(e.push(t),n<De.length-1&&e.push(`, `),e),[]):Ee);let Ae=ce;!a&&se&&ae&&(Ae=me.clientWidth);let je;je=k===void 0?u?null:0:k;let Me=te.id||(v?`mui-component-select-${v}`:void 0),Ne={...e,variant:j,value:M,open:he,error:f},Pe=th(Ne),Fe={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(Ne):g.slotProps?.paper},Ie={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(Ne):g.slotProps?.list},Le=da();return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(Qm,{as:`div`,ref:pe,tabIndex:je,role:`combobox`,"aria-controls":he?Le:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":he?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,Me].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":ee?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Ce,onMouseDown:u||D?null:_e,onBlur:we,onFocus:S,...te,ownerState:Ne,className:B(te.className,Pe.select,s),id:Me,children:Km(Te)?Zm||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):Te}),(0,R.jsx)(eh,{"aria-invalid":f,value:Array.isArray(M)?M.join(`,`):M,name:v,ref:F,"aria-hidden":!0,onChange:xe,tabIndex:-1,disabled:u,className:Pe.nativeInput,autoFocus:i,required:ee,...re,ownerState:Ne}),(0,R.jsx)($m,{as:p,className:Pe.icon,ownerState:Ne}),(0,R.jsx)(Xm,{value:ue,children:(0,R.jsx)(Dp,{id:`menu-${v||``}`,anchorEl:me,open:he,onClose:ve,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:Le,...Ie},paper:{...Fe,style:{minWidth:Ae,...Fe==null?null:Fe.style}}},children:ke})})]})}),rh=Tl((0,R.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);I();function ih(e){return parseInt(e,10)||0}var ah={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function oh(e){for(let t in e)return!1;return!0}function sh(e){return oh(e)||e.outerHeightStyle===0&&!e.overflowing}var ch=L.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=L.useRef(o!=null),l=L.useRef(null),u=pc(t,l),d=L.useRef(null),f=L.useRef(null),p=L.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=ws(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
|
|
146
|
-
`&&(n.value+=` `);let o=a.boxSizing,s=
|
|
147
|
-
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,R.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...ah.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function lh(e){return gi(`MuiInputBase`,e)}var uh=_i(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]);I();var dh,fh=`mui-auto-fill`,ph=`mui-auto-fill-cancel`,mh=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${G(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},hh=(e,t)=>{let{ownerState:n}=e;return[t.input,n.size===`small`&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type===`search`&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},gh=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return La({root:[`root`,`color${G(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${G(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,u&&`inputMultiline`,f===`small`&&`inputSizeSmall`,l&&`inputHiddenLabel`,p&&`inputAdornedStart`,a&&`inputAdornedEnd`,d&&`readOnly`]},lh,t)},_h=U(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:mh})(Wc(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${uh.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),vh=U(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:hh})(Wc(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create(`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${uh.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${uh.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:ph,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:fh}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),yh=vs({[`@keyframes ${fh}`]:{from:{animationName:fh}},[`@keyframes ${ph}`]:{from:{animationName:ph}}}),bh=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiInputBase`}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:o,color:s,components:c={},componentsProps:l={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:f,endAdornment:p,error:m,fullWidth:h=!1,id:g,inputComponent:_=`input`,inputProps:v={},inputRef:y,margin:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onClick:D,onFocus:O,onKeyDown:ee,onKeyUp:te,placeholder:k,readOnly:A,renderSuffix:ne,rows:j,size:re,slotProps:M={},slots:N={},startAdornment:ie,type:P=`text`,value:F,...I}=n,ae=v.value==null?F:v.value,{current:oe}=L.useRef(ae!=null),se=L.useRef(),ce=L.useCallback(e=>{},[]),le=mc(se,y,v.ref,ce),[ue,de]=L.useState(!1),fe=Df(),pe=Tf({props:n,muiFormControl:fe,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});pe.focused=fe?fe.focused:ue,L.useEffect(()=>{!fe&&d&&ue&&(de(!1),T&&T())},[fe,d,ue,T]);let me=fe&&fe.onFilled,he=fe&&fe.onEmpty,ge=L.useCallback(e=>{zf(e)?me&&me():he&&he()},[me,he]);Dl(()=>{oe&&ge({value:ae})},[ae,ge,oe]),Dl(()=>{if(!a)return;let e=se.current;if(!e)return;let t=Cs(e),n=jc(t),r=n==null||n===t.body||n===t.documentElement;e===n?fe&&fe.onFocus?fe.onFocus():de(!0):r&&e.focus()},[a]);let _e=e=>{O&&O(e),v.onFocus&&v.onFocus(e),fe&&fe.onFocus?fe.onFocus(e):de(!0)},ve=e=>{T&&T(e),v.onBlur&&v.onBlur(e),fe&&fe.onBlur?fe.onBlur(e):de(!1)},be=(e,...t)=>{if(!oe){let t=e.target||se.current;if(t==null)throw Error(ye(1));ge({value:t.value})}v.onChange&&v.onChange(e,...t),E&&E(e,...t)};L.useEffect(()=>{ge(se.current)},[]);let xe=e=>{se.current&&e.currentTarget===e.target&&se.current.focus(),D&&D(e)},Se=_,Ce=v;C&&Se===`input`&&(Ce=j?{type:void 0,minRows:j,maxRows:j,...Ce}:{type:void 0,maxRows:x,minRows:S,...Ce},Se=ch);let we=e=>{ge(e.animationName===ph?se.current:{value:`x`})};L.useEffect(()=>{fe&&fe.setAdornedStart(!!ie)},[fe,ie]);let Te={...n,color:pe.color||`primary`,disabled:pe.disabled,endAdornment:p,error:pe.error,focused:pe.focused,formControl:fe,fullWidth:h,hiddenLabel:pe.hiddenLabel,multiline:C,size:pe.size,startAdornment:ie,type:P},Ee=gh(Te),De=N.root||c.Root||_h,Oe=M.root||l.root||{},ke=N.input||c.Input||vh;return Ce={...Ce,...M.input??l.input},(0,R.jsxs)(L.Fragment,{children:[!f&&typeof yh==`function`&&(dh||=(0,R.jsx)(yh,{})),(0,R.jsxs)(De,{...Oe,ref:t,onClick:xe,...I,...!gs(De)&&{ownerState:{...Te,...Oe.ownerState}},className:B(Ee.root,Oe.className,o,A&&`MuiInputBase-readOnly`),children:[ie,(0,R.jsx)(Ef.Provider,{value:null,children:(0,R.jsx)(ke,{"aria-invalid":pe.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:pe.disabled,id:g,onAnimationStart:we,name:w,placeholder:k,readOnly:A,required:pe.required,rows:j,value:ae,onKeyDown:ee,onKeyUp:te,type:P,...Ce,...!gs(ke)&&{as:Se,ownerState:{...Te,...Ce.ownerState}},ref:le,className:B(Ee.input,Ce.className,A&&`MuiInputBase-readOnly`),onBlur:ve,onChange:be,onFocus:_e})}),p,ne?ne({...pe,startAdornment:ie}):null]})]})});function xh(e){return gi(`MuiInput`,e)}var Sh={...uh,..._i(`MuiInput`,[`root`,`underline`,`input`])};I();var Ch=e=>{let{classes:t,disableUnderline:n}=e,r=La({root:[`root`,!n&&`underline`],input:[`input`]},xh,t);return{...t,...r}},wh=U(_h,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...mh(e,t),!n.disableUnderline&&t.underline]}})(Wc(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Sh.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Sh.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Sh.disabled}, .${Sh.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${Sh.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Bd()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),Th=U(vh,{name:`MuiInput`,slot:`Input`,overridesResolver:hh})({}),Eh=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,inputComponent:s=`input`,multiline:c=!1,slotProps:l,slots:u={},type:d=`text`,...f}=n,p=Ch(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?Un(l??a,m):m;return(0,R.jsx)(bh,{slots:{root:u.root??i.Root??wh,input:u.input??i.Input??Th},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});Eh.muiName=`Input`;function Dh(e){return gi(`MuiFilledInput`,e)}var Oh={...uh,..._i(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])};I();var kh=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=La({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${G(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},Dh,t);return{...t,...c}},Ah=U(_h,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...mh(e,t),!n.disableUnderline&&t.underline]}})(Wc(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Oh.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Oh.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Oh.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Oh.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Oh.disabled}, .${Oh.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Oh.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Bd()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),jh=U(vh,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:hh})(Wc(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Mh=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,hiddenLabel:s,inputComponent:c=`input`,multiline:l=!1,slotProps:u,slots:d={},type:f=`text`,...p}=n,m={...n,disableUnderline:r,fullWidth:o,inputComponent:c,multiline:l,type:f},h=kh(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?Un(g,u??a):g;return(0,R.jsx)(bh,{slots:{root:d.root??i.Root??Ah,input:d.input??i.Input??jh},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});Mh.muiName=`Input`,I();var Nh,Ph=U(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:Qo})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),Fh=U(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:Qo})(Wc(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Ih(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,R.jsx)(Ph,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,R.jsx)(Fh,{ownerState:c,children:s?(0,R.jsx)(`span`,{children:i}):Nh||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}function Lh(e){return gi(`MuiOutlinedInput`,e)}var Rh={...uh,..._i(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};I();var zh=e=>{let{classes:t}=e,n=La({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Lh,t);return{...t,...n}},Bh=U(_h,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:mh})(Wc(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Rh.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Rh.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Rh.focused} .${Rh.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Bd()).map(([t])=>({props:{color:t},style:{[`&.${Rh.focused} .${Rh.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Rh.error} .${Rh.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Rh.disabled} .${Rh.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),Vh=U(Ih,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Wc(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Hh=U(vh,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:hh})(Wc(({theme:e})=>({padding:`16.5px 14px`,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),Uh=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiOutlinedInput`}),{components:r={},fullWidth:i=!1,inputComponent:a=`input`,label:o,multiline:s=!1,notched:c,slots:l={},slotProps:u={},type:d=`text`,...f}=n,p=zh(n),m=Df(),h=Tf({props:n,muiFormControl:m,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),g={...n,color:h.color||`primary`,disabled:h.disabled,error:h.error,focused:h.focused,formControl:m,fullWidth:i,hiddenLabel:h.hiddenLabel,multiline:s,size:h.size,type:d},_=l.root??r.Root??Bh,v=l.input??r.Input??Hh,[y,b]=Xc(`notchedOutline`,{elementType:Vh,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,R.jsxs)(L.Fragment,{children:[o,` `,`*`]}):o}});return(0,R.jsx)(bh,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,R.jsx)(y,{...b,notched:c===void 0?!!(e.startAdornment||e.filled||e.focused):c}),fullWidth:i,inputComponent:a,multiline:s,ref:t,type:d,...f,classes:{...p,notchedOutline:null}})});Uh.muiName=`Input`,I();var Wh=e=>{let{classes:t}=e,n=La({root:[`root`]},Um,t);return{...t,...n}},Gh={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>Qo(e)&&e!==`variant`},Kh=U(Eh,Gh)(``),qh=U(Uh,Gh)(``),Jh=U(Mh,Gh)(``),Yh=L.forwardRef(function(e,t){let n=ys({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=rh,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?Hm:nh,E=Tf({props:n,muiFormControl:Df(),states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},ee=Wh(O),{root:te,...k}=ee,A=d||{standard:(0,R.jsx)(Kh,{ownerState:O}),outlined:(0,R.jsx)(qh,{label:p,ownerState:O}),filled:(0,R.jsx)(Jh,{ownerState:O})}[D],ne=mc(t,Ms(A));return(0,R.jsx)(L.Fragment,{children:L.cloneElement(A,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?Un(k,f.classes):k,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:ne,className:B(A.props.className,o,ee.root),...!d&&{variant:D},...w})})});Yh.muiName=`Select`;var Xh=_i(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),Zh=_i(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),Qh=_i(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function $h(e){return gi(`MuiMenuItem`,e)}var eg=_i(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);I();function tg(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var ng=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},rg=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=La({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},$h,o);return{...o,...s}},ig=U(Id,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:ng})(Wc(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${eg.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${eg.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${eg.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${eg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${eg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Xh.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Xh.inset}`]:{marginLeft:52},[`& .${Qh.root}`]:{marginTop:0,marginBottom:0},[`& .${Qh.inset}`]:{paddingLeft:36},[`& .${Zh.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Zh.root} svg`]:{fontSize:`1.25rem`}}}]}))),ag=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=Ym(),m=L.useContext(lp),h=L.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=L.useRef(null);Dl(()=>{r&&g.current&&tg(g.current,p)},[r]);let _={...n,dense:h.dense,divider:o,disableGutters:s},v=rg(n),y=mc(g,t),{root:b,...x}=v,S;return n.disabled||(S=u===void 0?-1:u),(0,R.jsx)(lp.Provider,{value:h,children:(0,R.jsx)(ig,{ref:y,role:l,tabIndex:S,component:i,focusVisibleClassName:B(v.focusVisible,c),className:B(v.root,d),...f,ownerState:_,classes:x})})});I();function og(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function sg(e,t){return!e||og(e)?e:og(e.default)?e.default:t&&og(e[t])?e[t]:t&&og(e[t]?.default)?e[t].default:e}var cg=sg(qf,`InputContainer`)||sg(dg.InputContainer,`InputContainer`),lg=kp,ug=lg.default,dg=ug&&typeof ug==`object`?ug:lg,{translator:fg}=jm,pg=U(`div`)(({theme:e})=>({marginTop:e.spacing(2),display:`flex`})),mg=U(cg)({flex:1,fontSize:`inherit`,width:`90%`}),hg=U(ag)(({theme:e,isBlackColor:t})=>({borderRadius:`2px`,fontSize:`inherit`,height:`22px`,marginLeft:e.spacing(2),marginRight:e.spacing(2),marginTop:e.spacing(2),...t&&{color:e.palette.background.paper}})),gg=U(Yh)({fontSize:`inherit`,transform:`translate(0%, 40%)`}),_g=class extends L.Component{onChange=e=>t=>{let{value:n}=t.target,{onFillColorChange:r,onOutlineColorChange:i,onPaintColorChange:a}=this.props;e===`fill`?r(n):e===`outline`?i(n):a(n)};render(){let{fillColor:e,outlineColor:t,fillList:n,outlineList:r,language:i}=this.props;return(0,R.jsxs)(pg,{children:[(0,R.jsx)(mg,{label:fg.t(`drawingResponse.fillColor`,{lng:i}),children:(0,R.jsx)(gg,{onChange:this.onChange(`fill`),value:e,variant:`standard`,MenuProps:{transitionDuration:{enter:225,exit:195}},children:n.map(({value:e,label:t})=>(0,R.jsx)(hg,{value:e,isBlackColor:e===`black`,style:{backgroundColor:e},children:t},e))})}),(0,R.jsx)(mg,{label:fg.t(`drawingResponse.outlineColor`,{lng:i}),children:(0,R.jsx)(gg,{onChange:this.onChange(`outline`),value:t,variant:`standard`,MenuProps:{transitionDuration:{enter:225,exit:195}},children:r.map(({value:e,label:t})=>(0,R.jsx)(hg,{value:e,style:{border:`2px solid ${e}`},children:t},e))})})]})}};_g.propTypes={fillColor:F.string.isRequired,fillList:F.array.isRequired,onFillColorChange:F.func.isRequired,onOutlineColorChange:F.func.isRequired,onPaintColorChange:F.func.isRequired,outlineColor:F.string.isRequired,outlineList:F.array.isRequired,language:F.string};var vg=Math.PI/180;function yg(){return typeof window<`u`&&({}.toString.call(window)===`[object Window]`||{}.toString.call(window)===`[object global]`)}var bg=typeof global<`u`?global:typeof window<`u`?window:typeof WorkerGlobalScope<`u`?self:{},J={_global:bg,version:`8.3.0`,isBrowser:yg(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return J.angleDeg?e*vg: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:bg.document,_injectGlobal(e){bg.Konva=e}},xg=e=>{J[e.prototype.getClassName()]=e};J._injectGlobal(J);var Sg=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}},Cg=`[object Array]`,wg=`[object Number]`,Tg=`[object String]`,Eg=`[object Boolean]`,Dg=Math.PI/180,Og=180/Math.PI,kg=`#`,Ag=``,jg=`0`,Mg=`Konva warning: `,Ng=`Konva error: `,Pg=`rgb(`,Fg={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]},Ig=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Lg=[],Rg=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)===Cg},_isNumber(e){return Object.prototype.toString.call(e)===wg&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===Tg},_isBoolean(e){return Object.prototype.toString.call(e)===Eg},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){Lg.push(e),Lg.length===1&&Rg(function(){let e=Lg;Lg=[],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(kg,Ag);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=jg+e;return kg+e},getRGB(e){var t;return e in Fg?(t=Fg[e],{r:t[0],g:t[1],b:t[2]}):e[0]===kg?this._hexToRgb(e.substring(1)):e.substr(0,4)===Pg?(t=Ig.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=Fg[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*Dg},radToDeg(e){return e*Og},_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(Ng+e)},error(e){console.error(Ng+e)},warn(e){J.showWarnings&&console.warn(Mg+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 zg(e){return Y._isString(e)?`"`+e+`"`:Object.prototype.toString.call(e)===`[object Number]`||Y._isBoolean(e)?e:Object.prototype.toString.call(e)}function Bg(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(zg(e)+` is a not valid value for "`+t+`" attribute. The value should be a number.`),e}}function Vg(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(zg(t)+` is a not valid value for "`+n+`" attribute. The value should be a number or Array<number>(`+e+`)`),t}}function Hg(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||e===`auto`||Y.warn(zg(e)+` is a not valid value for "`+t+`" attribute. The value should be a number or "auto".`),e}}function Ug(){if(J.isUnminified)return function(e,t){return Y._isString(e)||Y.warn(zg(e)+` is a not valid value for "`+t+`" attribute. The value should be a string.`),e}}function Wg(){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(zg(e)+` is a not valid value for "`+t+`" attribute. The value should be a string or a native gradient.`),e}}function Gg(){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(zg(e)+` is a not valid value for "`+t+`" attribute. The value should be a array of numbers.`),e}}function Kg(){if(J.isUnminified)return function(e,t){return e===!0||e===!1||Y.warn(zg(e)+` is a not valid value for "`+t+`" attribute. The value should be a boolean.`),e}}function qg(e){if(J.isUnminified)return function(t,n){return Y.isObject(t)||Y.warn(zg(t)+` is a not valid value for "`+n+`" attribute. The value should be an object with properties `+e),t}}var Jg=`get`,Yg=`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=Jg+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=Yg+Y._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Yg+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=Jg+o(t),c=Yg+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=qg(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=Yg+n,i=Jg+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=Jg+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=Jg+Y._capitalize(t),a=Yg+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 Xg(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 Zg=`,`,Qg=`(`,$g=`)`,e_=`([`,t_=`])`,n_=`;`,r_=`()`,i_=`=`,a_=`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(`.`),o_=[`fillStyle`,`strokeStyle`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`,`lineCap`,`lineDashOffset`,`lineJoin`,`lineWidth`,`miterLimit`,`font`,`textAlign`,`textBaseline`,`globalAlpha`,`globalCompositeOperation`,`imageSmoothingEnabled`],s_=100,c_=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+=r_:Y._isArray(c[0])?i+=e_+c.join(Zg)+t_:(t&&(c=c.map(e=>typeof e==`number`?Math.floor(e):e)),i+=Qg+c.join(Zg)+$g)):(i+=o.property,e||(i+=i_+o.val)),i+=n_;return i}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr,n;t.push(e),n=t.length,n>=s_&&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=a_.length,n=this.setAttr,r,i,a=function(t){var n=e[t],r;e[t]=function(){return i=Xg(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(a_[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)}};o_.forEach(function(e){Object.defineProperty(c_.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});var l_=class extends c_{_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)}},u_=class extends c_{_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()}}},d_;function f_(){if(d_)return d_;var e=Y.createCanvasElement().getContext(`2d`);return d_=(function(){return(J._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)})(),d_}var p_=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||J.pixelRatio||f_();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(p_,`pixelRatio`,void 0,X());var m_=class extends p_{constructor(e={width:0,height:0}){super(e),this.context=new l_(this),this.setSize(e.width,e.height)}},h_=class extends p_{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new u_(this),this.setSize(e.width,e.height)}},g_={get isDragging(){var e=!1;return g_._dragElements.forEach(t=>{t.dragStatus===`dragging`&&(e=!0)}),e},justDragged:!1,get node(){var e;return g_._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){let t=[];g_._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){g_._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`)&&(g_.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){g_._dragElements.forEach((t,n)=>{t.dragStatus===`stopped`&&t.node.fire(`dragend`,{type:`dragend`,target:t.node,evt:e},!0),t.dragStatus!==`dragging`&&g_._dragElements.delete(n)})}};J.isBrowser&&(window.addEventListener(`mouseup`,g_._endDragBefore,!0),window.addEventListener(`touchend`,g_._endDragBefore,!0),window.addEventListener(`mousemove`,g_._drag),window.addEventListener(`touchmove`,g_._drag),window.addEventListener(`mouseup`,g_._endDragAfter,!1),window.addEventListener(`touchend`,g_._endDragAfter,!1));var __=`absoluteOpacity`,v_=`allEventListeners`,y_=`absoluteTransform`,b_=`absoluteScale`,x_=`canvas`,S_=`Change`,C_=`children`,w_=`konva`,T_=`listening`,E_=`mouseenter`,D_=`mouseleave`,O_=`set`,k_=`Shape`,A_=` `,j_=`stage`,M_=`transform`,N_=`Stage`,P_=`visible`,F_=[`xChange.konva`,`yChange.konva`,`scaleXChange.konva`,`scaleYChange.konva`,`skewXChange.konva`,`skewYChange.konva`,`rotationChange.konva`,`offsetXChange.konva`,`offsetYChange.konva`,`transformsEnabledChange.konva`].join(A_),I_=1,Q=class e{constructor(e){this._id=I_++,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===M_||e===y_)&&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===M_||e===y_)&&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(A_);this.on(n,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(x_)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===y_&&this.fire(`absoluteTransformChange`)}clearCache(){return this._cache.delete(x_),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 m_({pixelRatio:a,width:r,height:i}),f=new m_({pixelRatio:a,width:0,height:0}),p=new h_({pixelRatio:u,width:r,height:i}),m=d.getContext(),h=p.getContext();return p.isCache=!0,d.isCache=!0,this._cache.delete(x_),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(__),this._clearSelfAndDescendantCache(b_),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(x_,{scene:d,filter:f,hit:p,x:o,y:s}),this._requestDraw(),this}isCached(){return this._cache.has(x_)}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(v_),arguments.length===3)return this._delegate.apply(this,arguments);var n=e.split(A_),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(A_),r=n.length,i,a,o,s,c,l;if(this._cache&&this._cache.delete(v_),!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(),g_._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(y_),this._clearSelfAndDescendantCache(__),this._clearSelfAndDescendantCache(b_),this._clearSelfAndDescendantCache(j_),this._clearSelfAndDescendantCache(P_),this._clearSelfAndDescendantCache(T_)}_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!==C_&&(n=O_+Y._capitalize(t),Y._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))}),this}isListening(){return this._getCache(T_,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(P_,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;g_._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!==k_&&(r=r.concat(o.getChildren().slice())),o._id===t._id&&(a=i);r.length>0&&r[0].getDepth()<=e&&s(r)}return t.nodeType!==N_&&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(M_),this._clearSelfAndDescendantCache(y_)),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 Sg,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(M_);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(M_),this._clearSelfAndDescendantCache(y_),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(__,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(j_,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(y_,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var t;if(e)return t=new Sg,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(y_)||new Sg,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(M_,this._getTransform)}_getTransform(){var e=this._cache.get(M_)||new Sg;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(w_)<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 m_({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+S_,{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[O_+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===k_&&(t.target=this),!((e===E_||e===D_)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType===`Stage`&&!n))){this._fire(e,t);var r=(e===E_||e===D_)&&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(v_);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(v_,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;g_._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){g_._dragElements.has(this._id)||this._createDragElement(e);let n=g_._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=g_._dragElements.get(this._id);t&&(t.dragStatus=`stopped`),g_._endDragBefore(e),g_._endDragAfter(e)}setDraggable(e){this._setAttr(`draggable`,e),this._dragChange()}isDragging(){let e=g_._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;g_._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=g_._dragElements.get(this._id),t=e&&e.dragStatus===`dragging`,n=e&&e.dragStatus===`ready`;t?this.stopDrag():n&&g_._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,F_,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(M_),this._clearSelfAndDescendantCache(y_)}),Q.prototype.on.call(Q.prototype,`visibleChange.konva`,function(){this._clearSelfAndDescendantCache(P_)}),Q.prototype.on.call(Q.prototype,`listeningChange.konva`,function(){this._clearSelfAndDescendantCache(T_)}),Q.prototype.on.call(Q.prototype,`opacityChange.konva`,function(){this._clearSelfAndDescendantCache(__)});var L_=Z.addGetterSetter;L_(Q,`zIndex`),L_(Q,`absolutePosition`),L_(Q,`position`),L_(Q,`x`,0,X()),L_(Q,`y`,0,X()),L_(Q,`globalCompositeOperation`,`source-over`,Ug()),L_(Q,`opacity`,1,X()),L_(Q,`name`,``,Ug()),L_(Q,`id`,``,Ug()),L_(Q,`rotation`,0,X()),Z.addComponentsGetterSetter(Q,`scale`,[`x`,`y`]),L_(Q,`scaleX`,1,X()),L_(Q,`scaleY`,1,X()),Z.addComponentsGetterSetter(Q,`skew`,[`x`,`y`]),L_(Q,`skewX`,0,X()),L_(Q,`skewY`,0,X()),Z.addComponentsGetterSetter(Q,`offset`,[`x`,`y`]),L_(Q,`offsetX`,0,X()),L_(Q,`offsetY`,0,X()),L_(Q,`dragDistance`,null,X()),L_(Q,`width`,0,X()),L_(Q,`height`,0,X()),L_(Q,`listening`,!0,Kg()),L_(Q,`preventDefault`,!0,Kg()),L_(Q,`filters`,null,function(e){return this._filterUpToDate=!1,e}),L_(Q,`visible`,!0,Kg()),L_(Q,`transformsEnabled`,`all`,Ug()),L_(Q,`size`),L_(Q,`dragBoundFunc`),L_(Q,`draggable`,!1,Kg()),Z.backCompat(Q,{rotateDeg:`rotate`,setRotationDeg:`setRotation`,getRotationDeg:`getRotation`});var R_=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(R_,`clip`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(R_,`clipX`,void 0,X()),Z.addGetterSetter(R_,`clipY`,void 0,X()),Z.addGetterSetter(R_,`clipWidth`,void 0,X()),Z.addGetterSetter(R_,`clipHeight`,void 0,X()),Z.addGetterSetter(R_,`clipFunc`);var z_=new Map,B_=J._global.PointerEvent!==void 0;function V_(e){return z_.get(e)}function H_(e){return{evt:e,pointerId:e.pointerId}}function U_(e,t){return z_.get(e)===t}function W_(e,t){G_(e),t.getStage()&&(z_.set(e,t),B_&&t._fire(`gotpointercapture`,H_(new PointerEvent(`gotpointercapture`))))}function G_(e,t){let n=z_.get(e);if(!n)return;let r=n.getStage();r&&r.content,z_.delete(e),B_&&n._fire(`lostpointercapture`,H_(new PointerEvent(`lostpointercapture`)))}var K_=`Stage`,q_=`string`,J_=`px`,Y_=`mouseout`,X_=`mouseleave`,Z_=`mouseover`,Q_=`mouseenter`,$_=`mousemove`,ev=`mousedown`,tv=`mouseup`,nv=`pointermove`,rv=`pointerdown`,iv=`pointerup`,av=`pointercancel`,ov=`lostpointercapture`,sv=`pointerout`,cv=`pointerleave`,lv=`pointerover`,uv=`pointerenter`,dv=`contextmenu`,fv=`touchstart`,pv=`touchend`,mv=`touchmove`,hv=`touchcancel`,gv=`wheel`,_v=5,vv=[[Q_,`_pointerenter`],[ev,`_pointerdown`],[$_,`_pointermove`],[tv,`_pointerup`],[X_,`_pointerleave`],[fv,`_pointerdown`],[mv,`_pointermove`],[pv,`_pointerup`],[hv,`_pointercancel`],[Z_,`_pointerover`],[gv,`_wheel`],[dv,`_contextmenu`],[rv,`_pointerdown`],[nv,`_pointermove`],[iv,`_pointerup`],[av,`_pointercancel`],[ov,`_lostpointercapture`]],yv={mouse:{[sv]:Y_,[cv]:X_,[lv]:Z_,[uv]:Q_,[nv]:$_,[rv]:ev,[iv]:tv,[av]:`mousecancel`,pointerclick:`click`,pointerdblclick:`dblclick`},touch:{[sv]:`touchout`,[cv]:`touchleave`,[lv]:`touchover`,[uv]:`touchenter`,[nv]:mv,[rv]:fv,[iv]:pv,[av]:hv,pointerclick:`tap`,pointerdblclick:`dbltap`},pointer:{[sv]:sv,[cv]:cv,[lv]:lv,[uv]:uv,[nv]:nv,[rv]:rv,[iv]:iv,[av]:av,pointerclick:`pointerclick`,pointerdblclick:`pointerdblclick`}},bv=e=>e.indexOf(`pointer`)>=0?`pointer`:e.indexOf(`touch`)>=0?`touch`:`mouse`,xv=e=>{let t=bv(e);if(t===`pointer`)return J.pointerEventsEnabled&&yv.pointer;if(t===`touch`)return yv.touch;if(t===`mouse`)return yv.mouse};function Sv(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&Y.warn(`Stage does not support clipping. Please use clip for Layers or Groups.`),e}var Cv=`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);`,wv=[],Tv=class extends R_{constructor(e){super(Sv(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),wv.push(this),this.on(`widthChange.konva heightChange.konva`,this._resizeDOM),this.on(`visibleChange.konva`,this._checkVisibility),this.on(`clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva`,()=>{Sv(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===q_){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`),R_.prototype.clone.call(this,e)}destroy(){super.destroy();var e=this.content;e&&Y._isInDocument(e)&&this.container().removeChild(e);var t=wv.indexOf(this);return t>-1&&wv.splice(t,1),this}getPointerPosition(){let e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(Y.warn(Cv),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 m_({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+J_,this.content.style.height=t+J_),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>_v&&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 U_(e,this)}setPointerCapture(e){W_(e,this)}releaseCapture(e){G_(e,this)}getLayers(){return this.children}_bindContentEvents(){J.isBrowser&&vv.forEach(([e,t])=>{this.content.addEventListener(e,e=>{this[t](e)})})}_pointerenter(e){this.setPointersPositions(e);let t=xv(e.type);this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);let t=xv(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=xv(e.type),n=bv(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),i=!g_.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=xv(e.type),n=bv(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach(i=>{var a=this.getIntersection(i);if(g_.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=xv(e.type),n=bv(e.type);if(!t||(g_.isDragging&&g_.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!g_.isDragging||J.hitOnDragEnabled)))return;var r={};let i=!1;var a=this._getTargetShape(n);this._changedPointerPositions.forEach(o=>{let s=V_(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=xv(e.type),n=bv(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=V_(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`])):g_.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(dv,{evt:e}):this._fire(dv,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(gv,{evt:e}):this._fire(gv,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);let t=V_(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(iv,H_(e)),G_(e.pointerId)}_lostpointercapture(e){G_(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 m_({width:this.width(),height:this.height()}),this.bufferHitCanvas=new h_({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}};Tv.prototype.nodeType=K_,xg(Tv),Z.addGetterSetter(Tv,`container`);var Ev=`hasShadow`,Dv=`shadowRGBA`,Ov=`patternImage`,kv=`linearGradient`,Av=`radialGradient`,jv;function Mv(){return jv||(jv=Y.createCanvasElement().getContext(`2d`),jv)}var Nv={};function Pv(e){e.fill()}function Fv(e){e.stroke()}function Iv(e){e.fill()}function Lv(e){e.stroke()}function Rv(){this._clearCache(Ev)}function zv(){this._clearCache(Dv)}function Bv(){this._clearCache(Ov)}function Vv(){this._clearCache(kv)}function Hv(){this._clearCache(Av)}var $=class extends Q{constructor(e){super(e);let t;for(;t=Y.getRandomColor(),!(t&&!(t in Nv)););this.colorKey=t,Nv[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(Ev,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(Ov,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let e=Mv().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||`repeat`);if(e&&e.setTransform){let t=new Sg;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(kv,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=Mv(),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(Av,this.__getRadialGradient)}__getRadialGradient(){var e=this.fillRadialGradientColorStops();if(e){for(var t=Mv(),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(Dv,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 Nv[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 U_(e,this)}setPointerCapture(e){W_(e,this)}releaseCapture(e){G_(e,this)}};$.prototype._fillFunc=Pv,$.prototype._strokeFunc=Fv,$.prototype._fillFuncHit=Iv,$.prototype._strokeFuncHit=Lv,$.prototype._centroid=!1,$.prototype.nodeType=`Shape`,xg($),$.prototype.eventListeners={},$.prototype.on.call($.prototype,`shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,Rv),$.prototype.on.call($.prototype,`shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,zv),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva`,Bv),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva`,Vv),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva`,Hv),Z.addGetterSetter($,`stroke`,void 0,Wg()),Z.addGetterSetter($,`strokeWidth`,2,X()),Z.addGetterSetter($,`fillAfterStrokeEnabled`,!1),Z.addGetterSetter($,`hitStrokeWidth`,`auto`,Hg()),Z.addGetterSetter($,`strokeHitEnabled`,!0,Kg()),Z.addGetterSetter($,`perfectDrawEnabled`,!0,Kg()),Z.addGetterSetter($,`shadowForStrokeEnabled`,!0,Kg()),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,Ug()),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,Wg()),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 Uv=`#`,Wv=`beforeDraw`,Gv=`draw`,Kv=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],qv=Kv.length,Jv=class extends R_{constructor(e){super(e),this.canvas=new m_,this.hitCanvas=new h_({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<qv;r++){let i=Kv[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=Nv[Uv+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(Wv,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),R_.prototype.drawScene.call(this,r,t),this._fire(Gv,{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),R_.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)}}};Jv.prototype.nodeType=`Layer`,xg(Jv),Z.addGetterSetter(Jv,`imageSmoothingEnabled`,!0),Z.addGetterSetter(Jv,`clearBeforeDraw`,!0),Z.addGetterSetter(Jv,`hitGraphEnabled`,!0,Kg());var Yv=class extends Jv{constructor(e){super(e),this.listening(!1),Y.warn(`Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.`)}};Yv.prototype.nodeType=`FastLayer`,xg(Yv);var Xv=class extends R_{_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to groups.`)}};Xv.prototype.nodeType=`Group`,xg(Xv);var Zv=(function(){return bg.performance&&bg.performance.now?function(){return bg.performance.now()}:function(){return new Date().getTime()}})(),Qv=class e{constructor(t,n){this.id=e.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Zv(),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=Zv(),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(Zv()),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))}};Qv.animations=[],Qv.animIdCounter=0,Qv.animRunning=!1;var $v={node:1,duration:1,easing:1,onFinish:1,yoyo:1},ey=1,ty=2,ny=3,ry=0,iy=[`fill`,`stroke`,`shadowColor`],ay=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=ty,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onPlay`)}reverse(){this.state=ny,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===ty?this.setTime(e):this.state===ny&&this.setTime(this.duration-e)}pause(){this.state=ey,this.fire(`onPause`)}getTimer(){return new Date().getTime()}},oy=class e{constructor(t){var n=this,r=t.node,i=r._id,a,o=t.easing||sy.Linear,s=!!t.yoyo,c;a=t.duration===void 0?.3:t.duration===0?.001:t.duration,this.node=r,this._id=ry++;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 Qv(function(){n.tween.onEnterFrame()},l),this.tween=new ay(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)$v[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 iy.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=iy.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]}};oy.attrs={},oy.tweens={},Q.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new oy(e).play()};var sy={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-sy.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?sy.BounceEaseIn(e*2,0,n,r)*.5+t:sy.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}},cy=Y._assign(J,{Util:Y,Transform:Sg,Node:Q,Container:R_,Stage:Tv,stages:wv,Layer:Jv,FastLayer:Yv,Group:Xv,DD:g_,Shape:$,shapes:Nv,Animation:Qv,Tween:oy,Easings:sy,Context:c_,Canvas:p_}),ly=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)}};ly.prototype._centroid=!0,ly.prototype.className=`Arc`,ly.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],xg(ly),Z.addGetterSetter(ly,`innerRadius`,0,X()),Z.addGetterSetter(ly,`outerRadius`,0,X()),Z.addGetterSetter(ly,`angle`,0,X()),Z.addGetterSetter(ly,`clockwise`,!1,Kg());function uy(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 dy(e,t){var n=e.length,r=[],i,a;for(i=2;i<n-2;i+=2)a=uy(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 fy=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():dy(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),t=e.length,n=this.tension(),r=uy(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),i=uy(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),a=dy(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}}};fy.prototype.className=`Line`,fy.prototype._attrsAffectingSize=[`points`,`bezier`,`tension`],xg(fy),Z.addGetterSetter(fy,`closed`,!1),Z.addGetterSetter(fy,`bezier`,!1),Z.addGetterSetter(fy,`tension`,0,X()),Z.addGetterSetter(fy,`points`,[],Gg());var py=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 ne=a.length-2;ne>=0;ne--)if(a[ne].command===`M`){s=a[ne].points[0]+k,c=a[ne].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]}};py.prototype.className=`Path`,py.prototype._attrsAffectingSize=[`data`],xg(py),Z.addGetterSetter(py,`data`);var my=class extends fy{_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=py.calcLength(r[r.length-4],r[r.length-3],`C`,e),i=py.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}}};my.prototype.className=`Arrow`,xg(my),Z.addGetterSetter(my,`pointerLength`,10,X()),Z.addGetterSetter(my,`pointerWidth`,10,X()),Z.addGetterSetter(my,`pointerAtBeginning`,!1),Z.addGetterSetter(my,`pointerAtEnding`,!0);var hy=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)}};hy.prototype._centroid=!0,hy.prototype.className=`Circle`,hy.prototype._attrsAffectingSize=[`radius`],xg(hy),Z.addGetterSetter(hy,`radius`,0,X());var gy=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)}};gy.prototype.className=`Ellipse`,gy.prototype._centroid=!0,gy.prototype._attrsAffectingSize=[`radiusX`,`radiusY`],xg(gy),Z.addComponentsGetterSetter(gy,`radius`,[`x`,`y`]),Z.addGetterSetter(gy,`radiusX`,0,X()),Z.addGetterSetter(gy,`radiusY`,0,X());var _y=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}};_y.prototype.className=`Image`,xg(_y),Z.addGetterSetter(_y,`image`),Z.addComponentsGetterSetter(_y,`crop`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(_y,`cropX`,0,X()),Z.addGetterSetter(_y,`cropY`,0,X()),Z.addGetterSetter(_y,`cropWidth`,0,X()),Z.addGetterSetter(_y,`cropHeight`,0,X());var vy=[`fontFamily`,`fontSize`,`fontStyle`,`padding`,`lineHeight`,`text`,`width`,`height`],yy=`Change.konva`,by=`none`,xy=`up`,Sy=`right`,Cy=`down`,wy=`left`,Ty=vy.length,Ey=class extends Xv{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<Ty;n++)e.on(vy[n]+yy,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 xy:o=n/2,s=-1*c;break;case Sy:o=n+a,s=r/2;break;case Cy:o=n/2,s=r+c;break;case wy: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})}}};Ey.prototype.className=`Label`,xg(Ey);var Dy=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===xy&&(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===Sy&&(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===Cy&&(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===wy&&(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===xy?(t-=r,o+=r):i===Cy?o+=r:i===wy?(e-=n*1.5,a+=n):i===Sy&&(a+=n*1.5),{x:e,y:t,width:a,height:o}}};Dy.prototype.className=`Tag`,xg(Dy),Z.addGetterSetter(Dy,`pointerDirection`,by),Z.addGetterSetter(Dy,`pointerWidth`,0,X()),Z.addGetterSetter(Dy,`pointerHeight`,0,X()),Z.addGetterSetter(Dy,`cornerRadius`,0,Vg(4));var Oy=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)}};Oy.prototype.className=`Rect`,xg(Oy),Z.addGetterSetter(Oy,`cornerRadius`,0,Vg(4));var ky=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)}};ky.prototype.className=`RegularPolygon`,ky.prototype._centroid=!0,ky.prototype._attrsAffectingSize=[`radius`],xg(ky),Z.addGetterSetter(ky,`radius`,0,X()),Z.addGetterSetter(ky,`sides`,0,X());var Ay=Math.PI*2,jy=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,Ay,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),Ay,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)}};jy.prototype.className=`Ring`,jy.prototype._centroid=!0,jy.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],xg(jy),Z.addGetterSetter(jy,`innerRadius`,0,X()),Z.addGetterSetter(jy,`outerRadius`,0,X());var My=class extends ${constructor(e){super(e),this._updated=!0,this.anim=new Qv(()=>{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)}};My.prototype.className=`Sprite`,xg(My),Z.addGetterSetter(My,`animation`),Z.addGetterSetter(My,`animations`),Z.addGetterSetter(My,`frameOffsets`),Z.addGetterSetter(My,`image`),Z.addGetterSetter(My,`frameIndex`,0,X()),Z.addGetterSetter(My,`frameRate`,17,X()),Z.backCompat(My,{index:`frameIndex`,getIndex:`getFrameIndex`,setIndex:`setFrameIndex`});var Ny=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)}};Ny.prototype.className=`Star`,Ny.prototype._centroid=!0,Ny.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],xg(Ny),Z.addGetterSetter(Ny,`numPoints`,5,X()),Z.addGetterSetter(Ny,`innerRadius`,0,X()),Z.addGetterSetter(Ny,`outerRadius`,0,X());function Py(e){return Array.from(e)}var Fy=`auto`,Iy=`center`,Ly=`justify`,Ry=`Change.konva`,zy=`2d`,By=`-`,Vy=`left`,Hy=`text`,Uy=`Text`,Wy=`top`,Gy=`bottom`,Ky=`middle`,qy=`normal`,Jy=`px `,Yy=` `,Xy=`right`,Zy=`word`,Qy=`char`,$y=`none`,eb=`…`,tb=[`fontFamily`,`fontSize`,`fontStyle`,`fontVariant`,`padding`,`align`,`verticalAlign`,`lineHeight`,`text`,`width`,`height`,`wrap`,`ellipsis`,`letterSpacing`],nb=tb.length;function rb(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 ib;function ab(){return ib||(ib=Y.createCanvasElement().getContext(zy),ib)}function ob(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function sb(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function cb(e){return e||={},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||`black`),e}var lb=class extends ${constructor(e){super(cb(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t<nb;t++)this.on(tb[t]+Ry,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`,Ky),e.setAttr(`textAlign`,Vy),o===Ky?s=(this.getHeight()-n*a-r*2)/2:o===Gy&&(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===Xy?_+=l-x-r*2:c===Iy&&(_+=(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===Ly&&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===Ly&&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===Ly){C=b.split(` `).length-1;for(var E=Py(b),D=0;D<E.length;D++){var O=E[D];O===` `&&h!==n-1&&c===Ly&&(_+=(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(Hy,t),this}getWidth(){return this.attrs.width===Fy||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===Fy||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=ab(),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()+Yy+this.fontVariant()+Yy+(this.fontSize()+Jy)+rb(this.fontFamily())}_addTextLine(e){this.align()===Ly&&(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 ab().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split(`
|
|
148
|
-
`),t=+this.fontSize(),n=0,r=this.lineHeight()*t,i=this.attrs.width,a=this.attrs.height,o=i!==Fy&&i!==void 0,s=a!==Fy&&a!==void 0,c=this.padding(),l=i-c*2,u=a-c*2,d=0,f=this.wrap(),p=f!==$y,m=f!==Qy&&p,h=this.ellipsis();this.textArr=[],ab().font=this._getContextFont();for(var g=h?this._getTextWidth(eb):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===Yy||ee===By)&&w<=l?C.length:Math.max(C.lastIndexOf(Yy),C.lastIndexOf(By))+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+eb)<l||(te.text=te.text.slice(0,te.text.length-3)),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(te.text+eb));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}};lb.prototype._fillFunc=ob,lb.prototype._strokeFunc=sb,lb.prototype.className=Uy,lb.prototype._attrsAffectingSize=[`text`,`fontSize`,`padding`,`wrap`,`lineHeight`,`letterSpacing`],xg(lb),Z.overWriteSetter(lb,`width`,Hg()),Z.overWriteSetter(lb,`height`,Hg()),Z.addGetterSetter(lb,`fontFamily`,`Arial`),Z.addGetterSetter(lb,`fontSize`,12,X()),Z.addGetterSetter(lb,`fontStyle`,qy),Z.addGetterSetter(lb,`fontVariant`,qy),Z.addGetterSetter(lb,`padding`,0,X()),Z.addGetterSetter(lb,`align`,Vy),Z.addGetterSetter(lb,`verticalAlign`,Wy),Z.addGetterSetter(lb,`lineHeight`,1,X()),Z.addGetterSetter(lb,`wrap`,Zy),Z.addGetterSetter(lb,`ellipsis`,!1,Kg()),Z.addGetterSetter(lb,`letterSpacing`,0,X()),Z.addGetterSetter(lb,`text`,``,Ug()),Z.addGetterSetter(lb,`textDecoration`,``);var ub=``,db=`normal`;function fb(e){e.fillText(this.partialText,0,0)}function pb(e){e.strokeText(this.partialText,0,0)}var mb=class extends ${constructor(e){super(e),this.dummyCanvas=Y.createCanvasElement(),this.dataArray=[],this.dataArray=py.parsePathData(this.attrs.data),this.on(`dataChange.konva`,function(){this.dataArray=py.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 lb.prototype.setText.call(this,e)}_getContextFont(){return lb.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=Py(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`:py.getLineLength(d.x,d.y,p.points[0],p.points[1])>i?f=py.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=py.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=py.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=py.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=py.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=py.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=py.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}}};mb.prototype._fillFunc=fb,mb.prototype._strokeFunc=pb,mb.prototype._fillFuncHit=fb,mb.prototype._strokeFuncHit=pb,mb.prototype.className=`TextPath`,mb.prototype._attrsAffectingSize=[`text`,`fontSize`,`data`],xg(mb),Z.addGetterSetter(mb,`data`),Z.addGetterSetter(mb,`fontFamily`,`Arial`),Z.addGetterSetter(mb,`fontSize`,12,X()),Z.addGetterSetter(mb,`fontStyle`,db),Z.addGetterSetter(mb,`align`,`left`),Z.addGetterSetter(mb,`letterSpacing`,0,X()),Z.addGetterSetter(mb,`textBaseline`,`middle`),Z.addGetterSetter(mb,`fontVariant`,db),Z.addGetterSetter(mb,`text`,ub),Z.addGetterSetter(mb,`textDecoration`,null),Z.addGetterSetter(mb,`kerningFunc`,null);var hb=`tr-konva`,gb=[`resizeEnabledChange`,`rotateAnchorOffsetChange`,`rotateEnabledChange`,`enabledAnchorsChange`,`anchorSizeChange`,`borderEnabledChange`,`borderStrokeChange`,`borderStrokeWidthChange`,`borderDashChange`,`anchorStrokeChange`,`anchorStrokeWidthChange`,`anchorFillChange`,`anchorCornerRadiusChange`,`ignoreStrokeChange`].map(e=>e+`.${hb}`).join(` `),_b=`nodesRect`,vb=[`widthChange`,`heightChange`,`scaleXChange`,`scaleYChange`,`skewXChange`,`skewYChange`,`rotationChange`,`offsetXChange`,`offsetYChange`,`transformsEnabledChange`,`strokeWidthChange`],yb={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},bb=`ontouchstart`in J._global;function xb(e,t){if(e===`rotater`)return`crosshair`;t+=Y.degToRad(yb[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 Sb=[`top-left`,`top-center`,`top-right`,`middle-right`,`middle-left`,`bottom-left`,`bottom-center`,`bottom-right`],Cb=1e8;function wb(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 Tb(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 Eb(e,t){return Tb(e,t,wb(e))}function Db(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 Ob=class extends Xv{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(gb,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 hb+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(vb.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(_b),this._clearCache(`transform`),this._clearSelfAndDescendantCache(`absoluteTransform`)}_getNodeRect(){return this._getCache(_b,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 Tb({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:-Cb,y:-Cb,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 Sg;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(),Sb.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor(`rotater`)}_createAnchor(e){var t=new Oy({stroke:`rgb(0, 161, 255)`,fill:`white`,strokeWidth:1,name:e+` _anchor`,dragDistance:0,draggable:!0,hitStrokeWidth:bb?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=xb(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=Eb(u,Db(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 Sg;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 Sg;o.translate(n.x,n.y),o.rotate(n.rotation),o.scale(n.width/a,n.height/a);let s=new Sg;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 Sg;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=``),Xv.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Q.prototype.toObject.call(this)}};function kb(e){return e instanceof Array||Y.warn(`enabledAnchors value should be an array`),e instanceof Array&&e.forEach(function(e){Sb.indexOf(e)===-1&&Y.warn(`Unknown anchor name: `+e+`. Available names are: `+Sb.join(`, `))}),e||[]}Ob.prototype.className=`Transformer`,xg(Ob),Z.addGetterSetter(Ob,`enabledAnchors`,Sb,kb),Z.addGetterSetter(Ob,`flipEnabled`,!0,Kg()),Z.addGetterSetter(Ob,`resizeEnabled`,!0),Z.addGetterSetter(Ob,`anchorSize`,10,X()),Z.addGetterSetter(Ob,`rotateEnabled`,!0),Z.addGetterSetter(Ob,`rotationSnaps`,[]),Z.addGetterSetter(Ob,`rotateAnchorOffset`,50,X()),Z.addGetterSetter(Ob,`rotationSnapTolerance`,5,X()),Z.addGetterSetter(Ob,`borderEnabled`,!0),Z.addGetterSetter(Ob,`anchorStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(Ob,`anchorStrokeWidth`,1,X()),Z.addGetterSetter(Ob,`anchorFill`,`white`),Z.addGetterSetter(Ob,`anchorCornerRadius`,0,X()),Z.addGetterSetter(Ob,`borderStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(Ob,`borderStrokeWidth`,1,X()),Z.addGetterSetter(Ob,`borderDash`),Z.addGetterSetter(Ob,`keepRatio`,!0),Z.addGetterSetter(Ob,`centeredScaling`,!1),Z.addGetterSetter(Ob,`ignoreStroke`,!1),Z.addGetterSetter(Ob,`padding`,0,X()),Z.addGetterSetter(Ob,`node`),Z.addGetterSetter(Ob,`nodes`),Z.addGetterSetter(Ob,`boundBoxFunc`),Z.addGetterSetter(Ob,`anchorDragBoundFunc`),Z.addGetterSetter(Ob,`shouldOverdrawWholeArea`,!1),Z.addGetterSetter(Ob,`useSingleNodeRotation`,!0),Z.backCompat(Ob,{lineEnabled:`borderEnabled`,rotateHandlerOffset:`rotateAnchorOffset`,enabledHandlers:`enabledAnchors`});var Ab=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)}};Ab.prototype.className=`Wedge`,Ab.prototype._centroid=!0,Ab.prototype._attrsAffectingSize=[`radius`],xg(Ab),Z.addGetterSetter(Ab,`radius`,0,X()),Z.addGetterSetter(Ab,`angle`,0,X()),Z.addGetterSetter(Ab,`clockwise`,!1),Z.backCompat(Ab,{angleDeg:`angle`,getAngleDeg:`getAngle`,setAngleDeg:`setAngle`});function jb(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var Mb=[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],Nb=[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 Pb(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,ne=A*(A+1)/2,j=new jb,re=null,M=j,N=null,ie=null,P=Mb[t],F=Nb[t];for(s=1;s<ee;s++)M=M.next=new jb,s===A&&(re=M);for(M.next=j,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+=ne*w,p+=ne*T,m+=ne*E,h+=ne*D,M=j,s=0;s<A;s++)M.r=w,M.g=T,M.b=E,M.a=D,M=M.next;for(s=1;s<A;s++)c=u+((te<s?te:s)<<2),f+=(M.r=w=n[c])*(O=A-s),p+=(M.g=T=n[c+1])*O,m+=(M.b=E=n[c+2])*O,h+=(M.a=D=n[c+3])*O,b+=w,x+=T,S+=E,C+=D,M=M.next;for(N=j,ie=re,a=0;a<r;a++)n[u+3]=D=h*P>>F,D===0?n[u]=n[u+1]=n[u+2]=0:(D=255/D,n[u]=(f*P>>F)*D,n[u+1]=(p*P>>F)*D,n[u+2]=(m*P>>F)*D),f-=g,p-=_,m-=v,h-=y,g-=N.r,_-=N.g,v-=N.b,y-=N.a,c=d+((c=a+t+1)<te?c:te)<<2,b+=N.r=n[c],x+=N.g=n[c+1],S+=N.b=n[c+2],C+=N.a=n[c+3],f+=b,p+=x,m+=S,h+=C,N=N.next,g+=w=ie.r,_+=T=ie.g,v+=E=ie.b,y+=D=ie.a,b-=w,x-=T,S-=E,C-=D,ie=ie.next,u+=4;d+=r}for(a=0;a<r;a++){for(x=S=C=b=p=m=h=f=0,u=a<<2,g=A*(w=n[u]),_=A*(T=n[u+1]),v=A*(E=n[u+2]),y=A*(D=n[u+3]),f+=ne*w,p+=ne*T,m+=ne*E,h+=ne*D,M=j,s=0;s<A;s++)M.r=w,M.g=T,M.b=E,M.a=D,M=M.next;for(l=r,s=1;s<=t;s++)u=l+a<<2,f+=(M.r=w=n[u])*(O=A-s),p+=(M.g=T=n[u+1])*O,m+=(M.b=E=n[u+2])*O,h+=(M.a=D=n[u+3])*O,b+=w,x+=T,S+=E,C+=D,M=M.next,s<k&&(l+=r);for(u=a,N=j,ie=re,o=0;o<i;o++)c=u<<2,n[c+3]=D=h*P>>F,D>0?(D=255/D,n[c]=(f*P>>F)*D,n[c+1]=(p*P>>F)*D,n[c+2]=(m*P>>F)*D):n[c]=n[c+1]=n[c+2]=0,f-=g,p-=_,m-=v,h-=y,g-=N.r,_-=N.g,v-=N.b,y-=N.a,c=a+((c=o+A)<k?c:k)*r<<2,f+=b+=N.r=n[c],p+=x+=N.g=n[c+1],m+=S+=N.b=n[c+2],h+=C+=N.a=n[c+3],N=N.next,g+=w=ie.r,_+=T=ie.g,v+=E=ie.b,y+=D=ie.a,b-=w,x-=T,S-=E,C-=D,ie=ie.next,u+=r}}var Fb=function(e){var t=Math.round(this.blurRadius());t>0&&Pb(e,t)};Z.addGetterSetter(Q,`blurRadius`,0,X(),Z.afterSetFilter);var Ib=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 Lb=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 Rb=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 zb(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 Bb=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]=zb(t[f+0],r,i,g,h),t[f+1]=zb(t[f+1],o,s,y,v),t[f+2]=zb(t[f+2],l,u,S,x)}};Z.addGetterSetter(Q,`enhance`,0,X(),Z.afterSetFilter);var Vb=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 Hb=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},Ub=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 Wb=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]},Gb=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},Kb=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]=_},qb=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);Gb(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}Kb(_,e,{polarRotation:0})}};Z.addGetterSetter(Q,`kaleidoscopePower`,2,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`kaleidoscopeAngle`,0,X(),Z.afterSetFilter);function Jb(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 Yb(e,t){return Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2)}function Xb(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 Zb(e,t){var n=Jb(e,0,0),r=Jb(e,e.width-1,0),i=Jb(e,0,e.height-1),a=Jb(e,e.width-1,e.height-1),o=t||10;if(Yb(n,r)<o&&Yb(r,a)<o&&Yb(a,i)<o&&Yb(i,n)<o){for(var s=Xb([r,n,a,i]),c=[],l=0;l<e.width*e.height;l++)c[l]=Yb(s,[e.data[l*4],e.data[l*4+1],e.data[l*4+2]])<o?0:255;return c}}function Qb(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function $b(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 ex(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 tx(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,Bg,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,Bg,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),cy.Util._assign(cy,{Arc:ly,Arrow:my,Circle:hy,Ellipse:gy,Image:_y,Label:Ey,Tag:Dy,Line:fy,Path:py,Rect:Oy,RegularPolygon:ky,Ring:jy,Sprite:My,Star:Ny,Text:lb,TextPath:mb,Transformer:Ob,Wedge:Ab,Filters:{Blur:Fb,Brighten:Ib,Contrast:Lb,Emboss:Rb,Enhance:Bb,Grayscale:Vb,HSL:Hb,HSV:Ub,Invert:Wb,Kaleidoscope:qb,Mask:function(e){var t=Zb(e,this.threshold());return t&&(t=$b(t,e.width,e.height),t=ex(t,e.width,e.height),t=tx(t,e.width,e.height),Qb(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 nx=cy,rx=s(((e,t)=>{t.exports=function(e){var t={},n=p(),r=h(),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`),d=Symbol.for(`react.profiler`),f=Symbol.for(`react.provider`),m=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 d:return`Profiler`;case u:return`StrictMode`;case _:return`Suspense`;case v:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case m:return(e.displayName||`Context`)+`.Consumer`;case f: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,ne=e.getPublicInstance,j=e.getRootHostContext,re=e.getChildHostContext,M=e.prepareForCommit,N=e.resetAfterCommit,ie=e.createInstance,P=e.appendInitialChild,F=e.finalizeInitialChildren,I=e.prepareUpdate,ae=e.shouldSetTextContent,oe=e.createTextInstance,L=e.scheduleTimeout,R=e.cancelTimeout,se=e.noTimeout,ce=e.isPrimaryRenderer,le=e.supportsMutation,ue=e.supportsPersistence,de=e.supportsHydration,fe=e.getInstanceFromNode,pe=e.preparePortalMount,me=e.getCurrentEventPriority,he=e.detachDeletedInstance,ge=e.supportsMicrotasks,_e=e.scheduleMicrotask,ve=e.supportsTestSelectors,ye=e.findFiberRoot,be=e.getBoundingRect,xe=e.getTextContent,Se=e.isHiddenSubtree,Ce=e.matchAccessibilityRole,we=e.setFocusIfFocusable,Te=e.setupIntersectionObserver,Ee=e.appendChild,De=e.appendChildToContainer,Oe=e.commitTextUpdate,ke=e.commitMount,Ae=e.commitUpdate,je=e.insertBefore,Me=e.insertInContainerBefore,Ne=e.removeChild,Pe=e.removeChildFromContainer,Fe=e.resetTextContent,Ie=e.hideInstance,Le=e.hideTextInstance,Re=e.unhideInstance,ze=e.unhideTextInstance,Be=e.clearContainer,Ve=e.cloneInstance,He=e.createContainerChildSet,Ue=e.appendChildToContainerChildSet,We=e.finalizeContainerChildren,Ge=e.replaceContainerChildren,Ke=e.cloneHiddenInstance,qe=e.cloneHiddenTextInstance,Je=e.canHydrateInstance,Ye=e.canHydrateTextInstance,Xe=e.canHydrateSuspenseInstance,Ze=e.isSuspenseInstancePending,Qe=e.isSuspenseInstanceFallback,$e=e.getSuspenseInstanceFallbackErrorDetails,et=e.registerSuspenseInstanceRetry,tt=e.getNextHydratableSibling,nt=e.getFirstHydratableChild,rt=e.getFirstHydratableChildWithinContainer,it=e.getFirstHydratableChildWithinSuspenseInstance,at=e.hydrateInstance,ot=e.hydrateTextInstance,st=e.hydrateSuspenseInstance,ct=e.getNextHydratableInstanceAfterSuspenseInstance,lt=e.commitHydratedContainer,ut=e.commitHydratedSuspenseInstance,dt=e.clearSuspenseBoundary,ft=e.clearSuspenseBoundaryFromContainer,pt=e.shouldDeleteUnhydratedTailInstances,mt=e.didNotMatchHydratedContainerTextInstance,ht=e.didNotMatchHydratedTextInstance,gt;function _t(e){if(gt===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);gt=t&&t[1]||``}return`
|
|
145
|
+
`,qd=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return La({root:[`root`,n,`color${G(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${G(n)}`,i&&`circleDisableShrink`]},Vd,t)},Jd=U(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${G(n.color)}`]]}})(Wc(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:Gd||{animation:`${Ud} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Bd()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Yd=U(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Xd=U(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${G(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Wc(({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:Kd||{animation:`${Wd} 1.4s ease-in-out infinite`}}]}))),Zd=U(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Wc(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),Qd=L.forwardRef(function(e,t){let n=ys({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=qd(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((Hd-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,R.jsx)(Jd,{className:B(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,R.jsxs)(Yd,{className:m.svg,ownerState:p,viewBox:`${Hd/2} ${Hd/2} ${Hd} ${Hd}`,children:[o?(0,R.jsx)(Zd,{className:m.track,ownerState:p,cx:Hd,cy:Hd,r:(Hd-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,R.jsx)(Xd,{className:m.circle,style:h,ownerState:p,cx:Hd,cy:Hd,r:(Hd-l)/2,fill:`none`,strokeWidth:l})]})})});function $d(e){return gi(`MuiButton`,e)}var ef=_i(`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(`.`)),tf=L.createContext({}),nf=L.createContext(void 0);I();var rf=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=La({root:[`root`,o&&`loading`,a,`${a}${G(t)}`,`size${G(i)}`,`${a}Size${G(i)}`,`color${G(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${G(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${G(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${G(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},$d,c);return{...c,...l}},af=[{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}}}],of=U(Id,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${G(n.color)}`],t[`size${G(n.size)}`],t[`${n.variant}Size${G(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Wc(({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`},[`&.${ef.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]},[`&.${ef.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${ef.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)`,[`&.${ef.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(Bd()).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`},[`&.${ef.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${ef.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}),[`&.${ef.loading}`]:{color:`transparent`}}}]}})),sf=U(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${G(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}},...af]})),cf=U(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${G(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}},...af]})),lf=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}}]})),uf=U(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),df=L.forwardRef(function(e,t){let n=L.useContext(tf),r=L.useContext(nf),i=ys({props:Ai(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=Ol(h),T=_??(0,R.jsx)(Qd,{"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=rf(E),O=(b||g&&v===`start`)&&(0,R.jsx)(sf,{className:D.startIcon,ownerState:E,children:b||(0,R.jsx)(uf,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,R.jsx)(cf,{className:D.endIcon,ownerState:E,children:f||(0,R.jsx)(uf,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,k=typeof g==`boolean`?(0,R.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,R.jsx)(lf,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:A,...ne}=D;return(0,R.jsxs)(of,{ownerState:E,className:B(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:B(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:ne,children:[O,v!==`end`&&k,a,v===`end`&&k,ee]})}),ff=Tl((0,R.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`),pf=Tl((0,R.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`);I();var mf=U(`div`)({display:`flex`,flexDirection:`column`}),hf=U(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),gf=U(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),_f=U(df)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),vf=e=>{class t extends L.Component{static propTypes={session:F.object,onSessionChange:F.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,R.jsxs)(mf,{children:[(0,R.jsxs)(hf,{children:[(0,R.jsxs)(_f,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,R.jsx)(gf,{children:(0,R.jsx)(pf,{})}),`Undo`]}),(0,R.jsxs)(_f,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,R.jsx)(gf,{children:(0,R.jsx)(ff,{})}),`Start Over`]})]}),(0,R.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t};I();var yf=Jo({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`}}}}}}),bf=U(`div`)({"& table, th, td":{fontSize:`inherit`}}),xf=class extends L.Component{static propTypes={className:F.string,children:F.array,extraCSSRules:F.shape({names:F.arrayOf(F.string),rules:F.string}),fontSizeFactor:F.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,R.jsx)(Mn,{injectFirst:!0,children:(0,R.jsxs)(as,{theme:yf,children:[i?.rules?(0,R.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,(0,R.jsx)(bf,{className:`${t} extraCSSRules`,...a,...o&&{style:o},children:e})]})})}};I();var Sf=U(xf)({display:`flex`,flexDirection:`column`,position:`relative`}),Cf=class extends L.Component{static propTypes={ariaLabel:F.string,children:F.oneOfType([F.arrayOf(F.node),F.node]).isRequired,role:F.string,extraCSSRules:F.shape({names:F.arrayOf(F.string),rules:F.string}),fontSizeFactor:F.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,R.jsx)(Sf,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}};I();var wf=class extends L.Component{static propTypes={tag:F.string,className:F.string,html:F.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,R.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}};function Tf({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 Ef=L.createContext(void 0);function Df(){return L.useContext(Ef)}function Of(e){return gi(`MuiFormLabel`,e)}var kf=_i(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]);I();var Af=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return La({root:[`root`,`color${G(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},Of,t)},jf=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]}})(Wc(({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(Bd()).map(([t])=>({props:{color:t},style:{[`&.${kf.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${kf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${kf.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Mf=U(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Wc(({theme:e})=>({[`&.${kf.error}`]:{color:(e.vars||e).palette.error.main}}))),Nf=L.forwardRef(function(e,t){let n=ys({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=Tf({props:n,muiFormControl:Df(),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=Af(m);return(0,R.jsxs)(jf,{as:o,ownerState:m,className:B(h.root,i),ref:t,...f,children:[r,p.required&&(0,R.jsxs)(Mf,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function Pf(e){return gi(`MuiInputLabel`,e)}_i(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),I();var Ff=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=La({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${G(r)}`,o],asterisk:[s&&`asterisk`]},Pf,t);return{...t,...c}},If=U(Nf,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${kf.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]]}})(Wc(({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)`}}]}))),Lf=L.forwardRef(function(e,t){let n=ys({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=Df(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=Tf({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=Ff(f);return(0,R.jsx)(If,{"data-shrink":u,ref:t,className:B(p.root,s),...c,ownerState:f,classes:p})});function Rf(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function zf(e,t=!1){return e&&(Rf(e.value)&&e.value!==``||t&&Rf(e.defaultValue)&&e.defaultValue!==``)}function Bf(e){return e.startAdornment}function Vf(e){return gi(`MuiFormControl`,e)}_i(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]),I();var Hf=e=>{let{classes:t,margin:n,fullWidth:r}=e;return La({root:[`root`,n!==`none`&&`margin${G(n)}`,r&&`fullWidth`]},Vf,t)},Uf=U(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${G(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%`}}]}),Wf=L.forwardRef(function(e,t){let n=ys({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=Hf(_),[y,b]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{if(!El(t,[`Input`,`Select`]))return;let n=El(t,[`Select`])?t.props.input:t;n&&Bf(n.props)&&(e=!0)}),e}),[x,S]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{El(t,[`Input`,`Select`])&&(zf(t.props,!0)||zf(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=L.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;L.useRef(!1);let E=L.useCallback(()=>{S(!0)},[]),D=L.useCallback(()=>{S(!1)},[]),O=L.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,R.jsx)(Ef.Provider,{value:O,children:(0,R.jsx)(Uf,{as:o,ownerState:_,className:B(v.root,i),ref:t,...g,children:r})})});I();var Gf=U(Wf)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),Kf=U(Lf)(()=>({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)`}})),qf=({label:e,className:t,children:n})=>(0,R.jsxs)(Gf,{className:t,children:[(0,R.jsx)(Kf,{shrink:!0,children:e}),n]});qf.propTypes={label:F.oneOfType([F.string,F.object]).isRequired,className:F.string,children:F.oneOfType([F.arrayOf(F.node),F.node]).isRequired},I();var Jf=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:Tu()},'&: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:Du()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:Du()},'&: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:Kl()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Kl()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),Yf=/\\embed\{newLine\}\[\]/g,Xf=`\\newline `,Zf=`preview-prompt`,Qf=class extends L.Component{static propTypes={prompt:F.string,tagName:F.string,className:F.string,onClick:F.func,defaultClassName:F.string,autoplayAudioEnabled:F.bool,customAudioButton:F.shape({playImage:F.string,pauseImage:F.string})};static defaultProps={onClick:()=>{}};promptRef=L.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 re==`function`&&re(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`:``} ${Zf}`.trim();return(0,R.jsx)(Jf,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(Yf,Xf)}})}};I();var $f=e=>(0,R.jsx)(R.Fragment,{children:L.Children.map(e.children,t=>L.cloneElement(t,{"data-pie-readable":e.false===void 0}))});$f.propTypes={children:F.node,false:F.bool},I();var ep=e=>(0,R.jsx)(R.Fragment,{children:L.Children.map(e.children,t=>L.cloneElement(t,{"data-pie-purpose":e.purpose}))});ep.propTypes={children:F.node,purpose:F.string};var tp;typeof window<`u`&&(tp=new DOMParser);var np=e=>tp.parseFromString(e,`text/html`).body.textContent,rp=e=>{if(!e)return!1;let t=np(e);return!!(t&&t.trim())},ip;typeof window<`u`&&(ip=new DOMParser);var ap=e=>{if(!e)return!1;let t=ip.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},op=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZXhJOUldJk/8QAGwEBAQAD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kuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function sp(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 cp(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:Kc(n,r),{props:s,internalRef:c}=Yc({...a,externalSlotProps:o}),l=pc(c,o?.ref,e.additionalProps?.ref);return Gc(t,{...s,ref:l},r)}var lp=L.createContext({});function up(e){return gi(`MuiList`,e)}_i(`MuiList`,[`root`,`padding`,`dense`,`subheader`]),I();var dp=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return La({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},up,t)},fp=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}}]}),pp=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=L.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=dp(d);return(0,R.jsx)(lp.Provider,{value:u,children:(0,R.jsxs)(fp,{as:a,className:B(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),mp=yc;I();function hp(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function gp(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function _p(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 vp(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`)||!_p(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var yp=L.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=L.useRef(null),p=L.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Dl(()=>{r&&f.current.focus()},[r]),L.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${mp(Ts(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=jc(Cs(t));if(n===`ArrowDown`)e.preventDefault(),vp(t,r,c,s,hp);else if(n===`ArrowUp`)e.preventDefault(),vp(t,r,c,s,gp);else if(n===`Home`)e.preventDefault(),vp(t,null,c,s,hp);else if(n===`End`)e.preventDefault(),vp(t,null,c,s,gp);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&&_p(r,i);i.previousKeyMatched&&(c||vp(t,r,!1,s,hp,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=mc(f,t),g=-1;L.Children.forEach(a,(e,t)=>{if(!L.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 _=L.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),L.cloneElement(e,t)}return e});return(0,R.jsx)(pp,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function bp(e){return gi(`MuiMenu`,e)}_i(`MuiMenu`,[`root`,`paper`,`list`]),I();var xp={vertical:`top`,horizontal:`right`},Sp={vertical:`top`,horizontal:`left`},Cp=e=>{let{classes:t}=e;return La({root:[`root`],paper:[`paper`],list:[`list`]},bp,t)},wp=U(Vl,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),Tp=U(Bl,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),Ep=U(yp,{name:`MuiMenu`,slot:`List`})({outline:0}),Dp=L.forwardRef(function(e,t){let n=ys({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=ra(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=Cp(b),S=r&&!o&&l,C=L.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;L.Children.map(i,(e,t)=>{L.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=cp({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[ee,te]=Xc(`paper`,{className:x.paper,elementType:Tp,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[k,A]=Xc(`list`,{className:B(x.list,s.className),elementType:Ep,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,R.jsx)(wp,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?xp:Sp,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,R.jsx)(k,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...A,children:i})})}),Op=({slotProps:e,...t})=>(0,R.jsx)(Dp,{...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}}}}),kp=c({Collapsible:()=>vd,EnableAudioAutoplayImage:()=>op,Feedback:()=>Qu,HtmlAndMath:()=>wf,InlineMenu:()=>Op,InputContainer:()=>qf,PreviewLayout:()=>Cf,PreviewPrompt:()=>Qf,Purpose:()=>ep,Readable:()=>$f,UiLayout:()=>xf,color:()=>Wl,hasMedia:()=>ap,hasText:()=>rp,indicators:()=>ed,transformDataHeadings:()=>sp,withUndoReset:()=>vf}),Ap={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`}},jp={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`}},Mp=e=>typeof e==`string`,Np=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Pp=e=>e==null?``:``+e,Fp=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Ip=/###/g,Lp=e=>e&&e.indexOf(`###`)>-1?e.replace(Ip,`.`):e,Rp=e=>!e||Mp(e),zp=(e,t,n)=>{let r=Mp(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Rp(e))return{};let t=Lp(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Rp(e)?{}:{obj:e,k:Lp(r[i])}},Bp=(e,t,n)=>{let{obj:r,k:i}=zp(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=zp(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=zp(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Vp=(e,t,n,r)=>{let{obj:i,k:a}=zp(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Hp=(e,t)=>{let{obj:n,k:r}=zp(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Up=(e,t,n)=>{let r=Hp(e,n);return r===void 0?Hp(t,n):r},Wp=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Mp(e[r])||e[r]instanceof String||Mp(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Wp(e[r],t[r],n):e[r]=t[r]);return e},Gp=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Kp={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},qp=e=>Mp(e)?e.replace(/[&<>"'\/]/g,e=>Kp[e]):e,Jp=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}},Yp=[` `,`,`,`?`,`!`,`;`],Xp=new Jp(20),Zp=(e,t,n)=>{t||=``,n||=``;let r=Yp.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Xp.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},Qp=(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},$p=e=>e?.replace(/_/g,`-`),em={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)}},tm=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||em,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:(Mp(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)}},nm=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])})}},rm=class extends nm{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):Mp(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Hp(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Mp(n)?s:Qp(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),Bp(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)(Mp(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=Hp(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Wp(s,n,i):s={...s,...n},Bp(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}},im={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}},am=Symbol(`i18next/PATH_KEY`);function om(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===am?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function sm(e,t){let{[am]:n}=e(om()),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 cm={},lm=e=>!Mp(e)&&typeof e!=`boolean`&&typeof e!=`number`,um=class e extends nm{constructor(e,t={}){super(),Fp([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=tm.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=lm(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&&!Zp(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Mp(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:Mp(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=sm(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?sm(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&&!Mp(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=lm(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(Mp(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:lm(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&&Mp(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=Mp(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&&!Mp(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=Mp(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=im.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 Mp(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?sm(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&&!Mp(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Mp(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,!cm[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(cm[`${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&&!Mp(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}},dm=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=tm.create(`languageUtils`)}getScriptPartFromCode(e){if(e=$p(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=$p(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Mp(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)),Mp(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 Mp(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))):Mp(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},fm={zero:0,one:1,two:2,few:3,many:4,other:5},pm={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},mm=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=tm.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=$p(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!`),pm;if(!e.match(/-|_/))return pm;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)=>fm[e]-fm[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))}},hm=(e,t,n,r=`.`,i=!0)=>{let a=Up(e,t,n);return!a&&i&&Mp(n)&&(a=Qp(e,n,r),a===void 0&&(a=Qp(t,n,r))),a},gm=e=>e.replace(/\$/g,`$$$$`),_m=class{constructor(e={}){this.logger=tm.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?qp:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Gp(i):a||`{{`,this.suffix=o?Gp(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Gp(d):f||Gp(`$t(`),this.nestingSuffix=p?Gp(p):m||Gp(`)`),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=hm(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(hm(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=>gm(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?gm(this.escape(e)):gm(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=Mp(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!Mp(a)&&!this.useRawValueToEscape&&(a=Pp(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(`${Gp(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&&!Mp(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&&!Mp(i))return i;Mp(i)||(i=Pp(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}},vm=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}},ym=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($p(r),i),t[o]=s),s(n)}},bm=e=>(t,n,r)=>e($p(n),r)(t),xm=class{constructor(e={}){this.logger=tm.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?ym:bm;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()]=ym(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}=vm(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)}},Sm=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Cm=class extends nm{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=tm.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=>{Vp(n.loaded,[i],a),Sm(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();Mp(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Mp(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)}}},wm=()=>({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]),Mp(e[1])&&(t.defaultValue=e[1]),Mp(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}),Tm=e=>(Mp(e.ns)&&(e.ns=[e.ns]),Mp(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Mp(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),Em=()=>{},Dm=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Om=`__i18next_supportNoticeShown`,km=()=>!!(typeof globalThis<`u`&&globalThis[Om]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),Am=()=>{typeof globalThis<`u`&&(globalThis[Om]=!0)},jm=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)),Mm=class e extends nm{constructor(e={},t){if(super(),this.options=Tm(e),this.services={},this.logger=tm,this.modules={external:[]},Dm(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&&(Mp(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=wm();this.options={...n,...this.options,...Tm(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&&!jm(this)&&!km()&&(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 💙`),Am());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?tm.init(r(this.modules.logger),this.options):tm.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:xm;let t=new dm(this.options);this.store=new rm(this.options.resources,this.options);let i=this.services;i.logger=tm,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new mm(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 _m(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Cm(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 um(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||=Em,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=Np(),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=Em){let n=t,r=Mp(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=Np();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||=Em,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`&&im.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=Np();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=Mp(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Mp(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=sm(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=sm(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=sm(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return Mp(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=Np();return this.options.ns?(Mp(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=Np();Mp(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 dm(wm());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=Em){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 rm(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={...wm().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new _m(n)}return a.translator=new um(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();Mm.createInstance,Mm.dir,Mm.init,Mm.loadResources,Mm.reloadResources,Mm.use,Mm.changeLanguage,Mm.getFixedT,Mm.t,Mm.exists,Mm.setDefaultNamespace,Mm.hasLoadedNamespace,Mm.loadNamespaces,Mm.loadLanguages,Mm.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Ap,es:jp}});var Nm={translator:{...Mm,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 Mm.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},Pm={tools:[{type:`Select`,label:`Select`,icon:`mdiCursorDefault`},{type:`FreePathDrawable`,label:`Free Draw`,icon:`mdiPencil`},{type:`LineDrawable`,label:`Line`,icon:`mdiMinus`},{type:`RectangleDrawable`,label:`Rectangle`,icon:`mdiRectangle`},{type:`CircleDrawable`,label:`Circle`,icon:`mdiCircle`},{type:`Text`,label:`Text Entry`,icon:`mdiFormatColorText`},{type:`EraserDrawable`,label:`Eraser`,icon:`mdiEraser`}]};I();var Fm=U(df)({fontSize:`0.9em`,marginLeft:8,minWidth:32,height:32,"& span":{"& svg":{width:`1.3em !important`,height:`1.3em !important`}}}),Im=({label:e,onClick:t,disabled:n,title:r})=>(0,R.jsx)(Fm,{title:r,onClick:t,disabled:n,size:`small`,variant:`contained`,children:e});Im.propTypes={disabled:F.bool,label:F.oneOfType([F.string,F.object]),onClick:F.func,title:F.string},Im.defaultProps={disabled:!1,label:`Add`,onClick:()=>{},title:``};function Lm(e){return gi(`MuiNativeSelect`,e)}var Rm=_i(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);I();var zm=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return La({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${G(n)}`,a&&`iconOpen`,r&&`disabled`]},Lm,t)},Bm=U(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${Rm.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Vm=U(Bm,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:Qo,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Rm.multiple}`]:t.multiple}]}})({}),Hm=U(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${Rm.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),Um=U(Hm,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${G(n.variant)}`],n.open&&t.iconOpen]}})({}),Wm=L.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=zm(l);return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(Vm,{ownerState:l,className:B(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,R.jsx)(Um,{as:a,ownerState:l,className:u.icon})]})});function Gm(e){return gi(`MuiSelect`,e)}var Km=_i(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function qm(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function Jm(e){return e==null||typeof e==`string`&&!e.trim()}function Ym(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var Xm=L.createContext(null);function Zm(){return L.useContext(Xm)}var Qm=Xm.Provider;I();var $m,eh=U(Bm,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${Km.select}`]:t.select},{[`&.${Km.select}`]:t[n.variant]},{[`&.${Km.error}`]:t.error},{[`&.${Km.multiple}`]:t.multiple}]}})({[`&.${Km.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),th=U(Hm,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${G(n.variant)}`],n.open&&t.iconOpen]}})({}),nh=U(`input`,{shouldForwardProp:e=>Zo(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),rh=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return La({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${G(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},Gm,t)},ih=L.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:D,renderValue:O,required:ee,SelectDisplayProps:te={},tabIndex:k,type:A,value:ne,variant:j=`standard`,...re}=e,[M,N]=Al({controlled:ne,default:l,name:`Select`}),[ie,P]=Al({controlled:E,default:c,name:`Select`}),F=L.useRef(null),I=L.useRef(null),[ae,oe]=L.useState(null),{current:se}=L.useRef(E!=null),[ce,le]=L.useState(),[ue,de]=L.useState(null),fe=mc(t,m),pe=L.useCallback(e=>{I.current=e,e&&oe(e)},[]),me=ae?.parentNode;L.useImperativeHandle(fe,()=>({focus:()=>{I.current.focus()},node:F.current,value:M}),[M]);let he=ae!==null&&ie;L.useEffect(()=>{if(!he||!me||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{le(me.clientWidth)});return e.observe(me),()=>{e.disconnect()}},[he,me,a]),L.useEffect(()=>{c&&ie&&ae&&!se&&(le(a?null:me.clientWidth),I.current.focus())},[ae,a]),L.useEffect(()=>{i&&I.current.focus()},[i]),L.useEffect(()=>{if(!h)return;let e=Cs(I.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&I.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let ge=(e,t)=>{e?(de(qm(t)),T&&T(t)):(de(null),x&&x(t)),se||(le(a?null:me.clientWidth),P(e))},_e=e=>{w?.(e),e.button===0&&(e.preventDefault(),I.current.focus(),ge(!0,e))},ve=e=>{ge(!1,e)},be=L.Children.toArray(o),xe=e=>{let t=be.find(t=>t.props.value===e.target.value);t!==void 0&&(N(t.props.value),b&&b(e,t))},Se=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(M)?M.slice():[];let t=M.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),M!==n&&(N(n),b)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,e)}_||ge(!1,t)}},Ce=e=>{D||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),ge(!0,e)),C?.(e))},we=e=>{!he&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:M,name:v}}),y(e))};delete re[`aria-invalid`];let Te,Ee,De=[],Oe=!1;(zf({value:M})||d)&&(O?Te=O(M):Oe=!0);let ke=be.map(e=>{if(!L.isValidElement(e))return null;let t;if(_){if(!Array.isArray(M))throw Error(ye(2));t=M.some(t=>Ym(t,e.props.value)),t&&Oe&&De.push(e.props.children)}else t=Ym(M,e.props.value),t&&Oe&&(Ee=e.props.children);return L.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:Se(e),onKeyUp:t=>{t.key===` `&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:`option`,selected:t,value:void 0,"data-value":e.props.value})});Oe&&(Te=_?De.length===0?null:De.reduce((e,t,n)=>(e.push(t),n<De.length-1&&e.push(`, `),e),[]):Ee);let Ae=ce;!a&&se&&ae&&(Ae=me.clientWidth);let je;je=k===void 0?u?null:0:k;let Me=te.id||(v?`mui-component-select-${v}`:void 0),Ne={...e,variant:j,value:M,open:he,error:f},Pe=rh(Ne),Fe={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(Ne):g.slotProps?.paper},Ie={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(Ne):g.slotProps?.list},Le=da();return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(eh,{as:`div`,ref:pe,tabIndex:je,role:`combobox`,"aria-controls":he?Le:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":he?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,Me].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":ee?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Ce,onMouseDown:u||D?null:_e,onBlur:we,onFocus:S,...te,ownerState:Ne,className:B(te.className,Pe.select,s),id:Me,children:Jm(Te)?$m||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):Te}),(0,R.jsx)(nh,{"aria-invalid":f,value:Array.isArray(M)?M.join(`,`):M,name:v,ref:F,"aria-hidden":!0,onChange:xe,tabIndex:-1,disabled:u,className:Pe.nativeInput,autoFocus:i,required:ee,...re,ownerState:Ne}),(0,R.jsx)(th,{as:p,className:Pe.icon,ownerState:Ne}),(0,R.jsx)(Qm,{value:ue,children:(0,R.jsx)(Dp,{id:`menu-${v||``}`,anchorEl:me,open:he,onClose:ve,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:Le,...Ie},paper:{...Fe,style:{minWidth:Ae,...Fe==null?null:Fe.style}}},children:ke})})]})}),ah=Tl((0,R.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);I();function oh(e){return parseInt(e,10)||0}var sh={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function ch(e){for(let t in e)return!1;return!0}function lh(e){return ch(e)||e.outerHeightStyle===0&&!e.overflowing}var uh=L.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=L.useRef(o!=null),l=L.useRef(null),u=pc(t,l),d=L.useRef(null),f=L.useRef(null),p=L.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=ws(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
|
|
146
|
+
`&&(n.value+=` `);let o=a.boxSizing,s=oh(a.paddingBottom)+oh(a.paddingTop),c=oh(a.borderBottomWidth)+oh(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),m=il(()=>{let e=l.current,t=p();if(!e||!t||lh(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=L.useCallback(()=>{let e=l.current,t=p();if(!e||!t||lh(t))return;let n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?`hidden`:``},[p]),g=L.useRef(-1);return ji(()=>{let e=bs(h),t=l?.current;if(!t)return;let n=ws(t);n.addEventListener(`resize`,e);let r;return typeof ResizeObserver<`u`&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),h(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener(`resize`,e),r&&r.disconnect()}},[p,h,m]),ji(()=>{h()}),(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
|
|
147
|
+
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,R.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...sh.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function dh(e){return gi(`MuiInputBase`,e)}var fh=_i(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]);I();var ph,mh=`mui-auto-fill`,hh=`mui-auto-fill-cancel`,gh=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${G(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},_h=(e,t)=>{let{ownerState:n}=e;return[t.input,n.size===`small`&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type===`search`&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},vh=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return La({root:[`root`,`color${G(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${G(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,u&&`inputMultiline`,f===`small`&&`inputSizeSmall`,l&&`inputHiddenLabel`,p&&`inputAdornedStart`,a&&`inputAdornedEnd`,d&&`readOnly`]},dh,t)},yh=U(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:gh})(Wc(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${fh.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),bh=U(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:_h})(Wc(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create(`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${fh.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${fh.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:hh,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:mh}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),xh=vs({[`@keyframes ${mh}`]:{from:{animationName:mh}},[`@keyframes ${hh}`]:{from:{animationName:hh}}}),Sh=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiInputBase`}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:o,color:s,components:c={},componentsProps:l={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:f,endAdornment:p,error:m,fullWidth:h=!1,id:g,inputComponent:_=`input`,inputProps:v={},inputRef:y,margin:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onClick:D,onFocus:O,onKeyDown:ee,onKeyUp:te,placeholder:k,readOnly:A,renderSuffix:ne,rows:j,size:re,slotProps:M={},slots:N={},startAdornment:ie,type:P=`text`,value:F,...I}=n,ae=v.value==null?F:v.value,{current:oe}=L.useRef(ae!=null),se=L.useRef(),ce=L.useCallback(e=>{},[]),le=mc(se,y,v.ref,ce),[ue,de]=L.useState(!1),fe=Df(),pe=Tf({props:n,muiFormControl:fe,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});pe.focused=fe?fe.focused:ue,L.useEffect(()=>{!fe&&d&&ue&&(de(!1),T&&T())},[fe,d,ue,T]);let me=fe&&fe.onFilled,he=fe&&fe.onEmpty,ge=L.useCallback(e=>{zf(e)?me&&me():he&&he()},[me,he]);Dl(()=>{oe&&ge({value:ae})},[ae,ge,oe]),Dl(()=>{if(!a)return;let e=se.current;if(!e)return;let t=Cs(e),n=jc(t),r=n==null||n===t.body||n===t.documentElement;e===n?fe&&fe.onFocus?fe.onFocus():de(!0):r&&e.focus()},[a]);let _e=e=>{O&&O(e),v.onFocus&&v.onFocus(e),fe&&fe.onFocus?fe.onFocus(e):de(!0)},ve=e=>{T&&T(e),v.onBlur&&v.onBlur(e),fe&&fe.onBlur?fe.onBlur(e):de(!1)},be=(e,...t)=>{if(!oe){let t=e.target||se.current;if(t==null)throw Error(ye(1));ge({value:t.value})}v.onChange&&v.onChange(e,...t),E&&E(e,...t)};L.useEffect(()=>{ge(se.current)},[]);let xe=e=>{se.current&&e.currentTarget===e.target&&se.current.focus(),D&&D(e)},Se=_,Ce=v;C&&Se===`input`&&(Ce=j?{type:void 0,minRows:j,maxRows:j,...Ce}:{type:void 0,maxRows:x,minRows:S,...Ce},Se=uh);let we=e=>{ge(e.animationName===hh?se.current:{value:`x`})};L.useEffect(()=>{fe&&fe.setAdornedStart(!!ie)},[fe,ie]);let Te={...n,color:pe.color||`primary`,disabled:pe.disabled,endAdornment:p,error:pe.error,focused:pe.focused,formControl:fe,fullWidth:h,hiddenLabel:pe.hiddenLabel,multiline:C,size:pe.size,startAdornment:ie,type:P},Ee=vh(Te),De=N.root||c.Root||yh,Oe=M.root||l.root||{},ke=N.input||c.Input||bh;return Ce={...Ce,...M.input??l.input},(0,R.jsxs)(L.Fragment,{children:[!f&&typeof xh==`function`&&(ph||=(0,R.jsx)(xh,{})),(0,R.jsxs)(De,{...Oe,ref:t,onClick:xe,...I,...!gs(De)&&{ownerState:{...Te,...Oe.ownerState}},className:B(Ee.root,Oe.className,o,A&&`MuiInputBase-readOnly`),children:[ie,(0,R.jsx)(Ef.Provider,{value:null,children:(0,R.jsx)(ke,{"aria-invalid":pe.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:pe.disabled,id:g,onAnimationStart:we,name:w,placeholder:k,readOnly:A,required:pe.required,rows:j,value:ae,onKeyDown:ee,onKeyUp:te,type:P,...Ce,...!gs(ke)&&{as:Se,ownerState:{...Te,...Ce.ownerState}},ref:le,className:B(Ee.input,Ce.className,A&&`MuiInputBase-readOnly`),onBlur:ve,onChange:be,onFocus:_e})}),p,ne?ne({...pe,startAdornment:ie}):null]})]})});function Ch(e){return gi(`MuiInput`,e)}var wh={...fh,..._i(`MuiInput`,[`root`,`underline`,`input`])};I();var Th=e=>{let{classes:t,disableUnderline:n}=e,r=La({root:[`root`,!n&&`underline`],input:[`input`]},Ch,t);return{...t,...r}},Eh=U(yh,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...gh(e,t),!n.disableUnderline&&t.underline]}})(Wc(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${wh.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${wh.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${wh.disabled}, .${wh.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${wh.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Bd()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),Dh=U(bh,{name:`MuiInput`,slot:`Input`,overridesResolver:_h})({}),Oh=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,inputComponent:s=`input`,multiline:c=!1,slotProps:l,slots:u={},type:d=`text`,...f}=n,p=Th(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?Un(l??a,m):m;return(0,R.jsx)(Sh,{slots:{root:u.root??i.Root??Eh,input:u.input??i.Input??Dh},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});Oh.muiName=`Input`;function kh(e){return gi(`MuiFilledInput`,e)}var Ah={...fh,..._i(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])};I();var jh=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=La({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${G(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},kh,t);return{...t,...c}},Mh=U(yh,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...gh(e,t),!n.disableUnderline&&t.underline]}})(Wc(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Ah.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Ah.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Ah.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Ah.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Ah.disabled}, .${Ah.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ah.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Bd()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),Nh=U(bh,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:_h})(Wc(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Ph=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,hiddenLabel:s,inputComponent:c=`input`,multiline:l=!1,slotProps:u,slots:d={},type:f=`text`,...p}=n,m={...n,disableUnderline:r,fullWidth:o,inputComponent:c,multiline:l,type:f},h=jh(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?Un(g,u??a):g;return(0,R.jsx)(Sh,{slots:{root:d.root??i.Root??Mh,input:d.input??i.Input??Nh},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});Ph.muiName=`Input`,I();var Fh,Ih=U(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:Qo})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),Lh=U(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:Qo})(Wc(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Rh(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,R.jsx)(Ih,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,R.jsx)(Lh,{ownerState:c,children:s?(0,R.jsx)(`span`,{children:i}):Fh||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}function zh(e){return gi(`MuiOutlinedInput`,e)}var Bh={...fh,..._i(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};I();var Vh=e=>{let{classes:t}=e,n=La({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},zh,t);return{...t,...n}},Hh=U(yh,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:gh})(Wc(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Bh.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Bh.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Bh.focused} .${Bh.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Bd()).map(([t])=>({props:{color:t},style:{[`&.${Bh.focused} .${Bh.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Bh.error} .${Bh.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Bh.disabled} .${Bh.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),Uh=U(Rh,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Wc(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Wh=U(bh,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:_h})(Wc(({theme:e})=>({padding:`16.5px 14px`,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),Gh=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiOutlinedInput`}),{components:r={},fullWidth:i=!1,inputComponent:a=`input`,label:o,multiline:s=!1,notched:c,slots:l={},slotProps:u={},type:d=`text`,...f}=n,p=Vh(n),m=Df(),h=Tf({props:n,muiFormControl:m,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),g={...n,color:h.color||`primary`,disabled:h.disabled,error:h.error,focused:h.focused,formControl:m,fullWidth:i,hiddenLabel:h.hiddenLabel,multiline:s,size:h.size,type:d},_=l.root??r.Root??Hh,v=l.input??r.Input??Wh,[y,b]=Xc(`notchedOutline`,{elementType:Uh,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,R.jsxs)(L.Fragment,{children:[o,` `,`*`]}):o}});return(0,R.jsx)(Sh,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,R.jsx)(y,{...b,notched:c===void 0?!!(e.startAdornment||e.filled||e.focused):c}),fullWidth:i,inputComponent:a,multiline:s,ref:t,type:d,...f,classes:{...p,notchedOutline:null}})});Gh.muiName=`Input`,I();var Kh=e=>{let{classes:t}=e,n=La({root:[`root`]},Gm,t);return{...t,...n}},qh={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>Qo(e)&&e!==`variant`},Jh=U(Oh,qh)(``),Yh=U(Gh,qh)(``),Xh=U(Ph,qh)(``),Zh=L.forwardRef(function(e,t){let n=ys({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=ah,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?Wm:ih,E=Tf({props:n,muiFormControl:Df(),states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},ee=Kh(O),{root:te,...k}=ee,A=d||{standard:(0,R.jsx)(Jh,{ownerState:O}),outlined:(0,R.jsx)(Yh,{label:p,ownerState:O}),filled:(0,R.jsx)(Xh,{ownerState:O})}[D],ne=mc(t,Ms(A));return(0,R.jsx)(L.Fragment,{children:L.cloneElement(A,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?Un(k,f.classes):k,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:ne,className:B(A.props.className,o,ee.root),...!d&&{variant:D},...w})})});Zh.muiName=`Select`;var Qh=_i(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),$h=_i(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),eg=_i(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function tg(e){return gi(`MuiMenuItem`,e)}var ng=_i(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);I();function rg(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var ig=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},ag=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=La({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},tg,o);return{...o,...s}},og=U(Id,{shouldForwardProp:e=>Qo(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:ig})(Wc(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${ng.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${ng.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${ng.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${ng.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ng.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Qh.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Qh.inset}`]:{marginLeft:52},[`& .${eg.root}`]:{marginTop:0,marginBottom:0},[`& .${eg.inset}`]:{paddingLeft:36},[`& .${$h.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${$h.root} svg`]:{fontSize:`1.25rem`}}}]}))),sg=L.forwardRef(function(e,t){let n=ys({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=Zm(),m=L.useContext(lp),h=L.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=L.useRef(null);Dl(()=>{r&&g.current&&rg(g.current,p)},[r]);let _={...n,dense:h.dense,divider:o,disableGutters:s},v=ag(n),y=mc(g,t),{root:b,...x}=v,S;return n.disabled||(S=u===void 0?-1:u),(0,R.jsx)(lp.Provider,{value:h,children:(0,R.jsx)(og,{ref:y,role:l,tabIndex:S,component:i,focusVisibleClassName:B(v.focusVisible,c),className:B(v.root,d),...f,ownerState:_,classes:x})})});I();function cg(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function lg(e,t){return!e||cg(e)?e:cg(e.default)?e.default:t&&cg(e[t])?e[t]:t&&cg(e[t]?.default)?e[t].default:e}var ug=lg(qf,`InputContainer`)||lg(pg.InputContainer,`InputContainer`),dg=kp,fg=dg.default,pg=fg&&typeof fg==`object`?fg:dg,{translator:mg}=Nm,hg=U(`div`)(({theme:e})=>({marginTop:e.spacing(2),display:`flex`})),gg=U(ug)({flex:1,fontSize:`inherit`,width:`90%`}),_g=U(sg)(({theme:e,isBlackColor:t})=>({borderRadius:`2px`,fontSize:`inherit`,height:`22px`,marginLeft:e.spacing(2),marginRight:e.spacing(2),marginTop:e.spacing(2),...t&&{color:e.palette.background.paper}})),vg=U(Zh)({fontSize:`inherit`,transform:`translate(0%, 40%)`}),yg=class extends L.Component{onChange=e=>t=>{let{value:n}=t.target,{onFillColorChange:r,onOutlineColorChange:i,onPaintColorChange:a}=this.props;e===`fill`?r(n):e===`outline`?i(n):a(n)};render(){let{fillColor:e,outlineColor:t,fillList:n,outlineList:r,language:i}=this.props;return(0,R.jsxs)(hg,{children:[(0,R.jsx)(gg,{label:mg.t(`drawingResponse.fillColor`,{lng:i}),children:(0,R.jsx)(vg,{onChange:this.onChange(`fill`),value:e,variant:`standard`,MenuProps:{transitionDuration:{enter:225,exit:195}},children:n.map(({value:e,label:t})=>(0,R.jsx)(_g,{value:e,isBlackColor:e===`black`,style:{backgroundColor:e},children:t},e))})}),(0,R.jsx)(gg,{label:mg.t(`drawingResponse.outlineColor`,{lng:i}),children:(0,R.jsx)(vg,{onChange:this.onChange(`outline`),value:t,variant:`standard`,MenuProps:{transitionDuration:{enter:225,exit:195}},children:r.map(({value:e,label:t})=>(0,R.jsx)(_g,{value:e,style:{border:`2px solid ${e}`},children:t},e))})})]})}};yg.propTypes={fillColor:F.string.isRequired,fillList:F.array.isRequired,onFillColorChange:F.func.isRequired,onOutlineColorChange:F.func.isRequired,onPaintColorChange:F.func.isRequired,outlineColor:F.string.isRequired,outlineList:F.array.isRequired,language:F.string};var bg=Math.PI/180;function xg(){return typeof window<`u`&&({}.toString.call(window)===`[object Window]`||{}.toString.call(window)===`[object global]`)}var Sg=typeof global<`u`?global:typeof window<`u`?window:typeof WorkerGlobalScope<`u`?self:{},J={_global:Sg,version:`8.3.0`,isBrowser:xg(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return J.angleDeg?e*bg: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:Sg.document,_injectGlobal(e){Sg.Konva=e}},Cg=e=>{J[e.prototype.getClassName()]=e};J._injectGlobal(J);var wg=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}},Tg=`[object Array]`,Eg=`[object Number]`,Dg=`[object String]`,Og=`[object Boolean]`,kg=Math.PI/180,Ag=180/Math.PI,jg=`#`,Mg=``,Ng=`0`,Pg=`Konva warning: `,Fg=`Konva error: `,Ig=`rgb(`,Lg={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]},Rg=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,zg=[],Bg=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)===Tg},_isNumber(e){return Object.prototype.toString.call(e)===Eg&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===Dg},_isBoolean(e){return Object.prototype.toString.call(e)===Og},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){zg.push(e),zg.length===1&&Bg(function(){let e=zg;zg=[],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(jg,Mg);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=Ng+e;return jg+e},getRGB(e){var t;return e in Lg?(t=Lg[e],{r:t[0],g:t[1],b:t[2]}):e[0]===jg?this._hexToRgb(e.substring(1)):e.substr(0,4)===Ig?(t=Rg.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=Lg[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*kg},radToDeg(e){return e*Ag},_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(Fg+e)},error(e){console.error(Fg+e)},warn(e){J.showWarnings&&console.warn(Pg+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 Vg(e){return Y._isString(e)?`"`+e+`"`:Object.prototype.toString.call(e)===`[object Number]`||Y._isBoolean(e)?e:Object.prototype.toString.call(e)}function Hg(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(Vg(e)+` is a not valid value for "`+t+`" attribute. The value should be a number.`),e}}function Ug(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(Vg(t)+` is a not valid value for "`+n+`" attribute. The value should be a number or Array<number>(`+e+`)`),t}}function Wg(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||e===`auto`||Y.warn(Vg(e)+` is a not valid value for "`+t+`" attribute. The value should be a number or "auto".`),e}}function Gg(){if(J.isUnminified)return function(e,t){return Y._isString(e)||Y.warn(Vg(e)+` is a not valid value for "`+t+`" attribute. The value should be a string.`),e}}function Kg(){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(Vg(e)+` is a not valid value for "`+t+`" attribute. The value should be a string or a native gradient.`),e}}function qg(){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(Vg(e)+` is a not valid value for "`+t+`" attribute. The value should be a array of numbers.`),e}}function Jg(){if(J.isUnminified)return function(e,t){return e===!0||e===!1||Y.warn(Vg(e)+` is a not valid value for "`+t+`" attribute. The value should be a boolean.`),e}}function Yg(e){if(J.isUnminified)return function(t,n){return Y.isObject(t)||Y.warn(Vg(t)+` is a not valid value for "`+n+`" attribute. The value should be an object with properties `+e),t}}var Xg=`get`,Zg=`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=Xg+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=Zg+Y._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Zg+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=Xg+o(t),c=Zg+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=Yg(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=Zg+n,i=Xg+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=Xg+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=Xg+Y._capitalize(t),a=Zg+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 Qg(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 $g=`,`,e_=`(`,t_=`)`,n_=`([`,r_=`])`,i_=`;`,a_=`()`,o_=`=`,s_=`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(`.`),c_=[`fillStyle`,`strokeStyle`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`,`lineCap`,`lineDashOffset`,`lineJoin`,`lineWidth`,`miterLimit`,`font`,`textAlign`,`textBaseline`,`globalAlpha`,`globalCompositeOperation`,`imageSmoothingEnabled`],l_=100,u_=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+=a_:Y._isArray(c[0])?i+=n_+c.join($g)+r_:(t&&(c=c.map(e=>typeof e==`number`?Math.floor(e):e)),i+=e_+c.join($g)+t_)):(i+=o.property,e||(i+=o_+o.val)),i+=i_;return i}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr,n;t.push(e),n=t.length,n>=l_&&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=s_.length,n=this.setAttr,r,i,a=function(t){var n=e[t],r;e[t]=function(){return i=Qg(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(s_[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)}};c_.forEach(function(e){Object.defineProperty(u_.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});var d_=class extends u_{_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)}},f_=class extends u_{_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()}}},p_;function m_(){if(p_)return p_;var e=Y.createCanvasElement().getContext(`2d`);return p_=(function(){return(J._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)})(),p_}var h_=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||J.pixelRatio||m_();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(h_,`pixelRatio`,void 0,X());var g_=class extends h_{constructor(e={width:0,height:0}){super(e),this.context=new d_(this),this.setSize(e.width,e.height)}},__=class extends h_{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new f_(this),this.setSize(e.width,e.height)}},v_={get isDragging(){var e=!1;return v_._dragElements.forEach(t=>{t.dragStatus===`dragging`&&(e=!0)}),e},justDragged:!1,get node(){var e;return v_._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){let t=[];v_._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){v_._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`)&&(v_.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){v_._dragElements.forEach((t,n)=>{t.dragStatus===`stopped`&&t.node.fire(`dragend`,{type:`dragend`,target:t.node,evt:e},!0),t.dragStatus!==`dragging`&&v_._dragElements.delete(n)})}};J.isBrowser&&(window.addEventListener(`mouseup`,v_._endDragBefore,!0),window.addEventListener(`touchend`,v_._endDragBefore,!0),window.addEventListener(`mousemove`,v_._drag),window.addEventListener(`touchmove`,v_._drag),window.addEventListener(`mouseup`,v_._endDragAfter,!1),window.addEventListener(`touchend`,v_._endDragAfter,!1));var y_=`absoluteOpacity`,b_=`allEventListeners`,x_=`absoluteTransform`,S_=`absoluteScale`,C_=`canvas`,w_=`Change`,T_=`children`,E_=`konva`,D_=`listening`,O_=`mouseenter`,k_=`mouseleave`,A_=`set`,j_=`Shape`,M_=` `,N_=`stage`,P_=`transform`,F_=`Stage`,I_=`visible`,L_=[`xChange.konva`,`yChange.konva`,`scaleXChange.konva`,`scaleYChange.konva`,`skewXChange.konva`,`skewYChange.konva`,`rotationChange.konva`,`offsetXChange.konva`,`offsetYChange.konva`,`transformsEnabledChange.konva`].join(M_),R_=1,Q=class e{constructor(e){this._id=R_++,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===P_||e===x_)&&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===P_||e===x_)&&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(M_);this.on(n,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(C_)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===x_&&this.fire(`absoluteTransformChange`)}clearCache(){return this._cache.delete(C_),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 g_({pixelRatio:a,width:r,height:i}),f=new g_({pixelRatio:a,width:0,height:0}),p=new __({pixelRatio:u,width:r,height:i}),m=d.getContext(),h=p.getContext();return p.isCache=!0,d.isCache=!0,this._cache.delete(C_),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(y_),this._clearSelfAndDescendantCache(S_),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(C_,{scene:d,filter:f,hit:p,x:o,y:s}),this._requestDraw(),this}isCached(){return this._cache.has(C_)}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(b_),arguments.length===3)return this._delegate.apply(this,arguments);var n=e.split(M_),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(M_),r=n.length,i,a,o,s,c,l;if(this._cache&&this._cache.delete(b_),!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(),v_._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(x_),this._clearSelfAndDescendantCache(y_),this._clearSelfAndDescendantCache(S_),this._clearSelfAndDescendantCache(N_),this._clearSelfAndDescendantCache(I_),this._clearSelfAndDescendantCache(D_)}_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!==T_&&(n=A_+Y._capitalize(t),Y._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))}),this}isListening(){return this._getCache(D_,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(I_,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;v_._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!==j_&&(r=r.concat(o.getChildren().slice())),o._id===t._id&&(a=i);r.length>0&&r[0].getDepth()<=e&&s(r)}return t.nodeType!==F_&&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(P_),this._clearSelfAndDescendantCache(x_)),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 wg,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(P_);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(P_),this._clearSelfAndDescendantCache(x_),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(y_,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(N_,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(x_,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var t;if(e)return t=new wg,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(x_)||new wg,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(P_,this._getTransform)}_getTransform(){var e=this._cache.get(P_)||new wg;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(E_)<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 g_({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+w_,{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[A_+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===j_&&(t.target=this),!((e===O_||e===k_)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType===`Stage`&&!n))){this._fire(e,t);var r=(e===O_||e===k_)&&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(b_);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(b_,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;v_._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){v_._dragElements.has(this._id)||this._createDragElement(e);let n=v_._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=v_._dragElements.get(this._id);t&&(t.dragStatus=`stopped`),v_._endDragBefore(e),v_._endDragAfter(e)}setDraggable(e){this._setAttr(`draggable`,e),this._dragChange()}isDragging(){let e=v_._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;v_._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=v_._dragElements.get(this._id),t=e&&e.dragStatus===`dragging`,n=e&&e.dragStatus===`ready`;t?this.stopDrag():n&&v_._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,L_,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(P_),this._clearSelfAndDescendantCache(x_)}),Q.prototype.on.call(Q.prototype,`visibleChange.konva`,function(){this._clearSelfAndDescendantCache(I_)}),Q.prototype.on.call(Q.prototype,`listeningChange.konva`,function(){this._clearSelfAndDescendantCache(D_)}),Q.prototype.on.call(Q.prototype,`opacityChange.konva`,function(){this._clearSelfAndDescendantCache(y_)});var z_=Z.addGetterSetter;z_(Q,`zIndex`),z_(Q,`absolutePosition`),z_(Q,`position`),z_(Q,`x`,0,X()),z_(Q,`y`,0,X()),z_(Q,`globalCompositeOperation`,`source-over`,Gg()),z_(Q,`opacity`,1,X()),z_(Q,`name`,``,Gg()),z_(Q,`id`,``,Gg()),z_(Q,`rotation`,0,X()),Z.addComponentsGetterSetter(Q,`scale`,[`x`,`y`]),z_(Q,`scaleX`,1,X()),z_(Q,`scaleY`,1,X()),Z.addComponentsGetterSetter(Q,`skew`,[`x`,`y`]),z_(Q,`skewX`,0,X()),z_(Q,`skewY`,0,X()),Z.addComponentsGetterSetter(Q,`offset`,[`x`,`y`]),z_(Q,`offsetX`,0,X()),z_(Q,`offsetY`,0,X()),z_(Q,`dragDistance`,null,X()),z_(Q,`width`,0,X()),z_(Q,`height`,0,X()),z_(Q,`listening`,!0,Jg()),z_(Q,`preventDefault`,!0,Jg()),z_(Q,`filters`,null,function(e){return this._filterUpToDate=!1,e}),z_(Q,`visible`,!0,Jg()),z_(Q,`transformsEnabled`,`all`,Gg()),z_(Q,`size`),z_(Q,`dragBoundFunc`),z_(Q,`draggable`,!1,Jg()),Z.backCompat(Q,{rotateDeg:`rotate`,setRotationDeg:`setRotation`,getRotationDeg:`getRotation`});var B_=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(B_,`clip`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(B_,`clipX`,void 0,X()),Z.addGetterSetter(B_,`clipY`,void 0,X()),Z.addGetterSetter(B_,`clipWidth`,void 0,X()),Z.addGetterSetter(B_,`clipHeight`,void 0,X()),Z.addGetterSetter(B_,`clipFunc`);var V_=new Map,H_=J._global.PointerEvent!==void 0;function U_(e){return V_.get(e)}function W_(e){return{evt:e,pointerId:e.pointerId}}function G_(e,t){return V_.get(e)===t}function K_(e,t){q_(e),t.getStage()&&(V_.set(e,t),H_&&t._fire(`gotpointercapture`,W_(new PointerEvent(`gotpointercapture`))))}function q_(e,t){let n=V_.get(e);if(!n)return;let r=n.getStage();r&&r.content,V_.delete(e),H_&&n._fire(`lostpointercapture`,W_(new PointerEvent(`lostpointercapture`)))}var J_=`Stage`,Y_=`string`,X_=`px`,Z_=`mouseout`,Q_=`mouseleave`,$_=`mouseover`,ev=`mouseenter`,tv=`mousemove`,nv=`mousedown`,rv=`mouseup`,iv=`pointermove`,av=`pointerdown`,ov=`pointerup`,sv=`pointercancel`,cv=`lostpointercapture`,lv=`pointerout`,uv=`pointerleave`,dv=`pointerover`,fv=`pointerenter`,pv=`contextmenu`,mv=`touchstart`,hv=`touchend`,gv=`touchmove`,_v=`touchcancel`,vv=`wheel`,yv=5,bv=[[ev,`_pointerenter`],[nv,`_pointerdown`],[tv,`_pointermove`],[rv,`_pointerup`],[Q_,`_pointerleave`],[mv,`_pointerdown`],[gv,`_pointermove`],[hv,`_pointerup`],[_v,`_pointercancel`],[$_,`_pointerover`],[vv,`_wheel`],[pv,`_contextmenu`],[av,`_pointerdown`],[iv,`_pointermove`],[ov,`_pointerup`],[sv,`_pointercancel`],[cv,`_lostpointercapture`]],xv={mouse:{[lv]:Z_,[uv]:Q_,[dv]:$_,[fv]:ev,[iv]:tv,[av]:nv,[ov]:rv,[sv]:`mousecancel`,pointerclick:`click`,pointerdblclick:`dblclick`},touch:{[lv]:`touchout`,[uv]:`touchleave`,[dv]:`touchover`,[fv]:`touchenter`,[iv]:gv,[av]:mv,[ov]:hv,[sv]:_v,pointerclick:`tap`,pointerdblclick:`dbltap`},pointer:{[lv]:lv,[uv]:uv,[dv]:dv,[fv]:fv,[iv]:iv,[av]:av,[ov]:ov,[sv]:sv,pointerclick:`pointerclick`,pointerdblclick:`pointerdblclick`}},Sv=e=>e.indexOf(`pointer`)>=0?`pointer`:e.indexOf(`touch`)>=0?`touch`:`mouse`,Cv=e=>{let t=Sv(e);if(t===`pointer`)return J.pointerEventsEnabled&&xv.pointer;if(t===`touch`)return xv.touch;if(t===`mouse`)return xv.mouse};function wv(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&Y.warn(`Stage does not support clipping. Please use clip for Layers or Groups.`),e}var Tv=`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);`,Ev=[],Dv=class extends B_{constructor(e){super(wv(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Ev.push(this),this.on(`widthChange.konva heightChange.konva`,this._resizeDOM),this.on(`visibleChange.konva`,this._checkVisibility),this.on(`clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva`,()=>{wv(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===Y_){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`),B_.prototype.clone.call(this,e)}destroy(){super.destroy();var e=this.content;e&&Y._isInDocument(e)&&this.container().removeChild(e);var t=Ev.indexOf(this);return t>-1&&Ev.splice(t,1),this}getPointerPosition(){let e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(Y.warn(Tv),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 g_({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+X_,this.content.style.height=t+X_),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>yv&&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 G_(e,this)}setPointerCapture(e){K_(e,this)}releaseCapture(e){q_(e,this)}getLayers(){return this.children}_bindContentEvents(){J.isBrowser&&bv.forEach(([e,t])=>{this.content.addEventListener(e,e=>{this[t](e)})})}_pointerenter(e){this.setPointersPositions(e);let t=Cv(e.type);this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);let t=Cv(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=Cv(e.type),n=Sv(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),i=!v_.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=Cv(e.type),n=Sv(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach(i=>{var a=this.getIntersection(i);if(v_.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=Cv(e.type),n=Sv(e.type);if(!t||(v_.isDragging&&v_.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!v_.isDragging||J.hitOnDragEnabled)))return;var r={};let i=!1;var a=this._getTargetShape(n);this._changedPointerPositions.forEach(o=>{let s=U_(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=Cv(e.type),n=Sv(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=U_(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`])):v_.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(pv,{evt:e}):this._fire(pv,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(vv,{evt:e}):this._fire(vv,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);let t=U_(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(ov,W_(e)),q_(e.pointerId)}_lostpointercapture(e){q_(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 g_({width:this.width(),height:this.height()}),this.bufferHitCanvas=new __({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}};Dv.prototype.nodeType=J_,Cg(Dv),Z.addGetterSetter(Dv,`container`);var Ov=`hasShadow`,kv=`shadowRGBA`,Av=`patternImage`,jv=`linearGradient`,Mv=`radialGradient`,Nv;function Pv(){return Nv||(Nv=Y.createCanvasElement().getContext(`2d`),Nv)}var Fv={};function Iv(e){e.fill()}function Lv(e){e.stroke()}function Rv(e){e.fill()}function zv(e){e.stroke()}function Bv(){this._clearCache(Ov)}function Vv(){this._clearCache(kv)}function Hv(){this._clearCache(Av)}function Uv(){this._clearCache(jv)}function Wv(){this._clearCache(Mv)}var $=class extends Q{constructor(e){super(e);let t;for(;t=Y.getRandomColor(),!(t&&!(t in Fv)););this.colorKey=t,Fv[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(Ov,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(Av,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let e=Pv().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||`repeat`);if(e&&e.setTransform){let t=new wg;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(jv,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=Pv(),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(Mv,this.__getRadialGradient)}__getRadialGradient(){var e=this.fillRadialGradientColorStops();if(e){for(var t=Pv(),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(kv,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 Fv[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 G_(e,this)}setPointerCapture(e){K_(e,this)}releaseCapture(e){q_(e,this)}};$.prototype._fillFunc=Iv,$.prototype._strokeFunc=Lv,$.prototype._fillFuncHit=Rv,$.prototype._strokeFuncHit=zv,$.prototype._centroid=!1,$.prototype.nodeType=`Shape`,Cg($),$.prototype.eventListeners={},$.prototype.on.call($.prototype,`shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,Bv),$.prototype.on.call($.prototype,`shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,Vv),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva`,Hv),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva`,Uv),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva`,Wv),Z.addGetterSetter($,`stroke`,void 0,Kg()),Z.addGetterSetter($,`strokeWidth`,2,X()),Z.addGetterSetter($,`fillAfterStrokeEnabled`,!1),Z.addGetterSetter($,`hitStrokeWidth`,`auto`,Wg()),Z.addGetterSetter($,`strokeHitEnabled`,!0,Jg()),Z.addGetterSetter($,`perfectDrawEnabled`,!0,Jg()),Z.addGetterSetter($,`shadowForStrokeEnabled`,!0,Jg()),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,Gg()),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,Kg()),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 Gv=`#`,Kv=`beforeDraw`,qv=`draw`,Jv=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Yv=Jv.length,Xv=class extends B_{constructor(e){super(e),this.canvas=new g_,this.hitCanvas=new __({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<Yv;r++){let i=Jv[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=Fv[Gv+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(Kv,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),B_.prototype.drawScene.call(this,r,t),this._fire(qv,{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),B_.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)}}};Xv.prototype.nodeType=`Layer`,Cg(Xv),Z.addGetterSetter(Xv,`imageSmoothingEnabled`,!0),Z.addGetterSetter(Xv,`clearBeforeDraw`,!0),Z.addGetterSetter(Xv,`hitGraphEnabled`,!0,Jg());var Zv=class extends Xv{constructor(e){super(e),this.listening(!1),Y.warn(`Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.`)}};Zv.prototype.nodeType=`FastLayer`,Cg(Zv);var Qv=class extends B_{_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to groups.`)}};Qv.prototype.nodeType=`Group`,Cg(Qv);var $v=(function(){return Sg.performance&&Sg.performance.now?function(){return Sg.performance.now()}:function(){return new Date().getTime()}})(),ey=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))}};ey.animations=[],ey.animIdCounter=0,ey.animRunning=!1;var ty={node:1,duration:1,easing:1,onFinish:1,yoyo:1},ny=1,ry=2,iy=3,ay=0,oy=[`fill`,`stroke`,`shadowColor`],sy=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=ry,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onPlay`)}reverse(){this.state=iy,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===ry?this.setTime(e):this.state===iy&&this.setTime(this.duration-e)}pause(){this.state=ny,this.fire(`onPause`)}getTimer(){return new Date().getTime()}},cy=class e{constructor(t){var n=this,r=t.node,i=r._id,a,o=t.easing||ly.Linear,s=!!t.yoyo,c;a=t.duration===void 0?.3:t.duration===0?.001:t.duration,this.node=r,this._id=ay++;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 ey(function(){n.tween.onEnterFrame()},l),this.tween=new sy(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)ty[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 oy.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=oy.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]}};cy.attrs={},cy.tweens={},Q.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new cy(e).play()};var ly={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-ly.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?ly.BounceEaseIn(e*2,0,n,r)*.5+t:ly.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}},uy=Y._assign(J,{Util:Y,Transform:wg,Node:Q,Container:B_,Stage:Dv,stages:Ev,Layer:Xv,FastLayer:Zv,Group:Qv,DD:v_,Shape:$,shapes:Fv,Animation:ey,Tween:cy,Easings:ly,Context:u_,Canvas:h_}),dy=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)}};dy.prototype._centroid=!0,dy.prototype.className=`Arc`,dy.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Cg(dy),Z.addGetterSetter(dy,`innerRadius`,0,X()),Z.addGetterSetter(dy,`outerRadius`,0,X()),Z.addGetterSetter(dy,`angle`,0,X()),Z.addGetterSetter(dy,`clockwise`,!1,Jg());function fy(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 py(e,t){var n=e.length,r=[],i,a;for(i=2;i<n-2;i+=2)a=fy(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 my=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():py(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),t=e.length,n=this.tension(),r=fy(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),i=fy(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),a=py(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}}};my.prototype.className=`Line`,my.prototype._attrsAffectingSize=[`points`,`bezier`,`tension`],Cg(my),Z.addGetterSetter(my,`closed`,!1),Z.addGetterSetter(my,`bezier`,!1),Z.addGetterSetter(my,`tension`,0,X()),Z.addGetterSetter(my,`points`,[],qg());var hy=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 ne=a.length-2;ne>=0;ne--)if(a[ne].command===`M`){s=a[ne].points[0]+k,c=a[ne].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]}};hy.prototype.className=`Path`,hy.prototype._attrsAffectingSize=[`data`],Cg(hy),Z.addGetterSetter(hy,`data`);var gy=class extends my{_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=hy.calcLength(r[r.length-4],r[r.length-3],`C`,e),i=hy.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}}};gy.prototype.className=`Arrow`,Cg(gy),Z.addGetterSetter(gy,`pointerLength`,10,X()),Z.addGetterSetter(gy,`pointerWidth`,10,X()),Z.addGetterSetter(gy,`pointerAtBeginning`,!1),Z.addGetterSetter(gy,`pointerAtEnding`,!0);var _y=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)}};_y.prototype._centroid=!0,_y.prototype.className=`Circle`,_y.prototype._attrsAffectingSize=[`radius`],Cg(_y),Z.addGetterSetter(_y,`radius`,0,X());var vy=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)}};vy.prototype.className=`Ellipse`,vy.prototype._centroid=!0,vy.prototype._attrsAffectingSize=[`radiusX`,`radiusY`],Cg(vy),Z.addComponentsGetterSetter(vy,`radius`,[`x`,`y`]),Z.addGetterSetter(vy,`radiusX`,0,X()),Z.addGetterSetter(vy,`radiusY`,0,X());var yy=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}};yy.prototype.className=`Image`,Cg(yy),Z.addGetterSetter(yy,`image`),Z.addComponentsGetterSetter(yy,`crop`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(yy,`cropX`,0,X()),Z.addGetterSetter(yy,`cropY`,0,X()),Z.addGetterSetter(yy,`cropWidth`,0,X()),Z.addGetterSetter(yy,`cropHeight`,0,X());var by=[`fontFamily`,`fontSize`,`fontStyle`,`padding`,`lineHeight`,`text`,`width`,`height`],xy=`Change.konva`,Sy=`none`,Cy=`up`,wy=`right`,Ty=`down`,Ey=`left`,Dy=by.length,Oy=class extends Qv{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<Dy;n++)e.on(by[n]+xy,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 Cy:o=n/2,s=-1*c;break;case wy:o=n+a,s=r/2;break;case Ty:o=n/2,s=r+c;break;case Ey: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})}}};Oy.prototype.className=`Label`,Cg(Oy);var ky=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===Cy&&(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===wy&&(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===Ty&&(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===Ey&&(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===Cy?(t-=r,o+=r):i===Ty?o+=r:i===Ey?(e-=n*1.5,a+=n):i===wy&&(a+=n*1.5),{x:e,y:t,width:a,height:o}}};ky.prototype.className=`Tag`,Cg(ky),Z.addGetterSetter(ky,`pointerDirection`,Sy),Z.addGetterSetter(ky,`pointerWidth`,0,X()),Z.addGetterSetter(ky,`pointerHeight`,0,X()),Z.addGetterSetter(ky,`cornerRadius`,0,Ug(4));var Ay=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)}};Ay.prototype.className=`Rect`,Cg(Ay),Z.addGetterSetter(Ay,`cornerRadius`,0,Ug(4));var jy=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)}};jy.prototype.className=`RegularPolygon`,jy.prototype._centroid=!0,jy.prototype._attrsAffectingSize=[`radius`],Cg(jy),Z.addGetterSetter(jy,`radius`,0,X()),Z.addGetterSetter(jy,`sides`,0,X());var My=Math.PI*2,Ny=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,My,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),My,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)}};Ny.prototype.className=`Ring`,Ny.prototype._centroid=!0,Ny.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Cg(Ny),Z.addGetterSetter(Ny,`innerRadius`,0,X()),Z.addGetterSetter(Ny,`outerRadius`,0,X());var Py=class extends ${constructor(e){super(e),this._updated=!0,this.anim=new ey(()=>{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)}};Py.prototype.className=`Sprite`,Cg(Py),Z.addGetterSetter(Py,`animation`),Z.addGetterSetter(Py,`animations`),Z.addGetterSetter(Py,`frameOffsets`),Z.addGetterSetter(Py,`image`),Z.addGetterSetter(Py,`frameIndex`,0,X()),Z.addGetterSetter(Py,`frameRate`,17,X()),Z.backCompat(Py,{index:`frameIndex`,getIndex:`getFrameIndex`,setIndex:`setFrameIndex`});var Fy=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)}};Fy.prototype.className=`Star`,Fy.prototype._centroid=!0,Fy.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Cg(Fy),Z.addGetterSetter(Fy,`numPoints`,5,X()),Z.addGetterSetter(Fy,`innerRadius`,0,X()),Z.addGetterSetter(Fy,`outerRadius`,0,X());function Iy(e){return Array.from(e)}var Ly=`auto`,Ry=`center`,zy=`justify`,By=`Change.konva`,Vy=`2d`,Hy=`-`,Uy=`left`,Wy=`text`,Gy=`Text`,Ky=`top`,qy=`bottom`,Jy=`middle`,Yy=`normal`,Xy=`px `,Zy=` `,Qy=`right`,$y=`word`,eb=`char`,tb=`none`,nb=`…`,rb=[`fontFamily`,`fontSize`,`fontStyle`,`fontVariant`,`padding`,`align`,`verticalAlign`,`lineHeight`,`text`,`width`,`height`,`wrap`,`ellipsis`,`letterSpacing`],ib=rb.length;function ab(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 ob;function sb(){return ob||(ob=Y.createCanvasElement().getContext(Vy),ob)}function cb(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function lb(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function ub(e){return e||={},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||`black`),e}var db=class extends ${constructor(e){super(ub(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t<ib;t++)this.on(rb[t]+By,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`,Jy),e.setAttr(`textAlign`,Uy),o===Jy?s=(this.getHeight()-n*a-r*2)/2:o===qy&&(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===Qy?_+=l-x-r*2:c===Ry&&(_+=(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===zy&&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===zy&&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===zy){C=b.split(` `).length-1;for(var E=Iy(b),D=0;D<E.length;D++){var O=E[D];O===` `&&h!==n-1&&c===zy&&(_+=(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(Wy,t),this}getWidth(){return this.attrs.width===Ly||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===Ly||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=sb(),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()+Zy+this.fontVariant()+Zy+(this.fontSize()+Xy)+ab(this.fontFamily())}_addTextLine(e){this.align()===zy&&(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 sb().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split(`
|
|
148
|
+
`),t=+this.fontSize(),n=0,r=this.lineHeight()*t,i=this.attrs.width,a=this.attrs.height,o=i!==Ly&&i!==void 0,s=a!==Ly&&a!==void 0,c=this.padding(),l=i-c*2,u=a-c*2,d=0,f=this.wrap(),p=f!==tb,m=f!==eb&&p,h=this.ellipsis();this.textArr=[],sb().font=this._getContextFont();for(var g=h?this._getTextWidth(nb):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===Zy||ee===Hy)&&w<=l?C.length:Math.max(C.lastIndexOf(Zy),C.lastIndexOf(Hy))+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+nb)<l||(te.text=te.text.slice(0,te.text.length-3)),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(te.text+nb));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}};db.prototype._fillFunc=cb,db.prototype._strokeFunc=lb,db.prototype.className=Gy,db.prototype._attrsAffectingSize=[`text`,`fontSize`,`padding`,`wrap`,`lineHeight`,`letterSpacing`],Cg(db),Z.overWriteSetter(db,`width`,Wg()),Z.overWriteSetter(db,`height`,Wg()),Z.addGetterSetter(db,`fontFamily`,`Arial`),Z.addGetterSetter(db,`fontSize`,12,X()),Z.addGetterSetter(db,`fontStyle`,Yy),Z.addGetterSetter(db,`fontVariant`,Yy),Z.addGetterSetter(db,`padding`,0,X()),Z.addGetterSetter(db,`align`,Uy),Z.addGetterSetter(db,`verticalAlign`,Ky),Z.addGetterSetter(db,`lineHeight`,1,X()),Z.addGetterSetter(db,`wrap`,$y),Z.addGetterSetter(db,`ellipsis`,!1,Jg()),Z.addGetterSetter(db,`letterSpacing`,0,X()),Z.addGetterSetter(db,`text`,``,Gg()),Z.addGetterSetter(db,`textDecoration`,``);var fb=``,pb=`normal`;function mb(e){e.fillText(this.partialText,0,0)}function hb(e){e.strokeText(this.partialText,0,0)}var gb=class extends ${constructor(e){super(e),this.dummyCanvas=Y.createCanvasElement(),this.dataArray=[],this.dataArray=hy.parsePathData(this.attrs.data),this.on(`dataChange.konva`,function(){this.dataArray=hy.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 db.prototype.setText.call(this,e)}_getContextFont(){return db.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=Iy(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`:hy.getLineLength(d.x,d.y,p.points[0],p.points[1])>i?f=hy.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=hy.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=hy.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=hy.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=hy.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=hy.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=hy.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}}};gb.prototype._fillFunc=mb,gb.prototype._strokeFunc=hb,gb.prototype._fillFuncHit=mb,gb.prototype._strokeFuncHit=hb,gb.prototype.className=`TextPath`,gb.prototype._attrsAffectingSize=[`text`,`fontSize`,`data`],Cg(gb),Z.addGetterSetter(gb,`data`),Z.addGetterSetter(gb,`fontFamily`,`Arial`),Z.addGetterSetter(gb,`fontSize`,12,X()),Z.addGetterSetter(gb,`fontStyle`,pb),Z.addGetterSetter(gb,`align`,`left`),Z.addGetterSetter(gb,`letterSpacing`,0,X()),Z.addGetterSetter(gb,`textBaseline`,`middle`),Z.addGetterSetter(gb,`fontVariant`,pb),Z.addGetterSetter(gb,`text`,fb),Z.addGetterSetter(gb,`textDecoration`,null),Z.addGetterSetter(gb,`kerningFunc`,null);var _b=`tr-konva`,vb=[`resizeEnabledChange`,`rotateAnchorOffsetChange`,`rotateEnabledChange`,`enabledAnchorsChange`,`anchorSizeChange`,`borderEnabledChange`,`borderStrokeChange`,`borderStrokeWidthChange`,`borderDashChange`,`anchorStrokeChange`,`anchorStrokeWidthChange`,`anchorFillChange`,`anchorCornerRadiusChange`,`ignoreStrokeChange`].map(e=>e+`.${_b}`).join(` `),yb=`nodesRect`,bb=[`widthChange`,`heightChange`,`scaleXChange`,`scaleYChange`,`skewXChange`,`skewYChange`,`rotationChange`,`offsetXChange`,`offsetYChange`,`transformsEnabledChange`,`strokeWidthChange`],xb={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},Sb=`ontouchstart`in J._global;function Cb(e,t){if(e===`rotater`)return`crosshair`;t+=Y.degToRad(xb[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 wb=[`top-left`,`top-center`,`top-right`,`middle-right`,`middle-left`,`bottom-left`,`bottom-center`,`bottom-right`],Tb=1e8;function Eb(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 Db(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 Ob(e,t){return Db(e,t,Eb(e))}function kb(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 Ab=class extends Qv{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(vb,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 _b+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(bb.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(yb),this._clearCache(`transform`),this._clearSelfAndDescendantCache(`absoluteTransform`)}_getNodeRect(){return this._getCache(yb,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 Db({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:-Tb,y:-Tb,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 wg;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(),wb.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor(`rotater`)}_createAnchor(e){var t=new Ay({stroke:`rgb(0, 161, 255)`,fill:`white`,strokeWidth:1,name:e+` _anchor`,dragDistance:0,draggable:!0,hitStrokeWidth:Sb?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=Cb(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=Ob(u,kb(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 wg;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 wg;o.translate(n.x,n.y),o.rotate(n.rotation),o.scale(n.width/a,n.height/a);let s=new wg;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 wg;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=``),Qv.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Q.prototype.toObject.call(this)}};function jb(e){return e instanceof Array||Y.warn(`enabledAnchors value should be an array`),e instanceof Array&&e.forEach(function(e){wb.indexOf(e)===-1&&Y.warn(`Unknown anchor name: `+e+`. Available names are: `+wb.join(`, `))}),e||[]}Ab.prototype.className=`Transformer`,Cg(Ab),Z.addGetterSetter(Ab,`enabledAnchors`,wb,jb),Z.addGetterSetter(Ab,`flipEnabled`,!0,Jg()),Z.addGetterSetter(Ab,`resizeEnabled`,!0),Z.addGetterSetter(Ab,`anchorSize`,10,X()),Z.addGetterSetter(Ab,`rotateEnabled`,!0),Z.addGetterSetter(Ab,`rotationSnaps`,[]),Z.addGetterSetter(Ab,`rotateAnchorOffset`,50,X()),Z.addGetterSetter(Ab,`rotationSnapTolerance`,5,X()),Z.addGetterSetter(Ab,`borderEnabled`,!0),Z.addGetterSetter(Ab,`anchorStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(Ab,`anchorStrokeWidth`,1,X()),Z.addGetterSetter(Ab,`anchorFill`,`white`),Z.addGetterSetter(Ab,`anchorCornerRadius`,0,X()),Z.addGetterSetter(Ab,`borderStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(Ab,`borderStrokeWidth`,1,X()),Z.addGetterSetter(Ab,`borderDash`),Z.addGetterSetter(Ab,`keepRatio`,!0),Z.addGetterSetter(Ab,`centeredScaling`,!1),Z.addGetterSetter(Ab,`ignoreStroke`,!1),Z.addGetterSetter(Ab,`padding`,0,X()),Z.addGetterSetter(Ab,`node`),Z.addGetterSetter(Ab,`nodes`),Z.addGetterSetter(Ab,`boundBoxFunc`),Z.addGetterSetter(Ab,`anchorDragBoundFunc`),Z.addGetterSetter(Ab,`shouldOverdrawWholeArea`,!1),Z.addGetterSetter(Ab,`useSingleNodeRotation`,!0),Z.backCompat(Ab,{lineEnabled:`borderEnabled`,rotateHandlerOffset:`rotateAnchorOffset`,enabledHandlers:`enabledAnchors`});var Mb=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)}};Mb.prototype.className=`Wedge`,Mb.prototype._centroid=!0,Mb.prototype._attrsAffectingSize=[`radius`],Cg(Mb),Z.addGetterSetter(Mb,`radius`,0,X()),Z.addGetterSetter(Mb,`angle`,0,X()),Z.addGetterSetter(Mb,`clockwise`,!1),Z.backCompat(Mb,{angleDeg:`angle`,getAngleDeg:`getAngle`,setAngleDeg:`setAngle`});function Nb(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var Pb=[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],Fb=[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 Ib(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,ne=A*(A+1)/2,j=new Nb,re=null,M=j,N=null,ie=null,P=Pb[t],F=Fb[t];for(s=1;s<ee;s++)M=M.next=new Nb,s===A&&(re=M);for(M.next=j,d=u=0,o=0;o<i;o++){for(b=x=S=C=f=p=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)*D,n[c+2]=(m*P>>F)*D):n[c]=n[c+1]=n[c+2]=0,f-=g,p-=_,m-=v,h-=y,g-=N.r,_-=N.g,v-=N.b,y-=N.a,c=a+((c=o+A)<k?c:k)*r<<2,f+=b+=N.r=n[c],p+=x+=N.g=n[c+1],m+=S+=N.b=n[c+2],h+=C+=N.a=n[c+3],N=N.next,g+=w=ie.r,_+=T=ie.g,v+=E=ie.b,y+=D=ie.a,b-=w,x-=T,S-=E,C-=D,ie=ie.next,u+=r}}var Lb=function(e){var t=Math.round(this.blurRadius());t>0&&Ib(e,t)};Z.addGetterSetter(Q,`blurRadius`,0,X(),Z.afterSetFilter);var Rb=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 zb=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 Bb=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 Vb(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 Hb=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]=Vb(t[f+0],r,i,g,h),t[f+1]=Vb(t[f+1],o,s,y,v),t[f+2]=Vb(t[f+2],l,u,S,x)}};Z.addGetterSetter(Q,`enhance`,0,X(),Z.afterSetFilter);var Ub=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 Wb=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},Gb=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 Kb=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]},qb=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},Jb=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]=_},Yb=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);qb(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}Jb(_,e,{polarRotation:0})}};Z.addGetterSetter(Q,`kaleidoscopePower`,2,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`kaleidoscopeAngle`,0,X(),Z.afterSetFilter);function Xb(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 Zb(e,t){return Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2)}function Qb(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 $b(e,t){var n=Xb(e,0,0),r=Xb(e,e.width-1,0),i=Xb(e,0,e.height-1),a=Xb(e,e.width-1,e.height-1),o=t||10;if(Zb(n,r)<o&&Zb(r,a)<o&&Zb(a,i)<o&&Zb(i,n)<o){for(var s=Qb([r,n,a,i]),c=[],l=0;l<e.width*e.height;l++)c[l]=Zb(s,[e.data[l*4],e.data[l*4+1],e.data[l*4+2]])<o?0:255;return c}}function ex(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function tx(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 nx(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 rx(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,Hg,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,Hg,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),uy.Util._assign(uy,{Arc:dy,Arrow:gy,Circle:_y,Ellipse:vy,Image:yy,Label:Oy,Tag:ky,Line:my,Path:hy,Rect:Ay,RegularPolygon:jy,Ring:Ny,Sprite:Py,Star:Fy,Text:db,TextPath:gb,Transformer:Ab,Wedge:Mb,Filters:{Blur:Lb,Brighten:Rb,Contrast:zb,Emboss:Bb,Enhance:Hb,Grayscale:Ub,HSL:Wb,HSV:Gb,Invert:Kb,Kaleidoscope:Yb,Mask:function(e){var t=$b(e,this.threshold());return t&&(t=tx(t,e.width,e.height),t=nx(t,e.width,e.height),t=rx(t,e.width,e.height),ex(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 ix=uy,ax=s(((e,t)=>{t.exports=function(e){var t={},n=p(),r=h(),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`),d=Symbol.for(`react.profiler`),f=Symbol.for(`react.provider`),m=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 d:return`Profiler`;case u:return`StrictMode`;case _:return`Suspense`;case v:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case m:return(e.displayName||`Context`)+`.Consumer`;case f: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,ne=e.getPublicInstance,j=e.getRootHostContext,re=e.getChildHostContext,M=e.prepareForCommit,N=e.resetAfterCommit,ie=e.createInstance,P=e.appendInitialChild,F=e.finalizeInitialChildren,I=e.prepareUpdate,ae=e.shouldSetTextContent,oe=e.createTextInstance,L=e.scheduleTimeout,R=e.cancelTimeout,se=e.noTimeout,ce=e.isPrimaryRenderer,le=e.supportsMutation,ue=e.supportsPersistence,de=e.supportsHydration,fe=e.getInstanceFromNode,pe=e.preparePortalMount,me=e.getCurrentEventPriority,he=e.detachDeletedInstance,ge=e.supportsMicrotasks,_e=e.scheduleMicrotask,ve=e.supportsTestSelectors,ye=e.findFiberRoot,be=e.getBoundingRect,xe=e.getTextContent,Se=e.isHiddenSubtree,Ce=e.matchAccessibilityRole,we=e.setFocusIfFocusable,Te=e.setupIntersectionObserver,Ee=e.appendChild,De=e.appendChildToContainer,Oe=e.commitTextUpdate,ke=e.commitMount,Ae=e.commitUpdate,je=e.insertBefore,Me=e.insertInContainerBefore,Ne=e.removeChild,Pe=e.removeChildFromContainer,Fe=e.resetTextContent,Ie=e.hideInstance,Le=e.hideTextInstance,Re=e.unhideInstance,ze=e.unhideTextInstance,Be=e.clearContainer,Ve=e.cloneInstance,He=e.createContainerChildSet,Ue=e.appendChildToContainerChildSet,We=e.finalizeContainerChildren,Ge=e.replaceContainerChildren,Ke=e.cloneHiddenInstance,qe=e.cloneHiddenTextInstance,Je=e.canHydrateInstance,Ye=e.canHydrateTextInstance,Xe=e.canHydrateSuspenseInstance,Ze=e.isSuspenseInstancePending,Qe=e.isSuspenseInstanceFallback,$e=e.getSuspenseInstanceFallbackErrorDetails,et=e.registerSuspenseInstanceRetry,tt=e.getNextHydratableSibling,nt=e.getFirstHydratableChild,rt=e.getFirstHydratableChildWithinContainer,it=e.getFirstHydratableChildWithinSuspenseInstance,at=e.hydrateInstance,ot=e.hydrateTextInstance,st=e.hydrateSuspenseInstance,ct=e.getNextHydratableInstanceAfterSuspenseInstance,lt=e.commitHydratedContainer,ut=e.commitHydratedSuspenseInstance,dt=e.clearSuspenseBoundary,ft=e.clearSuspenseBoundaryFromContainer,pt=e.shouldDeleteUnhydratedTailInstances,mt=e.didNotMatchHydratedContainerTextInstance,ht=e.didNotMatchHydratedTextInstance,gt;function _t(e){if(gt===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);gt=t&&t[1]||``}return`
|
|
149
149
|
`+gt+e}var vt=!1;function yt(e,t){if(!e||vt)return``;vt=!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(`
|
|
150
150
|
`),a=r.stack.split(`
|
|
151
151
|
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
@@ -155,11 +155,11 @@ Error generating stack: `+e.message+`
|
|
|
155
155
|
`+(r.join(` > `)+`
|
|
156
156
|
|
|
157
157
|
No matching component was found for:
|
|
158
|
-
`)+e.join(` > `)}return null},t.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return ne(e.child.stateNode);default:return e.child.stateNode}},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:Us,findFiberByHostInstance:e.findFiberByHostInstance||Ws,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1`},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{un=t.inject(e),dn=t}catch{}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!ve)throw Error(a(363));e=yo(e,t);var i=Te(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=z;try{return z=e,t()}finally{z=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,a=Xo(),o=Zo(i);return n=zs(n),t.context===null?t.context=n:t.pendingContext=n,t=br(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xr(i,t,o),e!==null&&(Qo(e,i,o,a),Sr(e,i,o)),o},t}})),
|
|
158
|
+
`)+e.join(` > `)}return null},t.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return ne(e.child.stateNode);default:return e.child.stateNode}},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:Us,findFiberByHostInstance:e.findFiberByHostInstance||Ws,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1`},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{un=t.inject(e),dn=t}catch{}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!ve)throw Error(a(363));e=yo(e,t);var i=Te(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=z;try{return z=e,t()}finally{z=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,a=Xo(),o=Zo(i);return n=zs(n),t.context===null?t.context=n:t.pendingContext=n,t=br(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xr(i,t,o),e!==null&&(Qo(e,i,o,a),Sr(e,i,o)),o},t}})),ox=s(((e,t)=>{t.exports=ax()})),sx=s((e=>{e.DefaultEventPriority=16,e.LegacyRoot=0})),cx=s(((e,t)=>{t.exports=sx()})),lx={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0},ux=!1,dx=!1,fx=`.react-konva-event`,px=!1,mx=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
|
|
159
159
|
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
|
|
160
160
|
Consider to add onDragMove or onDragEnd events.
|
|
161
161
|
For more info see: https://github.com/konvajs/react-konva/issues/256
|
|
162
|
-
`,
|
|
162
|
+
`,hx=`ReactKonva: You are using "zIndex" attribute for a Konva node.
|
|
163
163
|
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
|
164
164
|
For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
165
|
-
`,mx={};function hx(e,t,n=mx){if(!cx&&`zIndex`in t&&(console.warn(px),cx=!0),!lx&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(fx),lx=!0)}for(var a in n)if(!sx[a]){var o=a.slice(0,2)===`on`,s=n[a]!==t[a];if(o&&s){var c=a.substr(2).toLowerCase();c.substr(0,7)===`content`&&(c=`content`+c.substr(7,1).toUpperCase()+c.substr(8)),e.off(c,n[a])}t.hasOwnProperty(a)||e.setAttr(a,void 0)}var l=dx||t._useStrictMode,u={},d=!1;let f={};for(var a in t)if(!sx[a]){var o=a.slice(0,2)===`on`,p=n[a]!==t[a];if(o&&p){var c=a.substr(2).toLowerCase();c.substr(0,7)===`content`&&(c=`content`+c.substr(7,1).toUpperCase()+c.substr(8)),t[a]&&(f[c]=t[a])}!o&&(t[a]!==n[a]||l&&t[a]!==e.getAttr(a))&&(d=!0,u[a]=t[a])}for(var c in d&&(e.setAttrs(u),gx(e)),f)e.on(c+ux,f[c])}function gx(e){if(!J.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}var _x=c({appendChild:()=>Rx,appendChildToContainer:()=>zx,appendInitialChild:()=>Sx,cancelTimeout:()=>Ix,clearContainer:()=>Zx,commitMount:()=>Gx,commitTextUpdate:()=>Wx,commitUpdate:()=>Kx,createInstance:()=>Cx,createTextInstance:()=>wx,detachDeletedInstance:()=>Qx,finalizeInitialChildren:()=>Tx,getChildHostContext:()=>Px,getCurrentEventPriority:()=>$x,getPublicInstance:()=>Ex,getRootHostContext:()=>Nx,hideInstance:()=>qx,hideTextInstance:()=>Jx,idlePriority:()=>vx.unstable_IdlePriority,insertBefore:()=>Bx,insertInContainerBefore:()=>Vx,isPrimaryRenderer:()=>!1,noTimeout:()=>-1,now:()=>vx.unstable_now,prepareForCommit:()=>Dx,preparePortalMount:()=>Ox,prepareUpdate:()=>kx,removeChild:()=>Hx,removeChildFromContainer:()=>Ux,resetAfterCommit:()=>Ax,resetTextContent:()=>jx,run:()=>vx.unstable_runWithPriority,scheduleTimeout:()=>Fx,shouldDeprioritizeSubtree:()=>Mx,shouldSetTextContent:()=>Lx,supportsMutation:()=>!0,unhideInstance:()=>Yx,unhideTextInstance:()=>Xx,warnsIfNotActing:()=>!0}),vx=h(),yx=ox(),bx={},xx={};nx.Node.prototype._applyProps=hx;function Sx(e,t){if(typeof t==`string`){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),gx(e)}function Cx(e,t,n){let r=nx[e];r||=(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),nx.Group);let i={},a={};for(var o in t)o.slice(0,2)===`on`?a[o]=t[o]:i[o]=t[o];let s=new r(i);return hx(s,a),s}function wx(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Tx(e,t,n){return!1}function Ex(e){return e}function Dx(){return null}function Ox(){return null}function kx(e,t,n,r){return xx}function Ax(){}function jx(e){}function Mx(e,t){return!1}function Nx(){return bx}function Px(){return bx}var Fx=setTimeout,Ix=clearTimeout;function Lx(e,t){return!1}function Rx(e,t){t.parent===e?t.moveToTop():e.add(t),gx(e)}function zx(e,t){t.parent===e?t.moveToTop():e.add(t),gx(e)}function Bx(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),gx(e)}function Vx(e,t,n){Bx(e,t,n)}function Hx(e,t){t.destroy(),t.off(ux),gx(e)}function Ux(e,t){t.destroy(),t.off(ux),gx(e)}function Wx(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function Gx(e,t,n){}function Kx(e,t,n,r,i){hx(e,i,r)}function qx(e){e.hide(),gx(e)}function Jx(e){}function Yx(e,t){(t.visible==null||t.visible)&&e.show()}function Xx(e,t){}function Zx(e){}function Qx(){}var $x=()=>yx.DefaultEventPriority,eS=Object.defineProperty,tS=Object.defineProperties,nS=Object.getOwnPropertyDescriptors,rS=Object.getOwnPropertySymbols,iS=Object.prototype.hasOwnProperty,aS=Object.prototype.propertyIsEnumerable,oS=(e,t,n)=>t in e?eS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sS=(e,t)=>{for(var n in t||={})iS.call(t,n)&&oS(e,n,t[n]);if(rS)for(var n of rS(t))aS.call(t,n)&&oS(e,n,t[n]);return e},cS=(e,t)=>tS(e,nS(t));typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`)?L.useLayoutEffect:L.useEffect;function lS(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){let e=lS(r,t,n);if(e)return e;r=t?null:r.sibling}}function uS(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}var dS=console.error;console.error=function(){let e=[...arguments].join(``);if(e?.startsWith(`Warning:`)&&e.includes(`useContext`)){console.error=dS;return}return dS.apply(this,arguments)};var fS=uS(L.createContext(null)),pS=class extends L.Component{render(){return L.createElement(fS.Provider,{value:this._reactInternals},this.props.children)}};function mS(){let e=L.useContext(fS);if(e===null)throw Error(`its-fine: useFiber must be called within a <FiberProvider />!`);let t=L.useId();return L.useMemo(()=>{for(let n of[e,e?.alternate]){if(!n)continue;let e=lS(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}function hS(){let e=mS(),[t]=L.useState(()=>new Map);t.clear();let n=e;for(;n;){if(n.type&&typeof n.type==`object`){let e=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;e&&e!==fS&&!t.has(e)&&t.set(e,L.useContext(uS(e)))}n=n.return}return t}function gS(){let e=hS();return L.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>L.createElement(t,null,L.createElement(n.Provider,cS(sS({},r),{value:e.get(n)}))),e=>L.createElement(pS,sS({},e))),[e])}var _S=u(ix());function vS(e){let t=L.useRef({});return L.useLayoutEffect(()=>{t.current=e}),L.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}var yS=e=>{let t=L.useRef(null),n=L.useRef(null),r=L.useRef(null),i=vS(e),a=gS(),o=t=>{let{forwardedRef:n}=e;n&&(typeof n==`function`?n(t):n.current=t)};return L.useLayoutEffect(()=>(n.current=new nx.Stage({width:e.width,height:e.height,container:t.current}),o(n.current),r.current=DS.createContainer(n.current,yx.LegacyRoot,!1,null),DS.updateContainer(L.createElement(a,{},e.children),r.current),()=>{nx.isBrowser&&(o(null),DS.updateContainer(null,r.current,null),n.current.destroy())}),[]),L.useLayoutEffect(()=>{o(n.current),hx(n.current,e,i),DS.updateContainer(L.createElement(a,{},e.children),r.current,null)}),L.createElement(`div`,{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},bS=`Layer`,xS=`Rect`,SS=`Circle`,CS=`Line`,wS=`Text`,TS=`Arrow`,ES=`Transformer`,DS=(0,_S.default)(_x);DS.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:`18.3.1`,rendererPackageName:`react-konva`});var OS=L.forwardRef((e,t)=>L.createElement(pS,{},L.createElement(yS,{...e,forwardedRef:t})));I();var kS=U(`div`)({position:`relative`,width:`fit-content`}),AS=U(`img`)({alignItems:`center`,display:`flex`,justifyContent:`center`}),jS=({url:e,dimensions:{height:t,width:n}})=>(0,R.jsx)(kS,{children:(0,R.jsx)(AS,{alt:`drawing-response-image`,src:e,style:{height:t,maxWidth:n,maxHeight:350,width:n}})});jS.propTypes={dimensions:F.object.isRequired,url:F.string.isRequired};var MS=class{constructor(e,t){let{startx:n,starty:r,fillColor:i,outlineColor:a,createdAt:o}=e;this.startx=n,this.starty=r,this.createdAt=o,this.fillColor=i,this.outlineColor=a,this.type=t}toJson(){return JSON.parse(JSON.stringify(this))}};function NS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function PS(e,t){return!e||NS(e)?e:NS(e.default)?e.default:t&&NS(e[t])?e[t]:t&&NS(e[t]?.default)?e[t].default:e}var FS=PS(CS,`Line`),IS=class e extends MS{static TYPE=`FreePathDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,points:i,posX:a,posY:o}=t;this.points=i||[n,r],this.posX=a||0,this.posY=o||0}registerMovement(e,t){this.points=[...this.points,e,t]}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,R.jsx)(FS,{draggable:t,tension:0,bezier:!0,points:this.points,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.paintColor||this.outlineColor,x:this.posX,y:this.posY},n)}};function LS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function RS(e,t){return!e||LS(e)?e:LS(e.default)?e.default:t&&LS(e[t])?e[t]:t&&LS(e[t]?.default)?e[t].default:e}var zS=RS(TS,`Arrow`),BS=class e extends MS{static TYPE=`LineDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a,posX:o,posY:s}=t;this.x=i||n,this.y=a||r,this.posX=o||0,this.posY=s||0}registerMovement(e,t){this.x=e,this.y=t}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e,a=[this.startx,this.starty,this.x,this.y];return(0,R.jsx)(zS,{draggable:t,points:a,fill:this.paintColor||this.outlineColor,onClick:()=>this.handleOnClick(e),stroke:this.paintColor||this.outlineColor,onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,x:this.posX,y:this.posY,pointerWidth:0,pointerLength:0},n)}};function VS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function HS(e,t){return!e||VS(e)?e:VS(e.default)?e.default:t&&VS(e[t])?e[t]:t&&VS(e[t]?.default)?e[t].default:e}var US=HS(xS,`Rect`),WS=class e extends MS{static TYPE=`RectangleDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a}=t;this.startx=n,this.starty=r,this.x=i||n,this.y=a||r,this.width=i-n||0,this.height=a-r||0}registerMovement(e,t){this.x=e,this.y=t,this.width=this.x-this.startx,this.height=this.y-this.starty}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{let n=this.startx-t.target.getX(),r=this.starty-t.target.getY();this.startx=t.target.getX(),this.starty=t.target.getY(),this.x-=n,this.y-=r,e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,R.jsx)(US,{height:this.height,width:this.width,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.outlineColor,draggable:t,strokeWidth:2,x:this.startx,y:this.starty},n)}};function GS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function KS(e,t){return!e||GS(e)?e:GS(e.default)?e.default:t&&GS(e[t])?e[t]:t&&GS(e[t]?.default)?e[t].default:e}var qS=KS(SS,`Circle`),JS=class e extends MS{static TYPE=`CircleDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a}=t;this.startx=n,this.starty=r,this.x=i||n,this.y=a||r;let o=this.startx-this.x,s=this.starty-this.y;this.radius=Math.sqrt(o*o+s*s)}registerMovement(e,t){this.x=e,this.y=t;let n=this.startx-this.x,r=this.starty-this.y;this.radius=Math.sqrt(n*n+r*r)}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{let n=this.startx-t.target.getX(),r=this.starty-t.target.getY();this.startx=t.target.getX(),this.starty=t.target.getY(),this.x-=n,this.y-=r,e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,R.jsx)(qS,{draggable:t,radius:this.radius,x:this.startx,y:this.starty,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.outlineColor},n)}};function YS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function XS(e,t){return!e||YS(e)?e:YS(e.default)?e.default:t&&YS(e[t])?e[t]:t&&YS(e[t]?.default)?e[t].default:e}var ZS=XS(CS,`Line`),QS=[IS,BS,WS,JS,class e extends MS{static TYPE=`EraserDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,points:i,posX:a,posY:o}=t;this.points=i||[n,r],this.posX=a||0,this.posY=o||0}registerMovement(e,t){this.points=[...this.points,e,t]}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,R.jsx)(ZS,{draggable:t,globalCompositeOperation:`destination-out`,tension:0,bezier:!0,points:this.points,onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,strokeStyle:`#df4b26`,lineJoin:`round`,lineWidth:`5`,fill:`white`,stroke:`white`,strokeWidth:5,x:this.posX,y:this.posY},n)}}],$S=(e,t)=>{let n=QS.find(t=>t.TYPE===e);if(n)return new n(t);throw Error(`Can't find drawable for type: ${e} and props: ${JSON.stringify(t)}`)};I();function eC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function tC(e,t){return!e||eC(e)?e:eC(e.default)?e.default:t&&eC(e[t])?e[t]:t&&eC(e[t]?.default)?e[t].default:e}var nC=tC(OS,`Stage`),rC=tC(bS,`Layer`),{translator:iC}=jm,aC=U(`div`)({display:`flex`,flexWrap:`wrap`,justifyContent:`flex-end`}),oC=U(`div`)({position:`relative`,width:`100%`}),sC=U(`div`)({marginTop:-43,marginRight:10,position:`absolute`}),cC=class extends L.Component{constructor(e){super(e),this.state={drawables:[],newDrawable:[],textIsSelected:!1},this.stage=null,this.layer=null}componentWillUnmount(){this.stage=null,this.layer=null}UNSAFE_componentWillReceiveProps(e){if(e.session){let{TextEntry:t}=e,{drawables:n}=this.state;if(e.session.drawables){let r=x(e.session.drawables);if(JSON.stringify(n)!==JSON.stringify((r||[]).map(e=>T(e,`type`)))){let t=e.session.drawables;this.setState({drawables:t.map(e=>$S(e.type,e))})}w(t.all.map(e=>({...e,...t[`text_${e.id}`]&&t[`text_${e.id}`].attrs,value:t[`textarea_${e.id}`]&&t[`textarea_${e.id}`].value})),e.session.texts)||t.setAll(e.session.texts||[])}}else this.handleSessionChange()}handleSessionChange=()=>{let{onSessionChange:e,session:t,TextEntry:n,drawableDimensions:r}=this.props,{drawables:i}=this.state,a={width:r.width,drawables:i.map(e=>e.toJson()),texts:n.all.map(e=>({...e,...n[`text_${e.id}`]&&n[`text_${e.id}`].attrs,value:n[`textarea_${e.id}`]&&n[`textarea_${e.id}`].value}))};w(a,t)||e({...t,...a})};onMouseOverElement=()=>this.setState({isOver:!0});onMouseOutElement=()=>this.setState({isOver:!1});handleMouseDown=e=>{document.body.style.overflow=`hidden`;let{newDrawable:t,textIsSelected:n}=this.state,{toolActive:r,fillColor:i,outlineColor:a,scale:o}=this.props;if(t.length===0&&!n){let t=e.target.getStage();if(!t)return;let{x:n,y:s}=t.getPointerPosition(),c=$S(r.type,{startx:n/o,starty:s/o,fillColor:i,outlineColor:a,createdAt:new Date});this.setState({newDrawable:[c]})}};handleMouseUp=e=>{document.body.style.overflow=`initial`;let{newDrawable:t,drawables:n}=this.state,{scale:r}=this.props;if(t.length===1){let i=e.target.getStage();if(!i)return;let{x:a,y:o}=i.getPointerPosition(),s=t[0];s.registerMovement(a/r,o/r),n.push(s),this.setState({newDrawable:[],drawables:n},this.handleSessionChange.bind(this,s))}};handleMouseMove=e=>{let{newDrawable:t}=this.state,{scale:n}=this.props;if(t.length===1){let r=e.target.getStage();if(!r)return;let{x:i,y:a}=r.getPointerPosition(),o=t[0];o.registerMovement(i/n,a/n),this.setState({newDrawable:[o]})}};handleUndo=()=>{let{drawables:e}=this.state,{TextEntry:t}=this.props,n=[...e],r=[...e,...t.all];r.sort((e,t)=>new Date(e.createdAt)-new Date(t.createdAt));let i=r[r.length-1];i&&i.type===`text-entry`?(t.all.pop(),this.setState({updatedAt:new Date},this.handleSessionChange)):(n.pop(),this.setState({drawables:n},this.handleSessionChange))};handleClearAll=()=>{let{TextEntry:e}=this.props;e.all=[],this.setState({drawables:[],updatedAt:new Date},this.handleSessionChange)};toggleTextSelected=e=>this.setState({textIsSelected:e});render(){let{disabled:e,drawableDimensions:t,fillColor:n,imageDimensions:r,imageUrl:i,paintColor:a,outlineColor:o,TextEntry:s,backgroundImageEnabled:c=!0,toolActive:{type:l},scale:u,language:d}=this.props,{isOver:f,newDrawable:p}=this.state,m=l===`Select`,h=l===`PaintBucket`,g=[...this.state.drawables,...this.state.newDrawable],_={draggable:m&&!e,disabled:e,paint:h,fillColor:n,forceUpdate:()=>this.setState({updatedAt:new Date}),paintColor:a,outlineColor:o,toggleTextSelected:this.toggleTextSelected,handleSessionChange:this.handleSessionChange,stage:this.stage,onMouseOverElement:this.onMouseOverElement,onMouseOutElement:this.onMouseOutElement,scale:u},v={};e||(v={onMouseUp:this.handleMouseUp,onTouchEnd:this.handleMouseUp,onMouseMove:this.handleMouseMove,onTouchMove:this.handleMouseMove},m||(v.onMouseDown=this.handleMouseDown,v.onTouchStart=this.handleMouseDown));let y=r?.height*u,b=r?.width*u;return(0,R.jsxs)(aC,{children:[(0,R.jsxs)(sC,{children:[(0,R.jsx)(Pm,{disabled:e,onClick:this.handleUndo,label:iC.t(`common:undo`,{lng:d})}),(0,R.jsx)(Pm,{disabled:e,onClick:this.handleClearAll,label:iC.t(`common:clearAll`,{lng:d})})]}),(0,R.jsxs)(oC,{children:[c&&i&&(0,R.jsx)(jS,{dimensions:{height:y,width:b},url:i}),s.renderTextareas(),(0,R.jsx)(`div`,{style:{position:`absolute`,left:0,top:0,touchAction:`none`,cursor:m&&(f||p.length===1)?`pointer`:`default`},children:(0,R.jsx)(nC,{scaleX:u,scaleY:u,ref:e=>this.stage=e,height:t.height,width:t.width,...v,children:(0,R.jsxs)(rC,{ref:e=>this.layer=e,children:[g.map((e,t)=>e.render({..._,key:t})),s.render(_)]})},`drawing-stage`)})]})]})}};cC.propTypes={disabled:F.bool,drawableDimensions:F.object.isRequired,imageDimensions:F.object.isRequired,fillColor:F.string.isRequired,onSessionChange:F.func.isRequired,paintColor:F.string.isRequired,outlineColor:F.string.isRequired,imageUrl:F.string.isRequired,TextEntry:F.object.isRequired,toolActive:F.object.isRequired,session:F.object.isRequired,backgroundImageEnabled:F.bool.isRequired,scale:F.number.isRequired,language:F.string},I();function lC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function uC(e,t){return!e||lC(e)?e:lC(e.default)?e.default:t&&lC(e[t])?e[t]:t&&lC(e[t]?.default)?e[t].default:e}var dC=uC(ES,`Transformer`),fC=class extends L.Component{componentDidMount(){this.checkNode()}componentDidUpdate(){this.checkNode()}checkNode(){let e=this.transformer.getStage(),{selectedShapeName:t}=this.props,n=e.findOne(`.${t}`);n!==this.transformer.node()&&(n?this.transformer.attachTo(n):this.transformer.detach(),this.transformer.getLayer().batchDraw())}render(){return(0,R.jsx)(dC,{ref:e=>{this.transformer=e},enabledAnchors:[`middle-left`,`middle-right`],...this.props})}};fC.propTypes={selectedShapeName:F.string.isRequired};function pC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function mC(e,t){return!e||pC(e)?e:pC(e.default)?e.default:t&&pC(e[t])?e[t]:t&&pC(e[t]?.default)?e[t].default:e}var hC=mC(wS,`Text`),{translator:gC}=jm,_C=()=>Math.random().toString(36).substring(2)+new Date().getTime().toString(36),vC=class e{static getTextareaNode(e){return`textarea_${e}`}static getTextNode(e){return`text_${e}`}static getTransformerNode(e){return`transformer_${e}`}constructor(e){this.all=e&&e.all||[],this.eventListenersDetachArray=[]}removeEventListeners=()=>this.eventListenersDetachArray.forEach(e=>e());setAll=e=>{this.all=e,this.props.forceUpdate()};addNewTextEntry=e=>{let t=this.all,n=_C();t.push({id:n,text:``,isDefault:!0,label:gC.t(`drawingResponse.onDoubleClick`,{lng:e}),width:200,x:(t.length+1)*5+50,y:(t.length+1)*5+50,textVisible:!0,transformerVisible:!0,textareaVisible:!1,createdAt:new Date,type:`text-entry`}),this.props.handleSessionChange()};showOnlyTextNodes(){this.all.map(e=>{e.textVisible=!0,e.transformerVisible=!1,e.textareaVisible=!1})}toggleTextarea(e,t){this.all=this.all.map(n=>n.id===e?{...n,textVisible:!t,transformerVisible:!t,textareaVisible:t}:n),this.props.forceUpdate()}initializeDefault(e,t){if(t){let t=this.all.filter(t=>t.id===e)[0];t.isDefault=!1}}saveValue(e,t){let n=t.value;this.all=this.all.map(t=>t.id===e?{...t,text:n}:t),n||(this.all=this.all.filter(t=>t.id!==e)),this.toggleTextarea(e,!1),this.props.handleSessionChange(),this.props.forceUpdate()}handleMouseDown=()=>this.props.toggleTextSelected(!0);handleMouseUp=()=>this.props.toggleTextSelected(!1);handleClick=(e,t)=>{let n=this.all.filter(e=>e.id===t)[0];n.transformerVisible=!0,this.props.forceUpdate()};handleDblClick=(t,n)=>{let{id:r,isDefault:i}=n;this.toggleTextarea(r,!0);let a=this[e.getTextNode(r)],o=this[e.getTextareaNode(r)];if(!a||!o)return;let s=a.getAbsolutePosition();o.value=n.text||``,o.style.position=`absolute`,o.style.top=s.y+`px`,o.style.left=s.x+`px`,o.style.width=a.width()-a.padding()*2+`px`,o.style.height=a.height()-a.padding()*2+5+`px`,o.style.fontSize=a.fontSize()+`px`,o.style.border=`none`,o.style.padding=`0px`,o.style.margin=`0px`,o.style.overflow=`hidden`,o.style.background=`none`,o.style.outline=`none`,o.style.resize=`none`,o.style.lineHeight=a.lineHeight(),o.style.fontFamily=a.fontFamily(),o.style.transformOrigin=`left top`,o.style.textAlign=a.align(),o.style.color=a.fill(),o.style.display=`block`;let c=a.rotation();o.style.transform=c?`rotateZ(${c}deg)`:``,o.focus();let l=e=>{e.key===`Enter`&&!e.shiftKey&&this.saveValue(r,o),e.key===`Escape`&&this.toggleTextarea(r,!1)},u=()=>{this.showOnlyTextNodes(),this.saveValue(r,o)};o.addEventListener(`keydown`,l),o.addEventListener(`blur`,u),this.eventListenersDetachArray.push(()=>{o.removeEventListener(`keydown`,l),o.removeEventListener(`blur`,u)}),this.initializeDefault(r,i),this.props.forceUpdate()};handleTransform=(e,t)=>{this[t].setAttrs({width:this[t].width()*this[t].scaleX(),scaleX:this.props.scale})};renderTextareas(){return this.all.map(e=>{let{id:t,textareaVisible:n}=e,r=`textarea_${t}`;return(0,R.jsx)(`textarea`,{ref:e=>{this[r]=e},style:{display:`${n?`block`:`none`}`}},r)})}setInitialProps(e){this.props||=e}render(e){if(this.setInitialProps(e),e.stage){let t=e.stage;if(t!==this.stage){let e=e=>{e.target===this.stage&&(this.showOnlyTextNodes(),this.props.forceUpdate())};t.on(`click`,e),this.eventListenersDetachArray.push(()=>t.off(`click`,e))}this.stage=t}return this.all.map(t=>{let{id:n,label:r,x:i,y:a,width:o,textVisible:s,rotation:c,transformerVisible:l}=t,u=`text_${n}`,d=`transformer_${n}`,f={};return e.disabled||(f={onClick:e=>this.handleClick(e,n),onTap:e=>this.handleClick(e,n),onDblClick:e=>this.handleDblClick(e,t),onDblTap:e=>this.handleDblClick(e,t),onTransform:e=>this.handleTransform(e,u),onTransformEnd:this.props.handleSessionChange,onMouseDown:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onTouchStart:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onDragStart:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onDragMove:e=>{e.cancelBubble=!0},onDragEnd:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1),this.props.handleSessionChange()},onMouseUp:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1)},onTouchEnd:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1)},onMouseEnter:this.props.onMouseOverElement,onMouseLeave:this.props.onMouseOutElement}),c&&(f.rotation=c),[(0,R.jsx)(hC,{bubbles:!0,id:n,ref:e=>{this[u]=e},text:t.text||r,name:u,x:i,y:a,width:o,draggable:!e.disabled,visible:s,fontSize:16,...f},n),l&&(0,R.jsx)(fC,{ref:e=>{this[d]=e},selectedShapeName:u,onMouseDown:this.handleMouseDown,onTouchStart:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchEnd:this.handleMouseUp},`transformer_${n}`)]})}},yC=s(((e,t)=>{t.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=2)}([function(e,t){e.exports=(I(),d(ie))},function(e,t){e.exports=p()},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n(0),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},s=0,c=r.forwardRef((function(e,t){var n=e.title,i=n===void 0?null:n,c=e.description,l=c===void 0?null:c,u=e.size,d=u===void 0?null:u,f=e.color,p=f===void 0?`currentColor`:f,m=e.horizontal,h=m===void 0?null:m,g=e.vertical,_=g===void 0?null:g,v=e.rotate,y=v===void 0?null:v,b=e.spin,x=b===void 0?null:b,S=e.style,C=S===void 0?{}:S,w=e.children,T=o(e,[`title`,`description`,`size`,`color`,`horizontal`,`vertical`,`rotate`,`spin`,`style`,`children`]);s++;var E,D=x!==null&&x,O=r.Children.map(w,(function(e){var t=e;!0!==D&&(D=!0===(x===null?t.props.spin:x));var n=t.props.size;typeof d==`number`&&typeof t.props.size==`number`&&(n=t.props.size/d);var i={size:n,color:p===null?t.props.color:p,horizontal:h===null?t.props.horizontal:h,vertical:_===null?t.props.vertical:_,rotate:y===null?t.props.rotate:y,spin:x===null?t.props.spin:x,inStack:!0};return r.cloneElement(t,i)}));d!==null&&(C.width=typeof d==`string`?d:1.5*d+`rem`);var ee,te=`stack_labelledby_`+s,k=`stack_describedby_`+s;if(i)E=l?te+` `+k:te;else if(ee=`presentation`,l)throw Error(`title attribute required when description is set`);return r.createElement(`svg`,a({ref:t,viewBox:`0 0 24 24`,style:C,role:ee,"aria-labelledby":E},T),i&&r.createElement(`title`,{id:te},i),l&&r.createElement(`desc`,{id:k},l),D&&r.createElement(`style`,null,`@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }`,`@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }`),O)}));c.displayName=`Stack`,c.propTypes={size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),children:i.oneOfType([i.arrayOf(i.node),i.node]).isRequired,className:i.string,style:i.object},c.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var l=c;n.d(t,`Icon`,(function(){return p})),n.d(t,`Stack`,(function(){return l}));var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},f=0,p=r.forwardRef((function(e,t){var n=e.path,i=e.id,a=i===void 0?++f:i,o=e.title,s=o===void 0?null:o,c=e.description,l=c===void 0?null:c,p=e.size,m=p===void 0?null:p,h=e.color,g=h===void 0?`currentColor`:h,_=e.horizontal,v=_!==void 0&&_,y=e.vertical,b=y!==void 0&&y,x=e.rotate,S=x===void 0?0:x,C=e.spin,w=C!==void 0&&C,T=e.style,E=T===void 0?{}:T,D=e.inStack,O=D!==void 0&&D,ee=d(e,[`path`,`id`,`title`,`description`,`size`,`color`,`horizontal`,`vertical`,`rotate`,`spin`,`style`,`inStack`]),te={},k=[];m!==null&&(O?k.push(`scale(`+m+`)`):(E.width=typeof m==`string`?m:1.5*m+`rem`,E.height=E.width)),v&&k.push(`scaleX(-1)`),b&&k.push(`scaleY(-1)`),S!==0&&k.push(`rotate(`+S+`deg)`),g!==null&&(te.fill=g);var A=r.createElement(`path`,u({d:n,style:te},O?ee:{})),ne=A;k.length>0&&(E.transform=k.join(` `),E.transformOrigin=`center`,O&&(ne=r.createElement(`g`,{style:E},A,r.createElement(`rect`,{width:`24`,height:`24`,fill:`transparent`}))));var j,re=ne,M=!0===w||typeof w!=`number`?2:w,N=!O&&(v||b);if(M<0&&(N=!N),w&&(re=r.createElement(`g`,{style:{animation:`spin`+(N?`-inverse`:``)+` linear `+Math.abs(M)+`s infinite`,transformOrigin:`center`}},ne,!(v||b||S!==0)&&r.createElement(`rect`,{width:`24`,height:`24`,fill:`transparent`}))),O)return re;var ie,P=`icon_labelledby_`+a,F=`icon_describedby_`+a;if(s)j=l?P+` `+F:P;else if(ie=`presentation`,l)throw Error(`title attribute required when description is set`);return r.createElement(`svg`,u({ref:t,viewBox:`0 0 24 24`,style:E,role:ie,"aria-labelledby":j},ee),s&&r.createElement(`title`,{id:P},s),l&&r.createElement(`desc`,{id:F},l),!O&&w&&(N?r.createElement(`style`,null,`@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }`):r.createElement(`style`,null,`@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }`)),re)}));p.displayName=`Icon`,p.propTypes={path:i.string.isRequired,size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),style:i.object,inStack:i.bool,className:i.string},p.defaultProps={size:null,color:`currentColor`,horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=p}])})),bC=`M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z`,xC=`M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z`,SC=`M16.24,3.56L21.19,8.5C21.97,9.29 21.97,10.55 21.19,11.34L12,20.53C10.44,22.09 7.91,22.09 6.34,20.53L2.81,17C2.03,16.21 2.03,14.95 2.81,14.16L13.41,3.56C14.2,2.78 15.46,2.78 16.24,3.56M4.22,15.58L7.76,19.11C8.54,19.9 9.8,19.9 10.59,19.11L14.12,15.58L9.17,10.63L4.22,15.58Z`,CC=`M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z`,wC=`M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z`,TC=`M19,13H5V11H19V13Z`,EC=`M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z`,DC=`M4,6V19H20V6H4Z`;I();var OC=u(yC(),1);function kC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function AC(e,t){return!e||kC(e)?e:kC(e.default)?e.default:t&&kC(e[t])?e[t]:t&&kC(e[t]?.default)?e[t].default:e}var jC=AC(OC.default,`Icon`),MC=({path:e})=>{let t;switch(e){case`mdiPencil`:t=EC;break;case`mdiMinus`:t=TC;break;case`mdiCircle`:t=bC;break;case`mdiRectangle`:t=DC;break;case`mdiFormatColorText`:t=wC;break;case`mdiFormatColorFill`:t=CC;break;case`mdiEraser`:t=SC;break;default:t=xC;break}return(0,R.jsx)(jC,{path:t,size:.8,rotate:180,horizontal:!0,vertical:!0,color:`#2B3963`})};MC.propTypes={path:F.string.isRequired},I();var{tools:NC}=Mm,{translator:PC}=jm,FC=U(`div`)(({theme:e})=>({marginTop:e.spacing(2)})),IC=U(`div`)(({theme:e})=>({border:`1px solid #E0E1E6`,borderRadius:`5px`,marginTop:e.spacing(2),backgroundColor:`#ECEDF1`})),LC=U(`div`)({minHeight:350,backgroundColor:`#fff`}),RC=U(`div`)(({theme:e})=>({borderBottom:`1px solid #E0E1E6`,borderTopLeftRadius:`5px`,borderTopRightRadius:`5px`,padding:`12px 8px 4px`,boxSizing:`border-box`,maxWidth:`calc(100% - 163px)`,"& button":{marginBottom:e.spacing(1)}})),zC=[`red`,`orange`,`yellow`,`violet`,`blue`,`green`,`white`,`black`].map(e=>({value:e,label:e})),BC=class extends L.Component{static propTypes={disabled:F.bool,session:F.object.isRequired,onSessionChange:F.func.isRequired,imageDimensions:F.object.isRequired,imageUrl:F.string.isRequired,backgroundImageEnabled:F.bool.isRequired,language:F.string};constructor(e){super(e);let t=new vC;this.state={scale:1,drawableDimensions:{height:0,width:0},toolActive:NC[0],fillColor:`white`,fillColorList:[{value:`transparent`,label:`no fill`},{value:`lightblue`,label:`light blue`},{value:`lightyellow`,label:`light yellow`},...zC],outlineColor:`black`,outlineColorList:zC,paintColor:`red`,paintColorList:zC,TextEntry:t}}setTranslatedState(e){let t=zC.map(t=>({value:t.value,label:PC.t(`drawingResponse.${t.label}`,{lng:e})}));this.setState({fillColorList:[{value:`transparent`,label:PC.t(`drawingResponse.noFill`,{lng:e})},{value:`lightblue`,label:PC.t(`drawingResponse.lightblue`,{lng:e})},{value:`lightyellow`,label:PC.t(`drawingResponse.lightyellow`,{lng:e})},...t],paintColor:PC.t(`drawingResponse.red`,{lng:e}),outlineColorList:t,paintColorList:t})}UNSAFE_componentWillReceiveProps(e){let{language:t}=e;this.setTranslatedState(t)}setDimensions(){let e=setInterval(()=>{try{let{height:e,width:t}=this.drawable.getBoundingClientRect(),n=this.props.session.width||t;e!==0&&t!==0&&this.setState({drawableDimensions:{height:e,width:n}})}catch(e){console.warn(`setDimensions Error: `,e)}finally{clearInterval(e)}},100)}componentDidMount(){let{language:e}=this.props;this.setTranslatedState(e),this.setDimensions(),this.observer=new MutationObserver(e=>{e.forEach(()=>{let e=document.getElementById(`question-container`)?.style?.cssText,t=(e?.substring(e.indexOf(`--pie-zoom`)+11,e.lastIndexOf(`%`)))?.replace(/\s/g,``);t?parseFloat(t)/100!==this.state.scale&&this.setState({scale:parseFloat(t)/100}):!t&&this.state.scale!==1&&this.setState({scale:1})})}),this.resizeObserver=new ResizeObserver(()=>{this.setDimensions()}),this.drawable&&this.resizeObserver.observe(this.drawable);let t=document.getElementById(`question-container`);t&&this.observer.observe(t,{attributes:!0,attributeFilter:[`style`]})}componentWillUnmount(){let{TextEntry:e}=this.state;e.removeEventListeners(),this.observer?.disconnect(),this.resizeObserver?.disconnect()}handleMakeToolActive(e){let{TextEntry:t}=this.state,{type:n}=e,{language:r}=this.props;n===`Text`?(t.addNewTextEntry(r),this.setState({updatedAt:new Date})):this.setState({toolActive:e})}checkIfToolIsDisabled=e=>{if(this.props.disabled)return!0;let{toolActive:t}=this.state;return e!==`Text`&&e===t.type};handleColorChange(e,t){let n=`${e}Color`;this.setState({[n]:t})}render(){let{disabled:e,imageUrl:t,imageDimensions:n,onSessionChange:r,session:i,backgroundImageEnabled:a,language:o}=this.props,{drawableDimensions:s,toolActive:c,fillColor:l,fillColorList:u,outlineColor:d,outlineColorList:f,paintColor:p,paintColorList:m,TextEntry:h}=this.state,g=s.height*this.state.scale;return(0,R.jsxs)(FC,{children:[!e&&(0,R.jsx)(_g,{fillColor:l,fillList:u,outlineColor:d,outlineList:f,paintColor:p,paintList:m,onFillColorChange:e=>this.handleColorChange(`fill`,e),onOutlineColorChange:e=>this.handleColorChange(`outline`,e),onPaintColorChange:e=>this.handleColorChange(`paint`,e),language:o}),(0,R.jsxs)(IC,{children:[(0,R.jsx)(RC,{children:NC.map(e=>{let{type:t,label:n,icon:r}=e;return(0,R.jsx)(Pm,{title:n,disabled:this.checkIfToolIsDisabled(t),onClick:()=>this.handleMakeToolActive(e),label:(0,R.jsx)(MC,{path:r})},t)})}),(0,R.jsx)(LC,{ref:e=>{this.drawable=e},style:{height:g,maxHeight:g,overflow:`scroll`},children:(0,R.jsx)(cC,{scale:this.state.scale,session:i,disabled:e,onSessionChange:r,fillColor:l,outlineColor:d,paintColor:p,imageUrl:t,drawableDimensions:s,imageDimensions:n,toolActive:c,TextEntry:h,backgroundImageEnabled:a,language:o})})]})]})}};I();function VC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function HC(e,t){return!e||VC(e)?e:VC(e.default)?e.default:t&&VC(e[t])?e[t]:t&&VC(e[t]?.default)?e[t].default:e}var UC=HC(xf,`UiLayout`)||HC(JC.UiLayout,`UiLayout`),WC=HC(Qf,`PreviewPrompt`)||HC(JC.PreviewPrompt,`PreviewPrompt`),GC=HC(vd,`Collapsible`)||HC(JC.Collapsible,`Collapsible`),KC=kp,qC=KC.default,JC=qC&&typeof qC==`object`?qC:KC,YC=U(UC)({color:Kl(),backgroundColor:mu()}),XC=U(GC)(({theme:e})=>({marginBottom:e.spacing(2)})),ZC=U(`div`)({color:Kl(),backgroundColor:mu()}),QC=class extends L.Component{constructor(e){super(e),this.state={showCorrect:!1,hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,errorMessage:e.message}}render(){let{model:{extraCSSRules:e,disabled:t,imageDimensions:n,imageUrl:r,prompt:i,mode:a,teacherInstructions:o,backgroundImageEnabled:s,language:c},session:l,onSessionChange:u}=this.props,{hasError:d,errorMessage:f}=this.state;return d?(0,R.jsxs)(ZC,{children:[`An error occured: `,f]}):(0,R.jsxs)(YC,{extraCSSRules:e,children:[o&&(0,R.jsx)(XC,{labels:{hidden:`Show Teacher Instructions`,visible:`Hide Teacher Instructions`},children:(0,R.jsx)(WC,{prompt:o})}),i&&(0,R.jsx)(WC,{tagName:`span`,prompt:i}),(0,R.jsx)(BC,{session:l,onSessionChange:u,isEvaluateMode:a===`evaluate`,imageDimensions:n,imageUrl:r,backgroundImageEnabled:s,disabled:t,language:c})]})}};QC.propTypes={model:F.object.isRequired,onSessionChange:F.func.isRequired,session:F.object.isRequired};var $C=v(),ew=class extends HTMLElement{constructor(){super(),this._root=null}set model(e){this._model=e,this.dispatchEvent(new M(this.tagName.toLowerCase(),this.isComplete(),!!this._model)),this._render()}isComplete(){return this._session&&(!S(this._session.drawables)||!S(this._session.texts))}sessionChanged=e=>{this._session.drawables=e.drawables,this._session.texts=e.texts,this._session.width=e.width,this.dispatchEvent(new N(this.tagName.toLowerCase(),this.isComplete())),this._render()};set session(e){this._session=e,this._render()}get session(){return this._session}connectedCallback(){this._render()}_render(){if(this._model&&this._session){let e=L.createElement(QC,{model:this._model,session:this._session,onSessionChange:this.sessionChanged});this._root||=(0,$C.createRoot)(this),this._root.render(e),queueMicrotask(()=>{re(this)})}}disconnectedCallback(){this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`drawing-response-element`)&&customElements.define(`drawing-response-element`,ew),ew})();
|
|
165
|
+
`,gx={};function _x(e,t,n=gx){if(!ux&&`zIndex`in t&&(console.warn(hx),ux=!0),!dx&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(mx),dx=!0)}for(var a in n)if(!lx[a]){var o=a.slice(0,2)===`on`,s=n[a]!==t[a];if(o&&s){var c=a.substr(2).toLowerCase();c.substr(0,7)===`content`&&(c=`content`+c.substr(7,1).toUpperCase()+c.substr(8)),e.off(c,n[a])}t.hasOwnProperty(a)||e.setAttr(a,void 0)}var l=px||t._useStrictMode,u={},d=!1;let f={};for(var a in t)if(!lx[a]){var o=a.slice(0,2)===`on`,p=n[a]!==t[a];if(o&&p){var c=a.substr(2).toLowerCase();c.substr(0,7)===`content`&&(c=`content`+c.substr(7,1).toUpperCase()+c.substr(8)),t[a]&&(f[c]=t[a])}!o&&(t[a]!==n[a]||l&&t[a]!==e.getAttr(a))&&(d=!0,u[a]=t[a])}for(var c in d&&(e.setAttrs(u),vx(e)),f)e.on(c+fx,f[c])}function vx(e){if(!J.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}var yx=c({appendChild:()=>Bx,appendChildToContainer:()=>Vx,appendInitialChild:()=>wx,cancelTimeout:()=>Rx,clearContainer:()=>$x,commitMount:()=>qx,commitTextUpdate:()=>Kx,commitUpdate:()=>Jx,createInstance:()=>Tx,createTextInstance:()=>Ex,detachDeletedInstance:()=>eS,finalizeInitialChildren:()=>Dx,getChildHostContext:()=>Ix,getCurrentEventPriority:()=>tS,getPublicInstance:()=>Ox,getRootHostContext:()=>Fx,hideInstance:()=>Yx,hideTextInstance:()=>Xx,idlePriority:()=>bx.unstable_IdlePriority,insertBefore:()=>Hx,insertInContainerBefore:()=>Ux,isPrimaryRenderer:()=>!1,noTimeout:()=>-1,now:()=>bx.unstable_now,prepareForCommit:()=>kx,preparePortalMount:()=>Ax,prepareUpdate:()=>jx,removeChild:()=>Wx,removeChildFromContainer:()=>Gx,resetAfterCommit:()=>Mx,resetTextContent:()=>Nx,run:()=>bx.unstable_runWithPriority,scheduleTimeout:()=>Lx,shouldDeprioritizeSubtree:()=>Px,shouldSetTextContent:()=>zx,supportsMutation:()=>!0,unhideInstance:()=>Zx,unhideTextInstance:()=>Qx,warnsIfNotActing:()=>!0}),bx=h(),xx=cx(),Sx={},Cx={};ix.Node.prototype._applyProps=_x;function wx(e,t){if(typeof t==`string`){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),vx(e)}function Tx(e,t,n){let r=ix[e];r||=(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),ix.Group);let i={},a={};for(var o in t)o.slice(0,2)===`on`?a[o]=t[o]:i[o]=t[o];let s=new r(i);return _x(s,a),s}function Ex(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Dx(e,t,n){return!1}function Ox(e){return e}function kx(){return null}function Ax(){return null}function jx(e,t,n,r){return Cx}function Mx(){}function Nx(e){}function Px(e,t){return!1}function Fx(){return Sx}function Ix(){return Sx}var Lx=setTimeout,Rx=clearTimeout;function zx(e,t){return!1}function Bx(e,t){t.parent===e?t.moveToTop():e.add(t),vx(e)}function Vx(e,t){t.parent===e?t.moveToTop():e.add(t),vx(e)}function Hx(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),vx(e)}function Ux(e,t,n){Hx(e,t,n)}function Wx(e,t){t.destroy(),t.off(fx),vx(e)}function Gx(e,t){t.destroy(),t.off(fx),vx(e)}function Kx(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function qx(e,t,n){}function Jx(e,t,n,r,i){_x(e,i,r)}function Yx(e){e.hide(),vx(e)}function Xx(e){}function Zx(e,t){(t.visible==null||t.visible)&&e.show()}function Qx(e,t){}function $x(e){}function eS(){}var tS=()=>xx.DefaultEventPriority,nS=Object.defineProperty,rS=Object.defineProperties,iS=Object.getOwnPropertyDescriptors,aS=Object.getOwnPropertySymbols,oS=Object.prototype.hasOwnProperty,sS=Object.prototype.propertyIsEnumerable,cS=(e,t,n)=>t in e?nS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lS=(e,t)=>{for(var n in t||={})oS.call(t,n)&&cS(e,n,t[n]);if(aS)for(var n of aS(t))sS.call(t,n)&&cS(e,n,t[n]);return e},uS=(e,t)=>rS(e,iS(t));typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`)?L.useLayoutEffect:L.useEffect;function dS(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){let e=dS(r,t,n);if(e)return e;r=t?null:r.sibling}}function fS(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}var pS=console.error;console.error=function(){let e=[...arguments].join(``);if(e?.startsWith(`Warning:`)&&e.includes(`useContext`)){console.error=pS;return}return pS.apply(this,arguments)};var mS=fS(L.createContext(null)),hS=class extends L.Component{render(){return L.createElement(mS.Provider,{value:this._reactInternals},this.props.children)}};function gS(){let e=L.useContext(mS);if(e===null)throw Error(`its-fine: useFiber must be called within a <FiberProvider />!`);let t=L.useId();return L.useMemo(()=>{for(let n of[e,e?.alternate]){if(!n)continue;let e=dS(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}function _S(){let e=gS(),[t]=L.useState(()=>new Map);t.clear();let n=e;for(;n;){if(n.type&&typeof n.type==`object`){let e=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;e&&e!==mS&&!t.has(e)&&t.set(e,L.useContext(fS(e)))}n=n.return}return t}function vS(){let e=_S();return L.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>L.createElement(t,null,L.createElement(n.Provider,uS(lS({},r),{value:e.get(n)}))),e=>L.createElement(hS,lS({},e))),[e])}var yS=u(ox());function bS(e){let t=L.useRef({});return L.useLayoutEffect(()=>{t.current=e}),L.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}var xS=e=>{let t=L.useRef(null),n=L.useRef(null),r=L.useRef(null),i=bS(e),a=vS(),o=t=>{let{forwardedRef:n}=e;n&&(typeof n==`function`?n(t):n.current=t)};return L.useLayoutEffect(()=>(n.current=new ix.Stage({width:e.width,height:e.height,container:t.current}),o(n.current),r.current=kS.createContainer(n.current,xx.LegacyRoot,!1,null),kS.updateContainer(L.createElement(a,{},e.children),r.current),()=>{ix.isBrowser&&(o(null),kS.updateContainer(null,r.current,null),n.current.destroy())}),[]),L.useLayoutEffect(()=>{o(n.current),_x(n.current,e,i),kS.updateContainer(L.createElement(a,{},e.children),r.current,null)}),L.createElement(`div`,{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},SS=`Layer`,CS=`Rect`,wS=`Circle`,TS=`Line`,ES=`Text`,DS=`Arrow`,OS=`Transformer`,kS=(0,yS.default)(yx);kS.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:`18.3.1`,rendererPackageName:`react-konva`});var AS=L.forwardRef((e,t)=>L.createElement(hS,{},L.createElement(xS,{...e,forwardedRef:t})));I();var jS=U(`div`)({position:`relative`,width:`fit-content`}),MS=U(`img`)({alignItems:`center`,display:`flex`,justifyContent:`center`}),NS=({url:e,dimensions:{height:t,width:n}})=>(0,R.jsx)(jS,{children:(0,R.jsx)(MS,{alt:`drawing-response-image`,src:e,style:{height:t,maxWidth:n,maxHeight:350,width:n}})});NS.propTypes={dimensions:F.object.isRequired,url:F.string.isRequired};var PS=class{constructor(e,t){let{startx:n,starty:r,fillColor:i,outlineColor:a,createdAt:o}=e;this.startx=n,this.starty=r,this.createdAt=o,this.fillColor=i,this.outlineColor=a,this.type=t}toJson(){return JSON.parse(JSON.stringify(this))}};function FS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function IS(e,t){return!e||FS(e)?e:FS(e.default)?e.default:t&&FS(e[t])?e[t]:t&&FS(e[t]?.default)?e[t].default:e}var LS=IS(TS,`Line`),RS=class e extends PS{static TYPE=`FreePathDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,points:i,posX:a,posY:o}=t;this.points=i||[n,r],this.posX=a||0,this.posY=o||0}registerMovement(e,t){this.points=[...this.points,e,t]}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,R.jsx)(LS,{draggable:t,tension:0,bezier:!0,points:this.points,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.paintColor||this.outlineColor,x:this.posX,y:this.posY},n)}};function zS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function BS(e,t){return!e||zS(e)?e:zS(e.default)?e.default:t&&zS(e[t])?e[t]:t&&zS(e[t]?.default)?e[t].default:e}var VS=BS(DS,`Arrow`),HS=class e extends PS{static TYPE=`LineDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a,posX:o,posY:s}=t;this.x=i||n,this.y=a||r,this.posX=o||0,this.posY=s||0}registerMovement(e,t){this.x=e,this.y=t}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e,a=[this.startx,this.starty,this.x,this.y];return(0,R.jsx)(VS,{draggable:t,points:a,fill:this.paintColor||this.outlineColor,onClick:()=>this.handleOnClick(e),stroke:this.paintColor||this.outlineColor,onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,x:this.posX,y:this.posY,pointerWidth:0,pointerLength:0},n)}};function US(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function WS(e,t){return!e||US(e)?e:US(e.default)?e.default:t&&US(e[t])?e[t]:t&&US(e[t]?.default)?e[t].default:e}var GS=WS(CS,`Rect`),KS=class e extends PS{static TYPE=`RectangleDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a}=t;this.startx=n,this.starty=r,this.x=i||n,this.y=a||r,this.width=i-n||0,this.height=a-r||0}registerMovement(e,t){this.x=e,this.y=t,this.width=this.x-this.startx,this.height=this.y-this.starty}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{let n=this.startx-t.target.getX(),r=this.starty-t.target.getY();this.startx=t.target.getX(),this.starty=t.target.getY(),this.x-=n,this.y-=r,e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,R.jsx)(GS,{height:this.height,width:this.width,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.outlineColor,draggable:t,strokeWidth:2,x:this.startx,y:this.starty},n)}};function qS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function JS(e,t){return!e||qS(e)?e:qS(e.default)?e.default:t&&qS(e[t])?e[t]:t&&qS(e[t]?.default)?e[t].default:e}var YS=JS(wS,`Circle`),XS=class e extends PS{static TYPE=`CircleDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a}=t;this.startx=n,this.starty=r,this.x=i||n,this.y=a||r;let o=this.startx-this.x,s=this.starty-this.y;this.radius=Math.sqrt(o*o+s*s)}registerMovement(e,t){this.x=e,this.y=t;let n=this.startx-this.x,r=this.starty-this.y;this.radius=Math.sqrt(n*n+r*r)}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{let n=this.startx-t.target.getX(),r=this.starty-t.target.getY();this.startx=t.target.getX(),this.starty=t.target.getY(),this.x-=n,this.y-=r,e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,R.jsx)(YS,{draggable:t,radius:this.radius,x:this.startx,y:this.starty,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.outlineColor},n)}};function ZS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function QS(e,t){return!e||ZS(e)?e:ZS(e.default)?e.default:t&&ZS(e[t])?e[t]:t&&ZS(e[t]?.default)?e[t].default:e}var $S=QS(TS,`Line`),eC=[RS,HS,KS,XS,class e extends PS{static TYPE=`EraserDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,points:i,posX:a,posY:o}=t;this.points=i||[n,r],this.posX=a||0,this.posY=o||0}registerMovement(e,t){this.points=[...this.points,e,t]}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,R.jsx)($S,{draggable:t,globalCompositeOperation:`destination-out`,tension:0,bezier:!0,points:this.points,onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,strokeStyle:`#df4b26`,lineJoin:`round`,lineWidth:`5`,fill:`white`,stroke:`white`,strokeWidth:5,x:this.posX,y:this.posY},n)}}],tC=(e,t)=>{let n=eC.find(t=>t.TYPE===e);if(n)return new n(t);throw Error(`Can't find drawable for type: ${e} and props: ${JSON.stringify(t)}`)};I();function nC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function rC(e,t){return!e||nC(e)?e:nC(e.default)?e.default:t&&nC(e[t])?e[t]:t&&nC(e[t]?.default)?e[t].default:e}var iC=rC(AS,`Stage`),aC=rC(SS,`Layer`),{translator:oC}=Nm,sC=U(`div`)({display:`flex`,flexWrap:`wrap`,justifyContent:`flex-end`}),cC=U(`div`)({position:`relative`,width:`100%`}),lC=U(`div`)({marginTop:-43,marginRight:10,position:`absolute`}),uC=class extends L.Component{constructor(e){super(e),this.state={drawables:[],newDrawable:[],textIsSelected:!1},this.stage=null,this.layer=null}componentWillUnmount(){this.stage=null,this.layer=null}UNSAFE_componentWillReceiveProps(e){if(e.session){let{TextEntry:t}=e,{drawables:n}=this.state;if(e.session.drawables){let r=x(e.session.drawables);if(JSON.stringify(n)!==JSON.stringify((r||[]).map(e=>T(e,`type`)))){let t=e.session.drawables;this.setState({drawables:t.map(e=>tC(e.type,e))})}w(t.all.map(e=>({...e,...t[`text_${e.id}`]&&t[`text_${e.id}`].attrs,value:t[`textarea_${e.id}`]&&t[`textarea_${e.id}`].value})),e.session.texts)||t.setAll(e.session.texts||[])}}else this.handleSessionChange()}handleSessionChange=()=>{let{onSessionChange:e,session:t,TextEntry:n,drawableDimensions:r}=this.props,{drawables:i}=this.state,a={width:r.width,drawables:i.map(e=>e.toJson()),texts:n.all.map(e=>({...e,...n[`text_${e.id}`]&&n[`text_${e.id}`].attrs,value:n[`textarea_${e.id}`]&&n[`textarea_${e.id}`].value}))};w(a,t)||e({...t,...a})};onMouseOverElement=()=>this.setState({isOver:!0});onMouseOutElement=()=>this.setState({isOver:!1});handleMouseDown=e=>{document.body.style.overflow=`hidden`;let{newDrawable:t,textIsSelected:n}=this.state,{toolActive:r,fillColor:i,outlineColor:a,scale:o}=this.props;if(t.length===0&&!n){let t=e.target.getStage();if(!t)return;let{x:n,y:s}=t.getPointerPosition(),c=tC(r.type,{startx:n/o,starty:s/o,fillColor:i,outlineColor:a,createdAt:new Date});this.setState({newDrawable:[c]})}};handleMouseUp=e=>{document.body.style.overflow=`initial`;let{newDrawable:t,drawables:n}=this.state,{scale:r}=this.props;if(t.length===1){let i=e.target.getStage();if(!i)return;let{x:a,y:o}=i.getPointerPosition(),s=t[0];s.registerMovement(a/r,o/r),n.push(s),this.setState({newDrawable:[],drawables:n},this.handleSessionChange.bind(this,s))}};handleMouseMove=e=>{let{newDrawable:t}=this.state,{scale:n}=this.props;if(t.length===1){let r=e.target.getStage();if(!r)return;let{x:i,y:a}=r.getPointerPosition(),o=t[0];o.registerMovement(i/n,a/n),this.setState({newDrawable:[o]})}};handleUndo=()=>{let{drawables:e}=this.state,{TextEntry:t}=this.props,n=[...e],r=[...e,...t.all];r.sort((e,t)=>new Date(e.createdAt)-new Date(t.createdAt));let i=r[r.length-1];i&&i.type===`text-entry`?(t.all.pop(),this.setState({updatedAt:new Date},this.handleSessionChange)):(n.pop(),this.setState({drawables:n},this.handleSessionChange))};handleClearAll=()=>{let{TextEntry:e}=this.props;e.all=[],this.setState({drawables:[],updatedAt:new Date},this.handleSessionChange)};toggleTextSelected=e=>this.setState({textIsSelected:e});render(){let{disabled:e,drawableDimensions:t,fillColor:n,imageDimensions:r,imageUrl:i,paintColor:a,outlineColor:o,TextEntry:s,backgroundImageEnabled:c=!0,toolActive:{type:l},scale:u,language:d}=this.props,{isOver:f,newDrawable:p}=this.state,m=l===`Select`,h=l===`PaintBucket`,g=[...this.state.drawables,...this.state.newDrawable],_={draggable:m&&!e,disabled:e,paint:h,fillColor:n,forceUpdate:()=>this.setState({updatedAt:new Date}),paintColor:a,outlineColor:o,toggleTextSelected:this.toggleTextSelected,handleSessionChange:this.handleSessionChange,stage:this.stage,onMouseOverElement:this.onMouseOverElement,onMouseOutElement:this.onMouseOutElement,scale:u},v={};e||(v={onMouseUp:this.handleMouseUp,onTouchEnd:this.handleMouseUp,onMouseMove:this.handleMouseMove,onTouchMove:this.handleMouseMove},m||(v.onMouseDown=this.handleMouseDown,v.onTouchStart=this.handleMouseDown));let y=r?.height*u,b=r?.width*u;return(0,R.jsxs)(sC,{children:[(0,R.jsxs)(lC,{children:[(0,R.jsx)(Im,{disabled:e,onClick:this.handleUndo,label:oC.t(`common:undo`,{lng:d})}),(0,R.jsx)(Im,{disabled:e,onClick:this.handleClearAll,label:oC.t(`common:clearAll`,{lng:d})})]}),(0,R.jsxs)(cC,{children:[c&&i&&(0,R.jsx)(NS,{dimensions:{height:y,width:b},url:i}),s.renderTextareas(),(0,R.jsx)(`div`,{style:{position:`absolute`,left:0,top:0,touchAction:`none`,cursor:m&&(f||p.length===1)?`pointer`:`default`},children:(0,R.jsx)(iC,{scaleX:u,scaleY:u,ref:e=>this.stage=e,height:t.height,width:t.width,...v,children:(0,R.jsxs)(aC,{ref:e=>this.layer=e,children:[g.map((e,t)=>e.render({..._,key:t})),s.render(_)]})},`drawing-stage`)})]})]})}};uC.propTypes={disabled:F.bool,drawableDimensions:F.object.isRequired,imageDimensions:F.object.isRequired,fillColor:F.string.isRequired,onSessionChange:F.func.isRequired,paintColor:F.string.isRequired,outlineColor:F.string.isRequired,imageUrl:F.string.isRequired,TextEntry:F.object.isRequired,toolActive:F.object.isRequired,session:F.object.isRequired,backgroundImageEnabled:F.bool.isRequired,scale:F.number.isRequired,language:F.string},I();function dC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function fC(e,t){return!e||dC(e)?e:dC(e.default)?e.default:t&&dC(e[t])?e[t]:t&&dC(e[t]?.default)?e[t].default:e}var pC=fC(OS,`Transformer`),mC=class extends L.Component{componentDidMount(){this.checkNode()}componentDidUpdate(){this.checkNode()}checkNode(){let e=this.transformer.getStage(),{selectedShapeName:t}=this.props,n=e.findOne(`.${t}`);n!==this.transformer.node()&&(n?this.transformer.attachTo(n):this.transformer.detach(),this.transformer.getLayer().batchDraw())}render(){return(0,R.jsx)(pC,{ref:e=>{this.transformer=e},enabledAnchors:[`middle-left`,`middle-right`],...this.props})}};mC.propTypes={selectedShapeName:F.string.isRequired};function hC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function gC(e,t){return!e||hC(e)?e:hC(e.default)?e.default:t&&hC(e[t])?e[t]:t&&hC(e[t]?.default)?e[t].default:e}var _C=gC(ES,`Text`),{translator:vC}=Nm,yC=()=>Math.random().toString(36).substring(2)+new Date().getTime().toString(36),bC=class e{static getTextareaNode(e){return`textarea_${e}`}static getTextNode(e){return`text_${e}`}static getTransformerNode(e){return`transformer_${e}`}constructor(e){this.all=e&&e.all||[],this.eventListenersDetachArray=[]}removeEventListeners=()=>this.eventListenersDetachArray.forEach(e=>e());setAll=e=>{this.all=e,this.props.forceUpdate()};addNewTextEntry=e=>{let t=this.all,n=yC();t.push({id:n,text:``,isDefault:!0,label:vC.t(`drawingResponse.onDoubleClick`,{lng:e}),width:200,x:(t.length+1)*5+50,y:(t.length+1)*5+50,textVisible:!0,transformerVisible:!0,textareaVisible:!1,createdAt:new Date,type:`text-entry`}),this.props.handleSessionChange()};showOnlyTextNodes(){this.all.map(e=>{e.textVisible=!0,e.transformerVisible=!1,e.textareaVisible=!1})}toggleTextarea(e,t){this.all=this.all.map(n=>n.id===e?{...n,textVisible:!t,transformerVisible:!t,textareaVisible:t}:n),this.props.forceUpdate()}initializeDefault(e,t){if(t){let t=this.all.filter(t=>t.id===e)[0];t.isDefault=!1}}saveValue(e,t){let n=t.value;this.all=this.all.map(t=>t.id===e?{...t,text:n}:t),n||(this.all=this.all.filter(t=>t.id!==e)),this.toggleTextarea(e,!1),this.props.handleSessionChange(),this.props.forceUpdate()}handleMouseDown=()=>this.props.toggleTextSelected(!0);handleMouseUp=()=>this.props.toggleTextSelected(!1);handleClick=(e,t)=>{let n=this.all.filter(e=>e.id===t)[0];n.transformerVisible=!0,this.props.forceUpdate()};handleDblClick=(t,n)=>{let{id:r,isDefault:i}=n;this.toggleTextarea(r,!0);let a=this[e.getTextNode(r)],o=this[e.getTextareaNode(r)];if(!a||!o)return;let s=a.getAbsolutePosition();o.value=n.text||``,o.style.position=`absolute`,o.style.top=s.y+`px`,o.style.left=s.x+`px`,o.style.width=a.width()-a.padding()*2+`px`,o.style.height=a.height()-a.padding()*2+5+`px`,o.style.fontSize=a.fontSize()+`px`,o.style.border=`none`,o.style.padding=`0px`,o.style.margin=`0px`,o.style.overflow=`hidden`,o.style.background=`none`,o.style.outline=`none`,o.style.resize=`none`,o.style.lineHeight=a.lineHeight(),o.style.fontFamily=a.fontFamily(),o.style.transformOrigin=`left top`,o.style.textAlign=a.align(),o.style.color=a.fill(),o.style.display=`block`;let c=a.rotation();o.style.transform=c?`rotateZ(${c}deg)`:``,o.focus();let l=e=>{e.key===`Enter`&&!e.shiftKey&&this.saveValue(r,o),e.key===`Escape`&&this.toggleTextarea(r,!1)},u=()=>{this.showOnlyTextNodes(),this.saveValue(r,o)};o.addEventListener(`keydown`,l),o.addEventListener(`blur`,u),this.eventListenersDetachArray.push(()=>{o.removeEventListener(`keydown`,l),o.removeEventListener(`blur`,u)}),this.initializeDefault(r,i),this.props.forceUpdate()};handleTransform=(e,t)=>{this[t].setAttrs({width:this[t].width()*this[t].scaleX(),scaleX:this.props.scale})};renderTextareas(){return this.all.map(e=>{let{id:t,textareaVisible:n}=e,r=`textarea_${t}`;return(0,R.jsx)(`textarea`,{ref:e=>{this[r]=e},style:{display:`${n?`block`:`none`}`}},r)})}setInitialProps(e){this.props||=e}render(e){if(this.setInitialProps(e),e.stage){let t=e.stage;if(t!==this.stage){let e=e=>{e.target===this.stage&&(this.showOnlyTextNodes(),this.props.forceUpdate())};t.on(`click`,e),this.eventListenersDetachArray.push(()=>t.off(`click`,e))}this.stage=t}return this.all.map(t=>{let{id:n,label:r,x:i,y:a,width:o,textVisible:s,rotation:c,transformerVisible:l}=t,u=`text_${n}`,d=`transformer_${n}`,f={};return e.disabled||(f={onClick:e=>this.handleClick(e,n),onTap:e=>this.handleClick(e,n),onDblClick:e=>this.handleDblClick(e,t),onDblTap:e=>this.handleDblClick(e,t),onTransform:e=>this.handleTransform(e,u),onTransformEnd:this.props.handleSessionChange,onMouseDown:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onTouchStart:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onDragStart:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onDragMove:e=>{e.cancelBubble=!0},onDragEnd:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1),this.props.handleSessionChange()},onMouseUp:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1)},onTouchEnd:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1)},onMouseEnter:this.props.onMouseOverElement,onMouseLeave:this.props.onMouseOutElement}),c&&(f.rotation=c),[(0,R.jsx)(_C,{bubbles:!0,id:n,ref:e=>{this[u]=e},text:t.text||r,name:u,x:i,y:a,width:o,draggable:!e.disabled,visible:s,fontSize:16,...f},n),l&&(0,R.jsx)(mC,{ref:e=>{this[d]=e},selectedShapeName:u,onMouseDown:this.handleMouseDown,onTouchStart:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchEnd:this.handleMouseUp},`transformer_${n}`)]})}},xC=s(((e,t)=>{t.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=2)}([function(e,t){e.exports=(I(),d(ie))},function(e,t){e.exports=p()},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n(0),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},s=0,c=r.forwardRef((function(e,t){var n=e.title,i=n===void 0?null:n,c=e.description,l=c===void 0?null:c,u=e.size,d=u===void 0?null:u,f=e.color,p=f===void 0?`currentColor`:f,m=e.horizontal,h=m===void 0?null:m,g=e.vertical,_=g===void 0?null:g,v=e.rotate,y=v===void 0?null:v,b=e.spin,x=b===void 0?null:b,S=e.style,C=S===void 0?{}:S,w=e.children,T=o(e,[`title`,`description`,`size`,`color`,`horizontal`,`vertical`,`rotate`,`spin`,`style`,`children`]);s++;var E,D=x!==null&&x,O=r.Children.map(w,(function(e){var t=e;!0!==D&&(D=!0===(x===null?t.props.spin:x));var n=t.props.size;typeof d==`number`&&typeof t.props.size==`number`&&(n=t.props.size/d);var i={size:n,color:p===null?t.props.color:p,horizontal:h===null?t.props.horizontal:h,vertical:_===null?t.props.vertical:_,rotate:y===null?t.props.rotate:y,spin:x===null?t.props.spin:x,inStack:!0};return r.cloneElement(t,i)}));d!==null&&(C.width=typeof d==`string`?d:1.5*d+`rem`);var ee,te=`stack_labelledby_`+s,k=`stack_describedby_`+s;if(i)E=l?te+` `+k:te;else if(ee=`presentation`,l)throw Error(`title attribute required when description is set`);return r.createElement(`svg`,a({ref:t,viewBox:`0 0 24 24`,style:C,role:ee,"aria-labelledby":E},T),i&&r.createElement(`title`,{id:te},i),l&&r.createElement(`desc`,{id:k},l),D&&r.createElement(`style`,null,`@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }`,`@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }`),O)}));c.displayName=`Stack`,c.propTypes={size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),children:i.oneOfType([i.arrayOf(i.node),i.node]).isRequired,className:i.string,style:i.object},c.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var l=c;n.d(t,`Icon`,(function(){return p})),n.d(t,`Stack`,(function(){return l}));var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},f=0,p=r.forwardRef((function(e,t){var n=e.path,i=e.id,a=i===void 0?++f:i,o=e.title,s=o===void 0?null:o,c=e.description,l=c===void 0?null:c,p=e.size,m=p===void 0?null:p,h=e.color,g=h===void 0?`currentColor`:h,_=e.horizontal,v=_!==void 0&&_,y=e.vertical,b=y!==void 0&&y,x=e.rotate,S=x===void 0?0:x,C=e.spin,w=C!==void 0&&C,T=e.style,E=T===void 0?{}:T,D=e.inStack,O=D!==void 0&&D,ee=d(e,[`path`,`id`,`title`,`description`,`size`,`color`,`horizontal`,`vertical`,`rotate`,`spin`,`style`,`inStack`]),te={},k=[];m!==null&&(O?k.push(`scale(`+m+`)`):(E.width=typeof m==`string`?m:1.5*m+`rem`,E.height=E.width)),v&&k.push(`scaleX(-1)`),b&&k.push(`scaleY(-1)`),S!==0&&k.push(`rotate(`+S+`deg)`),g!==null&&(te.fill=g);var A=r.createElement(`path`,u({d:n,style:te},O?ee:{})),ne=A;k.length>0&&(E.transform=k.join(` `),E.transformOrigin=`center`,O&&(ne=r.createElement(`g`,{style:E},A,r.createElement(`rect`,{width:`24`,height:`24`,fill:`transparent`}))));var j,re=ne,M=!0===w||typeof w!=`number`?2:w,N=!O&&(v||b);if(M<0&&(N=!N),w&&(re=r.createElement(`g`,{style:{animation:`spin`+(N?`-inverse`:``)+` linear `+Math.abs(M)+`s infinite`,transformOrigin:`center`}},ne,!(v||b||S!==0)&&r.createElement(`rect`,{width:`24`,height:`24`,fill:`transparent`}))),O)return re;var ie,P=`icon_labelledby_`+a,F=`icon_describedby_`+a;if(s)j=l?P+` `+F:P;else if(ie=`presentation`,l)throw Error(`title attribute required when description is set`);return r.createElement(`svg`,u({ref:t,viewBox:`0 0 24 24`,style:E,role:ie,"aria-labelledby":j},ee),s&&r.createElement(`title`,{id:P},s),l&&r.createElement(`desc`,{id:F},l),!O&&w&&(N?r.createElement(`style`,null,`@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }`):r.createElement(`style`,null,`@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }`)),re)}));p.displayName=`Icon`,p.propTypes={path:i.string.isRequired,size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),style:i.object,inStack:i.bool,className:i.string},p.defaultProps={size:null,color:`currentColor`,horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=p}])})),SC=`M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z`,CC=`M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z`,wC=`M16.24,3.56L21.19,8.5C21.97,9.29 21.97,10.55 21.19,11.34L12,20.53C10.44,22.09 7.91,22.09 6.34,20.53L2.81,17C2.03,16.21 2.03,14.95 2.81,14.16L13.41,3.56C14.2,2.78 15.46,2.78 16.24,3.56M4.22,15.58L7.76,19.11C8.54,19.9 9.8,19.9 10.59,19.11L14.12,15.58L9.17,10.63L4.22,15.58Z`,TC=`M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z`,EC=`M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z`,DC=`M19,13H5V11H19V13Z`,OC=`M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z`,kC=`M4,6V19H20V6H4Z`;I();var AC=u(xC(),1);function jC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function MC(e,t){return!e||jC(e)?e:jC(e.default)?e.default:t&&jC(e[t])?e[t]:t&&jC(e[t]?.default)?e[t].default:e}var NC=MC(AC.default,`Icon`),PC=({path:e})=>{let t;switch(e){case`mdiPencil`:t=OC;break;case`mdiMinus`:t=DC;break;case`mdiCircle`:t=SC;break;case`mdiRectangle`:t=kC;break;case`mdiFormatColorText`:t=EC;break;case`mdiFormatColorFill`:t=TC;break;case`mdiEraser`:t=wC;break;default:t=CC;break}return(0,R.jsx)(NC,{path:t,size:.8,rotate:180,horizontal:!0,vertical:!0,color:`#2B3963`})};PC.propTypes={path:F.string.isRequired},I();var{tools:FC}=Pm,{translator:IC}=Nm,LC=U(`div`)(({theme:e})=>({marginTop:e.spacing(2)})),RC=U(`div`)(({theme:e})=>({border:`1px solid #E0E1E6`,borderRadius:`5px`,marginTop:e.spacing(2),backgroundColor:`#ECEDF1`})),zC=U(`div`)({minHeight:350,backgroundColor:`#fff`}),BC=U(`div`)(({theme:e})=>({borderBottom:`1px solid #E0E1E6`,borderTopLeftRadius:`5px`,borderTopRightRadius:`5px`,padding:`12px 8px 4px`,boxSizing:`border-box`,maxWidth:`calc(100% - 163px)`,"& button":{marginBottom:e.spacing(1)}})),VC=[`red`,`orange`,`yellow`,`violet`,`blue`,`green`,`white`,`black`].map(e=>({value:e,label:e})),HC=class extends L.Component{static propTypes={disabled:F.bool,session:F.object.isRequired,onSessionChange:F.func.isRequired,imageDimensions:F.object.isRequired,imageUrl:F.string.isRequired,backgroundImageEnabled:F.bool.isRequired,language:F.string};constructor(e){super(e);let t=new bC;this.state={scale:1,drawableDimensions:{height:0,width:0},toolActive:FC[0],fillColor:`white`,fillColorList:[{value:`transparent`,label:`no fill`},{value:`lightblue`,label:`light blue`},{value:`lightyellow`,label:`light yellow`},...VC],outlineColor:`black`,outlineColorList:VC,paintColor:`red`,paintColorList:VC,TextEntry:t}}setTranslatedState(e){let t=VC.map(t=>({value:t.value,label:IC.t(`drawingResponse.${t.label}`,{lng:e})}));this.setState({fillColorList:[{value:`transparent`,label:IC.t(`drawingResponse.noFill`,{lng:e})},{value:`lightblue`,label:IC.t(`drawingResponse.lightblue`,{lng:e})},{value:`lightyellow`,label:IC.t(`drawingResponse.lightyellow`,{lng:e})},...t],paintColor:IC.t(`drawingResponse.red`,{lng:e}),outlineColorList:t,paintColorList:t})}UNSAFE_componentWillReceiveProps(e){let{language:t}=e;this.setTranslatedState(t)}setDimensions(){let e=setInterval(()=>{try{let{height:e,width:t}=this.drawable.getBoundingClientRect(),n=this.props.session.width||t;e!==0&&t!==0&&this.setState({drawableDimensions:{height:e,width:n}})}catch(e){console.warn(`setDimensions Error: `,e)}finally{clearInterval(e)}},100)}componentDidMount(){let{language:e}=this.props;this.setTranslatedState(e),this.setDimensions(),this.observer=new MutationObserver(e=>{e.forEach(()=>{let e=document.getElementById(`question-container`)?.style?.cssText,t=(e?.substring(e.indexOf(`--pie-zoom`)+11,e.lastIndexOf(`%`)))?.replace(/\s/g,``);t?parseFloat(t)/100!==this.state.scale&&this.setState({scale:parseFloat(t)/100}):!t&&this.state.scale!==1&&this.setState({scale:1})})}),this.resizeObserver=new ResizeObserver(()=>{this.setDimensions()}),this.drawable&&this.resizeObserver.observe(this.drawable);let t=document.getElementById(`question-container`);t&&this.observer.observe(t,{attributes:!0,attributeFilter:[`style`]})}componentWillUnmount(){let{TextEntry:e}=this.state;e.removeEventListeners(),this.observer?.disconnect(),this.resizeObserver?.disconnect()}handleMakeToolActive(e){let{TextEntry:t}=this.state,{type:n}=e,{language:r}=this.props;n===`Text`?(t.addNewTextEntry(r),this.setState({updatedAt:new Date})):this.setState({toolActive:e})}checkIfToolIsDisabled=e=>{if(this.props.disabled)return!0;let{toolActive:t}=this.state;return e!==`Text`&&e===t.type};handleColorChange(e,t){let n=`${e}Color`;this.setState({[n]:t})}render(){let{disabled:e,imageUrl:t,imageDimensions:n,onSessionChange:r,session:i,backgroundImageEnabled:a,language:o}=this.props,{drawableDimensions:s,toolActive:c,fillColor:l,fillColorList:u,outlineColor:d,outlineColorList:f,paintColor:p,paintColorList:m,TextEntry:h}=this.state,g=s.height*this.state.scale;return(0,R.jsxs)(LC,{children:[!e&&(0,R.jsx)(yg,{fillColor:l,fillList:u,outlineColor:d,outlineList:f,paintColor:p,paintList:m,onFillColorChange:e=>this.handleColorChange(`fill`,e),onOutlineColorChange:e=>this.handleColorChange(`outline`,e),onPaintColorChange:e=>this.handleColorChange(`paint`,e),language:o}),(0,R.jsxs)(RC,{children:[(0,R.jsx)(BC,{children:FC.map(e=>{let{type:t,label:n,icon:r}=e;return(0,R.jsx)(Im,{title:n,disabled:this.checkIfToolIsDisabled(t),onClick:()=>this.handleMakeToolActive(e),label:(0,R.jsx)(PC,{path:r})},t)})}),(0,R.jsx)(zC,{ref:e=>{this.drawable=e},style:{height:g,maxHeight:g,overflow:`scroll`},children:(0,R.jsx)(uC,{scale:this.state.scale,session:i,disabled:e,onSessionChange:r,fillColor:l,outlineColor:d,paintColor:p,imageUrl:t,drawableDimensions:s,imageDimensions:n,toolActive:c,TextEntry:h,backgroundImageEnabled:a,language:o})})]})]})}};I();function UC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function WC(e,t){return!e||UC(e)?e:UC(e.default)?e.default:t&&UC(e[t])?e[t]:t&&UC(e[t]?.default)?e[t].default:e}var GC=WC(xf,`UiLayout`)||WC(XC.UiLayout,`UiLayout`),KC=WC(Qf,`PreviewPrompt`)||WC(XC.PreviewPrompt,`PreviewPrompt`),qC=WC(vd,`Collapsible`)||WC(XC.Collapsible,`Collapsible`),JC=kp,YC=JC.default,XC=YC&&typeof YC==`object`?YC:JC,ZC=U(GC)({color:Kl(),backgroundColor:mu()}),QC=U(qC)(({theme:e})=>({marginBottom:e.spacing(2)})),$C=U(`div`)({color:Kl(),backgroundColor:mu()}),ew=class extends L.Component{constructor(e){super(e),this.state={showCorrect:!1,hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,errorMessage:e.message}}render(){let{model:{extraCSSRules:e,disabled:t,imageDimensions:n,imageUrl:r,prompt:i,mode:a,teacherInstructions:o,backgroundImageEnabled:s,language:c},session:l,onSessionChange:u}=this.props,{hasError:d,errorMessage:f}=this.state;return d?(0,R.jsxs)($C,{children:[`An error occured: `,f]}):(0,R.jsxs)(ZC,{extraCSSRules:e,children:[o&&(0,R.jsx)(QC,{labels:{hidden:`Show Teacher Instructions`,visible:`Hide Teacher Instructions`},children:(0,R.jsx)(KC,{prompt:o})}),i&&(0,R.jsx)(KC,{tagName:`span`,prompt:i}),(0,R.jsx)(HC,{session:l,onSessionChange:u,isEvaluateMode:a===`evaluate`,imageDimensions:n,imageUrl:r,backgroundImageEnabled:s,disabled:t,language:c})]})}};ew.propTypes={model:F.object.isRequired,onSessionChange:F.func.isRequired,session:F.object.isRequired};var tw=v(),nw=class extends HTMLElement{constructor(){super(),this._root=null}set model(e){this._model=e,this.dispatchEvent(new M(this.tagName.toLowerCase(),this.isComplete(),!!this._model)),this._render()}isComplete(){return this._session&&(!S(this._session.drawables)||!S(this._session.texts))}sessionChanged=e=>{this._session.drawables=e.drawables,this._session.texts=e.texts,this._session.width=e.width,this.dispatchEvent(new N(this.tagName.toLowerCase(),this.isComplete())),this._render()};set session(e){this._session=e,this._render()}get session(){return this._session}connectedCallback(){this._render()}_render(){if(this._model&&this._session){let e=L.createElement(ew,{model:this._model,session:this._session,onSessionChange:this.sessionChanged});this._root||=(0,tw.createRoot)(this),this._root.render(e),queueMicrotask(()=>{re(this)})}}disconnectedCallback(){this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`drawing-response-element`)&&customElements.define(`drawing-response-element`,nw),nw})();
|